27 #include <mraa/i2c.hpp>
28 #include <mraa/spi.hpp>
29 #include <mraa/gpio.hpp>
31 #define BMA250E_I2C_BUS 0
32 #define BMA250E_SPI_BUS 0
33 #define BMA250E_DEFAULT_ADDR 0x18
74 static const uint8_t BMA250E_RESET_BYTE = 0xb6;
84 typedef enum : uint8_t {
89 REG_ACCD_X_LSB = 0x02,
90 REG_ACCD_X_MSB = 0x03,
91 REG_ACCD_Y_LSB = 0x04,
92 REG_ACCD_Y_MSB = 0x05,
93 REG_ACCD_Z_LSB = 0x06,
94 REG_ACCD_Z_MSB = 0x07,
98 REG_INT_STATUS_0 = 0x09,
99 REG_INT_STATUS_1 = 0x0a,
100 REG_INT_STATUS_2 = 0x0b,
101 REG_INT_STATUS_3 = 0x0c,
105 REG_FIFO_STATUS = 0x0e,
107 REG_PMU_RANGE = 0x0f,
110 REG_PMU_LOW_POWER = 0x12,
114 REG_SOFTRESET = 0x14,
122 REG_INT_MAP_0 = 0x19,
123 REG_INT_MAP_1 = 0x1a,
124 REG_INT_MAP_2 = 0x1b,
132 REG_INT_OUT_CTRL = 0x20,
133 REG_INT_RST_LATCH = 0x21,
150 REG_FIFO_CONFIG_0 = 0x30,
154 REG_PMU_SELFTEST = 0x32,
156 REG_TRIM_NVM_CTRL = 0x33,
163 REG_OFC_SETTING = 0x37,
165 REG_OFC_OFFSET_X = 0x38,
166 REG_OFC_OFFSET_Y = 0x39,
167 REG_OFC_OFFSET_Z = 0x3a,
174 REG_FIFO_CONFIG_1 = 0x3e,
184 ACCD10_LSB_NEW_DATA = 0x01,
190 _ACCD10_LSB_MASK = 3,
191 _ACCD10_LSB_SHIFT = 6
199 ACCD12_LSB_NEW_DATA = 0x01,
207 _ACCD12_LSB_MASK = 15,
208 _ACCD12_LSB_SHIFT = 4
215 INT_STATUS_0_LOW = 0x01,
216 INT_STATUS_0_HIGH = 0x02,
217 INT_STATUS_0_SLOPE = 0x04,
218 INT_STATUS_0_SLO_NOT_MOT = 0x08,
219 INT_STATUS_0_D_TAP = 0x10,
220 INT_STATUS_0_S_TAP = 0x20,
221 INT_STATUS_0_ORIENT = 0x40,
222 INT_STATUS_0_FLAT = 0x80
229 _INT_STATUS_1_RESERVED_BITS = 0x0f | 0x10,
231 INT_STATUS_1_FIFO_FULL = 0x20,
232 INT_STATUS_1_FIFO_WM = 0x40,
233 INT_STATUS_1_DATA = 0x80
240 INT_STATUS_2_SLOPE_FIRST_X = 0x01,
241 INT_STATUS_2_SLOPE_FIRST_Y = 0x02,
242 INT_STATUS_2_SLOPE_FIRST_Z = 0x04,
243 INT_STATUS_2_SLOPE_SIGN = 0x08,
244 INT_STATUS_2_TAP_FIRST_X = 0x10,
245 INT_STATUS_2_TAP_FIRST_Y = 0x20,
246 INT_STATUS_2_TAP_FIRST_Z = 0x40,
247 INT_STATUS_2_TAP_SIGN = 0x80
254 INT_STATUS_3_HIGH_FIRST_X = 0x01,
255 INT_STATUS_3_HIGH_FIRST_Y = 0x02,
256 INT_STATUS_3_HIGH_FIRST_Z = 0x04,
257 INT_STATUS_3_HIGH_SIGN = 0x08,
259 INT_STATUS_3_ORIENT0 = 0x10,
260 INT_STATUS_3_ORIENT1 = 0x20,
261 INT_STATUS_3_ORIENT2 = 0x40,
262 _INT_STATUS_3_ORIENT_MASK = 7,
263 _INT_STATUS_3_ORIENT_SHIFT = 4,
265 INT_STATUS_3_FLAT = 0x80
272 ORIENT_POTRAIT_UPRIGHT = 0,
273 ORIENT_POTRAIT_UPSIDE_DOWN = 1,
274 ORIENT_LANDSCAPE_LEFT = 2,
275 ORIENT_LANDSCAPE_RIGHT = 3,
282 FIFO_STATUS_FRAME_COUNTER0 = 0x01,
283 FIFO_STATUS_FRAME_COUNTER1 = 0x02,
284 FIFO_STATUS_FRAME_COUNTER2 = 0x04,
285 FIFO_STATUS_FRAME_COUNTER3 = 0x08,
286 FIFO_STATUS_FRAME_COUNTER4 = 0x10,
287 FIFO_STATUS_FRAME_COUNTER5 = 0x20,
288 FIFO_STATUS_FRAME_COUNTER6 = 0x40,
289 _FIFO_STATUS_FRAME_COUNTER_MASK = 127,
290 _FIFO_STATUS_FRAME_COUNTER_SHIFT = 0,
292 FIFO_STATUS_FIFO_OVERRUN = 0x80
303 _PMU_RANGE_MASK = 15,
353 _PMU_LPW_RESERVED_MASK = 0x01,
355 PMU_LPW_SLEEP_DUR0 = 0x02,
356 PMU_LPW_SLEEP_DUR1 = 0x04,
357 PMU_LPW_SLEEP_DUR2 = 0x08,
358 PMU_LPW_SLEEP_DUR3 = 0x10,
359 _PMU_LPW_SLEEP_MASK = 15,
360 _PMU_LPW_SLEEP_SHIFT = 1,
366 PMU_LPW_POWER_MODE0 = 0x20,
367 PMU_LPW_POWER_MODE1 = 0x40,
368 PMU_LPW_POWER_MODE2 = 0x80,
369 _PMU_LPW_POWER_MODE_MASK = 7,
370 _PMU_LPW_POWER_MODE_SHIFT = 5
394 POWER_MODE_NORMAL = 0,
395 POWER_MODE_DEEP_SUSPEND = 1,
396 POWER_MODE_LOW_POWER = 2,
397 POWER_MODE_SUSPEND = 4
404 _LOW_POWER_RESERVED_BITS = 0x0f | 0x10 | 0x80,
407 LOW_POWER_SLEEPTIMER_MODE = 0x20,
408 LOW_POWER_LOWPOWER_MODE = 0x40
416 _ACC_HBW_RESERVED_BITS = 0x0f | 0x10 | 0x20,
419 ACC_HBW_SHADOW_DIS = 0x40,
420 ACC_HBW_DATA_HIGH_BW = 0x80
427 _INT_EN_0_RESERVED_BITS = 0x08,
429 INT_EN_0_SLOPE_EN_X = 0x01,
430 INT_EN_0_SLOPE_EN_Y = 0x02,
431 INT_EN_0_SLOPE_EN_Z = 0x04,
435 INT_EN_0_D_TAP_EN = 0x10,
436 INT_EN_0_S_TAP_EN = 0x20,
437 INT_EN_0_ORIENT_EN = 0x40,
438 INT_EN_0_FLAT_EN = 0x80
445 _INT_EN_1_RESERVED_BITS = 0x80,
447 INT_EN_1_HIGH_EN_X = 0x01,
448 INT_EN_1_HIGH_EN_Y = 0x02,
449 INT_EN_1_HIGH_EN_Z = 0x04,
450 INT_EN_1_LOW_EN = 0x08,
451 INT_EN_1_DATA_EN = 0x10,
452 INT_EN_1_INT_FFULL_EN = 0x20,
453 INT_EN_1_INT_FWM_EN = 0x40
462 _INT_EN_2_RESERVED_BITS = 0xf0,
464 INT_EN_2_SLO_NO_MOT_EN_X = 0x01,
465 INT_EN_2_SLO_NO_MOT_EN_Y = 0x02,
466 INT_EN_2_SLO_NO_MOT_EN_Z = 0x04,
467 INT_EN_2_SLO_NO_MOT_SEL = 0x08
476 INT_MAP_0_INT1_LOW = 0x01,
477 INT_MAP_0_INT1_HIGH = 0x02,
478 INT_MAP_0_INT1_SLOPE = 0x04,
479 INT_MAP_0_INT1_SLO_NO_MOT = 0x08,
480 INT_MAP_0_INT1_D_TAP = 0x10,
481 INT_MAP_0_INT1_S_TAP = 0x20,
482 INT_MAP_0_INT1_ORIENT = 0x40,
483 INT_MAP_0_INT1_FLAT = 0x80
490 _INT_MAP_1_INT1_RESERVED_BITS = 0x08 | 0x10,
492 INT_MAP_1_INT1_DATA = 0x01,
493 INT_MAP_1_INT1_FWM = 0x02,
494 INT_MAP_1_INT1_FFULL = 0x04,
498 INT_MAP_1_INT2_FFULL = 0x20,
499 INT_MAP_1_INT2_FWM = 0x40,
500 INT_MAP_1_INT2_DATA = 0x80
507 INT_MAP_2_INT2_LOW = 0x01,
508 INT_MAP_2_INT2_HIGH = 0x02,
509 INT_MAP_2_INT2_SLOPE = 0x04,
510 INT_MAP_2_INT2_SLO_NO_MOT = 0x08,
511 INT_MAP_2_INT2_D_TAP = 0x10,
512 INT_MAP_2_INT2_S_TAP = 0x20,
513 INT_MAP_2_INT2_ORIENT = 0x40,
514 INT_MAP_2_INT2_FLAT = 0x80
521 _INT_SRC_RESERVED_BITS = 0x40 | 0x80,
525 INT_SRC_SLO_NO_MOT = 0x04,
526 INT_SRC_SLOPE = 0x08,
537 _INT_OUT_CTRL_INT1_RESERVED_BITS = 0xf0,
539 INT_OUT_CTRL_INT1_LVL = 0x01,
540 INT_OUT_CTRL_INT1_OD = 0x02,
541 INT_OUT_CTRL_INT2_LVL = 0x04,
542 INT_OUT_CTRL_INT2_OD = 0x08
551 _INT_RST_LATCH_RESERVED_BITS = 0x10 | 0x20 | 0x40,
553 INT_RST_LATCH0 = 0x01,
554 INT_RST_LATCH1 = 0x02,
555 INT_RST_LATCH2 = 0x04,
556 INT_RST_LATCH3 = 0x08,
557 _INT_RST_LATCH_MASK = 15,
558 _INT_RST_LATCH_SHIFT = 0,
562 INT_RST_LATCH_RESET_INT = 0x80
569 RST_LATCH_NON_LATCHED = 0,
570 RST_LATCH_TEMPORARY_250MS = 1,
571 RST_LATCH_TEMPORARY_500MS = 2,
572 RST_LATCH_TEMPORARY_1S = 3,
573 RST_LATCH_TEMPORARY_2S = 4,
574 RST_LATCH_TEMPORARY_4S = 5,
575 RST_LATCH_TEMPORARY_8S = 6,
576 RST_LATCH_LATCHED = 7,
580 RST_LATCH_TEMPORARY_250US = 9,
581 RST_LATCH_TEMPORARY_500US = 10,
582 RST_LATCH_TEMPORARY_1MS = 11,
583 RST_LATCH_TEMPORARY_12_5MS = 12,
584 RST_LATCH_TEMPORARY_25MS = 13,
585 RST_LATCH_TEMPORARY_50MS = 14
594 INT_2_LOW_HY0 = 0x01,
595 INT_2_LOW_HY1 = 0x02,
596 _INT_2_LOW_HY_MASK = 3,
597 _INT_2_LOW_HY_SHIFT = 0,
599 INT_2_LOW_MODE = 0x04,
603 INT_2_HIGH_HY0 = 0x40,
604 INT_2_HIGH_HY1 = 0x80,
605 _INT_2_HIGH_HY_MASK = 3,
606 _INT_2_HIGH_HY_SHIFT = 6
613 INT_5_SLOPE_DUR0 = 0x01,
614 INT_5_SLOPE_DUR1 = 0x02,
615 _INT_5_SLOPE_DUR_MASK = 3,
616 _INT_5_SLOPE_DUR_SHIFT = 0,
618 INT_5_SLO_NO_MOT_DUR0 = 0x04,
619 INT_5_SLO_NO_MOT_DUR1 = 0x08,
620 INT_5_SLO_NO_MOT_DUR2 = 0x10,
621 INT_5_SLO_NO_MOT_DUR3 = 0x20,
622 INT_5_SLO_NO_MOT_DUR4 = 0x40,
623 INT_5_SLO_NO_MOT_DUR5 = 0x80,
624 _INT_5_SLO_NO_MOT_DUR_MASK = 63,
625 _INT_5_SLO_NO_MOT_DUR_SHIFT = 2
632 INT_8_TAP_DUR0 = 0x01,
633 INT_8_TAP_DUR1 = 0x02,
634 INT_8_TAP_DUR2 = 0x04,
635 _INT_8_TAP_DUR_MASK = 7,
636 _INT_8_TAP_DUR_SHIFT = 0,
640 INT_8_TAP_SHOCK = 0x40,
641 INT_8_TAP_QUIET = 0x80
648 INT_9_TAP_TH0 = 0x01,
649 INT_9_TAP_TH1 = 0x02,
650 INT_9_TAP_TH2 = 0x04,
651 INT_9_TAP_TH3 = 0x08,
652 INT_9_TAP_TH4 = 0x10,
653 _INT_5_TAP_TH_MASK = 31,
654 _INT_5_TAP_TH_SHIFT = 0,
658 INT_9_TAP_SAMP0 = 0x40,
659 INT_9_TAP_SAMP1 = 0x80,
660 INT_9_TAP_SAMP1_MASK = 3,
661 INT_9_TAP_SAMP1_SHIFT = 6
668 INT_A_ORIENT_MODE0 = 0x01,
669 INT_A_ORIENT_MODE1 = 0x02,
670 _INT_A_ORIENT_MODE_MASK = 3,
671 _INT_A_ORIENT_MODE_SHIFT = 0,
673 INT_A_ORIENT_BLOCKING0 = 0x04,
674 INT_A_ORIENT_BLOCKING1 = 0x08,
675 _INT_A_ORIENT_BLOCKING_MASK = 3,
676 _INT_A_ORIENT_BLOCKING_SHIFT = 2,
678 INT_A_ORIENT_HYST0 = 0x10,
679 INT_A_ORIENT_HYST1 = 0x20,
680 INT_A_ORIENT_HYST2 = 0x40,
681 _INT_A_ORIENT_HYST_MASK = 7,
682 _INT_A_ORIENT_HYST_SHIFT = 4
691 ORIENT_MODE_SYMETRICAL = 0,
692 ORIENT_MODE_HIGH_ASYMETRICAL = 1,
693 ORIENT_MODE_LOW_ASYMETRICAL = 2
700 ORIENT_BLOCKING_NONE = 0,
701 ORIENT_BLOCKING_THETA_ACC_1_5G = 1,
702 ORIENT_BLOCKING_THETA_ACC_0_2G_1_5G = 2,
703 ORIENT_BLOCKING_THETA_ACC_0_4G_1_5G = 3
710 INT_B_ORIENT_THETA0 = 0x01,
711 INT_B_ORIENT_THETA1 = 0x02,
712 INT_B_ORIENT_THETA2 = 0x04,
713 INT_B_ORIENT_THETA3 = 0x08,
714 INT_B_ORIENT_THETA4 = 0x10,
715 INT_B_ORIENT_THETA5 = 0x20,
716 _INT_B_ORIENT_THETA_MASK = 63,
717 _INT_B_ORIENT_THETA_SHIFT = 0,
719 INT_B_ORIENT_UD_EN = 0x40
727 INT_B_FLAT_THETA0 = 0x01,
728 INT_B_FLAT_THETA1 = 0x02,
729 INT_B_FLAT_THETA2 = 0x04,
730 INT_B_FLAT_THETA3 = 0x08,
731 INT_B_FLAT_THETA4 = 0x10,
732 INT_B_FLAT_THETA5 = 0x20,
733 _INT_B_FLAT_THETA_MASK = 63,
734 _INT_B_FLAT_THETA_SHIFT = 0,
743 INT_D_FLAT_HY0 = 0x01,
744 INT_D_FLAT_HY1 = 0x02,
745 INT_D_FLAT_HY2 = 0x04,
746 _INT_B_FLAT_HY_MASK = 7,
747 _INT_B_FLAT_HY_SHIFT = 0,
751 INT_D_FLAT_HOLD_TIME0 = 0x10,
752 INT_D_FLAT_HOLD_TIME1 = 0x20,
753 _INT_B_FLAT_HOLD_TIME_MASK = 3,
754 _INT_B_FLAT_HOLD_TIME_SHIFT = 4
763 _FIFO_CONFIG_0_RESERVED_BITS = 0x80 | 0x40,
765 FIFO_CONFIG_0_WATER_MARK0 = 0x01,
766 FIFO_CONFIG_0_WATER_MARK1 = 0x02,
767 FIFO_CONFIG_0_WATER_MARK2 = 0x04,
768 FIFO_CONFIG_0_WATER_MARK3 = 0x08,
769 FIFO_CONFIG_0_WATER_MARK4 = 0x10,
770 FIFO_CONFIG_0_WATER_MARK5 = 0x20,
771 _FIFO_CONFIG_0_WATER_MARK_MASK = 63,
772 _FIFO_CONFIG_0_WATER_MARK_SHIFT = 0
779 PMU_SELFTTEST_AXIS0 = 0x01,
780 PMU_SELFTTEST_AXIS1 = 0x02,
781 _PMU_SELFTTEST_AXIS_MASK = 3,
782 _PMU_SELFTTEST_AXIS_SHIFT = 0,
784 PMU_SELFTTEST_SIGN = 0x04,
788 PMU_SELFTTEST_AMP = 0x10,
797 SELFTTEST_AXIS_NONE = 0,
798 SELFTTEST_AXIS_X = 1,
799 SELFTTEST_AXIS_Y = 2,
800 SELFTTEST_AXIS_Z = 3,
807 TRIM_NVM_CTRL_NVM_PROG_MODE = 0x01,
808 TRIM_NVM_CTRL_NVM_PROG_TRIG = 0x02,
809 TRIM_NVM_CTRL_NVM_PROG_RDY = 0x04,
810 TRIM_NVM_CTRL_NVM_PROG_LOAD = 0x08,
812 TRIM_NVM_CTRL_NVM_REMAIN0 = 0x10,
813 TRIM_NVM_CTRL_NVM_REMAIN1 = 0x20,
814 TRIM_NVM_CTRL_NVM_REMAIN2 = 0x40,
815 TRIM_NVM_CTRL_NVM_REMAIN3 = 0x80,
816 _TRIM_NVM_CTRL_NVM_REMAIN_MASK = 15,
817 _TRIM_NVM_CTRL_NVM_REMAIN_SHIFT = 4
824 _SPI3_WDT_RESERVED_BITS = 0xf0 | 0x08,
826 SPI3_WDT_SPI3 = 0x01,
828 SPI3_WDT_I2C_WDT_SEL = 0x02,
829 SPI3_WDT_I2C_WDT_EN = 0x04
838 OFC_CTRL_HP_X_EN = 0x01,
839 OFC_CTRL_HP_Y_EN = 0x02,
840 OFC_CTRL_HP_Z_EN = 0x04,
844 OFC_CTRL_CAL_RDY = 0x10,
846 OFC_CTRL_CAL_TRIGGER0 = 0x20,
847 OFC_CTRL_CAL_TRIGGER1 = 0x40,
848 _OFC_CTRL_CAL_TRIGGER_MASK = 3,
849 _OFC_CTRL_CAL_TRIGGER_SHIFT = 5,
851 OFC_CTRL_OFFSET_RESET = 0x80
859 CAL_TRIGGER_NONE = 0,
869 OFC_SETTING_CUT_OFF = 0x01,
871 OFC_SETTING_OFFSET_TARGET_X0 = 0x02,
872 OFC_SETTING_OFFSET_TARGET_X1 = 0x04,
873 _OFC_SETTING_OFFSET_TARGET_X_MASK = 3,
874 _OFC_SETTING_OFFSET_TARGET_X_SHIFT = 1,
876 OFC_SETTING_OFFSET_TARGET_Y0 = 0x08,
877 OFC_SETTING_OFFSET_TARGET_Y1 = 0x10,
878 _OFC_SETTING_OFFSET_TARGET_Y_MASK = 3,
879 _OFC_SETTING_OFFSET_TARGET_Y_SHIFT = 3,
881 OFC_SETTING_OFFSET_TARGET_Z0 = 0x20,
882 OFC_SETTING_OFFSET_TARGET_Z1 = 0x40,
883 _OFC_SETTING_OFFSET_TARGET_Z_MASK = 3,
884 _OFC_SETTING_OFFSET_TARGET_Z_SHIFT = 5
893 OFFSET_TARGET_0G = 0,
894 OFFSET_TARGET_PLUS_1G = 1,
895 OFFSET_TARGET_MINUS_1G = 2,
903 FIFO_CONFIG_1_FIFO_DATA_SEL0 = 0x01,
904 FIFO_CONFIG_1_FIFO_DATA_SEL1 = 0x02,
905 _FIFO_CONFIG_1_FIFO_DATA_SEL = 3,
906 _FIFO_CONFIG_1_FIFO_DATA_SHIFT = 0,
910 FIFO_CONFIG_1_FIFO_MODE0 = 0x40,
911 FIFO_CONFIG_1_FIFO_MODE1 = 0x80,
912 _FIFO_CONFIG_1_FIFO_MODE_MASK = 3,
913 _FIFO_CONFIG_1_FIFO_MODE_SHIFT = 5
920 FIFO_DATA_SEL_XYZ = 0,
930 FIFO_MODE_BYPASS = 0,
967 BMA250E(
int bus=BMA250E_I2C_BUS,
int addr=BMA250E_DEFAULT_ADDR,
1364 #if defined(SWIGJAVA) || defined(JAVACALLBACK)
1365 void installISR(INTERRUPT_PINS_T intr,
int gpio, mraa::Edge level,
1380 void installISR(INTERRUPT_PINS_T intr,
int gpio, mraa::Edge level,
1381 void (*isr)(
void *),
void *arg);
1407 int readRegs(uint8_t reg, uint8_t *buffer,
int len);
1415 void writeReg(uint8_t reg, uint8_t val);
1422 mraa::Gpio *m_gpioCS;
1424 mraa::Gpio *m_gpioIntr1;
1425 mraa::Gpio *m_gpioIntr2;
1428 RESOLUTION_T m_resolution;
1431 bool m_fifoAvailable;
1444 float m_temperature;
1453 mraa::Gpio*& getPin(INTERRUPT_PINS_T intr);
1456 #if defined(SWIGJAVA) || defined(JAVACALLBACK)
1457 void installISR(INTERRUPT_PINS_T intr,
int gpio, mraa::Edge level,
1458 void (*isr)(
void *),
void *arg);
INT_STATUS_2_BITS_T
Definition: bma250e.hpp:239
ORIENT_MODE_T
Definition: bma250e.hpp:690
INT_MAP_0_BITS_T
Definition: bma250e.hpp:475
void fifoSetWatermark(int wm)
Definition: bma250e.cxx:458
int readRegs(uint8_t reg, uint8_t *buffer, int len)
Definition: bma250e.cxx:279
uint8_t getInterruptEnable0()
Definition: bma250e.cxx:495
INT_5_BITS_T
Definition: bma250e.hpp:612
RST_LATCH_T
Definition: bma250e.hpp:568
void setInterruptSrc(uint8_t bits)
Definition: bma250e.cxx:568
INT_9_BITS_T
Definition: bma250e.hpp:647
INT_EN_1_BITS_T
Definition: bma250e.hpp:444
CAL_TRIGGER_T
Definition: bma250e.hpp:858
void init(POWER_MODE_T pwr=POWER_MODE_NORMAL, RANGE_T range=RANGE_2G, BW_T bw=BW_250)
Definition: bma250e.cxx:144
void setInterruptMap1(uint8_t bits)
Definition: bma250e.cxx:546
ORIENT_T
Definition: bma250e.hpp:271
INT_STATUS_0_BITS_T
Definition: bma250e.hpp:214
uint8_t getInterruptEnable2()
Definition: bma250e.cxx:519
void setBandwidth(BW_T bw)
Definition: bma250e.cxx:442
void enableRegisterShadowing(bool shadow)
Definition: bma250e.cxx:615
void writeReg(uint8_t reg, uint8_t val)
Definition: bma250e.cxx:313
uint8_t readReg(uint8_t reg)
Definition: bma250e.cxx:257
void setInterruptEnable0(uint8_t bits)
Definition: bma250e.cxx:500
uint8_t getInterruptSrc()
Definition: bma250e.cxx:563
BW_T
Definition: bma250e.hpp:337
void setRange(RANGE_T range)
Definition: bma250e.cxx:390
PMU_BW_BITS_T
Definition: bma250e.hpp:322
INT_D_BITS_T
Definition: bma250e.hpp:742
void setInterruptOutputControl(uint8_t bits)
Definition: bma250e.cxx:580
float getTemperature(bool fahrenheit=false)
Definition: bma250e.cxx:376
void setLowPowerMode2()
Definition: bma250e.cxx:672
uint8_t getInterruptMap2()
Definition: bma250e.cxx:553
void setInterruptMap0(uint8_t bits)
Definition: bma250e.cxx:536
ACCD12_LSB_BITS_T
Definition: bma250e.hpp:198
uint8_t getInterruptStatus0()
Definition: bma250e.cxx:639
void reset()
Definition: bma250e.cxx:384
INT_OUT_CTRL_BITS_T
Definition: bma250e.hpp:536
SELFTTEST_AXIS_T
Definition: bma250e.hpp:796
RST_LATCH_T getInterruptLatchBehavior()
Definition: bma250e.cxx:596
POWER_MODE_T
Definition: bma250e.hpp:393
INT_2_BITS_T
Definition: bma250e.hpp:593
INT_C_BITS_T
Definition: bma250e.hpp:726
INT_8_BITS_T
Definition: bma250e.hpp:631
SLEEP_DUR_T
Definition: bma250e.hpp:376
INT_STATUS_1_BITS_T
Definition: bma250e.hpp:228
float * getAccelerometer()
Definition: bma250e.cxx:368
ACCD10_LSB_BITS_T
Definition: bma250e.hpp:183
PMU_RANGE_BITS_T
Definition: bma250e.hpp:298
void setInterruptEnable1(uint8_t bits)
Definition: bma250e.cxx:512
ACC_HBW_BITS_T
Definition: bma250e.hpp:415
uint8_t getInterruptStatus2()
Definition: bma250e.cxx:649
INT_STATUS_3_BITS_T
Definition: bma250e.hpp:253
INT_RST_LATCH_BITS_T
Definition: bma250e.hpp:550
~BMA250E()
Definition: bma250e.cxx:131
OFFSET_TARGET_T
Definition: bma250e.hpp:892
INT_MAP_1_BITS_T
Definition: bma250e.hpp:489
BMA250E_REGS_T
Definition: bma250e.hpp:84
FIFO_STATUS_BITS_T
Definition: bma250e.hpp:281
OFC_CTRL_BITS_T
Definition: bma250e.hpp:837
void clearInterruptLatches()
Definition: bma250e.cxx:587
void setInterruptEnable2(uint8_t bits)
Definition: bma250e.cxx:524
RANGE_T
Definition: bma250e.hpp:312
OFC_SETTING_BITS_T
Definition: bma250e.hpp:868
void setSelfTest(bool sign, bool amp, SELFTTEST_AXIS_T axis)
Definition: bma250e.cxx:482
uint8_t getInterruptStatus1()
Definition: bma250e.cxx:644
void fifoConfig(FIFO_MODE_T mode, FIFO_DATA_SEL_T axes)
Definition: bma250e.cxx:470
void update()
Definition: bma250e.cxx:173
void enableFIFO(bool useFIFO)
Definition: bma250e.cxx:251
PMU_SELFTTEST_BITS_T
Definition: bma250e.hpp:778
FIFO_MODE_T
Definition: bma250e.hpp:929
API for the BMA250E 10 bit Trixial Accelerometer.
Definition: bma250e.hpp:71
void setInterruptLatchBehavior(RST_LATCH_T latch)
Definition: bma250e.cxx:605
ORIENT_T getInterruptStatus3Orientation()
Definition: bma250e.cxx:661
LOW_POWER_BITS_T
Definition: bma250e.hpp:403
PMU_LPW_BITS_T
Definition: bma250e.hpp:351
void setInterruptMap2(uint8_t bits)
Definition: bma250e.cxx:558
void setPowerMode(POWER_MODE_T power)
Definition: bma250e.cxx:447
TRIM_NVM_CTRL_BITS_T
Definition: bma250e.hpp:806
ORIENT_BLOCKING_T
Definition: bma250e.hpp:699
INT_MAP_2_BITS_T
Definition: bma250e.hpp:506
SPI3_WDT_BITS_T
Definition: bma250e.hpp:823
uint8_t getInterruptMap0()
Definition: bma250e.cxx:531
INT_B_BITS_T
Definition: bma250e.hpp:709
void installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level, void(*isr)(void *), void *arg)
Definition: bma250e.cxx:700
uint8_t getInterruptStatus3Bits()
Definition: bma250e.cxx:654
uint8_t getChipID()
Definition: bma250e.cxx:351
INT_EN_2_BITS_T
Definition: bma250e.hpp:461
FIFO_DATA_SEL_T
Definition: bma250e.hpp:919
BMA250E(int bus=BMA250E_I2C_BUS, int addr=BMA250E_DEFAULT_ADDR, int cs=-1)
Definition: bma250e.cxx:43
void enableOutputFiltering(bool filter)
Definition: bma250e.cxx:627
INT_SRC_BITS_T
Definition: bma250e.hpp:520
void uninstallISR(INTERRUPT_PINS_T intr)
Definition: bma250e.cxx:714
FIFO_CONFIG_0_BITS_T
Definition: bma250e.hpp:762
uint8_t getInterruptMap1()
Definition: bma250e.cxx:541
FIFO_CONFIG_1_BITS_T
Definition: bma250e.hpp:902
INT_A_BITS_T
Definition: bma250e.hpp:667
uint8_t getInterruptEnable1()
Definition: bma250e.cxx:507
INT_EN_0_BITS_T
Definition: bma250e.hpp:426
uint8_t getInterruptOutputControl()
Definition: bma250e.cxx:575