digipot5 2.0.0.0

Functions

void digipot5_cfg_setup (digipot5_cfg_t *cfg)
 Configuration Object Setup function.
 
digipot5_err_t digipot5_init (digipot5_t *ctx, digipot5_cfg_t *cfg)
 Click Initialization function.
 
void digipot5_reset (digipot5_t *ctx)
 Reset function.
 
void digipot5_default_cfg (digipot5_t *ctx)
 Click Default Configuration function.
 
digipot5_err_t digipot5_generic_write (digipot5_t *ctx, digipot5_reg_t reg_addr, uint16_t data_in)
 Generic Write function.
 
digipot5_err_t digipot5_generic_read (digipot5_t *ctx, digipot5_reg_t reg_addr, uint16_t *data_out)
 Generic Read function.
 
digipot5_reg_t digipot5_increment_wiper (digipot5_t *ctx, digipot5_reg_t reg_addr)
 Increment Wiper function.
 
digipot5_reg_t digipot5_decrement_wiper (digipot5_t *ctx, digipot5_reg_t reg_addr)
 Decrement Wiper function.
 

Detailed Description

Function Documentation

◆ digipot5_cfg_setup()

void digipot5_cfg_setup ( digipot5_cfg_t * cfg)

Configuration Object Setup function.

Parameters
cfgClick configuration structure.

@description This function initializes the click configuration structure to initial state.

Note
All used pins will be set to unconnected state.

◆ digipot5_decrement_wiper()

digipot5_reg_t digipot5_decrement_wiper ( digipot5_t * ctx,
digipot5_reg_t reg_addr )

Decrement Wiper function.

Parameters
ctxClick object.
reg_addrAddress of wiper which will be decremented.
Returns
Command status: 0 - Ok, 1 - Command error, 3 - Invalid register address.

@description This function allows the selected wiper to be decremented.

◆ digipot5_default_cfg()

void digipot5_default_cfg ( digipot5_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes a default configuration for the DIGI POT 5 click.

◆ digipot5_generic_read()

digipot5_err_t digipot5_generic_read ( digipot5_t * ctx,
digipot5_reg_t reg_addr,
uint16_t * data_out )

Generic Read function.

Parameters
ctxClick object.
reg_addrRegister address which from data be read.
data_outMemory where read data be stored.
Returns
Command status: 0 - Ok, 1 - Command error.

@description This function reads 9 bits wide data from the selected register.

◆ digipot5_generic_write()

digipot5_err_t digipot5_generic_write ( digipot5_t * ctx,
digipot5_reg_t reg_addr,
uint16_t data_in )

Generic Write function.

Parameters
ctxClick object.
reg_addrRegister address where data be written.
data_inData to be written.
Returns
Command status: 0 - Ok, 1 - Command error, 3 - Invalid register address.

@description This function writes 9 bits wide data to the selected register.

◆ digipot5_increment_wiper()

digipot5_reg_t digipot5_increment_wiper ( digipot5_t * ctx,
digipot5_reg_t reg_addr )

Increment Wiper function.

Parameters
ctxClick object.
reg_addrAddress of wiper which will be incremented.
Returns
Command status: 0 - Ok, 1 - Command error, 3 - Invalid register address.

@description This function allows the selected wiper to be incremented.

◆ digipot5_init()

digipot5_err_t digipot5_init ( digipot5_t * ctx,
digipot5_cfg_t * cfg )

Click Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
Init status: 0 - Ok, 2 - Driver init error.

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

◆ digipot5_reset()

void digipot5_reset ( digipot5_t * ctx)

Reset function.

Parameters
ctxClick object.

@description This function allows the device to be reset and put back to normal operation mode.