accel5 2.0.0.0
|
Functions | |
void | accel5_cfg_setup (accel5_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | accel5_init (accel5_t *ctx, accel5_cfg_t *cfg) |
Initialization function. | |
err_t | accel5_generic_write (accel5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
err_t | accel5_generic_read (accel5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | accel5_default_cfg (accel5_t *ctx, uint8_t mode, uint8_t range) |
Click Default Configuration function.. | |
void | accel5_write_byte (accel5_t *ctx, uint8_t reg, uint8_t reg_data) |
Functions for write one byte in register. | |
uint8_t | accel5_read_byte (accel5_t *ctx, uint8_t reg) |
Functions for read byte from register. | |
uint16_t | accel5_read_data (accel5_t *ctx, uint8_t reg) |
Functions for read data from register. | |
int16_t | accel5_get_axis (accel5_t *ctx, uint8_t axis) |
Functions for read axis data. | |
uint32_t | accel5_sensor_time (accel5_t *ctx) |
Functions for initialize the chip. | |
float | accel5_get_temperature (accel5_t *ctx) |
Functions for read temperature. | |
void | accel5_soft_reset (accel5_t *ctx) |
Functions for software reset. | |
void accel5_cfg_setup | ( | accel5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. @description This function initializes click configuration structure to init state. |
void accel5_default_cfg | ( | accel5_t * | ctx, |
uint8_t | mode, | ||
uint8_t | range ) |
Click Default Configuration function..
ctx | Click object. |
mode | Mode. |
range | Range. @description This Functions initializes accelerometer g-range and mode. Initialization contains and enable data, single tap, double tap, step, actch and x / y / z axis. |
err_t accel5_generic_read | ( | accel5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read @description This function reads data from the desired register. |
err_t accel5_generic_write | ( | accel5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write 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 writes data to the desired register. |
int16_t accel5_get_axis | ( | accel5_t * | ctx, |
uint8_t | axis ) |
Functions for read axis data.
ctx | Click object. |
axis | Axis. @description This function gets axis. |
float accel5_get_temperature | ( | accel5_t * | ctx | ) |
Functions for read temperature.
ctx | Click object. @description This function read temperature. |
err_t accel5_init | ( | accel5_t * | ctx, |
accel5_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t accel5_read_byte | ( | accel5_t * | ctx, |
uint8_t | reg ) |
Functions for read byte from register.
ctx | Click object. |
reg | Register address. @description This function read one byte data which is read from the register. |
uint16_t accel5_read_data | ( | accel5_t * | ctx, |
uint8_t | reg ) |
Functions for read data from register.
ctx | Click object. |
reg | Register address. @description This function read data. |
uint32_t accel5_sensor_time | ( | accel5_t * | ctx | ) |
Functions for initialize the chip.
ctx | Click object. @description The internal sensor time is calculated using the formula: Sensor time = Time * 312.5us
|
void accel5_soft_reset | ( | accel5_t * | ctx | ) |
Functions for software reset.
ctx | Click object. @description This function software reset . |
void accel5_write_byte | ( | accel5_t * | ctx, |
uint8_t | reg, | ||
uint8_t | reg_data ) |
Functions for write one byte in register.
ctx | Click object. |
reg | Register address. |
data | Data @description This function write byte. |