In the examples to lpc2103 educational board form Embedded Artists was the exaple in C. How to realise this in Astrobe?
How to set up an interrupt for UART buffer to run procedure if smth new comes?
Code: Select all
tU8
uart0GetChar(tU8 *pRxChar)
{
tU32 tmpTail;
/* buffer is empty */
if(uart0RxHead == uart0RxTail)
return FALSE;
tmpTail = (uart0RxTail + 1) & RX_BUFFER_MASK;
uart0RxTail = tmpTail;
*pRxChar = uart0RxBuf[tmpTail];
return TRUE;
}