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

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15445 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Rocco Marco Guglielmi 2022-02-08 08:20:55 +00:00
parent 77454609d9
commit 4ef99d2775
3 changed files with 20 additions and 20 deletions

View File

@ -581,9 +581,9 @@ void lps25hStart(LPS25HDriver *devp, const LPS25HConfig *config) {
/* Control register 1 configuration block.*/
{
cr[0] = LPS25H_AD_CTRL_REG1;
cr[1] = devp->config->outputdatarate | LPS25H_CTRL_REG1_PD;
cr[1] = devp->config->odr | LPS25H_CTRL_REG1_PD;
#if LPS25H_USE_ADVANCED || defined(__DOXYGEN__)
cr[1] |= devp->config->blockdataupdate;
cr[1] |= devp->config->bdu;
#endif
}

View File

@ -43,7 +43,7 @@
/**
* @brief LPS25H driver version string.
*/
#define EX_LPS25H_VERSION "1.1.2"
#define EX_LPS25H_VERSION "1.1.3"
/**
* @brief LPS25H driver version major number.
@ -58,7 +58,7 @@
/**
* @brief LPS25H driver version patch number.
*/
#define EX_LPS25H_PATCH 2
#define EX_LPS25H_PATCH 3
/** @} */
/**
@ -406,12 +406,12 @@ typedef struct {
/**
* @brief LPS25H output data rate selection.
*/
lps25h_odr_t outputdatarate;
lps25h_odr_t odr;
#if LPS25H_USE_ADVANCED || defined(__DOXYGEN__)
/**
* @brief LPS25H block data update.
*/
lps25h_bdu_t blockdataupdate;
lps25h_bdu_t bdu;
/**
* @brief LPS25H barometer subsystem resolution.
*/

View File

@ -34,24 +34,24 @@ static float barocooked;
static float thermocooked;
static const I2CConfig i2ccfg = {
.op_mode = OPMODE_I2C,
.clock_speed = 400000,
.duty_cycle = FAST_DUTY_CYCLE_2
.op_mode = OPMODE_I2C,
.clock_speed = 400000,
.duty_cycle = FAST_DUTY_CYCLE_2
};
static const LPS25HConfig lps25hcfg = {
&I2CD1,
&i2ccfg,
LPS25H_SAD_VCC,
NULL,
NULL,
NULL,
NULL,
LPS25H_ODR_7HZ,
.i2cp = &I2CD1,
.i2ccfg = &i2ccfg,
.slaveaddress = LPS25H_SAD_VCC,
.barosensitivity = NULL,
.barobias = NULL,
.thermosensitivity = NULL,
.thermobias = NULL,
.odr = LPS25H_ODR_7HZ,
#if LPS25H_USE_ADVANCED
LPS25H_BDU_CONTINUOUS,
LPS25H_AVGP_512,
LPS25H_AVGT_512
.bdu = LPS25H_BDU_CONTINUOUS,
.baroresolution = LPS25H_AVGP_512,
.thermoresolution = LPS25H_AVGT_512
#endif
};