summaryrefslogtreecommitdiff
path: root/Demo/PPC405_Xilinx_Virtex4_GCC
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-03-07 11:11:27 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-03-07 11:11:27 +0000
commitfb9116f035363e11dff3c953b2b3bc5d340a35bd (patch)
tree87127420edff158995deae0e90346fe2171c0b50 /Demo/PPC405_Xilinx_Virtex4_GCC
parent237ab094a3ff29b10472fa369757e3518a3ac9e0 (diff)
downloadfreertos-fb9116f035363e11dff3c953b2b3bc5d340a35bd.tar.gz
freertos-fb9116f035363e11dff3c953b2b3bc5d340a35bd.tar.bz2
freertos-fb9116f035363e11dff3c953b2b3bc5d340a35bd.tar.xz
Small optimisation by using constants for register addresses.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@240 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Demo/PPC405_Xilinx_Virtex4_GCC')
-rw-r--r--Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c b/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
index 91127654..6a17e59b 100644
--- a/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
+++ b/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
@@ -184,18 +184,18 @@ portCHAR cChar;
{
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
characters. This might wake a task that was blocked waiting for
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 );
lDidSomething = pdTRUE;
}
-
+
if( ( ulISRStatus & XUL_SR_TX_FIFO_EMPTY ) != 0 )
{
/* There is space in the FIFO - if there are any characters queue for
@@ -203,7 +203,7 @@ portCHAR cChar;
task that was waiting for space to become available on the Tx queue. */
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;
}
}