我要发送的数据是连续的整型变量,但是配置SCI生成的原函数却是发送字符型的。
byte AS1_SendChar(AS1_TComData Chr)
{
if (SerFlag & FULL_TX) { /* Is any char is in TX buffer */
return ERR_TXFULL; /* If yes then error */
}
EnterCritical(); /* Disable global interrupts */
getReg(QSCI0_STAT); /* Reset interrupt request flags */
setReg(QSCI0_DATA, Chr); /* Store char to transmitter register */
setRegBit(QSCI0_CTRL1, TEIE); /* Enable transmit interrupt */
SerFlag |= FULL_TX; /* Set the flag "full TX buffer" */
ExitCritical(); /* Enable global interrupts */
return ERR_OK; /* OK */
|