- case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */\r
- cChar = U0LSR;\r
- break;\r
-\r
- case serSOURCE_THRE : /* The THRE is empty. If there is another\r
- character in the Tx queue, send it now. */\r
- if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )\r
- {\r
- U0THR = cChar;\r
- }\r
- else\r
- {\r
- /* There are no further characters \r
- queued to send so we can indicate \r
- that the THRE is available. */\r
- lTHREEmpty = pdTRUE;\r
- }\r
- break;\r
-\r
- case serSOURCE_RX_TIMEOUT :\r
- case serSOURCE_RX : /* A character was received. Place it in \r
- the queue of received characters. */\r
- cChar = U0RBR;\r
- if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )\r
- {\r
- xTaskWokenByRx = pdTRUE;\r
- }\r
- break;\r
-\r
- default : /* There is nothing to do, leave the ISR. */\r
- break;\r
+ /* What caused the interrupt? */\r
+ switch( ucInterrupt & serINTERRUPT_SOURCE_MASK )\r
+ {\r
+ case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */\r
+ cChar = U1LSR;\r
+ break;\r
+ \r
+ case serSOURCE_THRE : /* The THRE is empty. If there is another\r
+ character in the Tx queue, send it now. */\r
+ if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )\r
+ {\r
+ U1THR = cChar;\r
+ }\r
+ else\r
+ {\r
+ /* There are no further characters \r
+ queued to send so we can indicate \r
+ that the THRE is available. */\r
+ lTHREEmpty = pdTRUE;\r
+ }\r
+ break;\r
+ \r
+ case serSOURCE_RX_TIMEOUT :\r
+ case serSOURCE_RX : /* A character was received. Place it in \r
+ the queue of received characters. */\r
+ cChar = U1RBR;\r
+ xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );\r
+ break;\r
+ \r
+ default : /* There is nothing to do, leave the ISR. */\r
+ break;\r
+ }\r
+\r
+ ucInterrupt = U1IIR;\r