c420mat 2.0.0.0
|
Functions | |
void | c420mat_cfg_setup (c420mat_cfg_t *cfg) |
Config Object Initialization function. | |
C420MAT_RETVAL | c420mat_init (c420mat_t *ctx, c420mat_cfg_t *cfg) |
Initialization function. | |
void | c420mat_generic_transfer (c420mat_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | c420mat_dac_output (c420mat_t *ctx, uint16_t value_dac) |
c420mat_dac_output. | |
void | c420mat_set_i_out (c420mat_t *ctx, uint8_t i_out) |
t40ma_set_vout. | |
void c420mat_cfg_setup | ( | c420mat_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void c420mat_dac_output | ( | c420mat_t * | ctx, |
uint16_t | value_dac ) |
c420mat_dac_output.
ctx | Click object. |
value_dac | 12 bit value from 0 to 4095. |
@description This function sets the output of DAC.
void c420mat_generic_transfer | ( | c420mat_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
C420MAT_RETVAL c420mat_init | ( | c420mat_t * | ctx, |
c420mat_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.
void c420mat_set_i_out | ( | c420mat_t * | ctx, |
uint8_t | i_out ) |
t40ma_set_vout.
ctx | Click object. |
i_out | Output amperage in steps of 0.1mA. |
@description This function sets the output current to selected value.