Interface definition for the STM LIS2DH12 accelerometer. More...
Interface definition for the STM LIS2DH12 accelerometer.
Definition in file lis2dh12.h.
Go to the source code of this file.
Data Structures | |
struct | lis2dh12_params_t |
LIS2DH12 configuration parameters. More... | |
struct | lis2dh12_t |
LIS2DH12 device descriptor. More... | |
struct | lis2dh12_int_params_t |
Parameter for interrupt configuration. More... | |
Macros | |
#define | LIS2DH12_ADDR_DEFAULT (0x19) |
Default I2C slave address for LIS2DH12 devices. | |
#define | LIS2DH12_INT_SRC_XL (0x01) |
Status of INT_SRC register. More... | |
#define | LIS2DH12_INT_SRC_XH (0x02) |
X high event has occurred. | |
#define | LIS2DH12_INT_SRC_YL (0x04) |
Y low event has occurred. | |
#define | LIS2DH12_INT_SRC_YH (0x08) |
Y high event has occurred. | |
#define | LIS2DH12_INT_SRC_ZL (0x10) |
Z low event has occurred. | |
#define | LIS2DH12_INT_SRC_ZH (0x20) |
Z high event has occurred. | |
#define | LIS2DH12_INT_SRC_IA (0x40) |
1 if interrupt occurred | |
#define | LIS2DH12_STATUS_XDA (0x01) |
Status of INT_SRC register. More... | |
#define | LIS2DH12_STATUS_YDA (0x02) |
Y-axis new data available. | |
#define | LIS2DH12_STATUS_ZDA (0x04) |
Z-axis new data available. | |
#define | LIS2DH12_STATUS_ZYXDA (0x08) |
on X-, Y-, Z-axis new data available | |
#define | LIS2DH12_STATUS_XOR (0x10) |
X-axis data overrun. | |
#define | LIS2DH12_STATUS_YOR (0x20) |
Y-axis data overrun. | |
#define | LIS2DH12_STATUS_ZOR (0x40) |
Y-axis data overrun. | |
#define | LIS2DH12_STATUS_ZYXOR (0x80) |
on X-, Y-, Z-axis data overrun | |
Functions | |
int | lis2dh12_set_int (const lis2dh12_t *dev, const lis2dh12_int_params_t *params, uint8_t int_line) |
Set the interrupt values in LIS2DH12 sensor device. More... | |
int | lis2dh12_read_int_src (const lis2dh12_t *dev, uint8_t *data, uint8_t int_line) |
Read an interrupt event on LIS2DH12 sensor device. More... | |
int | lis2dh12_init (lis2dh12_t *dev, const lis2dh12_params_t *params) |
Initialize the given LIS2DH12 sensor device. More... | |
int | lis2dh12_read (const lis2dh12_t *dev, int16_t *data) |
Read acceleration data from the given device. More... | |
int | lis2dh12_poweron (const lis2dh12_t *dev) |
Power on the given device. More... | |
int | lis2dh12_poweroff (const lis2dh12_t *dev) |
Power off the given device. More... | |
Variables | |
const saul_driver_t | lis2dh12_saul_driver |
Export the SAUL interface for this driver. | |