这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » 求助 44B0X 库函数中的Uart_GetIntNum()

共2条 1/1 1 跳转至

求助 44B0X 库函数中的Uart_GetIntNum()

菜鸟
2006-12-30 05:52:26     打赏
ARM菜鸟求助了~~~~

Uart_Printf("\nPlaease enter current year:\n");
ucGetYear = Uart_GetIntNum();
Uart_Printf("\nCurrent year is %d", ucGetYear+2000);

Uart_Printf("\nPlease enter current month:\n");
ucGetMonth = Uart_GetIntNum();
Uart_Printf("\nCurrent month is %d", ucGetMonth);

Uart_Printf("\nPlaease enter current day:\n");
ucGetDay = Uart_GetIntNum();
Uart_Printf("\nCurrent day is %d", ucGetDay);

Uart_Printf("\nPlaease enter current date:\n");
ucGetDay = Uart_GetIntNum();
Uart_Printf("\nCurrent date is %d", ucGetDay);

Uart_Printf("\nPlaease enter current hour:\n");
ucGetHour = Uart_GetIntNum();
Uart_Printf("\nCurrent day is %d", ucGetHour);

Uart_Printf("\nPlaease enter current minute:\n");
ucGetMin = Uart_GetIntNum();
Uart_Printf("\nCurrent day is %d", ucGetMin);

Uart_Printf("\nPlaease enter current second: \n");
ucGetSec = Uart_GetIntNum();
Uart_Printf("\nCurrent day is %d", ucGetSec);

在程序运行的时候,串口总是没有正确接受键盘输入的数字,在google搜索了一下,说是要在Main()开始的时候加__rt_lib_init();我加了以后,程序干脆罢工了,向各位前辈求助,感激不禁!



关键词: 求助     44B0X     函数     中的     GetIntNum         

菜鸟
2007-01-01 07:26:00     打赏
2楼

应该是你的__rt_lib_init();没有初始化好。

建议你看看ADS的手册,如果你使用ASD的库函数,需要初始化一些东西的。


共2条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]