77 #include <linux/types.h> 85 typedef u_int16_t
u16;
86 typedef u_int32_t
u32;
87 typedef u_int64_t
u64;
96 # if defined(__STDC_VERSION__) 101 #if (__STDC_VERSION__ == 201112L) 109 typedef uint16_t
u16;
110 typedef uint32_t
u32;
111 typedef uint64_t
u64;
122 #elif (__STDC_VERSION__ == 199901L) 132 typedef uint16_t
u16;
133 typedef uint32_t
u32;
134 typedef uint64_t
u64;
151 #define MACHINE_32_BIT 157 #ifdef MACHINE_16_BIT 160 typedef signed char s8;
161 typedef signed short int s16;
162 typedef signed long int s32;
164 #if defined(LONG_MAX) && LONG_MAX == 0x7fffffffffffffffL 165 typedef long int s64;
166 typedef unsigned long int u64;
167 #elif defined(LLONG_MAX) && (LLONG_MAX == 0x7fffffffffffffffLL) 168 typedef long long int s64;
169 typedef unsigned long long int u64;
171 #warning Either the correct data type for signed 64 bit integer \ 172 could not be found, or 64 bit integers are not supported in your environment. 173 #warning If 64 bit integers are supported on your platform, \ 174 please set s64 manually. 178 typedef unsigned char u8;
179 typedef unsigned short int u16;
180 typedef unsigned long int u32;
184 #elif defined MACHINE_32_BIT 186 typedef signed char s8;
187 typedef signed short int s16;
188 typedef signed int s32;
189 typedef signed long long int s64;
192 typedef unsigned char u8;
193 typedef unsigned short int u16;
194 typedef unsigned int u32;
195 typedef unsigned long long int u64;
199 #elif defined MACHINE_64_BIT 201 typedef signed char s8;
202 typedef signed short int s16;
203 typedef signed int s32;
204 typedef signed long int s64;
207 typedef unsigned char u8;
208 typedef unsigned short int u16;
209 typedef unsigned int u32;
210 typedef unsigned long int u64;
213 #warning The data types defined above which not supported \ 214 define the data types manually 227 #define MACHINE_32_BIT 231 #ifdef MACHINE_16_BIT 234 typedef signed char s8;
235 typedef signed short int s16;
236 typedef signed long int s32;
238 #if defined(LONG_MAX) && LONG_MAX == 0x7fffffffffffffffL 239 typedef long int s64;
240 typedef unsigned long int u64;
241 #elif defined(LLONG_MAX) && (LLONG_MAX == 0x7fffffffffffffffLL) 242 typedef long long int s64;
243 typedef unsigned long long int u64;
245 #warning Either the correct data type for signed 64 bit integer \ 246 could not be found, or 64 bit integers are not supported in your environment. 247 #warning If 64 bit integers are supported on your platform, \ 248 please set s64 manually. 252 typedef unsigned char u8;
253 typedef unsigned short int u16;
254 typedef unsigned long int u32;
258 #elif defined MACHINE_32_BIT 260 typedef signed char s8;
261 typedef signed short int s16;
263 typedef signed long long int s64;
266 typedef unsigned char u8;
267 typedef unsigned short int u16;
269 typedef unsigned long long int u64;
273 #elif defined MACHINE_64_BIT 275 typedef signed char s8;
276 typedef signed short int s16;
277 typedef signed int s32;
278 typedef signed long int s64;
281 typedef unsigned char u8;
282 typedef unsigned short int u16;
283 typedef unsigned int u32;
284 typedef unsigned long int u64;
287 #warning The data types defined above which not supported \ 288 define the data types manually 315 #define BMI160_WR_FUNC_PTR s8 (*bus_write)(u8, u8,\ 337 #define BMI160_BUS_WRITE_FUNC(dev_addr, reg_addr, reg_data, wr_len)\ 338 bus_write(dev_addr, reg_addr, reg_data, wr_len) 358 #define BMI160_SPI_RD_MASK (0x80) 360 #define BMI160_RD_FUNC_PTR s8 (*bus_read)(u8,\ 363 #define BMI160_BRD_FUNC_PTR s8 \ 364 (*burst_read)(u8, u8, u8 *, u32) 389 #define BMI160_BUS_READ_FUNC(dev_addr, reg_addr, reg_data, r_len)\ 390 bus_read(dev_addr, reg_addr, reg_data, r_len) 392 #define BMI160_BURST_READ_FUNC(device_addr, \ 393 register_addr, register_data, rd_len)\ 394 burst_read(device_addr, register_addr, register_data, rd_len) 405 #define BMI160_MDELAY_DATA_TYPE u32 410 #define BMI160_I2C_ADDR1 (0x68) 412 #define BMI160_I2C_ADDR2 (0x69) 414 #define BMI160_AUX_BMM150_I2C_ADDRESS (0x13) 416 #define BMI160_AUX_YAS532_I2C_ADDRESS (0x2E) 418 #define BMI160_AUX_AKM09911_I2C_ADDR_1 (0x0C) 420 #define BMI160_AUX_AKM09911_I2C_ADDR_2 (0x0D) 422 #define BMI160_AUX_AKM09912_I2C_ADDR_1 (0x0C) 424 #define BMI160_AUX_AKM09912_I2C_ADDR_2 (0x0D) 426 #define BMI160_AUX_AKM09912_I2C_ADDR_3 (0x0E) 428 #define BMI160_AUX_AKM09912_I2C_ADDR_4 (0x0F) 433 #define BMI160_INIT_VALUE (0) 434 #define BMI160_ASSIGN_DATA (1) 435 #define BMI160_GEN_READ_WRITE_DATA_LENGTH (1) 436 #define BMI160_MAXIMUM_TIMEOUT (10) 439 #define BMI160_OUTPUT_DATA_RATE0 (0) 440 #define BMI160_OUTPUT_DATA_RATE1 (1) 441 #define BMI160_OUTPUT_DATA_RATE2 (2) 442 #define BMI160_OUTPUT_DATA_RATE3 (3) 443 #define BMI160_OUTPUT_DATA_RATE4 (4) 444 #define BMI160_OUTPUT_DATA_RATE5 (5) 445 #define BMI160_OUTPUT_DATA_RATE6 (14) 446 #define BMI160_OUTPUT_DATA_RATE7 (15) 449 #define V_ANY_MOTION_INTR_STAT (4) 450 #define V_ANY_MOTION_AXIS_STAT (7) 453 #define BMI160_ACCEL_RANGE0 (3) 454 #define BMI160_ACCEL_RANGE1 (5) 455 #define BMI160_ACCEL_RANGE3 (8) 456 #define BMI160_ACCEL_RANGE4 (12) 459 #define BMI160_FOC_STAT_HIGH (1) 460 #define BMI160_SIG_MOTION_STAT_HIGH (1) 461 #define BMI160_STEP_DET_STAT_HIGH (1) 464 #define BMI160_MAX_VALUE_SIGNIFICANT_MOTION (1) 465 #define BMI160_MAX_VALUE_FIFO_FILTER (1) 466 #define BMI160_MAX_VALUE_FIFO_TIME (1) 467 #define BMI160_MAX_VALUE_FIFO_INTR (1) 468 #define BMI160_MAX_VALUE_FIFO_HEADER (1) 469 #define BMI160_MAX_VALUE_FIFO_MAG (1) 470 #define BMI160_MAX_VALUE_FIFO_ACCEL (1) 471 #define BMI160_MAX_VALUE_FIFO_GYRO (1) 472 #define BMI160_MAX_VALUE_SOURCE_INTR (1) 473 #define BMI160_MAX_VALUE_LOW_G_MODE (1) 474 #define BMI160_MAX_VALUE_NO_MOTION (1) 475 #define BMI160_MAX_VALUE_TAP_SHOCK (1) 476 #define BMI160_MAX_VALUE_TAP_QUIET (1) 477 #define BMI160_MAX_VALUE_ORIENT_UD (1) 478 #define BMI160_MAX_VALUE_ORIENT_AXES (1) 479 #define BMI160_MAX_VALUE_NVM_PROG (1) 480 #define BMI160_MAX_VALUE_SPI3 (1) 481 #define BMI160_MAX_VALUE_PAGE (1) 482 #define BMI160_MAX_VALUE_I2C_WDT (1) 483 #define BMI160_MAX_VALUE_SLEEP_STATE (1) 484 #define BMI160_MAX_VALUE_WAKEUP_INTR (1) 485 #define BMI160_MAX_VALUE_SELFTEST_SIGN (1) 486 #define BMI160_MAX_VALUE_SELFTEST_AMP (1) 487 #define BMI160_MAX_VALUE_SELFTEST_START (1) 489 #define BMI160_MAX_GYRO_WAKEUP_TRIGGER (3) 490 #define BMI160_MAX_ACCEL_SELFTEST_AXIS (3) 491 #define BMI160_MAX_GYRO_STEP_COUNTER (1) 492 #define BMI160_MAX_GYRO_BW (3) 493 #define BMI160_MAX_ACCEL_BW (7) 494 #define BMI160_MAX_ORIENT_MODE (3) 495 #define BMI160_MAX_ORIENT_BLOCKING (3) 496 #define BMI160_MAX_FLAT_HOLD (3) 497 #define BMI160_MAX_ACCEL_FOC (3) 498 #define BMI160_MAX_IF_MODE (3) 499 #define BMI160_MAX_TARGET_PAGE (3) 500 #define BMI160_MAX_GYRO_RANGE (4) 501 #define BMI160_MAX_GYRO_SLEEP_TIGGER (7) 502 #define BMI160_MAX_TAP_TURN (7) 503 #define BMI160_MAX_UNDER_SAMPLING (1) 504 #define BMI160_MAX_UNDER_SIG_MOTION (3) 505 #define BMI160_MAX_ACCEL_OUTPUT_DATA_RATE (12) 506 #define BMI160_MAX_LATCH_INTR (15) 507 #define BMI160_MAX_FLAT_HYST (15) 508 #define BMI160_MAX_ORIENT_THETA (63) 509 #define BMI160_MAX_FLAT_THETA (63) 513 #define BMI160_FIFO_X_LSB_DATA (0) 514 #define BMI160_FIFO_X_MSB_DATA (1) 515 #define BMI160_FIFO_Y_LSB_DATA (2) 516 #define BMI160_FIFO_Y_MSB_DATA (3) 517 #define BMI160_FIFO_Z_LSB_DATA (4) 518 #define BMI160_FIFO_Z_MSB_DATA (5) 519 #define BMI160_FIFO_R_LSB_DATA (6) 520 #define BMI160_FIFO_R_MSB_DATA (7) 522 #define BMI160_GA_FIFO_G_X_LSB (0) 523 #define BMI160_GA_FIFO_G_X_MSB (1) 524 #define BMI160_GA_FIFO_G_Y_LSB (2) 525 #define BMI160_GA_FIFO_G_Y_MSB (3) 526 #define BMI160_GA_FIFO_G_Z_LSB (4) 527 #define BMI160_GA_FIFO_G_Z_MSB (5) 528 #define BMI160_GA_FIFO_A_X_LSB (6) 529 #define BMI160_GA_FIFO_A_X_MSB (7) 530 #define BMI160_GA_FIFO_A_Y_LSB (8) 531 #define BMI160_GA_FIFO_A_Y_MSB (9) 532 #define BMI160_GA_FIFO_A_Z_LSB (10) 533 #define BMI160_GA_FIFO_A_Z_MSB (11) 535 #define BMI160_MGA_FIFO_M_X_LSB (0) 536 #define BMI160_MGA_FIFO_M_X_MSB (1) 537 #define BMI160_MGA_FIFO_M_Y_LSB (2) 538 #define BMI160_MGA_FIFO_M_Y_MSB (3) 539 #define BMI160_MGA_FIFO_M_Z_LSB (4) 540 #define BMI160_MGA_FIFO_M_Z_MSB (5) 541 #define BMI160_MGA_FIFO_M_R_LSB (6) 542 #define BMI160_MGA_FIFO_M_R_MSB (7) 543 #define BMI160_MGA_FIFO_G_X_LSB (8) 544 #define BMI160_MGA_FIFO_G_X_MSB (9) 545 #define BMI160_MGA_FIFO_G_Y_LSB (10) 546 #define BMI160_MGA_FIFO_G_Y_MSB (11) 547 #define BMI160_MGA_FIFO_G_Z_LSB (12) 548 #define BMI160_MGA_FIFO_G_Z_MSB (13) 549 #define BMI160_MGA_FIFO_A_X_LSB (14) 550 #define BMI160_MGA_FIFO_A_X_MSB (15) 551 #define BMI160_MGA_FIFO_A_Y_LSB (16) 552 #define BMI160_MGA_FIFO_A_Y_MSB (17) 553 #define BMI160_MGA_FIFO_A_Z_LSB (18) 554 #define BMI160_MGA_FIFO_A_Z_MSB (19) 556 #define BMI160_MA_FIFO_M_X_LSB (0) 557 #define BMI160_MA_FIFO_M_X_MSB (1) 558 #define BMI160_MA_FIFO_M_Y_LSB (2) 559 #define BMI160_MA_FIFO_M_Y_MSB (3) 560 #define BMI160_MA_FIFO_M_Z_LSB (4) 561 #define BMI160_MA_FIFO_M_Z_MSB (5) 562 #define BMI160_MA_FIFO_M_R_LSB (6) 563 #define BMI160_MA_FIFO_M_R_MSB (7) 564 #define BMI160_MA_FIFO_A_X_LSB (8) 565 #define BMI160_MA_FIFO_A_X_MSB (9) 566 #define BMI160_MA_FIFO_A_Y_LSB (10) 567 #define BMI160_MA_FIFO_A_Y_MSB (11) 568 #define BMI160_MA_FIFO_A_Z_LSB (12) 569 #define BMI160_MA_FIFO_A_Z_MSB (13) 571 #define BMI160_MG_FIFO_M_X_LSB (0) 572 #define BMI160_MG_FIFO_M_X_MSB (1) 573 #define BMI160_MG_FIFO_M_Y_LSB (2) 574 #define BMI160_MG_FIFO_M_Y_MSB (3) 575 #define BMI160_MG_FIFO_M_Z_LSB (4) 576 #define BMI160_MG_FIFO_M_Z_MSB (5) 577 #define BMI160_MG_FIFO_M_R_LSB (6) 578 #define BMI160_MG_FIFO_M_R_MSB (7) 579 #define BMI160_MG_FIFO_G_X_LSB (8) 580 #define BMI160_MG_FIFO_G_X_MSB (9) 581 #define BMI160_MG_FIFO_G_Y_LSB (10) 582 #define BMI160_MG_FIFO_G_Y_MSB (11) 583 #define BMI160_MG_FIFO_G_Z_LSB (12) 584 #define BMI160_MG_FIFO_G_Z_MSB (13) 586 #define BMI160_FIFO_SENSOR_TIME_LSB (0) 587 #define BMI160_FIFO_SENSOR_TIME_XLSB (1) 588 #define BMI160_FIFO_SENSOR_TIME_MSB (2) 589 #define BMI160_FIFO_SENSOR_TIME_LENGTH (3) 590 #define BMI160_FIFO_A_LENGTH (6) 591 #define BMI160_FIFO_G_LENGTH (6) 592 #define BMI160_FIFO_M_LENGTH (8) 593 #define BMI160_FIFO_AG_LENGTH (12) 594 #define BMI160_FIFO_AMG_LENGTH (20) 595 #define BMI160_FIFO_MA_OR_MG_LENGTH (14) 596 #define BMI160_FIFO_LENGTH_LSB_BYTE (0) 597 #define BMI160_FIFO_LENGTH_MSB_BYTE (1) 602 #define BMI160_MAG_X_DATA_LENGTH (2) 603 #define BMI160_MAG_Y_DATA_LENGTH (2) 604 #define BMI160_MAG_Z_DATA_LENGTH (2) 605 #define BMI160_MAG_R_DATA_LENGTH (2) 606 #define BMI160_MAG_XYZ_DATA_LENGTH (6) 607 #define BMI160_MAG_XYZR_DATA_LENGTH (8) 608 #define BMI160_MAG_YAS_DATA_LENGTH (8) 609 #define BMI160_GYRO_DATA_LENGTH (2) 610 #define BMI160_GYRO_XYZ_DATA_LENGTH (6) 611 #define BMI160_ACCEL_DATA_LENGTH (2) 612 #define BMI160_ACCEL_XYZ_DATA_LENGTH (6) 613 #define BMI160_TEMP_DATA_LENGTH (2) 614 #define BMI160_FIFO_DATA_LENGTH (2) 615 #define BMI160_STEP_COUNTER_LENGTH (2) 616 #define BMI160_SENSOR_TIME_LENGTH (3) 619 #define BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY (5) 620 #define BMI160_BMM150_WAKEUP_DELAY1 (2) 621 #define BMI160_BMM150_WAKEUP_DELAY2 (3) 622 #define BMI160_BMM150_WAKEUP_DELAY3 (1) 623 #define BMI160_YAS532_OFFSET_DELAY (2) 624 #define BMI160_GEN_READ_WRITE_DELAY (1) 625 #define BMI160_YAS532_MEASUREMENT_DELAY (25) 626 #define BMI160_YAS_ACQ_COMMAND_DELAY (50) 627 #define BMI160_YAS532_SET_INITIAL_VALUE_DELAY (200) 628 #define BMI160_AKM_INIT_DELAY (60) 632 #define BMI160_ACCEL_X_DATA_SIZE (2) 633 #define BMI160_ACCEL_Y_DATA_SIZE (2) 634 #define BMI160_ACCEL_Z_DATA_SIZE (2) 635 #define BMI160_ACCEL_XYZ_DATA_SIZE (6) 637 #define BMI160_GYRO_X_DATA_SIZE (2) 638 #define BMI160_GYRO_Y_DATA_SIZE (2) 639 #define BMI160_GYRO_Z_DATA_SIZE (2) 640 #define BMI160_GYRO_XYZ_DATA_SIZE (6) 642 #define BMI160_MAG_X_DATA_SIZE (2) 643 #define BMI160_MAG_Y_DATA_SIZE (2) 644 #define BMI160_MAG_Z_DATA_SIZE (2) 645 #define BMI160_MAG_R_DATA_SIZE (2) 646 #define BMI160_MAG_XYZ_DATA_SIZE (6) 647 #define BMI160_MAG_XYZR_DATA_SIZE (8) 648 #define BMI160_MAG_TRIM_DATA_SIZE (16) 651 #define BMI160_TEMP_DATA_SIZE (2) 652 #define BMI160_FIFO_DATA_SIZE (2) 653 #define BMI160_STEP_COUNT_DATA_SIZE (2) 655 #define BMI160_SENSOR_TIME_DATA_SIZE (3) 656 #define BMI160_AKM_SENSITIVITY_DATA_SIZE (3) 657 #define BMI160_HARD_OFFSET_DATA_SIZE (3) 658 #define BMI160_YAS_XY1Y2_DATA_SIZE (3) 659 #define BMI160_YAS_FLAG_DATA_SIZE (3) 660 #define BMI160_YAS_TEMP_DATA_SIZE (3) 661 #define BMI160_YAS_H_DATA_SIZE (3) 662 #define BMI160_YAS_S_DATA_SIZE (3) 663 #define BMI160_YAS_CORRECT_DATA_SIZE (5) 664 #define BMI160_YAS_XY1Y2T_DATA_SIZE (8) 665 #define BMI160_YAS537_CALIB_DATA_SIZE (17) 666 #define BMI160_YAS532_CALIB_DATA_SIZE (14) 667 #define BMI160_GYRO_ACCEL_SENSORTIME_DATA_SIZE (15) 668 #define BMI160_ACCEL_SENSORTIME_DATA_SIZE (9) 671 #define BMI160_GYRO_ACCEL_SENSORTIME_DATA (1) 672 #define BMI160_ACCEL_SENSORTIME_DATA (0) 679 #define BMI160_SENSOR_TIME_MSB_BYTE (2) 680 #define BMI160_SENSOR_TIME_XLSB_BYTE (1) 681 #define BMI160_SENSOR_TIME_LSB_BYTE (0) 683 #define BMI160_MAG_X_LSB_BYTE (0) 684 #define BMI160_MAG_X_MSB_BYTE (1) 685 #define BMI160_MAG_Y_LSB_BYTE (0) 686 #define BMI160_MAG_Y_MSB_BYTE (1) 687 #define BMI160_MAG_Z_LSB_BYTE (0) 688 #define BMI160_MAG_Z_MSB_BYTE (1) 689 #define BMI160_MAG_R_LSB_BYTE (0) 690 #define BMI160_MAG_R_MSB_BYTE (1) 691 #define BMI160_DATA_FRAME_MAG_X_LSB_BYTE (0) 692 #define BMI160_DATA_FRAME_MAG_X_MSB_BYTE (1) 693 #define BMI160_DATA_FRAME_MAG_Y_LSB_BYTE (2) 694 #define BMI160_DATA_FRAME_MAG_Y_MSB_BYTE (3) 695 #define BMI160_DATA_FRAME_MAG_Z_LSB_BYTE (4) 696 #define BMI160_DATA_FRAME_MAG_Z_MSB_BYTE (5) 697 #define BMI160_DATA_FRAME_MAG_R_LSB_BYTE (6) 698 #define BMI160_DATA_FRAME_MAG_R_MSB_BYTE (7) 700 #define BMI160_GYRO_X_LSB_BYTE (0) 701 #define BMI160_GYRO_X_MSB_BYTE (1) 702 #define BMI160_GYRO_Y_LSB_BYTE (0) 703 #define BMI160_GYRO_Y_MSB_BYTE (1) 704 #define BMI160_GYRO_Z_LSB_BYTE (0) 705 #define BMI160_GYRO_Z_MSB_BYTE (1) 706 #define BMI160_DATA_FRAME_GYRO_X_LSB_BYTE (0) 707 #define BMI160_DATA_FRAME_GYRO_X_MSB_BYTE (1) 708 #define BMI160_DATA_FRAME_GYRO_Y_LSB_BYTE (2) 709 #define BMI160_DATA_FRAME_GYRO_Y_MSB_BYTE (3) 710 #define BMI160_DATA_FRAME_GYRO_Z_LSB_BYTE (4) 711 #define BMI160_DATA_FRAME_GYRO_Z_MSB_BYTE (5) 713 #define BMI160_ACCEL_X_LSB_BYTE (0) 714 #define BMI160_ACCEL_X_MSB_BYTE (1) 715 #define BMI160_ACCEL_Y_LSB_BYTE (0) 716 #define BMI160_ACCEL_Y_MSB_BYTE (1) 717 #define BMI160_ACCEL_Z_LSB_BYTE (0) 718 #define BMI160_ACCEL_Z_MSB_BYTE (1) 719 #define BMI160_DATA_FRAME_ACCEL_X_LSB_BYTE (0) 720 #define BMI160_DATA_FRAME_ACCEL_X_MSB_BYTE (1) 721 #define BMI160_DATA_FRAME_ACCEL_Y_LSB_BYTE (2) 722 #define BMI160_DATA_FRAME_ACCEL_Y_MSB_BYTE (3) 723 #define BMI160_DATA_FRAME_ACCEL_Z_LSB_BYTE (4) 724 #define BMI160_DATA_FRAME_ACCEL_Z_MSB_BYTE (5) 726 #define BMI160_TEMP_LSB_BYTE (0) 727 #define BMI160_TEMP_MSB_BYTE (1) 728 #define BMI160_STEP_COUNT_LSB_BYTE (0) 729 #define BMI160_STEP_COUNT_MSB_BYTE (1) 734 #define E_BMI160_NULL_PTR ((s8)-127) 735 #define E_BMI160_COMM_RES ((s8)-1) 736 #define E_BMI160_OUT_OF_RANGE ((s8)-2) 737 #define E_BMI160_BUSY ((s8)-3) 738 #define SUCCESS ((u8)0) 739 #define ERROR ((s8)-1) 742 #define BMI160_NULL (0) 743 #define BMI160_DELAY_SETTLING_TIME (5) 745 #define BMI160_RETURN_FUNCTION_TYPE s8 752 #define BMI160_USER_CHIP_ID_ADDR (0x00) 756 #define BMI160_USER_ERROR_ADDR (0X02) 760 #define BMI160_USER_PMU_STAT_ADDR (0X03) 764 #define BMI160_USER_DATA_0_ADDR (0X04) 765 #define BMI160_USER_DATA_1_ADDR (0X05) 766 #define BMI160_USER_DATA_2_ADDR (0X06) 767 #define BMI160_USER_DATA_3_ADDR (0X07) 768 #define BMI160_USER_DATA_4_ADDR (0X08) 769 #define BMI160_USER_DATA_5_ADDR (0X09) 770 #define BMI160_USER_DATA_6_ADDR (0X0A) 771 #define BMI160_USER_DATA_7_ADDR (0X0B) 775 #define BMI160_USER_DATA_8_ADDR (0X0C) 776 #define BMI160_USER_DATA_9_ADDR (0X0D) 777 #define BMI160_USER_DATA_10_ADDR (0X0E) 778 #define BMI160_USER_DATA_11_ADDR (0X0F) 779 #define BMI160_USER_DATA_12_ADDR (0X10) 780 #define BMI160_USER_DATA_13_ADDR (0X11) 784 #define BMI160_USER_DATA_14_ADDR (0X12) 785 #define BMI160_USER_DATA_15_ADDR (0X13) 786 #define BMI160_USER_DATA_16_ADDR (0X14) 787 #define BMI160_USER_DATA_17_ADDR (0X15) 788 #define BMI160_USER_DATA_18_ADDR (0X16) 789 #define BMI160_USER_DATA_19_ADDR (0X17) 793 #define BMI160_USER_SENSORTIME_0_ADDR (0X18) 794 #define BMI160_USER_SENSORTIME_1_ADDR (0X19) 795 #define BMI160_USER_SENSORTIME_2_ADDR (0X1A) 799 #define BMI160_USER_STAT_ADDR (0X1B) 803 #define BMI160_USER_INTR_STAT_0_ADDR (0X1C) 804 #define BMI160_USER_INTR_STAT_1_ADDR (0X1D) 805 #define BMI160_USER_INTR_STAT_2_ADDR (0X1E) 806 #define BMI160_USER_INTR_STAT_3_ADDR (0X1F) 810 #define BMI160_USER_TEMPERATURE_0_ADDR (0X20) 811 #define BMI160_USER_TEMPERATURE_1_ADDR (0X21) 815 #define BMI160_USER_FIFO_LENGTH_0_ADDR (0X22) 816 #define BMI160_USER_FIFO_LENGTH_1_ADDR (0X23) 817 #define BMI160_USER_FIFO_DATA_ADDR (0X24) 821 #define BMI160_USER_ACCEL_CONFIG_ADDR (0X40) 825 #define BMI160_USER_ACCEL_RANGE_ADDR (0X41) 829 #define BMI160_USER_GYRO_CONFIG_ADDR (0X42) 833 #define BMI160_USER_GYRO_RANGE_ADDR (0X43) 837 #define BMI160_USER_MAG_CONFIG_ADDR (0X44) 842 #define BMI160_USER_FIFO_DOWN_ADDR (0X45) 846 #define BMI160_USER_FIFO_CONFIG_0_ADDR (0X46) 847 #define BMI160_USER_FIFO_CONFIG_1_ADDR (0X47) 853 #define BMI160_USER_MAG_IF_0_ADDR (0X4B) 854 #define BMI160_USER_MAG_IF_1_ADDR (0X4C) 855 #define BMI160_USER_MAG_IF_2_ADDR (0X4D) 856 #define BMI160_USER_MAG_IF_3_ADDR (0X4E) 857 #define BMI160_USER_MAG_IF_4_ADDR (0X4F) 861 #define BMI160_USER_INTR_ENABLE_0_ADDR (0X50) 862 #define BMI160_USER_INTR_ENABLE_1_ADDR (0X51) 863 #define BMI160_USER_INTR_ENABLE_2_ADDR (0X52) 864 #define BMI160_USER_INTR_OUT_CTRL_ADDR (0X53) 868 #define BMI160_USER_INTR_LATCH_ADDR (0X54) 872 #define BMI160_USER_INTR_MAP_0_ADDR (0X55) 873 #define BMI160_USER_INTR_MAP_1_ADDR (0X56) 874 #define BMI160_USER_INTR_MAP_2_ADDR (0X57) 878 #define BMI160_USER_INTR_DATA_0_ADDR (0X58) 879 #define BMI160_USER_INTR_DATA_1_ADDR (0X59) 884 #define BMI160_USER_INTR_LOWHIGH_0_ADDR (0X5A) 885 #define BMI160_USER_INTR_LOWHIGH_1_ADDR (0X5B) 886 #define BMI160_USER_INTR_LOWHIGH_2_ADDR (0X5C) 887 #define BMI160_USER_INTR_LOWHIGH_3_ADDR (0X5D) 888 #define BMI160_USER_INTR_LOWHIGH_4_ADDR (0X5E) 889 #define BMI160_USER_INTR_MOTION_0_ADDR (0X5F) 890 #define BMI160_USER_INTR_MOTION_1_ADDR (0X60) 891 #define BMI160_USER_INTR_MOTION_2_ADDR (0X61) 892 #define BMI160_USER_INTR_MOTION_3_ADDR (0X62) 893 #define BMI160_USER_INTR_TAP_0_ADDR (0X63) 894 #define BMI160_USER_INTR_TAP_1_ADDR (0X64) 895 #define BMI160_USER_INTR_ORIENT_0_ADDR (0X65) 896 #define BMI160_USER_INTR_ORIENT_1_ADDR (0X66) 897 #define BMI160_USER_INTR_FLAT_0_ADDR (0X67) 898 #define BMI160_USER_INTR_FLAT_1_ADDR (0X68) 902 #define BMI160_USER_FOC_CONFIG_ADDR (0X69) 906 #define BMI160_USER_CONFIG_ADDR (0X6A) 910 #define BMI160_USER_IF_CONFIG_ADDR (0X6B) 914 #define BMI160_USER_PMU_TRIGGER_ADDR (0X6C) 918 #define BMI160_USER_SELF_TEST_ADDR (0X6D) 922 #define BMI160_USER_NV_CONFIG_ADDR (0x70) 926 #define BMI160_USER_OFFSET_0_ADDR (0X71) 927 #define BMI160_USER_OFFSET_1_ADDR (0X72) 928 #define BMI160_USER_OFFSET_2_ADDR (0X73) 929 #define BMI160_USER_OFFSET_3_ADDR (0X74) 930 #define BMI160_USER_OFFSET_4_ADDR (0X75) 931 #define BMI160_USER_OFFSET_5_ADDR (0X76) 932 #define BMI160_USER_OFFSET_6_ADDR (0X77) 936 #define BMI160_USER_STEP_COUNT_0_ADDR (0X78) 937 #define BMI160_USER_STEP_COUNT_1_ADDR (0X79) 941 #define BMI160_USER_STEP_CONFIG_0_ADDR (0X7A) 942 #define BMI160_USER_STEP_CONFIG_1_ADDR (0X7B) 946 #define BMI160_CMD_COMMANDS_ADDR (0X7E) 950 #define BMI160_CMD_EXT_MODE_ADDR (0X7F) 951 #define BMI160_COM_C_TRIM_FIVE_ADDR (0X05) 956 #define BMI160_SHIFT_BIT_POSITION_BY_01_BIT (1) 957 #define BMI160_SHIFT_BIT_POSITION_BY_02_BITS (2) 958 #define BMI160_SHIFT_BIT_POSITION_BY_03_BITS (3) 959 #define BMI160_SHIFT_BIT_POSITION_BY_04_BITS (4) 960 #define BMI160_SHIFT_BIT_POSITION_BY_05_BITS (5) 961 #define BMI160_SHIFT_BIT_POSITION_BY_06_BITS (6) 962 #define BMI160_SHIFT_BIT_POSITION_BY_07_BITS (7) 963 #define BMI160_SHIFT_BIT_POSITION_BY_08_BITS (8) 964 #define BMI160_SHIFT_BIT_POSITION_BY_09_BITS (9) 965 #define BMI160_SHIFT_BIT_POSITION_BY_12_BITS (12) 966 #define BMI160_SHIFT_BIT_POSITION_BY_13_BITS (13) 967 #define BMI160_SHIFT_BIT_POSITION_BY_14_BITS (14) 968 #define BMI160_SHIFT_BIT_POSITION_BY_15_BITS (15) 969 #define BMI160_SHIFT_BIT_POSITION_BY_16_BITS (16) 974 #define YAS532_MAG_STATE_NORMAL (0) 975 #define YAS532_MAG_STATE_INIT_COIL (1) 976 #define YAS532_MAG_STATE_MEASURE_OFFSET (2) 977 #define YAS532_MAG_INITCOIL_TIMEOUT (1000) 978 #define YAS532_MAG_NOTRANS_POSITION (3) 979 #define YAS532_DEFAULT_SENSOR_DELAY (50) 980 #define YAS532_DATA_OVERFLOW (8190) 981 #define YAS532_DATA_UNDERFLOW (0) 982 #define YAS532_MAG_TEMPERATURE_LOG (10) 983 #define YAS532_TEMP20DEGREE_TYPICAL (390) 984 #define YAS532_VERSION_AC_COEF_X (850) 985 #define YAS532_VERSION_AC_COEF_Y1 (750) 986 #define YAS532_VERSION_AC_COEF_Y2 (750) 987 #define YAS532_DATA_CENTER (4096) 991 static const s8 INVALID_OFFSET[] = {0x7f, 0x7f, 0x7f};
992 #define set_vector(to, from) \ 993 {int _l; for (_l = 0; _l < 3; _l++) (to)[_l] = (from)[_l]; } 994 #define is_valid_offset(a) \ 995 (((a)[0] <= 31) && ((a)[1] <= 31) && ((a)[2] <= 31) \ 996 && (-31 <= (a)[0]) && (-31 <= (a)[1]) && (-31 <= (a)[2])) 1004 #define BMI160_YAS532_TESTR1 (0x88) 1005 #define BMI160_YAS532_TESTR2 (0x89) 1006 #define BMI160_YAS532_RCOIL (0x81) 1007 #define BMI160_YAS532_COMMAND_REGISTER (0x82) 1008 #define BMI160_YAS532_DATA_REGISTER (0xB0) 1010 #define BMI160_YAS532_CALIB_CX (0x90) 1011 #define BMI160_YAS532_CALIB_CY1 (0x91) 1012 #define BMI160_YAS532_CALIB_CY2 (0x92) 1013 #define BMI160_YAS532_CALIB1 (0x93) 1014 #define BMI160_YAS532_CALIB2 (0x94) 1015 #define BMI160_YAS532_CALIB3 (0x95) 1016 #define BMI160_YAS532_CALIB4 (0x96) 1017 #define BMI160_YAS532_CALIB5 (0x97) 1018 #define BMI160_YAS532_CLAIB6 (0x98) 1019 #define BMI160_YAS532_CALIB7 (0x99) 1020 #define BMI160_YAS532_CALIB8 (0x9A) 1021 #define BMI160_YAS532_CALIIB9 (0x9B) 1022 #define BMI160_YAS532_CALIB10 (0x9C) 1023 #define BMI160_YAS532_CALIB11 (0x9D) 1025 #define BMI160_YAS532_OFFSET_X (0x85) 1026 #define BMI160_YAS532_OFFSET_Y (0x86) 1027 #define BMI160_YAS532_OFFSET_Z (0x87) 1029 #define BMI160_YAS532_WRITE_TESTR1 (0x00) 1030 #define BMI160_YAS532_WRITE_TESTR2 (0x00) 1031 #define BMI160_YAS532_WRITE_RCOIL (0x00) 1036 #define YAS537_SRSTR_DATA (0x02) 1037 #define YAS537_WRITE_A_D_CONVERTER (0x03) 1038 #define YAS537_WRITE_A_D_CONVERTER2 (0xF8) 1039 #define YAS537_WRITE_FILTER (0x08) 1040 #define YAS537_WRITE_CONFR (0x08) 1041 #define YAS537_WRITE_TEMP_CALIB (0xFF) 1042 #define YAS537_SET_COMMAND_REGISTER (0x01) 1047 #define YAS537_REG_SRSTR (0x90) 1048 #define YAS537_REG_CALR_C0 (0xC0) 1049 #define YAS537_REG_CALR_C1 (0xC1) 1050 #define YAS537_REG_CALR_C2 (0xC2) 1051 #define YAS537_REG_CALR_C3 (0xC3) 1052 #define YAS537_REG_CALR_C4 (0xC4) 1053 #define YAS537_REG_CALR_C5 (0xC5) 1054 #define YAS537_REG_CALR_C6 (0xC6) 1055 #define YAS537_REG_CALR_C7 (0xC7) 1056 #define YAS537_REG_CALR_C8 (0xC8) 1057 #define YAS537_REG_CALR_C9 (0xC9) 1058 #define YAS537_REG_CALR_CA (0xCA) 1059 #define YAS537_REG_CALR_CB (0xCB) 1060 #define YAS537_REG_CALR_CC (0xCC) 1061 #define YAS537_REG_CALR_CD (0xCD) 1062 #define YAS537_REG_CALR_CE (0xCE) 1063 #define YAS537_REG_CALR_CF (0xCF) 1064 #define YAS537_REG_CALR_DO (0xD0) 1065 #define YAS537_REG_MTCR (0x93) 1066 #define YAS537_REG_CONFR (0x82) 1067 #define BMI160_REG_YAS537_CMDR (0x81) 1068 #define YAS537_REG_OXR (0x84) 1069 #define YAS537_REG_AVRR (0x87) 1070 #define YAS537_REG_HCKR (0x88) 1071 #define YAS537_REG_LCKR (0x89) 1072 #define YAS537_REG_ADCCALR (0x91) 1073 #define YAS537_REG_ADCCALR_ONE (0x92) 1074 #define YAS537_REG_OCR (0x9E) 1075 #define YAS537_REG_TRMR (0x9F) 1076 #define YAS537_REG_TEMPERATURE_0 (0xB0) 1077 #define YAS537_REG_TEMPERATURE_1 (0xB1) 1078 #define YAS537_REG_DATA_X_0 (0xB2) 1079 #define YAS537_REG_DATA_X_1 (0xB3) 1080 #define YAS537_REG_DATA_Y1_0 (0xB4) 1081 #define YAS537_REG_DATA_Y1_1 (0xB5) 1082 #define YAS537_REG_DATA_Y2_0 (0xB6) 1083 #define YAS537_REG_DATA_Y2_1 (0xB7) 1084 #define YAS537_MAG_STATE_NORMAL (0) 1085 #define YAS537_MAG_STATE_INIT_COIL (1) 1086 #define YAS537_MAG_STATE_RECORD_DATA (2) 1087 #define YAS537_DATA_UNDERFLOW (0) 1088 #define YAS537_DATA_OVERFLOW (16383) 1092 #define yas537_set_vector(to, from) \ 1093 {int _l; for (_l = 0; _l < 3; _l++) (to)[_l] = (from)[_l]; } 1096 #define ABS(a) ((a) > 0 ? (a) : -(a)) 1101 #define AKM09912_SENSITIVITY_DIV (256) 1102 #define AKM09912_SENSITIVITY (128) 1103 #define AKM09911_SENSITIVITY_DIV (128) 1104 #define AKM_ASAX (0) 1105 #define AKM_ASAY (1) 1106 #define AKM_ASAZ (2) 1107 #define AKM_POWER_DOWN_MODE_DATA (0x00) 1108 #define AKM_FUSE_ROM_MODE (0x1F) 1109 #define AKM_POWER_MODE_REG (0x31) 1110 #define AKM_SINGLE_MEASUREMENT_MODE (0x01) 1111 #define AKM_DATA_REGISTER (0x11) 1113 #define AKM_CHIP_ID_REG (0x01) 1117 #define BMI160_BMM150_SET_POWER_CONTROL (0x01) 1118 #define BMI160_BMM150_MAX_RETRY_WAKEUP (5) 1119 #define BMI160_BMM150_POWER_ON (0x01) 1120 #define BMI160_BMM150_POWER_OFF (0x00) 1121 #define BMI160_BMM150_FORCE_MODE (0x02) 1122 #define BMI160_BMM150_POWER_ON_SUCCESS (0) 1123 #define BMI160_BMM150_POWER_ON_FAIL ((s8)-1) 1125 #define BMI160_BMM150_DIG_X1 (0) 1126 #define BMI160_BMM150_DIG_Y1 (1) 1127 #define BMI160_BMM150_DIG_X2 (2) 1128 #define BMI160_BMM150_DIG_Y3 (3) 1129 #define BMI160_BMM150_DIG_XY1 (4) 1130 #define BMI160_BMM150_DIG_XY2 (5) 1131 #define BMI160_BMM150_DIG_Z1_LSB (6) 1132 #define BMI160_BMM150_DIG_Z1_MSB (7) 1133 #define BMI160_BMM150_DIG_Z2_LSB (8) 1134 #define BMI160_BMM150_DIG_Z2_MSB (9) 1135 #define BMI160_BMM150_DIG_DIG_Z3_LSB (10) 1136 #define BMI160_BMM150_DIG_DIG_Z3_MSB (11) 1137 #define BMI160_BMM150_DIG_DIG_Z4_LSB (12) 1138 #define BMI160_BMM150_DIG_DIG_Z4_MSB (13) 1139 #define BMI160_BMM150_DIG_DIG_XYZ1_LSB (14) 1140 #define BMI160_BMM150_DIG_DIG_XYZ1_MSB (15) 1141 #define BMI160_FIFO_FRAME_CNT (146) 1142 #define BMI160_FRAME_COUNT (1) 1243 u8 accel_frame_count;
1245 u8 gyro_frame_count;
1262 u8 fifo_input_config_info;
1295 #define BMI160_USER_CHIP_ID__POS (0) 1296 #define BMI160_USER_CHIP_ID__MSK (0xFF) 1297 #define BMI160_USER_CHIP_ID__LEN (8) 1298 #define BMI160_USER_CHIP_ID__REG (BMI160_USER_CHIP_ID_ADDR) 1303 #define BMI160_USER_ERR_STAT__POS (0) 1304 #define BMI160_USER_ERR_STAT__LEN (8) 1305 #define BMI160_USER_ERR_STAT__MSK (0xFF) 1306 #define BMI160_USER_ERR_STAT__REG (BMI160_USER_ERROR_ADDR) 1308 #define BMI160_USER_FATAL_ERR__POS (0) 1309 #define BMI160_USER_FATAL_ERR__LEN (1) 1310 #define BMI160_USER_FATAL_ERR__MSK (0x01) 1311 #define BMI160_USER_FATAL_ERR__REG (BMI160_USER_ERROR_ADDR) 1314 #define BMI160_USER_ERR_CODE__POS (1) 1315 #define BMI160_USER_ERR_CODE__LEN (4) 1316 #define BMI160_USER_ERR_CODE__MSK (0x1E) 1317 #define BMI160_USER_ERR_CODE__REG (BMI160_USER_ERROR_ADDR) 1320 #define BMI160_USER_I2C_FAIL_ERR__POS (5) 1321 #define BMI160_USER_I2C_FAIL_ERR__LEN (1) 1322 #define BMI160_USER_I2C_FAIL_ERR__MSK (0x20) 1323 #define BMI160_USER_I2C_FAIL_ERR__REG (BMI160_USER_ERROR_ADDR) 1326 #define BMI160_USER_DROP_CMD_ERR__POS (6) 1327 #define BMI160_USER_DROP_CMD_ERR__LEN (1) 1328 #define BMI160_USER_DROP_CMD_ERR__MSK (0x40) 1329 #define BMI160_USER_DROP_CMD_ERR__REG (BMI160_USER_ERROR_ADDR) 1334 #define BMI160_USER_MAG_DATA_RDY_ERR__POS (7) 1335 #define BMI160_USER_MAG_DATA_RDY_ERR__LEN (1) 1336 #define BMI160_USER_MAG_DATA_RDY_ERR__MSK (0x80) 1337 #define BMI160_USER_MAG_DATA_RDY_ERR__REG (BMI160_USER_ERROR_ADDR) 1342 #define BMI160_USER_MAG_POWER_MODE_STAT__POS (0) 1343 #define BMI160_USER_MAG_POWER_MODE_STAT__LEN (2) 1344 #define BMI160_USER_MAG_POWER_MODE_STAT__MSK (0x03) 1345 #define BMI160_USER_MAG_POWER_MODE_STAT__REG \ 1346 (BMI160_USER_PMU_STAT_ADDR) 1351 #define BMI160_USER_GYRO_POWER_MODE_STAT__POS (2) 1352 #define BMI160_USER_GYRO_POWER_MODE_STAT__LEN (2) 1353 #define BMI160_USER_GYRO_POWER_MODE_STAT__MSK (0x0C) 1354 #define BMI160_USER_GYRO_POWER_MODE_STAT__REG \ 1355 (BMI160_USER_PMU_STAT_ADDR) 1360 #define BMI160_USER_ACCEL_POWER_MODE_STAT__POS (4) 1361 #define BMI160_USER_ACCEL_POWER_MODE_STAT__LEN (2) 1362 #define BMI160_USER_ACCEL_POWER_MODE_STAT__MSK (0x30) 1363 #define BMI160_USER_ACCEL_POWER_MODE_STAT__REG \ 1364 (BMI160_USER_PMU_STAT_ADDR) 1369 #define BMI160_USER_DATA_0_MAG_X_LSB__POS (0) 1370 #define BMI160_USER_DATA_0_MAG_X_LSB__LEN (8) 1371 #define BMI160_USER_DATA_0_MAG_X_LSB__MSK (0xFF) 1372 #define BMI160_USER_DATA_0_MAG_X_LSB__REG (BMI160_USER_DATA_0_ADDR) 1375 #define BMI160_USER_DATA_MAG_X_LSB__POS (3) 1376 #define BMI160_USER_DATA_MAG_X_LSB__LEN (5) 1377 #define BMI160_USER_DATA_MAG_X_LSB__MSK (0xF8) 1378 #define BMI160_USER_DATA_MAG_X_LSB__REG (BMI160_USER_DATA_0_ADDR) 1381 #define BMI160_USER_DATA_1_MAG_X_MSB__POS (0) 1382 #define BMI160_USER_DATA_1_MAG_X_MSB__LEN (8) 1383 #define BMI160_USER_DATA_1_MAG_X_MSB__MSK (0xFF) 1384 #define BMI160_USER_DATA_1_MAG_X_MSB__REG (BMI160_USER_DATA_1_ADDR) 1387 #define BMI160_USER_DATA_2_MAG_Y_LSB__POS (0) 1388 #define BMI160_USER_DATA_2_MAG_Y_LSB__LEN (8) 1389 #define BMI160_USER_DATA_2_MAG_Y_LSB__MSK (0xFF) 1390 #define BMI160_USER_DATA_2_MAG_Y_LSB__REG (BMI160_USER_DATA_2_ADDR) 1393 #define BMI160_USER_DATA_MAG_Y_LSB__POS (3) 1394 #define BMI160_USER_DATA_MAG_Y_LSB__LEN (5) 1395 #define BMI160_USER_DATA_MAG_Y_LSB__MSK (0xF8) 1396 #define BMI160_USER_DATA_MAG_Y_LSB__REG (BMI160_USER_DATA_2_ADDR) 1399 #define BMI160_USER_DATA_3_MAG_Y_MSB__POS (0) 1400 #define BMI160_USER_DATA_3_MAG_Y_MSB__LEN (8) 1401 #define BMI160_USER_DATA_3_MAG_Y_MSB__MSK (0xFF) 1402 #define BMI160_USER_DATA_3_MAG_Y_MSB__REG (BMI160_USER_DATA_3_ADDR) 1405 #define BMI160_USER_DATA_4_MAG_Z_LSB__POS (0) 1406 #define BMI160_USER_DATA_4_MAG_Z_LSB__LEN (8) 1407 #define BMI160_USER_DATA_4_MAG_Z_LSB__MSK (0xFF) 1408 #define BMI160_USER_DATA_4_MAG_Z_LSB__REG (BMI160_USER_DATA_4_ADDR) 1411 #define BMI160_USER_DATA_MAG_Z_LSB__POS (1) 1412 #define BMI160_USER_DATA_MAG_Z_LSB__LEN (7) 1413 #define BMI160_USER_DATA_MAG_Z_LSB__MSK (0xFE) 1414 #define BMI160_USER_DATA_MAG_Z_LSB__REG (BMI160_USER_DATA_4_ADDR) 1417 #define BMI160_USER_DATA_5_MAG_Z_MSB__POS (0) 1418 #define BMI160_USER_DATA_5_MAG_Z_MSB__LEN (8) 1419 #define BMI160_USER_DATA_5_MAG_Z_MSB__MSK (0xFF) 1420 #define BMI160_USER_DATA_5_MAG_Z_MSB__REG (BMI160_USER_DATA_5_ADDR) 1423 #define BMI160_USER_DATA_6_RHALL_LSB__POS (0) 1424 #define BMI160_USER_DATA_6_RHALL_LSB__LEN (8) 1425 #define BMI160_USER_DATA_6_RHALL_LSB__MSK (0xFF) 1426 #define BMI160_USER_DATA_6_RHALL_LSB__REG (BMI160_USER_DATA_6_ADDR) 1429 #define BMI160_USER_DATA_MAG_R_LSB__POS (2) 1430 #define BMI160_USER_DATA_MAG_R_LSB__LEN (6) 1431 #define BMI160_USER_DATA_MAG_R_LSB__MSK (0xFC) 1432 #define BMI160_USER_DATA_MAG_R_LSB__REG (BMI160_USER_DATA_6_ADDR) 1435 #define BMI160_USER_DATA_7_RHALL_MSB__POS (0) 1436 #define BMI160_USER_DATA_7_RHALL_MSB__LEN (8) 1437 #define BMI160_USER_DATA_7_RHALL_MSB__MSK (0xFF) 1438 #define BMI160_USER_DATA_7_RHALL_MSB__REG (BMI160_USER_DATA_7_ADDR) 1443 #define BMI160_USER_DATA_8_GYRO_X_LSB__POS (0) 1444 #define BMI160_USER_DATA_8_GYRO_X_LSB__LEN (8) 1445 #define BMI160_USER_DATA_8_GYRO_X_LSB__MSK (0xFF) 1446 #define BMI160_USER_DATA_8_GYRO_X_LSB__REG (BMI160_USER_DATA_8_ADDR) 1449 #define BMI160_USER_DATA_9_GYRO_X_MSB__POS (0) 1450 #define BMI160_USER_DATA_9_GYRO_X_MSB__LEN (8) 1451 #define BMI160_USER_DATA_9_GYRO_X_MSB__MSK (0xFF) 1452 #define BMI160_USER_DATA_9_GYRO_X_MSB__REG (BMI160_USER_DATA_9_ADDR) 1455 #define BMI160_USER_DATA_10_GYRO_Y_LSB__POS (0) 1456 #define BMI160_USER_DATA_10_GYRO_Y_LSB__LEN (8) 1457 #define BMI160_USER_DATA_10_GYRO_Y_LSB__MSK (0xFF) 1458 #define BMI160_USER_DATA_10_GYRO_Y_LSB__REG (BMI160_USER_DATA_10_ADDR) 1461 #define BMI160_USER_DATA_11_GYRO_Y_MSB__POS (0) 1462 #define BMI160_USER_DATA_11_GYRO_Y_MSB__LEN (8) 1463 #define BMI160_USER_DATA_11_GYRO_Y_MSB__MSK (0xFF) 1464 #define BMI160_USER_DATA_11_GYRO_Y_MSB__REG (BMI160_USER_DATA_11_ADDR) 1467 #define BMI160_USER_DATA_12_GYRO_Z_LSB__POS (0) 1468 #define BMI160_USER_DATA_12_GYRO_Z_LSB__LEN (8) 1469 #define BMI160_USER_DATA_12_GYRO_Z_LSB__MSK (0xFF) 1470 #define BMI160_USER_DATA_12_GYRO_Z_LSB__REG (BMI160_USER_DATA_12_ADDR) 1473 #define BMI160_USER_DATA_13_GYRO_Z_MSB__POS (0) 1474 #define BMI160_USER_DATA_13_GYRO_Z_MSB__LEN (8) 1475 #define BMI160_USER_DATA_13_GYRO_Z_MSB__MSK (0xFF) 1476 #define BMI160_USER_DATA_13_GYRO_Z_MSB__REG (BMI160_USER_DATA_13_ADDR) 1481 #define BMI160_USER_DATA_14_ACCEL_X_LSB__POS (0) 1482 #define BMI160_USER_DATA_14_ACCEL_X_LSB__LEN (8) 1483 #define BMI160_USER_DATA_14_ACCEL_X_LSB__MSK (0xFF) 1484 #define BMI160_USER_DATA_14_ACCEL_X_LSB__REG (BMI160_USER_DATA_14_ADDR) 1487 #define BMI160_USER_DATA_15_ACCEL_X_MSB__POS (0) 1488 #define BMI160_USER_DATA_15_ACCEL_X_MSB__LEN (8) 1489 #define BMI160_USER_DATA_15_ACCEL_X_MSB__MSK (0xFF) 1490 #define BMI160_USER_DATA_15_ACCEL_X_MSB__REG (BMI160_USER_DATA_15_ADDR) 1493 #define BMI160_USER_DATA_16_ACCEL_Y_LSB__POS (0) 1494 #define BMI160_USER_DATA_16_ACCEL_Y_LSB__LEN (8) 1495 #define BMI160_USER_DATA_16_ACCEL_Y_LSB__MSK (0xFF) 1496 #define BMI160_USER_DATA_16_ACCEL_Y_LSB__REG (BMI160_USER_DATA_16_ADDR) 1499 #define BMI160_USER_DATA_17_ACCEL_Y_MSB__POS (0) 1500 #define BMI160_USER_DATA_17_ACCEL_Y_MSB__LEN (8) 1501 #define BMI160_USER_DATA_17_ACCEL_Y_MSB__MSK (0xFF) 1502 #define BMI160_USER_DATA_17_ACCEL_Y_MSB__REG (BMI160_USER_DATA_17_ADDR) 1505 #define BMI160_USER_DATA_18_ACCEL_Z_LSB__POS (0) 1506 #define BMI160_USER_DATA_18_ACCEL_Z_LSB__LEN (8) 1507 #define BMI160_USER_DATA_18_ACCEL_Z_LSB__MSK (0xFF) 1508 #define BMI160_USER_DATA_18_ACCEL_Z_LSB__REG (BMI160_USER_DATA_18_ADDR) 1511 #define BMI160_USER_DATA_19_ACCEL_Z_MSB__POS (0) 1512 #define BMI160_USER_DATA_19_ACCEL_Z_MSB__LEN (8) 1513 #define BMI160_USER_DATA_19_ACCEL_Z_MSB__MSK (0xFF) 1514 #define BMI160_USER_DATA_19_ACCEL_Z_MSB__REG (BMI160_USER_DATA_19_ADDR) 1519 #define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__POS (0) 1520 #define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__LEN (8) 1521 #define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__MSK (0xFF) 1522 #define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__REG \ 1523 (BMI160_USER_SENSORTIME_0_ADDR) 1526 #define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__POS (0) 1527 #define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__LEN (8) 1528 #define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__MSK (0xFF) 1529 #define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__REG \ 1530 (BMI160_USER_SENSORTIME_1_ADDR) 1533 #define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__POS (0) 1534 #define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__LEN (8) 1535 #define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__MSK (0xFF) 1536 #define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__REG \ 1537 (BMI160_USER_SENSORTIME_2_ADDR) 1542 #define BMI160_USER_STAT_GYRO_SELFTEST_OK__POS (1) 1543 #define BMI160_USER_STAT_GYRO_SELFTEST_OK__LEN (1) 1544 #define BMI160_USER_STAT_GYRO_SELFTEST_OK__MSK (0x02) 1545 #define BMI160_USER_STAT_GYRO_SELFTEST_OK__REG \ 1546 (BMI160_USER_STAT_ADDR) 1551 #define BMI160_USER_STAT_MAG_MANUAL_OPERATION__POS (2) 1552 #define BMI160_USER_STAT_MAG_MANUAL_OPERATION__LEN (1) 1553 #define BMI160_USER_STAT_MAG_MANUAL_OPERATION__MSK (0x04) 1554 #define BMI160_USER_STAT_MAG_MANUAL_OPERATION__REG \ 1555 (BMI160_USER_STAT_ADDR) 1560 #define BMI160_USER_STAT_FOC_RDY__POS (3) 1561 #define BMI160_USER_STAT_FOC_RDY__LEN (1) 1562 #define BMI160_USER_STAT_FOC_RDY__MSK (0x08) 1563 #define BMI160_USER_STAT_FOC_RDY__REG (BMI160_USER_STAT_ADDR) 1568 #define BMI160_USER_STAT_NVM_RDY__POS (4) 1569 #define BMI160_USER_STAT_NVM_RDY__LEN (1) 1570 #define BMI160_USER_STAT_NVM_RDY__MSK (0x10) 1571 #define BMI160_USER_STAT_NVM_RDY__REG (BMI160_USER_STAT_ADDR) 1576 #define BMI160_USER_STAT_DATA_RDY_MAG__POS (5) 1577 #define BMI160_USER_STAT_DATA_RDY_MAG__LEN (1) 1578 #define BMI160_USER_STAT_DATA_RDY_MAG__MSK (0x20) 1579 #define BMI160_USER_STAT_DATA_RDY_MAG__REG (BMI160_USER_STAT_ADDR) 1582 #define BMI160_USER_STAT_DATA_RDY_GYRO__POS (6) 1583 #define BMI160_USER_STAT_DATA_RDY_GYRO__LEN (1) 1584 #define BMI160_USER_STAT_DATA_RDY_GYRO__MSK (0x40) 1585 #define BMI160_USER_STAT_DATA_RDY_GYRO__REG (BMI160_USER_STAT_ADDR) 1588 #define BMI160_USER_STAT_DATA_RDY_ACCEL__POS (7) 1589 #define BMI160_USER_STAT_DATA_RDY_ACCEL__LEN (1) 1590 #define BMI160_USER_STAT_DATA_RDY_ACCEL__MSK (0x80) 1591 #define BMI160_USER_STAT_DATA_RDY_ACCEL__REG (BMI160_USER_STAT_ADDR) 1596 #define BMI160_USER_INTR_STAT_0_STEP_INTR__POS (0) 1597 #define BMI160_USER_INTR_STAT_0_STEP_INTR__LEN (1) 1598 #define BMI160_USER_INTR_STAT_0_STEP_INTR__MSK (0x01) 1599 #define BMI160_USER_INTR_STAT_0_STEP_INTR__REG \ 1600 (BMI160_USER_INTR_STAT_0_ADDR) 1605 #define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__POS (1) 1606 #define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__LEN (1) 1607 #define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__MSK (0x02) 1608 #define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__REG \ 1609 (BMI160_USER_INTR_STAT_0_ADDR) 1614 #define BMI160_USER_INTR_STAT_0_ANY_MOTION__POS (2) 1615 #define BMI160_USER_INTR_STAT_0_ANY_MOTION__LEN (1) 1616 #define BMI160_USER_INTR_STAT_0_ANY_MOTION__MSK (0x04) 1617 #define BMI160_USER_INTR_STAT_0_ANY_MOTION__REG \ 1618 (BMI160_USER_INTR_STAT_0_ADDR) 1623 #define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__POS 3 1624 #define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__LEN (1) 1625 #define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__MSK (0x08) 1626 #define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__REG \ 1627 (BMI160_USER_INTR_STAT_0_ADDR) 1632 #define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__POS 4 1633 #define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__LEN (1) 1634 #define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__MSK (0x10) 1635 #define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__REG \ 1636 (BMI160_USER_INTR_STAT_0_ADDR) 1641 #define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__POS 5 1642 #define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__LEN (1) 1643 #define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__MSK (0x20) 1644 #define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__REG \ 1645 (BMI160_USER_INTR_STAT_0_ADDR) 1650 #define BMI160_USER_INTR_STAT_0_ORIENT__POS (6) 1651 #define BMI160_USER_INTR_STAT_0_ORIENT__LEN (1) 1652 #define BMI160_USER_INTR_STAT_0_ORIENT__MSK (0x40) 1653 #define BMI160_USER_INTR_STAT_0_ORIENT__REG \ 1654 (BMI160_USER_INTR_STAT_0_ADDR) 1659 #define BMI160_USER_INTR_STAT_0_FLAT__POS (7) 1660 #define BMI160_USER_INTR_STAT_0_FLAT__LEN (1) 1661 #define BMI160_USER_INTR_STAT_0_FLAT__MSK (0x80) 1662 #define BMI160_USER_INTR_STAT_0_FLAT__REG \ 1663 (BMI160_USER_INTR_STAT_0_ADDR) 1668 #define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__POS (2) 1669 #define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__LEN (1) 1670 #define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__MSK (0x04) 1671 #define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__REG \ 1672 (BMI160_USER_INTR_STAT_1_ADDR) 1677 #define BMI160_USER_INTR_STAT_1_LOW_G_INTR__POS (3) 1678 #define BMI160_USER_INTR_STAT_1_LOW_G_INTR__LEN (1) 1679 #define BMI160_USER_INTR_STAT_1_LOW_G_INTR__MSK (0x08) 1680 #define BMI160_USER_INTR_STAT_1_LOW_G_INTR__REG \ 1681 (BMI160_USER_INTR_STAT_1_ADDR) 1686 #define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__POS (4) 1687 #define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__LEN (1) 1688 #define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__MSK (0x10) 1689 #define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__REG \ 1690 (BMI160_USER_INTR_STAT_1_ADDR) 1695 #define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__POS (5) 1696 #define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__LEN (1) 1697 #define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__MSK (0x20) 1698 #define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__REG \ 1699 (BMI160_USER_INTR_STAT_1_ADDR) 1704 #define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__POS (6) 1705 #define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__LEN (1) 1706 #define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__MSK (0x40) 1707 #define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__REG \ 1708 (BMI160_USER_INTR_STAT_1_ADDR) 1713 #define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__POS (7) 1714 #define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__LEN (1) 1715 #define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__MSK (0x80) 1716 #define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__REG \ 1717 (BMI160_USER_INTR_STAT_1_ADDR) 1722 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__POS (0) 1723 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__LEN (1) 1724 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__MSK (0x01) 1725 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__REG \ 1726 (BMI160_USER_INTR_STAT_2_ADDR) 1729 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__POS (1) 1730 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__LEN (1) 1731 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__MSK (0x02) 1732 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__REG \ 1733 (BMI160_USER_INTR_STAT_2_ADDR) 1736 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__POS (2) 1737 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__LEN (1) 1738 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__MSK (0x04) 1739 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__REG \ 1740 (BMI160_USER_INTR_STAT_2_ADDR) 1745 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__POS (3) 1746 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__LEN (1) 1747 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__MSK (0x08) 1748 #define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__REG \ 1749 (BMI160_USER_INTR_STAT_2_ADDR) 1754 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__POS (4) 1755 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__LEN (1) 1756 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__MSK (0x10) 1757 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__REG \ 1758 (BMI160_USER_INTR_STAT_2_ADDR) 1761 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__POS (5) 1762 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__LEN (1) 1763 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__MSK (0x20) 1764 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__REG \ 1765 (BMI160_USER_INTR_STAT_2_ADDR) 1768 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__POS (6) 1769 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__LEN (1) 1770 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__MSK (0x40) 1771 #define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__REG \ 1772 (BMI160_USER_INTR_STAT_2_ADDR) 1775 #define BMI160_USER_INTR_STAT_2_TAP_SIGN__POS (7) 1776 #define BMI160_USER_INTR_STAT_2_TAP_SIGN__LEN (1) 1777 #define BMI160_USER_INTR_STAT_2_TAP_SIGN__MSK (0x80) 1778 #define BMI160_USER_INTR_STAT_2_TAP_SIGN__REG \ 1779 (BMI160_USER_INTR_STAT_2_ADDR) 1784 #define BMI160_USER_INTR_STAT_2__POS (0) 1785 #define BMI160_USER_INTR_STAT_2__LEN (8) 1786 #define BMI160_USER_INTR_STAT_2__MSK (0xFF) 1787 #define BMI160_USER_INTR_STAT_2__REG \ 1788 (BMI160_USER_INTR_STAT_2_ADDR) 1793 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__POS (0) 1794 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__LEN (1) 1795 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__MSK (0x01) 1796 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__REG \ 1797 (BMI160_USER_INTR_STAT_3_ADDR) 1800 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__POS (1) 1801 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__LEN (1) 1802 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__MSK (0x02) 1803 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__REG \ 1804 (BMI160_USER_INTR_STAT_3_ADDR) 1807 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__POS (2) 1808 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__LEN (1) 1809 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__MSK (0x04) 1810 #define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__REG \ 1811 (BMI160_USER_INTR_STAT_3_ADDR) 1814 #define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__POS (3) 1815 #define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__LEN (1) 1816 #define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__MSK (0x08) 1817 #define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__REG \ 1818 (BMI160_USER_INTR_STAT_3_ADDR) 1823 #define BMI160_USER_INTR_STAT_3_ORIENT_XY__POS (4) 1824 #define BMI160_USER_INTR_STAT_3_ORIENT_XY__LEN (2) 1825 #define BMI160_USER_INTR_STAT_3_ORIENT_XY__MSK (0x30) 1826 #define BMI160_USER_INTR_STAT_3_ORIENT_XY__REG \ 1827 (BMI160_USER_INTR_STAT_3_ADDR) 1830 #define BMI160_USER_INTR_STAT_3_ORIENT_Z__POS (6) 1831 #define BMI160_USER_INTR_STAT_3_ORIENT_Z__LEN (1) 1832 #define BMI160_USER_INTR_STAT_3_ORIENT_Z__MSK (0x40) 1833 #define BMI160_USER_INTR_STAT_3_ORIENT_Z__REG \ 1834 (BMI160_USER_INTR_STAT_3_ADDR) 1839 #define BMI160_USER_INTR_STAT_3_FLAT__POS (7) 1840 #define BMI160_USER_INTR_STAT_3_FLAT__LEN (1) 1841 #define BMI160_USER_INTR_STAT_3_FLAT__MSK (0x80) 1842 #define BMI160_USER_INTR_STAT_3_FLAT__REG \ 1843 (BMI160_USER_INTR_STAT_3_ADDR) 1848 #define BMI160_USER_INTR_STAT_3__POS (0) 1849 #define BMI160_USER_INTR_STAT_3__LEN (8) 1850 #define BMI160_USER_INTR_STAT_3__MSK (0xFF) 1851 #define BMI160_USER_INTR_STAT_3__REG \ 1852 (BMI160_USER_INTR_STAT_3_ADDR) 1857 #define BMI160_USER_TEMP_LSB_VALUE__POS (0) 1858 #define BMI160_USER_TEMP_LSB_VALUE__LEN (8) 1859 #define BMI160_USER_TEMP_LSB_VALUE__MSK (0xFF) 1860 #define BMI160_USER_TEMP_LSB_VALUE__REG \ 1861 (BMI160_USER_TEMPERATURE_0_ADDR) 1864 #define BMI160_USER_TEMP_MSB_VALUE__POS (0) 1865 #define BMI160_USER_TEMP_MSB_VALUE__LEN (8) 1866 #define BMI160_USER_TEMP_MSB_VALUE__MSK (0xFF) 1867 #define BMI160_USER_TEMP_MSB_VALUE__REG \ 1868 (BMI160_USER_TEMPERATURE_1_ADDR) 1875 #define BMI160_USER_FIFO_BYTE_COUNTER_LSB__POS (0) 1876 #define BMI160_USER_FIFO_BYTE_COUNTER_LSB__LEN (8) 1877 #define BMI160_USER_FIFO_BYTE_COUNTER_LSB__MSK (0xFF) 1878 #define BMI160_USER_FIFO_BYTE_COUNTER_LSB__REG \ 1879 (BMI160_USER_FIFO_LENGTH_0_ADDR) 1882 #define BMI160_USER_FIFO_BYTE_COUNTER_MSB__POS (0) 1883 #define BMI160_USER_FIFO_BYTE_COUNTER_MSB__LEN 3 1884 #define BMI160_USER_FIFO_BYTE_COUNTER_MSB__MSK (0x07) 1885 #define BMI160_USER_FIFO_BYTE_COUNTER_MSB__REG \ 1886 (BMI160_USER_FIFO_LENGTH_1_ADDR) 1892 #define BMI160_USER_FIFO_DATA__POS (0) 1893 #define BMI160_USER_FIFO_DATA__LEN (8) 1894 #define BMI160_USER_FIFO_DATA__MSK (0xFF) 1895 #define BMI160_USER_FIFO_DATA__REG (BMI160_USER_FIFO_DATA_ADDR) 1901 #define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__POS (0) 1902 #define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__LEN (4) 1903 #define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__MSK (0x0F) 1904 #define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__REG \ 1905 (BMI160_USER_ACCEL_CONFIG_ADDR) 1908 #define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__POS (4) 1909 #define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__LEN (3) 1910 #define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__MSK (0x70) 1911 #define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__REG (BMI160_USER_ACCEL_CONFIG_ADDR) 1914 #define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__POS (7) 1915 #define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__LEN (1) 1916 #define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__MSK (0x80) 1917 #define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__REG \ 1918 (BMI160_USER_ACCEL_CONFIG_ADDR) 1921 #define BMI160_USER_ACCEL_RANGE__POS (0) 1922 #define BMI160_USER_ACCEL_RANGE__LEN (4) 1923 #define BMI160_USER_ACCEL_RANGE__MSK (0x0F) 1924 #define BMI160_USER_ACCEL_RANGE__REG \ 1925 (BMI160_USER_ACCEL_RANGE_ADDR) 1930 #define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__POS (0) 1931 #define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__LEN (4) 1932 #define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__MSK (0x0F) 1933 #define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__REG \ 1934 (BMI160_USER_GYRO_CONFIG_ADDR) 1937 #define BMI160_USER_GYRO_CONFIG_BW__POS (4) 1938 #define BMI160_USER_GYRO_CONFIG_BW__LEN (2) 1939 #define BMI160_USER_GYRO_CONFIG_BW__MSK (0x30) 1940 #define BMI160_USER_GYRO_CONFIG_BW__REG \ 1941 (BMI160_USER_GYRO_CONFIG_ADDR) 1944 #define BMI160_USER_GYRO_RANGE__POS (0) 1945 #define BMI160_USER_GYRO_RANGE__LEN (3) 1946 #define BMI160_USER_GYRO_RANGE__MSK (0x07) 1947 #define BMI160_USER_GYRO_RANGE__REG (BMI160_USER_GYRO_RANGE_ADDR) 1952 #define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__POS (0) 1953 #define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__LEN (4) 1954 #define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__MSK (0x0F) 1955 #define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__REG \ 1956 (BMI160_USER_MAG_CONFIG_ADDR) 1963 #define BMI160_USER_FIFO_DOWN_GYRO__POS (0) 1964 #define BMI160_USER_FIFO_DOWN_GYRO__LEN (3) 1965 #define BMI160_USER_FIFO_DOWN_GYRO__MSK (0x07) 1966 #define BMI160_USER_FIFO_DOWN_GYRO__REG (BMI160_USER_FIFO_DOWN_ADDR) 1971 #define BMI160_USER_FIFO_FILTER_GYRO__POS (3) 1972 #define BMI160_USER_FIFO_FILTER_GYRO__LEN (1) 1973 #define BMI160_USER_FIFO_FILTER_GYRO__MSK (0x08) 1974 #define BMI160_USER_FIFO_FILTER_GYRO__REG (BMI160_USER_FIFO_DOWN_ADDR) 1977 #define BMI160_USER_FIFO_DOWN_ACCEL__POS (4) 1978 #define BMI160_USER_FIFO_DOWN_ACCEL__LEN (3) 1979 #define BMI160_USER_FIFO_DOWN_ACCEL__MSK (0x70) 1980 #define BMI160_USER_FIFO_DOWN_ACCEL__REG (BMI160_USER_FIFO_DOWN_ADDR) 1983 #define BMI160_USER_FIFO_FILTER_ACCEL__POS (7) 1984 #define BMI160_USER_FIFO_FILTER_ACCEL__LEN (1) 1985 #define BMI160_USER_FIFO_FILTER_ACCEL__MSK (0x80) 1986 #define BMI160_USER_FIFO_FILTER_ACCEL__REG (BMI160_USER_FIFO_DOWN_ADDR) 1991 #define BMI160_USER_FIFO_WM__POS (0) 1992 #define BMI160_USER_FIFO_WM__LEN (8) 1993 #define BMI160_USER_FIFO_WM__MSK (0xFF) 1994 #define BMI160_USER_FIFO_WM__REG (BMI160_USER_FIFO_CONFIG_0_ADDR) 1999 #define BMI160_USER_FIFO_TIME_ENABLE__POS (1) 2000 #define BMI160_USER_FIFO_TIME_ENABLE__LEN (1) 2001 #define BMI160_USER_FIFO_TIME_ENABLE__MSK (0x02) 2002 #define BMI160_USER_FIFO_TIME_ENABLE__REG (BMI160_USER_FIFO_CONFIG_1_ADDR) 2007 #define BMI160_USER_FIFO_TAG_INTR2_ENABLE__POS (2) 2008 #define BMI160_USER_FIFO_TAG_INTR2_ENABLE__LEN (1) 2009 #define BMI160_USER_FIFO_TAG_INTR2_ENABLE__MSK (0x04) 2010 #define BMI160_USER_FIFO_TAG_INTR2_ENABLE__REG (BMI160_USER_FIFO_CONFIG_1_ADDR) 2013 #define BMI160_USER_FIFO_TAG_INTR1_ENABLE__POS (3) 2014 #define BMI160_USER_FIFO_TAG_INTR1_ENABLE__LEN (1) 2015 #define BMI160_USER_FIFO_TAG_INTR1_ENABLE__MSK (0x08) 2016 #define BMI160_USER_FIFO_TAG_INTR1_ENABLE__REG (BMI160_USER_FIFO_CONFIG_1_ADDR) 2021 #define BMI160_USER_FIFO_HEADER_ENABLE__POS (4) 2022 #define BMI160_USER_FIFO_HEADER_ENABLE__LEN (1) 2023 #define BMI160_USER_FIFO_HEADER_ENABLE__MSK (0x10) 2024 #define BMI160_USER_FIFO_HEADER_ENABLE__REG \ 2025 (BMI160_USER_FIFO_CONFIG_1_ADDR) 2030 #define BMI160_USER_FIFO_MAG_ENABLE__POS (5) 2031 #define BMI160_USER_FIFO_MAG_ENABLE__LEN (1) 2032 #define BMI160_USER_FIFO_MAG_ENABLE__MSK (0x20) 2033 #define BMI160_USER_FIFO_MAG_ENABLE__REG \ 2034 (BMI160_USER_FIFO_CONFIG_1_ADDR) 2039 #define BMI160_USER_FIFO_ACCEL_ENABLE__POS (6) 2040 #define BMI160_USER_FIFO_ACCEL_ENABLE__LEN (1) 2041 #define BMI160_USER_FIFO_ACCEL_ENABLE__MSK (0x40) 2042 #define BMI160_USER_FIFO_ACCEL_ENABLE__REG \ 2043 (BMI160_USER_FIFO_CONFIG_1_ADDR) 2048 #define BMI160_USER_FIFO_GYRO_ENABLE__POS (7) 2049 #define BMI160_USER_FIFO_GYRO_ENABLE__LEN (1) 2050 #define BMI160_USER_FIFO_GYRO_ENABLE__MSK (0x80) 2051 #define BMI160_USER_FIFO_GYRO_ENABLE__REG \ 2052 (BMI160_USER_FIFO_CONFIG_1_ADDR) 2059 #define BMI160_USER_I2C_DEVICE_ADDR__POS (1) 2060 #define BMI160_USER_I2C_DEVICE_ADDR__LEN (7) 2061 #define BMI160_USER_I2C_DEVICE_ADDR__MSK (0xFE) 2062 #define BMI160_USER_I2C_DEVICE_ADDR__REG (BMI160_USER_MAG_IF_0_ADDR) 2068 #define BMI160_USER_MAG_BURST__POS (0) 2069 #define BMI160_USER_MAG_BURST__LEN (2) 2070 #define BMI160_USER_MAG_BURST__MSK (0x03) 2071 #define BMI160_USER_MAG_BURST__REG (BMI160_USER_MAG_IF_1_ADDR) 2074 #define BMI160_USER_MAG_OFFSET__POS (2) 2075 #define BMI160_USER_MAG_OFFSET__LEN (4) 2076 #define BMI160_USER_MAG_OFFSET__MSK (0x3C) 2077 #define BMI160_USER_MAG_OFFSET__REG (BMI160_USER_MAG_IF_1_ADDR) 2080 #define BMI160_USER_MAG_MANUAL_ENABLE__POS (7) 2081 #define BMI160_USER_MAG_MANUAL_ENABLE__LEN (1) 2082 #define BMI160_USER_MAG_MANUAL_ENABLE__MSK (0x80) 2083 #define BMI160_USER_MAG_MANUAL_ENABLE__REG \ 2084 (BMI160_USER_MAG_IF_1_ADDR) 2087 #define BMI160_USER_READ_ADDR__POS (0) 2088 #define BMI160_USER_READ_ADDR__LEN (8) 2089 #define BMI160_USER_READ_ADDR__MSK (0xFF) 2090 #define BMI160_USER_READ_ADDR__REG (BMI160_USER_MAG_IF_2_ADDR) 2093 #define BMI160_USER_WRITE_ADDR__POS (0) 2094 #define BMI160_USER_WRITE_ADDR__LEN (8) 2095 #define BMI160_USER_WRITE_ADDR__MSK (0xFF) 2096 #define BMI160_USER_WRITE_ADDR__REG (BMI160_USER_MAG_IF_3_ADDR) 2099 #define BMI160_USER_WRITE_DATA__POS (0) 2100 #define BMI160_USER_WRITE_DATA__LEN (8) 2101 #define BMI160_USER_WRITE_DATA__MSK (0xFF) 2102 #define BMI160_USER_WRITE_DATA__REG (BMI160_USER_MAG_IF_4_ADDR) 2107 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__POS (0) 2108 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__LEN (1) 2109 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__MSK (0x01) 2110 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__REG \ 2111 (BMI160_USER_INTR_ENABLE_0_ADDR) 2114 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__POS (1) 2115 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__LEN (1) 2116 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__MSK (0x02) 2117 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__REG \ 2118 (BMI160_USER_INTR_ENABLE_0_ADDR) 2121 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__POS (2) 2122 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__LEN (1) 2123 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__MSK (0x04) 2124 #define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__REG \ 2125 (BMI160_USER_INTR_ENABLE_0_ADDR) 2130 #define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__POS (4) 2131 #define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__LEN (1) 2132 #define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__MSK (0x10) 2133 #define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__REG \ 2134 (BMI160_USER_INTR_ENABLE_0_ADDR) 2139 #define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__POS (5) 2140 #define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__LEN (1) 2141 #define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__MSK (0x20) 2142 #define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__REG \ 2143 (BMI160_USER_INTR_ENABLE_0_ADDR) 2148 #define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__POS (6) 2149 #define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__LEN (1) 2150 #define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__MSK (0x40) 2151 #define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__REG \ 2152 (BMI160_USER_INTR_ENABLE_0_ADDR) 2157 #define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__POS (7) 2158 #define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__LEN (1) 2159 #define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__MSK (0x80) 2160 #define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__REG \ 2161 (BMI160_USER_INTR_ENABLE_0_ADDR) 2166 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__POS (0) 2167 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__LEN (1) 2168 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__MSK (0x01) 2169 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__REG \ 2170 (BMI160_USER_INTR_ENABLE_1_ADDR) 2173 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__POS (1) 2174 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__LEN (1) 2175 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__MSK (0x02) 2176 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__REG \ 2177 (BMI160_USER_INTR_ENABLE_1_ADDR) 2180 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__POS (2) 2181 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__LEN (1) 2182 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__MSK (0x04) 2183 #define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__REG \ 2184 (BMI160_USER_INTR_ENABLE_1_ADDR) 2189 #define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__POS (3) 2190 #define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__LEN (1) 2191 #define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__MSK (0x08) 2192 #define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG \ 2193 (BMI160_USER_INTR_ENABLE_1_ADDR) 2198 #define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__POS (4) 2199 #define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__LEN (1) 2200 #define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__MSK (0x10) 2201 #define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__REG \ 2202 (BMI160_USER_INTR_ENABLE_1_ADDR) 2209 #define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__POS (5) 2210 #define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__LEN (1) 2211 #define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__MSK (0x20) 2212 #define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__REG \ 2213 (BMI160_USER_INTR_ENABLE_1_ADDR) 2216 #define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__POS (6) 2217 #define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__LEN (1) 2218 #define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__MSK (0x40) 2219 #define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__REG \ 2220 (BMI160_USER_INTR_ENABLE_1_ADDR) 2226 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__POS (0) 2227 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__LEN (1) 2228 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__MSK (0x01) 2229 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__REG \ 2230 (BMI160_USER_INTR_ENABLE_2_ADDR) 2233 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__POS (1) 2234 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__LEN (1) 2235 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__MSK (0x02) 2236 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__REG \ 2237 (BMI160_USER_INTR_ENABLE_2_ADDR) 2240 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__POS (2) 2241 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__LEN (1) 2242 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__MSK (0x04) 2243 #define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__REG \ 2244 (BMI160_USER_INTR_ENABLE_2_ADDR) 2249 #define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__POS (3) 2250 #define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__LEN (1) 2251 #define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__MSK (0x08) 2252 #define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__REG \ 2253 (BMI160_USER_INTR_ENABLE_2_ADDR) 2258 #define BMI160_USER_INTR1_EDGE_CTRL__POS (0) 2259 #define BMI160_USER_INTR1_EDGE_CTRL__LEN (1) 2260 #define BMI160_USER_INTR1_EDGE_CTRL__MSK (0x01) 2261 #define BMI160_USER_INTR1_EDGE_CTRL__REG \ 2262 (BMI160_USER_INTR_OUT_CTRL_ADDR) 2267 #define BMI160_USER_INTR1_LEVEL__POS (1) 2268 #define BMI160_USER_INTR1_LEVEL__LEN (1) 2269 #define BMI160_USER_INTR1_LEVEL__MSK (0x02) 2270 #define BMI160_USER_INTR1_LEVEL__REG \ 2271 (BMI160_USER_INTR_OUT_CTRL_ADDR) 2276 #define BMI160_USER_INTR1_OUTPUT_TYPE__POS (2) 2277 #define BMI160_USER_INTR1_OUTPUT_TYPE__LEN (1) 2278 #define BMI160_USER_INTR1_OUTPUT_TYPE__MSK (0x04) 2279 #define BMI160_USER_INTR1_OUTPUT_TYPE__REG \ 2280 (BMI160_USER_INTR_OUT_CTRL_ADDR) 2285 #define BMI160_USER_INTR1_OUTPUT_ENABLE__POS (3) 2286 #define BMI160_USER_INTR1_OUTPUT_ENABLE__LEN (1) 2287 #define BMI160_USER_INTR1_OUTPUT_ENABLE__MSK (0x08) 2288 #define BMI160_USER_INTR1_OUTPUT_ENABLE__REG \ 2289 (BMI160_USER_INTR_OUT_CTRL_ADDR) 2294 #define BMI160_USER_INTR2_EDGE_CTRL__POS (4) 2295 #define BMI160_USER_INTR2_EDGE_CTRL__LEN (1) 2296 #define BMI160_USER_INTR2_EDGE_CTRL__MSK (0x10) 2297 #define BMI160_USER_INTR2_EDGE_CTRL__REG \ 2298 (BMI160_USER_INTR_OUT_CTRL_ADDR) 2303 #define BMI160_USER_INTR2_LEVEL__POS (5) 2304 #define BMI160_USER_INTR2_LEVEL__LEN (1) 2305 #define BMI160_USER_INTR2_LEVEL__MSK (0x20) 2306 #define BMI160_USER_INTR2_LEVEL__REG \ 2307 (BMI160_USER_INTR_OUT_CTRL_ADDR) 2312 #define BMI160_USER_INTR2_OUTPUT_TYPE__POS (6) 2313 #define BMI160_USER_INTR2_OUTPUT_TYPE__LEN (1) 2314 #define BMI160_USER_INTR2_OUTPUT_TYPE__MSK (0x40) 2315 #define BMI160_USER_INTR2_OUTPUT_TYPE__REG \ 2316 (BMI160_USER_INTR_OUT_CTRL_ADDR) 2319 #define BMI160_USER_INTR2_OUTPUT_EN__POS (7) 2320 #define BMI160_USER_INTR2_OUTPUT_EN__LEN (1) 2321 #define BMI160_USER_INTR2_OUTPUT_EN__MSK (0x80) 2322 #define BMI160_USER_INTR2_OUTPUT_EN__REG \ 2323 (BMI160_USER_INTR_OUT_CTRL_ADDR) 2328 #define BMI160_USER_INTR_LATCH__POS (0) 2329 #define BMI160_USER_INTR_LATCH__LEN (4) 2330 #define BMI160_USER_INTR_LATCH__MSK (0x0F) 2331 #define BMI160_USER_INTR_LATCH__REG (BMI160_USER_INTR_LATCH_ADDR) 2336 #define BMI160_USER_INTR1_INPUT_ENABLE__POS (4) 2337 #define BMI160_USER_INTR1_INPUT_ENABLE__LEN (1) 2338 #define BMI160_USER_INTR1_INPUT_ENABLE__MSK (0x10) 2339 #define BMI160_USER_INTR1_INPUT_ENABLE__REG \ 2340 (BMI160_USER_INTR_LATCH_ADDR) 2343 #define BMI160_USER_INTR2_INPUT_ENABLE__POS (5) 2344 #define BMI160_USER_INTR2_INPUT_ENABLE__LEN (1) 2345 #define BMI160_USER_INTR2_INPUT_ENABLE__MSK (0x20) 2346 #define BMI160_USER_INTR2_INPUT_ENABLE__REG \ 2347 (BMI160_USER_INTR_LATCH_ADDR) 2352 #define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__POS (0) 2353 #define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__LEN (1) 2354 #define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__MSK (0x01) 2355 #define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__REG (BMI160_USER_INTR_MAP_0_ADDR) 2360 #define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__POS (1) 2361 #define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__LEN (1) 2362 #define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__MSK (0x02) 2363 #define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__REG \ 2364 (BMI160_USER_INTR_MAP_0_ADDR) 2369 #define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__POS (2) 2370 #define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__LEN (1) 2371 #define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__MSK (0x04) 2372 #define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__REG \ 2373 (BMI160_USER_INTR_MAP_0_ADDR) 2378 #define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__POS (3) 2379 #define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__LEN (1) 2380 #define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__MSK (0x08) 2381 #define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__REG (BMI160_USER_INTR_MAP_0_ADDR) 2386 #define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__POS (4) 2387 #define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__LEN (1) 2388 #define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__MSK (0x10) 2389 #define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__REG \ 2390 (BMI160_USER_INTR_MAP_0_ADDR) 2395 #define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__POS (5) 2396 #define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__LEN (1) 2397 #define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__MSK (0x20) 2398 #define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__REG \ 2399 (BMI160_USER_INTR_MAP_0_ADDR) 2404 #define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__POS (6) 2405 #define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__LEN (1) 2406 #define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__MSK (0x40) 2407 #define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__REG \ 2408 (BMI160_USER_INTR_MAP_0_ADDR) 2413 #define BMI160_USER_INTR_MAP_0_INTR1_FLAT__POS (7) 2414 #define BMI160_USER_INTR_MAP_0_INTR1_FLAT__LEN (1) 2415 #define BMI160_USER_INTR_MAP_0_INTR1_FLAT__MSK (0x80) 2416 #define BMI160_USER_INTR_MAP_0_INTR1_FLAT__REG (BMI160_USER_INTR_MAP_0_ADDR) 2421 #define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__POS (0) 2422 #define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__LEN (1) 2423 #define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__MSK (0x01) 2424 #define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__REG (BMI160_USER_INTR_MAP_1_ADDR) 2433 #define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__POS (1) 2434 #define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__LEN (1) 2435 #define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__MSK (0x02) 2436 #define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__REG \ 2437 (BMI160_USER_INTR_MAP_1_ADDR) 2440 #define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__POS (2) 2441 #define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__LEN (1) 2442 #define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__MSK (0x04) 2443 #define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__REG \ 2444 (BMI160_USER_INTR_MAP_1_ADDR) 2450 #define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__POS (3) 2451 #define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__LEN (1) 2452 #define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__MSK (0x08) 2453 #define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__REG \ 2454 (BMI160_USER_INTR_MAP_1_ADDR) 2459 #define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__POS (4) 2460 #define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__LEN (1) 2461 #define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__MSK (0x10) 2462 #define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__REG (BMI160_USER_INTR_MAP_1_ADDR) 2468 #define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__POS (5) 2469 #define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__LEN (1) 2470 #define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__MSK (0x20) 2471 #define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__REG \ 2472 (BMI160_USER_INTR_MAP_1_ADDR) 2475 #define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__POS (6) 2476 #define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__LEN (1) 2477 #define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__MSK (0x40) 2478 #define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__REG \ 2479 (BMI160_USER_INTR_MAP_1_ADDR) 2484 #define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__POS (7) 2485 #define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__LEN (1) 2486 #define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__MSK (0x80) 2487 #define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__REG \ 2488 (BMI160_USER_INTR_MAP_1_ADDR) 2493 #define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__POS (0) 2494 #define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__LEN (1) 2495 #define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__MSK (0x01) 2496 #define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__REG (BMI160_USER_INTR_MAP_2_ADDR) 2501 #define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__POS (1) 2502 #define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__LEN (1) 2503 #define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__MSK (0x02) 2504 #define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__REG \ 2505 (BMI160_USER_INTR_MAP_2_ADDR) 2510 #define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__POS (2) 2511 #define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__LEN (1) 2512 #define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__MSK (0x04) 2513 #define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__REG \ 2514 (BMI160_USER_INTR_MAP_2_ADDR) 2519 #define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__POS (3) 2520 #define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__LEN (1) 2521 #define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__MSK (0x08) 2522 #define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__REG (BMI160_USER_INTR_MAP_2_ADDR) 2527 #define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__POS (4) 2528 #define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__LEN (1) 2529 #define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__MSK (0x10) 2530 #define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__REG \ 2531 (BMI160_USER_INTR_MAP_2_ADDR) 2536 #define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__POS (5) 2537 #define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__LEN (1) 2538 #define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__MSK (0x20) 2539 #define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__REG \ 2540 (BMI160_USER_INTR_MAP_2_ADDR) 2545 #define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__POS (6) 2546 #define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__LEN (1) 2547 #define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__MSK (0x40) 2548 #define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__REG \ 2549 (BMI160_USER_INTR_MAP_2_ADDR) 2554 #define BMI160_USER_INTR_MAP_2_INTR2_FLAT__POS (7) 2555 #define BMI160_USER_INTR_MAP_2_INTR2_FLAT__LEN (1) 2556 #define BMI160_USER_INTR_MAP_2_INTR2_FLAT__MSK (0x80) 2557 #define BMI160_USER_INTR_MAP_2_INTR2_FLAT__REG (BMI160_USER_INTR_MAP_2_ADDR) 2563 #define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__POS (3) 2564 #define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__LEN (1) 2565 #define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__MSK (0x08) 2566 #define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__REG \ 2567 (BMI160_USER_INTR_DATA_0_ADDR) 2573 #define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__POS (7) 2574 #define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__LEN (1) 2575 #define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__MSK (0x80) 2576 #define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__REG \ 2577 (BMI160_USER_INTR_DATA_0_ADDR) 2583 #define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__POS (7) 2584 #define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__LEN (1) 2585 #define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__MSK (0x80) 2586 #define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__REG \ 2587 (BMI160_USER_INTR_DATA_1_ADDR) 2592 #define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__POS (0) 2593 #define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__LEN (8) 2594 #define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__MSK (0xFF) 2595 #define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__REG \ 2596 (BMI160_USER_INTR_LOWHIGH_0_ADDR) 2601 #define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__POS (0) 2602 #define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__LEN (8) 2603 #define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__MSK (0xFF) 2604 #define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__REG \ 2605 (BMI160_USER_INTR_LOWHIGH_1_ADDR) 2610 #define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__POS (0) 2611 #define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__LEN (2) 2612 #define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__MSK (0x03) 2613 #define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__REG \ 2614 (BMI160_USER_INTR_LOWHIGH_2_ADDR) 2619 #define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__POS (2) 2620 #define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__LEN (1) 2621 #define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__MSK (0x04) 2622 #define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__REG \ 2623 (BMI160_USER_INTR_LOWHIGH_2_ADDR) 2628 #define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__POS (6) 2629 #define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__LEN (2) 2630 #define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__MSK (0xC0) 2631 #define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__REG \ 2632 (BMI160_USER_INTR_LOWHIGH_2_ADDR) 2637 #define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__POS (0) 2638 #define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__LEN (8) 2639 #define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__MSK (0xFF) 2640 #define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__REG \ 2641 (BMI160_USER_INTR_LOWHIGH_3_ADDR) 2646 #define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__POS (0) 2647 #define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__LEN (8) 2648 #define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__MSK (0xFF) 2649 #define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__REG \ 2650 (BMI160_USER_INTR_LOWHIGH_4_ADDR) 2655 #define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__POS (0) 2656 #define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__LEN (2) 2657 #define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__MSK (0x03) 2658 #define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__REG \ 2659 (BMI160_USER_INTR_MOTION_0_ADDR) 2664 #define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__POS (2) 2665 #define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__LEN (6) 2666 #define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__MSK (0xFC) 2667 #define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__REG \ 2668 (BMI160_USER_INTR_MOTION_0_ADDR) 2673 #define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__POS (0) 2674 #define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__LEN (8) 2675 #define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__MSK (0xFF) 2676 #define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__REG \ 2677 (BMI160_USER_INTR_MOTION_1_ADDR) 2682 #define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__POS (0) 2683 #define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__LEN (8) 2684 #define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__MSK (0xFF) 2685 #define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__REG \ 2686 (BMI160_USER_INTR_MOTION_2_ADDR) 2691 #define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__POS (0) 2692 #define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__LEN (1) 2693 #define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__MSK (0x01) 2694 #define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__REG \ 2695 (BMI160_USER_INTR_MOTION_3_ADDR) 2700 #define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__POS (1) 2701 #define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__LEN (1) 2702 #define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__MSK (0x02) 2703 #define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__REG \ 2704 (BMI160_USER_INTR_MOTION_3_ADDR) 2707 #define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__POS (2) 2708 #define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__LEN (2) 2709 #define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__MSK (0x0C) 2710 #define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__REG \ 2711 (BMI160_USER_INTR_MOTION_3_ADDR) 2714 #define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__POS (4) 2715 #define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__LEN (2) 2716 #define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__MSK (0x30) 2717 #define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__REG \ 2718 (BMI160_USER_INTR_MOTION_3_ADDR) 2723 #define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__POS (0) 2724 #define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__LEN (3) 2725 #define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__MSK (0x07) 2726 #define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__REG \ 2727 (BMI160_USER_INTR_TAP_0_ADDR) 2732 #define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__POS (6) 2733 #define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__LEN (1) 2734 #define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__MSK (0x40) 2735 #define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__REG (BMI160_USER_INTR_TAP_0_ADDR) 2740 #define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__POS (7) 2741 #define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__LEN (1) 2742 #define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__MSK (0x80) 2743 #define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__REG (BMI160_USER_INTR_TAP_0_ADDR) 2748 #define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__POS (0) 2749 #define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__LEN (5) 2750 #define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__MSK (0x1F) 2751 #define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__REG (BMI160_USER_INTR_TAP_1_ADDR) 2756 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__POS (0) 2757 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__LEN (2) 2758 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__MSK (0x03) 2759 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__REG \ 2760 (BMI160_USER_INTR_ORIENT_0_ADDR) 2765 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__POS (2) 2766 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__LEN (2) 2767 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__MSK (0x0C) 2768 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__REG \ 2769 (BMI160_USER_INTR_ORIENT_0_ADDR) 2774 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__POS (4) 2775 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__LEN (4) 2776 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__MSK (0xF0) 2777 #define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__REG \ 2778 (BMI160_USER_INTR_ORIENT_0_ADDR) 2783 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__POS (0) 2784 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__LEN (6) 2785 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__MSK (0x3F) 2786 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__REG \ 2787 (BMI160_USER_INTR_ORIENT_1_ADDR) 2792 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__POS (6) 2793 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__LEN (1) 2794 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__MSK (0x40) 2795 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__REG \ 2796 (BMI160_USER_INTR_ORIENT_1_ADDR) 2801 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__POS (7) 2802 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__LEN (1) 2803 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__MSK (0x80) 2804 #define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__REG \ 2805 (BMI160_USER_INTR_ORIENT_1_ADDR) 2810 #define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__POS (0) 2811 #define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__LEN (6) 2812 #define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__MSK (0x3F) 2813 #define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__REG \ 2814 (BMI160_USER_INTR_FLAT_0_ADDR) 2819 #define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__POS (0) 2820 #define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__LEN (4) 2821 #define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__MSK (0x0F) 2822 #define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__REG \ 2823 (BMI160_USER_INTR_FLAT_1_ADDR) 2828 #define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__POS (4) 2829 #define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__LEN (2) 2830 #define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__MSK (0x30) 2831 #define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__REG \ 2832 (BMI160_USER_INTR_FLAT_1_ADDR) 2837 #define BMI160_USER_FOC_ACCEL_Z__POS (0) 2838 #define BMI160_USER_FOC_ACCEL_Z__LEN (2) 2839 #define BMI160_USER_FOC_ACCEL_Z__MSK (0x03) 2840 #define BMI160_USER_FOC_ACCEL_Z__REG (BMI160_USER_FOC_CONFIG_ADDR) 2843 #define BMI160_USER_FOC_ACCEL_Y__POS (2) 2844 #define BMI160_USER_FOC_ACCEL_Y__LEN (2) 2845 #define BMI160_USER_FOC_ACCEL_Y__MSK (0x0C) 2846 #define BMI160_USER_FOC_ACCEL_Y__REG (BMI160_USER_FOC_CONFIG_ADDR) 2849 #define BMI160_USER_FOC_ACCEL_X__POS (4) 2850 #define BMI160_USER_FOC_ACCEL_X__LEN (2) 2851 #define BMI160_USER_FOC_ACCEL_X__MSK (0x30) 2852 #define BMI160_USER_FOC_ACCEL_X__REG (BMI160_USER_FOC_CONFIG_ADDR) 2857 #define BMI160_USER_FOC_GYRO_ENABLE__POS (6) 2858 #define BMI160_USER_FOC_GYRO_ENABLE__LEN (1) 2859 #define BMI160_USER_FOC_GYRO_ENABLE__MSK (0x40) 2860 #define BMI160_USER_FOC_GYRO_ENABLE__REG \ 2861 (BMI160_USER_FOC_CONFIG_ADDR) 2866 #define BMI160_USER_CONFIG_NVM_PROG_ENABLE__POS (1) 2867 #define BMI160_USER_CONFIG_NVM_PROG_ENABLE__LEN (1) 2868 #define BMI160_USER_CONFIG_NVM_PROG_ENABLE__MSK (0x02) 2869 #define BMI160_USER_CONFIG_NVM_PROG_ENABLE__REG \ 2870 (BMI160_USER_CONFIG_ADDR) 2874 #define BMI160_USER_IF_CONFIG_SPI3__POS (0) 2875 #define BMI160_USER_IF_CONFIG_SPI3__LEN (1) 2876 #define BMI160_USER_IF_CONFIG_SPI3__MSK (0x01) 2877 #define BMI160_USER_IF_CONFIG_SPI3__REG \ 2878 (BMI160_USER_IF_CONFIG_ADDR) 2881 #define BMI160_USER_IF_CONFIG_IF_MODE__POS (4) 2882 #define BMI160_USER_IF_CONFIG_IF_MODE__LEN (2) 2883 #define BMI160_USER_IF_CONFIG_IF_MODE__MSK (0x30) 2884 #define BMI160_USER_IF_CONFIG_IF_MODE__REG \ 2885 (BMI160_USER_IF_CONFIG_ADDR) 2890 #define BMI160_USER_GYRO_SLEEP_TRIGGER__POS (0) 2891 #define BMI160_USER_GYRO_SLEEP_TRIGGER__LEN (3) 2892 #define BMI160_USER_GYRO_SLEEP_TRIGGER__MSK (0x07) 2893 #define BMI160_USER_GYRO_SLEEP_TRIGGER__REG (BMI160_USER_PMU_TRIGGER_ADDR) 2896 #define BMI160_USER_GYRO_WAKEUP_TRIGGER__POS (3) 2897 #define BMI160_USER_GYRO_WAKEUP_TRIGGER__LEN (2) 2898 #define BMI160_USER_GYRO_WAKEUP_TRIGGER__MSK (0x18) 2899 #define BMI160_USER_GYRO_WAKEUP_TRIGGER__REG (BMI160_USER_PMU_TRIGGER_ADDR) 2902 #define BMI160_USER_GYRO_SLEEP_STATE__POS (5) 2903 #define BMI160_USER_GYRO_SLEEP_STATE__LEN (1) 2904 #define BMI160_USER_GYRO_SLEEP_STATE__MSK (0x20) 2905 #define BMI160_USER_GYRO_SLEEP_STATE__REG (BMI160_USER_PMU_TRIGGER_ADDR) 2908 #define BMI160_USER_GYRO_WAKEUP_INTR__POS (6) 2909 #define BMI160_USER_GYRO_WAKEUP_INTR__LEN (1) 2910 #define BMI160_USER_GYRO_WAKEUP_INTR__MSK (0x40) 2911 #define BMI160_USER_GYRO_WAKEUP_INTR__REG (BMI160_USER_PMU_TRIGGER_ADDR) 2916 #define BMI160_USER_ACCEL_SELFTEST_AXIS__POS (0) 2917 #define BMI160_USER_ACCEL_SELFTEST_AXIS__LEN (2) 2918 #define BMI160_USER_ACCEL_SELFTEST_AXIS__MSK (0x03) 2919 #define BMI160_USER_ACCEL_SELFTEST_AXIS__REG (BMI160_USER_SELF_TEST_ADDR) 2922 #define BMI160_USER_ACCEL_SELFTEST_SIGN__POS (2) 2923 #define BMI160_USER_ACCEL_SELFTEST_SIGN__LEN (1) 2924 #define BMI160_USER_ACCEL_SELFTEST_SIGN__MSK (0x04) 2925 #define BMI160_USER_ACCEL_SELFTEST_SIGN__REG (BMI160_USER_SELF_TEST_ADDR) 2928 #define BMI160_USER_SELFTEST_AMP__POS (3) 2929 #define BMI160_USER_SELFTEST_AMP__LEN (1) 2930 #define BMI160_USER_SELFTEST_AMP__MSK (0x08) 2931 #define BMI160_USER_SELFTEST_AMP__REG (BMI160_USER_SELF_TEST_ADDR) 2936 #define BMI160_USER_GYRO_SELFTEST_START__POS (4) 2937 #define BMI160_USER_GYRO_SELFTEST_START__LEN (1) 2938 #define BMI160_USER_GYRO_SELFTEST_START__MSK (0x10) 2939 #define BMI160_USER_GYRO_SELFTEST_START__REG \ 2940 (BMI160_USER_SELF_TEST_ADDR) 2945 #define BMI160_USER_NV_CONFIG_SPI_ENABLE__POS (0) 2946 #define BMI160_USER_NV_CONFIG_SPI_ENABLE__LEN (1) 2947 #define BMI160_USER_NV_CONFIG_SPI_ENABLE__MSK (0x01) 2948 #define BMI160_USER_NV_CONFIG_SPI_ENABLE__REG (BMI160_USER_NV_CONFIG_ADDR) 2951 #define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__POS (1) 2952 #define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__LEN (1) 2953 #define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__MSK (0x02) 2954 #define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__REG \ 2955 (BMI160_USER_NV_CONFIG_ADDR) 2958 #define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__POS (2) 2959 #define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__LEN (1) 2960 #define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__MSK (0x04) 2961 #define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__REG \ 2962 (BMI160_USER_NV_CONFIG_ADDR) 2965 #define BMI160_USER_NV_CONFIG_SPARE0__POS (3) 2966 #define BMI160_USER_NV_CONFIG_SPARE0__LEN (1) 2967 #define BMI160_USER_NV_CONFIG_SPARE0__MSK (0x08) 2968 #define BMI160_USER_NV_CONFIG_SPARE0__REG (BMI160_USER_NV_CONFIG_ADDR) 2971 #define BMI160_USER_NV_CONFIG_NVM_COUNTER__POS (4) 2972 #define BMI160_USER_NV_CONFIG_NVM_COUNTER__LEN (4) 2973 #define BMI160_USER_NV_CONFIG_NVM_COUNTER__MSK (0xF0) 2974 #define BMI160_USER_NV_CONFIG_NVM_COUNTER__REG (BMI160_USER_NV_CONFIG_ADDR) 2979 #define BMI160_USER_OFFSET_0_ACCEL_OFF_X__POS (0) 2980 #define BMI160_USER_OFFSET_0_ACCEL_OFF_X__LEN (8) 2981 #define BMI160_USER_OFFSET_0_ACCEL_OFF_X__MSK (0xFF) 2982 #define BMI160_USER_OFFSET_0_ACCEL_OFF_X__REG (BMI160_USER_OFFSET_0_ADDR) 2985 #define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__POS (0) 2986 #define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__LEN (8) 2987 #define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__MSK (0xFF) 2988 #define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__REG (BMI160_USER_OFFSET_1_ADDR) 2991 #define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__POS (0) 2992 #define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__LEN (8) 2993 #define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__MSK (0xFF) 2994 #define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__REG (BMI160_USER_OFFSET_2_ADDR) 2999 #define BMI160_USER_OFFSET_3_GYRO_OFF_X__POS (0) 3000 #define BMI160_USER_OFFSET_3_GYRO_OFF_X__LEN (8) 3001 #define BMI160_USER_OFFSET_3_GYRO_OFF_X__MSK (0xFF) 3002 #define BMI160_USER_OFFSET_3_GYRO_OFF_X__REG (BMI160_USER_OFFSET_3_ADDR) 3005 #define BMI160_USER_OFFSET_4_GYRO_OFF_Y__POS (0) 3006 #define BMI160_USER_OFFSET_4_GYRO_OFF_Y__LEN (8) 3007 #define BMI160_USER_OFFSET_4_GYRO_OFF_Y__MSK (0xFF) 3008 #define BMI160_USER_OFFSET_4_GYRO_OFF_Y__REG (BMI160_USER_OFFSET_4_ADDR) 3011 #define BMI160_USER_OFFSET_5_GYRO_OFF_Z__POS (0) 3012 #define BMI160_USER_OFFSET_5_GYRO_OFF_Z__LEN (8) 3013 #define BMI160_USER_OFFSET_5_GYRO_OFF_Z__MSK (0xFF) 3014 #define BMI160_USER_OFFSET_5_GYRO_OFF_Z__REG (BMI160_USER_OFFSET_5_ADDR) 3018 #define BMI160_USER_OFFSET_6_GYRO_OFF_X__POS (0) 3019 #define BMI160_USER_OFFSET_6_GYRO_OFF_X__LEN (2) 3020 #define BMI160_USER_OFFSET_6_GYRO_OFF_X__MSK (0x03) 3021 #define BMI160_USER_OFFSET_6_GYRO_OFF_X__REG (BMI160_USER_OFFSET_6_ADDR) 3024 #define BMI160_USER_OFFSET_6_GYRO_OFF_Y__POS (2) 3025 #define BMI160_USER_OFFSET_6_GYRO_OFF_Y__LEN (2) 3026 #define BMI160_USER_OFFSET_6_GYRO_OFF_Y__MSK (0x0C) 3027 #define BMI160_USER_OFFSET_6_GYRO_OFF_Y__REG (BMI160_USER_OFFSET_6_ADDR) 3030 #define BMI160_USER_OFFSET_6_GYRO_OFF_Z__POS (4) 3031 #define BMI160_USER_OFFSET_6_GYRO_OFF_Z__LEN (2) 3032 #define BMI160_USER_OFFSET_6_GYRO_OFF_Z__MSK (0x30) 3033 #define BMI160_USER_OFFSET_6_GYRO_OFF_Z__REG (BMI160_USER_OFFSET_6_ADDR) 3038 #define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__POS (6) 3039 #define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__LEN (1) 3040 #define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__MSK (0x40) 3041 #define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__REG \ 3042 (BMI160_USER_OFFSET_6_ADDR) 3047 #define BMI160_USER_OFFSET_6_GYRO_OFF_EN__POS (7) 3048 #define BMI160_USER_OFFSET_6_GYRO_OFF_EN__LEN (1) 3049 #define BMI160_USER_OFFSET_6_GYRO_OFF_EN__MSK (0x80) 3050 #define BMI160_USER_OFFSET_6_GYRO_OFF_EN__REG (BMI160_USER_OFFSET_6_ADDR) 3055 #define BMI160_USER_STEP_COUNT_LSB__POS (0) 3056 #define BMI160_USER_STEP_COUNT_LSB__LEN (7) 3057 #define BMI160_USER_STEP_COUNT_LSB__MSK (0xFF) 3058 #define BMI160_USER_STEP_COUNT_LSB__REG (BMI160_USER_STEP_COUNT_0_ADDR) 3061 #define BMI160_USER_STEP_COUNT_MSB__POS (0) 3062 #define BMI160_USER_STEP_COUNT_MSB__LEN (7) 3063 #define BMI160_USER_STEP_COUNT_MSB__MSK (0xFF) 3064 #define BMI160_USER_STEP_COUNT_MSB__REG (BMI160_USER_STEP_COUNT_1_ADDR) 3069 #define BMI160_USER_STEP_CONFIG_ZERO__POS (0) 3070 #define BMI160_USER_STEP_CONFIG_ZERO__LEN (7) 3071 #define BMI160_USER_STEP_CONFIG_ZERO__MSK (0xFF) 3072 #define BMI160_USER_STEP_CONFIG_ZERO__REG \ 3073 (BMI160_USER_STEP_CONFIG_0_ADDR) 3078 #define BMI160_USER_STEP_CONFIG_ONE_CNF1__POS (0) 3079 #define BMI160_USER_STEP_CONFIG_ONE_CNF1__LEN (3) 3080 #define BMI160_USER_STEP_CONFIG_ONE_CNF1__MSK (0x07) 3081 #define BMI160_USER_STEP_CONFIG_ONE_CNF1__REG \ 3082 (BMI160_USER_STEP_CONFIG_1_ADDR) 3084 #define BMI160_USER_STEP_CONFIG_ONE_CNF2__POS (4) 3085 #define BMI160_USER_STEP_CONFIG_ONE_CNF2__LEN (4) 3086 #define BMI160_USER_STEP_CONFIG_ONE_CNF2__MSK (0xF0) 3087 #define BMI160_USER_STEP_CONFIG_ONE_CNF2__REG \ 3088 (BMI160_USER_STEP_CONFIG_1_ADDR) 3093 #define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__POS (3) 3094 #define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__LEN (1) 3095 #define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__MSK (0x08) 3096 #define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__REG \ 3097 (BMI160_USER_STEP_CONFIG_1_ADDR) 3106 #define BMI160_CMD_COMMANDS__POS (0) 3107 #define BMI160_CMD_COMMANDS__LEN (8) 3108 #define BMI160_CMD_COMMANDS__MSK (0xFF) 3109 #define BMI160_CMD_COMMANDS__REG (BMI160_CMD_COMMANDS_ADDR) 3114 #define BMI160_CMD_TARGET_PAGE__POS (4) 3115 #define BMI160_CMD_TARGET_PAGE__LEN (2) 3116 #define BMI160_CMD_TARGET_PAGE__MSK (0x30) 3117 #define BMI160_CMD_TARGET_PAGE__REG (BMI160_CMD_EXT_MODE_ADDR) 3120 #define BMI160_CMD_PAGING_EN__POS (7) 3121 #define BMI160_CMD_PAGING_EN__LEN (1) 3122 #define BMI160_CMD_PAGING_EN__MSK (0x80) 3123 #define BMI160_CMD_PAGING_EN__REG (BMI160_CMD_EXT_MODE_ADDR) 3126 #define BMI160_COM_C_TRIM_FIVE__POS (0) 3127 #define BMI160_COM_C_TRIM_FIVE__LEN (8) 3128 #define BMI160_COM_C_TRIM_FIVE__MSK (0xFF) 3129 #define BMI160_COM_C_TRIM_FIVE__REG (BMI160_COM_C_TRIM_FIVE_ADDR) 3137 #define FIFO_FRAME (512) 3138 #define FIFO_CONFIG_CHECK1 (0x00) 3139 #define FIFO_CONFIG_CHECK2 (0x80) 3146 #define BMI160_YAS537_I2C_ADDRESS (0x2E) 3150 #define BMI160_ACCEL_RANGE_2G (0X03) 3151 #define BMI160_ACCEL_RANGE_4G (0X05) 3152 #define BMI160_ACCEL_RANGE_8G (0X08) 3153 #define BMI160_ACCEL_RANGE_16G (0X0C) 3157 #define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED (0x00) 3158 #define BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ (0x01) 3159 #define BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ (0x02) 3160 #define BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ (0x03) 3161 #define BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ (0x04) 3162 #define BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ (0x05) 3163 #define BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ (0x06) 3164 #define BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ (0x07) 3165 #define BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ (0x08) 3166 #define BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ (0x09) 3167 #define BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ (0x0A) 3168 #define BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ (0x0B) 3169 #define BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ (0x0C) 3170 #define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED0 (0x0D) 3171 #define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED1 (0x0E) 3172 #define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED2 (0x0F) 3176 #define BMI160_ACCEL_OSR4_AVG1 (0) 3177 #define BMI160_ACCEL_OSR2_AVG2 (1) 3178 #define BMI160_ACCEL_NORMAL_AVG4 (2) 3179 #define BMI160_ACCEL_CIC_AVG8 (3) 3180 #define BMI160_ACCEL_RES_AVG2 (4) 3181 #define BMI160_ACCEL_RES_AVG4 (5) 3182 #define BMI160_ACCEL_RES_AVG8 (6) 3183 #define BMI160_ACCEL_RES_AVG16 (7) 3184 #define BMI160_ACCEL_RES_AVG32 (8) 3185 #define BMI160_ACCEL_RES_AVG64 (9) 3186 #define BMI160_ACCEL_RES_AVG128 (10) 3188 #define BMI160_US_DISABLE (0) 3189 #define BMI160_US_ENABLE (1) 3193 #define BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED (0x00) 3194 #define BMI160_GYRO_OUTPUT_DATA_RATE_25HZ (0x06) 3195 #define BMI160_GYRO_OUTPUT_DATA_RATE_50HZ (0x07) 3196 #define BMI160_GYRO_OUTPUT_DATA_RATE_100HZ (0x08) 3197 #define BMI160_GYRO_OUTPUT_DATA_RATE_200HZ (0x09) 3198 #define BMI160_GYRO_OUTPUT_DATA_RATE_400HZ (0x0A) 3199 #define BMI160_GYRO_OUTPUT_DATA_RATE_800HZ (0x0B) 3200 #define BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ (0x0C) 3201 #define BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ (0x0D) 3205 #define BMI160_GYRO_OSR4_MODE (0x00) 3206 #define BMI160_GYRO_OSR2_MODE (0x01) 3207 #define BMI160_GYRO_NORMAL_MODE (0x02) 3208 #define BMI160_GYRO_CIC_MODE (0x03) 3212 #define BMI160_GYRO_RANGE_2000_DEG_SEC (0x00) 3213 #define BMI160_GYRO_RANGE_1000_DEG_SEC (0x01) 3214 #define BMI160_GYRO_RANGE_500_DEG_SEC (0x02) 3215 #define BMI160_GYRO_RANGE_250_DEG_SEC (0x03) 3216 #define BMI160_GYRO_RANGE_125_DEG_SEC (0x04) 3220 #define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED (0x00) 3221 #define BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ (0x01) 3222 #define BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ (0x02) 3223 #define BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ (0x03) 3224 #define BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ (0x04) 3225 #define BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ (0x05) 3226 #define BMI160_MAG_OUTPUT_DATA_RATE_25HZ (0x06) 3227 #define BMI160_MAG_OUTPUT_DATA_RATE_50HZ (0x07) 3228 #define BMI160_MAG_OUTPUT_DATA_RATE_100HZ (0x08) 3229 #define BMI160_MAG_OUTPUT_DATA_RATE_200HZ (0x09) 3230 #define BMI160_MAG_OUTPUT_DATA_RATE_400HZ (0x0A) 3231 #define BMI160_MAG_OUTPUT_DATA_RATE_800HZ (0x0B) 3232 #define BMI160_MAG_OUTPUT_DATA_RATE_1600HZ (0x0C) 3233 #define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0 (0x0D) 3234 #define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1 (0x0E) 3235 #define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2 (0x0F) 3242 #define ACCEL_OFFSET_ENABLE (0x01) 3243 #define GYRO_OFFSET_ENABLE (0x01) 3246 #define START_FOC_ACCEL_GYRO (0X03) 3249 #define BMI160_ANY_MOTION_X_ENABLE (0) 3250 #define BMI160_ANY_MOTION_Y_ENABLE (1) 3251 #define BMI160_ANY_MOTION_Z_ENABLE (2) 3252 #define BMI160_DOUBLE_TAP_ENABLE (4) 3253 #define BMI160_SINGLE_TAP_ENABLE (5) 3254 #define BMI160_ORIENT_ENABLE (6) 3255 #define BMI160_FLAT_ENABLE (7) 3258 #define BMI160_HIGH_G_X_ENABLE (0) 3259 #define BMI160_HIGH_G_Y_ENABLE (1) 3260 #define BMI160_HIGH_G_Z_ENABLE (2) 3261 #define BMI160_LOW_G_ENABLE (3) 3262 #define BMI160_DATA_RDY_ENABLE (4) 3263 #define BMI160_FIFO_FULL_ENABLE (5) 3264 #define BMI160_FIFO_WM_ENABLE (6) 3267 #define BMI160_NOMOTION_X_ENABLE (0) 3268 #define BMI160_NOMOTION_Y_ENABLE (1) 3269 #define BMI160_NOMOTION_Z_ENABLE (2) 3272 #define FOC_X_AXIS (0) 3273 #define FOC_Y_AXIS (1) 3274 #define FOC_Z_AXIS (2) 3277 #define BMI160_INTR1_EDGE_CTRL (0) 3278 #define BMI160_INTR2_EDGE_CTRL (1) 3279 #define BMI160_INTR1_LEVEL (0) 3280 #define BMI160_INTR2_LEVEL (1) 3281 #define BMI160_INTR1_OUTPUT_TYPE (0) 3282 #define BMI160_INTR2_OUTPUT_TYPE (1) 3283 #define BMI160_INTR1_OUTPUT_ENABLE (0) 3284 #define BMI160_INTR2_OUTPUT_ENABLE (1) 3286 #define BMI160_INTR1_INPUT_ENABLE (0) 3287 #define BMI160_INTR2_INPUT_ENABLE (1) 3290 #define BMI160_INTR1_MAP_LOW_G (0) 3291 #define BMI160_INTR2_MAP_LOW_G (1) 3292 #define BMI160_INTR1_MAP_HIGH_G (0) 3293 #define BMI160_INTR2_MAP_HIGH_G (1) 3294 #define BMI160_INTR1_MAP_ANY_MOTION (0) 3295 #define BMI160_INTR2_MAP_ANY_MOTION (1) 3296 #define BMI160_INTR1_MAP_NOMO (0) 3297 #define BMI160_INTR2_MAP_NOMO (1) 3298 #define BMI160_INTR1_MAP_DOUBLE_TAP (0) 3299 #define BMI160_INTR2_MAP_DOUBLE_TAP (1) 3300 #define BMI160_INTR1_MAP_SINGLE_TAP (0) 3301 #define BMI160_INTR2_MAP_SINGLE_TAP (1) 3302 #define BMI160_INTR1_MAP_ORIENT (0) 3303 #define BMI160_INTR2_MAP_ORIENT (1) 3304 #define BMI160_INTR1_MAP_FLAT (0) 3305 #define BMI160_INTR2_MAP_FLAT (1) 3306 #define BMI160_INTR1_MAP_DATA_RDY (0) 3307 #define BMI160_INTR2_MAP_DATA_RDY (1) 3308 #define BMI160_INTR1_MAP_FIFO_WM (0) 3309 #define BMI160_INTR2_MAP_FIFO_WM (1) 3310 #define BMI160_INTR1_MAP_FIFO_FULL (0) 3311 #define BMI160_INTR2_MAP_FIFO_FULL (1) 3312 #define BMI160_INTR1_MAP_PMUTRIG (0) 3313 #define BMI160_INTR2_MAP_PMUTRIG (1) 3316 #define BMI160_MAP_INTR1 (0) 3317 #define BMI160_MAP_INTR2 (1) 3321 #define BMI160_TAP_DURN_50MS (0x00) 3322 #define BMI160_TAP_DURN_100MS (0x01) 3323 #define BMI160_TAP_DURN_150MS (0x02) 3324 #define BMI160_TAP_DURN_200MS (0x03) 3325 #define BMI160_TAP_DURN_250MS (0x04) 3326 #define BMI160_TAP_DURN_375MS (0x05) 3327 #define BMI160_TAP_DURN_500MS (0x06) 3328 #define BMI160_TAP_DURN_700MS (0x07) 3332 #define BMI160_TAP_SHOCK_50MS (0x00) 3333 #define BMI160_TAP_SHOCK_75MS (0x01) 3337 #define BMI160_TAP_QUIET_30MS (0x00) 3338 #define BMI160_TAP_QUIET_20MS (0x01) 3342 #define BMI160_STEP_NORMAL_MODE (0) 3343 #define BMI160_STEP_SENSITIVE_MODE (1) 3344 #define BMI160_STEP_ROBUST_MODE (2) 3348 #define STEP_CONFIG_NORMAL (0X315) 3349 #define STEP_CONFIG_SENSITIVE (0X2D) 3350 #define STEP_CONFIG_ROBUST (0X71D) 3354 #define BMI160_MAG_DIG_X1 (0x5D) 3355 #define BMI160_MAG_DIG_Y1 (0x5E) 3356 #define BMI160_MAG_DIG_Z4_LSB (0x62) 3357 #define BMI160_MAG_DIG_Z4_MSB (0x63) 3358 #define BMI160_MAG_DIG_X2 (0x64) 3359 #define BMI160_MAG_DIG_Y2 (0x65) 3360 #define BMI160_MAG_DIG_Z2_LSB (0x68) 3361 #define BMI160_MAG_DIG_Z2_MSB (0x69) 3362 #define BMI160_MAG_DIG_Z1_LSB (0x6A) 3363 #define BMI160_MAG_DIG_Z1_MSB (0x6B) 3364 #define BMI160_MAG_DIG_XYZ1_LSB (0x6C) 3365 #define BMI160_MAG_DIG_XYZ1_MSB (0x6D) 3366 #define BMI160_MAG_DIG_Z3_LSB (0x6E) 3367 #define BMI160_MAG_DIG_Z3_MSB (0x6F) 3368 #define BMI160_MAG_DIG_XY2 (0x70) 3369 #define BMI160_MAG_DIG_XY1 (0x71) 3373 #define BMI160_MAG_PRESETMODE_LOWPOWER (1) 3374 #define BMI160_MAG_PRESETMODE_REGULAR (2) 3375 #define BMI160_MAG_PRESETMODE_HIGHACCURACY (3) 3376 #define BMI160_MAG_PRESETMODE_ENHANCED (4) 3380 #define BMI160_MAG_LOWPOWER_DR (0x02) 3381 #define BMI160_MAG_REGULAR_DR (0x02) 3382 #define BMI160_MAG_HIGHACCURACY_DR (0x2A) 3383 #define BMI160_MAG_ENHANCED_DR (0x02) 3387 #define BMI160_MAG_LOWPOWER_REPXY (1) 3388 #define BMI160_MAG_REGULAR_REPXY (4) 3389 #define BMI160_MAG_HIGHACCURACY_REPXY (23) 3390 #define BMI160_MAG_ENHANCED_REPXY (7) 3394 #define BMI160_MAG_LOWPOWER_REPZ (2) 3395 #define BMI160_MAG_REGULAR_REPZ (14) 3396 #define BMI160_MAG_HIGHACCURACY_REPZ (82) 3397 #define BMI160_MAG_ENHANCED_REPZ (26) 3398 #define BMI160_MAG_NOAMRL_SWITCH_TIMES (5) 3399 #define MAG_INTERFACE_PMU_ENABLE (1) 3400 #define MAG_INTERFACE_PMU_DISABLE (0) 3404 #define BMI160_MAG_OVERFLOW_OUTPUT ((s16)-32768) 3405 #define BMI160_MAG_OVERFLOW_OUTPUT_S32 ((s32)(-2147483647-1)) 3406 #define BMI160_MAG_NEGATIVE_SATURATION_Z ((s16)-32767) 3407 #define BMI160_MAG_POSITIVE_SATURATION_Z ((u16)32767) 3408 #define BMI160_MAG_FLIP_OVERFLOW_ADCVAL ((s16)-4096) 3409 #define BMI160_MAG_HALL_OVERFLOW_ADCVAL ((s16)-16384) 3413 #define BMI160_BMM150_CHIP_ID (0x40) 3414 #define BMI160_BMM150_POWE_CONTROL_REG (0x4B) 3415 #define BMI160_BMM150_POWE_MODE_REG (0x4C) 3416 #define BMI160_BMM150_DATA_REG (0x42) 3417 #define BMI160_BMM150_XY_REP (0x51) 3418 #define BMI160_BMM150_Z_REP (0x52) 3422 #define BMI160_BST_AKM_ASAX (0x60) 3423 #define BMI160_BST_AKM_ASAY (0x61) 3424 #define BMI160_BST_AKM_ASAZ (0x62) 3428 #define AKM_POWER_DOWN_MODE (0) 3429 #define AKM_SINGLE_MEAS_MODE (1) 3430 #define FUSE_ROM_MODE (2) 3434 #define BMI160_MAG_FORCE_MODE (0) 3435 #define BMI160_MAG_SUSPEND_MODE (1) 3439 #define FORCE_MODE (0) 3440 #define SUSPEND_MODE (1) 3441 #define NORMAL_MODE (2) 3442 #define MAG_SUSPEND_MODE (1) 3448 #define FIFO_HEADER_ENABLE (0x01) 3449 #define FIFO_MAG_ENABLE (0x01) 3450 #define FIFO_ACCEL_ENABLE (0x01) 3451 #define FIFO_GYRO_ENABLE (0x01) 3452 #define FIFO_TIME_ENABLE (0x01) 3453 #define FIFO_STOPONFULL_ENABLE (0x01) 3454 #define FIFO_WM_INTERRUPT_ENABLE (0x01) 3455 #define BMI160_FIFO_INDEX_LENGTH (1) 3456 #define BMI160_FIFO_TAG_INTR_MASK (0xFC) 3459 #define FIFO_HEAD_A (0x84) 3460 #define FIFO_HEAD_G (0x88) 3461 #define FIFO_HEAD_M (0x90) 3463 #define FIFO_HEAD_G_A (0x8C) 3464 #define FIFO_HEAD_M_A (0x94) 3465 #define FIFO_HEAD_M_G (0x98) 3467 #define FIFO_HEAD_M_G_A (0x9C) 3469 #define FIFO_HEAD_SENSOR_TIME (0x44) 3470 #define FIFO_HEAD_INPUT_CONFIG (0x48) 3471 #define FIFO_HEAD_SKIP_FRAME (0x40) 3472 #define FIFO_HEAD_OVER_READ_LSB (0x80) 3473 #define FIFO_HEAD_OVER_READ_MSB (0x00) 3478 #define FIFO_INPUT_CONFIG_OVER_LEN ((s8)-11) 3479 #define FIFO_OVER_READ_RETURN ((s8)-10) 3480 #define FIFO_SENSORTIME_RETURN ((s8)-9) 3481 #define FIFO_SKIP_OVER_LEN ((s8)-8) 3482 #define FIFO_M_G_A_OVER_LEN ((s8)-7) 3483 #define FIFO_M_G_OVER_LEN ((s8)-6) 3484 #define FIFO_M_A_OVER_LEN ((s8)-5) 3485 #define FIFO_G_A_OVER_LEN ((s8)-4) 3486 #define FIFO_M_OVER_LEN ((s8)-3) 3487 #define FIFO_G_OVER_LEN ((s8)-2) 3488 #define FIFO_A_OVER_LEN ((s8)-1) 3493 #define ACCEL_MODE_NORMAL (0x11) 3494 #define ACCEL_LOWPOWER (0X12) 3495 #define ACCEL_SUSPEND (0X10) 3497 #define BMI160_ACCEL_SUSPEND 0 3498 #define BMI160_ACCEL_NORMAL_MODE 1 3499 #define BMI160_ACCEL_LOW_POWER 2 3503 #define GYRO_MODE_SUSPEND (0x14) 3504 #define GYRO_MODE_NORMAL (0x15) 3505 #define GYRO_MODE_FASTSTARTUP (0x17) 3509 #define MAG_MODE_SUSPEND (0x18) 3510 #define MAG_MODE_NORMAL (0x19) 3511 #define MAG_MODE_LOWPOWER (0x1A) 3515 #define BMI160_ENABLE (0x01) 3516 #define BMI160_DISABLE (0x00) 3520 #define BMI160_EDGE (0x01) 3521 #define BMI160_LEVEL (0x00) 3525 #define BMI160_LEVEL_LOW (0x00) 3526 #define BMI160_LEVEL_HIGH (0x01) 3530 #define BMI160_OPEN_DRAIN (0x01) 3531 #define BMI160_PUSH_PULL (0x00) 3534 #define BMI160_INPUT (0x01) 3535 #define BMI160_OUTPUT (0x00) 3540 #define FILTER_DATA (0x00) 3541 #define UNFILTER_DATA (0x01) 3545 #define SLOW_MOTION (0x00) 3546 #define NO_MOTION (0x01) 3550 #define ANY_MOTION (0x00) 3551 #define SIGNIFICANT_MOTION (0x01) 3555 #define BMI160_LATCH_DUR_NONE (0x00) 3556 #define BMI160_LATCH_DUR_312_5_MICRO_SEC (0x01) 3557 #define BMI160_LATCH_DUR_625_MICRO_SEC (0x02) 3558 #define BMI160_LATCH_DUR_1_25_MILLI_SEC (0x03) 3559 #define BMI160_LATCH_DUR_2_5_MILLI_SEC (0x04) 3560 #define BMI160_LATCH_DUR_5_MILLI_SEC (0x05) 3561 #define BMI160_LATCH_DUR_10_MILLI_SEC (0x06) 3562 #define BMI160_LATCH_DUR_20_MILLI_SEC (0x07) 3563 #define BMI160_LATCH_DUR_40_MILLI_SEC (0x08) 3564 #define BMI160_LATCH_DUR_80_MILLI_SEC (0x09) 3565 #define BMI160_LATCH_DUR_160_MILLI_SEC (0x0A) 3566 #define BMI160_LATCH_DUR_320_MILLI_SEC (0x0B) 3567 #define BMI160_LATCH_DUR_640_MILLI_SEC (0x0C) 3568 #define BMI160_LATCH_DUR_1_28_SEC (0x0D) 3569 #define BMI160_LATCH_DUR_2_56_SEC (0x0E) 3570 #define BMI160_LATCHED (0x0F) 3574 #define BMI160_GYRO_MANUAL_OFFSET_0_7 (0x00FF) 3575 #define BMI160_GYRO_MANUAL_OFFSET_8_9 (0x0300) 3579 #define BMI160_STEP_CONFIG_0_7 (0x00FF) 3580 #define BMI160_STEP_CONFIG_8_10 (0x0700) 3581 #define BMI160_STEP_CONFIG_11_14 (0xF000) 3585 #define BMI160_WRITE_TARGET_PAGE0 (0x00) 3586 #define BMI160_WRITE_TARGET_PAGE1 (0x01) 3587 #define BMI160_WRITE_ENABLE_PAGE1 (0x01) 3588 #define BMI160_MANUAL_DISABLE (0x00) 3589 #define BMI160_MANUAL_ENABLE (0x01) 3590 #define BMI160_YAS_DISABLE_RCOIL (0x00) 3591 #define BMI160_ENABLE_MAG_IF_MODE (0x02) 3592 #define BMI160_ENABLE_ANY_MOTION_INTR1 (0x04) 3593 #define BMI160_ENABLE_ANY_MOTION_INTR2 (0x04) 3594 #define BMI160_MAG_DATA_READ_REG (0x04) 3595 #define BMI160_BMM_POWER_MODE_REG (0x06) 3596 #define BMI160_ENABLE_ANY_MOTION_AXIS (0x07) 3597 #define BMI160_ENABLE_LOW_G (0x08) 3598 #define BMI160_YAS532_ACQ_START (0x11) 3599 #define BMI160_YAS_DEVICE_ID_REG (0x80) 3600 #define BMI160_FIFO_GYRO_ENABLE (0x80) 3601 #define BMI160_SIG_MOTION_INTR_ENABLE (0x01) 3602 #define BMI160_STEP_DETECT_INTR_ENABLE (0x01) 3603 #define BMI160_LOW_G_INTR_STAT (0x01) 3604 #define BMI160_PULL_UP_DATA (0x30) 3605 #define BMI160_FIFO_M_G_A_ENABLE (0xE0) 3606 #define BMI160_FIFO_M_G_ENABLE (0xA0) 3607 #define BMI160_FIFO_M_A_ENABLE (0x60) 3608 #define BMI160_FIFO_G_A_ENABLE (0xC0) 3609 #define BMI160_FIFO_A_ENABLE (0x40) 3610 #define BMI160_FIFO_M_ENABLE (0x20) 3612 #define BMI160_SEC_IF_BMM150 (0) 3613 #define BMI160_SEC_IF_AKM09911 (1) 3614 #define BMI160_SEC_IF_AKM09912 (2) 3615 #define BMI160_SEC_IF_YAS532 (3) 3616 #define BMI160_SEC_IF_YAS537 (4) 3620 #define BMI160_COMMAND_REG_ONE (0x37) 3621 #define BMI160_COMMAND_REG_TWO (0x9A) 3622 #define BMI160_COMMAND_REG_THREE (0xC0) 3623 #define RESET_STEP_COUNTER (0xB2) 3627 #define BMI160_GET_BITSLICE(regvar, bitname)\ 3628 ((regvar & bitname##__MSK) >> bitname##__POS) 3631 #define BMI160_SET_BITSLICE(regvar, bitname, val)\ 3632 ((regvar & ~bitname##__MSK) | \ 3633 ((val<<bitname##__POS)&bitname##__MSK)) 3686 u8 *v_data_u8,
u8 v_len_u8);
3705 u8 *v_data_u8,
u8 v_len_u8);
3769 *v_i2c_error_code_u8);
3786 *v_drop_cmd_err_u8);
3806 *v_mag_data_rdy_err_u8);
3826 u8 *v_err_code_u8,
u8 *v_i2c_fail_err_u8,
3827 u8 *v_drop_cmd_err_u8,
u8 *v_mag_data_rdy_err_u8);
3858 *v_mag_power_mode_stat_u8);
3885 *v_gyro_power_mode_stat_u8);
3913 *v_accel_power_mode_stat_u8);
3950 u8 v_sensor_select_u8);
3973 u8 v_sensor_select_u8);
3996 u8 v_sensor_select_u8);
4171 s16 *v_accel_x_s16);
4194 s16 *v_accel_y_s16);
4217 s16 *v_accel_z_s16);
4260 u32 *v_sensor_time_u32);
4281 (
u8 accel_gyro_sensortime_select,
4305 *v_gyro_selftest_u8);
4330 *v_mag_manual_stat_u8);
4518 *v_any_motion_intr_u8);
4548 *v_pmu_trigger_intr_u8);
4593 *v_double_tap_intr_u8);
4638 *v_single_tap_intr_u8);
4844 *v_data_rdy_intr_u8);
4876 *v_fifo_full_intr_u8);
4904 *v_fifo_wm_intr_u8);
4965 *v_anymotion_first_x_u8);
4987 *v_any_motion_first_y_u8);
5010 *v_any_motion_first_z_u8);
5032 *v_anymotion_sign_u8);
5150 *v_high_g_first_x_u8);
5173 *v_high_g_first_y_u8);
5196 *v_high_g_first_z_u8);
5329 u32 *v_fifo_length_u32);
5350 u8 *v_fifodata_u8,
u16 v_fifo_length_u16);
5385 u8 *v_output_data_rate_u8);
5448 u8 v_output_data_rate_u8,
u8 v_accel_bw_u8);
5563 u8 *v_accel_under_sampling_u8);
5586 u8 v_accel_under_sampling_u8);
5674 u8 *gyro_output_typer);
5709 u8 gyro_output_typer);
5894 u8 *v_fifo_down_gyro_u8);
5912 u8 v_fifo_down_gyro_u8);
5932 u8 *v_gyro_fifo_filter_data_u8);
5952 u8 v_gyro_fifo_filter_data_u8);
5971 u8 *v_fifo_down_u8);
6011 u8 *accel_fifo_filter_u8);
6032 u8 v_accel_fifo_filter_u8);
6095 u8 *v_fifo_time_enable_u8);
6116 u8 v_fifo_time_enable_u8);
6137 u8 *v_fifo_tag_intr2_u8);
6158 u8 v_fifo_tag_intr2_u8);
6176 u8 *v_fifo_tag_intr1_u8);
6194 u8 v_fifo_tag_intr1_u8);
6212 u8 *v_fifo_header_u8);
6230 u8 v_fifo_header_u8);
6286 u8 *v_fifo_accel_u8);
6306 u8 v_fifo_accel_u8);
6326 u8 *v_fifo_gyro_u8);
6368 u8 *v_i2c_device_addr_u8);
6386 u8 v_i2c_device_addr_u8);
6405 u8 *v_mag_burst_u8);
6448 u8 *v_mag_offset_u8);
6469 u8 v_mag_offset_u8);
6498 u8 *v_mag_manual_u8);
6524 u8 v_mag_manual_u8);
6547 u8 *v_mag_read_addr_u8);
6566 u8 v_mag_read_addr_u8);
6585 u8 *v_mag_write_addr_u8);
6604 u8 v_mag_write_addr_u8);
6623 u8 *v_mag_write_data_u8);
6642 u8 v_mag_write_data_u8);
6680 u8 enable,
u8 *v_intr_enable_zero_u8);
6714 u8 enable,
u8 v_intr_enable_zero_u8);
6754 u8 enable,
u8 *v_intr_enable_1_u8);
6790 u8 enable,
u8 v_intr_enable_1_u8);
6824 u8 enable,
u8 *v_intr_enable_2_u8);
6854 u8 enable,
u8 v_intr_enable_2_u8);
6878 u8 *v_step_intr_u8);
6927 u8 v_channel_u8,
u8 *v_intr_edge_ctrl_u8);
6953 u8 v_channel_u8,
u8 v_intr_edge_ctrl_u8);
6979 u8 v_channel_u8,
u8 *v_intr_level_u8);
7005 u8 v_channel_u8,
u8 v_intr_level_u8);
7034 u8 v_channel_u8,
u8 *v_intr_output_type_u8);
7063 u8 v_channel_u8,
u8 v_intr_output_type_u8);
7092 u8 v_channel_u8,
u8 *v_output_enable_u8);
7121 u8 v_channel_u8,
u8 v_output_enable_u8);
7162 u8 *v_latch_intr_u8);
7200 u8 v_latch_intr_u8);
7229 u8 v_channel_u8,
u8 *v_input_en_u8);
7258 u8 v_channel_u8,
u8 v_input_en_u8);
7290 u8 v_channel_u8,
u8 *v_intr_low_g_u8);
7319 u8 v_channel_u8,
u8 v_intr_low_g_u8);
7349 u8 v_channel_u8,
u8 *v_intr_high_g_u8);
7379 u8 v_channel_u8,
u8 v_intr_high_g_u8);
7409 u8 v_channel_u8,
u8 *v_intr_any_motion_u8);
7439 u8 v_channel_u8,
u8 v_intr_any_motion_u8);
7468 u8 v_channel_u8,
u8 *v_intr_nomotion_u8);
7497 u8 v_channel_u8,
u8 v_intr_nomotion_u8);
7525 u8 v_channel_u8,
u8 *v_intr_double_tap_u8);
7553 u8 v_channel_u8,
u8 v_intr_double_tap_u8);
7582 u8 v_channel_u8,
u8 *v_intr_single_tap_u8);
7611 u8 v_channel_u8,
u8 v_intr_single_tap_u8);
7641 u8 v_channel_u8,
u8 *v_intr_orient_u8);
7671 u8 v_channel_u8,
u8 v_intr_orient_u8);
7700 u8 v_channel_u8,
u8 *v_intr_flat_u8);
7729 u8 v_channel_u8,
u8 v_intr_flat_u8);
7757 u8 v_channel_u8,
u8 *v_intr_pmu_trig_u8);
7785 u8 v_channel_u8,
u8 v_intr_pmu_trig_u8);
7816 u8 v_channel_u8,
u8 *v_intr_fifo_full_u8);
7845 u8 v_channel_u8,
u8 v_intr_fifo_full_u8);
7875 u8 v_channel_u8,
u8 *v_intr_fifo_wm_u8);
7905 u8 v_channel_u8,
u8 v_intr_fifo_wm_u8);
7935 u8 v_channel_u8,
u8 *v_intr_data_rdy_u8);
7964 u8 v_channel_u8,
u8 v_intr_data_rdy_u8);
7988 u8 *v_tap_source_u8);
8009 u8 v_tap_source_u8);
8032 u8 *v_low_high_source_u8);
8052 u8 v_low_high_source_u8);
8075 u8 *v_motion_source_u8);
8095 u8 v_motion_source_u8);
8170 u8 *v_low_g_thres_u8);
8193 u8 v_low_g_thres_u8);
8250 u8 *v_low_g_mode_u8);
8269 u8 v_low_g_mode_u8);
8295 u8 *v_high_g_hyst_u8);
8318 u8 v_high_g_hyst_u8);
8341 u8 *v_high_g_durn_u8);
8361 u8 v_high_g_durn_u8);
8397 u8 *v_high_g_thres_u8);
8430 u8 v_high_g_thres_u8);
8449 u8 *v_any_motion_durn_u8);
8491 u8 *v_slow_no_motion_u8);
8514 u8 v_slow_no_motion_u8);
8550 u8 *v_any_motion_thres_u8);
8583 u8 v_any_motion_thres_u8);
8620 u8 *v_slow_no_motion_thres_u8);
8654 u8 v_slow_no_motion_thres_u8);
8680 u8 *v_intr_slow_no_motion_select_u8);
8703 u8 v_intr_slow_no_motion_select_u8);
8729 u8 *int_sig_mot_sel);
8752 u8 int_sig_mot_sel);
8768 u8 v_significant_u8);
8793 u8 *v_int_sig_mot_skip_u8);
8817 u8 v_int_sig_mot_skip_u8);
8842 u8 *int_sig_mot_proof);
8867 u8 int_sig_mot_proof);
8946 u8 *v_tap_shock_u8);
8988 u8 *v_tap_quiet_u8);
9035 u8 *v_tap_thres_u8);
9084 u8 *v_orient_mode_u8);
9106 u8 v_orient_mode_u8);
9136 u8 *v_orient_blocking_u8);
9163 u8 v_orient_blocking_u8);
9186 u8 *v_orient_hyst_u8);
9206 u8 v_orient_hyst_u8);
9225 u8 *v_orient_theta_u8);
9241 u8 v_orient_theta_u8);
9263 u8 *v_orient_ud_u8);
9304 u8 *v_orient_axes_u8);
9323 u8 v_orient_axes_u8);
9342 u8 *v_flat_theta_u8);
9358 u8 v_flat_theta_u8);
9382 u8 *v_flat_hold_u8);
9422 u8 *v_flat_hyst_u8);
9461 u8 *v_foc_accel_z_u8);
9481 u8 v_foc_accel_z_u8);
9504 u8 *v_foc_accel_y_u8);
9527 u8 v_foc_accel_y_u8);
9550 u8 *v_foc_accel_x_u8);
9573 u8 v_foc_accel_x_u8);
9598 u8 v_foc_gyro_u8,
s16 *v_gyro_off_x_s16,
9599 s16 *v_gyro_off_y_s16,
s16 *v_gyro_off_z_s16);
9855 u8 *v_gyro_sleep_trigger_u8);
9881 u8 v_gyro_sleep_trigger_u8);
9902 u8 *v_gyro_wakeup_trigger_u8);
9923 u8 v_gyro_wakeup_trigger_u8);
9942 u8 *v_gyro_sleep_state_u8);
9961 u8 v_gyro_sleep_state_u8);
9980 u8 *v_gyro_wakeup_intr_u8);
9999 u8 v_gyro_wakeup_intr_u8);
10023 u8 *acc_selftest_axis);
10044 u8 acc_selftest_axis);
10063 u8 *acc_selftest_sign);
10082 u8 acc_selftest_sign);
10102 u8 *acc_selftest_amp);
10122 u8 acc_selftest_amp);
10138 u8 *v_gyro_selftest_start_u8);
10151 u8 v_gyro_selftest_start_u8);
10173 u8 *v_spi_enable_u8);
10192 u8 v_spi_enable_u8);
10209 (
u8 *v_spare0_trim_u8);
10226 (
u8 v_spare0_trim_u8);
10246 u8 *v_nvm_counter_u8);
10263 u8 v_nvm_counter_u8);
10285 s8 *v_accel_off_x_s8);
10304 s8 v_accel_off_x_s8);
10323 s8 *v_accel_off_y_s8);
10342 s8 v_accel_off_y_s8);
10361 s8 *v_accel_off_z_s8);
10380 s8 v_accel_off_z_s8);
10402 s16 *v_gyro_off_x_s16);
10421 s16 v_gyro_off_x_s16);
10440 s16 *v_gyro_off_y_s16);
10459 s16 v_gyro_off_y_s16);
10478 s16 *v_gyro_off_z_s16);
10497 s16 v_gyro_off_z_s16);
10530 u8 foc_acc,
s8 *accel_offset);
10573 u8 v_foc_accel_y_u8,
u8 v_foc_accel_z_u8,
10574 s8 *acc_off_x,
s8 *acc_off_y,
s8 *acc_off_z);
10640 u8 *v_gyro_off_enable_u8);
10661 u8 v_gyro_off_enable_u8);
10698 u16 *v_step_config_u16);
10716 u16 v_step_config_u16);
10731 u8 *v_step_counter_u8);
10746 u8 v_step_counter_u8);
10783 u8 v_significant_u8);
10802 u8 v_step_detector_u8);
10860 u8 v_command_reg_u8);
10880 u8 *v_target_page_u8);
10897 u8 v_target_page_u8);
10918 u8 *v_page_enable_u8);
10939 u8 v_page_enable_u8);
10957 u8 *v_control_pullup_u8);
10975 u8 v_control_pullup_u8);
11225 u8 v_mag_sec_if_pow_mode_u8);
11226 #if defined AKM09911 || defined AKM09912 11234 struct bmi160_bst_akm_xyz_t {
11242 struct bst_akm_sensitivity_data_t {
11269 u8 v_akm_i2c_address_u8);
11325 u8 v_akm_pow_mode_u8);
11350 bmi160_set_bst_akm_and_secondary_if_powermode(
11351 u8 v_mag_sec_if_pow_mode_u8);
11380 s32 bmi160_bst_akm09911_compensate_X(
s16 v_bst_akm_x_s16);
11403 s32 bmi160_bst_akm09911_compensate_Y(
s16 v_bst_akm_y_s16);
11426 s32 bmi160_bst_akm09911_compensate_Z(
s16 v_bst_akm_z_s16);
11451 struct bmi160_bst_akm_xyz_t *bst_akm_xyz);
11480 s32 bmi160_bst_akm09912_compensate_X(
s16 v_bst_akm_x_s16);
11503 s32 bmi160_bst_akm09912_compensate_Y(
s16 v_bst_akm_y_s16);
11526 s32 bmi160_bst_akm09912_compensate_Z(
s16 v_bst_akm_z_s16);
11551 struct bmi160_bst_akm_xyz_t *bst_akm_xyz);
11623 u16 v_fifo_user_length_u16,
11686 u16 v_fifo_user_length_u16,
u8 v_mag_if_mag_u8,
11723 u8 v_mag_second_if_u8);
11733 s32 yas537_vector_xyz[3];
11784 u16 *a_xy1y2_u16,
u8 v_over_flow_u8,
u8 v_rcoil_u8,
u8 v_busy_u8);
11845 u8 v_command_reg_data_u8);
11864 u8 *v_coil_stat_u8,
u8 *v_busy_u8,
11865 u16 *v_temperature_u16,
u16 *xy1y2,
u8 *v_ouflow_u8);
11892 struct bst_yas532_calib_data_t {
11911 #if 1 < YAS532_MAG_TEMPERATURE_LOG 11912 struct yas_temp_filter_t {
11922 struct bst_yas532_calib_data_t calib_yas532;
11924 s8 v_hard_offset_s8[3];
11928 const s8 *transform;
11929 #if 1 < YAS532_MAG_TEMPERATURE_LOG 11930 struct yas_temp_filter_t temp_data;
11937 struct yas532_vector {
11938 s32 yas532_vector_xyz[3];
11944 struct yas532_data {
12008 u16 *v_xy1y2_u16,
s32 *xy1y2_linear);
12045 u8 v_acquisition_command_u8,
u8 *v_busy_u8,
12046 u16 *v_temp_u16,
u16 *v_xy1y2_u16,
u8 *v_overflow_u8);
12081 struct yas532_vector *xyz_data,
u8 *v_overflow_s8,
u8 v_temp_correction_u8,
12082 u8 v_acquisition_command_u8);
12118 u8 v_command_reg_data_u8);
12132 const s8 *p_offset_s8);
12150 u16 *v_xy1y2_u16,
u8 v_temp_correction_u8,
12151 s8 v_overflow_s8,
u16 v_temp_u16,
u8 v_busy_u8);
BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_presetmode(u8 mode)
This API used to set the pre-set modes of bmm150 The pre-set mode setting is depend on data rate and ...
Definition: bmi160.c:17966
BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_headerless_mode(u8 v_mag_if_u8, struct bmi160_fifo_data_header_less_t *headerless_data)
This function used for reading the fifo data of header less mode.
Definition: bmi160.c:16869
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_zaxis(s8 v_accel_off_z_s8)
This API write accel manual offset compensation of z axis from the register 0x73 bit 0 to 7...
Definition: bmi160.c:14489
s32 bmi160_bmm150_mag_compensate_X(s16 v_mag_data_x_s16, u16 v_data_r_u16)
This API used to get the compensated BMM150-X data the out put of X as s32 Before start reading the m...
Definition: bmi160.c:17426
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_hyst(u8 v_orient_hyst_u8)
This API write Orient interrupt hysteresis, from the register 0x64 bit 4 to 7.
Definition: bmi160.c:11595
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_gyro_enable(u8 v_foc_gyro_u8, s16 *v_gyro_off_x_s16, s16 *v_gyro_off_y_s16, s16 *v_gyro_off_z_s16)
This API write gyro fast offset enable from the register 0x69 bit 6.
Definition: bmi160.c:12808
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_step_intr(u8 *v_step_intr_u8)
This API reads the step detector interrupt status from the register 0x1C bit 0 flag is associated wit...
Definition: bmi160.c:1931
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_enable(u8 v_i2c_wdt_u8)
This API write I2C watchdog enable from the register 0x70 bit 2.
Definition: bmi160.c:13194
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_y(u8 v_foc_accel_y_u8)
This API write accel offset compensation target value for y-axis from the register 0x69 bit 2 and 3...
Definition: bmi160.c:12265
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_select(u8 v_i2c_wdt_u8)
This API write I2C Watchdog timer from the register 0x70 bit 1.
Definition: bmi160.c:13111
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_offset(u8 *v_mag_offset_u8)
This API is used to read trigger-readout offset in units of 2.5 ms. If set to zero, the offset is maximum, i.e. after readout a trigger is issued immediately. from the register 0x4C bit 2 to 5.
Definition: bmi160.c:5636
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_x(u8 v_foc_accel_x_u8)
This API write accel offset compensation target value for x-axis is from the register 0x69 bit 4 and ...
Definition: bmi160.c:12356
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_power_mode_stat(u8 *v_gyro_power_mode_stat_u8)
This API reads the gyroscope power mode from PMU status register 0x03 bit 2 and 3.
Definition: bmi160.c:544
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_data_rdy_err(u8 *v_mag_data_rdy_err_u8)
This API reads the magnetometer data ready interrupt not active. It reads from the error register 0x0...
Definition: bmi160.c:394
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_sign(u8 *acc_selftest_sign)
This API read accel self test axis sign from the register 0x6D bit 2.
Definition: bmi160.c:13785
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_axes_enable(u8 v_orient_axes_u8)
This API write orientation axes changes from the register 0x66 bit 7.
Definition: bmi160.c:11843
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_trigger(u8 *v_gyro_sleep_trigger_u8)
This API read gyro sleep trigger from the register 0x6C bit 0 to 2.
Definition: bmi160.c:13338
YAS537 sensor initialization.
Definition: bmi160.h:11757
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_range(u8 v_range_u8)
This API is used to set the ranges (g values) of the accel from the register 0x41 bit 0 to 3...
Definition: bmi160.c:3956
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_hyst(u8 v_high_g_hyst_u8)
This API write High-g interrupt hysteresis from the register 0x5C bit 6 and 7.
Definition: bmi160.c:9922
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_zaxis(s16 *v_gyro_off_z_s16)
This API read gyro manual offset compensation of z axis from the register 0x76 bit 0 to 7 and 0x77 bi...
Definition: bmi160.c:14816
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_gyro_enable(u8 *v_foc_gyro_u8)
This API read gyro fast offset enable from the register 0x69 bit 6.
Definition: bmi160.c:12768
BMI160_RETURN_FUNCTION_TYPE bmi160_get_latch_intr(u8 *v_latch_intr_u8)
This API is used to get the latch duration from the register 0x54 bit 0 to 3.
Definition: bmi160.c:7410
Struct used to store the FIFO mag data.
Definition: bmi160.h:1277
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_accel(u8 v_fifo_down_u8)
This API is used to set Down sampling for accel (2*downs_accel) from the register 0x45 bit 4 to 6...
Definition: bmi160.c:4654
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_y(s16 *v_gyro_y_s16)
This API reads gyro data Y values form the register 0x0E and 0x0F.
Definition: bmi160.c:1156
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion(u8 v_channel_u8, u8 *v_intr_any_motion_u8)
Reads the Any motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 a...
Definition: bmi160.c:7927
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_y(s16 *v_mag_y_s16, u8 v_sensor_select_u8)
This API reads magnetometer data Y values from the register 0x06 and 0x07.
Definition: bmi160.c:734
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_header_enable(u8 *v_fifo_header_u8)
This API reads FIFO frame header enable from the register 0x47 bit 4.
Definition: bmi160.c:5124
Structure bmm150 mag compensated data with s32 output.
Definition: bmi160.h:1209
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_z(u8 *v_foc_accel_z_u8)
This API read accel offset compensation target value for z-axis from the register 0x69 bit 0 and 1...
Definition: bmi160.c:12140
u8 dev_addr
Definition: bmi160.h:1156
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_accel(u8 *v_fifo_down_u8)
This API is used to read Down sampling for accel (2*downs_accel) from the register 0x45 bit 4 to 6...
Definition: bmi160.c:4617
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_enable(u8 *v_i2c_wdt_u8)
This API read I2C watchdog enable from the register 0x70 bit 2.
Definition: bmi160.c:13158
#define BMI160_MDELAY_DATA_TYPE
Definition: bmi160.h:408
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_z(u8 *v_high_g_first_z_u8)
This API reads the high_g first z status from the register 0x1F bit 3.
Definition: bmi160.c:3060
BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_prog_enable(u8 v_nvm_prog_u8)
This API write NVM program enable from the register 0x6A bit 1.
Definition: bmi160.c:12939
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_mag_interface_init(void)
This function used to init the YAMAH-YAS537.
Definition: bmi160.c:19981
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_data(u8 v_mag_write_data_u8)
This API is used to set magnetometer write data form the resister 0x4F bit 0 to 7.
Definition: bmi160.c:6002
BMI160_RETURN_FUNCTION_TYPE bmi160_set_target_page(u8 v_target_page_u8)
This API write target page from the register 0x7F bit 4 and 5.
Definition: bmi160.c:15665
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_manual_enable(u8 v_mag_manual_u8)
This API is used to set Enable register access on MAG_IF[2] or MAG_IF[3] writes. This implies that th...
Definition: bmi160.c:5770
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_thres(u8 v_slow_no_motion_thres_u8)
This API is used to write threshold for the slow/no-motion interrupt from the register 0x61 bit 0 to ...
Definition: bmi160.c:10472
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat(u8 v_channel_u8, u8 *v_intr_flat_u8)
Reads the Flat interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57...
Definition: bmi160.c:8597
BMI160_RETURN_FUNCTION_TYPE bmi160_get_sensor_time(u32 *v_sensor_time_u32)
This API reads sensor_time from the register 0x18 to 0x1A.
Definition: bmi160.c:1518
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_sign(u8 acc_selftest_sign)
This API write accel self test axis sign from the register 0x6D bit 2.
Definition: bmi160.c:13823
struct bmi160_t * bmi160_get_ptr(void)
This function used for reading bmi160_t structure.
Definition: bmi160.c:20858
BMI160_RETURN_FUNCTION_TYPE bmi160_write_reg(u8 v_addr_u8, u8 *v_data_u8, u8 v_len_u8)
This API write the data to the given register.
Definition: bmi160.c:178
BMI160_RETURN_FUNCTION_TYPE bmi160_set_paging_enable(u8 v_page_enable_u8)
This API write page enable from the register 0x7F bit 7.
Definition: bmi160.c:15754
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_xaxis(s8 *v_accel_off_x_s8)
This API read accel manual offset compensation of x axis from the register 0x71 bit 0 to 7...
Definition: bmi160.c:14266
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_bw(u8 v_bw_u8)
This API is used to set the data of gyro from the register 0x42 bit 4 to 5.
Definition: bmi160.c:4179
BMI160_BRD_FUNC_PTR
Definition: bmi160.h:1160
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_pmu_trig(u8 v_channel_u8, u8 v_intr_pmu_trig_u8)
Write PMU trigger interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 0 and 4...
Definition: bmi160.c:8802
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_hyst(u8 *v_low_hyst_u8)
This API Reads Low-g interrupt hysteresis from the register 0x5C bit 0 to 1.
Definition: bmi160.c:9714
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_amp(u8 *acc_selftest_amp)
This API read accel self test amplitude from the register 0x6D bit 3 select amplitude of the selftest...
Definition: bmi160.c:13873
signed char s8
Definition: bmi160.h:260
BMI160_RETURN_FUNCTION_TYPE bmi160_map_significant_motion_intr(u8 v_significant_u8)
This API used to trigger the signification motion interrupt.
Definition: bmi160.c:15410
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_flat_intr(u8 *v_flat_intr_u8)
This API reads the flat interrupt status from the register 0x1C bit 7 flag is associated with a speci...
Definition: bmi160.c:2298
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_trigger(u8 *v_gyro_wakeup_trigger_u8)
This API read gyro wakeup trigger from the register 0x6C bit 3 and 4.
Definition: bmi160.c:13433
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_double_tap_intr(u8 *v_double_tap_intr_u8)
This API reads the double tab status from the register 0x1C bit 4 flag is associated with a specific ...
Definition: bmi160.c:2122
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_r(s16 *v_mag_r_s16)
This API reads magnetometer data RHALL values from the register 0x0A and 0x0B.
Definition: bmi160.c:865
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_output_data_rate(u8 gyro_output_typer)
This API is used to set the gyroscope output data rate from the register 0x42 bit 0 to 3...
Definition: bmi160.c:4076
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_thres(u8 v_low_g_thres_u8)
This API is used to write Threshold definition for the low-g interrupt from the register 0x5B bit 0 t...
Definition: bmi160.c:9683
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hyst(u8 v_flat_hyst_u8)
This API write flat interrupt hysteresis from the register 0x68 bit 0 to 3.
Definition: bmi160.c:12091
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_axis(u8 *acc_selftest_axis)
This API read accel select axis to be self-test.
Definition: bmi160.c:13696
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g(u8 v_channel_u8, u8 *v_intr_high_g_u8)
Reads the HIGH g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57...
Definition: bmi160.c:7795
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_skip(u8 v_int_sig_mot_skip_u8)
This API is used to write the significant skip time from the register 0x62 bit 2 and 3...
Definition: bmi160.c:10821
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_data_rdy(u8 v_channel_u8, u8 *v_intr_data_rdy_u8)
Reads Data Ready interrupt mapped to interrupt1 and interrupt2 form the register 0x56.
Definition: bmi160.c:9170
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spare0_trim(u8 v_spare0_trim_u8)
This API write the spare zero form register 0x70 bit 3.
Definition: bmi160.c:14147
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_range(u8 *v_range_u8)
This API is used to get the ranges (g values) of the accel from the register 0x41 bit 0 to 3...
Definition: bmi160.c:3913
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_xyz(struct bmi160_gyro_t *gyro)
This API reads gyro data X,Y,Z values from the register 0x0C to 0x11.
Definition: bmi160.c:1248
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_select(u8 *v_i2c_wdt_u8)
This API read I2C Watchdog timer from the register 0x70 bit 1.
Definition: bmi160.c:13074
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_range(u8 *v_range_u8)
This API reads the range of gyro from the register 0x43 bit 0 to 2.
Definition: bmi160.c:4228
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_single_tap(u8 v_channel_u8, u8 v_intr_single_tap_u8)
Write the Single Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 a...
Definition: bmi160.c:8388
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_level(u8 v_channel_u8, u8 *v_intr_level_u8)
API used for get the Configure level condition of interrupt1 and interrupt2 pin form the register 0x5...
Definition: bmi160.c:6998
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi3(u8 *v_spi3_u8)
This API read to configure SPI Interface Mode for primary and OIS interface from the register 0x6B bi...
Definition: bmi160.c:12988
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_2(u8 enable, u8 v_intr_enable_2_u8)
This API is used to set interrupt enable byte2 from the register bit 0x52 bit 0 to 3...
Definition: bmi160.c:6692
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_output_data_rate(u8 *v_output_data_rate_u8)
This API is used to get the accel output date rate form the register 0x40 bit 0 to 3...
Definition: bmi160.c:3398
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_burst(u8 *v_mag_burst_u8)
This API is used to read Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1...
Definition: bmi160.c:5552
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_flat(u8 *flat)
This API reads the flat status from the register 0x1F bit 7.
Definition: bmi160.c:3220
void(* delay_msec)(BMI160_MDELAY_DATA_TYPE)
Definition: bmi160.h:1161
BMI160_RETURN_FUNCTION_TYPE bmi160_init(struct bmi160_t *bmi160)
This function is used for initialize bus read and bus write functions assign the chip id and device a...
Definition: bmi160.c:142
BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_header_data_user_defined_length(u16 v_fifo_user_length_u16, u8 v_mag_if_mag_u8, struct bmi160_fifo_data_header_t *fifo_header_data)
This function used for reading the fifo data of header mode for using user defined length...
Definition: bmi160.c:16219
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_counter(u8 *v_nvm_counter_u8)
This API read the NVM counter form register 0x70 bit 4 to 7.
Definition: bmi160.c:14188
BMI160_RETURN_FUNCTION_TYPE bmi160_set_if_mode(u8 v_if_mode_u8)
This API write I2C interface configuration(if) moe from the register 0x6B bit 4 and 5...
Definition: bmi160.c:13283
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_level(u8 v_channel_u8, u8 v_intr_level_u8)
API used for set the Configure level condition of interrupt1 and interrupt2 pin form the register 0x5...
Definition: bmi160.c:7056
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_time_enable(u8 v_fifo_time_enable_u8)
This API set fifo sensor time frame after the last valid data frame form the register 0x47 bit 1...
Definition: bmi160.c:4898
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_thres(u8 v_tap_thres_u8)
This API write Threshold of the single/double tap interrupt from the register 0x64 bit 0 to 4...
Definition: bmi160.c:11318
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_data_rdy(u8 *v_data_rdy_u8)
This API reads the status of gyro data ready form the register 0x1B bit 6 The status get reset when g...
Definition: bmi160.c:1852
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_fifo_filter_data(u8 v_gyro_fifo_filter_data_u8)
This API is used to set gyro fifo filter data from the register 0x45 bit 3.
Definition: bmi160.c:4566
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_axis(u8 acc_selftest_axis)
This API write accel select axis to be self-test.
Definition: bmi160.c:13736
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_source(u8 *v_tap_source_u8)
This API reads data source for the interrupt engine for the single and double tap interrupts from the...
Definition: bmi160.c:9298
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_enable(u8 acc_off_en)
This API write the accel offset enable bit from the register 0x77 bit 6.
Definition: bmi160.c:14995
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient(u8 v_channel_u8, u8 v_intr_orient_u8)
Write the Orient interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0...
Definition: bmi160.c:8522
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi3(u8 v_spi3_u8)
This API write to configure SPI Interface Mode for primary and OIS interface from the register 0x6B b...
Definition: bmi160.c:13026
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_detector_enable(u8 v_step_intr_u8)
This API is used to set interrupt enable step detector interrupt from the register bit 0x52 bit 3...
Definition: bmi160.c:6817
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_nomotion_intr(u8 *nomo_intr)
This API reads data ready no motion interrupt status from the register 0x1D bit 7 flag is associated ...
Definition: bmi160.c:2607
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_foc_trigger(u8 axis, u8 foc_acc, s8 *accel_offset)
This API writes accel fast offset compensation from the register 0x69 bit 0 to 5. ...
Definition: bmi160.c:12417
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_x(s16 *v_mag_x_s16, u8 v_sensor_select_u8)
This API reads magnetometer data X values from the register 0x04 and 0x05.
Definition: bmi160.c:666
BMI160_RETURN_FUNCTION_TYPE bmi160_read_bmm150_mag_trim(void)
This function used for read the trim values of magnetometer.
Definition: bmi160.c:18128
BMI160_RETURN_FUNCTION_TYPE bmi160_get_data_rdy_mag(u8 *v_data_rdy_u8)
This API reads the status of mag data ready from the register 0x1B bit 5 The status get reset when on...
Definition: bmi160.c:1817
BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_data(u8 *v_fifodata_u8, u16 v_fifo_length_u16)
This API reads the fifo data of the sensor from the register 0x24.
Definition: bmi160.c:3350
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_wm(u8 v_channel_u8, u8 v_intr_fifo_wm_u8)
Write FIFO Watermark interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 6 and 2...
Definition: bmi160.c:9091
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_select(u8 *int_sig_mot_sel)
This API is used to select the significant or any motion interrupt from the register 0x62 bit 1...
Definition: bmi160.c:10602
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_sign(u8 *v_high_g_sign_u8)
This API reads the high sign status from the register 0x1F bit 3.
Definition: bmi160.c:3102
BMI160_RD_FUNC_PTR
Definition: bmi160.h:1159
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyzr(struct bmi160_mag_xyzr_t *mag)
This API reads magnetometer data X,Y,Z,r values from the register 0x04 to 0x0B.
Definition: bmi160.c:1024
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_x(s16 *v_accel_x_s16)
This API reads accelerometer data X values form the register 0x12 and 0x13.
Definition: bmi160.c:1317
Structure bmm150 mag trim data.
Definition: bmi160.h:1217
BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_set_power_mode(u8 mag_pow_mode)
This function used for set the magnetometer power mode.
Definition: bmi160.c:17870
unsigned short int u16
Definition: bmi160.h:267
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_any_motion_intr(u8 *v_any_motion_intr_u8)
This API reads the any motion interrupt status from the register 0x1C bit 2 flag is associated with a...
Definition: bmi160.c:2019
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_config(u16 *v_step_config_u16)
This API Reads step counter configuration from the register 0x7A bit 0 to 7 and from the register 0x7...
Definition: bmi160.c:15165
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_yaxis(s16 v_gyro_off_y_s16)
This API write gyro manual offset compensation of y axis from the register 0x75 bit 0 to 7 and 0x77 b...
Definition: bmi160.c:14733
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_data(u8 *v_mag_write_data_u8)
This API is used to read magnetometer write data form the resister 0x4F bit 0 to 7.
Definition: bmi160.c:5965
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_z(s16 *v_mag_z_s16, u8 v_sensor_select_u8)
This API reads magnetometer data Z values from the register 0x08 and 0x09.
Definition: bmi160.c:802
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr1_enable(u8 v_fifo_tag_intr1_u8)
This API set FIFO tag interrupt1 enable status from the resister 0x47 bit 3.
Definition: bmi160.c:5074
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_wm(u8 v_fifo_wm_u8)
This API is used to Trigger an interrupt when FIFO contains water mark level from the register 0x46 b...
Definition: bmi160.c:4823
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_bw(u8 *v_bw_u8)
This API is used to get the accel bandwidth from the register 0x40 bit 4 to 6.
Definition: bmi160.c:3699
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_hyst(u8 v_low_hyst_u8)
This API write Low-g interrupt hysteresis from the register 0x5C bit 0 to 1.
Definition: bmi160.c:9749
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_zaxis(s16 v_gyro_off_z_s16)
This API write gyro manual offset compensation of z axis from the register 0x76 bit 0 to 7 and 0x77 b...
Definition: bmi160.c:14871
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_y(s16 *v_accel_y_s16)
This API reads accelerometer data Y values form the register 0x14 and 0x15.
Definition: bmi160.c:1363
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_durn(u8 *v_slow_no_motion_u8)
This API read Slow/no-motion interrupt trigger delay duration from the register 0x5F bit 2 to 7...
Definition: bmi160.c:10218
BMI160_RETURN_FUNCTION_TYPE bmi160_get_target_page(u8 *v_target_page_u8)
This API read target page from the register 0x7F bit 4 and 5.
Definition: bmi160.c:15631
BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_headerless_mode_user_defined_length(u16 v_fifo_user_length_u16, struct bmi160_fifo_data_header_less_t *fifo_data, u8 v_mag_if_mag_u8)
This function used for reading the fifo data of header less mode for using user defined length...
Definition: bmi160.c:16912
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_significant_intr(u8 *sigmot_intr)
This API reads the significant motion interrupt status from the register 0x1C bit 1 flag is associate...
Definition: bmi160.c:1977
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_xaxis(s16 v_gyro_off_x_s16)
This API write gyro manual offset compensation of x axis from the register 0x74 bit 0 to 7 and 0x77 b...
Definition: bmi160.c:14599
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_config(u16 v_step_config_u16)
This API write step counter configuration from the register 0x7A bit 0 to 7 and from the register 0x7...
Definition: bmi160.c:15217
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_counter_enable(u8 v_step_counter_u8)
This API write enable step counter from the register 0x7B bit 3.
Definition: bmi160.c:15316
signed int s32
Definition: bmi160.h:262
BMI160_RETURN_FUNCTION_TYPE bmi160_set_command_register(u8 v_command_reg_u8)
This API writes value to the register 0x7E bit 0 to 7.
Definition: bmi160.c:15601
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_pmu_trigger_intr(u8 *v_pmu_trigger_intr_u8)
This API reads the power mode trigger interrupt status from the register 0x1C bit 3 flag is associate...
Definition: bmi160.c:2063
Structure containing bmm150 and akm09911 magnetometer values for x,y and z-axis in s16...
Definition: bmi160.h:1168
BMI160_RETURN_FUNCTION_TYPE bmi160_accel_foc_trigger_xyz(u8 v_foc_accel_x_u8, u8 v_foc_accel_y_u8, u8 v_foc_accel_z_u8, s8 *acc_off_x, s8 *acc_off_y, s8 *acc_off_z)
This API write fast accel offset compensation it writes all axis together.To the register 0x69 bit 0 ...
Definition: bmi160.c:12633
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_interface_normal(void)
This API switch mag interface to normal mode and confirm whether the mode switching done successfully...
Definition: bmi160.c:619
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_z(s16 *v_accel_z_s16)
This API reads accelerometer data Z values form the register 0x16 and 0x17.
Definition: bmi160.c:1409
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_wm(u8 v_channel_u8, u8 *v_intr_fifo_wm_u8)
Reads FIFO Watermark interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 6 and 2...
Definition: bmi160.c:9026
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_gyro_enable(u8 *v_fifo_gyro_u8)
This API is used to read stored gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7...
Definition: bmi160.c:5385
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_thres(u8 *v_tap_thres_u8)
This API read Threshold of the single/double tap interrupt from the register 0x64 bit 0 to 4...
Definition: bmi160.c:11275
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_mode(u8 v_low_g_mode_u8)
This API write Low-g interrupt mode from the register 0x5C bit 2.
Definition: bmi160.c:9829
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_high_source(u8 *v_low_high_source_u8)
This API Reads Data source for the interrupt engine for the low and high g interrupts from the regist...
Definition: bmi160.c:9385
bmi160 structure This structure holds all relevant information about bmi160
Definition: bmi160.h:1154
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_2(u8 enable, u8 *v_intr_enable_2_u8)
This API is used to read interrupt enable byte2 from the register bit 0x52 bit 0 to 3...
Definition: bmi160.c:6618
BMI160_RETURN_FUNCTION_TYPE bmi160_set_pullup_configuration(u8 v_control_pullup_u8)
This API write pull up configuration from the register 0X85 bit 4 an 5.
Definition: bmi160.c:15840
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_enable(u8 *v_mag_manual_u8)
This API is used to read Enable register access on MAG_IF[2] or MAG_IF[3] writes. This implies that t...
Definition: bmi160.c:5725
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_1(u8 enable, u8 v_intr_enable_1_u8)
This API is used to set interrupt enable byte1 from the register 0x51 bit 0 to 6. ...
Definition: bmi160.c:6454
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_data_rdy_intr(u8 *v_data_rdy_intr_u8)
This API reads data ready interrupt status from the register 0x1D bit 4 flag is associated with a spe...
Definition: bmi160.c:2462
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient(u8 v_channel_u8, u8 *v_intr_orient_u8)
Reads the Orient interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0...
Definition: bmi160.c:8461
BMI160_RETURN_FUNCTION_TYPE bmi160_set_output_enable(u8 v_channel_u8, u8 v_output_enable_u8)
API used to set the Output enable for interrupt1 and interrupt2 pin from the register 0x53...
Definition: bmi160.c:7326
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_z(u8 *v_orient_z_u8)
This API reads the status of orient z plane from the register 0x1F bit 6.
Definition: bmi160.c:3181
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hyst(u8 *v_flat_hyst_u8)
This API read flat interrupt hysteresis from the register 0x68 bit 0 to 3.
Definition: bmi160.c:12056
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_thres(u8 v_any_motion_thres_u8)
This API is used to write threshold definition for the any-motion interrupt from the register 0x60 bi...
Definition: bmi160.c:10371
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_theta(u8 v_orient_theta_u8)
This API write Orient blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5.
Definition: bmi160.c:11671
BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_counter(u8 v_nvm_counter_u8)
This API write the NVM counter form register 0x70 bit 4 to 7.
Definition: bmi160.c:14222
BMI160_RETURN_FUNCTION_TYPE bmi160_get_paging_enable(u8 *v_page_enable_u8)
This API read page enable from the register 0x7F bit 7.
Definition: bmi160.c:15716
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_state(u8 v_gyro_sleep_state_u8)
This API write Target state for gyro sleep mode from the register 0x6C bit 5.
Definition: bmi160.c:13560
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_z(u8 *v_tap_first_z_u8)
This API reads the tap first z interrupt status from the register 0x1E bit 6.
Definition: bmi160.c:2893
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_counter_enable(u8 *v_step_counter_u8)
This API read enable step counter from the register 0x7B bit 3.
Definition: bmi160.c:15283
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_skip(u8 *v_int_sig_mot_skip_u8)
This API is used to read the significant skip time from the register 0x62 bit 2 and 3...
Definition: bmi160.c:10779
#define BMI160_RETURN_FUNCTION_TYPE
Definition: bmi160.h:748
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_y(u8 *v_any_motion_first_y_u8)
This API reads the status of any motion first y interrupt from the register 0x1E bit 1...
Definition: bmi160.c:2686
BMI160_RETURN_FUNCTION_TYPE bmi160_set_input_enable(u8 v_channel_u8, u8 v_input_en_u8)
API used to set input enable for interrupt1 and interrupt2 pin from the register 0x54.
Definition: bmi160.c:7580
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_shock(u8 v_tap_shock_u8)
This API write the tap shock duration from the register 0x63 bit 2.
Definition: bmi160.c:11136
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hold(u8 v_flat_hold_u8)
This API write Flat interrupt hold time; from the register 0x68 bit 4 and 5.
Definition: bmi160.c:12011
BMI160_WR_FUNC_PTR
Definition: bmi160.h:1158
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_device_addr(u8 v_i2c_device_addr_u8)
This API is used to set I2C device address of auxiliary mag from the register 0x4B bit 1 to 7...
Definition: bmi160.c:5507
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_trigger(u8 v_gyro_sleep_trigger_u8)
This API write gyro sleep trigger from the register 0x6C bit 0 to 2.
Definition: bmi160.c:13383
BMI160_RETURN_FUNCTION_TYPE bmi160_get_pullup_configuration(u8 *v_control_pullup_u8)
This API read pull up configuration from the register 0X85 bit 4 an 5.
Definition: bmi160.c:15803
BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_header_data(u8 v_mag_if_u8, struct bmi160_fifo_data_header_t *header_data)
This function used for reading the fifo data of header mode.
Definition: bmi160.c:16180
BMI160_RETURN_FUNCTION_TYPE bmi160_get_output_enable(u8 v_channel_u8, u8 *v_output_enable_u8)
API used to get the Output enable for interrupt1 and interrupt2 pin from the register 0x53...
Definition: bmi160.c:7265
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spare0_trim(u8 *v_spare0_trim_u8)
This API read the spare zero form register 0x70 bit 3.
Definition: bmi160.c:14113
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_read_addr(u8 v_mag_read_addr_u8)
This API is used to set magnetometer write address from the register 0x4D bit 0 to 7...
Definition: bmi160.c:5859
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g(u8 v_channel_u8, u8 v_intr_low_g_u8)
set the Low g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57 ...
Definition: bmi160.c:7710
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_0(u8 enable, u8 v_intr_enable_zero_u8)
This API is used to set interrupt enable from the register 0x50 bit 0 to 7.
Definition: bmi160.c:6176
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_power_mode_stat(u8 *v_accel_power_mode_stat_u8)
This API reads the accelerometer power mode from PMU status register 0x03 bit 4 and 5...
Definition: bmi160.c:590
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_y(u8 *v_high_g_first_y_u8)
This API reads the high_g first y status from the register 0x1F bit 1.
Definition: bmi160.c:3018
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_shock(u8 *v_tap_shock_u8)
This API read the tap shock duration from the register 0x63 bit 2.
Definition: bmi160.c:11099
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_mag_enable(u8 *v_fifo_mag_u8)
This API is used to read stored magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5...
Definition: bmi160.c:5208
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_fail_err(u8 *v_i2c_error_code_u8)
This API Reads the i2c error code from the Register 0x02 bit 5. This error occurred in I2C master det...
Definition: bmi160.c:321
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyz(struct bmi160_mag_t *mag, u8 v_sensor_select_u8)
This API reads magnetometer data X,Y,Z values from the register 0x04 to 0x09.
Definition: bmi160.c:914
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fatal_err(u8 *v_fatal_err_u8)
This API used to reads the fatal error from the Register 0x02 bit 0 This flag will be reset only by p...
Definition: bmi160.c:243
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_selftest_start(u8 v_gyro_selftest_start_u8)
This API write gyro self test trigger.
Definition: bmi160.c:13987
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_output_data_rate(u8 v_output_data_rate_u8, u8 v_accel_bw_u8)
This API is used to set the accel output date rate form the register 0x40 bit 0 to 3...
Definition: bmi160.c:3481
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_trigger(u8 v_gyro_wakeup_trigger_u8)
This API write gyro wakeup trigger from the register 0x6C bit 3 and 4.
Definition: bmi160.c:13473
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_wm_intr(u8 *v_fifo_wm_intr_u8)
This API reads data ready FIFO watermark interrupt status from the register 0x1D bit 6 flag is associ...
Definition: bmi160.c:2553
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_durn(u8 nomotion)
This API write any motion duration from the register 0x5F bit 0 and 1.
Definition: bmi160.c:10170
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_durn(u8 v_slow_no_motion_u8)
This API write Slow/no-motion interrupt trigger delay duration from the register 0x5F bit 2 to 7...
Definition: bmi160.c:10260
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_wm(u8 *v_fifo_wm_u8)
This API is used to Trigger an interrupt when FIFO contains water mark level from the register 0x46 b...
Definition: bmi160.c:4787
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_output_data_rate(u8 *odr)
This API is used to get the output data rate of magnetometer from the register 0x44 bit 0 to 3...
Definition: bmi160.c:4332
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_state(u8 *v_gyro_sleep_state_u8)
This API read Target state for gyro sleep mode from the register 0x6C bit 5.
Definition: bmi160.c:13522
unsigned int u32
Definition: bmi160.h:268
Structure containing accel gyro data and sensor time.
Definition: bmi160.h:1201
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_mag_enable(u8 v_fifo_mag_u8)
This API is used to set stored magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5...
Definition: bmi160.c:5244
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_detector_enable(u8 *v_step_intr_u8)
This API is used to read interrupt enable step detector interrupt from the register bit 0x52 bit 3...
Definition: bmi160.c:6779
unsigned char u8
Definition: bmi160.h:266
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr2_enable(u8 v_fifo_tag_intr2_u8)
This API set FIFO tag interrupt2 enable status from the resister 0x47 bit 2.
Definition: bmi160.c:4988
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hold(u8 *v_flat_hold_u8)
This API read Flat interrupt hold time; from the register 0x68 bit 4 and 5.
Definition: bmi160.c:11972
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_0(u8 enable, u8 *v_intr_enable_zero_u8)
This API is used to read interrupt enable from the register 0x50 bit 0 to 7.
Definition: bmi160.c:6050
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi_enable(u8 *v_spi_enable_u8)
This API read primary interface selection I2C or SPI from the register 0x70 bit 0.
Definition: bmi160.c:14036
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_header_enable(u8 v_fifo_header_u8)
This API set FIFO frame header enable from the register 0x47 bit 4.
Definition: bmi160.c:5160
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_output_data_rate(u8 *gyro_output_typer)
This API is used to get the gyroscope output data rate from the register 0x42 bit 0 to 3...
Definition: bmi160.c:4023
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_select(u8 v_intr_slow_no_motion_select_u8)
This API is used to write the slow/no-motion selection from the register 0x62 bit 0...
Definition: bmi160.c:10550
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion(u8 v_channel_u8, u8 v_intr_any_motion_u8)
Write the Any motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 a...
Definition: bmi160.c:7988
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_calib_values(u8 v_rcoil_u8)
This function used for read the YAMAHA YAS537 calibration data.
Definition: bmi160.c:20109
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_xaxis(s16 *v_gyro_off_x_s16)
This API read gyro manual offset compensation of x axis from the register 0x74 bit 0 to 7 and 0x77 bi...
Definition: bmi160.c:14547
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_edge_ctrl(u8 v_channel_u8, u8 *v_intr_edge_ctrl_u8)
Configure trigger condition of interrupt1 and interrupt2 pin from the register 0x53.
Definition: bmi160.c:6868
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas537_acquisition_command_register(u8 v_command_reg_data_u8)
This function used for YAS537 write data acquisition command register write.
Definition: bmi160.c:20473
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_range(u8 v_range_u8)
This API set the range of gyro from the register 0x43 bit 0 to 2.
Definition: bmi160.c:4267
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_rdy(u8 *v_foc_rdy_u8)
This API reads the fast offset compensation status form the register 0x1B bit 3.
Definition: bmi160.c:1744
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_high_g_intr(u8 *v_high_g_intr_u8)
This API reads the high_g interrupt status from the register 0x1D bit 2 flag is associated with a spe...
Definition: bmi160.c:2358
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi_enable(u8 v_spi_enable_u8)
This API write primary interface selection I2C or SPI from the register 0x70 bit 0.
Definition: bmi160.c:14072
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_proof(u8 int_sig_mot_proof)
This API is used to write the significant proof time from the register 0x62 bit 4 and 5...
Definition: bmi160.c:10919
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_enable(u8 v_gyro_off_enable_u8)
This API write the accel offset enable bit from the register 0x77 bit 7.
Definition: bmi160.c:15080
#define YAS532_MAG_TEMPERATURE_LOG
Definition: bmi160.h:985
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_xy(u8 *v_orient_xy_u8)
This API reads the status of orient_xy plane from the register 0x1F bit 4 and 5.
Definition: bmi160.c:3143
Structure containing gyro xyz data.
Definition: bmi160.h:1185
signed short int s16
Definition: bmi160.h:261
BMI160_RETURN_FUNCTION_TYPE bmi160_unmap_significant_motion_intr(u8 v_significant_u8)
This API used to unmap the signification motion interrupt.
Definition: bmi160.c:10700
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_fifo_filter_data(u8 *v_gyro_fifo_filter_data_u8)
This API is used to read gyro fifo filter data from the register 0x45 bit 3.
Definition: bmi160.c:4527
s32 bmi160_bmm150_mag_compensate_Y(s16 v_mag_data_y_s16, u16 v_data_r_u16)
This API used to get the compensated BMM150-Y data the out put of Y as s32 Before start reading the m...
Definition: bmi160.c:17493
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_accel_enable(u8 *v_fifo_accel_u8)
This API is used to read stored accel data in FIFO (all 3 axes) from the register 0x47 bit 6...
Definition: bmi160.c:5297
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_single_tap(u8 v_channel_u8, u8 *v_intr_single_tap_u8)
Reads the Single Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 a...
Definition: bmi160.c:8328
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_measure_xyz_data(u8 *v_ouflow_u8, struct yas_vector *vector_xyz)
This function used for read the YAMAHA YAS537 xy1y2 data.
Definition: bmi160.c:20676
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_x(s16 *v_gyro_x_s16)
This API reads gyro data X values form the register 0x0C and 0x0D.
Definition: bmi160.c:1111
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat(u8 v_channel_u8, u8 v_intr_flat_u8)
Write the Flat interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57...
Definition: bmi160.c:8661
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr2_enable(u8 *v_fifo_tag_intr2_u8)
This API reads FIFO tag interrupt2 enable status from the resister 0x47 bit 2.
Definition: bmi160.c:4949
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_theta(u8 v_flat_theta_u8)
This API write Flat angle (0 to 44.8) for flat interrupt from the register 0x67 bit 0 to 5...
Definition: bmi160.c:11922
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_durn(u8 *v_low_durn_u8)
This API is used to read the low_g duration from register 0x5A bit 0 to 7.
Definition: bmi160.c:9562
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_gyro_sensor_time(u8 accel_gyro_sensortime_select, struct bmi160_sensortime_accel_gyro_data *accel_gyro_sensor_time)
This API reads sensor_time ,Accel data ,Gyro data from the register 0x0C to 0x1A. ...
Definition: bmi160.c:1566
YAMAHA-YAS532 struct Calibration YAS532 data struct.
Definition: bmi160.h:11742
signed short int s16
Definition: bma2x2.h:187
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_zaxis(s8 *v_accel_off_z_s8)
This API read accel manual offset compensation of z axis from the register 0x73 bit 0 to 7...
Definition: bmi160.c:14452
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_x(u8 *v_foc_accel_x_u8)
This API read accel offset compensation target value for x-axis is from the register 0x69 bit 4 and 5...
Definition: bmi160.c:12316
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_gyro(u8 v_fifo_down_gyro_u8)
This API is used to set Down sampling for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2...
Definition: bmi160.c:4480
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_thres(u8 *v_any_motion_thres_u8)
This API is used to read threshold definition for the any-motion interrupt from the register 0x60 bit...
Definition: bmi160.c:10319
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_offset(u8 v_mag_offset_u8)
This API is used to set trigger-readout offset in units of 2.5 ms. If set to zero, the offset is maximum, i.e. after readout a trigger is issued immediately. from the register 0x4C bit 2 to 5.
Definition: bmi160.c:5675
BMI160_RETURN_FUNCTION_TYPE bmi160_read_step_count(s16 *v_step_cnt_s16)
This API reads step counter value form the register 0x78 and 0x79.
Definition: bmi160.c:15124
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_z(s16 *v_gyro_z_s16)
This API reads gyro data Z values form the register 0x10 and 0x11.
Definition: bmi160.c:1202
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_bw(u8 v_bw_u8)
This API is used to set the accel bandwidth from the register 0x40 bit 4 to 6.
Definition: bmi160.c:3763
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_double_tap(u8 v_channel_u8, u8 v_intr_double_tap_u8)
Write the Double Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 a...
Definition: bmi160.c:8256
BMI160_RETURN_FUNCTION_TYPE bmi160_get_input_enable(u8 v_channel_u8, u8 *v_input_en_u8)
API used to get input enable for interrupt1 and interrupt2 pin from the register 0x54.
Definition: bmi160.c:7520
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g(u8 v_channel_u8, u8 v_intr_high_g_u8)
Write the HIGH g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57...
Definition: bmi160.c:7856
unsigned char u8
Definition: bma2x2.h:192
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_select(u8 int_sig_mot_sel)
This API is used to write, select the significant or any motion interrupt from the register 0x62 bit ...
Definition: bmi160.c:10644
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_yaxis(s8 *v_accel_off_y_s8)
This API read accel manual offset compensation of y axis from the register 0x72 bit 0 to 7...
Definition: bmi160.c:14359
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_x(u8 *v_anymotion_first_x_u8)
This API reads the status of any motion first x from the register 0x1E bit 0.
Definition: bmi160.c:2645
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr1_enable(u8 *v_fifo_tag_intr1_u8)
This API get FIFO tag interrupt1 enable status from the resister 0x47 bit 3.
Definition: bmi160.c:5038
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_read_xy1y2_data(u8 *v_coil_stat_u8, u8 *v_busy_u8, u16 *v_temperature_u16, u16 *xy1y2, u8 *v_ouflow_u8)
This function used for read the YAMAHA YAS537 xy1y2 data.
Definition: bmi160.c:20541
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_x(u8 *v_high_g_first_x_u8)
This API reads the high_g first x status from the register 0x1F bit 0.
Definition: bmi160.c:2976
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_mode(u8 *v_low_g_mode_u8)
This API reads Low-g interrupt mode from the register 0x5C bit 2.
Definition: bmi160.c:9793
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_hyst(u8 *v_orient_hyst_u8)
This API read Orient interrupt hysteresis, from the register 0x64 bit 4 to 7.
Definition: bmi160.c:11556
BMI160_RETURN_FUNCTION_TYPE bmi160_get_drop_cmd_err(u8 *v_drop_cmd_err_u8)
This API Reads the dropped command error from the register 0x02 bit 6.
Definition: bmi160.c:355
BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_length(u32 *v_fifo_length_u32)
This API reads the of the sensor form the register 0x23 and 0x24 bit 0 to 7 and 0 to 2...
Definition: bmi160.c:3299
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_nomotion(u8 v_channel_u8, u8 v_intr_nomotion_u8)
Write the No motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 an...
Definition: bmi160.c:8127
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_yaxis(s16 *v_gyro_off_y_s16)
This API read gyro manual offset compensation of y axis from the register 0x75 bit 0 to 7 and 0x77 bi...
Definition: bmi160.c:14681
BMI160_RETURN_FUNCTION_TYPE bmi160_second_if_mag_compensate_xyz(struct bmi160_mag_fifo_data_t mag_fifo_data, u8 v_mag_second_if_u8)
This function used for reading the compensated data of mag secondary interface xyz data...
Definition: bmi160.c:15892
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_thres(u8 *v_low_g_thres_u8)
This API is used to read Threshold definition for the low-g interrupt from the register 0x5B bit 0 to...
Definition: bmi160.c:9641
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_y(u8 *v_tap_first_y_u8)
This API reads the tap first y interrupt status from the register 0x1E bit 5.
Definition: bmi160.c:2851
BMI160_RETURN_FUNCTION_TYPE bmi160_get_error_status(u8 *v_fatal_er_u8r, u8 *v_err_code_u8, u8 *v_i2c_fail_err_u8, u8 *v_drop_cmd_err_u8, u8 *v_mag_data_rdy_err_u8)
This API reads the error status from the error register 0x02 bit 0 to 7.
Definition: bmi160.c:433
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_mode(u8 v_step_mode_u8)
This API set Step counter modes.
Definition: bmi160.c:15365
s32 bmi160_bmm150_mag_compensate_Z(s16 v_mag_data_z_s16, u16 v_data_r_u16)
This API used to get the compensated BMM150-Z data the out put of Z as s32 Before start reading the m...
Definition: bmi160.c:17558
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_single_tap_intr(u8 *v_single_tap_intr_u8)
This API reads the single tab status from the register 0x1C bit 5 flag is associated with a specific ...
Definition: bmi160.c:2181
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_burst(u8 v_mag_burst_u8)
This API is used to set Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1...
Definition: bmi160.c:5589
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_sign(u8 *tap_sign)
This API reads the tap sign status from the register 0x1E bit 7.
Definition: bmi160.c:2934
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_durn(u8 *v_high_g_durn_u8)
This API is used to read Delay time definition for the high-g interrupt from the register 0x5D bit 0 ...
Definition: bmi160.c:9967
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_gyro_enable(u8 v_fifo_gyro_u8)
This API is used to set stored gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7...
Definition: bmi160.c:5423
BMI160_RETURN_FUNCTION_TYPE bmi160_get_temp(s16 *v_temp_s16)
This API reads the temperature of the sensor from the register 0x21 bit 0 to 7.
Definition: bmi160.c:3256
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_select(u8 *v_intr_slow_no_motion_select_u8)
This API is used to read the slow/no-motion selection from the register 0x62 bit 0.
Definition: bmi160.c:10509
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_device_addr(u8 *v_i2c_device_addr_u8)
This API is used to read I2C device address of auxiliary mag from the register 0x4B bit 1 to 7...
Definition: bmi160.c:5471
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_full_intr(u8 *v_fifo_full_intr_u8)
This API reads data ready FIFO full interrupt status from the register 0x1D bit 5 flag is associated ...
Definition: bmi160.c:2507
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_mode(u8 *v_orient_mode_u8)
This API read the threshold for orientation interrupt from the register 0x65 bit 0 and 1...
Definition: bmi160.c:11365
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_addr(u8 *v_mag_write_addr_u8)
This API is used to read magnetometer write address from the register 0x4E bit 0 to 7...
Definition: bmi160.c:5893
unsigned int u32
Definition: bma2x2.h:194
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_z(u8 v_foc_accel_z_u8)
This API write accel offset compensation target value for z-axis from the register 0x69 bit 0 and 1...
Definition: bmi160.c:12177
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_theta(u8 *v_flat_theta_u8)
This API read Flat angle (0 to 44.8) for flat interrupt from the register 0x67 bit 0 to 5...
Definition: bmi160.c:11888
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_low_g_intr(u8 *v_low_g_intr_u8)
This API reads the low g interrupt status from the register 0x1D bit 3 flag is associated with a spec...
Definition: bmi160.c:2415
BMI160_RETURN_FUNCTION_TYPE bmi160_read_reg(u8 v_addr_u8, u8 *v_data_u8, u8 v_len_u8)
This API reads the data from the given register.
Definition: bmi160.c:211
BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_interface_init(u8 *v_chip_id_u8)
This function used for initialize the bmm150 sensor.
Definition: bmi160.c:17594
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_power_mode_stat(u8 *v_mag_power_mode_stat_u8)
This API reads the magnetometer power mode from PMU status register 0x03 bit 0 and 1...
Definition: bmi160.c:499
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_edge_ctrl(u8 v_channel_u8, u8 v_intr_edge_ctrl_u8)
Configure trigger condition of interrupt1 and interrupt2 pin from the register 0x53.
Definition: bmi160.c:6926
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_output_type(u8 v_channel_u8, u8 *v_intr_output_type_u8)
API used to get configured output enable of interrupt1 and interrupt2 from the register 0x53...
Definition: bmi160.c:7129
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_motion_source(u8 v_motion_source_u8)
This API write Data source for the interrupt engine for the nomotion and anymotion interrupts from th...
Definition: bmi160.c:9510
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_blocking(u8 v_orient_blocking_u8)
This API write the orient blocking mode that is used for the generation of the orientation interrupt...
Definition: bmi160.c:11507
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_z(u8 *v_any_motion_first_z_u8)
This API reads the status of any motion first z interrupt from the register 0x1E bit 2...
Definition: bmi160.c:2728
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_fifo_filter_data(u8 v_accel_fifo_filter_u8)
This API is used to set accel fifo filter data from the register 0x45 bit 7.
Definition: bmi160.c:4739
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_ud_enable(u8 *v_orient_ud_u8)
This API read orient change of up/down bit from the register 0x66 bit 6.
Definition: bmi160.c:11719
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_under_sampling_parameter(u8 v_accel_under_sampling_u8)
This API is used to set the accel under sampling parameter form the register 0x40 bit 7...
Definition: bmi160.c:3858
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_mode(u8 v_orient_mode_u8)
This API write the threshold for orientation interrupt from the register 0x65 bit 0 and 1...
Definition: bmi160.c:11405
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_full(u8 v_channel_u8, u8 v_intr_fifo_full_u8)
Write FIFO Full interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 5 and 1...
Definition: bmi160.c:8945
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_rdy(u8 *v_nvm_rdy_u8)
This API Reads the nvm_rdy status from the resister 0x1B bit 4.
Definition: bmi160.c:1782
BMI160_RETURN_FUNCTION_TYPE bmi160_get_if_mode(u8 *v_if_mode_u8)
This API read I2C interface configuration(if) moe from the register 0x6B bit 4 and 5...
Definition: bmi160.c:13244
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_data_rdy(u8 *drdy_acc)
This API reads the status of accel data ready form the register 0x1B bit 7 The status get reset when ...
Definition: bmi160.c:1887
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_intr(u8 v_gyro_wakeup_intr_u8)
This API write gyro wakeup interrupt from the register 0x6C bit 6.
Definition: bmi160.c:13646
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_source(u8 v_tap_source_u8)
This API write data source for the interrupt engine for the single and double tap interrupts from the...
Definition: bmi160.c:9336
signed int s32
Definition: bma2x2.h:188
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_xyz(struct bmi160_accel_t *accel)
This API reads accelerometer data X,Y,Z values from the register 0x12 to 0x17.
Definition: bmi160.c:1455
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_enable(u8 *acc_off_en)
This API read the accel offset enable bit from the register 0x77 bit 6.
Definition: bmi160.c:14956
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_high_source(u8 v_low_high_source_u8)
This API write Data source for the interrupt engine for the low and high g interrupts from the regist...
Definition: bmi160.c:9423
s8 mag_manual_enable
Definition: bmi160.h:1157
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_double_tap(u8 v_channel_u8, u8 *v_intr_double_tap_u8)
Reads the Double Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 a...
Definition: bmi160.c:8198
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_ud_enable(u8 v_orient_ud_u8)
This API write orient change of up/down bit from the register 0x66 bit 6.
Definition: bmi160.c:11757
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_thres(u8 *v_slow_no_motion_thres_u8)
This API is used to read threshold for the slow/no-motion interrupt from the register 0x61 bit 0 to 7...
Definition: bmi160.c:10420
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_theta(u8 *v_orient_theta_u8)
This API read Orient blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5.
Definition: bmi160.c:11636
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_thres(u8 v_high_g_thres_u8)
This API is used to write Threshold definition for the high-g interrupt from the register 0x5E 0 to 7...
Definition: bmi160.c:10105
BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_and_secondary_if_power_mode(u8 v_mag_sec_if_pow_mode_u8)
This function used for set the magnetometer power mode.
Definition: bmi160.c:17780
#define BMI160_FIFO_FRAME_CNT
Definition: bmi160.h:1144
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_durn(u8 *v_any_motion_durn_u8)
This API reads any motion duration from the register 0x5F bit 0 and 1.
Definition: bmi160.c:10135
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_time_enable(u8 *v_fifo_time_enable_u8)
This API reads fifo sensor time frame after the last valid data frame form the register 0x47 bit 1...
Definition: bmi160.c:4859
Structure containing bmm150 xyz data and temperature.
Definition: bmi160.h:1176
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_axes_enable(u8 *v_orient_axes_u8)
This API read orientation axes changes from the register 0x66 bit 7.
Definition: bmi160.c:11805
signed char s8
If your machine support 16 bit define the MACHINE_16_BIT.
Definition: bma2x2.h:186
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_yaxis(s8 v_accel_off_y_s8)
This API write accel manual offset compensation of y axis from the register 0x72 bit 0 to 7...
Definition: bmi160.c:14396
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_output_type(u8 v_channel_u8, u8 v_intr_output_type_u8)
API used to set output enable of interrupt1 and interrupt2 from the register 0x53.
Definition: bmi160.c:7190
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_1(u8 enable, u8 *v_intr_enable_1_u8)
This API is used to read interrupt enable byte1 from the register 0x51 bit 0 to 6.
Definition: bmi160.c:6340
BMI160_RETURN_FUNCTION_TYPE bmi160_map_step_detector_intr(u8 v_step_detector_u8)
This API used to trigger the step detector interrupt.
Definition: bmi160.c:15491
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest_start(u8 *v_gyro_selftest_start_u8)
This API read gyro self test trigger.
Definition: bmi160.c:13955
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_thres(u8 *v_high_g_thres_u8)
This API is used to read Threshold definition for the high-g interrupt from the register 0x5E 0 to 7...
Definition: bmi160.c:10054
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_fifo_xyz_data(u16 *a_xy1y2_u16, u8 v_over_flow_u8, u8 v_rcoil_u8, u8 v_busy_u8)
This function used for read the YAMAHA YAS537 xy1y2 data of fifo.
Definition: bmi160.c:20774
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_xaxis(s8 v_accel_off_x_s8)
This API write accel manual offset compensation of x axis from the register 0x71 bit 0 to 7...
Definition: bmi160.c:14303
BMI160_RETURN_FUNCTION_TYPE bmi160_get_err_code(u8 *v_error_code_u8)
This API used to read the error code from register 0x02 bit 1 to 4.
Definition: bmi160.c:287
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_gyro(u8 *v_fifo_down_gyro_u8)
This API is used to read Down sampling for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2...
Definition: bmi160.c:4444
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_nomotion(u8 v_channel_u8, u8 *v_intr_nomotion_u8)
Reads the No motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 an...
Definition: bmi160.c:8067
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_bw(u8 *v_bw_u8)
This API is used to get the data of gyro from the register 0x42 bit 4 to 5.
Definition: bmi160.c:4138
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g(u8 v_channel_u8, u8 *v_intr_low_g_u8)
reads the Low g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57 ...
Definition: bmi160.c:7650
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_hyst(u8 *v_high_g_hyst_u8)
This API reads High-g interrupt hysteresis from the register 0x5C bit 6 and 7.
Definition: bmi160.c:9881
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_enable(u8 *v_gyro_off_enable_u8)
This API read the accel offset enable bit from the register 0x77 bit 7.
Definition: bmi160.c:15041
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_operation_stat(u8 *v_mag_manual_stat_u8)
This API reads the status of mag manual interface operation form the register 0x1B bit 2...
Definition: bmi160.c:1709
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_pmu_trig(u8 v_channel_u8, u8 *v_intr_pmu_trig_u8)
Reads PMU trigger interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 0 and 4...
Definition: bmi160.c:8739
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_data_rdy(u8 v_channel_u8, u8 v_intr_data_rdy_u8)
Write Data Ready interrupt mapped to interrupt1 and interrupt2 form the register 0x56.
Definition: bmi160.c:9230
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_accel_enable(u8 v_fifo_accel_u8)
This API is used to set stored accel data in FIFO (all 3 axes) from the register 0x47 bit 6...
Definition: bmi160.c:5336
Structure containing accel xyz data.
Definition: bmi160.h:1193
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_orient_intr(u8 *v_orient_intr_u8)
This API reads the orient status from the register 0x1C bit 6 flag is associated with a specific inte...
Definition: bmi160.c:2243
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_intr(u8 *v_gyro_wakeup_intr_u8)
This API read gyro wakeup interrupt from the register 0x6C bit 6.
Definition: bmi160.c:13608
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_full(u8 v_channel_u8, u8 *v_intr_fifo_full_u8)
Reads FIFO Full interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 5 and 1...
Definition: bmi160.c:8881
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_motion_source(u8 *v_motion_source_u8)
This API reads Data source for the interrupt engine for the nomotion and anymotion interrupts from th...
Definition: bmi160.c:9472
BMI160_RETURN_FUNCTION_TYPE bmi160_set_latch_intr(u8 v_latch_intr_u8)
This API is used to set the latch duration from the register 0x54 bit 0 to 3.
Definition: bmi160.c:7465
BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_compensate_xyz(struct bmi160_mag_xyz_s32_t *mag_comp_xyz)
This function used for read the compensated value of mag Before start reading the mag compensated dat...
Definition: bmi160.c:17376
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest(u8 *v_gyro_selftest_u8)
This API reads the Gyroscope self test status from the register 0x1B bit 1.
Definition: bmi160.c:1670
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_prog_enable(u8 *v_nvm_prog_u8)
This API read NVM program enable from the register 0x6A bit 1.
Definition: bmi160.c:12903
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_quiet(u8 v_tap_quiet_u8)
This API write tap quiet duration from the register 0x63 bit 7.
Definition: bmi160.c:11223
u8 chip_id
Definition: bmi160.h:1155
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_proof(u8 *int_sig_mot_proof)
This API is used to read the significant proof time from the register 0x62 bit 4 and 5...
Definition: bmi160.c:10875
BMI160_RETURN_FUNCTION_TYPE bmi160_clear_step_counter(void)
This API used to clear the step counter interrupt interrupt.
Definition: bmi160.c:15552
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_x(u8 *v_tap_first_x_u8)
This API reads the any motion tap first x status from the register 0x1E bit 4.
Definition: bmi160.c:2809
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_durn(u8 *v_tap_durn_u8)
This API is used to get the tap duration from the register 0x63 bit 0 to 2.
Definition: bmi160.c:10976
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_under_sampling_parameter(u8 *v_accel_under_sampling_u8)
This API is used to get the accel under sampling parameter form the register 0x40 bit 7...
Definition: bmi160.c:3816
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_durn(u8 v_tap_durn_u8)
This API is used to write the tap duration from the register 0x63 bit 0 to 2.
Definition: bmi160.c:11022
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_fifo_filter_data(u8 *accel_fifo_filter_u8)
This API is used to read accel fifo filter data from the register 0x45 bit 7.
Definition: bmi160.c:4700
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_quiet(u8 *v_tap_quiet_u8)
This API read tap quiet duration from the register 0x63 bit 7.
Definition: bmi160.c:11184
unsigned short int u16
Definition: bma2x2.h:193
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_sign(u8 *v_anymotion_sign_u8)
This API reads the any motion sign status from the register 0x1E bit 3.
Definition: bmi160.c:2769
signed long long int s64
Definition: bmi160.h:263
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_read_addr(u8 *v_mag_read_addr_u8)
This API is used to read data magnetometer address to read from the register 0x4D bit 0 to 7...
Definition: bmi160.c:5821
unsigned long long int u64
Definition: bmi160.h:269
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_output_data_rate(u8 odr)
This API is used to set the output data rate of magnetometer from the register 0x44 bit 0 to 3...
Definition: bmi160.c:4387
Stores the sensor data.
Definition: bmi160.h:11735
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_blocking(u8 *v_orient_blocking_u8)
This API read the orient blocking mode that is used for the generation of the orientation interrupt...
Definition: bmi160.c:11461
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_amp(u8 acc_selftest_amp)
This API write accel self test amplitude from the register 0x6D bit 3 select amplitude of the selftes...
Definition: bmi160.c:13912
BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_wakeup(void)
This function used for set the mag power control bit enable.
Definition: bmi160.c:17726
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_durn(u8 v_low_durn_u8)
This API is used to write the low_g duration from register 0x5A bit 0 to 7.
Definition: bmi160.c:9604
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_y(u8 *v_foc_accel_y_u8)
This API read accel offset compensation target value for y-axis from the register 0x69 bit 2 and 3...
Definition: bmi160.c:12225
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_addr(u8 v_mag_write_addr_u8)
This API is used to set magnetometer write address from the register 0x4E bit 0 to 7...
Definition: bmi160.c:5931
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_durn(u8 v_high_g_durn_u8)
This API is used to write Delay time definition for the high-g interrupt from the register 0x5D bit 0...
Definition: bmi160.c:10006