亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? post_common.c

?? ADI 公司的DSP ADSP21262 EZ-KIT LITE開發(fā)板的全部源代碼
?? C
字號(hào):
//////////////////////////////////////////////////////////////////////////////
//
//
//
//
//
//
//////////////////////////////////////////////////////////////////////////////

#include <Cdef21262.h>
#include <def21262.h>
#include <sru.h>
#include <signal.h>
#include <math.h>
#include <stdlib.h>
#include <filter.h>

#include "post_common.h"


volatile bool g_bLeftRight = 1;
volatile int  g_iSampleIndex = 1;
volatile int  g_iSampleCount = 0;


volatile float g_fSineWaveOut[MAX_SAMPLES];
volatile float g_fSineWaveIn_Left[MAX_SAMPLES];
volatile float g_fSineWaveIn_Right[MAX_SAMPLES];


void Delay(const int iVal)
{
	int nDelay;
	for( nDelay = 0; nDelay < iVal; nDelay++)
	{
		asm("nop;");
	}
}


void Config_SRU_DAI(void)
{

//-----------------------------------------------------------------------------
//
//  MCLK: The output of the 12.288 MHz xtal is either directly connected to the
//          codec, but also connected to DAI_P06, or just to DAI_P17. This is
//             determined by switches 7.1 and 7.2 For this example we route the
//             MCLK into DAI_P17 and supply the clock to the ADC via DAI_P06
//             by routing the signal through the SRU.

    SRU(LOW,DAI_PB17_I);	//  Tie the pin buffer input LOW.
    SRU(LOW,PBEN17_I);		//  Tie the pin buffer enable input LOW


//-----------------------------------------------------------------------------
//
//  Connect the ADC: The codec drives a BCLK output to DAI pin 7, a LRCLK
//          (a.k.a. frame sync) to DAI pin 8 and data to DAI pin 5.
//
//          Connect the ADC to SPORT0, using data input A
//
//          All three lines are always inputs to the SHARC so tie the pin
//          buffer inputs and pin buffer enable inputs all low.


//------------------------------------------------------------------------
//  Connect the ADC to SPORT0, using data input A

    //  Clock in on pin 7
    SRU(DAI_PB07_O,SPORT0_CLK_I);

    //  Frame sync in on pin 8
    SRU(DAI_PB08_O,SPORT0_FS_I);

    //  Data in on pin 5
    SRU(DAI_PB05_O,SPORT0_DA_I);

//------------------------------------------------------------------------
//  Tie the pin buffer inputs LOW for DAI pins 5, 6 7 and 8.  Even though
//    these pins are inputs to the SHARC, tying unused pin buffer inputs
//    LOW is "good coding style" to eliminate the possibility of
//    termination artifacts internal to the IC.  Note that signal
//    integrity is degraded only with a few specific SRU combinations.
//    In practice, this occurs VERY rarely, and these connections are
//    typically unnecessary.


    SRU(LOW,DAI_PB05_I);
    SRU(LOW,DAI_PB07_I);
    SRU(LOW,DAI_PB08_I);

//------------------------------------------------------------------------
//  Tie the pin buffer enable inputs LOW for DAI pins 5, 6, 7 and 8 so
//    that they are always input pins.

    SRU(LOW,PBEN05_I);
    SRU(LOW,PBEN07_I);
    SRU(LOW,PBEN08_I);

//-----------------------------------------------------------------------------
//
//  Connect the DACs: The codec accepts a BCLK input from DAI pin 13 and
//          a LRCLK (a.k.a. frame sync) from DAI pin 14 and has four
//          serial data outputs to DAI pins 12, 11, 10 and 9
//
//          Connect DAC1 to SPORT1, using data output A
//          Connect DAC2 to SPORT1, using data output B
//          Connect DAC3 to SPORT2, using data output A
//          Connect DAC4 to SPORT2, using data output B
//
//          Connect the clock and frame sync inputs to SPORT1 and SPORT2
//          should come from the ADC on DAI pins 7 and 8, respectively
//
//          Connect the ADC BCLK and LRCLK back out to the DAC on DAI
//          pins 13 and 14, respectively.
//
//          All six DAC connections are always outputs from the SHARC
//          so tie the pin buffer enable inputs all high.
//

//------------------------------------------------------------------------
//  Connect the pin buffers to the SPORT data lines and ADC BCLK & LRCLK

    SRU(SPORT2_DB_O,DAI_PB09_I);
    SRU(SPORT2_DA_O,DAI_PB10_I);
    SRU(SPORT1_DB_O,DAI_PB11_I);
    SRU(SPORT1_DA_O,DAI_PB12_I);

//------------------------------------------------------------------------
//  Connect the clock and frame sync input from the ADC directly
//    to the output pins driving the DACs.

    SRU(DAI_PB07_O,DAI_PB13_I);
    SRU(DAI_PB08_O,DAI_PB14_I);
    SRU(DAI_PB17_O,DAI_PB06_I); // comment out for external pll

//------------------------------------------------------------------------
//  Connect the SPORT clocks and frame syncs to the clock and
//    frame sync from the SPDIF receiver

    SRU(DAI_PB07_O,SPORT1_CLK_I);
    SRU(DAI_PB07_O,SPORT2_CLK_I);
    SRU(DAI_PB08_O,SPORT1_FS_I);
    SRU(DAI_PB08_O,SPORT2_FS_I);

//------------------------------------------------------------------------
//  Tie the pin buffer enable inputs HIGH to make DAI pins 9-14 outputs.
    SRU(HIGH,PBEN06_I);
    SRU(HIGH,PBEN09_I);
    SRU(HIGH,PBEN10_I);
    SRU(HIGH,PBEN11_I);
    SRU(HIGH,PBEN12_I);
    SRU(HIGH,PBEN13_I);
    SRU(HIGH,PBEN14_I);
}


void Config_SRU_INTS(void)
{
	//Pin Assignments in SRU_PIN3 (Group D)
    SRU(LOW,DAI_PB19_I);//assign pin buffer 19 low so it is an input
    SRU(LOW,DAI_PB20_I);    //assign pin buffer 20 low so it is an input

    //Route MISCA singnals in SRU_EXT_MISCA (Group E)
    SRU(DAI_PB19_O,MISCA1_I);//route so that DAI pin buffer 19 connects to MISCA1
    SRU(DAI_PB20_O,MISCA2_I);//route so that DAI pin buffer 20 connects to MISCA2

    //Pin Buffer Disable in SRU_PINEN0 (Group F)
    SRU(LOW,PBEN19_I);//assign pin 19 low so it is an input
    SRU(LOW,PBEN20_I);//assign pin 20 low so it is an input
}



void Config_SRU_LEDS(void)
{

    //assign pin buffer 19 low so it is an input
    SRU(LOW,DAI_PB19_I);

    //assign pin buffer 20 low so it is an input
    SRU(LOW,DAI_PB20_I);

//Route MISCB singnals in SRU_EXT_MISCB (Group E)

    //route so that DAI pin buffer 19 connects to MISCB1
    SRU(DAI_PB19_O,MISCB1_I);

    //route so that DAI pin buffer 20 connects to MISCB2
    SRU(DAI_PB20_O,MISCB2_I);

//Pin Buffer Disable in SRU_PINEN0 (Group F)

    //assign pin 19 low so it is an input
    SRU(LOW,PBEN19_I);

    //assign pin 20 low so it is an input
    SRU(LOW,PBEN20_I);
	
}



int Test_Channel(float* pfRealIn, const int iMaxSamples, const int iSampleRate, const float fExpFreq, const float fFreqTol, const float fSigStrnt, const float fAmpTol)
{
    complex_float cfFFTOut[(MAX_SAMPLES/2)];

	float fTempFreq = 0, fTemp2Freq = 0;
	int nSampleNumber = 0;
	int nHighestFreqIndex = 0, nSecHighestFreqIndex =0;
	float fSampledFrequency = 0;
	float fSlope = 0.0;
	int   iSlopeY1 = 0;
	const float fMaxFreq = (fExpFreq + (fExpFreq * fFreqTol));
	const float fMinFreq = (fExpFreq - (fExpFreq * fFreqTol));
	const float fMaxAmp  = (fSigStrnt + (fSigStrnt * fAmpTol));
	const float fMinAmp  = (fSigStrnt - (fSigStrnt * fAmpTol));
	
	// Real input array fills from a converter or other source
	rfft256( pfRealIn, (complex_float*)cfFFTOut);
	
	// Arrays are filled with FFT data
   	// scan the output array for the highest real value
   	fTempFreq = abs(cfFFTOut[0].re);
   	
 	for (nSampleNumber=1; nSampleNumber < (iMaxSamples / 2); nSampleNumber++)
    {
		if( abs(cfFFTOut[nSampleNumber].re) > fTempFreq )
		{
			fTempFreq = abs(cfFFTOut[nSampleNumber].re);
			nHighestFreqIndex = nSampleNumber;
		}
    }
    
   // multiply the index of the array of the highest value with the sample rate value
   fSampledFrequency = nHighestFreqIndex * (iSampleRate / iMaxSamples);


   // make sure frequency is within acceptable ranges
   if( (fSampledFrequency < fMaxFreq) && (fSampledFrequency > fMinFreq) )
   {
   		// for now, take the point before, and after the max value
   		// average them, then find the distance between them

		// the slope is given by b = (y2 - y1) / (x2 - x1) or b = y2-y1
	    if( 0 == nSampleNumber )
	    {	// roll around to the end of the array
	    	iSlopeY1 = iMaxSamples;
	    }
	    else if( iMaxSamples == nSampleNumber )
	    {
	    	iSlopeY1 = 0;
	    }
	    else
	    {
	    	iSlopeY1 = nSampleNumber - 1;
	    }

	    fSlope = (cfFFTOut[nHighestFreqIndex].re - cfFFTOut[iSlopeY1].re);

	    fSlope = abs(fSlope);

        //Make sure amplitude is within acceptable range [TAR-32652]              	
        if( (fSlope > fMaxAmp ) || (fSlope < fMinAmp))
	    {
	    	return 0;
	    }
		
   		return 1;
   }

	return 0;	// test failed
}

void CreateSinTable(const float fAmp, const float fFreq, const float fSampleRate)
{
	int n;

	for(n = 0; n < MAX_SAMPLES; n++)
	{
		g_fSineWaveOut[n] = (float)(fAmp * sin( (2.0 * PI * fFreq * ( ((float)(n+1)) / fSampleRate))) );
	}
}



?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久精品人人做人人爽50路 | 欧美www视频| 亚洲成人av中文| 欧美精品一级二级| 青青草97国产精品免费观看无弹窗版| 欧美视频一区二区三区四区| 一区二区三区在线观看欧美| 欧美军同video69gay| 精品少妇一区二区三区免费观看| 在线亚洲欧美专区二区| 久久久噜噜噜久久人人看| 国产a区久久久| 亚洲三级在线免费观看| 精品视频在线免费看| 欧美aaa在线| 国产日产欧美一区二区视频| 99久久亚洲一区二区三区青草| 樱桃视频在线观看一区| 欧美精品18+| 国产1区2区3区精品美女| 一区二区三区国产| 欧美变态tickling挠脚心| 成人在线视频一区| 性久久久久久久| 国产视频一区在线观看| 欧美亚洲图片小说| 国产激情一区二区三区| 一区二区三区久久久| 91精品国产一区二区三区香蕉| 国产91在线|亚洲| 午夜电影一区二区三区| 欧美激情在线看| 6080国产精品一区二区| 成年人国产精品| 美女视频一区在线观看| 亚洲天堂2014| 国产亚洲精品aa午夜观看| 欧美唯美清纯偷拍| 成人免费高清视频在线观看| 蜜乳av一区二区三区| 亚洲人吸女人奶水| 精品成人一区二区三区四区| 91香蕉视频黄| 国产成人精品午夜视频免费| 午夜欧美电影在线观看| 国产精品短视频| 久久一区二区视频| 欧美丰满美乳xxx高潮www| www.亚洲在线| 国产在线视频一区二区| 免费成人美女在线观看.| 亚洲最快最全在线视频| 欧美激情一二三区| 久久影音资源网| 日韩欧美国产不卡| 91精品国产色综合久久ai换脸| 91在线观看污| 成人国产电影网| 国产精品自在欧美一区| 麻豆91在线看| 日韩av电影免费观看高清完整版| 亚洲人吸女人奶水| 亚洲欧美在线视频观看| 欧美国产一区二区在线观看| 久久久久久夜精品精品免费| 欧美v日韩v国产v| 精品欧美乱码久久久久久1区2区| 欧美精品高清视频| 91 com成人网| 欧美精品99久久久**| 欧美高清一级片在线| 777亚洲妇女| 7777精品伊人久久久大香线蕉超级流畅 | 欧美成人国产一区二区| 欧美丰满美乳xxx高潮www| 欧美日韩色综合| 欧美色大人视频| 欧美日产国产精品| 这里是久久伊人| 欧美成人综合网站| 26uuuu精品一区二区| 久久一区二区视频| 国产精品久久久久久久久久久免费看 | 2021国产精品久久精品| 精品99999| 亚洲欧美国产三级| 一区二区在线观看免费| 亚洲午夜成aⅴ人片| 亚洲国产精品视频| 亚洲午夜国产一区99re久久| 天堂成人国产精品一区| 青娱乐精品在线视频| 麻豆成人久久精品二区三区小说| 久久99国产精品尤物| 国产成人精品一区二| 99久久99精品久久久久久| www.亚洲国产| 欧美天堂亚洲电影院在线播放| 在线不卡一区二区| 欧美tk—视频vk| 国产精品卡一卡二卡三| 亚洲一区二区欧美日韩| 麻豆91免费观看| www.视频一区| 91精品免费在线观看| 久久一夜天堂av一区二区三区| 国产精品毛片高清在线完整版| 日韩毛片高清在线播放| 亚洲自拍与偷拍| 精品一二线国产| 色综合久久中文字幕| 3atv一区二区三区| 国产欧美一区二区三区在线老狼| 中文字幕亚洲成人| 人人超碰91尤物精品国产| 高清shemale亚洲人妖| 91国模大尺度私拍在线视频| 日韩欧美国产wwwww| 亚洲老司机在线| 国产一区欧美二区| 欧美亚男人的天堂| 久久精品日韩一区二区三区| 夜夜亚洲天天久久| 国产一区视频在线看| 欧美亚洲尤物久久| 中文字幕第一区| 蜜臀精品久久久久久蜜臀| 91视频在线观看| 精品粉嫩超白一线天av| 亚洲成人av福利| 成人手机电影网| 日韩一级欧美一级| 亚洲免费av网站| 夫妻av一区二区| 日韩欧美一二三区| 亚洲高清在线视频| 99国产精品99久久久久久| 日韩精品一区二区三区三区免费 | 视频一区国产视频| 99re视频这里只有精品| www激情久久| 男男gaygay亚洲| 欧洲av一区二区嗯嗯嗯啊| 国产精品日日摸夜夜摸av| 蜜桃视频一区二区| 91精品久久久久久久91蜜桃| 亚洲精品国产a久久久久久| 床上的激情91.| 国产午夜精品福利| 激情深爱一区二区| 欧美不卡在线视频| 蜜桃av一区二区| 日韩一区二区电影| 午夜电影网亚洲视频| 精品1区2区3区| 亚洲成在线观看| 欧美色倩网站大全免费| 亚洲一区二区综合| 色综合天天天天做夜夜夜夜做| 日本一区二区三区dvd视频在线| 国产精品资源网站| 欧美变态tickle挠乳网站| 久久99精品国产.久久久久久| 欧美一二三四在线| 蜜桃在线一区二区三区| 日韩精品专区在线影院重磅| 青青青伊人色综合久久| 日韩欧美一二区| 国产一区二区不卡老阿姨| 26uuu亚洲婷婷狠狠天堂| 国产在线国偷精品产拍免费yy| 久久综合色8888| 国产精品一区专区| 中文文精品字幕一区二区| 不卡视频免费播放| 亚洲女爱视频在线| 欧美性猛片xxxx免费看久爱| 香蕉成人伊视频在线观看| 337p亚洲精品色噜噜噜| 久久99热这里只有精品| 久久这里只有精品视频网| 成人中文字幕在线| 一区二区三区产品免费精品久久75| 在线观看亚洲专区| 丝袜亚洲精品中文字幕一区| 日韩免费高清视频| 国产麻豆午夜三级精品| 亚洲欧美一区二区视频| 欧美在线免费视屏| 美脚の诱脚舐め脚责91 | 色天使色偷偷av一区二区| 亚洲影院理伦片| 欧美不卡一区二区三区| 成人毛片视频在线观看| 亚洲国产精品嫩草影院| 精品久久久久久久久久久久包黑料 | 国产无人区一区二区三区| 成人丝袜视频网| 午夜视频在线观看一区二区三区| 日韩你懂的在线播放|