forked from ROMEO/obsw
23 lines
818 B
C
23 lines
818 B
C
#include "FreeRTOS.h"
|
|
#include "semphr.h"
|
|
#include "task.h"
|
|
|
|
|
|
StaticTask_t uhOhdeleteThisBuffer;
|
|
|
|
void * createTask(TaskFunction_t taskFunction, void * parameter, void *buffer, size_t buffersize){
|
|
return xTaskCreateStatic(
|
|
taskFunction, /* The function that implements the task. */
|
|
"rust", /* The text name assigned to the task - for debug only as it is
|
|
not used by the kernel. */
|
|
buffersize / sizeof(StackType_t), /* The size of the stack to allocate to the task. */
|
|
parameter, /* The parameter passed to the task - not used in this
|
|
simple case. */
|
|
4, /* The priority assigned to the task. */
|
|
buffer, &uhOhdeleteThisBuffer);
|
|
}
|
|
|
|
|
|
void task_delay(uint32_t milliseconds) {
|
|
vTaskDelay(pdMS_TO_TICKS(milliseconds));
|
|
} |