![]() |
![]() |
SAILAPIGuide
1_10_00_06
|
#include "bma2x2.h"
Functions | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_burst_read (u8 addr_u8, u8 *data_u8, u32 len_u32) |
This API reads the data from the given register continuously. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_init (struct bma2x2_t *bma2x2) |
This function is used for initialize bus read and bus write functions assign the chip id and device address chip id is read in the register 0x00 bit from 0 to 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_write_reg (u8 adr_u8, u8 *data_u8, u8 len_u8) |
This API gives data to the given register and the data is written in the corresponding register address. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_reg (u8 adr_u8, u8 *data_u8, u8 len_u8) |
This API reads the data from the given register address. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_x (s16 *accel_x_s16) |
This API reads acceleration data X values from location 02h and 03h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_eight_resolution_x (s8 *accel_x_s8) |
This API reads acceleration data X values from location 02h and 03h bit resolution support 8bit. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_y (s16 *accel_y_s16) |
This API reads acceleration data Y values from location 04h and 05h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_eight_resolution_y (s8 *accel_y_s8) |
This API reads acceleration data Y values of 8bit resolution from location 05h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_z (s16 *accel_z_s16) |
This API reads acceleration data Z values from location 06h and 07h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_eight_resolution_z (s8 *accel_z_s8) |
This API reads acceleration data Z values of 8bit resolution from location 07h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_xyz (struct bma2x2_accel_data *accel) |
This API reads acceleration data X,Y,Z values from location 02h to 07h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_eight_resolution_xyz (struct bma2x2_accel_eight_resolution *accel) |
This API reads acceleration of 8 bit resolution data of X,Y,Z values from location 03h , 05h and 07h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_tap_stat (u8 *stat_tap_u8) |
This API read tap-sign, tap-first-xyz slope-sign, slope-first-xyz status register byte from location 0Bh. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_orient_stat (u8 *stat_orient_u8) |
This API read orient, high-sign and high-first-xyz status register byte from location 0Ch. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_fifo_stat (u8 *stat_fifo_u8) |
This API reads fifo overrun and fifo frame counter status register byte from location 0Eh. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_fifo_frame_count (u8 *frame_count_u8) |
This API read fifo frame count from location 0Eh bit position 0 to 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_fifo_overrun (u8 *fifo_overrun_u8) |
This API read fifo overrun from location 0Eh bit position 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_stat (u8 *intr_stat_u8) |
This API read interrupt status of flat, orient, single tap, double tap, slow no motion, slope, highg and lowg from location 09h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_range (u8 *range_u8) |
This API is used to get the ranges(g values) of the sensor in the register 0x0F bit from 0 to 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_range (u8 range_u8) |
This API is used to set the ranges(g values) of the sensor in the register 0x0F bit from 0 to 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_bw (u8 *bw_u8) |
This API is used to get the bandwidth of the sensor in the register 0x10 bit from 0 to 4. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_bw (u8 bw_u8) |
This API is used to set the bandwidth of the sensor in the register 0x10 bit from 0 to 4. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_power_mode (u8 *power_mode_u8) |
This API is used to get the operating modes of the sensor in the register 0x11 and 0x12. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_power_mode (u8 power_mode_u8) |
This API is used to set the operating modes of the sensor in the register 0x11 and 0x12. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_mode_value (u8 power_mode_u8) |
This API is used to assign the power mode values modes of the sensor in the register 0x11 and 0x12. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_sleep_durn (u8 *sleep_durn_u8) |
This API is used to get the sleep duration of the sensor in the register 0x11 Register 0x11 - bit from 0 to 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_sleep_durn (u8 sleep_durn_u8) |
This API is used to set the sleep duration of the sensor in the register 0x11 Register 0x11 - bit from 0 to 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_sleep_timer_mode (u8 *sleep_timer_u8) |
This API is used to get the sleep timer mode in the register 0x12 bit 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_sleep_timer_mode (u8 sleep_timer_u8) |
This API is used to set the sleep timer mode in the register 0x12 bit 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_high_bw (u8 *high_bw_u8) |
This API is used to get high bandwidth in the register 0x13 bit 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_high_bw (u8 high_bw_u8) |
This API is used to write high bandwidth in the register 0x13 bit 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_shadow_dis (u8 *shadow_dis_u8) |
This API is used to get shadow dis in the register 0x13 bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_shadow_dis (u8 shadow_dis_u8) |
This API is used to set shadow dis in the register 0x13 bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_soft_rst (void) |
This function is used for the soft reset The soft reset register will be written with 0xB6 in the register 0x14. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_update_image (void) |
This API is used to update the register values. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_enable (u8 intr_type_u8, u8 *value_u8) |
This API is used to get interrupt enable bits of the sensor in the registers 0x16 and 0x17. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_enable (u8 intr_type_u8, u8 value_u8) |
This API is used to set interrupt enable bits of the sensor in the registers 0x16 and 0x17. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_fifo_full (u8 *fifo_full_u8) |
This API is used to get the interrupt fifo full enable interrupt status in the register 0x17 bit 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_fifo_full (u8 fifo_full_u8) |
This API is used to set the interrupt fifo full enable interrupt status in the register 0x17 bit 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_fifo_wm (u8 *fifo_wm_u8) |
This API is used to get the interrupt fifo watermark enable interrupt status in the register 0x17 bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_fifo_wm (u8 fifo_wm_u8) |
This API is used to set the interrupt fifo watermark enable interrupt status in the register 0x17 bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_slow_no_motion (u8 channel_u8, u8 *slow_no_motion_u8) |
This API is used to get the interrupt status of slow/no motion select and slow no motion enable xyz interrupt in the register 0x18 bit from 0 to 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_slow_no_motion (u8 channel_u8, u8 slow_no_motion_u8) |
This API is used to set the interrupt status of slow/no motion select and slow no motion enable xyz interrupt in the register 0x18 bit from 0 to 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_low_g (u8 channel_u8, u8 *intr_low_g_u8) |
This API is used to get the interrupt enable of low_g interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_low_g (u8 channel_u8, u8 intr_low_u8) |
This API is used to set the interrupt enable of low_g interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_high_g (u8 channel_u8, u8 *intr_high_g_u8) |
This API is used to get the interrupt enable of high_g interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_high_g (u8 channel_u8, u8 intr_high_g_u8) |
This API is used to set the interrupt enable of high_g interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_slope (u8 channel_u8, u8 *intr_slope_u8) |
This API is used to get the interrupt enable of slope interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_slope (u8 channel_u8, u8 intr_slope_u8) |
This API is used to set the interrupt enable of slope interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_slow_no_motion (u8 channel_u8, u8 *intr_slow_no_motion_u8) |
This API is used to get the interrupt enable of slow/no motion interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_slow_no_motion (u8 channel_u8, u8 intr_slow_no_motion_u8) |
This API is used to set the interrupt enable of slow/no motion interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_double_tap (u8 channel_u8, u8 *intr_double_tap_u8) |
This API is used to get the interrupt enable of double tap interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_double_tap (u8 channel_u8, u8 intr_double_tap_u8) |
This API is used to set the interrupt enable of double tap interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_single_tap (u8 channel_u8, u8 *intr_single_tap_u8) |
This API is used to get the interrupt enable of single tap interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_single_tap (u8 channel_u8, u8 intr_single_tap_u8) |
This API is used to set the interrupt enable of single tap interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_orient (u8 channel_u8, u8 *intr_orient_u8) |
This API is used to get the interrupt status of orient interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_orient (u8 channel_u8, u8 intr_orient_u8) |
This API is used to set the interrupt status of orient interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_flat (u8 channel_u8, u8 *intr_flat_u8) |
This API is used to get the interrupt enable of flat interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_flat (u8 channel_u8, u8 intr_flat_u8) |
This API is used to set the interrupt enable of flat interrupt in the register 0x19 and 0x1B. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_new_data (u8 channel_u8, u8 *intr_newdata_u8) |
This API is used to get the interrupt status of new data in the register 0x19. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_new_data (u8 channel_u8, u8 intr_newdata_u8) |
This API is used to set the interrupt status of new data in the register 0x19. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr1_fifo_wm (u8 *intr1_fifo_wm_u8) |
This API is used to get the fifo watermark interrupt1 data in the register 0x1A bit 1. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr1_fifo_wm (u8 intr1_fifo_wm_u8) |
This API is used to set the fifo watermark interrupt1 data in the register 0x1A bit 1. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr2_fifo_wm (u8 *intr2_fifo_wm_u8) |
This API is used to get the fifo watermark interrupt2 data in the register 0x1A bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr2_fifo_wm (u8 intr2_fifo_wm_u8) |
This API is used to set the fifo watermark interrupt2 data in the register 0x1A bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr1_fifo_full (u8 *intr1_fifo_full_u8) |
This API is used to get the fifo full interrupt1 in the register 0x1A bit 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr1_fifo_full (u8 intr1_fifo_full_u8) |
This API is used to set the fifo full interrupt1 in the register 0x1A bit 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr2_fifo_full (u8 *intr2_fifo_full_u8) |
This API is used to get the fifo full interrupt2 in the register 0x1A bit 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr2_fifo_full (u8 intr2_fifo_full_u8) |
This API is used to set the fifo full interrupt2 in the register 0x1A bit 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_source (u8 channel_u8, u8 *intr_source_u8) |
This API is used to get the source data status of source data, source slow no motion, source slope, source high and source low in the register 0x1E bit from 0 to 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_source (u8 channel_u8, u8 intr_source_u8) |
This API is used to set the source data status of source data, source slow no motion, source slope, source high and source low in the register 0x1E bit from 0 to 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_output_type (u8 channel_u8, u8 *intr_output_type_u8) |
This API is used to get the interrupt output type in the register 0x20. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_output_type (u8 channel_u8, u8 intr_output_type_u8) |
This API is used to set the interrupt output type in the register 0x20. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_intr_level (u8 channel_u8, u8 *intr_level_u8) |
This API is used to get Active Level status in the register 0x20. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_intr_level (u8 channel_u8, u8 intr_level_u8) |
This API is used to set Active Level status in the register 0x20. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_rst_intr (u8 rst_intr_u8) |
This API is used to set the reset interrupt in the register 0x21 bit 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_latch_intr (u8 *latch_intr_u8) |
This API is used to get the latch duration in the register 0x21 bit from 0 to 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_latch_intr (u8 latch_intr_u8) |
This API is used to set the latch duration in the register 0x21 bit from 0 to 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_durn (u8 channel_u8, u8 *durn_u8) |
This API is used to get the duration of Low, High, Slope and slow no motion interrupts in the registers. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_durn (u8 channel_u8, u8 durn_u8) |
This API is used to set the duration of Low, High, Slope and slow no motion interrupts in the registers. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_thres (u8 channel_u8, u8 *thres_u8) |
This API is used to get the threshold of Low, High, Slope and slow no motion interrupts in the registers. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_thres (u8 channel_u8, u8 thres_u8) |
This API is used to set the threshold of Low, High, Slope and slow no motion interrupts in the registers. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_low_high_g_hyst (u8 channel_u8, u8 *hyst_u8) |
This API is used to get the low high hysteresis in the registers 0x24. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_low_high_g_hyst (u8 channel_u8, u8 hyst_u8) |
This API is used to set the low high hysteresis in the registers 0x24. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_low_g_mode (u8 *low_g_mode_u8) |
This API is used to get low_g mode in the registers 0x24 bit 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_low_g_mode (u8 low_g_mode_u8) |
This API is used to set low_g mode in the registers 0x24 bit 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_tap_durn (u8 *tap_durn_u8) |
This API is used to get the tap duration in the register 0x2A bit form 0 to 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_tap_durn (u8 tap_durn_u8) |
This API is used to set the tap duration in the register 0x2A bit form 0 to 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_tap_shock (u8 *tap_shock_u8) |
This API is used to get the tap shock form the register 0x2A bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_tap_shock (u8 tap_shock_u8) |
This API is used to set the tap shock form the register 0x2A bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_tap_quiet (u8 *tap_quiet_u8) |
This API is used to get the tap quiet in the register 0x2A bit 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_tap_quiet (u8 tap_quiet_u8) |
This API is used to set the tap quiet in the register 0x2A bit 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_tap_thres (u8 *tap_thres_u8) |
This API is used to get the tap threshold in the register 0x2B bit from 0 to 4. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_tap_thres (u8 tap_thres_u8) |
This API is used to set the tap threshold in the register 0x2B bit from 0 to 4. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_tap_sample (u8 *tap_sample_u8) |
This API is used to get the tap sample in the register 0x2B bit 6 and 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_tap_sample (u8 tap_sample_u8) |
This API is used to set the tap sample in the register 0x2B bit 6 and 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_orient_mode (u8 *orient_mode_u8) |
This API is used to get the orient mode in the register 0x2C bit 0 and 1. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_orient_mode (u8 orient_mode_u8) |
This API is used to set the orient mode in the register 0x2C bit 0 and 1. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_orient_block (u8 *orient_block_u8) |
This API is used to get the orient block in the register 0x2C bit 2 and 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_orient_block (u8 orient_block_u8) |
This API is used to set the orient block in the register 0x2C bit 2 and 3. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_orient_hyst (u8 *orient_hyst_u8) |
This API is used to get the orient hysteresis in the register 0x2C bit 4 to 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_orient_hyst (u8 orient_hyst_u8) |
This API is used to set the orient hysteresis in the register 0x2C bit 4 to 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_theta (u8 channel_u8, u8 *theta_u8) |
This API is used to get the theta value of orient and flat interrupts. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_theta (u8 channel_u8, u8 theta_u8) |
This API is used to set the theta value of orient and flat interrupts. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_orient_enable (u8 *orient_enable_u8) |
This API is used to get the interrupt enable of orient ud_enable in the register 0x2D bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_orient_enable (u8 orient_enable_u8) |
This API is used to set the interrupt enable of orient ud_enable in the register 0x2D bit 6. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_flat_hyst (u8 *flat_hyst_u8) |
This API is used to get the interrupt enable of flat hysteresis("flat_hy) in the register 0x2F bit 0 to 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_flat_hyst (u8 flat_hyst_u8) |
This API is used to set the interrupt enable of flat hysteresis("flat_hy) in the register 0x2F bit 0 to 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_flat_hold_time (u8 *flat_hold_time_u8) |
This API is used to get the interrupt enable of flat hold time(flat_hold_time) in the register 0x2F bit 4 and 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_flat_hold_time (u8 flat_hold_time_u8) |
This API is used to set the interrupt enable of flat hold time(flat_hold_time) in the register 0x2F bit 4 and 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_fifo_wml_trig (u8 *fifo_wml_trig) |
This API is used to get the fifo water mark level trigger in the register 0x30 bit from 0 to 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_fifo_wml_trig (u8 fifo_wml_trig) |
This API is used to set the fifo water mark level trigger in the register 0x30 bit from 0 to 5. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_selftest_axis (u8 *selftest_axis_u8) |
This API is for to get the self test axis(self_test_axis) in the register ox32 bit 0 to 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_selftest_axis (u8 selftest_axis_u8) |
This API is for to set the self test axis(self_test_axis) in the register ox32 bit 0 to 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_selftest_sign (u8 *selftest_sign_u8) |
This API is for to get the Self Test sign(selftest_sign) in the register 0x32 bit 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_selftest_sign (u8 selftest_sign_u8) |
This API is for to set the Self Test sign(selftest_sign) in the register 0x32 bit 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_nvmprog_mode (u8 *nvmprog_mode_u8) |
This API is used to get the nvm program mode(nvm_prog_mode)in the register 0x33 bit 0. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_nvmprog_mode (u8 nvmprog_mode_u8) |
This API is used to set the nvm program mode(nvm_prog_mode)in the register 0x33 bit 0. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_nvprog_trig (u8 nvprog_trig_u8) |
This API is used to set the value of nvm program trig in the register 0x33 bit 1. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_nvmprog_ready (u8 *nvprog_ready_u8) |
This API is used to get the nvm program ready in the register bit 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_nvmprog_remain (u8 *nvprog_remain_u8) |
This API is used to set the nvm program ready in the register bit 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_spi3 (u8 *spi3_u8) |
This API is used to get the enable status of spi3 in the register 0x34 bit 0. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_spi3 (u8 spi3_u8) |
This API is used to set the enable status of spi3 in the register 0x34 bit 0. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_i2c_wdt (u8 channel_u8, u8 *i2c_wdt_u8) |
This API is used to get the i2c watch dog timer period and I2C interface mode is selected in the register 0x34 bit 1 and 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_i2c_wdt (u8 channel_u8, u8 i2c_wdt_u8) |
This API is used to set the i2c watch dog timer period and I2C interface mode is selected in the register 0x34 bit 1 and 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_slow_comp (u8 channel_u8, u8 *slow_comp_u8) |
This API is used to get slow compensation(hp_x_enable, hp_y_enable and hp_z_enable) enable in the register 0x36 bit 0 to 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_slow_comp (u8 channel_u8, u8 slow_comp_u8) |
This API is used to set slow compensation(hp_x_enable, hp_y_enable and hp_z_enable) enable in the register 0x36 bit 0 to 2. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_cal_rdy (u8 *cal_rdy_u8) |
This API is used to get the status of fast offset compensation(cal_rdy) in the register 0x36 bit 4(Read Only Possible) More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_cal_trigger (u8 cal_trigger_u8) |
This API is used to set the status of fast offset compensation(cal_rdy) in the register 0x36 bit 4(Read Only Possible) More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_offset_rst (u8 offset_rst_u8) |
This API is used to set the offset reset(offset_reset) in the register 0x36 bit 7(Write only possible) More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_offset_target (u8 channel_u8, u8 *offset_u8) |
This API is used to get the status of offset target axis(offset_target_x, offset_target_y and offset_target_z) and cut_off in the register 0x37. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_offset_target (u8 channel_u8, u8 offset_u8) |
This API is used to set the status of offset target axis(offset_target_x, offset_target_y and offset_target_z) and cut_off in the register 0x37. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_offset (u8 channel_u8, s8 *offset_u8) |
This API is used to get the status of offset (offset_x, offset_y and offset_z) in the registers 0x38,0x39 and 0x3A. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_offset (u8 channel_u8, s8 offset_u8) |
This API is used to set the status of offset (offset_x, offset_y and offset_z) in the registers 0x38,0x39 and 0x3A. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_fifo_mode (u8 *fifo_mode_u8) |
This API is used to get the status of fifo (fifo_mode) in the register 0x3E bit 6 and 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_fifo_mode (u8 fifo_mode_u8) |
This API is used to set the status of fifo (fifo_mode) in the register 0x3E bit 6 and 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_fifo_data_select (u8 *fifo_data_select_u8) |
This API is used to get the axis enable of fifo data select in the register 0x3E bit 0 and 1. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_set_fifo_data_select (u8 fifo_data_select_u8) |
This API is used to set the axis enable of fifo data select in the register 0x3E bit 0 and 1. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_get_fifo_data_output_reg (u8 *output_reg_u8) |
This API is used to get the fifo data in the register 0x3F bit 0 to 7. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_temp (s8 *temp_s8) |
This API is used to read the temp from register 0x08. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_xyzt (struct bma2x2_accel_data_temp *accel) |
This API reads accelerometer data X,Y,Z values and temperature data from location 02h to 08h. More... | |
BMA2x2_RETURN_FUNCTION_TYPE | bma2x2_read_accel_eight_resolution_xyzt (struct bma2x2_accel_eight_resolution_temp *accel) |
This API reads accelerometer data X,Y,Z values and temperature data from location 0x02 to 0x08. More... | |
Variables | |
u8 | V_BMA2x2RESOLUTION_U8 = BMA2x2_14_RESOLUTION |
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_burst_read | ( | u8 | addr_u8, |
u8 * | data_u8, | ||
u32 | len_u32 | ||
) |
This API reads the data from the given register continuously.
addr_u8 | -> Address of the register |
data_u8 | -> The data from the register |
len_u32 | -> no of bytes to read |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_init | ( | struct bma2x2_t * | bma2x2 | ) |
This function is used for initialize bus read and bus write functions assign the chip id and device address chip id is read in the register 0x00 bit from 0 to 7.
bma2x2 | : structure pointer |
0 | -> Success |
-1 | -> Error |
References BMA2x2_CHIP_ID_REG, BMA2x2_FIFO_MODE_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, bma2x2_read_reg(), BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::chip_id, bma2x2_t::dev_addr, ERROR, and bma2x2_t::fifo_config.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_write_reg | ( | u8 | adr_u8, |
u8 * | data_u8, | ||
u8 | len_u8 | ||
) |
This API gives data to the given register and the data is written in the corresponding register address.
adr_u8 | -> Address of the register |
data_u8 | -> The data to the register |
len_u8 | -> no of bytes to read |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
Referenced by bma2x2_set_power_mode().
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_reg | ( | u8 | adr_u8, |
u8 * | data_u8, | ||
u8 | len_u8 | ||
) |
This API reads the data from the given register address.
adr_u8 | -> Address of the register |
data_u8 | -> The data from the register |
len_u8 | -> no of bytes to read |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
Referenced by bma2x2_init(), bma2x2_set_fifo_data_select(), and bma2x2_set_fifo_mode().
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_x | ( | s16 * | accel_x_s16 | ) |
This API reads acceleration data X values from location 02h and 03h.
accel_x_s16 | : pointer holding the data of accel X
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_10_RESOLUTION, BMA2x2_12_RESOLUTION, BMA2x2_14_RESOLUTION, BMA2x2_ACCEL_DATA_SIZE, BMA2x2_ACCEL_X10_LSB_REG, BMA2x2_ACCEL_X12_LSB_REG, BMA2x2_ACCEL_X14_LSB_REG, BMA2x2_INIT_VALUE, BMA2x2_LSB_MSB_READ_LENGTH, BMA2x2_NULL, BMA2x2_RESOLUTION_10_MASK, BMA2x2_RESOLUTION_12_MASK, BMA2x2_RESOLUTION_14_MASK, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SENSOR_DATA_ACCEL_LSB, BMA2x2_SENSOR_DATA_ACCEL_MSB, BMA2x2_SHIFT_EIGHT_BITS, BMA2x2_SHIFT_FOUR_BITS, BMA2x2_SHIFT_SIX_BITS, BMA2x2_SHIFT_TWO_BITS, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, and V_BMA2x2RESOLUTION_U8.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_eight_resolution_x | ( | s8 * | accel_x_s8 | ) |
This API reads acceleration data X values from location 02h and 03h bit resolution support 8bit.
accel_x_s8 | : pointer holding the data of accel X |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_X_AXIS_MSB_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_y | ( | s16 * | accel_y_s16 | ) |
This API reads acceleration data Y values from location 04h and 05h.
accel_y_s16 | : pointer holding the data of accel Y
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_10_BIT_SHIFT, BMA2x2_10_RESOLUTION, BMA2x2_12_BIT_SHIFT, BMA2x2_12_RESOLUTION, BMA2x2_14_BIT_SHIFT, BMA2x2_14_RESOLUTION, BMA2x2_ACCEL_DATA_SIZE, BMA2x2_ACCEL_Y10_LSB_REG, BMA2x2_ACCEL_Y12_LSB_REG, BMA2x2_ACCEL_Y14_LSB_REG, BMA2x2_INIT_VALUE, BMA2x2_LSB_MSB_READ_LENGTH, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SENSOR_DATA_ACCEL_LSB, BMA2x2_SENSOR_DATA_ACCEL_MSB, BMA2x2_SHIFT_EIGHT_BITS, BMA2x2_SHIFT_FOUR_BITS, BMA2x2_SHIFT_SIX_BITS, BMA2x2_SHIFT_TWO_BITS, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, and V_BMA2x2RESOLUTION_U8.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_eight_resolution_y | ( | s8 * | accel_y_s8 | ) |
This API reads acceleration data Y values of 8bit resolution from location 05h.
accel_y_s8 | The data of y |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_Y_AXIS_MSB_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_z | ( | s16 * | accel_z_s16 | ) |
This API reads acceleration data Z values from location 06h and 07h.
accel_z_s16 | : pointer holding the data of accel Z
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_10_BIT_SHIFT, BMA2x2_10_RESOLUTION, BMA2x2_12_BIT_SHIFT, BMA2x2_12_RESOLUTION, BMA2x2_14_BIT_SHIFT, BMA2x2_14_RESOLUTION, BMA2x2_ACCEL_DATA_SIZE, BMA2x2_ACCEL_Z10_LSB_REG, BMA2x2_ACCEL_Z12_LSB_REG, BMA2x2_ACCEL_Z14_LSB_REG, BMA2x2_INIT_VALUE, BMA2x2_LSB_MSB_READ_LENGTH, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SENSOR_DATA_ACCEL_LSB, BMA2x2_SENSOR_DATA_ACCEL_MSB, BMA2x2_SHIFT_EIGHT_BITS, BMA2x2_SHIFT_FOUR_BITS, BMA2x2_SHIFT_SIX_BITS, BMA2x2_SHIFT_TWO_BITS, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, and V_BMA2x2RESOLUTION_U8.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_eight_resolution_z | ( | s8 * | accel_z_s8 | ) |
This API reads acceleration data Z values of 8bit resolution from location 07h.
@aram accel_z_s8 : the data of z
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_Z_AXIS_MSB_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_xyz | ( | struct bma2x2_accel_data * | accel | ) |
This API reads acceleration data X,Y,Z values from location 02h to 07h.
accel | : pointer holding the data of accel
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_10_BIT_SHIFT, BMA2x2_10_RESOLUTION, BMA2x2_12_BIT_SHIFT, BMA2x2_12_RESOLUTION, BMA2x2_14_BIT_SHIFT, BMA2x2_14_RESOLUTION, BMA2x2_ACCEL_X10_LSB_REG, BMA2x2_ACCEL_X12_LSB_REG, BMA2x2_ACCEL_X14_LSB_REG, BMA2x2_ACCEL_XYZ_DATA_SIZE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SENSOR_DATA_XYZ_X_LSB, BMA2x2_SENSOR_DATA_XYZ_X_MSB, BMA2x2_SENSOR_DATA_XYZ_Y_LSB, BMA2x2_SENSOR_DATA_XYZ_Y_MSB, BMA2x2_SENSOR_DATA_XYZ_Z_LSB, BMA2x2_SENSOR_DATA_XYZ_Z_MSB, BMA2x2_SHIFT_EIGHT_BITS, BMA2x2_SHIFT_FOUR_BITS, BMA2x2_SHIFT_SIX_BITS, BMA2x2_SHIFT_TWO_BITS, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, V_BMA2x2RESOLUTION_U8, bma2x2_accel_data::x, bma2x2_accel_data::y, and bma2x2_accel_data::z.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_eight_resolution_xyz | ( | struct bma2x2_accel_eight_resolution * | accel | ) |
This API reads acceleration of 8 bit resolution data of X,Y,Z values from location 03h , 05h and 07h.
accel | : pointer holding the data of accel |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_X_AXIS_MSB_ADDR, BMA2x2_Y_AXIS_MSB_ADDR, BMA2x2_Z_AXIS_MSB_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, bma2x2_accel_eight_resolution::x, bma2x2_accel_eight_resolution::y, and bma2x2_accel_eight_resolution::z.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_tap_stat | ( | u8 * | stat_tap_u8 | ) |
This API read tap-sign, tap-first-xyz slope-sign, slope-first-xyz status register byte from location 0Bh.
stat_tap_u8 | : The status of tap and slope |
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_STAT_TAP_SLOPE_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_orient_stat | ( | u8 * | stat_orient_u8 | ) |
This API read orient, high-sign and high-first-xyz status register byte from location 0Ch.
stat_orient_u8 | : The status of orient and high |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_STAT_ORIENT_HIGH_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_fifo_stat | ( | u8 * | stat_fifo_u8 | ) |
This API reads fifo overrun and fifo frame counter status register byte from location 0Eh.
stat_fifo_u8 | : The status of fifo overrun and frame counter |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_STAT_FIFO_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_fifo_frame_count | ( | u8 * | frame_count_u8 | ) |
This API read fifo frame count from location 0Eh bit position 0 to 6.
frame_count_u8 | : The status of fifo frame count |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_FRAME_COUNT_STAT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_fifo_overrun | ( | u8 * | fifo_overrun_u8 | ) |
This API read fifo overrun from location 0Eh bit position 7.
fifo_overrun_u8 | : The status of fifo overrun |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_OVERRUN_STAT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_stat | ( | u8 * | intr_stat_u8 | ) |
This API read interrupt status of flat, orient, single tap, double tap, slow no motion, slope, highg and lowg from location 09h.
intr_stat_u8 | : The value of interrupt status |
0 | -> Success |
-1 | -> Error |
References BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SHIFT_FOUR_BITS, BMA2x2_STAT1_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_range | ( | u8 * | range_u8 | ) |
This API is used to get the ranges(g values) of the sensor in the register 0x0F bit from 0 to 3.
range_u8 | : The value of range
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RANGE_SELECT_REG, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_range | ( | u8 | range_u8 | ) |
This API is used to set the ranges(g values) of the sensor in the register 0x0F bit from 0 to 3.
range_u8 | : The value of range
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RANGE_16G, BMA2x2_RANGE_2G, BMA2x2_RANGE_4G, BMA2x2_RANGE_8G, BMA2x2_RANGE_SELECT_REG, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_bw | ( | u8 * | bw_u8 | ) |
This API is used to get the bandwidth of the sensor in the register 0x10 bit from 0 to 4.
bw_u8 | : The value of bandwidth
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_BW_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_bw | ( | u8 | bw_u8 | ) |
This API is used to set the bandwidth of the sensor in the register 0x10 bit from 0 to 4.
bw_u8 | : The value of bandwidth
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
500 Hz 1000 uS
References BANDWIDTH_DEFINE, BMA2x2_ACCEL_BW_1000HZ_RANGE, BMA2x2_ACCEL_BW_MAX_RANGE, BMA2x2_ACCEL_BW_MIN_RANGE, BMA2x2_BW_1000HZ, BMA2x2_BW_125HZ, BMA2x2_BW_15_63HZ, BMA2x2_BW_250HZ, BMA2x2_BW_31_25HZ, BMA2x2_BW_500HZ, BMA2x2_BW_62_50HZ, BMA2x2_BW_7_81HZ, BMA2x2_BW_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::chip_id, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_power_mode | ( | u8 * | power_mode_u8 | ) |
This API is used to get the operating modes of the sensor in the register 0x11 and 0x12.
power_mode_u8 | : The value of power mode
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_LOW_NOISE_CTRL_ADDR, BMA2x2_MODE_CTRL_REG, BMA2x2_MODE_DEEP_SUSPEND, BMA2x2_MODE_LOWPOWER1, BMA2x2_MODE_LOWPOWER2, BMA2x2_MODE_NORMAL, BMA2x2_MODE_STANDBY, BMA2x2_MODE_SUSPEND, BMA2x2_NULL, BMA2x2_POWER_MODE_HEX_4_ZERO_MASK, BMA2x2_POWER_MODE_HEX_E_ZERO_MASK, BMA2x2_POWER_MODE_HEX_ZERO_FOUR_MASK, BMA2x2_POWER_MODE_HEX_ZERO_ONE_MASK, BMA2x2_POWER_MODE_HEX_ZERO_SIX_MASK, BMA2x2_POWER_MODE_HEX_ZERO_TWO_MASK, BMA2x2_POWER_MODE_HEX_ZERO_ZERO_MASK, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SHIFT_FIVE_BITS, BMA2x2_SHIFT_SIX_BITS, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, and bma2x2_t::power_mode_u8.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_power_mode | ( | u8 | power_mode_u8 | ) |
This API is used to set the operating modes of the sensor in the register 0x11 and 0x12.
power_mode_u8 | : The value of power mode
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_MODE_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_LOW_POWER_MODE_REG, BMA2x2_MODE_CTRL_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_set_mode_value(), BMA2x2_SHIFT_FOUR_BITS, bma2x2_write_reg(), bma2x2_t::ctrl_mode_reg, bma2x2_t::delay_msec, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, bma2x2_t::fifo_config, and bma2x2_t::low_mode_reg.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_mode_value | ( | u8 | power_mode_u8 | ) |
This API is used to assign the power mode values modes of the sensor in the register 0x11 and 0x12.
power_mode_u8 | : The value of power mode
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_MODE_DEEP_SUSPEND, BMA2x2_MODE_LOWPOWER1, BMA2x2_MODE_LOWPOWER2, BMA2x2_MODE_NORMAL, BMA2x2_MODE_STANDBY, BMA2x2_MODE_SUSPEND, BMA2x2_NULL, BMA2x2_POWER_MODE_HEX_ZERO_FOUR_MASK, BMA2x2_POWER_MODE_HEX_ZERO_ONE_MASK, BMA2x2_POWER_MODE_HEX_ZERO_TWO_MASK, BMA2x2_POWER_MODE_HEX_ZERO_ZERO_MASK, BMA2x2_POWER_MODE_RANGE, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::ctrl_mode_reg, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, bma2x2_t::low_mode_reg, and SUCCESS.
Referenced by bma2x2_set_power_mode().
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_sleep_durn | ( | u8 * | sleep_durn_u8 | ) |
This API is used to get the sleep duration of the sensor in the register 0x11 Register 0x11 - bit from 0 to 3.
sleep_durn_u8 | : The value of sleep duration time
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SLEEP_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_sleep_durn | ( | u8 | sleep_durn_u8 | ) |
This API is used to set the sleep duration of the sensor in the register 0x11 Register 0x11 - bit from 0 to 3.
sleep_durn_u8 | : The value of sleep duration time
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
1 SECS
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_SLEEP_DURN_0_5MS, BMA2x2_SLEEP_DURN_100MS, BMA2x2_SLEEP_DURN_10MS, BMA2x2_SLEEP_DURN_1MS, BMA2x2_SLEEP_DURN_1S, BMA2x2_SLEEP_DURN_25MS, BMA2x2_SLEEP_DURN_2MS, BMA2x2_SLEEP_DURN_4MS, BMA2x2_SLEEP_DURN_500MS, BMA2x2_SLEEP_DURN_50MS, BMA2x2_SLEEP_DURN_6MS, BMA2x2_SLEEP_DURN_MAX_RANGE, BMA2x2_SLEEP_DURN_MIN_RANGE, BMA2x2_SLEEP_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_sleep_timer_mode | ( | u8 * | sleep_timer_u8 | ) |
This API is used to get the sleep timer mode in the register 0x12 bit 5.
sleep_timer_u8 | : The value of sleep timer mode
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SLEEP_TIMER_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_sleep_timer_mode | ( | u8 | sleep_timer_u8 | ) |
This API is used to set the sleep timer mode in the register 0x12 bit 5.
sleep_timer_u8 | : The value of sleep timer mode
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_SLEEP_TIMER_MODE_RANGE, BMA2x2_SLEEP_TIMER_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_high_bw | ( | u8 * | high_bw_u8 | ) |
This API is used to get high bandwidth in the register 0x13 bit 7.
high_bw_u8 | : The value of high bandwidth
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_DATA_HIGH_BW_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_high_bw | ( | u8 | high_bw_u8 | ) |
This API is used to write high bandwidth in the register 0x13 bit 7.
high_bw_u8 | : The value of high bandwidth
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_DATA_HIGH_BW_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_shadow_dis | ( | u8 * | shadow_dis_u8 | ) |
This API is used to get shadow dis in the register 0x13 bit 6.
shadow_dis_u8 | : The value of shadow dis
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_DIS_SHADOW_PROC_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_shadow_dis | ( | u8 | shadow_dis_u8 | ) |
This API is used to set shadow dis in the register 0x13 bit 6.
shadow_dis_u8 | : The value of shadow dis
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_DIS_SHADOW_PROC_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_soft_rst | ( | void | ) |
This function is used for the soft reset The soft reset register will be written with 0xB6 in the register 0x14.
None @return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
To reset the sensor 0xB6 value_u8 will be written
References BMA2x2_ENABLE_SOFT_RESET_VALUE, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_RST_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_update_image | ( | void | ) |
This API is used to update the register values.
None |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_UPDATE_IMAGE_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_enable | ( | u8 | intr_type_u8, |
u8 * | value_u8 | ||
) |
This API is used to get interrupt enable bits of the sensor in the registers 0x16 and 0x17.
intr_type_u8 | The value of interrupts
| ||||||||||||||||||||||||||
value_u8 | : The value of interrupts enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_DATA_ENABLE, BMA2x2_DOUBLE_TAP_INTR, BMA2x2_ENABLE_DOUBLE_TAP_INTR_REG, BMA2x2_ENABLE_FLAT_INTR_REG, BMA2x2_ENABLE_HIGH_G_X_INTR_REG, BMA2x2_ENABLE_HIGH_G_Y_INTR_REG, BMA2x2_ENABLE_HIGH_G_Z_INTR_REG, BMA2x2_ENABLE_LOW_G_INTR_REG, BMA2x2_ENABLE_NEW_DATA_INTR_REG, BMA2x2_ENABLE_ORIENT_INTR_REG, BMA2x2_ENABLE_SINGLE_TAP_INTR_REG, BMA2x2_ENABLE_SLOPE_X_INTR_REG, BMA2x2_ENABLE_SLOPE_Y_INTR_REG, BMA2x2_ENABLE_SLOPE_Z_INTR_REG, BMA2x2_FLAT_INTR, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_HIGH_G_X_INTR, BMA2x2_HIGH_G_Y_INTR, BMA2x2_HIGH_G_Z_INTR, BMA2x2_INIT_VALUE, BMA2x2_LOW_G_INTR, BMA2x2_NULL, BMA2x2_ORIENT_INTR, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SINGLE_TAP_INTR, BMA2x2_SLOPE_X_INTR, BMA2x2_SLOPE_Y_INTR, BMA2x2_SLOPE_Z_INTR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_enable | ( | u8 | intr_type_u8, |
u8 | value_u8 | ||
) |
This API is used to set interrupt enable bits of the sensor in the registers 0x16 and 0x17.
intr_type_u8 | The value of interrupts
| ||||||||||||||||||||||||||
value_u8 | : The value of interrupts enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_DATA_ENABLE, BMA2x2_DOUBLE_TAP_INTR, BMA2x2_FLAT_INTR, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_HIGH_G_X_INTR, BMA2x2_HIGH_G_Y_INTR, BMA2x2_HIGH_G_Z_INTR, BMA2x2_INIT_VALUE, BMA2x2_INTR_ENABLE1_ADDR, BMA2x2_INTR_ENABLE2_ADDR, BMA2x2_LOW_G_INTR, BMA2x2_NULL, BMA2x2_ORIENT_INTR, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_SINGLE_TAP_INTR, BMA2x2_SLOPE_X_INTR, BMA2x2_SLOPE_Y_INTR, BMA2x2_SLOPE_Z_INTR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_fifo_full | ( | u8 * | fifo_full_u8 | ) |
This API is used to get the interrupt fifo full enable interrupt status in the register 0x17 bit 5.
fifo_full_u8 | The value of fifo full interrupt enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR_FIFO_FULL_ENABLE_INTR_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_fifo_full | ( | u8 | fifo_full_u8 | ) |
This API is used to set the interrupt fifo full enable interrupt status in the register 0x17 bit 5.
fifo_full_u8 | The value of fifo full interrupt enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_MODE_STATUS_RANGE, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR_FIFO_FULL_ENABLE_INTR_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_fifo_wm | ( | u8 * | fifo_wm_u8 | ) |
This API is used to get the interrupt fifo watermark enable interrupt status in the register 0x17 bit 6.
fifo_wm_u8 | : the value FIFO Water Mark
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR_FIFO_WM_ENABLE_INTR_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_fifo_wm | ( | u8 | fifo_wm_u8 | ) |
This API is used to set the interrupt fifo watermark enable interrupt status in the register 0x17 bit 6.
fifo_wm_u8 | : the value FIFO Water Mark
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_MODE_STATUS_RANGE, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR_FIFO_WM_ENABLE_INTR_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_slow_no_motion | ( | u8 | channel_u8, |
u8 * | slow_no_motion_u8 | ||
) |
This API is used to get the interrupt status of slow/no motion select and slow no motion enable xyz interrupt in the register 0x18 bit from 0 to 3.
channel_u8 | : The value of slow/no motion select
| ||||||||||
slow_no_motion_u8 | : The value of slow no motion interrupt enable
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR_SLOW_NO_MOTION_ENABLE_SELECT_INTR_REG, BMA2x2_INTR_SLOW_NO_MOTION_ENABLE_X_INTR_REG, BMA2x2_INTR_SLOW_NO_MOTION_ENABLE_Y_INTR_REG, BMA2x2_INTR_SLOW_NO_MOTION_ENABLE_Z_INTR_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SLOW_NO_MOTION_ENABLE_SELECT, BMA2x2_SLOW_NO_MOTION_ENABLE_X, BMA2x2_SLOW_NO_MOTION_ENABLE_Y, BMA2x2_SLOW_NO_MOTION_ENABLE_Z, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_slow_no_motion | ( | u8 | channel_u8, |
u8 | slow_no_motion_u8 | ||
) |
This API is used to set the interrupt status of slow/no motion select and slow no motion enable xyz interrupt in the register 0x18 bit from 0 to 3.
channel_u8 | : The value of slow/no motion select
| ||||||||||
slow_no_motion_u8 | : The value of slow no motion interrupt enable
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR_SLOW_NO_MOTION_ENABLE_SELECT_INTR_REG, BMA2x2_INTR_SLOW_NO_MOTION_ENABLE_X_INTR_REG, BMA2x2_INTR_SLOW_NO_MOTION_ENABLE_Y_INTR_REG, BMA2x2_INTR_SLOW_NO_MOTION_ENABLE_Z_INTR_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_SLOW_NO_MOTION_ENABLE_SELECT, BMA2x2_SLOW_NO_MOTION_ENABLE_X, BMA2x2_SLOW_NO_MOTION_ENABLE_Y, BMA2x2_SLOW_NO_MOTION_ENABLE_Z, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_low_g | ( | u8 | channel_u8, |
u8 * | intr_low_g_u8 | ||
) |
This API is used to get the interrupt enable of low_g interrupt in the register 0x19 and 0x1B.
channel_u8 | : The value of low interrupt selection channel
| ||||||
intr_low_g_u8 | : the value of low_g interrupt
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR1_PAD_LOW_G_REG, BMA2x2_ENABLE_INTR2_PAD_LOW_G_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_LOW_G, BMA2x2_INTR2_LOW_G, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_low_g | ( | u8 | channel_u8, |
u8 | intr_low_u8 | ||
) |
This API is used to set the interrupt enable of low_g interrupt in the register 0x19 and 0x1B.
channel_u8 | : The value of low interrupt selection channel
| ||||||
intr_low_u8 | : the value of low_g interrupt
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR1_PAD_LOW_G_REG, BMA2x2_ENABLE_INTR2_PAD_LOW_G_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_LOW_G, BMA2x2_INTR2_LOW_G, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_high_g | ( | u8 | channel_u8, |
u8 * | intr_high_g_u8 | ||
) |
This API is used to get the interrupt enable of high_g interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of high_g interrupt selection
| ||||||
intr_high_g_u8 | : the value of high_g interrupt
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_HIGH_G_REG, BMA2x2_ENABLE_INTR2_PAD_HIGH_G_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_HIGH_G, BMA2x2_INTR2_HIGH_G, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_high_g | ( | u8 | channel_u8, |
u8 | intr_high_g_u8 | ||
) |
This API is used to set the interrupt enable of high_g interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of high_g interrupt selection
| ||||||
intr_high_g_u8 | : the value of high_g interrupt
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_HIGH_G_REG, BMA2x2_ENABLE_INTR2_PAD_HIGH_G_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_HIGH_G, BMA2x2_INTR2_HIGH_G, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_slope | ( | u8 | channel_u8, |
u8 * | intr_slope_u8 | ||
) |
This API is used to get the interrupt enable of slope interrupt in the register 0x19 and 0x1B.
channel_u8 | the value of slope channel select
| ||||||
intr_slope_u8 | : The slope value enable value
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR1_PAD_SLOPE_REG, BMA2x2_ENABLE_INTR2_PAD_SLOPE_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_SLOPE, BMA2x2_INTR2_SLOPE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_slope | ( | u8 | channel_u8, |
u8 | intr_slope_u8 | ||
) |
This API is used to set the interrupt enable of slope interrupt in the register 0x19 and 0x1B.
channel_u8 | the value of slope channel select
| ||||||
intr_slope_u8 | : The slope value enable value
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR1_PAD_SLOPE_REG, BMA2x2_ENABLE_INTR2_PAD_SLOPE_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_SLOPE, BMA2x2_INTR2_SLOPE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_slow_no_motion | ( | u8 | channel_u8, |
u8 * | intr_slow_no_motion_u8 | ||
) |
This API is used to get the interrupt enable of slow/no motion interrupt in the register 0x19 and 0x1B.
channel_u8 | : The value of slow/no motion selection
| ||||||
intr_slow_no_motion_u8 | the slow_no_motion enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_SLOW_NO_MOTION_REG, BMA2x2_ENABLE_INTR2_PAD_SLOW_NO_MOTION_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_SLOW_NO_MOTION, BMA2x2_INTR2_SLOW_NO_MOTION, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_slow_no_motion | ( | u8 | channel_u8, |
u8 | intr_slow_no_motion_u8 | ||
) |
This API is used to set the interrupt enable of slow/no motion interrupt in the register 0x19 and 0x1B.
channel_u8 | : The value of slow/no motion selection
| ||||||
intr_slow_no_motion_u8 | the slow_no_motion enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_SLOW_NO_MOTION_REG, BMA2x2_ENABLE_INTR2_PAD_SLOW_NO_MOTION_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_SLOW_NO_MOTION, BMA2x2_INTR2_SLOW_NO_MOTION, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_double_tap | ( | u8 | channel_u8, |
u8 * | intr_double_tap_u8 | ||
) |
This API is used to get the interrupt enable of double tap interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of double tap selection
| ||||||
intr_double_tap_u8 | The double tap interrupt enable value
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_ENABLE_INTR1_PAD_DOUBLE_TAP_REG, BMA2x2_ENABLE_INTR2_PAD_DOUBLE_TAP_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_DOUBLE_TAP, BMA2x2_INTR2_DOUBLE_TAP, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_double_tap | ( | u8 | channel_u8, |
u8 | intr_double_tap_u8 | ||
) |
This API is used to set the interrupt enable of double tap interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of double tap selection
| ||||||
intr_double_tap_u8 | The double tap interrupt enable value
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_ENABLE_INTR1_PAD_DOUBLE_TAP_REG, BMA2x2_ENABLE_INTR2_PAD_DOUBLE_TAP_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_DOUBLE_TAP, BMA2x2_INTR2_DOUBLE_TAP, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_single_tap | ( | u8 | channel_u8, |
u8 * | intr_single_tap_u8 | ||
) |
This API is used to get the interrupt enable of single tap interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of single tap interrupt select
| ||||||
intr_single_tap_u8 | The single tap interrupt enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_SINGLE_TAP_REG, BMA2x2_ENABLE_INTR2_PAD_SINGLE_TAP_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_SINGLE_TAP, BMA2x2_INTR2_SINGLE_TAP, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_single_tap | ( | u8 | channel_u8, |
u8 | intr_single_tap_u8 | ||
) |
This API is used to set the interrupt enable of single tap interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of single tap interrupt select
| ||||||
intr_single_tap_u8 | The single tap interrupt enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_SINGLE_TAP_REG, BMA2x2_ENABLE_INTR2_PAD_SINGLE_TAP_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_SINGLE_TAP, BMA2x2_INTR2_SINGLE_TAP, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_orient | ( | u8 | channel_u8, |
u8 * | intr_orient_u8 | ||
) |
This API is used to get the interrupt status of orient interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of orient interrupt select
| ||||||
intr_orient_u8 | The value of orient interrupt enable
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_ORIENT_REG, BMA2x2_ENABLE_INTR2_PAD_ORIENT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_ORIENT, BMA2x2_INTR2_ORIENT, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_orient | ( | u8 | channel_u8, |
u8 | intr_orient_u8 | ||
) |
This API is used to set the interrupt status of orient interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of orient interrupt select
| ||||||
intr_orient_u8 | The value of orient interrupt enable
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_ORIENT_REG, BMA2x2_ENABLE_INTR2_PAD_ORIENT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_ORIENT, BMA2x2_INTR2_ORIENT, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_flat | ( | u8 | channel_u8, |
u8 * | intr_flat_u8 | ||
) |
This API is used to get the interrupt enable of flat interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of flat interrupt select
| ||||||
intr_flat_u8 | The flat interrupt enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_FLAT_REG, BMA2x2_ENABLE_INTR2_PAD_FLAT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_FLAT, BMA2x2_INTR2_FLAT, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_flat | ( | u8 | channel_u8, |
u8 | intr_flat_u8 | ||
) |
This API is used to set the interrupt enable of flat interrupt in the register 0x19 and 0x1B.
channel_u8 | The value of flat interrupt select
| ||||||
intr_flat_u8 | The flat interrupt enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_FLAT_REG, BMA2x2_ENABLE_INTR2_PAD_FLAT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_FLAT, BMA2x2_INTR2_FLAT, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_new_data | ( | u8 | channel_u8, |
u8 * | intr_newdata_u8 | ||
) |
This API is used to get the interrupt status of new data in the register 0x19.
channel_u8 | The value of new data interrupt select
| ||||||
intr_newdata_u8 | The new data interrupt enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_NEWDATA_REG, BMA2x2_ENABLE_INTR2_PAD_NEWDATA_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_NEWDATA, BMA2x2_INTR2_NEWDATA, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_new_data | ( | u8 | channel_u8, |
u8 | intr_newdata_u8 | ||
) |
This API is used to set the interrupt status of new data in the register 0x19.
channel_u8 | The value of new data interrupt select
| ||||||
intr_newdata_u8 | The new data interrupt enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_INTR1_PAD_NEWDATA_REG, BMA2x2_ENABLE_INTR2_PAD_NEWDATA_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_NEWDATA, BMA2x2_INTR2_NEWDATA, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr1_fifo_wm | ( | u8 * | intr1_fifo_wm_u8 | ) |
This API is used to get the fifo watermark interrupt1 data in the register 0x1A bit 1.
intr1_fifo_wm_u8 | : The value of interrupt1 FIFO watermark enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR1_PAD_FIFO_WM_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr1_fifo_wm | ( | u8 | intr1_fifo_wm_u8 | ) |
This API is used to set the fifo watermark interrupt1 data in the register 0x1A bit 1.
intr1_fifo_wm_u8 | : The value of interrupt1 FIFO watermark enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR1_PAD_FIFO_WM_REG, BMA2x2_FIFO_MODE_STATUS_RANGE, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr2_fifo_wm | ( | u8 * | intr2_fifo_wm_u8 | ) |
This API is used to get the fifo watermark interrupt2 data in the register 0x1A bit 6.
intr2_fifo_wm_u8 | : The value of interrupt1 FIFO watermark enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR2_PAD_FIFO_WM_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr2_fifo_wm | ( | u8 | intr2_fifo_wm_u8 | ) |
This API is used to set the fifo watermark interrupt2 data in the register 0x1A bit 6.
intr2_fifo_wm_u8 | : The value of interrupt1 FIFO watermark enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR2_PAD_FIFO_WM_REG, BMA2x2_FIFO_MODE_STATUS_RANGE, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr1_fifo_full | ( | u8 * | intr1_fifo_full_u8 | ) |
This API is used to get the fifo full interrupt1 in the register 0x1A bit 2.
intr1_fifo_full_u8 | : The value of fifo full interrupt enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR1_PAD_FIFO_FULL_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr1_fifo_full | ( | u8 | intr1_fifo_full_u8 | ) |
This API is used to set the fifo full interrupt1 in the register 0x1A bit 2.
intr1_fifo_full_u8 | : The value of fifo full interrupt enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR1_PAD_FIFO_FULL_REG, BMA2x2_FIFO_MODE_STATUS_RANGE, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr2_fifo_full | ( | u8 * | intr2_fifo_full_u8 | ) |
This API is used to get the fifo full interrupt2 in the register 0x1A bit 5.
intr2_fifo_full_u8 | : Thee vale of fifo full enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR2_PAD_FIFO_FULL_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr2_fifo_full | ( | u8 | intr2_fifo_full_u8 | ) |
This API is used to set the fifo full interrupt2 in the register 0x1A bit 5.
intr2_fifo_full_u8 | : Thee vale of fifo full enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_INTR2_PAD_FIFO_FULL_REG, BMA2x2_FIFO_MODE_STATUS_RANGE, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_source | ( | u8 | channel_u8, |
u8 * | intr_source_u8 | ||
) |
This API is used to get the source data status of source data, source slow no motion, source slope, source high and source low in the register 0x1E bit from 0 to 5.
channel_u8 | : The value of source select
| ||||||||||||||
intr_source_u8 | The source status enable value
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SOURCE_DATA, BMA2x2_SOURCE_HIGH_G, BMA2x2_SOURCE_LOW_G, BMA2x2_SOURCE_SLOPE, BMA2x2_SOURCE_SLOW_NO_MOTION, BMA2x2_SOURCE_TAP, BMA2x2_UNFILT_INTR_SOURCE_DATA_REG, BMA2x2_UNFILT_INTR_SOURCE_HIGH_G_REG, BMA2x2_UNFILT_INTR_SOURCE_LOW_G_REG, BMA2x2_UNFILT_INTR_SOURCE_SLOPE_REG, BMA2x2_UNFILT_INTR_SOURCE_SLOW_NO_MOTION_REG, BMA2x2_UNFILT_INTR_SOURCE_TAP_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_source | ( | u8 | channel_u8, |
u8 | intr_source_u8 | ||
) |
This API is used to set the source data status of source data, source slow no motion, source slope, source high and source low in the register 0x1E bit from 0 to 5.
channel_u8 | : The value of source select
| ||||||||||||||
intr_source_u8 | The source status enable value
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_SOURCE_DATA, BMA2x2_SOURCE_HIGH_G, BMA2x2_SOURCE_LOW_G, BMA2x2_SOURCE_SLOPE, BMA2x2_SOURCE_SLOW_NO_MOTION, BMA2x2_SOURCE_TAP, BMA2x2_UNFILT_INTR_SOURCE_DATA_REG, BMA2x2_UNFILT_INTR_SOURCE_HIGH_G_REG, BMA2x2_UNFILT_INTR_SOURCE_LOW_G_REG, BMA2x2_UNFILT_INTR_SOURCE_SLOPE_REG, BMA2x2_UNFILT_INTR_SOURCE_SLOW_NO_MOTION_REG, BMA2x2_UNFILT_INTR_SOURCE_TAP_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_output_type | ( | u8 | channel_u8, |
u8 * | intr_output_type_u8 | ||
) |
This API is used to get the interrupt output type in the register 0x20.
channel_u8 | The value of output type select
| ||||||
intr_output_type_u8 | The value of output type select
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_OUTPUT, BMA2x2_INTR1_PAD_OUTPUT_TYPE_REG, BMA2x2_INTR2_OUTPUT, BMA2x2_INTR2_PAD_OUTPUT_TYPE_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_output_type | ( | u8 | channel_u8, |
u8 | intr_output_type_u8 | ||
) |
This API is used to set the interrupt output type in the register 0x20.
channel_u8 | The value of output type select
| ||||||
intr_output_type_u8 | The value of output type select
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_OUTPUT, BMA2x2_INTR1_PAD_OUTPUT_TYPE_REG, BMA2x2_INTR2_OUTPUT, BMA2x2_INTR2_PAD_OUTPUT_TYPE_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_intr_level | ( | u8 | channel_u8, |
u8 * | intr_level_u8 | ||
) |
This API is used to get Active Level status in the register 0x20.
channel_u8 | The value of Active Level select
| ||||||
intr_level_u8 | The Active Level status enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_INTR1_LEVEL, BMA2x2_INTR1_PAD_ACTIVE_LEVEL_REG, BMA2x2_INTR2_LEVEL, BMA2x2_INTR2_PAD_ACTIVE_LEVEL_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_intr_level | ( | u8 | channel_u8, |
u8 | intr_level_u8 | ||
) |
This API is used to set Active Level status in the register 0x20.
channel_u8 | The value of Active Level select
| ||||||
intr_level_u8 | The Active Level status enable value
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_INTR1_LEVEL, BMA2x2_INTR1_PAD_ACTIVE_LEVEL_REG, BMA2x2_INTR2_LEVEL, BMA2x2_INTR2_PAD_ACTIVE_LEVEL_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_rst_intr | ( | u8 | rst_intr_u8 | ) |
This API is used to set the reset interrupt in the register 0x21 bit 7.
rst_intr_u8 | The value of reset interrupt
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RESET_INTR_REG, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_latch_intr | ( | u8 * | latch_intr_u8 | ) |
This API is used to get the latch duration in the register 0x21 bit from 0 to 3.
latch_intr_u8 | The value of latch duration
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_LATCH_INTR_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_latch_intr | ( | u8 | latch_intr_u8 | ) |
This API is used to set the latch duration in the register 0x21 bit from 0 to 3.
latch_intr_u8 | The value of latch duration
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_ACCEL_BW_MAX_RANGE, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_LATCH_DURN_12_5MS, BMA2x2_LATCH_DURN_1MS, BMA2x2_LATCH_DURN_1S, BMA2x2_LATCH_DURN_250MS, BMA2x2_LATCH_DURN_250US, BMA2x2_LATCH_DURN_25MS, BMA2x2_LATCH_DURN_2S, BMA2x2_LATCH_DURN_4S, BMA2x2_LATCH_DURN_500MS, BMA2x2_LATCH_DURN_500US, BMA2x2_LATCH_DURN_50MS, BMA2x2_LATCH_DURN_8S, BMA2x2_LATCH_DURN_LATCH, BMA2x2_LATCH_DURN_LATCH1, BMA2x2_LATCH_DURN_NON_LATCH, BMA2x2_LATCH_DURN_NON_LATCH1, BMA2x2_LATCH_INTR_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_durn | ( | u8 | channel_u8, |
u8 * | durn_u8 | ||
) |
This API is used to get the duration of Low, High, Slope and slow no motion interrupts in the registers.
channel_u8 | The value of duration select
| ||||||||||
durn_u8 | The value of duration |
Duration | result |
---|---|
BMA2x2_ACCEL_LOW_DURN | Low-g interrupt trigger |
- | delay according to([durn_u8 +1]*2)ms |
- | range from 2ms to 512ms. default is 20ms |
BMA2x2_ACCEL_HIGH_DURN | high-g interrupt trigger |
- | delay according to([durn_u8 +1]*2)ms |
- | range from 2ms to 512ms. default is 32ms |
BMA2x2_ACCEL_SLOPE_DURN | slope interrupt trigger |
- | if[durn_u8<1:0>+1] consecutive data points |
- | are above the slope interrupt threshold |
SLO_NO_MOT_DURN | Refer data sheet for clear information |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_HIGH_DURN, BMA2x2_HIGH_DURN_ADDR, BMA2x2_INIT_VALUE, BMA2x2_LOW_DURN, BMA2x2_LOW_DURN_ADDR, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SLOPE_DURN, BMA2x2_SLOPE_DURN_REG, BMA2x2_SLOW_NO_MOTION_DURN, BMA2x2_SLOW_NO_MOTION_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_durn | ( | u8 | channel_u8, |
u8 | durn_u8 | ||
) |
This API is used to set the duration of Low, High, Slope and slow no motion interrupts in the registers.
channel_u8 | The value of duration select
| ||||||||||
durn_u8 | The value of duration |
Duration | result |
---|---|
BMA2x2_ACCEL_LOW_DURN | Low-g interrupt trigger |
- | delay according to([durn_u8 +1]*2)ms |
- | range from 2ms to 512ms. default is 20ms |
BMA2x2_ACCEL_HIGH_DURN | high-g interrupt trigger |
- | delay according to([durn_u8 +1]*2)ms |
- | range from 2ms to 512ms. default is 32ms |
BMA2x2_ACCEL_SLOPE_DURN | slope interrupt trigger |
- | if[durn_u8<1:0>+1] consecutive data points |
- | are above the slope interrupt threshold |
SLO_NO_MOT_DURN | Refer data sheet for clear information |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_HIGH_DURN, BMA2x2_HIGH_DURN_ADDR, BMA2x2_INIT_VALUE, BMA2x2_LOW_DURN, BMA2x2_LOW_DURN_ADDR, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_SLOPE_DURN, BMA2x2_SLOPE_DURN_REG, BMA2x2_SLOW_NO_MOTION_DURN, BMA2x2_SLOW_NO_MOTION_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_thres | ( | u8 | channel_u8, |
u8 * | thres_u8 | ||
) |
This API is used to get the threshold of Low, High, Slope and slow no motion interrupts in the registers.
channel_u8 | The value of threshold selection
| ||||||||||
thres_u8 | The threshold value of selected interrupts @note : LOW-G THRESHOLD
|
g-range | High-g threshold |
---|---|
2g | (thres_u8 * 7.81) mg |
4g | (thres_u8 * 15.63) mg |
8g | (thres_u8 * 31.25) mg |
16g | (thres_u8 * 62.5) mg |
g-range | Slope threshold |
---|---|
2g | (thres_u8 * 3.19) mg |
4g | (thres_u8 * 7.81) mg |
8g | (thres_u8 * 15.63) mg |
16g | (thres_u8 * 31.25) mg |
g-range | slow no motion threshold |
---|---|
2g | (thres_u8 * 3.19) mg |
4g | (thres_u8 * 7.81) mg |
8g | (thres_u8 * 15.63) mg |
16g | (thres_u8 * 31.25) mg |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_HIGH_THRES, BMA2x2_HIGH_THRES_ADDR, BMA2x2_INIT_VALUE, BMA2x2_LOW_THRES, BMA2x2_LOW_THRES_ADDR, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SLOPE_THRES, BMA2x2_SLOPE_THRES_ADDR, BMA2x2_SLOW_NO_MOTION_THRES, BMA2x2_SLOW_NO_MOTION_THRES_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_thres | ( | u8 | channel_u8, |
u8 | thres_u8 | ||
) |
This API is used to set the threshold of Low, High, Slope and slow no motion interrupts in the registers.
channel_u8 | The value of threshold selection
| ||||||||||
thres_u8 | The threshold value of selected interrupts @note : LOW-G THRESHOLD
|
g-range | High-g threshold |
---|---|
2g | (thres_u8 * 7.81) mg |
4g | (thres_u8 * 15.63) mg |
8g | (thres_u8 * 31.25) mg |
16g | (thres_u8 * 62.5) mg |
g-range | Slope threshold |
---|---|
2g | (thres_u8 * 3.19) mg |
4g | (thres_u8 * 7.81) mg |
8g | (thres_u8 * 15.63) mg |
16g | (thres_u8 * 31.25) mg |
g-range | slow no motion threshold |
---|---|
2g | (thres_u8 * 3.19) mg |
4g | (thres_u8 * 7.81) mg |
8g | (thres_u8 * 15.63) mg |
16g | (thres_u8 * 31.25) mg |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_HIGH_THRES, BMA2x2_HIGH_THRES_ADDR, BMA2x2_INIT_VALUE, BMA2x2_LOW_THRES, BMA2x2_LOW_THRES_ADDR, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SLOPE_THRES, BMA2x2_SLOPE_THRES_ADDR, BMA2x2_SLOW_NO_MOTION_THRES, BMA2x2_SLOW_NO_MOTION_THRES_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_low_high_g_hyst | ( | u8 | channel_u8, |
u8 * | hyst_u8 | ||
) |
This API is used to get the low high hysteresis in the registers 0x24.
channel_u8 | The value of hysteresis selection
| ||||||||||
hyst_u8 | The hysteresis data @note LOW HYSTERESIS @note Hysteresis of low-g interrupt according to (hyst_u8 * 125)mg @note HIGH HYSTERESIS @note High hysteresis depends on the accel range selection
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_HIGH_G_HYST, BMA2x2_HIGH_G_HYST_REG, BMA2x2_INIT_VALUE, BMA2x2_LOW_G_HYST, BMA2x2_LOW_G_HYST_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_low_high_g_hyst | ( | u8 | channel_u8, |
u8 | hyst_u8 | ||
) |
This API is used to set the low high hysteresis in the registers 0x24.
channel_u8 | The value of hysteresis selection
| ||||||||||
hyst_u8 | The hysteresis data @note LOW HYSTERESIS @note Hysteresis of low-g interrupt according to (hyst_u8 * 125)mg @note HIGH HYSTERESIS @note High hysteresis depends on the accel range selection
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_HIGH_G_HYST, BMA2x2_HIGH_G_HYST_REG, BMA2x2_INIT_VALUE, BMA2x2_LOW_G_HYST, BMA2x2_LOW_G_HYST_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_low_g_mode | ( | u8 * | low_g_mode_u8 | ) |
This API is used to get low_g mode in the registers 0x24 bit 2.
low_g_mode_u8 | The value of Low_G mode
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_LOW_G_INTR_MODE_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_low_g_mode | ( | u8 | low_g_mode_u8 | ) |
This API is used to set low_g mode in the registers 0x24 bit 2.
low_g_mode_u8 | The value of Low_G mode
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_LOW_G_INTR_MODE_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_tap_durn | ( | u8 * | tap_durn_u8 | ) |
This API is used to get the tap duration in the register 0x2A bit form 0 to 2.
tap_durn_u8 | The value of tap duration
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_TAP_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_tap_durn | ( | u8 | tap_durn_u8 | ) |
This API is used to set the tap duration in the register 0x2A bit form 0 to 2.
tap_durn_u8 | The value of tap duration
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_TAP_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_tap_shock | ( | u8 * | tap_shock_u8 | ) |
This API is used to get the tap shock form the register 0x2A bit 6.
tap_shock_u8 | The value of tap shock
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_TAP_SHOCK_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_tap_shock | ( | u8 | tap_shock_u8 | ) |
This API is used to set the tap shock form the register 0x2A bit 6.
tap_shock_u8 | The value of tap shock
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_TAP_SHOCK_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_tap_quiet | ( | u8 * | tap_quiet_u8 | ) |
This API is used to get the tap quiet in the register 0x2A bit 7.
tap_quiet_u8 | : The value of tap quiet
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_TAP_QUIET_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_tap_quiet | ( | u8 | tap_quiet_u8 | ) |
This API is used to set the tap quiet in the register 0x2A bit 7.
tap_quiet_u8 | : The value of tap quiet
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_TAP_QUIET_DURN_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_tap_thres | ( | u8 * | tap_thres_u8 | ) |
This API is used to get the tap threshold in the register 0x2B bit from 0 to 4.
tap_thres_u8 | : The value of tap threshold |
range | Tap threshold |
---|---|
2g | (tap_thres_u8 * 62.5)mg |
4g | (tap_thres_u8 * 125)mg |
8g | (tap_thres_u8 * 250)mg |
16g | (tap_thres_u8 * 500)mg |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_TAP_THRES_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_tap_thres | ( | u8 | tap_thres_u8 | ) |
This API is used to set the tap threshold in the register 0x2B bit from 0 to 4.
tap_thres_u8 | : The value of tap threshold |
range | Tap threshold |
---|---|
2g | (tap_thres_u8 * 62.5)mg |
4g | (tap_thres_u8 * 125)mg |
8g | (tap_thres_u8 * 250)mg |
16g | (tap_thres_u8 * 500)mg |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_TAP_THRES_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_tap_sample | ( | u8 * | tap_sample_u8 | ) |
This API is used to get the tap sample in the register 0x2B bit 6 and 7.
*tap_sample_u8 | : The value of tap sample
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_TAP_SAMPLES_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_tap_sample | ( | u8 | tap_sample_u8 | ) |
This API is used to set the tap sample in the register 0x2B bit 6 and 7.
*tap_sample_u8 | : The value of tap sample
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_TAP_SAMPLES_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_orient_mode | ( | u8 * | orient_mode_u8 | ) |
This API is used to get the orient mode in the register 0x2C bit 0 and 1.
orient_mode_u8 | : The value of orient mode
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_MODE_REG, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_orient_mode | ( | u8 | orient_mode_u8 | ) |
This API is used to set the orient mode in the register 0x2C bit 0 and 1.
orient_mode_u8 | : The value of orient mode
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_MODE_REG, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_orient_block | ( | u8 * | orient_block_u8 | ) |
This API is used to get the orient block in the register 0x2C bit 2 and 3.
orient_block_u8 | : The value of orient block
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_BLOCK_REG, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_orient_block | ( | u8 | orient_block_u8 | ) |
This API is used to set the orient block in the register 0x2C bit 2 and 3.
orient_block_u8 | : The value of orient block
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_BLOCK_REG, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_orient_hyst | ( | u8 * | orient_hyst_u8 | ) |
This API is used to get the orient hysteresis in the register 0x2C bit 4 to 6.
orient_hyst_u8 | : The value of orient hysteresis |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_HYST_REG, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_orient_hyst | ( | u8 | orient_hyst_u8 | ) |
This API is used to set the orient hysteresis in the register 0x2C bit 4 to 6.
orient_hyst_u8 | : The value of orient hysteresis |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_HYST_REG, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_theta | ( | u8 | channel_u8, |
u8 * | theta_u8 | ||
) |
This API is used to get the theta value of orient and flat interrupts.
channel_u8 | The value of theta selection
|
theta_u8 | The value of theta @return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_FLAT_THETA, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_THETA, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_THETA_BLOCK_REG, BMA2x2_THETA_FLAT_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_theta | ( | u8 | channel_u8, |
u8 | theta_u8 | ||
) |
This API is used to set the theta value of orient and flat interrupts.
channel_u8 | The value of theta selection
|
theta_u8 | The value of theta @return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_FLAT_THETA, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_THETA, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_THETA_BLOCK_REG, BMA2x2_THETA_FLAT_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_orient_enable | ( | u8 * | orient_enable_u8 | ) |
This API is used to get the interrupt enable of orient ud_enable in the register 0x2D bit 6.
orient_enable_u8 | : The value of orient ud_enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_UD_ENABLE_REG, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_orient_enable | ( | u8 | orient_enable_u8 | ) |
This API is used to set the interrupt enable of orient ud_enable in the register 0x2D bit 6.
orient_enable_u8 | : The value of orient ud_enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_ORIENT_UD_ENABLE_REG, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_flat_hyst | ( | u8 * | flat_hyst_u8 | ) |
This API is used to get the interrupt enable of flat hysteresis("flat_hy) in the register 0x2F bit 0 to 2.
flat_hyst_u8 | : The value of flat hysteresis |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FLAT_HYST_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_flat_hyst | ( | u8 | flat_hyst_u8 | ) |
This API is used to set the interrupt enable of flat hysteresis("flat_hy) in the register 0x2F bit 0 to 2.
flat_hyst_u8 | : The value of flat hysteresis |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FLAT_HYST_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_flat_hold_time | ( | u8 * | flat_hold_time_u8 | ) |
This API is used to get the interrupt enable of flat hold time(flat_hold_time) in the register 0x2F bit 4 and 5.
flat_hold_time_u8 | : The value of flat hold time
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FLAT_HOLD_TIME_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_flat_hold_time | ( | u8 | flat_hold_time_u8 | ) |
This API is used to set the interrupt enable of flat hold time(flat_hold_time) in the register 0x2F bit 4 and 5.
flat_hold_time_u8 | : The value of flat hold time
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FLAT_HOLD_TIME_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_fifo_wml_trig | ( | u8 * | fifo_wml_trig | ) |
This API is used to get the fifo water mark level trigger in the register 0x30 bit from 0 to 5.
fifo_wml_trig | The value of fifo watermark trigger level |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_WML_TRIG_RETAIN_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_fifo_wml_trig | ( | u8 | fifo_wml_trig | ) |
This API is used to set the fifo water mark level trigger in the register 0x30 bit from 0 to 5.
fifo_wml_trig | The value of fifo watermark trigger level |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_WML_RANGE, BMA2x2_FIFO_WML_TRIG_RETAIN_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_selftest_axis | ( | u8 * | selftest_axis_u8 | ) |
This API is for to get the self test axis(self_test_axis) in the register ox32 bit 0 to 2.
selftest_axis_u8 | : The value of selftest axis
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_SELFTEST_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_selftest_axis | ( | u8 | selftest_axis_u8 | ) |
This API is for to set the self test axis(self_test_axis) in the register ox32 bit 0 to 2.
selftest_axis_u8 | : The value of selftest axis
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_SELFTEST_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SELF_TEST_AXIS_RANGE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_selftest_sign | ( | u8 * | selftest_sign_u8 | ) |
This API is for to get the Self Test sign(selftest_sign) in the register 0x32 bit 2.
selftest_sign_u8 | : The value of self test sign
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NEG_SELFTEST_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_selftest_sign | ( | u8 | selftest_sign_u8 | ) |
This API is for to set the Self Test sign(selftest_sign) in the register 0x32 bit 2.
selftest_sign_u8 | : The value of self test sign
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NEG_SELFTEST_REG, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SELF_TEST_SIGN_RANGE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_nvmprog_mode | ( | u8 * | nvmprog_mode_u8 | ) |
This API is used to get the nvm program mode(nvm_prog_mode)in the register 0x33 bit 0.
nvmprog_mode_u8 | : The value of nvm program mode
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_UNLOCK_EE_PROG_MODE_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_nvmprog_mode | ( | u8 | nvmprog_mode_u8 | ) |
This API is used to set the nvm program mode(nvm_prog_mode)in the register 0x33 bit 0.
nvmprog_mode_u8 | : The value of nvm program mode
|
0 | -> Success |
-1 | -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_UNLOCK_EE_PROG_MODE_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_nvprog_trig | ( | u8 | nvprog_trig_u8 | ) |
This API is used to set the value of nvm program trig in the register 0x33 bit 1.
nvprog_trig_u8 | The value of nvm program trig
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_START_EE_PROG_TRIG_REG, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_nvmprog_ready | ( | u8 * | nvprog_ready_u8 | ) |
This API is used to get the nvm program ready in the register bit 2.
nvprog_ready_u8 | The value of nvm program ready
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_EE_PROG_READY_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_nvmprog_remain | ( | u8 * | nvprog_remain_u8 | ) |
This API is used to set the nvm program ready in the register bit 2.
nvprog_remain_u8 | The value of nvm program ready
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_EE_REMAIN_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_spi3 | ( | u8 * | spi3_u8 | ) |
This API is used to get the enable status of spi3 in the register 0x34 bit 0.
spi3_u8 | : The value of SPI 3 or 4 wire enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_SPI_MODE_3_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_spi3 | ( | u8 | spi3_u8 | ) |
This API is used to set the enable status of spi3 in the register 0x34 bit 0.
spi3_u8 | : The value of SPI 3 or 4 wire enable
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_ENABLE_SPI_MODE_3_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_i2c_wdt | ( | u8 | channel_u8, |
u8 * | i2c_wdt_u8 | ||
) |
This API is used to get the i2c watch dog timer period and I2C interface mode is selected in the register 0x34 bit 1 and 2.
channel_u8 | The i2c option selection
| ||||||||||||
i2c_wdt_u8 | watch dog timer period and I2C interface mode is selected
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_I2C_WDT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_I2C_ENABLE, BMA2x2_I2C_SELECT, BMA2x2_I2C_WDT_PERIOD_REG, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_i2c_wdt | ( | u8 | channel_u8, |
u8 | i2c_wdt_u8 | ||
) |
This API is used to set the i2c watch dog timer period and I2C interface mode is selected in the register 0x34 bit 1 and 2.
channel_u8 | The i2c option selection
| ||||||||||||
i2c_wdt_u8 | watch dog timer period and I2C interface mode is selected
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_I2C_WDT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_I2C_ENABLE, BMA2x2_I2C_SELECT, BMA2x2_I2C_WDT_PERIOD_REG, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_slow_comp | ( | u8 | channel_u8, |
u8 * | slow_comp_u8 | ||
) |
This API is used to get slow compensation(hp_x_enable, hp_y_enable and hp_z_enable) enable in the register 0x36 bit 0 to 2.
@param channel_u8: The value of slow compensation selection
channel_u8 | result |
---|---|
0 | BMA2x2_ACCEL_SLOW_COMP_X |
1 | BMA2x2_ACCEL_SLOW_COMP_Y |
2 | BMA2x2_ACCEL_SLOW_COMP_Z |
slow_comp_u8 | The value of slow compensation enable
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_SLOW_COMP_X_REG, BMA2x2_ENABLE_SLOW_COMP_Y_REG, BMA2x2_ENABLE_SLOW_COMP_Z_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SLOW_COMP_X, BMA2x2_SLOW_COMP_Y, BMA2x2_SLOW_COMP_Z, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_slow_comp | ( | u8 | channel_u8, |
u8 | slow_comp_u8 | ||
) |
This API is used to set slow compensation(hp_x_enable, hp_y_enable and hp_z_enable) enable in the register 0x36 bit 0 to 2.
@param channel_u8: The value of slow compensation selection
channel_u8 | result |
---|---|
0 | BMA2x2_ACCEL_SLOW_COMP_X |
1 | BMA2x2_ACCEL_SLOW_COMP_Y |
2 | BMA2x2_ACCEL_SLOW_COMP_Z |
slow_comp_u8 | The value of slow compensation enable
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_ENABLE_SLOW_COMP_X_REG, BMA2x2_ENABLE_SLOW_COMP_Y_REG, BMA2x2_ENABLE_SLOW_COMP_Z_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, BMA2x2_SLOW_COMP_X, BMA2x2_SLOW_COMP_Y, BMA2x2_SLOW_COMP_Z, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_cal_rdy | ( | u8 * | cal_rdy_u8 | ) |
This API is used to get the status of fast offset compensation(cal_rdy) in the register 0x36 bit 4(Read Only Possible)
cal_rdy_u8 | The value of cal_ready |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FAST_CAL_RDY_STAT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_cal_trigger | ( | u8 | cal_trigger_u8 | ) |
This API is used to set the status of fast offset compensation(cal_rdy) in the register 0x36 bit 4(Read Only Possible)
cal_trigger_u8 | The value of cal_ready |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_CAL_TRIGGER_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_offset_rst | ( | u8 | offset_rst_u8 | ) |
This API is used to set the offset reset(offset_reset) in the register 0x36 bit 7(Write only possible)
offset_rst_u8 | The offset reset value |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_RST_OFFSET_REG, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_offset_target | ( | u8 | channel_u8, |
u8 * | offset_u8 | ||
) |
This API is used to get the status of offset target axis(offset_target_x, offset_target_y and offset_target_z) and cut_off in the register 0x37.
channel_u8 | The value of offset axis selection
| ||||||||||
offset_u8 | The offset target value
|
OFFSET_TRIGGER | result |
---|---|
0x00 | 0g |
0x01 | +1g |
0x02 | -1g |
0x03 | 0g |
0 | -> Success |
-1 | -> Error |
References BMA2x2_COMP_CUTOFF_REG, BMA2x2_COMP_TARGET_OFFSET_X_REG, BMA2x2_COMP_TARGET_OFFSET_Y_REG, BMA2x2_COMP_TARGET_OFFSET_Z_REG, BMA2x2_CUT_OFF, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_OFFSET_TRIGGER_X, BMA2x2_OFFSET_TRIGGER_Y, BMA2x2_OFFSET_TRIGGER_Z, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_offset_target | ( | u8 | channel_u8, |
u8 | offset_u8 | ||
) |
This API is used to set the status of offset target axis(offset_target_x, offset_target_y and offset_target_z) and cut_off in the register 0x37.
channel_u8 | The value of offset axis selection
| ||||||||||
offset_u8 | The offset target value
|
OFFSET_TRIGGER | result |
---|---|
0x00 | 0g |
0x01 | +1g |
0x02 | -1g |
0x03 | 0g |
0 | -> Success |
-1 | -> Error |
References BMA2x2_COMP_CUTOFF_REG, BMA2x2_COMP_TARGET_OFFSET_X_REG, BMA2x2_COMP_TARGET_OFFSET_Y_REG, BMA2x2_COMP_TARGET_OFFSET_Z_REG, BMA2x2_CUT_OFF, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_OFFSET_TRIGGER_X, BMA2x2_OFFSET_TRIGGER_Y, BMA2x2_OFFSET_TRIGGER_Z, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_offset | ( | u8 | channel_u8, |
s8 * | offset_u8 | ||
) |
This API is used to get the status of offset (offset_x, offset_y and offset_z) in the registers 0x38,0x39 and 0x3A.
channel_u8 | The value of offset selection
| ||||||||
offset_u8 | The value of offset |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_OFFSET_X_AXIS_ADDR, BMA2x2_OFFSET_Y_AXIS_ADDR, BMA2x2_OFFSET_Z_AXIS_ADDR, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_X_AXIS, BMA2x2_Y_AXIS, BMA2x2_Z_AXIS, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_offset | ( | u8 | channel_u8, |
s8 | offset_u8 | ||
) |
This API is used to set the status of offset (offset_x, offset_y and offset_z) in the registers 0x38,0x39 and 0x3A.
channel_u8 | The value of offset selection
| ||||||||
offset_u8 | The value of offset |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_OFFSET_X_AXIS_ADDR, BMA2x2_OFFSET_Y_AXIS_ADDR, BMA2x2_OFFSET_Z_AXIS_ADDR, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_X_AXIS, BMA2x2_Y_AXIS, BMA2x2_Z_AXIS, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_fifo_mode | ( | u8 * | fifo_mode_u8 | ) |
This API is used to get the status of fifo (fifo_mode) in the register 0x3E bit 6 and 7.
fifo_mode_u8 | : The value of fifo mode
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_MODE_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_fifo_mode | ( | u8 | fifo_mode_u8 | ) |
This API is used to set the status of fifo (fifo_mode) in the register 0x3E bit 6 and 7.
fifo_mode_u8 | : The value of fifo mode
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_MODE_RANGE, BMA2x2_FIFO_MODE_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, bma2x2_read_reg(), BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, ERROR, bma2x2_t::fifo_config, and SUCCESS.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_fifo_data_select | ( | u8 * | fifo_data_select_u8 | ) |
This API is used to get the axis enable of fifo data select in the register 0x3E bit 0 and 1.
fifo_data_select_u8 | : The value of FIFO axis data select
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_DATA_SELECT_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_fifo_data_select | ( | u8 | fifo_data_select_u8 | ) |
This API is used to set the axis enable of fifo data select in the register 0x3E bit 0 and 1.
fifo_data_select_u8 | : The value of FIFO axis data select
|
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_DATA_SELECT_RANGE, BMA2x2_FIFO_DATA_SELECT_REG, BMA2x2_FIFO_MODE_REG, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, bma2x2_read_reg(), BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SET_BITSLICE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, E_OUT_OF_RANGE, ERROR, bma2x2_t::fifo_config, and SUCCESS.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_fifo_data_output_reg | ( | u8 * | output_reg_u8 | ) |
This API is used to get the fifo data in the register 0x3F bit 0 to 7.
output_reg_u8 | : The value of fifo data |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_FIFO_DATA_OUTPUT_ADDR, BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_temp | ( | s8 * | temp_s8 | ) |
This API is used to read the temp from register 0x08.
temp_s8 | The value of temperature |
@return results of bus communication function @retval 0 -> Success @retval -1 -> Error
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_TEMP_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, and ERROR.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_xyzt | ( | struct bma2x2_accel_data_temp * | accel | ) |
This API reads accelerometer data X,Y,Z values and temperature data from location 02h to 08h.
accel | : The value of accel xyz and temperature data @return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_10_BIT_SHIFT, BMA2x2_10_RESOLUTION, BMA2x2_12_BIT_SHIFT, BMA2x2_12_RESOLUTION, BMA2x2_14_BIT_SHIFT, BMA2x2_14_RESOLUTION, BMA2x2_ACCEL_BW_MIN_RANGE, BMA2x2_ACCEL_X10_LSB_REG, BMA2x2_ACCEL_X12_LSB_REG, BMA2x2_ACCEL_X14_LSB_REG, BMA2x2_ACCEL_XYZ_TEMP_DATA_SIZE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_SENSOR_DATA_TEMP, BMA2x2_SENSOR_DATA_XYZ_X_LSB, BMA2x2_SENSOR_DATA_XYZ_X_MSB, BMA2x2_SENSOR_DATA_XYZ_Y_LSB, BMA2x2_SENSOR_DATA_XYZ_Y_MSB, BMA2x2_SENSOR_DATA_XYZ_Z_LSB, BMA2x2_SENSOR_DATA_XYZ_Z_MSB, BMA2x2_SHIFT_EIGHT_BITS, BMA2x2_SHIFT_FOUR_BITS, BMA2x2_SHIFT_SIX_BITS, BMA2x2_SHIFT_TWO_BITS, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, bma2x2_accel_data_temp::temp, V_BMA2x2RESOLUTION_U8, bma2x2_accel_data_temp::x, bma2x2_accel_data_temp::y, and bma2x2_accel_data_temp::z.
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_eight_resolution_xyzt | ( | struct bma2x2_accel_eight_resolution_temp * | accel | ) |
This API reads accelerometer data X,Y,Z values and temperature data from location 0x02 to 0x08.
accel | : The value of accel xyz and temperature data @return results of bus communication function @retval 0 -> Success @retval -1 -> Error |
References BMA2x2_GEN_READ_WRITE_LENGTH, BMA2x2_GET_BITSLICE, BMA2x2_INIT_VALUE, BMA2x2_NULL, BMA2x2_RETURN_FUNCTION_TYPE, BMA2x2_TEMP_ADDR, BMA2x2_X_AXIS_MSB_ADDR, BMA2x2_Y_AXIS_MSB_ADDR, BMA2x2_Z_AXIS_MSB_ADDR, bma2x2_t::dev_addr, E_BMA2x2_NULL_PTR, ERROR, bma2x2_accel_eight_resolution_temp::temp, bma2x2_accel_eight_resolution_temp::x, bma2x2_accel_eight_resolution_temp::y, and bma2x2_accel_eight_resolution_temp::z.
u8 V_BMA2x2RESOLUTION_U8 = BMA2x2_14_RESOLUTION |
Based on Bit resolution value_u8 should be modified
Referenced by bma2x2_read_accel_x(), bma2x2_read_accel_xyz(), bma2x2_read_accel_xyzt(), bma2x2_read_accel_y(), and bma2x2_read_accel_z().