c2x5wamp 2.0.0.0
Public function

Functions

void c2x5wamp_cfg_setup (c2x5wamp_cfg_t *cfg)
 Config Object Initialization function.
 
C2X5WAMP_RETVAL c2x5wamp_init (c2x5wamp_t *ctx, c2x5wamp_cfg_t *cfg)
 Initialization function.
 
void c2x5wamp_default_cfg (c2x5wamp_t *ctx)
 Click Default Configuration function.
 
uint8_t c2x5wamp_set_mode (c2x5wamp_t *ctx, uint8_t select_mode)
 Set mode selection of the amplifier function.
 
uint8_t c2x5wamp_set_gain (c2x5wamp_t *ctx, uint8_t select_gain)
 Set gain resistors of the amplifier function.
 
uint8_t c2x5wamp_check_input (c2x5wamp_t *ctx)
 Check input impedance function.
 

Detailed Description

Function Documentation

◆ c2x5wamp_cfg_setup()

void c2x5wamp_cfg_setup ( c2x5wamp_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.

◆ c2x5wamp_check_input()

uint8_t c2x5wamp_check_input ( c2x5wamp_t * ctx)

Check input impedance function.

Parameters
ctxClick object.
Returns
  • 0 : Protection is not activated.
  • 1 : Protection is activated.

@description Function checks input impedance is undervoltage, or is overcurrent or is thermal protection activated of the TDA7491LP chip on 2x5W Amp Click.

◆ c2x5wamp_default_cfg()

void c2x5wamp_default_cfg ( c2x5wamp_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for 2x5W AMP click.

Note
Set Standby mode
Set amplifier gain to 20dB

◆ c2x5wamp_init()

C2X5WAMP_RETVAL c2x5wamp_init ( c2x5wamp_t * ctx,
c2x5wamp_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ c2x5wamp_set_gain()

uint8_t c2x5wamp_set_gain ( c2x5wamp_t * ctx,
uint8_t select_gain )

Set gain resistors of the amplifier function.

Parameters
ctxClick object.
select_gain
  • 0 : 20dB.
  • 1 : 26dB.
  • 2 : 30dB.
  • 3 : 32dB.
Returns
  • 0 : ERROR, nominal amplifier gain is not set.
  • 1 : OK, nominal amplifier gain is set.

@description Function set amplifier gain resistors of the amplifier by setting the TDA7491LP chip on 2x5W Amp Click.

◆ c2x5wamp_set_mode()

uint8_t c2x5wamp_set_mode ( c2x5wamp_t * ctx,
uint8_t select_mode )

Set mode selection of the amplifier function.

Parameters
ctxClick object.
select_mode
  • 0 : Standby mode, all circuits are turned off, very low current consumption.
  • 1 : Mute mode, inputs are connected to ground and the positive and negative PWM outputs are at 50% duty cycle.
  • 2 : Play mode, the amplifiers are active.
Returns
  • 0 : ERROR, there is no desired mode.
  • 1 : OK, the desired mode is selected.

@description Function set one of the three operating mode of the amplifier by setting the TDA7491LP chip on 2x5W Amp Click.