Data Structures | |
| struct | KX134_1211_t |
Functions | |
| KX134_1211_t | KX134_1211_init (KX134_1211_t *, SPI_t *, GPIOpin_t, const uint8_t, const uint8_t *, const int8_t *) |
| Initialiser for a KX134-1211 accelerometer. | |
| void | KX134_1211_update (Accel_t *) |
| Update internally stored acceleration readings. | |
| void | KX134_1211_readAccel (Accel_t *, float *) |
| Read 3-axis floating point accelerations. | |
| void | KX134_1211_readRawBytes (Accel_t *, uint8_t *) |
| Read raw 3-axis data. | |
| void | KX134_1211_processRawBytes (Accel_t *, uint8_t *, float *) |
| Process raw 3-axis data to floating point accelerations. | |
| struct KX134_1211_t |
Definition at line 44 of file kx134_1211.h.
| Data Fields | ||
|---|---|---|
| Accel_t | base | Base accelerometer API. |
| SPI_t * | spi | Parent SPI interface. |
| GPIOpin_t | cs | Chip select GPIO. |
| float | sensitivity | Accelerometer sensitivity. |
| uint8_t | axes[KX134_1211_DATA_COUNT] | Array defining axes of mounting. |
| int8_t | sign[KX134_1211_DATA_COUNT] | Array defining sign of axes. |
| uint8_t | rawAccelData[KX134_1211_DATA_TOTAL] | Raw accelerations array. |
| float | accelData[KX134_1211_DATA_COUNT] | Processed accelerations array. |
| KX134_1211_t KX134_1211_init | ( | KX134_1211_t * | accel, |
| SPI_t * | spi, | ||
| GPIOpin_t | cs, | ||
| uint8_t | scale, | ||
| const uint8_t * | axes, | ||
| const int8_t * | sign ) |
Initialiser for a KX134-1211 accelerometer.
| *accel | Pointer to KX134-1211 struct to be initialised. |
| *spi | Pointer to SPI peripheral struct. |
| cs | Device chip select GPIO. |
| scale | Selected scale for read accelerations. |
| *axes | Array defining sensor mounting axes. |
NULL.Definition at line 27 of file kx134_1211.c.
| void KX134_1211_update | ( | Accel_t * | accel | ) |
Update internally stored acceleration readings.
| *accel | Pointer to accel struct. |
NULL.Definition at line 105 of file kx134_1211.c.
| void KX134_1211_readAccel | ( | Accel_t * | accel, |
| float * | out ) |
Read 3-axis floating point accelerations.
| *accel | Pointer to accel struct. |
| *out | Floating point acceleration array. |
NULL.Definition at line 92 of file kx134_1211.c.
| void KX134_1211_readRawBytes | ( | Accel_t * | accel, |
| uint8_t * | out ) |
Read raw 3-axis data.
| *accel | Pointer to accel struct. |
| *out | Raw 3-axis data array to write. |
NULL.Definition at line 136 of file kx134_1211.c.
| void KX134_1211_processRawBytes | ( | Accel_t * | accel, |
| uint8_t * | bytes, | ||
| float * | out ) |
Process raw 3-axis data to floating point accelerations.
| *accel | Pointer to accel struct. |
| *bytes | Raw 3-axis data array. |
| *out | Processed 3-axis data array to write. |
NULL.Definition at line 120 of file kx134_1211.c.