boards/arm/stm32h7/nucleo-h743zi/src: Ran all .c and .h files through tools/nxstyle
This commit is contained in:
parent
25aa695a35
commit
bb6a3341aa
5 changed files with 38 additions and 20 deletions
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -171,6 +171,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue