bin semaph todo

This commit is contained in:
Robin Müller 2020-05-18 18:06:40 +02:00
parent b237287315
commit 45b0193ef3

View File

@ -1,27 +1,24 @@
/**
* @file BinarySempahore.h
*
* @date 25.02.2020
*/
#ifndef FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_ #ifndef FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_
#define FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_ #define FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_
#include <framework/returnvalues/HasReturnvaluesIF.h> #include <framework/returnvalues/HasReturnvaluesIF.h>
extern "C" { extern "C" {
#include "FreeRTOS.h" #include <freertos/FreeRTOS.h>
#include "semphr.h" #include <freertos/semphr.h>
} }
// TODO: Counting semaphores and implement the new (better)
// task notifications. However, those use task notifications require
// the task handle. Maybe it would be better to make a separate class
// and switch between the classes with #ifdefs.
// Task Notifications require FreeRTOS V8.2 something..
/** /**
* @brief OS Tool to achieve synchronization of between tasks or between task and ISR * @brief OS Tool to achieve synchronization of between tasks or between task and ISR
* @details * @details
* Documentation: https://www.freertos.org/Embedded-RTOS-Binary-Semaphores.html * Documentation: https://www.freertos.org/Embedded-RTOS-Binary-Semaphores.html
* *
* SHOULDDO: check freeRTOS version and use new task notifications, * @author R. Mueller
* if non-ancient freeRTOS version is used.
*
* @ingroup osal * @ingroup osal
*/ */
class BinarySemaphore: public HasReturnvaluesIF { class BinarySemaphore: public HasReturnvaluesIF {