Go to the documentation of this file.
38 #include "mikrosdk_version.h"
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
61 #define C2X5WAMP_MAP_MIKROBUS( cfg, mikrobus ) \
62 cfg.gn0= MIKROBUS( mikrobus, MIKROBUS_AN ); \
63 cfg.gn1= MIKROBUS( mikrobus, MIKROBUS_RST ); \
64 cfg.stb= MIKROBUS( mikrobus, MIKROBUS_CS ); \
65 cfg.mute= MIKROBUS( mikrobus, MIKROBUS_PWM ); \
66 cfg.dia= MIKROBUS( mikrobus, MIKROBUS_INT );
73 #define C2X5WAMP_RETVAL uint8_t
75 #define C2X5WAMP_OK 0x00
76 #define C2X5WAMP_INIT_ERROR 0xFF
83 #define C2X5WAMP_MODE_STANDBY 0x00
84 #define C2X5WAMP_MODE_MUTE 0x01
85 #define C2X5WAMP_MODE_PLAY 0x02
92 #define C2X5WAMP_GAIN_20DB 0x00
93 #define C2X5WAMP_GAIN_26DB 0x01
94 #define C2X5WAMP_GAIN_30DB 0x02
95 #define C2X5WAMP_GAIN_32DB 0x03
102 #define C2X5WAMP_RESULT_ERROR 0x00
103 #define C2X5WAMP_RESULT_OK 0x01
262 #endif // _C2X5WAMP_H_
void c2x5wamp_cfg_setup(c2x5wamp_cfg_t *cfg)
Config Object Initialization function.
pin_name_t mute
Definition: c2x5wamp.h:141
Click ctx object definition.
Definition: c2x5wamp.h:117
digital_out_t mute
Definition: c2x5wamp.h:123
digital_out_t gn0
Definition: c2x5wamp.h:120
uint8_t c2x5wamp_set_gain(c2x5wamp_t *ctx, uint8_t select_gain)
Set gain resistors of the amplifier function.
uint8_t c2x5wamp_check_input(c2x5wamp_t *ctx)
Check input impedance function.
pin_name_t gn1
Definition: c2x5wamp.h:139
digital_out_t gn1
Definition: c2x5wamp.h:121
digital_in_t dia
Definition: c2x5wamp.h:127
pin_name_t dia
Definition: c2x5wamp.h:142
C2X5WAMP_RETVAL c2x5wamp_init(c2x5wamp_t *ctx, c2x5wamp_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition: c2x5wamp.h:135
#define C2X5WAMP_RETVAL
Definition: c2x5wamp.h:73
void c2x5wamp_default_cfg(c2x5wamp_t *ctx)
Click Default Configuration function.
digital_out_t stb
Definition: c2x5wamp.h:122
uint8_t c2x5wamp_set_mode(c2x5wamp_t *ctx, uint8_t select_mode)
Set mode selection of the amplifier function.
pin_name_t stb
Definition: c2x5wamp.h:140
pin_name_t gn0
Definition: c2x5wamp.h:138