headphoneamp 2.0.0.0
Headphone AMP Click Driver

API for configuring and manipulating Headphone AMP Click driver. More...

Topics

 Headphone AMP MikroBUS Map
 MikroBUS pin mapping of Headphone AMP Click driver.
 
 Headphoneamp_set
 

Functions

void headphoneamp_cfg_setup (headphoneamp_cfg_t *cfg)
 Headphone AMP configuration object setup function.
 
err_t headphoneamp_init (headphoneamp_t *ctx, headphoneamp_cfg_t *cfg)
 Headphone AMP initialization function.
 
err_t headphoneamp_default_cfg (headphoneamp_t *ctx)
 Headphone AMP default configuration function.
 
err_t headphoneamp_shutdown (headphoneamp_t *ctx)
 Headphone AMP shutdown function.
 
err_t headphoneamp_power_up (headphoneamp_t *ctx)
 Headphone AMP power up function.
 
err_t headphoneamp_volume_down (headphoneamp_t *ctx)
 Headphone AMP set sound volume down function.
 
err_t headphoneamp_volume_up (headphoneamp_t *ctx)
 Headphone AMP set sound volume up function.
 
err_t headphoneamp_set_sound_volume (headphoneamp_t *ctx, uint8_t sound_volume)
 Headphone AMP set sound volume function.
 

Detailed Description

API for configuring and manipulating Headphone AMP 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

◆ headphoneamp_cfg_setup()

void headphoneamp_cfg_setup ( headphoneamp_cfg_t * cfg)

Headphone AMP configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ headphoneamp_default_cfg()

err_t headphoneamp_default_cfg ( headphoneamp_t * ctx)

Headphone AMP default configuration function.

This function executes a default configuration of Headphone AMP click board.

Parameters
[in]ctx: Click context object. See headphoneamp_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.

◆ headphoneamp_init()

err_t headphoneamp_init ( headphoneamp_t * ctx,
headphoneamp_cfg_t * cfg )

Headphone AMP initialization function.

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

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

◆ headphoneamp_power_up()

err_t headphoneamp_power_up ( headphoneamp_t * ctx)

Headphone AMP power up function.

This function performs power-up sequence of the LM4811 Dual 105mW Headphone Amplifier with Digital Volume Control and Shutdown Mode on the Headphone AMP click board™.

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

◆ headphoneamp_set_sound_volume()

err_t headphoneamp_set_sound_volume ( headphoneamp_t * ctx,
uint8_t sound_volume )

Headphone AMP set sound volume function.

This function sets a desired sound volume on of the LM4811 Dual 105mW Headphone Amplifier with Digital Volume Control and Shutdown Mode on the Headphone AMP click board™.

Parameters
[in]ctx: Click context object. See headphoneamp_t object definition for detailed explanation.
[in]sound_volume: Desired sound volume from -33 dB to 12 dB.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ headphoneamp_shutdown()

err_t headphoneamp_shutdown ( headphoneamp_t * ctx)

Headphone AMP shutdown function.

This function set the amplifier bias circuitry shutdown of the LM4811 Dual 105mW Headphone Amplifier with Digital Volume Control and Shutdown Mode on the Headphone AMP click board™.

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

◆ headphoneamp_volume_down()

err_t headphoneamp_volume_down ( headphoneamp_t * ctx)

Headphone AMP set sound volume down function.

This function set sound volume down on of the LM4811 Dual 105mW Headphone Amplifier with Digital Volume Control and Shutdown Mode on the Headphone AMP click board™.

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

◆ headphoneamp_volume_up()

err_t headphoneamp_volume_up ( headphoneamp_t * ctx)

Headphone AMP set sound volume up function.

This function set sound volume up on of the LM4811 Dual 105mW Headphone Amplifier with Digital Volume Control and Shutdown Mode on the Headphone AMP click board™.

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