audioamp  2.0.0.0
Data Structures | Macros | Functions
audioamp.h File Reference

This file contains API for AudioAMP Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  audioamp_t
 Click ctx object definition. More...
 
struct  audioamp_cfg_t
 Click configuration structure definition. More...
 

Macros

#define AUDIOAMP_MAP_MIKROBUS(cfg, mikrobus)
 
#define AUDIOAMP_RETVAL   uint8_t
 
#define AUDIOAMP_OK   0x00
 
#define AUDIOAMP_INIT_ERROR   0xFF
 
#define AUDIOAMP_I2C_ADDRESS_0   0x7C
 
#define AUDIOAMP_I2C_ADDRESS_1   0x7D
 
#define AUDIOAMP_REG_MODE   0x00
 
#define AUDIOAMP_REG_DIAG   0x20
 
#define AUDIOAMP_REG_FAULT   0x40
 
#define AUDIOAMP_REG_VOL_1   0x60
 
#define AUDIOAMP_REG_VOL_2   0x80
 
#define AUDIOAMP_MODE_CH_1   0x00
 
#define AUDIOAMP_MODE_CH_2   0x01
 
#define AUDIOAMP_MODE_MUX   0x02
 
#define AUDIOAMP_MODE_MUTE   0x03
 
#define AUDIOAMP_CMD_POWER_ON   0x1C
 
#define AUDIOAMP_CMD_POWER_OFF   0x00
 
#define AUDIOAMP_CMD_VOLUME_1   0x06
 
#define AUDIOAMP_CMD_VOLUME_2   0x08
 
#define AUDIOAMP_CMD_ENABLE   0x10
 
#define AUDIOAMP_CMD_DISABLE   0x00
 
#define AUDIOAMP_CMD_DG_EN   0x10
 
#define AUDIOAMP_CMD_DG_CONT   0x08
 
#define AUDIOAMP_CMD_DG_RESET   0x06
 
#define AUDIOAMP_CMD_DG_ILIMIT   0x04
 
#define AUDIOAMP_CH_1_BIT   0x04
 
#define AUDIOAMP_CH_2_BIT   0x08
 
#define AUDIOAMP_MUX_BIT   0x0C
 
#define AUDIOAMP_MUTE_BIT   0x00
 

Functions

void audioamp_cfg_setup (audioamp_cfg_t *cfg)
 Config Object Initialization function. More...
 
AUDIOAMP_RETVAL audioamp_init (audioamp_t *ctx, audioamp_cfg_t *cfg)
 Initialization function. More...
 
void audioamp_generic_write (audioamp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void audioamp_generic_read (audioamp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
void audioamp_power_on (audioamp_t *ctx)
 Turn on the Audio Amp click function. More...
 
void audioamp_power_off (audioamp_t *ctx)
 Turn off the Audio Amp click function. More...
 
void audioamp_set_volume (audioamp_t *ctx, uint8_t volume_value)
 Set mux volume function. More...
 
void audioamp_set_volume_channel (audioamp_t *ctx, uint8_t channel, uint8_t volume_value)
 Set channel volume function. More...
 
void audioamp_enable (audioamp_t *ctx)
 Enable amplifier function. More...
 
void audioamp_disable (audioamp_t *ctx)
 Disable amplifier function. More...
 
void audioamp_mute_mode (audioamp_t *ctx)
 Set mute mode function. More...
 
void audioamp_unmute_mode (audioamp_t *ctx)
 Set unmute mode function. More...
 
void audioamp_set_normal_operation (audioamp_t *ctx)
 Set normal opeation function. More...
 
void audioamp_set_fault_detecton_control (audioamp_t *ctx, uint8_t input_command)
 Set fault detection control function. More...
 
void audioamp_set_input (audioamp_t *ctx, uint8_t input_mode)
 Set input mixer mode function. More...
 
uint8_t audioamp_check_status (audioamp_t *ctx)
 Check interrupt status function. More...
 

Detailed Description

This file contains API for AudioAMP Click driver.