c420mar 2.0.0.0
|
Functions | |
void | c420mar_cfg_setup (c420mar_cfg_t *cfg) |
Config Object Initialization function. | |
c420MAR_RETVAL | c420mar_init (c420mar_t *ctx, c420mar_cfg_t *cfg) |
Initialization function. | |
void | c420mar_generic_transfer (c420mar_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
float | c420mar_read_data (c420mar_t *ctx) |
Read data function. | |
void c420mar_cfg_setup | ( | c420mar_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void c420mar_generic_transfer | ( | c420mar_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
c420MAR_RETVAL c420mar_init | ( | c420mar_t * | ctx, |
c420mar_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.
float c420mar_read_data | ( | c420mar_t * | ctx | ) |
Read data function.
ctx | Click object. |
@description This function reads the 16-bit current value from the SPI data register, and then normalizes and converts it to float.