forked from ROMEO/obsw
task demo (unsane)
This commit is contained in:
23
mission/freeRTOS_rust_helper.c
Normal file
23
mission/freeRTOS_rust_helper.c
Normal 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));
|
||||
}
|
Reference in New Issue
Block a user