mirror of https://github.com/rusefi/ChibiOS.git
Restored masks in HTS221 driver
Minor adjustment in HTS221 demo git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11684 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
2adfd321e9
commit
e0fcf2b6c7
|
@ -34,6 +34,13 @@
|
||||||
/* Driver local definitions. */
|
/* Driver local definitions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#define HTS221_SEL(mask, offset) (int16_t)(mask << offset)
|
||||||
|
|
||||||
|
#define HTS221_FLAG_HYGRO_BIAS 0x01
|
||||||
|
#define HTS221_FLAG_HYGRO_SENS 0x02
|
||||||
|
#define HTS221_FLAG_THERMO_BIAS 0x04
|
||||||
|
#define HTS221_FLAG_THERMO_SENS 0x08
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -108,7 +108,7 @@ int main(void) {
|
||||||
/* Activates the HTS221 driver.*/
|
/* Activates the HTS221 driver.*/
|
||||||
hts221Start(&HTS221D1, &hts221cfg);
|
hts221Start(&HTS221D1, &hts221cfg);
|
||||||
|
|
||||||
/* Normal main() thread activity, printing MEMS data on the SD1. */
|
/* Normal main() thread activity, printing MEMS data on the SD2. */
|
||||||
while (true) {
|
while (true) {
|
||||||
hts221HygrometerReadRaw(&HTS221D1, &hygroraw);
|
hts221HygrometerReadRaw(&HTS221D1, &hygroraw);
|
||||||
chprintf(chp, "HTS221D1 Hygrometer raw data...\r\n");
|
chprintf(chp, "HTS221D1 Hygrometer raw data...\r\n");
|
||||||
|
|
Loading…
Reference in New Issue