#include <stdint.h>
Go to the source code of this file.
|
#define | HOOK_USER_TASK(_task_func, _priority, _stacksize) |
| Register a user task to be launched at the start of the system. More...
|
|
|
typedef void(* | task_func_t) (void) |
|
typedef void(* | thread_func_t) (void) |
|
|
int | task_create (task_func_t task_func, uint8_t priority, int stack_size) |
| Create new task. More...
|
|
◆ HOOK_USER_TASK
#define HOOK_USER_TASK |
( |
|
_task_func, |
|
|
|
_priority, |
|
|
|
_stacksize |
|
) |
| |
Value:
__attribute__((section(".tasks"), used)) = { \
.task_func = _task_func, \
.priority = _priority, \
.stacksize = _stacksize, \
}
Register a user task to be launched at the start of the system.
- Parameters
-
task_func | The task function to run. |
priority | The priority of the task. |
stacksize | The stack size of the task. |
- Return values
-
◆ task_create()
int task_create |
( |
task_func_t |
task_func, |
|
|
uint8_t |
priority, |
|
|
int |
stack_size |
|
) |
| |
Create new task.
- Parameters
-
task_func | The task function to run. |
priority | The priority of the task. |
stack_size | The stack size of the task. |
- Return values
-
int | The function returns positive task PID number on success; otherwise it returns a negative error number. |