accel3 2.0.0.0
|
Functions | |
void | accel3_cfg_setup (accel3_cfg_t *cfg) |
Config Object Initialization function. | |
ACCEL3_RETVAL | accel3_init (accel3_t *ctx, accel3_cfg_t *cfg) |
Initialization function. | |
void | accel3_default_cfg (accel3_t *ctx, accel3_cfg_t *cfg) |
Click Default Configuration function. | |
void | accel3_generic_write (accel3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | accel3_generic_read (accel3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | accel3_check_id (accel3_t *ctx) |
Check Accel 3 ID function. | |
void | accel3_read_data (accel3_t *ctx, accel3_data_t *accel3_data) |
Get accelerometer data function. | |
void accel3_cfg_setup | ( | accel3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t accel3_check_id | ( | accel3_t * | ctx | ) |
Check Accel 3 ID function.
ctx | Click object. |
@description This function checks Accel 3 ID.
void accel3_default_cfg | ( | accel3_t * | ctx, |
accel3_cfg_t * | cfg ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Accel3 click.
void accel3_generic_read | ( | accel3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function reads data from the desired register.
void accel3_generic_write | ( | accel3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function writes data to the desired register.
ACCEL3_RETVAL accel3_init | ( | accel3_t * | ctx, |
accel3_cfg_t * | cfg ) |
Initialization function.
accel3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void accel3_read_data | ( | accel3_t * | ctx, |
accel3_data_t * | accel3_data ) |
Get accelerometer data function.
ctx | Click object. |
accel3_data | Pointer to structure where Accel data be stored. |
@description This function reads Accel data ( X, Y and Z axis ) from the desired Accel registers of the H3LIS331DL module.