From d226497cc22c6575400910f9bd1483ae3540d811 Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Tue, 8 Feb 2022 10:19:15 +0000 Subject: [PATCH] Updated Updated LIS302DL demos in testex demos to be close to the pattern used in testhal demos. Minor changes to field names in LIS302DL. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15447 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/ex/devices/ST/lis302dl.c | 2 +- os/ex/devices/ST/lis302dl.h | 6 +++--- testex/STM32/STM32F4xx/SPI-LIS302DL/main.c | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/os/ex/devices/ST/lis302dl.c b/os/ex/devices/ST/lis302dl.c index 099698d66..ca7ff9661 100644 --- a/os/ex/devices/ST/lis302dl.c +++ b/os/ex/devices/ST/lis302dl.c @@ -455,7 +455,7 @@ void lis302dlStart(LIS302DLDriver *devp, const LIS302DLConfig *config) { { cr[0] = LIS302DL_CTRL_REG1_XEN | LIS302DL_CTRL_REG1_YEN | LIS302DL_CTRL_REG1_ZEN | LIS302DL_CTRL_REG1_PD | - devp->config->accoutputdatarate | + devp->config->accodr | devp->config->accfullscale; } diff --git a/os/ex/devices/ST/lis302dl.h b/os/ex/devices/ST/lis302dl.h index 3c662f457..31fa59ec1 100644 --- a/os/ex/devices/ST/lis302dl.h +++ b/os/ex/devices/ST/lis302dl.h @@ -43,7 +43,7 @@ /** * @brief LIS302DL driver version string. */ -#define EX_LIS302DL_VERSION "1.1.1" +#define EX_LIS302DL_VERSION "1.1.2" /** * @brief LIS302DL driver version major number. @@ -58,7 +58,7 @@ /** * @brief LIS302DL driver version patch number. */ -#define EX_LIS302DL_PATCH 1 +#define EX_LIS302DL_PATCH 2 /** @} */ /** @@ -343,7 +343,7 @@ typedef struct { /** * @brief LIS302DL output data rate selection. */ - lis302dl_acc_odr_t accoutputdatarate; + lis302dl_acc_odr_t accodr; #if LIS302DL_USE_ADVANCED || defined(__DOXYGEN__) /** * @brief LIS302DL high pass filtering. diff --git a/testex/STM32/STM32F4xx/SPI-LIS302DL/main.c b/testex/STM32/STM32F4xx/SPI-LIS302DL/main.c index 59313767e..4569964ea 100644 --- a/testex/STM32/STM32F4xx/SPI-LIS302DL/main.c +++ b/testex/STM32/STM32F4xx/SPI-LIS302DL/main.c @@ -47,14 +47,14 @@ static const SPIConfig spicfg = { }; static LIS302DLConfig lis302dlcfg = { - &SPID1, - &spicfg, - NULL, - NULL, - LIS302DL_ACC_FS_2G, - LIS302DL_ACC_ODR_100HZ, + .spip = &SPID1, + .spicfg = &spicfg, + .accsensitivity = NULL, + .accbias = NULL, + .accfullscale = LIS302DL_ACC_FS_2G, + .accodr = LIS302DL_ACC_ODR_100HZ, #if LIS302DL_USE_ADVANCED - LIS302DL_ACC_HP_1, + .acchighpass = LIS302DL_ACC_HP_1, #endif };