39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
69#define HEADPHONEAMP_SOUND_VOLUME_NEG_33_dB 0
70#define HEADPHONEAMP_SOUND_VOLUME_NEG_30_dB 1
71#define HEADPHONEAMP_SOUND_VOLUME_NEG_27_dB 2
72#define HEADPHONEAMP_SOUND_VOLUME_NEG_24_dB 3
73#define HEADPHONEAMP_SOUND_VOLUME_NEG_21_dB 4
74#define HEADPHONEAMP_SOUND_VOLUME_NEG_18_dB 5
75#define HEADPHONEAMP_SOUND_VOLUME_NEG_15_dB 6
76#define HEADPHONEAMP_SOUND_VOLUME_NEG_12_dB 7
77#define HEADPHONEAMP_SOUND_VOLUME_NEG_9_dB 8
78#define HEADPHONEAMP_SOUND_VOLUME_NEG_6_dB 9
79#define HEADPHONEAMP_SOUND_VOLUME_NEG_3_dB 10
80#define HEADPHONEAMP_SOUND_VOLUME_NEG_0_dB 11
81#define HEADPHONEAMP_SOUND_VOLUME_POS_3_dB 12
82#define HEADPHONEAMP_SOUND_VOLUME_POS_6_dB 13
83#define HEADPHONEAMP_SOUND_VOLUME_POS_9_dB 14
84#define HEADPHONEAMP_SOUND_VOLUME_POS_12_dB 15
102#define HEADPHONEAMP_MAP_MIKROBUS( cfg, mikrobus ) \
103 cfg.shdn = MIKROBUS( mikrobus, MIKROBUS_RST ); \
104 cfg.clk = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
105 cfg.ud = MIKROBUS( mikrobus, MIKROBUS_INT )
err_t headphoneamp_volume_up(headphoneamp_t *ctx)
Headphone AMP set sound volume up function.
void headphoneamp_cfg_setup(headphoneamp_cfg_t *cfg)
Headphone AMP configuration object setup function.
err_t headphoneamp_default_cfg(headphoneamp_t *ctx)
Headphone AMP default configuration function.
err_t headphoneamp_volume_down(headphoneamp_t *ctx)
Headphone AMP set sound volume down function.
err_t headphoneamp_init(headphoneamp_t *ctx, headphoneamp_cfg_t *cfg)
Headphone AMP initialization function.
err_t headphoneamp_shutdown(headphoneamp_t *ctx)
Headphone AMP shutdown function.
err_t headphoneamp_power_up(headphoneamp_t *ctx)
Headphone AMP power up function.
err_t headphoneamp_set_sound_volume(headphoneamp_t *ctx, uint8_t sound_volume)
Headphone AMP set sound volume function.
headphoneamp_return_value_t
Headphone AMP Click return value data.
Definition headphoneamp.h:139
@ HEADPHONEAMP_OK
Definition headphoneamp.h:140
@ HEADPHONEAMP_ERROR
Definition headphoneamp.h:141
Headphone AMP Click configuration object.
Definition headphoneamp.h:127
pin_name_t clk
Definition headphoneamp.h:129
pin_name_t shdn
Definition headphoneamp.h:128
pin_name_t ud
Definition headphoneamp.h:130
Headphone AMP Click context object.
Definition headphoneamp.h:115
digital_out_t shdn
Definition headphoneamp.h:116
digital_out_t ud
Definition headphoneamp.h:118
digital_out_t clk
Definition headphoneamp.h:117