From baf84c9eb4080517f2aadbc12ba8751e8325702f Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 15 Jun 2022 22:09:18 -0400 Subject: [PATCH] launchpad-icdi: Cleaned up and fixed some C89-isms --- src/platforms/launchpad-icdi/platform.c | 14 +++++--------- src/platforms/launchpad-icdi/platform.h | 5 +---- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/platforms/launchpad-icdi/platform.c b/src/platforms/launchpad-icdi/platform.c index 954ccab..c26ce1f 100644 --- a/src/platforms/launchpad-icdi/platform.c +++ b/src/platforms/launchpad-icdi/platform.c @@ -47,11 +47,10 @@ uint32_t platform_time_ms(void) return time_ms; } -void -platform_init(void) +void platform_init(void) { - int i; - for(i=0; i<1000000; i++); + for (int i = 0; i < 1000000; ++i) + continue; rcc_sysclk_config(OSCSRC_MOSC, XTAL_16M, PLL_DIV_80MHZ); @@ -85,8 +84,7 @@ platform_init(void) cdcacm_init(); usb_enable_interrupts(USB_INT_RESET | USB_INT_DISCON | - USB_INT_RESUME | USB_INT_SUSPEND, - 0xff, 0xff); + USB_INT_RESUME | USB_INT_SUSPEND, 0xff, 0xff); } void platform_nrst_set_val(bool assert) @@ -132,9 +130,7 @@ char *serial_no_read(char *s) return s; } -void platform_request_boot(void) -{ -} +void platform_request_boot(void) { } void platform_max_frequency_set(uint32_t freq) { diff --git a/src/platforms/launchpad-icdi/platform.h b/src/platforms/launchpad-icdi/platform.h index e29faa1..8fc37e2 100644 --- a/src/platforms/launchpad-icdi/platform.h +++ b/src/platforms/launchpad-icdi/platform.h @@ -111,9 +111,6 @@ inline static uint8_t gpio_get(uint32_t port, uint8_t pin) { #define disconnect_usb() do { usbd_disconnect(usbdev,1); nvic_disable_irq(USB_IRQ);} while(0) -static inline int platform_hwversion(void) -{ - return 0; -} +static inline int platform_hwversion(void) { return 0; } #endif