audioamp 2.0.0.0
audioamp.h File Reference

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

#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_OK   0
 
#define AUDIOAMP_INIT_ERROR   (-1)
 
#define AUDIOAMP_I2C_ADDRESS_0   0x7C
 
#define AUDIOAMP_I2C_ADDRESS_1   0x7D
 
#define AUDIOAMP_IN_1   0x04
 
#define AUDIOAMP_IN_2   0x08
 
#define AUDIOAMP_DG_EN   0x10
 
#define AUDIOAMP_DG_CONT   0x08
 
#define AUDIOAMP_DG_RESET   0x06
 
#define AUDIOAMP_DG_ILIMIT   0x04
 

Functions

void audioamp_cfg_setup (audioamp_cfg_t *cfg)
 Config Object Initialization function.
 
err_t audioamp_init (audioamp_t *ctx, audioamp_cfg_t *cfg)
 Initialization function.
 
err_t audioamp_power_on (audioamp_t *ctx)
 Turn on the Audio Amp click function.
 
err_t audioamp_power_off (audioamp_t *ctx)
 Turn off the Audio Amp click function.
 
err_t audioamp_set_volume (audioamp_t *ctx, uint8_t in_sel, uint8_t volume_level)
 Set volume function.
 
err_t audioamp_mute (audioamp_t *ctx)
 Mute input function.
 
err_t audioamp_unmute (audioamp_t *ctx)
 Unmute input function.
 
err_t audioamp_set_fault_normal_operation (audioamp_t *ctx)
 Set normal opeation of Fault function.
 
err_t audioamp_set_fault_detecton_control (audioamp_t *ctx, uint8_t input_command)
 Set fault detection control function.
 
err_t audioamp_set_diagnostic_control (audioamp_t *ctx, uint8_t input_command)
 Set diagnostic control function.
 
uint8_t audioamp_check_fault (audioamp_t *ctx)
 Check Fault status function.
 

Detailed Description

This file contains API for AudioAMP Click driver.