void ShowWave(void)
{
static float datastoreOri[320];
u16 x
for(x=319;x>0;x--)
{
{
LCD_Fast_DrawPoint(x+80,330-(int)(datastoreOri[x]/4096*120+100),WHITE);//清屏
datastoreOri[x]=Get_Adc_Average(ADC_Channel_1,5);//将数据存入数组
LCD_Fast_DrawPoint(x+80,330-(int)(datastoreOri[x]/4096*120+100),BLUE);
}
if(x==0)
break;
}
} |