Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RTOS-Setup/src/tasks.cpp
- Committer:
- pHysiX
- Date:
- 2014-05-08
- Revision:
- 21:b642c18eccd1
- Parent:
- 3:605fbcb54e75
- Child:
- 22:ef8aa9728013
File content as of revision 21:b642c18eccd1:
#include "tasks.h" #include "setup.h" void createThreads(void) { /* Create threads */ RtosTimer thread1(Task1, osTimerPeriodic, NULL); RtosTimer thread2(Task2, osTimerPeriodic, NULL); RtosTimer thread3(Task3, osTimerPeriodic, (void *)0); RtosTimer thread4(Task4, osTimerPeriodic, (void *)0); /* Start threads */ thread1.start(TASK1_PERIOD); thread2.start(TASK2_PERIOD); thread3.start(TASK3_PERIOD); thread4.start(TASK4_PERIOD); /* Execute state machine forever */ Thread::wait(osWaitForever); } /* int abs(float input) { if (input < 0.0) return -1* (int) input; else return input; } */