第一次用120,在看UART例程中,回调函数里void UART_INT_HANDLE(uint32_t u32IntStatus)
{
uint8_t bInChar[1]={0xFF};
if(u32IntStatus & DRVUART_RDAINT)
{
printf("\nInput:");
/* Get all the input characters */
while(UART0->ISR.RDA_IF==1)
{
/* Get the character from UART Buffer */
DrvUART_Read(UART_PORT0,bInChar,1);
printf("%c ", bInChar[0]);
/* Check if buffer full */
if(comRbytes < RXBUFSIZE)
{
/* Enqueue the character */
comRbuf[comRtail] = bInChar[0];
comRtail = (comRtail == (RXBUFSIZE-1)) ? 0 : (comRtail+1);
comRbytes++;
}
}
printf("\nTransmission Test:");
uint8_t bInChar[1]={0xFF}; 这行代码是什么意思?为什么要赋值0xFF?? |