41#ifdef PREINIT_SUPPORTED
45#ifdef MikroCCoreVersion
46 #if MikroCCoreVersion >= 1
51#include "drv_digital_in.h"
52#include "drv_i2c_master.h"
63#define AUDIOAMP_MAP_MIKROBUS( cfg, mikrobus ) \
64 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
65 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
66 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
74#define AUDIOAMP_INIT_ERROR (-1)
81#define AUDIOAMP_I2C_ADDRESS_0 0x7C
82#define AUDIOAMP_I2C_ADDRESS_1 0x7D
89#define AUDIOAMP_IN_1 0x04
90#define AUDIOAMP_IN_2 0x08
97#define AUDIOAMP_DG_EN 0x10
98#define AUDIOAMP_DG_CONT 0x08
99#define AUDIOAMP_DG_RESET 0x06
100#define AUDIOAMP_DG_ILIMIT 0x04
312 // End click Driver group
err_t audioamp_power_off(audioamp_t *ctx)
Turn off the Audio Amp click function.
uint8_t audioamp_check_fault(audioamp_t *ctx)
Check Fault status function.
err_t audioamp_set_fault_normal_operation(audioamp_t *ctx)
Set normal opeation of Fault function.
err_t audioamp_set_volume(audioamp_t *ctx, uint8_t in_sel, uint8_t volume_level)
Set volume 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.
err_t audioamp_unmute(audioamp_t *ctx)
Unmute input function.
err_t audioamp_power_on(audioamp_t *ctx)
Turn on the Audio Amp click function.
err_t audioamp_mute(audioamp_t *ctx)
Mute input function.
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.
Click configuration structure definition.
Definition audioamp.h:133
uint32_t i2c_speed
Definition audioamp.h:145
pin_name_t scl
Definition audioamp.h:136
pin_name_t int_pin
Definition audioamp.h:141
pin_name_t sda
Definition audioamp.h:137
uint8_t i2c_address
Definition audioamp.h:146
Click ctx object definition.
Definition audioamp.h:114
digital_in_t int_pin
Definition audioamp.h:117
i2c_master_t i2c
Definition audioamp.h:121
uint8_t slave_address
Definition audioamp.h:125