微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > 8951串口中断

8951串口中断

时间:11-11 来源:互联网 点击:

t++;

_nop_();

_nop_();

if(count>timeout) return 1;

}

temp = SBUF;

*str = temp;

str++;

RI=0;

}while(temp!=\n && temp!=\r);

*str=\0;

return 0;

}

void UART_Interrupt(void) interrupt 4

{

char temp;

COMWrite("Interrupt\n");

if(RI)

{

RI=0;

temp=SBUF;

COMPutc(temp);

}

}

void main()

{

InitPort();

InitCOM_Interrupt();

while(1)

{

}//end of(while(1))

}//end of main


Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top