32 #define BMA250E_DEFAULT_I2C_BUS 0 33 #define BMA250E_DEFAULT_SPI_BUS 0 34 #define BMA250E_DEFAULT_ADDR 0x18 37 #define BMA250E_RESET_BYTE 0xb6 48 BMA250E_REG_CHIP_ID = 0x00,
52 BMA250E_REG_ACCD_X_LSB = 0x02,
53 BMA250E_REG_ACCD_X_MSB = 0x03,
54 BMA250E_REG_ACCD_Y_LSB = 0x04,
55 BMA250E_REG_ACCD_Y_MSB = 0x05,
56 BMA250E_REG_ACCD_Z_LSB = 0x06,
57 BMA250E_REG_ACCD_Z_MSB = 0x07,
59 BMA250E_REG_TEMP = 0x08,
61 BMA250E_REG_INT_STATUS_0 = 0x09,
62 BMA250E_REG_INT_STATUS_1 = 0x0a,
63 BMA250E_REG_INT_STATUS_2 = 0x0b,
64 BMA250E_REG_INT_STATUS_3 = 0x0c,
68 BMA250E_REG_FIFO_STATUS = 0x0e,
70 BMA250E_REG_PMU_RANGE = 0x0f,
71 BMA250E_REG_PMU_BW = 0x10,
72 BMA250E_REG_PMU_LPW = 0x11,
73 BMA250E_REG_PMU_LOW_POWER = 0x12,
75 BMA250E_REG_ACC_HBW = 0x13,
77 BMA250E_REG_SOFTRESET = 0x14,
81 BMA250E_REG_INT_EN_0 = 0x16,
82 BMA250E_REG_INT_EN_1 = 0x17,
83 BMA250E_REG_INT_EN_2 = 0x18,
85 BMA250E_REG_INT_MAP_0 = 0x19,
86 BMA250E_REG_INT_MAP_1 = 0x1a,
87 BMA250E_REG_INT_MAP_2 = 0x1b,
91 BMA250E_REG_INT_SRC = 0x1e,
95 BMA250E_REG_INT_OUT_CTRL = 0x20,
96 BMA250E_REG_INT_RST_LATCH = 0x21,
98 BMA250E_REG_INT_0 = 0x22,
99 BMA250E_REG_INT_1 = 0x23,
100 BMA250E_REG_INT_2 = 0x24,
101 BMA250E_REG_INT_3 = 0x25,
102 BMA250E_REG_INT_4 = 0x26,
103 BMA250E_REG_INT_5 = 0x27,
104 BMA250E_REG_INT_6 = 0x28,
105 BMA250E_REG_INT_7 = 0x29,
106 BMA250E_REG_INT_8 = 0x2a,
107 BMA250E_REG_INT_9 = 0x2b,
108 BMA250E_REG_INT_A = 0x2c,
109 BMA250E_REG_INT_B = 0x2d,
110 BMA250E_REG_INT_C = 0x2e,
111 BMA250E_REG_INT_D = 0x2f,
113 BMA250E_REG_FIFO_CONFIG_0 = 0x30,
117 BMA250E_REG_PMU_SELFTEST = 0x32,
119 BMA250E_REG_TRIM_NVM_CTRL = 0x33,
121 BMA250E_REG_SPI3_WDT = 0x34,
125 BMA250E_REG_OFC_CTRL = 0x36,
126 BMA250E_REG_OFC_SETTING = 0x37,
128 BMA250E_REG_OFC_OFFSET_X = 0x38,
129 BMA250E_REG_OFC_OFFSET_Y = 0x39,
130 BMA250E_REG_OFC_OFFSET_Z = 0x3a,
132 BMA250E_REG_TRIM_GP0 = 0x3b,
133 BMA250E_REG_TRIM_GP1 = 0x3c,
137 BMA250E_REG_FIFO_CONFIG_1 = 0x3e,
138 BMA250E_REG_FIFO_DATA = 0x3f
147 BMA250E_ACCD10_LSB_NEW_DATA = 0x01,
154 BMA250E_ACCD10_LSB0 = 0x40,
157 BMA250E_ACCD10_LSB1 = 0x80,
158 _BMA250E_ACCD10_LSB_MASK = 3,
159 _BMA250E_ACCD10_LSB_SHIFT = 6
160 } BMA250E_ACCD10_LSB_BITS_T;
167 BMA250E_ACCD12_LSB_NEW_DATA = 0x01,
174 BMA250E_ACCD12_LSB0 = 0x10,
177 BMA250E_ACCD12_LSB1 = 0x20,
178 BMA250E_ACCD12_LSB2 = 0x40,
179 BMA250E_ACCD12_LSB3 = 0x80,
180 _BMA250E_ACCD12_LSB_MASK = 15,
181 _BMA250E_ACCD12_LSB_SHIFT = 4
182 } BMA250E_ACCD12_LSB_BITS_T;
188 BMA250E_INT_STATUS_0_LOW = 0x01,
189 BMA250E_INT_STATUS_0_HIGH = 0x02,
190 BMA250E_INT_STATUS_0_SLOPE = 0x04,
191 BMA250E_INT_STATUS_0_SLO_NOT_MOT = 0x08,
192 BMA250E_INT_STATUS_0_D_TAP = 0x10,
193 BMA250E_INT_STATUS_0_S_TAP = 0x20,
194 BMA250E_INT_STATUS_0_ORIENT = 0x40,
195 BMA250E_INT_STATUS_0_FLAT = 0x80
196 } BMA250E_INT_STATUS_0_BITS_T;
202 _BMA250E_INT_STATUS_1_RESERVED_BITS = 0x0f | 0x10,
204 BMA250E_INT_STATUS_1_FIFO_FULL = 0x20,
205 BMA250E_INT_STATUS_1_FIFO_WM = 0x40,
206 BMA250E_INT_STATUS_1_DATA = 0x80
207 } BMA250E_INT_STATUS_1_BITS_T;
213 BMA250E_INT_STATUS_2_SLOPE_FIRST_X = 0x01,
214 BMA250E_INT_STATUS_2_SLOPE_FIRST_Y = 0x02,
215 BMA250E_INT_STATUS_2_SLOPE_FIRST_Z = 0x04,
216 BMA250E_INT_STATUS_2_SLOPE_SIGN = 0x08,
217 BMA250E_INT_STATUS_2_TAP_FIRST_X = 0x10,
218 BMA250E_INT_STATUS_2_TAP_FIRST_Y = 0x20,
219 BMA250E_INT_STATUS_2_TAP_FIRST_Z = 0x40,
220 BMA250E_INT_STATUS_2_TAP_SIGN = 0x80
221 } BMA250E_INT_STATUS_2_BITS_T;
227 BMA250E_INT_STATUS_3_HIGH_FIRST_X = 0x01,
228 BMA250E_INT_STATUS_3_HIGH_FIRST_Y = 0x02,
229 BMA250E_INT_STATUS_3_HIGH_FIRST_Z = 0x04,
230 BMA250E_INT_STATUS_3_HIGH_SIGN = 0x08,
232 BMA250E_INT_STATUS_3_ORIENT0 = 0x10,
233 BMA250E_INT_STATUS_3_ORIENT1 = 0x20,
234 BMA250E_INT_STATUS_3_ORIENT2 = 0x40,
235 _BMA250E_INT_STATUS_3_ORIENT_MASK = 7,
236 _BMA250E_INT_STATUS_3_ORIENT_SHIFT = 4,
238 BMA250E_INT_STATUS_3_FLAT = 0x80
239 } INT_STATUS_3_BITS_T;
245 BMA250E_ORIENT_POTRAIT_UPRIGHT = 0,
246 BMA250E_ORIENT_POTRAIT_UPSIDE_DOWN = 1,
247 BMA250E_ORIENT_LANDSCAPE_LEFT = 2,
248 BMA250E_ORIENT_LANDSCAPE_RIGHT = 3,
255 BMA250E_FIFO_STATUS_FRAME_COUNTER0 = 0x01,
256 BMA250E_FIFO_STATUS_FRAME_COUNTER1 = 0x02,
257 BMA250E_FIFO_STATUS_FRAME_COUNTER2 = 0x04,
258 BMA250E_FIFO_STATUS_FRAME_COUNTER3 = 0x08,
259 BMA250E_FIFO_STATUS_FRAME_COUNTER4 = 0x10,
260 BMA250E_FIFO_STATUS_FRAME_COUNTER5 = 0x20,
261 BMA250E_FIFO_STATUS_FRAME_COUNTER6 = 0x40,
262 _BMA250E_FIFO_STATUS_FRAME_COUNTER_MASK = 127,
263 _BMA250E_FIFO_STATUS_FRAME_COUNTER_SHIFT = 0,
265 BMA250E_FIFO_STATUS_FIFO_OVERRUN = 0x80
266 } BMA250E_FIFO_STATUS_BITS_T;
272 BMA250E_PMU_RANGE0 = 0x01,
273 BMA250E_PMU_RANGE1 = 0x02,
274 BMA250E_PMU_RANGE2 = 0x04,
275 BMA250E_PMU_RANGE3 = 0x08,
276 _BMA250E_PMU_RANGE_MASK = 15,
277 _BMA250E_PMU_RANGE_SHIFT = 0
280 } BMA250E_PMU_RANGE_BITS_T;
286 BMA250E_RANGE_2G = 3,
287 BMA250E_RANGE_4G = 5,
288 BMA250E_RANGE_8G = 8,
289 BMA250E_RANGE_16G = 12
296 BMA250E_PMU_BW0 = 0x01,
297 BMA250E_PMU_BW1 = 0x02,
298 BMA250E_PMU_BW2 = 0x04,
299 BMA250E_PMU_BW3 = 0x08,
300 BMA250E_PMU_BW4 = 0x10,
301 _BMA250E_PMU_BW_MASK = 31,
302 _BMA250E_PMU_BW_SHIFT = 0
305 } BMA250E_PMU_BW_BITS_T;
312 BMA250E_BW_15_63 = 9,
313 BMA250E_BW_31_25 = 10,
314 BMA250E_BW_62_5 = 11,
326 _BMA250E_PMU_LPW_RESERVED_MASK = 0x01,
328 BMA250E_PMU_LPW_SLEEP_DUR0 = 0x02,
331 BMA250E_PMU_LPW_SLEEP_DUR1 = 0x04,
332 BMA250E_PMU_LPW_SLEEP_DUR2 = 0x08,
333 BMA250E_PMU_LPW_SLEEP_DUR3 = 0x10,
334 _BMA250E_PMU_LPW_SLEEP_MASK = 15,
335 _BMA250E_PMU_LPW_SLEEP_SHIFT = 1,
341 BMA250E_PMU_LPW_POWER_MODE0 = 0x20,
342 BMA250E_PMU_LPW_POWER_MODE1 = 0x40,
343 BMA250E_PMU_LPW_POWER_MODE2 = 0x80,
344 _BMA250E_PMU_LPW_POWER_MODE_MASK = 7,
345 _BMA250E_PMU_LPW_POWER_MODE_SHIFT = 5
346 } BMA250E_PMU_LPW_BITS_T;
352 BMA250E_SLEEP_DUR_0_5 = 0,
353 BMA250E_SLEEP_DUR_1 = 6,
354 BMA250E_SLEEP_DUR_2 = 7,
355 BMA250E_SLEEP_DUR_4 = 8,
356 BMA250E_SLEEP_DUR_6 = 9,
357 BMA250E_SLEEP_DUR_10 = 10,
358 BMA250E_SLEEP_DUR_25 = 11,
359 BMA250E_SLEEP_DUR_50 = 12,
360 BMA250E_SLEEP_DUR_100 = 13,
361 BMA250E_SLEEP_DUR_500 = 14,
362 BMA250E_SLEEP_DUR_1000 = 15
363 } BMA250E_SLEEP_DUR_T;
369 BMA250E_POWER_MODE_NORMAL = 0,
370 BMA250E_POWER_MODE_DEEP_SUSPEND = 1,
371 BMA250E_POWER_MODE_LOW_POWER = 2,
372 BMA250E_POWER_MODE_SUSPEND = 4
373 } BMA250E_POWER_MODE_T;
379 _BMA250E_LOW_POWER_RESERVED_BITS = 0x0f | 0x10 | 0x80,
382 BMA250E_LOW_POWER_SLEEPTIMER_MODE = 0x20,
383 BMA250E_LOW_POWER_LOWPOWER_MODE = 0x40
388 } BMA250E_LOW_POWER_BITS_T;
394 _BMA250E_ACC_HBW_RESERVED_BITS = 0x0f | 0x10 | 0x20,
397 BMA250E_ACC_HBW_SHADOW_DIS = 0x40,
398 BMA250E_ACC_HBW_DATA_HIGH_BW = 0x80
399 } BMA250E_ACC_HBW_BITS_T;
405 _BMA250E_INT_EN_0_RESERVED_BITS = 0x08,
407 BMA250E_INT_EN_0_SLOPE_EN_X = 0x01,
408 BMA250E_INT_EN_0_SLOPE_EN_Y = 0x02,
409 BMA250E_INT_EN_0_SLOPE_EN_Z = 0x04,
413 BMA250E_INT_EN_0_D_TAP_EN = 0x10,
414 BMA250E_INT_EN_0_S_TAP_EN = 0x20,
415 BMA250E_INT_EN_0_ORIENT_EN = 0x40,
416 BMA250E_INT_EN_0_FLAT_EN = 0x80
417 } BMA250E_INT_EN_0_BITS_T;
423 _BMA250E_INT_EN_1_RESERVED_BITS = 0x80,
425 BMA250E_INT_EN_1_HIGH_EN_X = 0x01,
426 BMA250E_INT_EN_1_HIGH_EN_Y = 0x02,
427 BMA250E_INT_EN_1_HIGH_EN_Z = 0x04,
428 BMA250E_INT_EN_1_LOW_EN = 0x08,
429 BMA250E_INT_EN_1_DATA_EN = 0x10,
430 BMA250E_INT_EN_1_INT_FFULL_EN = 0x20,
431 BMA250E_INT_EN_1_INT_FWM_EN = 0x40
434 } BMA250E_INT_EN_1_BITS_T;
440 _BMA250E_INT_EN_2_RESERVED_BITS = 0xf0,
442 BMA250E_INT_EN_2_SLO_NO_MOT_EN_X = 0x01,
443 BMA250E_INT_EN_2_SLO_NO_MOT_EN_Y = 0x02,
444 BMA250E_INT_EN_2_SLO_NO_MOT_EN_Z = 0x04,
445 BMA250E_INT_EN_2_SLO_NO_MOT_SEL = 0x08
448 } BMA250E_INT_EN_2_BITS_T;
454 BMA250E_INT_MAP_0_INT1_LOW = 0x01,
455 BMA250E_INT_MAP_0_INT1_HIGH = 0x02,
456 BMA250E_INT_MAP_0_INT1_SLOPE = 0x04,
457 BMA250E_INT_MAP_0_INT1_SLO_NO_MOT = 0x08,
458 BMA250E_INT_MAP_0_INT1_D_TAP = 0x10,
459 BMA250E_INT_MAP_0_INT1_S_TAP = 0x20,
460 BMA250E_INT_MAP_0_INT1_ORIENT = 0x40,
461 BMA250E_INT_MAP_0_INT1_FLAT = 0x80
462 } BMA250E_INT_MAP_0_BITS_T;
468 _BMA250E_INT_MAP_1_INT1_RESERVED_BITS = 0x08 | 0x10,
470 BMA250E_INT_MAP_1_INT1_DATA = 0x01,
471 BMA250E_INT_MAP_1_INT1_FWM = 0x02,
472 BMA250E_INT_MAP_1_INT1_FFULL = 0x04,
476 BMA250E_INT_MAP_1_INT2_FFULL = 0x20,
477 BMA250E_INT_MAP_1_INT2_FWM = 0x40,
478 BMA250E_INT_MAP_1_INT2_DATA = 0x80
479 } BMA250E_INT_MAP_1_BITS_T;
485 BMA250E_INT_MAP_2_INT2_LOW = 0x01,
486 BMA250E_INT_MAP_2_INT2_HIGH = 0x02,
487 BMA250E_INT_MAP_2_INT2_SLOPE = 0x04,
488 BMA250E_INT_MAP_2_INT2_SLO_NO_MOT = 0x08,
489 BMA250E_INT_MAP_2_INT2_D_TAP = 0x10,
490 BMA250E_INT_MAP_2_INT2_S_TAP = 0x20,
491 BMA250E_INT_MAP_2_INT2_ORIENT = 0x40,
492 BMA250E_INT_MAP_2_INT2_FLAT = 0x80
493 } BMA250E_INT_MAP_2_BITS_T;
499 _BMA250E_INT_SRC_RESERVED_BITS = 0x40 | 0x80,
501 BMA250E_INT_SRC_LOW = 0x01,
502 BMA250E_INT_SRC_HIGH = 0x02,
503 BMA250E_INT_SRC_SLO_NO_MOT = 0x04,
504 BMA250E_INT_SRC_SLOPE = 0x08,
505 BMA250E_INT_SRC_TAP = 0x10,
506 BMA250E_INT_SRC_DATA = 0x20
509 } BMA250E_INT_SRC_BITS_T;
515 _BMA250E_INT_OUT_CTRL_INT1_RESERVED_BITS = 0xf0,
517 BMA250E_INT_OUT_CTRL_INT1_LVL = 0x01,
518 BMA250E_INT_OUT_CTRL_INT1_OD = 0x02,
521 BMA250E_INT_OUT_CTRL_INT2_LVL = 0x04,
522 BMA250E_INT_OUT_CTRL_INT2_OD = 0x08
525 } BMA250E_INT_OUT_CTRL_BITS_T;
531 _BMA250E_INT_RST_LATCH_RESERVED_BITS = 0x10 | 0x20 | 0x40,
533 BMA250E_INT_RST_LATCH0 = 0x01,
534 BMA250E_INT_RST_LATCH1 = 0x02,
535 BMA250E_INT_RST_LATCH2 = 0x04,
536 BMA250E_INT_RST_LATCH3 = 0x08,
537 _BMA250E_INT_RST_LATCH_MASK = 15,
538 _BMA250E_INT_RST_LATCH_SHIFT = 0,
542 BMA250E_INT_RST_LATCH_RESET_INT = 0x80
543 } BMA250E_INT_RST_LATCH_BITS_T;
549 BMA250E_RST_LATCH_NON_LATCHED = 0,
550 BMA250E_RST_LATCH_TEMPORARY_250MS = 1,
551 BMA250E_RST_LATCH_TEMPORARY_500MS = 2,
552 BMA250E_RST_LATCH_TEMPORARY_1S = 3,
553 BMA250E_RST_LATCH_TEMPORARY_2S = 4,
554 BMA250E_RST_LATCH_TEMPORARY_4S = 5,
555 BMA250E_RST_LATCH_TEMPORARY_8S = 6,
556 BMA250E_RST_LATCH_LATCHED = 7,
560 BMA250E_RST_LATCH_TEMPORARY_250US = 9,
561 BMA250E_RST_LATCH_TEMPORARY_500US = 10,
562 BMA250E_RST_LATCH_TEMPORARY_1MS = 11,
563 BMA250E_RST_LATCH_TEMPORARY_12_5MS = 12,
564 BMA250E_RST_LATCH_TEMPORARY_25MS = 13,
565 BMA250E_RST_LATCH_TEMPORARY_50MS = 14
568 } BMA250E_RST_LATCH_T;
574 BMA250E_INT_2_LOW_HY0 = 0x01,
575 BMA250E_INT_2_LOW_HY1 = 0x02,
576 _BMA250E_INT_2_LOW_HY_MASK = 3,
577 _BMA250E_INT_2_LOW_HY_SHIFT = 0,
579 BMA250E_INT_2_LOW_MODE = 0x04,
583 BMA250E_INT_2_HIGH_HY0 = 0x40,
584 BMA250E_INT_2_HIGH_HY1 = 0x80,
585 _BMA250E_INT_2_HIGH_HY_MASK = 3,
586 _BMA250E_INT_2_HIGH_HY_SHIFT = 6
587 } BMA250E_INT_2_BITS_T;
593 BMA250E_INT_5_SLOPE_DUR0 = 0x01,
594 BMA250E_INT_5_SLOPE_DUR1 = 0x02,
595 _BMA250E_INT_5_SLOPE_DUR_MASK = 3,
596 _BMA250E_INT_5_SLOPE_DUR_SHIFT = 0,
598 BMA250E_INT_5_SLO_NO_MOT_DUR0 = 0x04,
599 BMA250E_INT_5_SLO_NO_MOT_DUR1 = 0x08,
600 BMA250E_INT_5_SLO_NO_MOT_DUR2 = 0x10,
601 BMA250E_INT_5_SLO_NO_MOT_DUR3 = 0x20,
602 BMA250E_INT_5_SLO_NO_MOT_DUR4 = 0x40,
603 BMA250E_INT_5_SLO_NO_MOT_DUR5 = 0x80,
604 _BMA250E_INT_5_SLO_NO_MOT_DUR_MASK = 63,
605 _BMA250E_INT_5_SLO_NO_MOT_DUR_SHIFT = 2
606 } BMA250E_INT_5_BITS_T;
612 BMA250E_INT_8_TAP_DUR0 = 0x01,
613 BMA250E_INT_8_TAP_DUR1 = 0x02,
614 BMA250E_INT_8_TAP_DUR2 = 0x04,
615 _BMA250E_INT_8_TAP_DUR_MASK = 7,
616 _BMA250E_INT_8_TAP_DUR_SHIFT = 0,
620 BMA250E_INT_8_TAP_SHOCK = 0x40,
621 BMA250E_INT_8_TAP_QUIET = 0x80
622 } BMA250E_INT_8_BITS_T;
628 BMA250E_INT_9_TAP_TH0 = 0x01,
629 BMA250E_INT_9_TAP_TH1 = 0x02,
630 BMA250E_INT_9_TAP_TH2 = 0x04,
631 BMA250E_INT_9_TAP_TH3 = 0x08,
632 BMA250E_INT_9_TAP_TH4 = 0x10,
633 _BMA250E_INT_5_TAP_TH_MASK = 31,
634 _BMA250E_INT_5_TAP_TH_SHIFT = 0,
638 BMA250E_INT_9_TAP_SAMP0 = 0x40,
639 BMA250E_INT_9_TAP_SAMP1 = 0x80,
640 BMA250E_INT_9_TAP_SAMP1_MASK = 3,
641 BMA250E_INT_9_TAP_SAMP1_SHIFT = 6
642 } BMA250E_INT_9_BITS_T;
648 BMA250E_INT_A_ORIENT_MODE0 = 0x01,
649 BMA250E_INT_A_ORIENT_MODE1 = 0x02,
650 _BMA250E_INT_A_ORIENT_MODE_MASK = 3,
651 _BMA250E_INT_A_ORIENT_MODE_SHIFT = 0,
653 BMA250E_INT_A_ORIENT_BLOCKING0 = 0x04,
654 BMA250E_INT_A_ORIENT_BLOCKING1 = 0x08,
655 _BMA250E_INT_A_ORIENT_BLOCKING_MASK = 3,
656 _BMA250E_INT_A_ORIENT_BLOCKING_SHIFT = 2,
658 BMA250E_INT_A_ORIENT_HYST0 = 0x10,
659 BMA250E_INT_A_ORIENT_HYST1 = 0x20,
660 BMA250E_INT_A_ORIENT_HYST2 = 0x40,
661 _BMA250E_INT_A_ORIENT_HYST_MASK = 7,
662 _BMA250E_INT_A_ORIENT_HYST_SHIFT = 4
665 } BMA250E_INT_A_BITS_T;
671 BMA250E_ORIENT_MODE_SYMETRICAL = 0,
672 BMA250E_ORIENT_MODE_HIGH_ASYMETRICAL = 1,
673 BMA250E_ORIENT_MODE_LOW_ASYMETRICAL = 2
674 } BMA250E_ORIENT_MODE_T;
680 BMA250E_ORIENT_BLOCKING_NONE = 0,
681 BMA250E_ORIENT_BLOCKING_THETA_ACC_1_5G = 1,
682 BMA250E_ORIENT_BLOCKING_THETA_ACC_0_2G_1_5G = 2,
683 BMA250E_ORIENT_BLOCKING_THETA_ACC_0_4G_1_5G = 3
684 } BMA250E_ORIENT_BLOCKING_T;
690 BMA250E_INT_B_ORIENT_THETA0 = 0x01,
691 BMA250E_INT_B_ORIENT_THETA1 = 0x02,
692 BMA250E_INT_B_ORIENT_THETA2 = 0x04,
693 BMA250E_INT_B_ORIENT_THETA3 = 0x08,
694 BMA250E_INT_B_ORIENT_THETA4 = 0x10,
695 BMA250E_INT_B_ORIENT_THETA5 = 0x20,
696 _BMA250E_INT_B_ORIENT_THETA_MASK = 63,
697 _BMA250E_INT_B_ORIENT_THETA_SHIFT = 0,
699 BMA250E_INT_B_ORIENT_UD_EN = 0x40
701 } BMA250E_INT_B_BITS_T;
707 BMA250E_INT_B_FLAT_THETA0 = 0x01,
708 BMA250E_INT_B_FLAT_THETA1 = 0x02,
709 BMA250E_INT_B_FLAT_THETA2 = 0x04,
710 BMA250E_INT_B_FLAT_THETA3 = 0x08,
711 BMA250E_INT_B_FLAT_THETA4 = 0x10,
712 BMA250E_INT_B_FLAT_THETA5 = 0x20,
713 _BMA250E_INT_B_FLAT_THETA_MASK = 63,
714 _BMA250E_INT_B_FLAT_THETA_SHIFT = 0,
717 } BMA250E_INT_C_BITS_T;
723 BMA250E_INT_D_FLAT_HY0 = 0x01,
724 BMA250E_INT_D_FLAT_HY1 = 0x02,
725 BMA250E_INT_D_FLAT_HY2 = 0x04,
726 _BMA250E_INT_B_FLAT_HY_MASK = 7,
727 _BMA250E_INT_B_FLAT_HY_SHIFT = 0,
731 BMA250E_INT_D_FLAT_HOLD_TIME0 = 0x10,
732 BMA250E_INT_D_FLAT_HOLD_TIME1 = 0x20,
733 _BMA250E_INT_B_FLAT_HOLD_TIME_MASK = 3,
734 _BMA250E_INT_B_FLAT_HOLD_TIME_SHIFT = 4
737 } BMA250E_INT_D_BITS_T;
743 _BMA250E_FIFO_CONFIG_0_RESERVED_BITS = 0x80 | 0x40,
745 BMA250E_FIFO_CONFIG_0_WATER_MARK0 = 0x01,
746 BMA250E_FIFO_CONFIG_0_WATER_MARK1 = 0x02,
747 BMA250E_FIFO_CONFIG_0_WATER_MARK2 = 0x04,
748 BMA250E_FIFO_CONFIG_0_WATER_MARK3 = 0x08,
749 BMA250E_FIFO_CONFIG_0_WATER_MARK4 = 0x10,
750 BMA250E_FIFO_CONFIG_0_WATER_MARK5 = 0x20,
751 _BMA250E_FIFO_CONFIG_0_WATER_MARK_MASK = 63,
752 _BMA250E_FIFO_CONFIG_0_WATER_MARK_SHIFT = 0
753 } BMA250E_FIFO_CONFIG_0_BITS_T;
759 BMA250E_PMU_SELFTTEST_AXIS0 = 0x01,
760 BMA250E_PMU_SELFTTEST_AXIS1 = 0x02,
761 _BMA250E_PMU_SELFTTEST_AXIS_MASK = 3,
762 _BMA250E_PMU_SELFTTEST_AXIS_SHIFT = 0,
764 BMA250E_PMU_SELFTTEST_SIGN = 0x04,
768 BMA250E_PMU_SELFTTEST_AMP = 0x10,
771 } BMA250E_PMU_SELFTTEST_BITS_T;
777 BMA250E_SELFTTEST_AXIS_NONE = 0,
778 BMA250E_SELFTTEST_AXIS_X = 1,
779 BMA250E_SELFTTEST_AXIS_Y = 2,
780 BMA250E_SELFTTEST_AXIS_Z = 3,
781 } BMA250E_SELFTTEST_AXIS_T;
787 BMA250E_TRIM_NVM_CTRL_NVM_PROG_MODE = 0x01,
788 BMA250E_TRIM_NVM_CTRL_NVM_PROG_TRIG = 0x02,
789 BMA250E_TRIM_NVM_CTRL_NVM_PROG_RDY = 0x04,
790 BMA250E_TRIM_NVM_CTRL_NVM_PROG_LOAD = 0x08,
792 BMA250E_TRIM_NVM_CTRL_NVM_REMAIN0 = 0x10,
793 BMA250E_TRIM_NVM_CTRL_NVM_REMAIN1 = 0x20,
794 BMA250E_TRIM_NVM_CTRL_NVM_REMAIN2 = 0x40,
795 BMA250E_TRIM_NVM_CTRL_NVM_REMAIN3 = 0x80,
796 _BMA250E_TRIM_NVM_CTRL_NVM_REMAIN_MASK = 15,
797 _BMA250E_TRIM_NVM_CTRL_NVM_REMAIN_SHIFT = 4
798 } BMA250E_TRIM_NVM_CTRL_BITS_T;
804 _BMA250E_SPI3_WDT_RESERVED_BITS = 0xf0 | 0x08,
806 BMA250E_SPI3_WDT_SPI3 = 0x01,
810 BMA250E_SPI3_WDT_I2C_WDT_SEL = 0x02,
811 BMA250E_SPI3_WDT_I2C_WDT_EN = 0x04
814 } BMA250E_SPI3_WDT_BITS_T;
820 BMA250E_OFC_CTRL_HP_X_EN = 0x01,
821 BMA250E_OFC_CTRL_HP_Y_EN = 0x02,
822 BMA250E_OFC_CTRL_HP_Z_EN = 0x04,
826 BMA250E_OFC_CTRL_CAL_RDY = 0x10,
828 BMA250E_OFC_CTRL_CAL_TRIGGER0 = 0x20,
829 BMA250E_OFC_CTRL_CAL_TRIGGER1 = 0x40,
830 _BMA250E_OFC_CTRL_CAL_TRIGGER_MASK = 3,
831 _BMA250E_OFC_CTRL_CAL_TRIGGER_SHIFT = 5,
833 BMA250E_OFC_CTRL_OFFSET_RESET = 0x80
835 } BMA250E_OFC_CTRL_BITS_T;
841 BMA250E_CAL_TRIGGER_NONE = 0,
842 BMA250E_CAL_TRIGGER_X = 1,
843 BMA250E_CAL_TRIGGER_Y = 2,
844 BMA250E_CAL_TRIGGER_Z = 3
845 } BMA250E_CAL_TRIGGER_T;
851 BMA250E_OFC_SETTING_CUT_OFF = 0x01,
853 BMA250E_OFC_SETTING_OFFSET_TARGET_X0 = 0x02,
854 BMA250E_OFC_SETTING_OFFSET_TARGET_X1 = 0x04,
855 _BMA250E_OFC_SETTING_OFFSET_TARGET_X_MASK = 3,
856 _BMA250E_OFC_SETTING_OFFSET_TARGET_X_SHIFT = 1,
858 BMA250E_OFC_SETTING_OFFSET_TARGET_Y0 = 0x08,
859 BMA250E_OFC_SETTING_OFFSET_TARGET_Y1 = 0x10,
860 _BMA250E_OFC_SETTING_OFFSET_TARGET_Y_MASK = 3,
861 _BMA250E_OFC_SETTING_OFFSET_TARGET_Y_SHIFT = 3,
863 BMA250E_OFC_SETTING_OFFSET_TARGET_Z0 = 0x20,
864 BMA250E_OFC_SETTING_OFFSET_TARGET_Z1 = 0x40,
865 _BMA250E_OFC_SETTING_OFFSET_TARGET_Z_MASK = 3,
866 _BMA250E_OFC_SETTING_OFFSET_TARGET_Z_SHIFT = 5
869 } BMA250E_OFC_SETTING_BITS_T;
875 BMA250E_OFFSET_TARGET_0G = 0,
876 BMA250E_OFFSET_TARGET_PLUS_1G = 1,
877 BMA250E_OFFSET_TARGET_MINUS_1G = 2,
879 } BMA250E_OFFSET_TARGET_T;
885 BMA250E_FIFO_CONFIG_1_FIFO_DATA_SEL0 = 0x01,
886 BMA250E_FIFO_CONFIG_1_FIFO_DATA_SEL1 = 0x02,
887 _BMA250E_FIFO_CONFIG_1_FIFO_DATA_SEL = 3,
888 _BMA250E_FIFO_CONFIG_1_FIFO_DATA_SHIFT = 0,
892 BMA250E_FIFO_CONFIG_1_FIFO_MODE0 = 0x40,
893 BMA250E_FIFO_CONFIG_1_FIFO_MODE1 = 0x80,
894 _BMA250E_FIFO_CONFIG_1_FIFO_MODE_MASK = 3,
895 _BMA250E_FIFO_CONFIG_1_FIFO_MODE_SHIFT = 5
896 } BMA250E_FIFO_CONFIG_1_BITS_T;
902 BMA250E_FIFO_DATA_SEL_XYZ = 0,
903 BMA250E_FIFO_DATA_SEL_X = 1,
904 BMA250E_FIFO_DATA_SEL_Y = 2,
905 BMA250E_FIFO_DATA_SEL_Z = 3
906 } BMA250E_FIFO_DATA_SEL_T;
912 BMA250E_FIFO_MODE_BYPASS = 0,
913 BMA250E_FIFO_MODE_FIFO = 1,
914 BMA250E_FIFO_MODE_STREAM = 2
917 } BMA250E_FIFO_MODE_T;
921 BMA250E_INTERRUPT_INT1,
922 BMA250E_INTERRUPT_INT2
923 } BMA250E_INTERRUPT_PINS_T;
929 BMA250E_RESOLUTION_10BITS,
930 BMA250E_RESOLUTION_12BITS
931 } BMA250E_RESOLUTION_T;