audiomux 2.0.0.0
|
Functions | |
void | audiomux_cfg_setup (audiomux_cfg_t *cfg) |
Config Object Initialization function. | |
AUDIOMUX_RETVAL | audiomux_init (audiomux_t *ctx, audiomux_cfg_t *cfg) |
Initialization function. | |
void | audiomux_default_cfg (audiomux_t *ctx) |
Click Default Configuration function. | |
void | audiomux_generic_write (audiomux_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | audiomux_generic_read (audiomux_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
T_AUDIOMUX_RETVAL | audiomux_write_single_byte (audiomux_t *ctx, uint8_t reg_addr, uint8_t data_in) |
Single Write function. | |
T_AUDIOMUX_RETVAL | audiomux_write_bytes (audiomux_t *ctx, uint8_t start_addr, uint8_t *data_in, uint8_t n_bytes) |
Multiple Write function. | |
T_AUDIOMUX_RETVAL | audiomux_read_single_byte (audiomux_t *ctx, uint8_t reg_addr, uint8_t *data_out) |
Single Read function. | |
T_AUDIOMUX_RETVAL | audiomux_read_bytes (audiomux_t *ctx, uint8_t start_addr, uint8_t *data_out, uint8_t n_bytes) |
Multiple Read function. | |
T_AUDIOMUX_RETVAL | audiomux_select_input (audiomux_t *ctx, uint8_t input_sel, uint8_t mute_in, uint8_t mic_gain, uint8_t mic_state) |
Input Selection function. | |
T_AUDIOMUX_RETVAL | audiomux_set_input_gain (audiomux_t *ctx, uint8_t input_gain) |
Input Gain Control function. | |
T_AUDIOMUX_RETVAL | audiomux_set_volume (audiomux_t *ctx, uint8_t volume1, uint8_t volume2, uint8_t side_sel) |
Volume Control function. | |
T_AUDIOMUX_RETVAL | audiomux_set_treble_bass (audiomux_t *ctx, uint8_t treble, uint8_t bass) |
Treble and Bass Control function. | |
T_AUDIOMUX_RETVAL | audiomux_mute_ouput (audiomux_t *ctx, uint8_t state) |
Output Mute function. | |
void audiomux_cfg_setup | ( | audiomux_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void audiomux_default_cfg | ( | audiomux_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for AudioMUX click.
User may change click configuration as he wishes by using provided functions.
void audiomux_generic_read | ( | audiomux_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void audiomux_generic_write | ( | audiomux_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
AUDIOMUX_RETVAL audiomux_init | ( | audiomux_t * | ctx, |
audiomux_cfg_t * | cfg ) |
Initialization function.
audiomux | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
T_AUDIOMUX_RETVAL audiomux_mute_ouput | ( | audiomux_t * | ctx, |
uint8_t | state ) |
Output Mute function.
ctx | Click object |
state | 0 - Output Mute ON, 1 - Output Mute OFF |
@description This function performs a control of the output to be Mute ON or Mute OFF.
T_AUDIOMUX_RETVAL audiomux_read_bytes | ( | audiomux_t * | ctx, |
uint8_t | start_addr, | ||
uint8_t * | data_out, | ||
uint8_t | n_bytes ) |
Multiple Read function.
ctx | Click object |
start_addr | Address which from data read be started |
data_out | Memory where data be stored |
n_bytes | Number of bytes to be read |
@description This function reads the desired number of bytes from the registers.
T_AUDIOMUX_RETVAL audiomux_read_single_byte | ( | audiomux_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_out ) |
Single Read function.
ctx | Click object |
reg_addr | Address which from data be read |
data_out | Memory where data be stored |
@description This function reads one byte data from the register.
T_AUDIOMUX_RETVAL audiomux_select_input | ( | audiomux_t * | ctx, |
uint8_t | input_sel, | ||
uint8_t | mute_in, | ||
uint8_t | mic_gain, | ||
uint8_t | mic_state ) |
Input Selection function.
ctx | Click object |
input_sel | Input channel selection, from 0 (IN1) to 3 (IN4) |
mute_in | 1 - Input Mute ON, 0 - Input Mute OFF |
mic_gain | From 0 (14dB) to 3 (0dB) |
mic_state | 0 - MIC ON, 1 - MIC OFF |
@description This function performs a input selection and control.
T_AUDIOMUX_RETVAL audiomux_set_input_gain | ( | audiomux_t * | ctx, |
uint8_t | input_gain ) |
Input Gain Control function.
ctx | Click object |
input_gain | From 0 (0dB) to 7 (14dB) |
@description This function performs a input gain selection.
T_AUDIOMUX_RETVAL audiomux_set_treble_bass | ( | audiomux_t * | ctx, |
uint8_t | treble, | ||
uint8_t | bass ) |
Treble and Bass Control function.
ctx | Click object |
treble | Treble selection from -14dB to 14dB |
bass | Bass selection from -14dB to 14dB |
@description This function performs a control of the treble and bass for EQ section.
T_AUDIOMUX_RETVAL audiomux_set_volume | ( | audiomux_t * | ctx, |
uint8_t | volume1, | ||
uint8_t | volume2, | ||
uint8_t | side_sel ) |
Volume Control function.
ctx | Click object |
volume1 | Pre-EQ section volume, 0x00 is highest volume and 0x3F is lowest volume |
volume2 | Post-EQ section volume, 0x00 is highest and 0x03 is lowest volume |
side_sel | 0x03 - Left volume control, 0x04 - Right volume control |
@description This function performs a left or right volume control.
T_AUDIOMUX_RETVAL audiomux_write_bytes | ( | audiomux_t * | ctx, |
uint8_t | start_addr, | ||
uint8_t * | data_in, | ||
uint8_t | n_bytes ) |
Multiple Write function.
ctx | Click object |
start_addr | Address which from data writing be started |
data_in | Data to be written to register |
n_bytes | Number of bytes to be written |
#description This function writes the desired number of bytes to the registers.
T_AUDIOMUX_RETVAL audiomux_write_single_byte | ( | audiomux_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | data_in ) |
Single Write function.
ctx | Click object |
reg_addr | Address where data be written |
data_in | Data to be written |
@description This function writes one byte data to the register.