📄 loop_intr.c
字号:
//Loop_intr.c
//short bufferlength=512;
short buffer[512];
//short i=0;
#include "c6x11dsk.h"
#include "c6x.h"
#include"ft900.cof"
#include"ft2700.cof"
int i=0;
int j=0;
short dly[stages][2]={0};
short dly2[stages][2]={0};
interrupt void c_int11() //interrupt service routine
{
int i,j, input;
int un, yn,un2,yn2;
input = mcbsp0_read();
for (i = 0; i < stages; i++)
{
un=input-((b1[i][0]*dly[i][0])>>15) - ((b1[i][1]*dly[i][1])>>15);
yn=((a1[i][0]*un)>>15)+((a1[i][1]*dly[i][0])>>15)+((a1[i][2]*dly[i][1])>>15);
dly[i][1] = dly[i][0];
dly[i][0] = un;
input = yn;
}
//buffer[j]=yn;
//j++;
//if(j>=512) j=0;
//mcbsp0_write(yn);
for (i = 0; i < stages; i++)
{
un2=yn-((b2[i][0]*dly2[i][0])>>15) - ((b2[i][1]*dly2[i][1])>>15);
yn2=((a2[i][0]*un2)>>15)+((a2[i][1]*dly2[i][0])>>15)+((a2[i][2]*dly2[i][1])>>15);
dly2[i][1] = dly2[i][0];
dly2[i][0] = un2;
yn = yn2;
}
output_sample(yn2);
return;
}
void main()
{
comm_intr(); //init DSK, codec, McBSP
while(1); //infinite loop
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -