diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_adc.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_adc.c index 313e40c438..4850230f9f 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_adc.c +++ b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_adc.c @@ -62,7 +62,8 @@ /* Up to 3 ADC interfaces are supported */ -#if defined(CONFIG_STM32H7_ADC1) || defined(CONFIG_STM32H7_ADC2) || defined(CONFIG_STM32H7_ADC3) +#if defined(CONFIG_STM32H7_ADC1) || defined(CONFIG_STM32H7_ADC2) || \ + defined(CONFIG_STM32H7_ADC3) #ifndef CONFIG_STM32H7_ADC1 # warning "Channel information only available for ADC1" #endif @@ -82,7 +83,10 @@ * ADC1: {5, 10, 12, 13, 15}; */ -static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] = {5, 10, 12, 13, 15}; +static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] = +{ + 5, 10, 12, 13, 15 +}; /* Configurations of pins used by each ADC channels * @@ -90,11 +94,11 @@ static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] = {5, 10, 12, 13, 15}; * GPIO_ADC12_INP15}; */ -static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = {GPIO_ADC12_INP5, \ - GPIO_ADC123_INP10, \ - GPIO_ADC123_INP12, \ - GPIO_ADC12_INP13, \ - GPIO_ADC12_INP15}; +static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = +{ + GPIO_ADC12_INP5, GPIO_ADC123_INP10, GPIO_ADC123_INP12, GPIO_ADC12_INP13, + GPIO_ADC12_INP15 +}; #endif #ifdef CONFIG_STM32H7_ADC3 @@ -103,7 +107,10 @@ static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = {GPIO_ADC12_INP5, \ * ADC3: {6,}; */ -static const uint8_t g_adc3_chanlist[ADC1_NCHANNELS] = {6}; +static const uint8_t g_adc3_chanlist[ADC1_NCHANNELS] = +{ + 6 +}; /* Configurations of pins used by each ADC channels * @@ -111,7 +118,10 @@ static const uint8_t g_adc3_chanlist[ADC1_NCHANNELS] = {6}; * ADC3: {GPIO_ADC3_INP6} */ -static const uint32_t g_adc3_pinlist[ADC3_NCHANNELS] = {GPIO_ADC3_INP6}; +static const uint32_t g_adc3_pinlist[ADC3_NCHANNELS] = +{ + GPIO_ADC3_INP6 +}; #endif /**************************************************************************** @@ -172,6 +182,7 @@ int stm32_adc_setup(void) aerr("ERROR: adc_register(%s) failed: %d\n", devname, ret); return ret; } + devname[8]++; #endif #if defined(CONFIG_STM32H7_ADC3) @@ -203,6 +214,7 @@ int stm32_adc_setup(void) return ret; } #endif + #if defined(CONFIG_STM32H7_ADC1) || defined(CONFIG_STM32H7_ADC3) /* Now we are initialized */ diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c index cae22ca868..6f32918f34 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c +++ b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c @@ -87,12 +87,13 @@ void stm32_boardinitialize(void) * Name: board_late_initialize * * Description: - * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional initialization call - * will be performed in the boot-up sequence to a function called - * board_late_initialize(). board_late_initialize() will be called immediately after - * up_initialize() is called and just before the initial application is started. - * This additional initialization phase may be used, for example, to initialize - * board-specific device drivers. + * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional + * initialization call will be performed in the boot-up sequence to a + * function called board_late_initialize(). board_late_initialize() + * will be called immediately after up_initialize() is called and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers. * ****************************************************************************/ diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_lsm9ds1.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_lsm9ds1.c index c20eb1aed0..0bca7b3350 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_lsm9ds1.c +++ b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_lsm9ds1.c @@ -84,26 +84,30 @@ int stm32_lsm9ds1_initialize(void) return -ENODEV; } - sninfo("INFO: Initializing LMS9DS1 9DoF sensor over I2C%d\n", LMS9DS1_I2CBUS); + sninfo("INFO: Initializing LMS9DS1 9DoF sensor over I2C%d\n", + LMS9DS1_I2CBUS); ret = lsm9ds1mag_register(LSM9DS1MAG_DEVPATH, i2c, LSM9DS1MAG_ADDR1); if (ret < 0) { - snerr("ERROR: Failed to initialize LMS9DS1 mag driver %s\n", LSM9DS1MAG_DEVPATH); + snerr("ERROR: Failed to initialize LMS9DS1 mag driver %s\n", + LSM9DS1MAG_DEVPATH); return -ENODEV; } ret = lsm9ds1gyro_register(LSM9DS1GYR_DEVPATH, i2c, LSM9DS1GYRO_ADDR1); if (ret < 0) { - snerr("ERROR: Failed to initialize LMS9DS1 gyro driver %s\n", LSM9DS1MAG_DEVPATH); + snerr("ERROR: Failed to initialize LMS9DS1 gyro driver %s\n", + LSM9DS1MAG_DEVPATH); return -ENODEV; } ret = lsm9ds1accel_register(LSM9DS1ACC_DEVPATH, i2c, LSM9DS1ACCEL_ADDR1); if (ret < 0) { - snerr("ERROR: Failed to initialize LMS9DS1 accel driver %s\n", LSM9DS1MAG_DEVPATH); + snerr("ERROR: Failed to initialize LMS9DS1 accel driver %s\n", + LSM9DS1MAG_DEVPATH); return -ENODEV; } diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_spi.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_spi.c index 751fccf1b6..41ccbd39c7 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_spi.c +++ b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_spi.c @@ -171,6 +171,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid) default: break; } + return status; } #endif diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_usb.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_usb.c index 502d113a3a..800c7bf723 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_usb.c +++ b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_usb.c @@ -105,7 +105,7 @@ static int usbhost_waiter(int argc, char *argv[]) struct usbhost_hubport_s *hport; uinfo("Running\n"); - for (;;) + for (; ; ) { /* Wait for the device to change state */