Simple round-robin scheduler for mbed

Overview

This library provides simple round-robin scheduling based on the mbed-os.

Why would you want to use this?

  • Tasks are not run from within interrupt sub-routines (as they are using Tickers)
  • Ordering/priority of tasks is deterministic (rate monotonic)

It's not rocket science, just a handy wrapper around the RTOS functions.

Example

#define BASE_RATE 0.1f
#define TASK1_MULTIPLIER 1
#define TASK2_MULTIPLIER 2
....
    RoundRobin::instance()->SetBaseRate( BASE_RATE );
    RoundRobin::instance()->addTask( TASK1_MULTIPLIER, lcdRefresh );
    RoundRobin::instance()->addTask( TASK2_MULTIPLIER, watchButtons );

Files at this revision

API Documentation at this revision

Comitter:
johnb
Date:
Sat Jul 29 12:17:31 2017 +0000
Parent:
0:a8c603b939a7
Commit message:
Remove mbed-os lib to prevent clashes when it's also included by the program

Changed in this revision

mbed-os.lib Show diff for this revision Revisions of this file
diff -r a8c603b939a7 -r 549bc1cd1f3d mbed-os.lib
--- a/mbed-os.lib	Sat Jul 29 11:53:34 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://github.com/ARMmbed/mbed-os/#ed9d1da9dd0c43907ba40cba5ebd9f2c6da3dc07