![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
为ES8311封装的驱动程序 更多...
#include "sdk_default_config.h"
#include "ci130x_iic.h"
#include "ci130x_iisdma.h"
#include "es8311.h"
#include <stdint.h>
#include <string.h>
#include "ci_log.h"
#include "ci130x_system.h"
#include "platform_config.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
宏定义 | |
#define | MAX_DAC_REAL_GAIN (0.0f) |
#define | MIN_DAC_REAL_GAIN (-50.0f) |
函数 | |
void | es8311_i2c_init (void) |
es8311使用的I2C初始化 更多... | |
static void | I2C_WriteEs8311Data (unsigned int regaddr, char val) |
为8311写入一个字节数据 更多... | |
int | I2C_ReadEs8311Data (unsigned int regaddr) |
读取8311某个寄存器的值 更多... | |
void | es8311_pga_gain (es8311_pga_gain_t gain) |
void | es8311_adc_gain_scale_up (es8311_adc_gain_scale_up_t scale_up) |
int32_t | ES8311_ALC_config (es8311_alc_config_t *ALC_str, es8311_alc_gate_t ALC_gate) |
配置8311的ALC 更多... | |
int8_t | es8311_alc_gate_en (es8311_alc_gate_t ALC_gate) |
int8_t | es8311_auto_mute_set (es8311_auto_mute_config_t *str) |
int8_t | es8311_dac_vol_set (int8_t vol) |
void | es8311_init (void) |
void | es8311_dac_off (void) |
void | es8311_dac_on (void) |
变量 | |
static int8_t | sg_8311_i2c_init = 0 |
static int8_t | es8211_init_flag = 0 |
为ES8311封装的驱动程序
#define MAX_DAC_REAL_GAIN (0.0f) |
#define MIN_DAC_REAL_GAIN (-50.0f) |
int32_t ES8311_ALC_config | ( | es8311_alc_config_t * | ALC_str, |
es8311_alc_gate_t | ALC_gate | ||
) |
配置8311的ALC
num_8311 | 8311编号 |
ALC_str | ES8311_ALC_Config_TypeDef类型结构体指针 |
ALC_gate | 左声道、右声道或者双声道的ALC开关 |
int8_t es8311_alc_gate_en | ( | es8311_alc_gate_t | ALC_gate | ) |
int I2C_ReadEs8311Data | ( | unsigned int | regaddr | ) |
读取8311某个寄存器的值
num_8311 | 8311编号 |
regaddr | 8311寄存器地址 |
|
static |
为8311写入一个字节数据
num_8311 | 8311编号 |
regaddr | 8311寄存器地址 |
val | 需要写入的值 |
|
static |
|
static |