第一范文网 - 专业文章范例文档资料分享平台

DSP综合实验4

来源:用户分享 时间:2025/5/15 12:04:14 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

u_printf(&LCD_Buffer[0],23);

if(iswait == 1) /* if iswait==1, then must wait for send end, else return direct ! */

while( *addr_counter);

return( *addr_counter); /* return number of left char will not send */ }

int led_printf(char *buf, int iswait) { volatile int *addr_counter; int j;

addr_counter = (int *)UART_COUNTER;

/* if buf=\ for(j=0;j<8;j++) { if(*buf == '\\0')

LED_Buffer[11-j]=0xf; else { if( *buf == ' ')

{ LED_Buffer[11-j]=0xf; buf++; } else

{ if( *buf <= '9')

LED_Buffer[11-j]= *buf++ & 0xf; else

LED_Buffer[11-j]= *buf++-'a'+0xa; }

} }

LED_Buffer[12]=0x88; LED_Buffer[13]=0x99;

u_printf(&LED_Buffer[0],14);

if(iswait == 1) /* if iswait==1, then must wait for send end, else return direct ! */

while( *addr_counter);

return( *addr_counter); /* return number of left char will not send }

*/

void key_shown(char key) { char buf[3]; int noshow=0;

switch(key) {

case 59: /* ESC */ IsQuitKey=1; return;

case 60: /* '4' */ strcpy(buf,\4\ break;

case 61: strcpy(buf,\8\ break; case 62: strcpy(buf,\C\ break; case 51: /* '1' */ strcpy(buf,\1\ break;

case 52: /* '5' */ strcpy(buf,\5\ break;

case 53: /* '9' */ strcpy(buf,\9\ break;

case 54: strcpy(buf,\D\ break;

case 43: /* '2' */ strcpy(buf,\2\ break;

case 44: /* '6' */ strcpy(buf,\6\ break;

case 45: /* 'a' */ strcpy(buf,\A\ break; case 46: strcpy(buf,\E\

break; case 35: /* '3' */

strcpy(buf,\3\ break;

case 36: /* '7' */ strcpy(buf,\7\ break;

case 37: /* 'b' */ strcpy(buf,\B\ break;

case 38: strcpy(buf,\F\

break; case 29: /* '+' */ strcpy(buf,\+\ break;

case 21: /* '-' */ strcpy(buf,\-\ break;

case 13: /* 'x' */ strcpy(buf,\X\ break; case 5:

strcpy(buf,\/\

break; case 30: /* '0' */ strcpy(buf,\0\ break;

case 22: /* '.' */ strcpy(buf,\.\ break;

case 14: /* ';' */ strcpy(buf,\=\ break;

case 6: /* RUN key noshow=1; break; default: noshow=1;

break; }

if( noshow == 1) return;

*/ lcd_printf(NowLine,NowCol,buf,0);

int key_choose(char key) { char buf[3]; int key_code;

switch(key)

{

case 59: /* ESC */ IsQuitKey=1; return('Q'); case 51: /* '1' */ strcpy(buf,\ key_code=1; break; case 43: /* '2' */ strcpy(buf,\ key_code=2; break;

case 35: /* '3' */ strcpy(buf,\ key_code=3; break;

case 60: /* '4' */ strcpy(buf,\ key_code=4; break;

case 52: /* '5' */ strcpy(buf,\ key_code=5; break; default: return(-1); }

lcd_printf(4,6,buf,1); mydelay();

return(key_code); }

//mydelay1(); /* wait MCU to shown */ NowCol++;

if((NowCol%8) == 0)

{ NowCol=0; NowLine++; }

}

搜索更多关于: DSP综合实验4 的文档
DSP综合实验4.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c8esb131apw7916095d3t_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top