Updated LIS3DSH demos in testex demos to be close to the pattern used in testhal demos. Minor changes to field names in LIS3DSH.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15439 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Rocco Marco Guglielmi 2022-02-07 18:47:21 +00:00
parent 9f7c12e7fd
commit e9918a4413
3 changed files with 15 additions and 15 deletions

View File

@ -478,9 +478,9 @@ void lis3dshStart(LIS3DSHDriver *devp, const LIS3DSHConfig *config) {
/* Control register 4 configuration block.*/ /* Control register 4 configuration block.*/
{ {
cr = LIS3DSH_CTRL_REG4_XEN | LIS3DSH_CTRL_REG4_YEN | LIS3DSH_CTRL_REG4_ZEN | cr = LIS3DSH_CTRL_REG4_XEN | LIS3DSH_CTRL_REG4_YEN | LIS3DSH_CTRL_REG4_ZEN |
devp->config->accoutputdatarate; devp->config->accodr;
#if LIS3DSH_USE_ADVANCED || defined(__DOXYGEN__) #if LIS3DSH_USE_ADVANCED || defined(__DOXYGEN__)
cr |= devp->config->accblockdataupdate; cr |= devp->config->accbdu;
#endif #endif
} }
@ -522,7 +522,7 @@ void lis3dshStart(LIS3DSHDriver *devp, const LIS3DSHConfig *config) {
{ {
cr = LIS3DSH_CTRL_REG6_ADD_INC; cr = LIS3DSH_CTRL_REG6_ADD_INC;
#if LIS3DSH_USE_ADVANCED || defined(__DOXYGEN__) #if LIS3DSH_USE_ADVANCED || defined(__DOXYGEN__)
cr |= devp->config->accblockdataupdate; cr |= devp->config->accbdu;
#endif #endif
} }

View File

@ -43,7 +43,7 @@
/** /**
* @brief LIS3DSH driver version string. * @brief LIS3DSH driver version string.
*/ */
#define EX_LIS3DSH_VERSION "1.1.2" #define EX_LIS3DSH_VERSION "1.1.3"
/** /**
* @brief LIS3DSH driver version major number. * @brief LIS3DSH driver version major number.
@ -58,7 +58,7 @@
/** /**
* @brief LIS3DSH driver version patch number. * @brief LIS3DSH driver version patch number.
*/ */
#define EX_LIS3DSH_PATCH 2 #define EX_LIS3DSH_PATCH 3
/** @} */ /** @} */
/** /**
@ -480,7 +480,7 @@ typedef struct {
/** /**
* @brief LIS3DSH output data rate selection. * @brief LIS3DSH output data rate selection.
*/ */
lis3dsh_acc_odr_t accoutputdatarate; lis3dsh_acc_odr_t accodr;
#if LIS3DSH_USE_ADVANCED || defined(__DOXYGEN__) #if LIS3DSH_USE_ADVANCED || defined(__DOXYGEN__)
/** /**
* @brief LIS3DSH anti-aliasing bandwidth. * @brief LIS3DSH anti-aliasing bandwidth.
@ -489,7 +489,7 @@ typedef struct {
/** /**
* @brief LIS3DSH block data update. * @brief LIS3DSH block data update.
*/ */
lis3dsh_acc_bdu_t accblockdataupdate; lis3dsh_acc_bdu_t accbdu;
#endif #endif
} LIS3DSHConfig; } LIS3DSHConfig;

View File

@ -47,15 +47,15 @@ static const SPIConfig spicfg = {
}; };
static LIS3DSHConfig lis3dshcfg = { static LIS3DSHConfig lis3dshcfg = {
&SPID1, .spip = &SPID1,
&spicfg, .spicfg = &spicfg,
NULL, .accsensitivity = NULL,
NULL, .accbias = NULL,
LIS3DSH_ACC_FS_2G, .accfullscale = LIS3DSH_ACC_FS_2G,
LIS3DSH_ACC_ODR_100HZ, .accodr = LIS3DSH_ACC_ODR_100HZ,
#if LIS3DSH_USE_ADVANCED #if LIS3DSH_USE_ADVANCED
LIS3DSH_ACC_BW_400HZ, .accantialiasing = LIS3DSH_ACC_BW_400HZ,
LIS3DSH_ACC_BDU_CONTINUOUS, .accbdu = LIS3DSH_ACC_BDU_CONTINUOUS
#endif #endif
}; };