33 #include <mraa/gpio.h> 37 #include "lis2ds12_defs.h" 58 mraa_gpio_context gpioCS;
59 mraa_gpio_context gpioINT1;
60 mraa_gpio_context gpioINT2;
163 float *x,
float *y,
float *z);
274 LIS2DS12_INTERRUPT_PINS_T intr,
int gpio,
275 mraa_gpio_edge_t level,
276 void (*isr)(
void *),
void *arg);
286 LIS2DS12_INTERRUPT_PINS_T intr);
307 uint8_t *buffer,
int len);
318 uint8_t reg, uint8_t val);
uint8_t lis2ds12_read_reg(const lis2ds12_context dev, uint8_t reg)
Definition: lis2ds12.c:316
upm_result_t lis2ds12_set_interrupt_push_pull(const lis2ds12_context dev, bool pp)
Definition: lis2ds12.c:510
uint8_t lis2ds12_get_status(const lis2ds12_context dev)
Definition: lis2ds12.c:550
struct _lis2ds12_context * lis2ds12_context
upm_result_t lis2ds12_set_odr(const lis2ds12_context dev, LIS2DS12_ODR_T odr)
Definition: lis2ds12.c:209
int lis2ds12_read_regs(const lis2ds12_context dev, uint8_t reg, uint8_t *buffer, int len)
Definition: lis2ds12.c:340
void lis2ds12_close(lis2ds12_context dev)
Definition: lis2ds12.c:163
upm_result_t lis2ds12_update(const lis2ds12_context dev)
Definition: lis2ds12.c:282
float lis2ds12_get_temperature(const lis2ds12_context dev)
Definition: lis2ds12.c:433
upm_result_t lis2ds12_devinit(const lis2ds12_context dev, LIS2DS12_ODR_T odr, LIS2DS12_FS_T fs)
Definition: lis2ds12.c:180
upm_result_t lis2ds12_enable_hp_filtering(const lis2ds12_context dev, bool filter)
Definition: lis2ds12.c:456
upm_result_t lis2ds12_set_int2_config(const lis2ds12_context dev, uint8_t cfg)
Definition: lis2ds12.c:539
void lis2ds12_get_accelerometer(const lis2ds12_context dev, float *x, float *y, float *z)
Definition: lis2ds12.c:416
upm_result_t lis2ds12_write_reg(const lis2ds12_context dev, uint8_t reg, uint8_t val)
Definition: lis2ds12.c:375
upm_result_t lis2ds12_reset(const lis2ds12_context dev)
Definition: lis2ds12.c:440
upm_result_t lis2ds12_install_isr(const lis2ds12_context dev, LIS2DS12_INTERRUPT_PINS_T intr, int gpio, mraa_gpio_edge_t level, void(*isr)(void *), void *arg)
Definition: lis2ds12.c:557
upm_result_t lis2ds12_set_full_scale(const lis2ds12_context dev, LIS2DS12_FS_T fs)
Definition: lis2ds12.c:244
upm_result_t lis2ds12_set_interrupt_active_high(const lis2ds12_context dev, bool high)
Definition: lis2ds12.c:492
void lis2ds12_uninstall_isr(const lis2ds12_context dev, LIS2DS12_INTERRUPT_PINS_T intr)
Definition: lis2ds12.c:599
lis2ds12_context lis2ds12_init(int bus, int addr, int cs)
Definition: lis2ds12.c:65
upm_result_t lis2ds12_set_int1_config(const lis2ds12_context dev, uint8_t cfg)
Definition: lis2ds12.c:528
upm_result_t lis2ds12_enable_interrupt_latching(const lis2ds12_context dev, bool latch)
Definition: lis2ds12.c:474
uint8_t lis2ds12_get_chip_id(const lis2ds12_context dev)
Definition: lis2ds12.c:409
Definition: lis2ds12.h:54