Scheduler of the operating system.
More...
#include <stdlib.h>
#include <stdint.h>
#include "ossettings.h"
#include "ostypes.h"
Go to the source code of this file.
Scheduler of the operating system.
- Author
- Maximilian Stiefel
- Date
- 8 Jan 2018
◆ osPrintAllTasks()
void osPrintAllTasks |
( |
void |
| ) |
|
Print all information about all tasks.
◆ osPrintTask()
void osPrintTask |
( |
uint8_t |
iindex | ) |
|
Print all information about one task.
- Parameters
-
iindex | Index in the TCB array. |
◆ osRunScheduler()
void osRunScheduler |
( |
void |
| ) |
|
System core. Scheduler needs to be executed by a timer interrupt.
◆ osSchedulerGetSysT()
uint32_t osSchedulerGetSysT |
( |
void |
| ) |
|
Get the system time.
- Return values
-
Gives | back the number of ticks since system has been initialized. |
◆ osTaskCreate()
uint8_t osTaskCreate |
( |
void(*)(void *) |
ifnc_ptr, |
|
|
char * |
itask_name, |
|
|
void * |
iarguments, |
|
|
uint8_t |
ipriority, |
|
|
const osTCB_t * |
oTaskHandle |
|
) |
| |
Spawn a task.
- Parameters
-
ifnc_ptr | Pointer to the task function. |
itask_name | Internal task name. |
iarguments | Enables passing user-defined arguments to the task. |
ipriority | A higher value means a higher priority of the task. |
oTaskHandle | Pointer to TCB. |
- Return values
-
1 | (task has been spawned) or 0 (FAILED) |
◆ osTaskDelay()
void osTaskDelay |
( |
uint8_t |
idelay | ) |
|
Delay function. DO NOT USE FOR PERIODIC TASKS!
- Parameters
-
idelay | Delay in system ticks. |
◆ osTaskDelayUntil()
void osTaskDelayUntil |
( |
uint32_t |
iwakeup_time, |
|
|
uint8_t |
idelay |
|
) |
| |
Delay until function. DO USE FOR PERIODIC TASKS!
- Parameters
-
iwakeup_time | Time when the task execution started. |
idelay | Number of system ticks until the task shall be executed again. |
◆ osTaskDelete()
void osTaskDelete |
( |
osTCB_t * |
iotask | ) |
|
Simply delete task by setting the function pointer to NULL.
- Parameters
-