c3dhall5 2.0.0.0
|
Functions | |
void | c3dhall5_cfg_setup (c3dhall5_cfg_t *cfg) |
Config Object Initialization function. | |
C3DHALL5_RETVAL | c3dhall5_init (c3dhall5_t *ctx, c3dhall5_cfg_t *cfg) |
Initialization function. | |
void | c3dhall5_default_cfg (c3dhall5_t *ctx) |
Click Default Configuration function. | |
void | c3dhall5_generic_write (c3dhall5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | c3dhall5_generic_read (c3dhall5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | c3dhall5_get_device_id (c3dhall5_t *ctx) |
Device ID. | |
float | c3dhall5_get_temperature_data (c3dhall5_t *ctx) |
Temperature data. | |
uint8_t | c3dhall5_get_interrupt_state (c3dhall5_t *ctx) |
Interrupt state. | |
void | c3dhall5_set_offset (c3dhall5_t *ctx, uint8_t offset_axis, int16_t offset) |
Set offest. | |
int16_t | c3dhall5_get_axis_data (c3dhall5_t *ctx, uint8_t axis) |
Axis data. | |
void c3dhall5_cfg_setup | ( | c3dhall5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void c3dhall5_default_cfg | ( | c3dhall5_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for 3DHall5 click.
void c3dhall5_generic_read | ( | c3dhall5_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 c3dhall5_generic_write | ( | c3dhall5_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.
int16_t c3dhall5_get_axis_data | ( | c3dhall5_t * | ctx, |
uint8_t | axis ) |
Axis data.
ctx | Click object. |
axis | The axis to be read |
uint8_t c3dhall5_get_device_id | ( | c3dhall5_t * | ctx | ) |
Device ID.
ctx | Click object. |
@description You can use this function as a check to communicate a click with your MCU.
uint8_t c3dhall5_get_interrupt_state | ( | c3dhall5_t * | ctx | ) |
Interrupt state.
ctx | Click object. |
float c3dhall5_get_temperature_data | ( | c3dhall5_t * | ctx | ) |
Temperature data.
ctx | Click object. |
@description Function for checking and reading temperature.
C3DHALL5_RETVAL c3dhall5_init | ( | c3dhall5_t * | ctx, |
c3dhall5_cfg_t * | cfg ) |
Initialization function.
c3dhall5 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void c3dhall5_set_offset | ( | c3dhall5_t * | ctx, |
uint8_t | offset_axis, | ||
int16_t | offset ) |
Set offest.
ctx | Click object. |
offset_axis | The axis for which you set off |
offset | Offset data to be set |