33 #include <mraa/gpio.h> 37 #include "bmg160_defs.h" 57 mraa_gpio_context gpioCS;
58 mraa_gpio_context gpio1;
59 mraa_gpio_context gpio2;
132 float *x,
float *y,
float *z);
159 BMG160_POWER_MODE_T pwr,
160 BMG160_RANGE_T range,
183 BMG160_RANGE_T range);
206 BMG160_POWER_MODE_T power);
247 BMG160_FIFO_MODE_T mode,
248 BMG160_FIFO_DATA_SEL_T axes);
388 BMG160_RST_LATCH_T latch);
471 BMG160_INTERRUPT_PINS_T intr,
int gpio,
472 mraa_gpio_edge_t level,
473 void (*isr)(
void *),
void *arg);
483 BMG160_INTERRUPT_PINS_T intr);
503 uint8_t *buffer,
int len);
514 uint8_t reg, uint8_t val);
upm_result_t bmg160_update(const bmg160_context dev)
Definition: bmg160.c:204
upm_result_t bmg160_fifo_config(const bmg160_context dev, BMG160_FIFO_MODE_T mode, BMG160_FIFO_DATA_SEL_T axes)
Definition: bmg160.c:481
upm_result_t bmg160_set_power_mode(const bmg160_context dev, BMG160_POWER_MODE_T power)
Definition: bmg160.c:450
upm_result_t bmg160_enable_output_filtering(const bmg160_context dev, bool filter)
Definition: bmg160.c:659
upm_result_t bmg160_devinit(const bmg160_context dev, BMG160_POWER_MODE_T pwr, BMG160_RANGE_T range, BMG160_BW_T bw)
Definition: bmg160.c:166
upm_result_t bmg160_set_bandwidth(const bmg160_context dev, BMG160_BW_T bw)
Definition: bmg160.c:439
upm_result_t bmg160_set_interrupt_map1(const bmg160_context dev, uint8_t bits)
Definition: bmg160.c:544
struct _bmg160_context * bmg160_context
void bmg160_close(bmg160_context dev)
Definition: bmg160.c:149
upm_result_t bmg160_install_isr(const bmg160_context dev, BMG160_INTERRUPT_PINS_T intr, int gpio, mraa_gpio_edge_t level, void(*isr)(void *), void *arg)
Definition: bmg160.c:710
uint8_t bmg160_get_interrupt_src(const bmg160_context dev)
Definition: bmg160.c:555
uint8_t bmg160_get_interrupt_output_control(const bmg160_context dev)
Definition: bmg160.c:575
uint8_t bmg160_get_interrupt_status3(const bmg160_context dev)
Definition: bmg160.c:702
uint8_t bmg160_get_interrupt_map0(const bmg160_context dev)
Definition: bmg160.c:517
upm_result_t bmg160_reset(const bmg160_context dev)
Definition: bmg160.c:389
int bmg160_read_regs(const bmg160_context dev, uint8_t reg, uint8_t *buffer, int len)
Definition: bmg160.c:286
upm_result_t bmg160_enable_register_shadowing(const bmg160_context dev, bool shadow)
Definition: bmg160.c:640
uint8_t bmg160_get_interrupt_status2(const bmg160_context dev)
Definition: bmg160.c:694
upm_result_t bmg160_set_range(const bmg160_context dev, BMG160_RANGE_T range)
Definition: bmg160.c:401
float bmg160_get_temperature(const bmg160_context dev)
Definition: bmg160.c:382
uint8_t bmg160_get_interrupt_map1(const bmg160_context dev)
Definition: bmg160.c:537
uint8_t bmg160_get_interrupt_enable0(const bmg160_context dev)
Definition: bmg160.c:496
uint8_t bmg160_get_chip_id(const bmg160_context dev)
Definition: bmg160.c:360
upm_result_t bmg160_write_reg(const bmg160_context dev, uint8_t reg, uint8_t val)
Definition: bmg160.c:326
upm_result_t bmg160_fifo_set_watermark(const bmg160_context dev, int wm)
Definition: bmg160.c:468
uint8_t bmg160_get_interrupt_status0(const bmg160_context dev)
Definition: bmg160.c:678
BMG160_RST_LATCH_T bmg160_get_interrupt_latch_behavior(const bmg160_context dev)
Definition: bmg160.c:611
bmg160_context bmg160_init(int bus, int addr, int cs)
Definition: bmg160.c:55
upm_result_t bmg160_clear_interrupt_latches(const bmg160_context dev)
Definition: bmg160.c:596
upm_result_t bmg160_set_interrupt_map0(const bmg160_context dev, uint8_t bits)
Definition: bmg160.c:525
void bmg160_uninstall_isr(const bmg160_context dev, BMG160_INTERRUPT_PINS_T intr)
Definition: bmg160.c:752
upm_result_t bmg160_set_interrupt_latch_behavior(const bmg160_context dev, BMG160_RST_LATCH_T latch)
Definition: bmg160.c:623
void bmg160_enable_fifo(const bmg160_context dev, bool useFIFO)
Definition: bmg160.c:255
uint8_t bmg160_read_reg(const bmg160_context dev, uint8_t reg)
Definition: bmg160.c:262
upm_result_t bmg160_set_interrupt_output_control(const bmg160_context dev, uint8_t bits)
Definition: bmg160.c:583
upm_result_t bmg160_set_interrupt_src(const bmg160_context dev, uint8_t bits)
Definition: bmg160.c:563
upm_result_t bmg160_set_interrupt_enable0(const bmg160_context dev, uint8_t bits)
Definition: bmg160.c:504
uint8_t bmg160_get_interrupt_status1(const bmg160_context dev)
Definition: bmg160.c:686
void bmg160_get_gyroscope(const bmg160_context dev, float *x, float *y, float *z)
Definition: bmg160.c:367