evc 2.0.0.0
evc.h File Reference

This file contains API for EVC Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  evc_t
 Click ctx object definition. More...
 
struct  evc_cfg_t
 Click configuration structure definition. More...
 

Macros

#define EVC_MAP_MIKROBUS(cfg, mikrobus)
 
#define EVC_RETVAL   uint8_t
 
#define EVC_OK   0x00
 
#define EVC_INIT_ERROR   0xFF
 
#define EVC_SET_VOLUME_1dB   0x11
 
#define EVC_SET_VOLUME_10dB   0x01
 
#define EVC_SET_VOLUME_20dB   0x02
 
#define EVC_SET_VOLUME_2dB   0x12
 
#define EVC_SET_VOLUME_30dB   0x03
 
#define EVC_SET_VOLUME_3dB   0x13
 
#define EVC_SET_VOLUME_40dB   0x04
 
#define EVC_SET_VOLUME_4dB   0x14
 
#define EVC_SET_VOLUME_50dB   0x05
 
#define EVC_SET_VOLUME_5dB   0x15
 
#define EVC_SET_VOLUME_60dB   0x06
 
#define EVC_SET_VOLUME_6dB   0x16
 
#define EVC_SET_VOLUME_70dB   0x07
 
#define EVC_SET_VOLUME_7dB   0x17
 
#define EVC_SET_VOLUME_0dB   0x00
 
#define EVC_SET_VOLUME_8dB   0x18
 
#define EVC_SET_VOLUME_9dB   0x19
 
#define EVC_CHANNEL_1   0x80
 
#define EVC_CHANNEL_2   0x40
 
#define EVC_CHANNEL_3   0x00
 
#define EVC_CHANNEL_4   0x20
 
#define EVC_CHANNEL_5   0x60
 
#define EVC_CHANNEL_6   0xA0
 
#define EVC_ALL_CHANNEL   0xC0
 
#define EVC_ALL_CHANNEL_MUTE   0xF9
 
#define EVC_ALL_CHANNEL_UNMUTE   0xF8
 
#define EVC_CLEAR_ALL   0xC0
 
#define EVC_DEVICE_SLAVE_ADDRESS_01   0x42
 
#define EVC_DEVICE_SLAVE_ADDRESS_00   0x40
 
#define EVC_DEVICE_SLAVE_ADDRESS_10   0x44
 
#define EVC_DEVICE_SLAVE_ADDRESS_11   0x46
 

Functions

void evc_cfg_setup (evc_cfg_t *cfg)
 Config Object Initialization function.
 
EVC_RETVAL evc_init (evc_t *ctx, evc_cfg_t *cfg)
 Initialization function.
 
void evc_default_cfg (evc_t *ctx)
 Click Default Configuration function.
 
void evc_generic_write (evc_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void evc_generic_read (evc_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void evc_set_volume_part (evc_t *ctx, uint8_t channel, uint8_t volume1, uint8_t volume2)
 Set volume for the channel.
 
void evc_set_volume_full (evc_t *ctx, uint8_t channel, int8_t volume)
 Set volume for the channel.
 
void evc_clear (evc_t *ctx)
 Clear register.
 
void evc_mute (evc_t *ctx, uint8_t mute)
 Mute and Unmute.
 

Detailed Description

This file contains API for EVC Click driver.