This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6747 UART

我想让发送b2的时候按原样输出,但是输入b2 的时候总是输出11,下面是中断函数的一部分。

IntEventClear(CSL_INTC_EVENTID_UARTINT0);

rxData = UART_charGetNonBlocking_v0(CSL_UART_0_REGS);
if( rxData == 0xb2)
{
  UART_charPut_v0(CSL_UART_0_REGS, rxData);
}else
UART_charPut_v0(CSL_UART_0_REGS, 0x11);

感觉没法进行判断,但是如果将if括号里写成1,则可以进入if。请问这是什么原因