]> git.sur5r.net Git - freertos/commitdiff
Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 12 Apr 2008 23:34:49 +0000 (23:34 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 12 Apr 2008 23:34:49 +0000 (23:34 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@309 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTEX_STM32F103_IAR/serial/serial.c
Demo/CORTEX_STM32F103_Primer_GCC/main.c

index 383f68a06530422cea06a3707bb3dc7bcff956bd..07d838d296563b674cd1db75834125ce6c841f11 100644 (file)
@@ -215,14 +215,14 @@ void vSerialClose( xComPortHandle xPort )
 \r
 void vUARTInterruptHandler( void )\r
 {\r
-portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
 portCHAR cChar;\r
 \r
        if( USART_GetITStatus( USART1, USART_IT_TXE ) == SET )\r
        {\r
                /* The interrupt was caused by the THR becoming empty.  Are there any\r
                more characters to transmit? */\r
-               if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )\r
+               if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )\r
                {\r
                        /* A character was retrieved from the queue so can be sent to the\r
                        THR now. */\r
@@ -237,10 +237,10 @@ portCHAR cChar;
        if( USART_GetITStatus( USART1, USART_IT_RXNE ) == SET )\r
        {\r
                cChar = USART_ReceiveData( USART1 );\r
-               xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );\r
+               xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );\r
        }       \r
        \r
-       portEND_SWITCHING_ISR( xTaskWokenByPost || xTaskWokenByTx );\r
+       portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );\r
 }\r
 \r
 \r
index c70da6b1374cd3907990ab19662ae46b4673b1ec..27dd74dbde38b4e70737a1412f4abbc024bb666a 100644 (file)
@@ -371,6 +371,7 @@ void vApplicationTickHook( void )
 {\r
 static unsigned portLONG ulCallCount;\r
 static const xLCDMessage xMemsMessage = { mainUPDATE_BALL_MESSAGE, NULL };\r
+static portBASE_TYPE xHigherPriorityTaskWoken;\r
 \r
        /* Periodically send a message to the LCD task telling it to update\r
        the MEMS input, and then if necessary the LCD. */\r
@@ -378,7 +379,8 @@ static const xLCDMessage xMemsMessage = { mainUPDATE_BALL_MESSAGE, NULL };
        if( ulCallCount >= mainMEMS_DELAY )\r
        {\r
                ulCallCount = 0;\r
-               xQueueSendFromISR( xLCDQueue, &xMemsMessage, pdFALSE );\r
+               xHigherPriorityTaskWoken = pdFALSE;\r
+               xQueueSendFromISR( xLCDQueue, &xMemsMessage, &xHigherPriorityTaskWoken );\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r