\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
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
{\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
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