hallcurrent
2.0.0.0
|
Functions | |
void | hallcurrent_cfg_setup (hallcurrent_cfg_t *cfg) |
Config Object Initialization function. More... | |
HALLCURRENT_RETVAL | hallcurrent_init (hallcurrent_t *ctx, hallcurrent_cfg_t *cfg) |
Initialization function. More... | |
void | hallcurrent_generic_transfer (hallcurrent_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. More... | |
uint16_t | hallcurrent_read_data (hallcurrent_t *ctx) |
Generic read 16-bit data function. More... | |
uint8_t | hallcurrent_chack_status (hallcurrent_t *ctx) |
Check status of read data function. More... | |
float | hallcurrent_read_current (hallcurrent_t *ctx) |
Read electric current function. More... | |
void hallcurrent_cfg_setup | ( | hallcurrent_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t hallcurrent_chack_status | ( | hallcurrent_t * | ctx | ) |
Check status of read data function.
@description Function read the 16-bit data from the target register address and return 0 if data is valid or 1 of data not valid.
void hallcurrent_generic_transfer | ( | hallcurrent_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len | ||
) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
HALLCURRENT_RETVAL hallcurrent_init | ( | hallcurrent_t * | ctx, |
hallcurrent_cfg_t * | cfg | ||
) |
Initialization function.
hallcurrent | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
float hallcurrent_read_current | ( | hallcurrent_t * | ctx | ) |
Read electric current function.
@description Generic SPI transfer, for sending and receiving packages
uint16_t hallcurrent_read_data | ( | hallcurrent_t * | ctx | ) |
Generic read 16-bit data function.
@description Function read the 16-bit data from the target register address of TLI4970-D050T4 miniature magnetic digital current sensor