35 #include <mraa/gpio.h> 41 #include "lis3dh_defs.h" 62 mraa_gpio_context gpioCS;
63 mraa_gpio_context gpioINT1;
64 mraa_gpio_context gpioINT2;
71 float temperatureFactor;
365 LIS3DH_INTERRUPT_PINS_T intr,
367 mraa_gpio_edge_t level,
void lis3dh_get_accelerometer(const lis3dh_context dev, float *x, float *y, float *z)
Definition: lis3dh.c:704
upm_result_t lis3dh_write_reg(const lis3dh_context dev, uint8_t reg, uint8_t val)
Definition: lis3dh.c:629
void lis3dh_close(lis3dh_context dev)
Definition: lis3dh.c:150
upm_result_t lis3dh_devinit(const lis3dh_context dev, LIS3DH_ODR_T odr, LIS3DH_FS_T fs, bool high_res)
Definition: lis3dh.c:173
struct _lis3dh_context * lis3dh_context
upm_result_t lis3dh_enable_temperature(const lis3dh_context dev, bool temperature_enable)
Definition: lis3dh.c:420
upm_result_t lis3dh_enable_bdu_mode(const lis3dh_context dev, bool bdu_enable)
Definition: lis3dh.c:239
uint8_t lis3dh_get_status(const lis3dh_context dev)
Definition: lis3dh.c:730
upm_result_t lis3dh_update(const lis3dh_context dev)
Definition: lis3dh.c:657
upm_result_t lis3dh_set_interrupt_active_high(const lis3dh_context dev, bool high)
Definition: lis3dh.c:522
upm_result_t lis3dh_enable_interrupt_latching(const lis3dh_context dev, bool int1_latch, bool int2_latch)
Definition: lis3dh.c:366
upm_result_t lis3dh_enable_axes(const lis3dh_context dev, bool x_axis_enable, bool y_axis_enable, bool z_axis_enable)
Definition: lis3dh.c:200
int lis3dh_read_regs(const lis3dh_context dev, uint8_t reg, uint8_t *buffer, int len)
Definition: lis3dh.c:593
uint8_t lis3dh_get_status_aux(const lis3dh_context dev)
Definition: lis3dh.c:738
upm_result_t lis3dh_enable_adc(const lis3dh_context dev, bool adc_enable)
Definition: lis3dh.c:393
void lis3dh_uninstall_isr(const lis3dh_context dev, LIS3DH_INTERRUPT_PINS_T intr)
Definition: lis3dh.c:788
upm_result_t lis3dh_enable_hr_mode(const lis3dh_context dev, bool hr_enable)
Definition: lis3dh.c:297
upm_result_t lis3dh_install_isr(const lis3dh_context dev, LIS3DH_INTERRUPT_PINS_T intr, int gpio, mraa_gpio_edge_t level, void(*isr)(void *), void *arg)
Definition: lis3dh.c:746
lis3dh_context lis3dh_init(int bus, int addr, int cs)
Definition: lis3dh.c:73
upm_result_t lis3dh_enable_normal_mode(const lis3dh_context dev)
Definition: lis3dh.c:331
float lis3dh_get_temperature(const lis3dh_context dev)
Definition: lis3dh.c:722
upm_result_t lis3dh_set_int1_config(const lis3dh_context dev, uint8_t cfg)
Definition: lis3dh.c:543
upm_result_t lis3dh_set_int2_config(const lis3dh_context dev, uint8_t cfg)
Definition: lis3dh.c:556
upm_result_t lis3dh_enable_lp_mode(const lis3dh_context dev, bool lp_enable)
Definition: lis3dh.c:260
upm_result_t lis3dh_set_full_scale(const lis3dh_context dev, LIS3DH_FS_T fs)
Definition: lis3dh.c:480
uint8_t lis3dh_read_reg(const lis3dh_context dev, uint8_t reg)
Definition: lis3dh.c:569
upm_result_t lis3dh_enable_hp_filtering(const lis3dh_context dev, bool filter)
Definition: lis3dh.c:345
upm_result_t lis3dh_set_odr(const lis3dh_context dev, LIS3DH_ODR_T odr)
Definition: lis3dh.c:448
uint8_t lis3dh_get_chip_id(const lis3dh_context dev)
Definition: lis3dh.c:696