does anyone know if it is possible to have a semaphore taken by 1 task and given back by 2 different sources?
in the demo’s semaphores are used for synchronisation between 1 task and 1 ISR. but i’d like to synchronize a task with TWO ISR’s.
so my idea was that the task does a
xSemaphoreTake( xSemaphore, WAIT_TIME);
and ISR1 and ISR2 both do:
xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE );
but i dont know what happens if the semaphore is currently ‘free’ and the function above is called… (would be nice if there’s a function to check wether the semaphore is in use or not. but afaik there aint such a function).
if there would be event-flags available in freeRTOS i would use that but since there are none i need something different…