audioamp2 2.0.0.0

Functions

void audioamp2_cfg_setup (audioamp2_cfg_t *cfg)
 Config Object Initialization function.
 
AUDIOAMP2_RETVAL audioamp2_init (audioamp2_t *ctx, audioamp2_cfg_t *cfg)
 Initialization function.
 
uint8_t audioamp2_set_mode (audioamp2_t *ctx, uint8_t sel_mode)
 Mode Set function.
 
uint8_t audioamp2_set_gain (audioamp2_t *ctx, uint8_t sel_gain)
 Gain Set function.
 
uint8_t audioamp2_check_diagnostic (audioamp2_t *ctx)
 Diagnostic Check function.
 

Detailed Description

Function Documentation

◆ audioamp2_cfg_setup()

void audioamp2_cfg_setup ( audioamp2_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.

◆ audioamp2_check_diagnostic()

uint8_t audioamp2_check_diagnostic ( audioamp2_t * ctx)

Diagnostic Check function.

Parameters
ctxClick object.
Returns
0 - Protection is not activated, 1 - Protection is activated

@description Function checks is undervoltage, overcurrent or thermal protection activated.

◆ audioamp2_init()

AUDIOAMP2_RETVAL audioamp2_init ( audioamp2_t * ctx,
audioamp2_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ audioamp2_set_gain()

uint8_t audioamp2_set_gain ( audioamp2_t * ctx,
uint8_t sel_gain )

Gain Set function.

Parameters
ctxClick object.
sel_gain0 - 20dB, 1 - 26dB, 2 - 30dB, 3 - 32dB
Returns
0 - OK, 1 - Wrong sel_gain parameter

@description Function performs the gain selection.

◆ audioamp2_set_mode()

uint8_t audioamp2_set_mode ( audioamp2_t * ctx,
uint8_t sel_mode )

Mode Set function.

Parameters
ctxClick object.
sel_mode0 - Standby Mode, 1 - Mute Mode, 2 - Play Mode
Returns
0 - OK, 1 - Wrong sel_mode parameter

@description Function puts device in desired mode.