accel6
2.0.0.0
|
Functions | |
void | accel6_cfg_setup (accel6_cfg_t *cfg) |
Config Object Initialization function. More... | |
ACCEL6_RETVAL | accel6_init (accel6_t *ctx, accel6_cfg_t *cfg) |
Initialization function. More... | |
void | accel6_generic_write (accel6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | accel6_generic_read (accel6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
void | accel6_soft_reset (accel6_t *ctx) |
Functions for software reset. More... | |
void | accel6_default_cfg (accel6_t *ctx, uint8_t range_data, uint8_t bw_data, uint8_t lpw_data) |
Click Default Configuration function. More... | |
void | accel6_data_offset (accel6_t *ctx, uint8_t set_offset, float *offset_data) |
Functions for set offset. More... | |
uint8_t | accel6_get_tap_status (accel6_t *ctx) |
Functions for detect tap on the x/y/z axis. More... | |
uint8_t | accel6_get_slope_status (accel6_t *ctx) |
Functions for detect slope on the x/y/z axis. More... | |
void | accel6_get_orient (accel6_t *ctx, uint8_t *z_orient, uint8_t *xy_orient) |
Functions for read orient. More... | |
float | accel6_get_axis (accel6_t *ctx, uint8_t axis) |
Functions for read axis data. More... | |
float | accel6_get_temperature (accel6_t *ctx) |
Functions for read temperature. More... | |
void accel6_cfg_setup | ( | accel6_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void accel6_data_offset | ( | accel6_t * | ctx, |
uint8_t | set_offset, | ||
float * | offset_data | ||
) |
Functions for set offset.
ctx | Click object. |
set_offset | Data which will be written in offset settings register |
offset_data | Buffer in which the XYZ offset will be written.
|
void accel6_default_cfg | ( | accel6_t * | ctx, |
uint8_t | range_data, | ||
uint8_t | bw_data, | ||
uint8_t | lpw_data | ||
) |
Click Default Configuration function.
ctx | Click object. |
range_data | Accelerometer g-range |
bw_data | Acceleration data filter bandwidth |
lpw_data | Power mode and the low power sleep period. |
This function executes default configuration for Accel 6 click.
Set ACCEL6_REG_PMU_RANGE reg:
-storage accel range -storage bandwidth data
void accel6_generic_read | ( | accel6_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. |
This function reads data from the desired register.
void accel6_generic_write | ( | accel6_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 |
This function writes data to the desired register.
float accel6_get_axis | ( | accel6_t * | ctx, |
uint8_t | axis | ||
) |
Functions for read axis data.
ctx | Click object. |
axis | Axis data which will be read |
Axis | data in mg |
This function reads data from the desired register.
void accel6_get_orient | ( | accel6_t * | ctx, |
uint8_t * | z_orient, | ||
uint8_t * | xy_orient | ||
) |
Functions for read orient.
ctx | Click object. |
z_orient | Buffer in which the Z-axis chip orientation will be written. |
xy_orient | Buffer in which the XY-axis chip orientation will be written. |
Z orientation :
uint8_t accel6_get_slope_status | ( | accel6_t * | ctx | ) |
Functions for detect slope on the x/y/z axis.
ctx | Click object. |
Information | of the slope |
Tap detection :
uint8_t accel6_get_tap_status | ( | accel6_t * | ctx | ) |
Functions for detect tap on the x/y/z axis.
ctx | Click object. |
Information | of the Tap |
Tap detection :
float accel6_get_temperature | ( | accel6_t * | ctx | ) |
Functions for read temperature.
ctx | Click object. |
Temperature | data in C |
Formula: Temperature = 0.5 * Temp_data + 23.0
ACCEL6_RETVAL accel6_init | ( | accel6_t * | ctx, |
accel6_cfg_t * | cfg | ||
) |
Initialization function.
accel6 | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void accel6_soft_reset | ( | accel6_t * | ctx | ) |
Functions for software reset.
ctx | Click object. |