?? main.c
字號:
#include "ADDS_21161_EzKit.h"
#include <def21161.h>
#include <signal.h>
float * DelayLine;
int Index = 0;
void Process_Samples( int sig_int)
{
Receive_Samples();
/* Perform AD1836/AD1852/SPDIF Audio Processing Here */
Left_Channel_Out0 = Left_Channel_In1; // left channel 1/8th inch jack to headphone out left channel
Right_Channel_Out0 = Right_Channel_In1; // left channel 1/8th inch jack to headphone out left channel
/* create a simple stereo digital delay on internal AD1836 stereo DAC1 channel */
Right_Channel_Out1 = DelayLine[Index] + Right_Channel_In1; // delayed left + right channel
Left_Channel_Out1 = Left_Channel_In1; // loopback left channel, no processing
DelayLine[Index++] = Left_Channel_In1; // store left channel into delay-line
if (Index == 12000) Index = 0;
/* loop back other audio data */
Left_Channel_Out2 = Left_Channel_In0;
Right_Channel_Out2 = Right_Channel_In0;
Left_Channel_AD1852 = Left_Channel_SPDIF_rx;
Right_Channel_AD1852 = Right_Channel_SPDIF_rx;
Transmit_Samples();
}
void main()
{
/* Setup Interrupt edges and flag I/O directions */
Setup_ADSP21161N();
/* Setup SDRAM Controller */
Setup_SDRAM();
Setup_AD1836();
Init_AD1852_DACs();
Program_SPORT02_TDM_Registers();
Program_SPORT02_DMA_Channels();
interruptf( SIG_SP0I, Process_Samples);
*(int *) SP02MCTL |= MCE;
DelayLine = (float *) 0x00200000;
for (;;)
asm("idle;");
y
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -