One notification index per task is enough

Notification index 0 is only used by FreeRTOS when Streams or message buffers are used.
This commit is contained in:
Raphael Coeffic
2021-07-31 17:31:51 +02:00
parent 1f6b384927
commit 4d317c5e33
2 changed files with 3 additions and 7 deletions
-1
View File
@@ -34,7 +34,6 @@
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
// Use notifications
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 2
#define configUSE_MUTEXES 0
#define configQUEUE_REGISTRY_SIZE 0
#define configUSE_RECURSIVE_MUTEXES 0
+3 -6
View File
@@ -75,9 +75,7 @@ bool mixerSchedulerWaitForTrigger(uint8_t timeoutMs)
the first parameter is pdTRUE, which has the effect of clearing
the task's notification value back to 0, making the notification
value act like a binary (rather than a counting) semaphore. */
ulNotificationValue = ulTaskNotifyTakeIndexed( 1 /* task notification index */,
pdTRUE,
xMaxBlockTime );
ulNotificationValue = ulTaskNotifyTake( pdTRUE, xMaxBlockTime );
if( ulNotificationValue == 1 ) {
/* The transmission ended as expected. */
@@ -98,9 +96,8 @@ void mixerSchedulerISRTrigger()
configASSERT( mixerTaskId.rtos_handle != NULL );
/* Notify the task that the transmission is complete. */
vTaskNotifyGiveIndexedFromISR( mixerTaskId.rtos_handle,
1 /* task notification index */,
&xHigherPriorityTaskWoken );
vTaskNotifyGiveFromISR( mixerTaskId.rtos_handle,
&xHigherPriorityTaskWoken );
/* If xHigherPriorityTaskWoken is now set to pdTRUE then a
context switch should be performed to ensure the interrupt