accel7 2.0.0.0
|
Functions | |
void | accel7_cfg_setup (accel7_cfg_t *cfg) |
Config Object Initialization function. | |
ACCEL7_RETVAL | accel7_init (accel7_t *ctx, accel7_cfg_t *cfg) |
Initialization function. | |
void | accel7_default_cfg (accel7_t *ctx, uint8_t resolution, uint8_t range) |
Click Default Configuration function. | |
void | accel7_generic_write (accel7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | accel7_generic_read (accel7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | accel7_write_byte (accel7_t *ctx, uint8_t reg, uint8_t input_data) |
Write byte function. | |
uint8_t | accel7_read_byte (accel7_t *ctx, uint8_t reg) |
Read byte function. | |
int16_t | accel7_get_axis (accel7_t *ctx, uint8_t axis) |
Get axi function. | |
void | accel7_res_range_cfg (accel7_t *ctx, uint8_t *resolution, uint8_t *range) |
Resolution/range configuration function. | |
uint8_t | accel7_get_interrupt_state (accel7_t *ctx) |
Get interrupt state function. | |
void accel7_cfg_setup | ( | accel7_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void accel7_default_cfg | ( | accel7_t * | ctx, |
uint8_t | resolution, | ||
uint8_t | range ) |
Click Default Configuration function.
ctx | Click object. |
resolution | Resolution variable. |
range | Range variable. |
@description This function executes default configuration for Accel7 click.
void accel7_generic_read | ( | accel7_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.
void accel7_generic_write | ( | accel7_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 accel7_get_axis | ( | accel7_t * | ctx, |
uint8_t | axis ) |
Get axi function.
ctx | Click object. |
axis | Axis register address. |
@description This function reads two bytes of data from the desired axis register.
uint8_t accel7_get_interrupt_state | ( | accel7_t * | ctx | ) |
Get interrupt state function.
ctx | Click object. |
@description This function reads the state of the interrupt pin.
ACCEL7_RETVAL accel7_init | ( | accel7_t * | ctx, |
accel7_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 accel7_read_byte | ( | accel7_t * | ctx, |
uint8_t | reg ) |
Read byte function.
ctx | Click object. |
reg | Register address. |
@description This function reads one byte of data from the desired register.
void accel7_res_range_cfg | ( | accel7_t * | ctx, |
uint8_t * | resolution, | ||
uint8_t * | range ) |
Resolution/range configuration function.
ctx | Click object. |
resolution | Resolution pointer. |
range | Range pointer. |
@description This function calculates the resolution and range values which are used in the default_cfg() function.
void accel7_write_byte | ( | accel7_t * | ctx, |
uint8_t | reg, | ||
uint8_t | input_data ) |
Write byte function.
ctx | Click object. |
reg | Register address. |
input_data | Byte to be written. |
@description This function writes one byte of data to the desired register.