Updated HTS221 demos in testex demos to be close to the pattern used in testhal demos.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15438 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
7a1228781e
commit
9f7c12e7fd
|
@ -34,23 +34,23 @@ static float hygrocooked;
|
|||
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 HTS221Config hts221cfg = {
|
||||
&I2CD1,
|
||||
&i2ccfg,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
HTS221_ODR_7HZ,
|
||||
.i2cp = &I2CD1,
|
||||
.i2ccfg = &i2ccfg,
|
||||
.hygrosensitivity = NULL,
|
||||
.hygrobias = NULL,
|
||||
.thermosensitivity = NULL,
|
||||
.thermobias = NULL,
|
||||
.outputdatarate = HTS221_ODR_7HZ
|
||||
#if HTS221_USE_ADVANCED || defined(__DOXYGEN__)
|
||||
HTS221_BDU_CONTINUOUS,
|
||||
HTS221_AVGH_256,
|
||||
HTS221_AVGT_256
|
||||
.blockdataupdate = HTS221_BDU_CONTINUOUS,
|
||||
.hygroresolution = HTS221_AVGH_256,
|
||||
.thermoresolution = HTS221_AVGT_256
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -32,9 +32,9 @@ static char axis_id[MAX_AXIS_NUMBER] = {'X', 'Y', 'Z'};
|
|||
|
||||
/* Generic I2C configuration for every MEMS. */
|
||||
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 uint32_t i;
|
||||
|
@ -48,13 +48,13 @@ static BaseSequentialStream* chp = (BaseSequentialStream*)&SD2;
|
|||
static HTS221Driver HTS221D1;
|
||||
|
||||
static const HTS221Config hts221cfg = {
|
||||
&I2CD1,
|
||||
&i2ccfg,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
HTS221_ODR_7HZ
|
||||
.i2cp = &I2CD1,
|
||||
.i2ccfg = &i2ccfg,
|
||||
.hygrosensitivity = NULL,
|
||||
.hygrobias = NULL,
|
||||
.thermosensitivity = NULL,
|
||||
.thermobias = NULL,
|
||||
.outputdatarate = HTS221_ODR_7HZ
|
||||
};
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
Loading…
Reference in New Issue