digipot3 2.0.0.0
|
Functions | |
void | digipot3_cfg_setup (digipot3_cfg_t *cfg) |
Config Object Initialization function. | |
DIGIPOT3_RETVAL | digipot3_init (digipot3_t *ctx, digipot3_cfg_t *cfg) |
Initialization function. | |
void | digipot2_generic_transfer (digipot3_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
uint8_t | digipot3_send_command (digipot3_t *ctx, uint8_t command_byte) |
Command Send function. | |
uint8_t | digipot3_store_eemem (digipot3_t *ctx, uint8_t location_address, uint16_t transfer_data) |
EEMEM Store function. | |
uint8_t | digipot3_read_eemem (digipot3_t *ctx, uint8_t location_address, uint16_t *data_out) |
EEMEM Read function. | |
uint8_t | digipot3_write_dac (digipot3_t *ctx, uint16_t value_dac) |
DAC Write function. | |
void | digipot3_read_dac (digipot3_t *ctx, uint16_t *data_out) |
DAC Read function. | |
uint8_t | digipot3_check_data_ready (digipot3_t *ctx) |
Data Ready Check function. | |
void digipot2_generic_transfer | ( | digipot3_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
void digipot3_cfg_setup | ( | digipot3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t digipot3_check_data_ready | ( | digipot3_t * | ctx | ) |
Data Ready Check function.
ctx | Click object. |
@description This function checks is command executed or not.
DIGIPOT3_RETVAL digipot3_init | ( | digipot3_t * | ctx, |
digipot3_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 digipot3_read_dac | ( | digipot3_t * | ctx, |
uint16_t * | data_out ) |
DAC Read function.
ctx | Click object. |
data_out | Buffer where DAC value be stored. |
@description This function reads 10-bit value from DAC register (wiper position).
uint8_t digipot3_read_eemem | ( | digipot3_t * | ctx, |
uint8_t | location_address, | ||
uint16_t * | data_out ) |
EEMEM Read function.
ctx | Click object. |
location_address | EEMEM location which from data be read. |
data_out | Buffer where data be stored. |
@description This function reads 16-bit data from the EEMEM (non volatile) memory location.
uint8_t digipot3_send_command | ( | digipot3_t * | ctx, |
uint8_t | command_byte ) |
Command Send function.
ctx | Click object. |
command_byte | Command which be executed. |
@description This function executes the desired command.
uint8_t digipot3_store_eemem | ( | digipot3_t * | ctx, |
uint8_t | location_address, | ||
uint16_t | transfer_data ) |
EEMEM Store function.
ctx | Click object. |
location_address | EEMEM location where data be stored. |
transfer_data | Data which be stored. |
@description This function stores 16-bit data to the desired EEMEM (non volatile) memory location.
uint8_t digipot3_write_dac | ( | digipot3_t * | ctx, |
uint16_t | value_dac ) |
DAC Write function.
ctx | Click object. |
value_dac | Determines the wiper position. |
@description This function writes 10-bit value to DAC register and determines the wiper position.