hallcurrent4 2.0.0.0
|
Functions | |
void | hallcurrent4_cfg_setup (hallcurrent4_cfg_t *cfg) |
Config Object Initialization function. | |
HALLCURRENT4_RETVAL | hallcurrent4_init (hallcurrent4_t *ctx, hallcurrent4_cfg_t *cfg) |
Initialization function. | |
void | hallcurrent4_generic_write (hallcurrent4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | hallcurrent4_generic_read (hallcurrent4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint16_t | hallcurrent4_get_raw_data (hallcurrent4_t *ctx) |
Reads raw (ADC) current data. | |
float | hallcurrent4_get_current_data (hallcurrent4_t *ctx) |
Reads current in mA. | |
void hallcurrent4_cfg_setup | ( | hallcurrent4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void hallcurrent4_generic_read | ( | hallcurrent4_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 hallcurrent4_generic_write | ( | hallcurrent4_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.
float hallcurrent4_get_current_data | ( | hallcurrent4_t * | ctx | ) |
Reads current in mA.
ctx | Click object. |
uint16_t hallcurrent4_get_raw_data | ( | hallcurrent4_t * | ctx | ) |
Reads raw (ADC) current data.
ctx | Click object. |
HALLCURRENT4_RETVAL hallcurrent4_init | ( | hallcurrent4_t * | ctx, |
hallcurrent4_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.