audioamp 2.0.0.0
Public function

Functions

void audioamp_cfg_setup (audioamp_cfg_t *cfg)
 Config Object Initialization function.
 
err_t audioamp_init (audioamp_t *ctx, audioamp_cfg_t *cfg)
 Initialization function.
 
err_t audioamp_power_on (audioamp_t *ctx)
 Turn on the Audio Amp click function.
 
err_t audioamp_power_off (audioamp_t *ctx)
 Turn off the Audio Amp click function.
 
err_t audioamp_set_volume (audioamp_t *ctx, uint8_t in_sel, uint8_t volume_level)
 Set volume function.
 
err_t audioamp_mute (audioamp_t *ctx)
 Mute input function.
 
err_t audioamp_unmute (audioamp_t *ctx)
 Unmute input function.
 
err_t audioamp_set_fault_normal_operation (audioamp_t *ctx)
 Set normal opeation of Fault function.
 
err_t audioamp_set_fault_detecton_control (audioamp_t *ctx, uint8_t input_command)
 Set fault detection control function.
 
err_t audioamp_set_diagnostic_control (audioamp_t *ctx, uint8_t input_command)
 Set diagnostic control function.
 
uint8_t audioamp_check_fault (audioamp_t *ctx)
 Check Fault status function.
 

Detailed Description

Function Documentation

◆ audioamp_cfg_setup()

void audioamp_cfg_setup ( audioamp_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.

◆ audioamp_check_fault()

uint8_t audioamp_check_fault ( audioamp_t * ctx)

Check Fault status function.

Parameters
ctxClick object.
Returns
0 - detected, 1 - not detected.

@description Function checks the status of fault pin of LM48100Q-Q1 chip on AudioAmp Click board.

◆ audioamp_init()

err_t audioamp_init ( audioamp_t * ctx,
audioamp_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
0 - Ok, (-1) - Error.

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

◆ audioamp_mute()

err_t audioamp_mute ( audioamp_t * ctx)

Mute input function.

Parameters
ctxClick object.
Returns
0 - Ok, (-1) - Error.

@description Function allows the user to mute the input by clearing INPUT_2 and INPUT_1 bits to MODE CONTROL register of LM48100Q-Q1 chip.

◆ audioamp_power_off()

err_t audioamp_power_off ( audioamp_t * ctx)

Turn off the Audio Amp click function.

Parameters
ctxClick object.
Returns
0 - Ok, (-1) - Error.

@description Function turns off the Audio Amp click by setting POWER_OFF bit to MODE CONTROL register of LM48100Q-Q1 chip.

◆ audioamp_power_on()

err_t audioamp_power_on ( audioamp_t * ctx)

Turn on the Audio Amp click function.

Parameters
ctxClick object.
Returns
0 - Ok, (-1) - Error.

@description Function turns on the Audio Amp click by setting POWER_ON and set INPUT_2 and INPUT_1 bits to MODE CONTROL register of LM48100Q-Q1 chip.

◆ audioamp_set_diagnostic_control()

err_t audioamp_set_diagnostic_control ( audioamp_t * ctx,
uint8_t input_command )

Set diagnostic control function.

Parameters
ctxClick object.
input_commandDiagnostic settings - to see the diagnostic settings refer to the Diagnostic Settings option.
Returns
0 - Ok, (-1) - Error.

@description Function sets a diagnostic control by setting the entered command to DIAGNOSTIC CONTROL register of LM48100Q-Q1 chip.

◆ audioamp_set_fault_detecton_control()

err_t audioamp_set_fault_detecton_control ( audioamp_t * ctx,
uint8_t input_command )

Set fault detection control function.

Parameters
ctxClick object.
input_commandFault settings : 0 : Ignore output short circuit fault (outputs shorted together); 1 : Ignore output short circuit fault; 2 : Ignore output short to VDD or GND fault; 3 : Ignore output over-current fault; 4 : Ignore thermal overload fault;
Returns
0 - Ok, (-1) - Error.

@description Function sets a fault detection control by setting the entered command to FAULT DETECTION CONTROL register of LM48100Q-Q1 chip.

◆ audioamp_set_fault_normal_operation()

err_t audioamp_set_fault_normal_operation ( audioamp_t * ctx)

Set normal opeation of Fault function.

Parameters
ctxClick object.
Returns
0 - Ok, (-1) - Error.

@description Function sets the normal opration mode by clearing all bits to FAULT DETECTION CONTROL register of LM48100Q-Q1 chip.

◆ audioamp_set_volume()

err_t audioamp_set_volume ( audioamp_t * ctx,
uint8_t in_sel,
uint8_t volume_level )

Set volume function.

Parameters
ctxClick object.
in_selEnter AUDIOAMP_IN_1 to select input 1 and/or enter AUDIOAMP_IN_2 to select input 2.
volume_levelEnter volume level from 1 to 32.
Returns
0 - Ok, (-1) - Error.

@description Function sets the volume of the selected input of LM48100Q-Q1 chip on AudioAmp Click board.

◆ audioamp_unmute()

err_t audioamp_unmute ( audioamp_t * ctx)

Unmute input function.

Parameters
ctxClick object.
Returns
0 - Ok, (-1) - Error.

@description Function allows the user to unmute the input by setting INPUT_2 and INPUT_1 bits to MODE CONTROL register of LM48100Q-Q1 chip.