accel 2.0.0.0
|
Functions | |
void | accel_cfg_setup (accel_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | accel_init (accel_t *ctx, accel_cfg_t *cfg) |
Initialization function. | |
void | accel_default_cfg (accel_t *ctx) |
Click Default Configuration function. | |
void | accel_generic_write (accel_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | accel_generic_read (accel_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
int16_t | accel_read_x_axis (accel_t *ctx) |
Function raw read X axis. | |
int16_t | accel_read_y_axis (accel_t *ctx) |
Function raw read Y axis. | |
int16_t | accel_read_z_axis (accel_t *ctx) |
Function raw read Z axis. | |
uint8_t | accel_check_int_pin (accel_t *ctx) |
INT Pin Get function. | |
void accel_cfg_setup | ( | accel_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t accel_check_int_pin | ( | accel_t * | ctx | ) |
INT Pin Get function.
ctx | Click object. |
@description This function returns true if the high voltage level detected on the INT pin, or returns false if the low voltage level detected on the INT pin.
void accel_default_cfg | ( | accel_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Accel click.
ACCEL_REG_POWER_CTL ------------------------------------------- ACCEL_POWER_CTL_WAKEUP_1
ACCEL_REG_DATA_FORMAT
ACCEL_DATA_FORMAT_FULL_RES ACCEL_DATA_FORMAT_RANGE_16
ACCEL_REG_BW_RATE ------------------------------------------- ACCEL_BW_RATE_RATE_50
ACCEL_REG_FIFO_CTL
ACCEL_FIFO_CTL_FIFO_MODE_STREAM
ACCEL_REG_POWER_CTL ------------------------------------------- ACCEL_POWER_CTL_MEASURE
void accel_generic_read | ( | accel_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 accel_generic_write | ( | accel_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.
err_t accel_init | ( | accel_t * | ctx, |
accel_cfg_t * | cfg ) |
Initialization function.
accel | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
int16_t accel_read_x_axis | ( | accel_t * | ctx | ) |
Function raw read X axis.
ctx | Click object. |
@description Function reads X axis value from Accel.
int16_t accel_read_y_axis | ( | accel_t * | ctx | ) |
Function raw read Y axis.
ctx | Click object. |
@description Function reads Y axis value from Accel.
int16_t accel_read_z_axis | ( | accel_t * | ctx | ) |
Function raw read Z axis.
ctx | Click object. |
@description Function reads Z axis value from Accel.