audioamp11 2.1.0.0
AudioAMP 11 Click Driver

API for configuring and manipulating AudioAMP 11 Click driver. More...

Topics

 AudioAMP 11 Registers List
 List of registers of AudioAMP 11 Click driver.
 
 AudioAMP 11 Registers Settings
 Settings for registers of AudioAMP 11 Click driver.
 
 AudioAMP 11 MikroBUS Map
 MikroBUS pin mapping of AudioAMP 11 Click driver.
 
 Audioamp11_volume_control
 

Functions

void audioamp11_cfg_setup (audioamp11_cfg_t *cfg)
 AudioAMP 11 configuration object setup function.
 
err_t audioamp11_init (audioamp11_t *ctx, audioamp11_cfg_t *cfg)
 AudioAMP 11 initialization function.
 
err_t audioamp11_default_cfg (audioamp11_t *ctx)
 AudioAMP 11 default configuration function.
 
err_t audioamp11_generic_write (audioamp11_t *ctx, uint8_t reg, uint8_t data_in)
 AudioAMP 11 I2C writing function.
 
err_t audioamp11_generic_read (audioamp11_t *ctx, uint8_t reg, uint8_t *data_out)
 AudioAMP 11 I2C reading function.
 
void audioamp11_enable_device (audioamp11_t *ctx)
 AudioAMP 11 enable device function.
 
void audioamp11_disable_device (audioamp11_t *ctx)
 AudioAMP 11 enable device function.
 
err_t audioamp11_check_gain (audioamp11_t *ctx, uint8_t *gain)
 AudioAMP 11 check gain function.
 
err_t audioamp11_get_output_volume_level (audioamp11_t *ctx, uint8_t *volume_data)
 AudioAMP 11 get output volume level function.
 
err_t audioamp11_set_output_volume_level (audioamp11_t *ctx, uint8_t volume_data)
 AudioAMP 11 set output volume level function.
 

Detailed Description

API for configuring and manipulating AudioAMP 11 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ audioamp11_cfg_setup()

void audioamp11_cfg_setup ( audioamp11_cfg_t * cfg)

AudioAMP 11 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See audioamp11_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ audioamp11_check_gain()

err_t audioamp11_check_gain ( audioamp11_t * ctx,
uint8_t * gain )

AudioAMP 11 check gain function.

This function check the configuration of the GAIN pin of the NAU8224, 3.1W Stereo Filter-Free Class-D Audio Amplifier with 2 wire interface gain control on the AudioAMP 11 Click board™.

Parameters
[in]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
[out]gain: Output gain data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ audioamp11_default_cfg()

err_t audioamp11_default_cfg ( audioamp11_t * ctx)

AudioAMP 11 default configuration function.

This function executes a default configuration of AudioAMP 11 click board.

Parameters
[in]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ audioamp11_disable_device()

void audioamp11_disable_device ( audioamp11_t * ctx)

AudioAMP 11 enable device function.

This function disables the NAU8224, 3.1W Stereo Filter-Free Class-D Audio Amplifier with 2 wire interface gain control on the AudioAMP 11 Click board™.

Parameters
[in]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
Returns
Nothing.
Note
None

◆ audioamp11_enable_device()

void audioamp11_enable_device ( audioamp11_t * ctx)

AudioAMP 11 enable device function.

This function enables the NAU8224, 3.1W Stereo Filter-Free Class-D Audio Amplifier with 2 wire interface gain control on the AudioAMP 11 Click board™.

Parameters
[in]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
Returns
Nothing.
Note
None

◆ audioamp11_generic_read()

err_t audioamp11_generic_read ( audioamp11_t * ctx,
uint8_t reg,
uint8_t * data_out )

AudioAMP 11 I2C reading function.

This function reads a desired byte of data from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ audioamp11_generic_write()

err_t audioamp11_generic_write ( audioamp11_t * ctx,
uint8_t reg,
uint8_t data_in )

AudioAMP 11 I2C writing function.

This function writes a desired byte of data to the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ audioamp11_get_output_volume_level()

err_t audioamp11_get_output_volume_level ( audioamp11_t * ctx,
uint8_t * volume_data )

AudioAMP 11 get output volume level function.

This function reads output volume data
from the NAU8224, 3.1W Stereo Filter-Free Class-D Audio Amplifier with 2 wire interface gain control on the AudioAMP 11 Click board™.

Parameters
[in]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
[out]volume_data: Output volume data [0x00-0x3F].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ audioamp11_init()

err_t audioamp11_init ( audioamp11_t * ctx,
audioamp11_cfg_t * cfg )

AudioAMP 11 initialization function.

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

Parameters
[out]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See audioamp11_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ audioamp11_set_output_volume_level()

err_t audioamp11_set_output_volume_level ( audioamp11_t * ctx,
uint8_t volume_data )

AudioAMP 11 set output volume level function.

This function set output volume level data from the NAU8224, 3.1W Stereo Filter-Free Class-D Audio Amplifier with 2 wire interface gain control on the AudioAMP 11 Click board™.

Parameters
[in]ctx: Click context object. See audioamp11_t object definition for detailed explanation.
[in]volume_data: Output volume data [0x00-0x3F].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.