33 #include <mraa/gpio.h> 37 #include "lsm6dsl_defs.h" 58 mraa_gpio_context gpioCS;
59 mraa_gpio_context gpioINT1;
60 mraa_gpio_context gpioINT2;
135 LSM6DSL_XL_ODR_T acc_odr,
136 LSM6DSL_XL_FS_T acc_fs,
137 LSM6DSL_G_ODR_T gyr_odr,
138 LSM6DSL_G_FS_T gyr_fs);
148 LSM6DSL_XL_ODR_T odr);
158 LSM6DSL_G_ODR_T odr);
196 float *x,
float *y,
float *z);
212 float *x,
float *y,
float *z);
294 int x,
int y,
int z,
bool weight);
312 LSM6DSL_INTERRUPT_PINS_T intr,
int gpio,
313 mraa_gpio_edge_t level,
314 void (*isr)(
void *),
void *arg);
324 LSM6DSL_INTERRUPT_PINS_T intr);
344 uint8_t *buffer,
int len);
355 uint8_t reg, uint8_t val);
upm_result_t lsm6dsl_update(const lsm6dsl_context dev)
Definition: lsm6dsl.c:312
upm_result_t lsm6dsl_set_acc_full_scale(const lsm6dsl_context dev, LSM6DSL_XL_FS_T fs)
Definition: lsm6dsl.c:248
upm_result_t lsm6dsl_set_interrupt_active_high(const lsm6dsl_context dev, bool high)
Definition: lsm6dsl.c:530
upm_result_t lsm6dsl_reset(const lsm6dsl_context dev)
Definition: lsm6dsl.c:514
upm_result_t lsm6dsl_install_isr(const lsm6dsl_context dev, LSM6DSL_INTERRUPT_PINS_T intr, int gpio, mraa_gpio_edge_t level, void(*isr)(void *), void *arg)
Definition: lsm6dsl.c:603
upm_result_t lsm6dsl_high_performance(const lsm6dsl_context dev, bool enable)
Definition: lsm6dsl.c:482
uint8_t lsm6dsl_read_reg(const lsm6dsl_context dev, uint8_t reg)
Definition: lsm6dsl.c:343
upm_result_t lsm6dsl_set_acc_odr(const lsm6dsl_context dev, LSM6DSL_XL_ODR_T odr)
Definition: lsm6dsl.c:214
void lsm6dsl_uninstall_isr(const lsm6dsl_context dev, LSM6DSL_INTERRUPT_PINS_T intr)
Definition: lsm6dsl.c:645
upm_result_t lsm6dsl_devinit(const lsm6dsl_context dev, LSM6DSL_XL_ODR_T acc_odr, LSM6DSL_XL_FS_T acc_fs, LSM6DSL_G_ODR_T gyr_odr, LSM6DSL_G_FS_T gyr_fs)
Definition: lsm6dsl.c:181
uint8_t lsm6dsl_get_status(const lsm6dsl_context dev)
Definition: lsm6dsl.c:566
uint8_t lsm6dsl_get_chip_id(const lsm6dsl_context dev)
Definition: lsm6dsl.c:436
float lsm6dsl_get_temperature(const lsm6dsl_context dev)
Definition: lsm6dsl.c:473
upm_result_t lsm6dsl_set_gyr_odr(const lsm6dsl_context dev, LSM6DSL_G_ODR_T odr)
Definition: lsm6dsl.c:231
struct _lsm6dsl_context * lsm6dsl_context
upm_result_t lsm6dsl_write_reg(const lsm6dsl_context dev, uint8_t reg, uint8_t val)
Definition: lsm6dsl.c:402
upm_result_t lsm6dsl_set_gyr_full_scale(const lsm6dsl_context dev, LSM6DSL_G_FS_T fs)
Definition: lsm6dsl.c:285
void lsm6dsl_get_gyroscope(const lsm6dsl_context dev, float *x, float *y, float *z)
Definition: lsm6dsl.c:458
void lsm6dsl_get_accelerometer(const lsm6dsl_context dev, float *x, float *y, float *z)
Definition: lsm6dsl.c:443
upm_result_t lsm6dsl_set_interrupt_push_pull(const lsm6dsl_context dev, bool pp)
Definition: lsm6dsl.c:548
void lsm6dsl_close(lsm6dsl_context dev)
Definition: lsm6dsl.c:164
upm_result_t lsm6dsl_set_acc_offsets(const lsm6dsl_context dev, int x, int y, int z, bool weight)
Definition: lsm6dsl.c:573
int lsm6dsl_read_regs(const lsm6dsl_context dev, uint8_t reg, uint8_t *buffer, int len)
Definition: lsm6dsl.c:367
lsm6dsl_context lsm6dsl_init(int bus, int addr, int cs)
Definition: lsm6dsl.c:65