39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_spi_master.h"
68#define VOLUME_ZCE_DISABLE 0x00
69#define VOLUME_ZCE_ENABLE 0x01
83#define VOLUME_MUTE_ENABLE 0x00
84#define VOLUME_MUTE_DISABLE 0x01
103#define VOLUME_MAP_MIKROBUS( cfg, mikrobus ) \
104 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
105 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
106 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
107 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
108 cfg.zce = MIKROBUS( mikrobus, MIKROBUS_AN ); \
109 cfg.sen = MIKROBUS( mikrobus, MIKROBUS_PWM )
void volume_power_up(volume_t *ctx)
Power Up function.
err_t volume_set_vol_gain(volume_t *ctx, float volume_left_dB, float volume_right_dB)
Set volume gain function.
void volume_cfg_setup(volume_cfg_t *cfg)
Volume configuration object setup function.
void volume_zero_crossing(volume_t *ctx, uint8_t zce_state)
Zero Crossing option function.
void volume_hw_mute(volume_t *ctx, uint8_t mute_state)
Hardware MUTE function.
void volume_default_cfg(volume_t *ctx)
Volume default configuration function.
err_t volume_init(volume_t *ctx, volume_cfg_t *cfg)
Volume initialization function.
Volume Click configuration object.
Definition volume.h:138
pin_name_t zce
Definition volume.h:148
spi_master_chip_select_polarity_t cs_polarity
Definition volume.h:155
pin_name_t sck
Definition volume.h:143
spi_master_mode_t spi_mode
Definition volume.h:154
pin_name_t mosi
Definition volume.h:142
uint32_t spi_speed
Definition volume.h:153
pin_name_t miso
Definition volume.h:141
pin_name_t sen
Definition volume.h:149
pin_name_t cs
Definition volume.h:144
Volume Click context object.
Definition volume.h:119
spi_master_t spi
Definition volume.h:127
digital_out_t sen
Definition volume.h:123
digital_out_t zce
Definition volume.h:122
pin_name_t chip_select
Definition volume.h:129