📄 test_ez_audio.h
字号:
/*********************************************************************************
Copyright(c) 2005 Analog Devices, Inc. All Rights Reserved.
This software is proprietary and confidential. By using this software you agree
to the terms of the associated Analog Devices License Agreement.
Description:
This is the source code for the Blackfin EZ-Audio Power On Self Test
(POST).
*********************************************************************************/
#ifndef _TEST_EZ_AUDIO_H_
#define _TEST_EZ_AUDIO_H_
//////////////////////////////////////////////////////////////////////////////
// common defines
//////////////////////////////////////////////////////////////////////////////
// SPI transfer mode
#define TIMOD_DMA_TX 0x0003
#define AUDIO_IN_BUF_LEN 256
#define NUM_TEST_FREQUENCIES 7
#define REQUIRED_SAMPLES ((256) * 250)
#define SAMPLE_RATE_T ((float)48000.0)
#define SAMPLES_PER_SIN (float)((float)SAMPLE_RATE_T/g_fDesired_Freq)
#define AMPLITUDE ((float)(0xFFFFFFFF/2))//((float)8388607)
#define PI ((float)3.141592765309)
#define ACCEPTABLE_DEVIATION_PCT ((float)0.15)
#define ACCEPTABLE_DEVIATION (g_fDesired_Freq * ACCEPTABLE_DEVIATION_PCT)
#define MAX_DESIRED_FREQ (g_fDesired_Freq + ACCEPTABLE_DEVIATION)
#define MIN_DESIRED_FREQ (g_fDesired_Freq - ACCEPTABLE_DEVIATION)
#define MIN_SIGNAL_STRENGTH (float)20.0
//////////////////////////////////////////////////////////////////////////////
// External Globals
//////////////////////////////////////////////////////////////////////////////
extern volatile float g_fDesired_Freq;
extern volatile float g_fSamplesPerSin;
extern volatile int g_iBufferSampleSize;
extern volatile unsigned char g_ucAudioInEnable;
extern volatile long g_lSampleCount;
extern volatile int g_iSampleIndex;
extern unsigned int g_uiOutputSampleIndex;
extern volatile long g_lAudioInputBufferL[AUDIO_IN_BUF_LEN];
extern volatile long g_lAudioInputBufferR[AUDIO_IN_BUF_LEN];
extern volatile long g_lAudioOutputBufferRef[AUDIO_IN_BUF_LEN];
//////////////////////////////////////////////////////////////////////////////
// Function prototypes
//////////////////////////////////////////////////////////////////////////////
int Test_Channel(long* psRealIn);
#endif //#ifndef _TEST_EZ_AUDIO_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -