charger5 2.0.0.0
Public Function

Functions

void charger5_cfg_setup (charger5_cfg_t *cfg)
 Configuration Object Setup function.
 
charger5_err_t charger5_init (charger5_t *ctx, charger5_cfg_t *cfg)
 Click Initialization function.
 
void charger5_default_cfg (charger5_t *ctx)
 Click Default Configuration function.
 
charger5_err_t charger5_generic_write (charger5_t *ctx, uint8_t reg_addr, uint16_t transfer_data)
 Generic Write function.
 
uint16_t charger5_generic_read (charger5_t *ctx, uint8_t reg_addr)
 Generic Read function.
 
charger5_err_t charger5_increment_wiper (charger5_t *ctx, uint8_t reg_addr, uint8_t n_steps)
 Increment Wiper function.
 
charger5_err_t charger5_decrement_wiper (charger5_t *ctx, uint8_t reg_addr, uint8_t n_steps)
 Decrement Wiper function.
 

Detailed Description

Function Documentation

◆ charger5_cfg_setup()

void charger5_cfg_setup ( charger5_cfg_t * cfg)

Configuration Object Setup function.

Parameters
cfgClick configuration structure.

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

Note
The all used pins will be set to unconnected state.

◆ charger5_decrement_wiper()

charger5_err_t charger5_decrement_wiper ( charger5_t * ctx,
uint8_t reg_addr,
uint8_t n_steps )

Decrement Wiper function.

Parameters
ctxClick object.
reg_addrWiper register address.
n_stepsNumber of steps which for the selected wiper will be decremented.
Returns
Operation status: 0 - Ok, 1 - Error.

@description This function decrements the selected wiper for the desired number of steps.

◆ charger5_default_cfg()

void charger5_default_cfg ( charger5_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes a default configuration for Charger 5 click.

Note
Executes a TCONTROL register configuration, wiper resistor network 0 is enabled, and wiper resistor network 1 is disabled, don't exist.

◆ charger5_generic_read()

uint16_t charger5_generic_read ( charger5_t * ctx,
uint8_t reg_addr )

Generic Read function.

Parameters
ctxClick object.
reg_addrRegister address which from data be read.
Returns
9-bit data.

@description This function reads 9-bit data from the selected register.

◆ charger5_generic_write()

charger5_err_t charger5_generic_write ( charger5_t * ctx,
uint8_t reg_addr,
uint16_t transfer_data )

Generic Write function.

Parameters
ctxClick object.
reg_addrRegister address where data be written.
transfer_dataData to be written.
Returns
Operation status: 0 - Ok, 1 - Error.

@description This function writes 9-bit data to the selected register.

◆ charger5_increment_wiper()

charger5_err_t charger5_increment_wiper ( charger5_t * ctx,
uint8_t reg_addr,
uint8_t n_steps )

Increment Wiper function.

Parameters
ctxClick object.
reg_addrWiper register address.
n_stepsNumber of steps which for the selected wiper will be incremented.
Returns
Operation status: 0 - Ok, 1 - Error.

@description This function increments the selected wiper for the desired number of steps.

◆ charger5_init()

charger5_err_t charger5_init ( charger5_t * ctx,
charger5_cfg_t * cfg )

Click Initialization function.

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

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