基于NIOS II的uC/OS系統(tǒng)的開發(fā)
作者:
時(shí)間:2016-09-12
來源:網(wǎng)絡(luò)
收藏
INT8U return_code = OS_NO_ERR;
ds1302.set_time(time);
printf(
Hello from Nios II!n
);
while
(1){
printf(
Hello from Nios II!rn
);
ds1302.get_time(time);
printf(
%02d-%02d-%02d %02d:%02d:%02d 星期%srn
,
time[6],time[4],time[3],time[2],time[1],time[0],ti[time[5]-1]);
OSTimeDlyHMSM(0, 0, 1, 0);
}
}
/*
* === FUNCTION ======================================================================
* Name: led_task
* Description: 任務(wù)2 調(diào)用LED驅(qū)動(dòng)并通過串口顯示數(shù)據(jù)
* =====================================================================================
*/
void
led_task(
void
* pdata)
{
INT8U return_code = OS_NO_ERR;
unsigned
int
num=0;
LED->DATA =0xffffffff;
while
(1){
評(píng)論