35#include "drv_digital_out.h"
36#include "drv_digital_in.h"
55#define HEADPHONEAMP_SOUND_VOLUME_NEG_33_dB 0
56#define HEADPHONEAMP_SOUND_VOLUME_NEG_30_dB 1
57#define HEADPHONEAMP_SOUND_VOLUME_NEG_27_dB 2
58#define HEADPHONEAMP_SOUND_VOLUME_NEG_24_dB 3
59#define HEADPHONEAMP_SOUND_VOLUME_NEG_21_dB 4
60#define HEADPHONEAMP_SOUND_VOLUME_NEG_18_dB 5
61#define HEADPHONEAMP_SOUND_VOLUME_NEG_15_dB 6
62#define HEADPHONEAMP_SOUND_VOLUME_NEG_12_dB 7
63#define HEADPHONEAMP_SOUND_VOLUME_NEG_9_dB 8
64#define HEADPHONEAMP_SOUND_VOLUME_NEG_6_dB 9
65#define HEADPHONEAMP_SOUND_VOLUME_NEG_3_dB 10
66#define HEADPHONEAMP_SOUND_VOLUME_NEG_0_dB 11
67#define HEADPHONEAMP_SOUND_VOLUME_POS_3_dB 12
68#define HEADPHONEAMP_SOUND_VOLUME_POS_6_dB 13
69#define HEADPHONEAMP_SOUND_VOLUME_POS_9_dB 14
70#define HEADPHONEAMP_SOUND_VOLUME_POS_12_dB 15
88#define HEADPHONEAMP_MAP_MIKROBUS( cfg, mikrobus ) \
89 cfg.shdn = MIKROBUS( mikrobus, MIKROBUS_RST ); \
90 cfg.clk = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
91 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:125
@ HEADPHONEAMP_OK
Definition: headphoneamp.h:126
@ HEADPHONEAMP_ERROR
Definition: headphoneamp.h:127
Headphone AMP Click configuration object.
Definition: headphoneamp.h:113
pin_name_t clk
Definition: headphoneamp.h:115
pin_name_t shdn
Definition: headphoneamp.h:114
pin_name_t ud
Definition: headphoneamp.h:116
Headphone AMP Click context object.
Definition: headphoneamp.h:101
digital_out_t shdn
Definition: headphoneamp.h:102
digital_out_t ud
Definition: headphoneamp.h:104
digital_out_t clk
Definition: headphoneamp.h:103