MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/Platform/rtos/Task.hpp

41 lines
832 B
C++
Raw Normal View History

2024-06-07 11:12:56 +03:00
/*
* Task.hpp
*
* Created on: 30 May 2023
* Author: malyarenko
*/
#ifndef PLATFORM_RTOS_TASK_HPP_
#define PLATFORM_RTOS_TASK_HPP_
#include <FreeRTOS.h>
#include <task.h>
namespace platform {
namespace rtos {
struct Task {
/** Имя */
const char* name;
/** Приоритет */
UBaseType_t prio;
/** Глубина стека */
UBaseType_t depth;
/** Исполняемый код задачи */
TaskFunction_t func;
/** Дескриптор */
TaskHandle_t handle;
Task(const char* name, UBaseType_t prio, UBaseType_t depth, TaskFunction_t func)
: name(name),
prio(prio),
depth(depth),
func(func),
handle(nullptr) { };
};
} /* namespace rtos */
} /* namespace platform */
#endif /* PLATFORM_RTOS_TASK_HPP_ */