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 AUDIOAMP4_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.s0 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
67 cfg.s1 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS ); \
69 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
70 cfg.s2 = MIKROBUS( mikrobus, MIKROBUS_INT )
77#define AUDIOAMP4_RETVAL uint8_t
79#define AUDIOAMP4_OK 0x00
80#define AUDIOAMP4_SHTDWN_STATE_ERR 0x01
81#define AUDIOAMP4_VOL_CHANN_ERR 0x02
88#define AUDIOAMP4_VOLUME_CHANN_0 0x00
89#define AUDIOAMP4_VOLUME_CHANN_1 0x01
90#define AUDIOAMP4_VOLUME_CHANN_2 0x02
91#define AUDIOAMP4_VOLUME_CHANN_3 0x03
92#define AUDIOAMP4_VOLUME_CHANN_4 0x04
93#define AUDIOAMP4_VOLUME_CHANN_5 0x05
94#define AUDIOAMP4_VOLUME_CHANN_6 0x06
95#define AUDIOAMP4_VOLUME_CHANN_7 0x07
102#define AUDIOAMP4_SHUTDOWN_ON 0x01
103#define AUDIOAMP4_SHUTDOWN_OFF 0x00
#define AUDIOAMP4_RETVAL
Definition audioamp4.h:77
AUDIOAMP4_RETVAL audioamp4_set_channel(audioamp4_t *ctx, uint8_t channel)
Set channel function function.
AUDIOAMP4_RETVAL audioamp4_init(audioamp4_t *ctx, audioamp4_cfg_t *cfg)
Initialization function.
void audioamp4_default_cfg(audioamp4_t *ctx)
Click Default Configuration function.
void audioamp4_cfg_setup(audioamp4_cfg_t *cfg)
Config Object Initialization function.
AUDIOAMP4_RETVAL audioamp4_shutdown(audioamp4_t *ctx, uint8_t state)
Set channel function function.
Click configuration structure definition.
Definition audioamp4.h:132
pin_name_t s2
Definition audioamp4.h:139
pin_name_t s0
Definition audioamp4.h:135
pin_name_t s1
Definition audioamp4.h:136
pin_name_t en
Definition audioamp4.h:137
pin_name_t pwm
Definition audioamp4.h:138
Click ctx object definition.
Definition audioamp4.h:117
digital_out_t s2
Definition audioamp4.h:124
digital_out_t pwm
Definition audioamp4.h:123
digital_out_t en
Definition audioamp4.h:122
digital_out_t s1
Definition audioamp4.h:121
digital_out_t s0
Definition audioamp4.h:120