aboutsummaryrefslogtreecommitdiffstats
path: root/testex/STM32/STM32L4xx
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2018-01-14 11:19:39 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2018-01-14 11:19:39 +0000
commitb28c62685d857b55dd8bc7e759a9f93ab0a51632 (patch)
treecc3285cdd4c1b4ec07340784f0c9087efa5c9a02 /testex/STM32/STM32L4xx
parentf6b807fd5a089607a1e21dbcad3c060363650fa1 (diff)
downloadChibiOS-b28c62685d857b55dd8bc7e759a9f93ab0a51632.tar.gz
ChibiOS-b28c62685d857b55dd8bc7e759a9f93ab0a51632.tar.bz2
ChibiOS-b28c62685d857b55dd8bc7e759a9f93ab0a51632.zip
Updated EX demos to be compliant with latest ChibiOS/HAL edit
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11273 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testex/STM32/STM32L4xx')
-rw-r--r--testex/STM32/STM32L4xx/I2C-LIS3MLD/main.c16
-rw-r--r--testex/STM32/STM32L4xx/I2C-LSM6DS0/main.c18
-rw-r--r--testex/STM32/STM32L4xx/SPI-L3GD20/main.c23
3 files changed, 29 insertions, 28 deletions
diff --git a/testex/STM32/STM32L4xx/I2C-LIS3MLD/main.c b/testex/STM32/STM32L4xx/I2C-LIS3MLD/main.c
index 27584f965..28887d0dc 100644
--- a/testex/STM32/STM32L4xx/I2C-LIS3MLD/main.c
+++ b/testex/STM32/STM32L4xx/I2C-LIS3MLD/main.c
@@ -44,14 +44,14 @@ static const I2CConfig i2ccfg = {
};
static LIS3MDLConfig LIS3MDLcfg = {
- &I2CD1, /* Pointer to I2C Driver.*/
- &i2ccfg, /* Pointer to I2C Configuration.*/
- NULL, /* Use default sensitivity.*/
- NULL, /* Use default bias.*/
- LIS3MDL_SAD_VCC, /* Slave address.*/
- LIS3MDL_FS_4GA, /* Full scale value.*/
- LIS3MDL_ODR_40HZ, /* Output data rate.*/
-#if LIS3MDL_USE_ADVANCED || defined(__DOXYGEN__)
+ &I2CD1,
+ &i2ccfg,
+ NULL,
+ NULL,
+ LIS3MDL_SAD_VCC,
+ LIS3MDL_FS_4GA,
+ LIS3MDL_ODR_40HZ,
+#if LIS3MDL_USE_ADVANCED
LIS3MDL_LP_T,
LIS3MDL_MD_T,
LIS3MDL_OMXY_T,
diff --git a/testex/STM32/STM32L4xx/I2C-LSM6DS0/main.c b/testex/STM32/STM32L4xx/I2C-LSM6DS0/main.c
index 11c00d6e3..c1b087889 100644
--- a/testex/STM32/STM32L4xx/I2C-LSM6DS0/main.c
+++ b/testex/STM32/STM32L4xx/I2C-LSM6DS0/main.c
@@ -46,11 +46,11 @@ static const I2CConfig i2ccfg = {
};
static const LSM6DS0AccConfig lsm6ds0acccfg = {
- NULL, /* Use default sensitivity.*/
- NULL, /* Use default bias.*/
- LSM6DS0_ACC_FS_2G, /* Full scale value 2g.*/
- LSM6DS0_ACC_ODR_50Hz, /* Output data rate 100 Hz.*/
-#if LSM6DS0_ACC_USE_ADVANCED || defined(__DOXYGEN__)
+ NULL,
+ NULL,
+ LSM6DS0_ACC_FS_2G,
+ LSM6DS0_ACC_ODR_50Hz,
+#if LSM6DS0_ACC_USE_ADVANCED
LSM6DS0_ACC_OBW_AA,
LSM6DS0_ACC_HR_ENABLED,
LSM6DS0_ACC_FDS_DISABLED,
@@ -61,10 +61,10 @@ static const LSM6DS0AccConfig lsm6ds0acccfg = {
};
static const LSM6DS0GyroConfig lsm6ds0gyrocfg = {
- {0, 0, 0}, /* Use default sensitivity.*/
- {0, 0, 0}, /* Use default bias.*/
- LSM6DS0_GYRO_FS_245DPS, /* Full scale value 245DPS.*/
- LSM6DS0_GYRO_ODR_119HZ_FC_31 /* Output data rate 119 Hz.*/
+ NULL,
+ NULL,
+ LSM6DS0_GYRO_FS_245DPS,
+ LSM6DS0_GYRO_ODR_119HZ_FC_31,
#if LSM6DS0_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
LSM6DS0_GYRO_LP_DISABLED,
LSM6DS0_GYRO_OUT_SEL_0,
diff --git a/testex/STM32/STM32L4xx/SPI-L3GD20/main.c b/testex/STM32/STM32L4xx/SPI-L3GD20/main.c
index ef9367137..6cb552524 100644
--- a/testex/STM32/STM32L4xx/SPI-L3GD20/main.c
+++ b/testex/STM32/STM32L4xx/SPI-L3GD20/main.c
@@ -37,21 +37,22 @@ static char axisID[L3GD20_NUMBER_OF_AXES] = {'X', 'Y', 'Z'};
static uint32_t i;
static const SPIConfig spicfg = {
+ FALSE,
NULL,
- GPIOD, /* port of L3GD20 CS.*/
- GPIOD_GYRO_CS, /* pin of L3GD20 CS.*/
- SPI_CR1_BR | SPI_CR1_CPOL | SPI_CR1_CPHA, /* CR1 register.*/
- 0 /* CR2 register.*/
+ GPIOD,
+ GPIOD_GYRO_CS,
+ SPI_CR1_BR | SPI_CR1_CPOL | SPI_CR1_CPHA,
+ 0
};
static L3GD20Config l3gd20cfg = {
- &SPID2, /* Pointer to SPI Driver.*/
- &spicfg, /* Pointer to SPI Configuration.*/
- NULL, /* Use default sensitivity.*/
- NULL, /* Use default bias.*/
- L3GD20_FS_250DPS, /* Full scale value.*/
- L3GD20_ODR_760HZ, /* Output data rate.*/
-#if L3GD20_USE_ADVANCED || defined(__DOXYGEN__)
+ &SPID2,
+ &spicfg,
+ NULL,
+ NULL,
+ L3GD20_FS_250DPS,
+ L3GD20_ODR_760HZ,
+#if L3GD20_USE_ADVANCED
L3GD20_BDU_CONTINUOUS,
L3GD20_END_LITTLE,
L3GD20_BW3,