42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
65#define AUDIOAMP2_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.gn0= MIKROBUS( mikrobus, MIKROBUS_AN ); \
67 cfg.gn1= MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.stb= MIKROBUS( mikrobus, MIKROBUS_CS ); \
69 cfg.mute= MIKROBUS( mikrobus, MIKROBUS_PWM ); \
70 cfg.dia= MIKROBUS( mikrobus, MIKROBUS_INT );
77#define AUDIOAMP2_RETVAL uint8_t
79#define AUDIOAMP2_OK 0x00
80#define AUDIOAMP2_INIT_ERROR 0xFF
87#define AUDIOAMP2_STANDBY_MODE 0x00
88#define AUDIOAMP2_MUTE_MODE 0x01
89#define AUDIOAMP2_PLAY_MODE 0x02
96#define AUDIOAMP2_20DB_GAIN 0x00
97#define AUDIOAMP2_26DB_GAIN 0x01
98#define AUDIOAMP2_30DB_GAIN 0x02
99#define AUDIOAMP2_32DB_GAIN 0x03
#define AUDIOAMP2_RETVAL
Definition audioamp2.h:77
uint8_t audioamp2_set_mode(audioamp2_t *ctx, uint8_t sel_mode)
Mode Set function.
void audioamp2_cfg_setup(audioamp2_cfg_t *cfg)
Config Object Initialization function.
uint8_t audioamp2_set_gain(audioamp2_t *ctx, uint8_t sel_gain)
Gain Set function.
uint8_t audioamp2_check_diagnostic(audioamp2_t *ctx)
Diagnostic Check function.
AUDIOAMP2_RETVAL audioamp2_init(audioamp2_t *ctx, audioamp2_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition audioamp2.h:131
pin_name_t dia
Definition audioamp2.h:138
pin_name_t gn0
Definition audioamp2.h:134
pin_name_t gn1
Definition audioamp2.h:135
pin_name_t mute
Definition audioamp2.h:137
pin_name_t stb
Definition audioamp2.h:136
Click ctx object definition.
Definition audioamp2.h:113
digital_out_t stb
Definition audioamp2.h:118
digital_out_t mute
Definition audioamp2.h:119
digital_out_t gn1
Definition audioamp2.h:117
digital_in_t dia
Definition audioamp2.h:123
digital_out_t gn0
Definition audioamp2.h:116