Loading...
Searching...
No Matches

Data Structures

struct  KX134_1211
 

Functions

DeviceHandle_t KX134_1211_init (KX134_1211 *, char[DEVICE_NAME_LENGTH], GPIO_TypeDef *, unsigned long, const uint8_t, const uint8_t *, const int8_t *)
 Initialiser for a KX134-1211 accelerometer.
 
void KX134_1211_update (KX134_1211 *)
 Updates internally stored acceleration readings.
 
void KX134_1211_readAccel (KX134_1211 *, float *)
 Read 3-axis floating point accelerations.
 
void KX134_1211_readRawBytes (KX134_1211 *, uint8_t *)
 Read raw 3-axis data.
 
void KX134_1211_processRawBytes (KX134_1211 *, uint8_t *, float *)
 Process raw 3-axis data to floating point accelerations.
 

Detailed Description

Function Documentation

◆ KX134_1211_init()

DeviceHandle_t KX134_1211_init ( KX134_1211 * accel,
char name[DEVICE_NAME_LENGTH],
GPIO_TypeDef * port,
unsigned long cs,
uint8_t scale,
const uint8_t * axes,
const int8_t * sign )

Initialiser for a KX134-1211 accelerometer.

Parameters
*accelPointer to KX134-1211 struct to be initialised.
*portPointer to GPIO port struct.
csDevice chip select address.
scaleSelected scale for read accelerations.
*axesArray defining sensor mounting axes.
Returns
NULL.

Definition at line 25 of file kx134_1211.c.

◆ KX134_1211_update()

void KX134_1211_update ( KX134_1211 * accel)

Updates internally stored acceleration readings.

Parameters
*accelPointer to accel struct.
Returns
NULL.

Definition at line 104 of file kx134_1211.c.

◆ KX134_1211_readAccel()

void KX134_1211_readAccel ( KX134_1211 * accel,
float * out )

Read 3-axis floating point accelerations.

Parameters
*accelPointer to accel struct.
*outFloating point acceleration array.
Returns
NULL.

Definition at line 91 of file kx134_1211.c.

◆ KX134_1211_readRawBytes()

void KX134_1211_readRawBytes ( KX134_1211 * accel,
uint8_t * out )

Read raw 3-axis data.

Parameters
*accelPointer to accel struct.
*outRaw 3-axis data array to write.
Returns
NULL.

Definition at line 134 of file kx134_1211.c.

◆ KX134_1211_processRawBytes()

void KX134_1211_processRawBytes ( KX134_1211 * accel,
uint8_t * bytes,
float * out )

Process raw 3-axis data to floating point accelerations.

Parameters
*accelPointer to accel struct.
*bytesRaw 3-axis data array.
*outProcessed 3-axis data array to write.
Returns
NULL.

Definition at line 119 of file kx134_1211.c.