mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Small optimisation by using constants for register addresses.
This commit is contained in:
parent
ebe6e14f25
commit
89c922a586
|
@ -184,14 +184,14 @@ portCHAR cChar;
|
||||||
{
|
{
|
||||||
lDidSomething = pdFALSE;
|
lDidSomething = pdFALSE;
|
||||||
|
|
||||||
ulISRStatus = XIo_In32( pxUART->RegBaseAddress + XUL_STATUS_REG_OFFSET );
|
ulISRStatus = XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_STATUS_REG_OFFSET );
|
||||||
|
|
||||||
if( ( ulISRStatus & (XUL_SR_RX_FIFO_FULL | XUL_SR_RX_FIFO_VALID_DATA ) ) != 0 )
|
if( ( ulISRStatus & XUL_SR_RX_FIFO_VALID_DATA ) != 0 )
|
||||||
{
|
{
|
||||||
/* A character is available - place it in the queue of received
|
/* A character is available - place it in the queue of received
|
||||||
characters. This might wake a task that was blocked waiting for
|
characters. This might wake a task that was blocked waiting for
|
||||||
data. */
|
data. */
|
||||||
cChar = ( portCHAR ) XIo_In32( pxUART->RegBaseAddress + XUL_RX_FIFO_OFFSET );
|
cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );
|
||||||
xTaskWokenByRx = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByRx );
|
xTaskWokenByRx = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByRx );
|
||||||
lDidSomething = pdTRUE;
|
lDidSomething = pdTRUE;
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ portCHAR cChar;
|
||||||
task that was waiting for space to become available on the Tx queue. */
|
task that was waiting for space to become available on the Tx queue. */
|
||||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||||
{
|
{
|
||||||
XIo_Out32( pxUART->RegBaseAddress + XUL_TX_FIFO_OFFSET, cChar );
|
XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cChar );
|
||||||
lDidSomething = pdTRUE;
|
lDidSomething = pdTRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue