headphoneamp2 2.1.0.0
Headphone AMP 2 Click Driver

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

Topics

 Headphone AMP 2 Registers Settings
 Settings for registers of Headphone AMP 2 Click driver.
 
 Headphone AMP 2 MikroBUS Map
 MikroBUS pin mapping of Headphone AMP 2 Click driver.
 

Functions

void headphoneamp2_cfg_setup (headphoneamp2_cfg_t *cfg)
 Headphone AMP 2 configuration object setup function.
 
err_t headphoneamp2_init (headphoneamp2_t *ctx, headphoneamp2_cfg_t *cfg)
 Headphone AMP 2 initialization function.
 
err_t headphoneamp2_default_cfg (headphoneamp2_t *ctx)
 Headphone AMP 2 default configuration function.
 
err_t headphoneamp2_write_data (headphoneamp2_t *ctx, uint8_t data_in)
 Headphone AMP 2 I2C writing function.
 
void headphoneamp2_enable (headphoneamp2_t *ctx)
 Headphone AMP 2 enable the device function.
 
void headphoneamp2_disable (headphoneamp2_t *ctx)
 Headphone AMP 2 disable the device function.
 
err_t headphoneamp2_set_command (headphoneamp2_t *ctx, headphoneamp2_cmd_t cmd_ctrl)
 Headphone AMP 2 set the command function.
 

Detailed Description

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

◆ headphoneamp2_cfg_setup()

void headphoneamp2_cfg_setup ( headphoneamp2_cfg_t * cfg)

Headphone AMP 2 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ headphoneamp2_default_cfg()

err_t headphoneamp2_default_cfg ( headphoneamp2_t * ctx)

Headphone AMP 2 default configuration function.

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

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

◆ headphoneamp2_disable()

void headphoneamp2_disable ( headphoneamp2_t * ctx)

Headphone AMP 2 disable the device function.

This function disables the device by driving SHD pin to low state of the MAX9723, Stereo DirectDrive Headphone Amplifier with BassMax, Volume Control, and I2C on the Headphone AMP 2 Click boardâ„¢.

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

◆ headphoneamp2_enable()

void headphoneamp2_enable ( headphoneamp2_t * ctx)

Headphone AMP 2 enable the device function.

This function enables the device by driving SHD pin to high state of the MAX9723, Stereo DirectDrive Headphone Amplifier with BassMax, Volume Control, and I2C on the Headphone AMP 2 Click boardâ„¢.

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

◆ headphoneamp2_init()

err_t headphoneamp2_init ( headphoneamp2_t * ctx,
headphoneamp2_cfg_t * cfg )

Headphone AMP 2 initialization function.

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

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

◆ headphoneamp2_set_command()

err_t headphoneamp2_set_command ( headphoneamp2_t * ctx,
headphoneamp2_cmd_t cmd_ctrl )

Headphone AMP 2 set the command function.

This function set the command of the MAX9723, Stereo DirectDrive Headphone Amplifier with BassMax, Volume Control, and I2C on the Headphone AMP 2 Click boardâ„¢.

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

◆ headphoneamp2_write_data()

err_t headphoneamp2_write_data ( headphoneamp2_t * ctx,
uint8_t data_in )

Headphone AMP 2 I2C writing function.

This function writes a desired data bytes by using I2C serial interface.

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