EmbeddedEtcher
scheduler.h File Reference

Scheduler of the operating system. More...

#include <stdlib.h>
#include <stdint.h>
#include "ossettings.h"
#include "ostypes.h"
Include dependency graph for scheduler.h:

Go to the source code of this file.

Functions

uint32_t osSchedulerGetSysT (void)
 
uint8_t osTaskCreate (void(*ifnc_ptr)(void *), char *itask_name, void *iarguments, uint8_t ipriority, const osTCB_t *oTaskHandle)
 
void osTaskDelete (osTCB_t *iotask)
 
void osTaskDelay (uint8_t idelay)
 
void osTaskDelayUntil (uint32_t iwakeup_time, uint8_t idelay)
 
void osRunScheduler (void)
 
void osPrintTask (uint8_t iindex)
 
void osPrintAllTasks (void)
 

Detailed Description

Scheduler of the operating system.

Author
Maximilian Stiefel
Date
8 Jan 2018

Function Documentation

◆ osPrintAllTasks()

void osPrintAllTasks ( void  )

Print all information about all tasks.

◆ osPrintTask()

void osPrintTask ( uint8_t  iindex)

Print all information about one task.

Parameters
iindexIndex 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
Givesback 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_ptrPointer to the task function.
itask_nameInternal task name.
iargumentsEnables passing user-defined arguments to the task.
ipriorityA higher value means a higher priority of the task.
oTaskHandlePointer 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
idelayDelay in system ticks.

◆ osTaskDelayUntil()

void osTaskDelayUntil ( uint32_t  iwakeup_time,
uint8_t  idelay 
)

Delay until function. DO USE FOR PERIODIC TASKS!

Parameters
iwakeup_timeTime when the task execution started.
idelayNumber 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
iotaskPointer to TCB.