digipot4 2.0.0.0
|
Functions | |
void | digipot4_cfg_setup (digipot4_cfg_t *cfg) |
Config Object Initialization function. | |
DIGIPOT4_RETVAL | digipot4_init (digipot4_t *ctx, digipot4_cfg_t *cfg) |
Initialization function. | |
void | digipot4_generic_transfer (digipot4_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | digipot4_write_reg (digipot4_t *ctx, uint8_t reg, uint16_t value) |
Writes data in register. | |
void | digipot4_copy_reg (digipot4_t *ctx, uint8_t reg) |
Copy data. | |
void digipot4_cfg_setup | ( | digipot4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void digipot4_copy_reg | ( | digipot4_t * | ctx, |
uint8_t | reg ) |
Copy data.
ctx | Click object. |
reg | Register |
@description This function is used to copy the data from the wipers to the NV memory and from the NV memory it wipers.
void digipot4_generic_transfer | ( | digipot4_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
DIGIPOT4_RETVAL digipot4_init | ( | digipot4_t * | ctx, |
digipot4_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 digipot4_write_reg | ( | digipot4_t * | ctx, |
uint8_t | reg, | ||
uint16_t | value ) |
Writes data in register.
ctx | Click object. |
reg | Register |
value | Value |
@description This function writes data in wiper register and NV register.