headphoneamp2 2.1.0.0
|
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. | |
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.
void headphoneamp2_cfg_setup | ( | headphoneamp2_cfg_t * | cfg | ) |
Headphone AMP 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See headphoneamp2_cfg_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See headphoneamp2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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â„¢.
[in] | ctx | : Click context object. See headphoneamp2_t object definition for detailed explanation. |
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â„¢.
[in] | ctx | : Click context object. See headphoneamp2_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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â„¢.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See headphoneamp2_t object definition for detailed explanation. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.