- xSemaphoreGive(semaphore) => This function releases the semaphore
- xSemaphoreTake(semaphore, delay) => This function acquires the semaphore
- uxSemaphoreGetCount(semaphore) => This function returns count of a semaphore (binary semaphore or counting semaphore)
- taskYIELD() or portYIELD() => This function is used to request a context switch to another task. However, if there are no other tasks at a higher or equal priority to the task that calls this function, then the RTOS scheduler will simply select the task that called it to run again.
- uxQueueMessagesWaitingFromISR(semaphore) => This function returns count of a semaphore in an ISR(binary semaphore or counting semaphore)
- In Binray Semaphores you can just release semaphore in the task which have acquired it!
- In Counting Semaphores you can release semaphore at any point of code!
- Releasing Semaphore from ISR is not straightforward by using a single function(
Commit: "Counting Semaphores release with ISR:Part2"
)!
MuhammadRezaHeidary/STM32_FreeRTOS_CountingSemaphores
STM32_FreeRTOS Counting Semaphores Example with STM32F3Discovery Kit
CMIT