#include "all-headers.h" static uint64_t gStack1 [64] ; static void task1 (USER_MODE) { digitalWrite(L0_LED, true); for (unsigned int i(0); i < 20; i++) { printChar (MODE_ '1') ; digitalWrite(L0_LED, false); waitDuring(MODE_ 500); digitalWrite(L0_LED, true); } digitalWrite(L0_LED, false); } static uint64_t gStack2 [64] ; static void task2 (USER_MODE) { digitalWrite(L1_LED, true); for (unsigned int i(0); i < 20; i++) { printChar (MODE_ '2') ; digitalWrite(L1_LED, false); waitDuring(MODE_ 400); digitalWrite(L1_LED, true); } digitalWrite(L1_LED, false); } static void initTasks (INIT_MODE) { kernel_createTask (MODE_ gStack1, sizeof (gStack1), task1) ; kernel_createTask (MODE_ gStack2, sizeof (gStack2), task2) ; } MACRO_INIT_ROUTINE (initTasks) ;