33 #include <mraa/gpio.h> 37 #include "bma250e_defs.h" 57 mraa_gpio_context gpioCS;
58 mraa_gpio_context gpio1;
59 mraa_gpio_context gpio2;
73 BMA250E_RESOLUTION_T resolution;
138 float *x,
float *y,
float *z);
162 BMA250E_POWER_MODE_T pwr,
163 BMA250E_RANGE_T range,
186 BMA250E_RANGE_T range);
220 BMA250E_POWER_MODE_T power);
261 BMA250E_FIFO_MODE_T mode,
262 BMA250E_FIFO_DATA_SEL_T axes);
277 BMA250E_SELFTTEST_AXIS_T axis);
479 BMA250E_RST_LATCH_T latch);
587 BMA250E_INTERRUPT_PINS_T intr,
int gpio,
588 mraa_gpio_edge_t level,
589 void (*isr)(
void *),
void *arg);
599 BMA250E_INTERRUPT_PINS_T intr);
619 uint8_t *buffer,
int len);
630 uint8_t reg, uint8_t val);
upm_result_t bma250e_set_interrupt_enable0(const bma250e_context dev, uint8_t bits)
Definition: bma250e.c:596
void bma250e_close(bma250e_context dev)
Definition: bma250e.c:171
float bma250e_get_temperature(const bma250e_context dev)
Definition: bma250e.c:426
uint8_t bma250e_get_interrupt_status3_bits(const bma250e_context dev)
Definition: bma250e.c:855
upm_result_t bma250e_clear_interrupt_latches(const bma250e_context dev)
Definition: bma250e.c:746
uint8_t bma250e_get_interrupt_map0(const bma250e_context dev)
Definition: bma250e.c:651
upm_result_t bma250e_fifo_config(const bma250e_context dev, BMA250E_FIFO_MODE_T mode, BMA250E_FIFO_DATA_SEL_T axes)
Definition: bma250e.c:550
uint8_t bma250e_get_interrupt_output_control(const bma250e_context dev)
Definition: bma250e.c:725
upm_result_t bma250e_set_low_power_mode2(const bma250e_context dev)
Definition: bma250e.c:880
uint8_t bma250e_get_interrupt_status0(const bma250e_context dev)
Definition: bma250e.c:833
uint8_t bma250e_get_interrupt_enable1(const bma250e_context dev)
Definition: bma250e.c:609
upm_result_t bma250e_update(const bma250e_context dev)
Definition: bma250e.c:232
upm_result_t bma250e_set_interrupt_map1(const bma250e_context dev, uint8_t bits)
Definition: bma250e.c:676
upm_result_t bma250e_install_isr(const bma250e_context dev, BMA250E_INTERRUPT_PINS_T intr, int gpio, mraa_gpio_edge_t level, void(*isr)(void *), void *arg)
Definition: bma250e.c:900
int bma250e_read_regs(const bma250e_context dev, uint8_t reg, uint8_t *buffer, int len)
Definition: bma250e.c:335
uint8_t bma250e_get_interrupt_map2(const bma250e_context dev)
Definition: bma250e.c:688
BMA250E_RST_LATCH_T bma250e_get_interrupt_latch_behavior(const bma250e_context dev)
Definition: bma250e.c:762
upm_result_t bma250e_set_self_test(const bma250e_context dev, bool sign, bool amp, BMA250E_SELFTTEST_AXIS_T axis)
Definition: bma250e.c:568
upm_result_t bma250e_set_power_mode(const bma250e_context dev, BMA250E_POWER_MODE_T power)
Definition: bma250e.c:514
upm_result_t bma250e_enable_output_filtering(const bma250e_context dev, bool filter)
Definition: bma250e.c:813
uint8_t bma250e_get_interrupt_status2(const bma250e_context dev)
Definition: bma250e.c:848
uint8_t bma250e_get_interrupt_map1(const bma250e_context dev)
Definition: bma250e.c:668
uint8_t bma250e_read_reg(const bma250e_context dev, uint8_t reg)
Definition: bma250e.c:311
upm_result_t bma250e_set_interrupt_src(const bma250e_context dev, uint8_t bits)
Definition: bma250e.c:713
uint8_t bma250e_get_chip_id(const bma250e_context dev)
Definition: bma250e.c:404
void bma250e_enable_fifo(const bma250e_context dev, bool useFIFO)
Definition: bma250e.c:303
uint8_t bma250e_get_interrupt_enable2(const bma250e_context dev)
Definition: bma250e.c:630
upm_result_t bma250e_set_interrupt_output_control(const bma250e_context dev, uint8_t bits)
Definition: bma250e.c:733
upm_result_t bma250e_set_range(const bma250e_context dev, BMA250E_RANGE_T range)
Definition: bma250e.c:445
uint8_t bma250e_get_interrupt_src(const bma250e_context dev)
Definition: bma250e.c:705
upm_result_t bma250e_set_interrupt_latch_behavior(const bma250e_context dev, BMA250E_RST_LATCH_T latch)
Definition: bma250e.c:775
uint8_t bma250e_get_interrupt_status1(const bma250e_context dev)
Definition: bma250e.c:840
bma250e_context bma250e_init(int bus, int addr, int cs)
Definition: bma250e.c:55
upm_result_t bma250e_write_reg(const bma250e_context dev, uint8_t reg, uint8_t val)
Definition: bma250e.c:370
uint8_t bma250e_get_interrupt_enable0(const bma250e_context dev)
Definition: bma250e.c:588
upm_result_t bma250e_fifo_set_watermark(const bma250e_context dev, int wm)
Definition: bma250e.c:534
upm_result_t bma250e_reset(const bma250e_context dev)
Definition: bma250e.c:433
upm_result_t bma250e_set_interrupt_enable2(const bma250e_context dev, uint8_t bits)
Definition: bma250e.c:638
void bma250e_uninstall_isr(const bma250e_context dev, BMA250E_INTERRUPT_PINS_T intr)
Definition: bma250e.c:942
upm_result_t bma250e_devinit(const bma250e_context dev, BMA250E_POWER_MODE_T pwr, BMA250E_RANGE_T range, BMA250E_BW_T bw)
Definition: bma250e.c:188
BMA250E_ORIENT_T bma250e_get_interrupt_status3_orientation(const bma250e_context dev)
Definition: bma250e.c:865
upm_result_t bma250e_enable_register_shadowing(const bma250e_context dev, bool shadow)
Definition: bma250e.c:793
upm_result_t bma250e_set_bandwidth(const bma250e_context dev, BMA250E_BW_T bw)
Definition: bma250e.c:503
upm_result_t bma250e_set_interrupt_map0(const bma250e_context dev, uint8_t bits)
Definition: bma250e.c:658
upm_result_t bma250e_set_interrupt_map2(const bma250e_context dev, uint8_t bits)
Definition: bma250e.c:695
upm_result_t bma250e_set_interrupt_enable1(const bma250e_context dev, uint8_t bits)
Definition: bma250e.c:617
struct _bma250e_context * bma250e_context
void bma250e_get_accelerometer(const bma250e_context dev, float *x, float *y, float *z)
Definition: bma250e.c:411