Ian Hua / Quadcopter-mbedRTOS
Committer:
pHysiX
Date:
Tue Apr 29 14:53:32 2014 +0000
Revision:
3:605fbcb54e75
Parent:
2:ab967d7b4346
Child:
21:b642c18eccd1
Fully implemented system. Need to test stability of RTOS, and to make sure that values are correct. ; Rate Mode only.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pHysiX 1:43f8ac7ca6d7 1 #include "tasks.h"
pHysiX 1:43f8ac7ca6d7 2 #include "setup.h"
pHysiX 1:43f8ac7ca6d7 3
pHysiX 3:605fbcb54e75 4 void createThreads(void)
pHysiX 1:43f8ac7ca6d7 5 {
pHysiX 3:605fbcb54e75 6 /* Create threads */
pHysiX 3:605fbcb54e75 7 RtosTimer thread1(Task1, osTimerPeriodic, NULL);
pHysiX 3:605fbcb54e75 8 RtosTimer thread2(Task2, osTimerPeriodic, NULL);
pHysiX 3:605fbcb54e75 9 RtosTimer thread3(Task3, osTimerPeriodic, (void *)0);
pHysiX 3:605fbcb54e75 10 RtosTimer thread4(Task4, osTimerPeriodic, (void *)0);
pHysiX 3:605fbcb54e75 11
pHysiX 3:605fbcb54e75 12 /* Start threads */
pHysiX 3:605fbcb54e75 13 thread1.start(TASK1_PERIOD);
pHysiX 3:605fbcb54e75 14 thread2.start(TASK2_PERIOD);
pHysiX 3:605fbcb54e75 15 thread3.start(TASK3_PERIOD);
pHysiX 3:605fbcb54e75 16 thread4.start(TASK4_PERIOD);
pHysiX 3:605fbcb54e75 17
pHysiX 3:605fbcb54e75 18 /* Execute state machine forever */
pHysiX 3:605fbcb54e75 19 Thread::wait(osWaitForever);
pHysiX 1:43f8ac7ca6d7 20 }