云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > DSP综合实验4

DSP综合实验4

  • 62 次阅读
  • 3 次下载
  • 2025/6/25 3:47:16

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 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

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

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com