Library to access multiple giro - with ability to setup them when starting
Diff: FXAS21002CQ.cpp
- Revision:
- 1:816ba6bfbb20
- Parent:
- 0:8aa01dbab64e
- Child:
- 2:606d0965f546
--- a/FXAS21002CQ.cpp Wed Jul 22 13:23:44 2015 +0000 +++ b/FXAS21002CQ.cpp Sat Aug 01 05:22:46 2015 +0000 @@ -11,6 +11,28 @@ #include "FXAS21002CQ.h" + +struct FXAS21002CQ_F_SETUP_struct F_SETUP = {CIRCULAR_BUFFER, 0}; +struct FXAS21002CQ_CTRL_REG0_struct CTRL_REG0; +struct FXAS21002CQ_RT_CFG_struct RT_CFG; +struct FXAS21002CQ_RT_THS_struct RT_THS; +struct FXAS21002CQ_RT_COUNT_struct RT_COUNT; +struct FXAS21002CQ_CTRL_REG1_struct CTRL_REG1; +struct FXAS21002CQ_CTRL_REG2_struct CTRL_REG2; +struct FXAS21002CQ_CTRL_REG3_struct CTRL_REG3; + +struct FXAS21002CQ_Config_struct FXAS21002CQ_Config = +{ + {CIRCULAR_BUFFER, 0}, // F_SETUP; + {HIGH_BW, SPI4, LOW_HP, DISABLED_HP, RANGE_1000}, // CTRL_REG0; + {DISABLED_ELE, DISABLED_ZTEVE, DISABLED_YTEVE, DISABLED_XTEVE}, // RT_CFG; + {DECREMENT_CNT, 0}, // RT_THS; + {0}, // RT_COUNT; + {NOT_RST, NOT_SELF_TEST, ODR_50, ACTIVE_GYRO, READY_GYRO}, // CTRL_REG1; + {FIFO_TO_INT2, FIFO_INT_DISABLE, RATE_TO_INT2, RATE_INT_DISABLE, DRDY_TO_INT2, DRDY_INT_DISABLE, INT_ACT_HIGH, INT_PUSH_PULL}, // CTRL_REG2; + {WRAP_TO_ZERO, INT2_IS_INTERUPT, NOT_DOUBLE_RANGE} // CTRL_REG3; +}; + static int16_t dummy_int16_t = 0; static float dummy_float = 0.0f;