accel2 2.0.0.0
|
Functions | |
void | accel2_cfg_setup (accel2_cfg_t *cfg) |
Config Object Initialization function. | |
ACCEL2_RETVAL | accel2_init (accel2_t *ctx, accel2_cfg_t *cfg) |
Initialization function. | |
void | accel2_generic_write (accel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | accel2_generic_read (accel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | accel2_setting (accel2_t *ctx) |
Initializes function. | |
uint8_t | accel2_check_id (accel2_t *ctx) |
Check Accel 2 ID. | |
int16_t | accel2_read_xaxis (accel2_t *ctx) |
Function read X axis. | |
int16_t | accel2_read_yaxis (accel2_t *ctx) |
Function read Y axis. | |
int16_t | accel2_read_zaxis (accel2_t *ctx) |
Function read Z axis. | |
void accel2_cfg_setup | ( | accel2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t accel2_check_id | ( | accel2_t * | ctx | ) |
Check Accel 2 ID.
ctx | Click object. |
@description This function check Accel 2 ID.
void accel2_generic_read | ( | accel2_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 accel2_generic_write | ( | accel2_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.
ACCEL2_RETVAL accel2_init | ( | accel2_t * | ctx, |
accel2_cfg_t * | cfg ) |
Initialization function.
accel2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
int16_t accel2_read_xaxis | ( | accel2_t * | ctx | ) |
Function read X axis.
ctx | Click object. |
@description This function read X axis from Accel 2.
int16_t accel2_read_yaxis | ( | accel2_t * | ctx | ) |
Function read Y axis.
ctx | Click object. |
@description This function read Y axis from Accel 2.
int16_t accel2_read_zaxis | ( | accel2_t * | ctx | ) |
Function read Z axis.
ctx | Click object. |
@description This function read Z axis from Accel 2.
void accel2_setting | ( | accel2_t * | ctx | ) |
Initializes function.
ctx | Click object. |
@description This function initializes Accel 2 register.