stereoamp 2.0.0.0
|
Functions | |
void | stereoamp_cfg_setup (stereoamp_cfg_t *cfg) |
Config Object Initialization function. | |
STEREOAMP_RETVAL | stereoamp_init (stereoamp_t *ctx, stereoamp_cfg_t *cfg) |
Initialization function. | |
void | stereoamp_default_cfg (stereoamp_t *ctx) |
Click Default Configuration function. | |
void | stereoamp_generic_write (stereoamp_t *ctx, uint8_t ch_addr, uint8_t reg_addr, uint8_t tx_data) |
Generic write function. | |
void | stereoamp_set_volume (stereoamp_t *ctx, uint8_t volume) |
Set the volume function. | |
void | stereoamp_mute (stereoamp_t *ctx) |
Set the mute mode function. | |
void | stereoamp_soft_reset (stereoamp_t *ctx) |
Soft reset function. | |
void | stereoamp_enable_diagnostic (stereoamp_t *ctx) |
Enable the diagnostic function. | |
void | stereoamp_set_power_on (stereoamp_t *ctx) |
Set the power On by channel function. | |
void | stereoamp_enable_fault (stereoamp_t *ctx) |
Enable the fault function. | |
uint8_t | stereoamp_check_fault_left (stereoamp_t *ctx) |
Check the fault of the left speaker function. | |
uint8_t | stereoamp_check_fault_right (stereoamp_t *ctx) |
Check the fault of the right speaker function. | |
void stereoamp_cfg_setup | ( | stereoamp_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t stereoamp_check_fault_left | ( | stereoamp_t * | ctx | ) |
Check the fault of the left speaker function.
ctx | Click object. |
@description This function check the fault of the left speaker by get states of AN pin of StereoAmp click board.
uint8_t stereoamp_check_fault_right | ( | stereoamp_t * | ctx | ) |
Check the fault of the right speaker function.
ctx | Click object. |
@description This function check the fault of the right speaker by get states of INT pin of StereoAmp click board.
void stereoamp_default_cfg | ( | stereoamp_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for LTC2601 click.
void stereoamp_enable_diagnostic | ( | stereoamp_t * | ctx | ) |
Enable the diagnostic function.
ctx | Click object. |
@description This function enable the diagnostic by write to the Diagnostic Control register address of LM48100Q-Q1 chip on StereoAmp click board.
void stereoamp_enable_fault | ( | stereoamp_t * | ctx | ) |
Enable the fault function.
ctx | Click object. |
@description This function enable the fault of both channels by write to the Fault Detection Control register address of LM48100Q-Q1 chip on StereoAmp click board.
void stereoamp_generic_write | ( | stereoamp_t * | ctx, |
uint8_t | ch_addr, | ||
uint8_t | reg_addr, | ||
uint8_t | tx_data ) |
Generic write function.
ctx | Click object. @param ch_address 8-bit channel address. |
reg_addr | Register address. |
tx_data | Data to be written. |
@description This function writes data to the desired register.
STEREOAMP_RETVAL stereoamp_init | ( | stereoamp_t * | ctx, |
stereoamp_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void stereoamp_mute | ( | stereoamp_t * | ctx | ) |
Set the mute mode function.
ctx | Click object. |
@description This function set the mute mode of both channels to the Volume Control register address of LM48100Q-Q1 chip on StereoAmp click board.
void stereoamp_set_power_on | ( | stereoamp_t * | ctx | ) |
Set the power On by channel function.
ctx | Click object. |
@description This function set the power On of both channels by write to the Mode Control register address of LM48100Q-Q1 chip on StereoAmp click board.
void stereoamp_set_volume | ( | stereoamp_t * | ctx, |
uint8_t | volume ) |
Set the volume function.
ctx | Click object. |
volume | 5-bit volume value from 0 ( 0x00 ) to 31 ( 0x1F ). |
@description This function set the volume of both channels to the Volume Control register address of LM48100Q-Q1 chip on StereoAmp click board.
void stereoamp_soft_reset | ( | stereoamp_t * | ctx | ) |
Soft reset function.
ctx | Click object. |
@description This function set soft reset by write to the Diagnostic Control register address of LM48100Q-Q1 chip on StereoAmp click board.