mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 17:48:33 -04:00
Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics.
This commit is contained in:
parent
7eb7201b46
commit
f4dd20dffc
54 changed files with 266 additions and 251 deletions
|
@ -355,6 +355,9 @@ unsigned portBASE_TYPE uxExpected = 1, uxReceived;
|
|||
void interrupt vButtonPush( void )
|
||||
{
|
||||
static unsigned portBASE_TYPE uxValToSend = 0;
|
||||
static unsigned portLONG xHigherPriorityTaskWoken;
|
||||
|
||||
xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Send an incrementing value to the button push task each run. */
|
||||
uxValToSend++;
|
||||
|
@ -366,7 +369,9 @@ unsigned portBASE_TYPE uxExpected = 1, uxReceived;
|
|||
blocked waiting for the data. As the button push task is high priority
|
||||
it will wake and a context switch should be performed before leaving
|
||||
the ISR. */
|
||||
if( xQueueSendFromISR( xButtonQueue, &uxValToSend, pdFALSE ) )
|
||||
xQueueSendFromISR( xButtonQueue, &uxValToSend, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* NOTE: This macro can only be used if there are no local
|
||||
variables defined. This function uses a static variable so it's
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue