📄 echo.c
字号:
#include "echo.h"
#define McBSP0_DRR2 (*(volatile unsigned int *)0x0020)
#define McBSP0_DRR1 (*(volatile unsigned int *)0x0021)
#define McBSP0_DXR2 (*(volatile unsigned int *)0x0022)
#define McBSP0_DXR1 (*(volatile unsigned int *)0x0023)
/***********************************************************************
** Function Routine
h(t)
^
|
| ^
s(t) ---> | | -->y(t)
___________|_____|___________>
0 0.5 t
This function cause an echo with a 0.5s delay and an amplitude of 1/2 of the source's
***********************************************************************/
void echo(void)
{
/* mix microphone input with the carrier to shift frequency */
eMicPhIn = ((McBSP0_DRR1-130) << 0 )&0xFFFE;
//SInMx = ((long int)(MicPhIn * SCarrier) >> 16);
if(i<4998){i++;}else{i=0;}
bf[i]=eMicPhIn;
j=i+1;
if(j==5000){j=0;}
eSOutTemp = eMicPhIn + bf[j]>>1;
McBSP0_DXR1 = eSOutTemp;
McBSP0_DXR1 &= 0xFFFE;
// output the secured voice to master AIC10 device in ISR
}
/***********************************************************************
** End of File -- echo.c
***********************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -