33 #include <mraa/gpio.h> 37 #include "bmm150_defs.h" 57 mraa_gpio_context gpioCS;
58 mraa_gpio_context gpioINT;
59 mraa_gpio_context gpioDR;
63 BMM150_OPERATION_MODE_T opmode;
144 float *x,
float *y,
float *z);
158 BMM150_USAGE_PRESETS_T usage);
171 BMM150_USAGE_PRESETS_T usage);
194 BMM150_DATA_RATE_T odr);
220 BMM150_OPERATION_MODE_T opmode);
327 BMM150_INTERRUPT_PINS_T intr,
328 int gpio, mraa_gpio_edge_t level,
329 void (*isr)(
void *),
void *arg);
339 BMM150_INTERRUPT_PINS_T intr);
359 uint8_t *buffer,
int len);
370 uint8_t reg, uint8_t val);
upm_result_t bmm150_write_reg(const bmm150_context dev, uint8_t reg, uint8_t val)
Definition: bmm150.c:474
upm_result_t bmm150_install_isr(const bmm150_context dev, BMM150_INTERRUPT_PINS_T intr, int gpio, mraa_gpio_edge_t level, void(*isr)(void *), void *arg)
Definition: bmm150.c:736
bmm150_context bmm150_init(int bus, int addr, int cs)
Definition: bmm150.c:192
upm_result_t bmm150_reset(const bmm150_context dev)
Definition: bmm150.c:530
upm_result_t bmm150_set_output_data_rate(const bmm150_context dev, BMM150_DATA_RATE_T odr)
Definition: bmm150.c:550
upm_result_t bmm150_set_repetitions_z(const bmm150_context dev, uint8_t reps)
Definition: bmm150.c:671
upm_result_t bmm150_set_opmode(const bmm150_context dev, BMM150_OPERATION_MODE_T opmode)
Definition: bmm150.c:586
uint8_t bmm150_get_interrupt_config(const bmm150_context dev)
Definition: bmm150.c:635
upm_result_t bmm150_update(const bmm150_context dev)
Definition: bmm150.c:351
uint8_t bmm150_get_chip_id(const bmm150_context dev)
Definition: bmm150.c:508
upm_result_t bmm150_set_power_bit(const bmm150_context dev, bool power)
Definition: bmm150.c:566
struct _bmm150_context * bmm150_context
void bmm150_get_magnetometer(const bmm150_context dev, float *x, float *y, float *z)
Definition: bmm150.c:515
upm_result_t bmm150_set_interrupt_config(const bmm150_context dev, uint8_t bits)
Definition: bmm150.c:642
upm_result_t bmm150_devinit(const bmm150_context dev, BMM150_USAGE_PRESETS_T usage)
Definition: bmm150.c:312
uint8_t bmm150_get_interrupt_status(const bmm150_context dev)
Definition: bmm150.c:653
upm_result_t bmm150_set_preset_mode(const bmm150_context dev, BMM150_USAGE_PRESETS_T usage)
Definition: bmm150.c:682
uint8_t bmm150_get_interrupt_enable(const bmm150_context dev)
Definition: bmm150.c:617
upm_result_t bmm150_set_repetitions_xy(const bmm150_context dev, uint8_t reps)
Definition: bmm150.c:660
void bmm150_close(bmm150_context dev)
Definition: bmm150.c:295
upm_result_t bmm150_set_interrupt_enable(const bmm150_context dev, uint8_t bits)
Definition: bmm150.c:624
int bmm150_read_regs(const bmm150_context dev, uint8_t reg, uint8_t *buffer, int len)
Definition: bmm150.c:439
uint8_t bmm150_read_reg(const bmm150_context dev, uint8_t reg)
Definition: bmm150.c:415
BMM150_OPERATION_MODE_T bmm150_get_opmode(const bmm150_context dev)
Definition: bmm150.c:604
void bmm150_uninstall_isr(const bmm150_context dev, BMM150_INTERRUPT_PINS_T intr)
Definition: bmm150.c:778