嵌入式系统原理及应用教程第5剖析.ppt

5.5.4 定时部件应用实例 //RTC时钟显示 void Display_Rtc(void) { int year,tmp,key; int month,date,weekday,hour,min,sec; Uart_Printf([ Display RTC Test ]\n); Uart_Printf(0. RTC Initialize 1. RTC Time Setting 2. Only RTC Display\n\n); Uart_Printf(Selet : ); key = Uart_GetIntNum(); Uart_Printf(\n\n); isInit = key; if(isInit == 0) { Rtc_Init(); isInit = 2; } 5.5.4 定时部件应用实例 else if(isInit == 1) { Rtc_TimeSet(); isInit = 2; } rRTCCON = 0x01; Uart_Printf(Press any key to exit.\n\n);

文档评论(0)

1亿VIP精品文档

相关文档