#include "hpm_wm8960.h"#include "hpm_math.h"#include "hpm_i2s_drv.h"#include "hpm_dao_drv.h"#include "hpm_dma_drv.h"#include "hpm_dmamux_drv.h"#include "i2s_dma_chain.h"Functions | |
| ATTR_RAMFUNC_WITH_ALIGNMENT (8) | |
| void | i2s_dao_config (uint32_t sample_rate, uint8_t audio_depth, uint8_t channel_num) |
| DAO I2S configuration ;DAO I2S配置 More... | |
| void | dma_chain_transfer_config_tx (void) |
| I2S TX DMA chain configuration ;I2S发送数据的DMA链配置 More... | |
| void | dma_auto_config_tx (void) |
| I2S TX DMA chain start ;I2S发送数据的DMA链启动 More... | |
| void | i2s_dma_tx_init (void) |
| I2S TX and DMA chain init ;发送数据的I2S和DMA链初始化 More... | |
| void | tx_test (void) |
| void | fft_cal (rfft_type_t *buf, rfft_type_t *output, uint16_t points, uint16_t shift) |
| FFT calculation:perform FFT calculation on the received audio data ;FFT计算:对接收到音频数据进行FFT运算 More... | |
| void | dma_chain_transfer_config_rx (void) |
| I2S RX DMA chain configuration ;I2S接收数据的DMA链配置 More... | |
| void | dma_auto_config_rx (void) |
| I2S RX DMA chain start ;I2S接收数据的DMA链启动 More... | |
| void | codec_i2s_init (void) |
| CODEC used for microphone I2S init ;麦克风使用的CODEC I2S初始化 More... | |
| void | i2s_dma_rx_init (void) |
| I2S RX and DMA chain init ;接收数据的I2S和DMA链初始化 More... | |
| void | rx_data_process (void) |
| processing received data ;处理接收的数据 More... | |
Variables | |
| uint32_t | result [4] |
| u32_t | complete_count |
| int | mic_rx_test = 1 |
| rfft_type_t | rfft_buf_r [FFT_POINTS] |
| rfft_type_t | rfft_buf_l [FFT_POINTS] |
| rfft_type_t | rfft_mag_output [FFT_POINTS] |
| int | test_buff [FFT_POINTS] |
| wm8960_control_t | wm8960_control |
| ATTR_RAMFUNC_WITH_ALIGNMENT | ( | 8 | ) |
| void codec_i2s_init | ( | void | ) |
CODEC used for microphone I2S init ;麦克风使用的CODEC I2S初始化
| void dma_auto_config_rx | ( | void | ) |
I2S RX DMA chain start ;I2S接收数据的DMA链启动
| void dma_auto_config_tx | ( | void | ) |
I2S TX DMA chain start ;I2S发送数据的DMA链启动
| void dma_chain_transfer_config_rx | ( | void | ) |
I2S RX DMA chain configuration ;I2S接收数据的DMA链配置
| void dma_chain_transfer_config_tx | ( | void | ) |
I2S TX DMA chain configuration ;I2S发送数据的DMA链配置
| void fft_cal | ( | rfft_type_t * | buf, |
| rfft_type_t * | output, | ||
| uint16_t | points, | ||
| uint16_t | shift | ||
| ) |
FFT calculation:perform FFT calculation on the received audio data ;FFT计算:对接收到音频数据进行FFT运算
| [in] | buf | data buff that requires FFT calculation;需要进行FFT计算的数据buff |
| [in] | output | the sample depth of audio data,; ;FFT计算结果的输出buff |
| [in] | points | the number of data requiring FFT calculation;需要进行FFT计算的数据个数 |
| [in] | shift | base 2 logarithm value of the sample number and it can be set from 4 to 14 ;以2为底的数据个数的对数值,可以设置为4到14 |
| void i2s_dao_config | ( | uint32_t | sample_rate, |
| uint8_t | audio_depth, | ||
| uint8_t | channel_num | ||
| ) |
DAO I2S configuration ;DAO I2S配置
| [in] | sample_rate | the sample rate of audio data;播放音频的采样率 |
| [in] | audio_depth | the sample depth of audio data,the supports sample depth are as follows: ;音频数据的通道宽度采样深度,支持的采样深度如下:
|
| [in] | channel_num | the num of channels;通道数量 |
| void i2s_dma_rx_init | ( | void | ) |
I2S RX and DMA chain init ;接收数据的I2S和DMA链初始化
| void i2s_dma_tx_init | ( | void | ) |
I2S TX and DMA chain init ;发送数据的I2S和DMA链初始化
| void rx_data_process | ( | void | ) |
processing received data ;处理接收的数据
| void tx_test | ( | void | ) |
| u32_t complete_count |
| int mic_rx_test = 1 |
| uint32_t result[4] |
| rfft_type_t rfft_buf_l[FFT_POINTS] |
| rfft_type_t rfft_buf_r[FFT_POINTS] |
| rfft_type_t rfft_mag_output[FFT_POINTS] |
| int test_buff[FFT_POINTS] |