You are on page 1of 1

void UartRxFillBuf(void)

{
uint32_t u32UartCounter;

if (UART_RX_FLAG == 1)
{
LINFLEX_0.LINSR.R = 0xF23F;
LINFLEX_0.UARTSR.R = 0x00000004;

/* Store 32-bit BDRM reg in bytes, with LSB stored 1st */


for(u32UartCounter = 0 ; u32UartCounter <= UART_RECV_FLD_LENGTH ;
u32UartCounter++)
{
if(UARTBuf.u16BufFill >= UART_BUF_SIZE)
{
UARTBuf.u16BufFill = 0;
}
/* Store the data in cicular buffer */
UARTBuf.u8Buf[UARTBuf.u16BufFill++] = (uint8_t)(LINFLEX_0.BDRM.R >>
(u32UartCounter * 8));
}
LINFLEX_0.UARTSR.R = 0x00000200;/* Make the receive buffer free */
}
}

You might also like