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.
 

Detailed Description

Function Documentation

◆ digipot4_cfg_setup()

void digipot4_cfg_setup ( digipot4_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ digipot4_copy_reg()

void digipot4_copy_reg ( digipot4_t * ctx,
uint8_t reg )

Copy data.

Parameters
ctxClick object.
regRegister

@description This function is used to copy the data from the wipers to the NV memory and from the NV memory it wipers.

◆ digipot4_generic_transfer()

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.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ digipot4_init()

DIGIPOT4_RETVAL digipot4_init ( digipot4_t * ctx,
digipot4_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ digipot4_write_reg()

void digipot4_write_reg ( digipot4_t * ctx,
uint8_t reg,
uint16_t value )

Writes data in register.

Parameters
ctxClick object.
regRegister
valueValue

@description This function writes data in wiper register and NV register.