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 configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1 #define configIDLE_SHOULD_YIELD 1
// Use notifications // Use notifications
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 2
#define configUSE_MUTEXES 0 #define configUSE_MUTEXES 0
#define configQUEUE_REGISTRY_SIZE 0 #define configQUEUE_REGISTRY_SIZE 0
#define configUSE_RECURSIVE_MUTEXES 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 first parameter is pdTRUE, which has the effect of clearing
the task's notification value back to 0, making the notification the task's notification value back to 0, making the notification
value act like a binary (rather than a counting) semaphore. */ value act like a binary (rather than a counting) semaphore. */
ulNotificationValue = ulTaskNotifyTakeIndexed( 1 /* task notification index */, ulNotificationValue = ulTaskNotifyTake( pdTRUE, xMaxBlockTime );
pdTRUE,
xMaxBlockTime );
if( ulNotificationValue == 1 ) { if( ulNotificationValue == 1 ) {
/* The transmission ended as expected. */ /* The transmission ended as expected. */
@@ -98,9 +96,8 @@ void mixerSchedulerISRTrigger()
configASSERT( mixerTaskId.rtos_handle != NULL ); configASSERT( mixerTaskId.rtos_handle != NULL );
/* Notify the task that the transmission is complete. */ /* Notify the task that the transmission is complete. */
vTaskNotifyGiveIndexedFromISR( mixerTaskId.rtos_handle, vTaskNotifyGiveFromISR( mixerTaskId.rtos_handle,
1 /* task notification index */, &xHigherPriorityTaskWoken );
&xHigherPriorityTaskWoken );
/* If xHigherPriorityTaskWoken is now set to pdTRUE then a /* If xHigherPriorityTaskWoken is now set to pdTRUE then a
context switch should be performed to ensure the interrupt context switch should be performed to ensure the interrupt