linhall 2.0.0.0
|
Functions | |
void | linhall_cfg_setup (linhall_cfg_t *cfg) |
Config Object Initialization function. | |
LINHALL_RETVAL | linhall_init (linhall_t *ctx, linhall_cfg_t *cfg) |
Initialization function. | |
void | linhall_generic_transfer (linhall_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
uint16_t | linhall_read_data (linhall_t *ctx) |
Read 12-bit data function. | |
void linhall_cfg_setup | ( | linhall_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void linhall_generic_transfer | ( | linhall_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
LINHALL_RETVAL linhall_init | ( | linhall_t * | ctx, |
linhall_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.
uint16_t linhall_read_data | ( | linhall_t * | ctx | ) |
Read 12-bit data function.
ctx | Click object. |
@description Function read 12-bit ADC value from the MCP3201 chip.