task demo (unsane)

This commit is contained in:
2023-11-14 01:26:35 +01:00
parent 701d3dca7f
commit 4782011fb8
4 changed files with 126 additions and 7 deletions

View File

@ -0,0 +1,23 @@
#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));
}