led example with 2 timers

Dependencies:   mbed mbed-rtos

Committer:
passelin
Date:
Tue Feb 11 20:38:43 2014 +0000
Revision:
4:af325c921e79
Parent:
3:204e23521e39
MAR 15:38

Who changed what in which revision?

UserRevisionLine numberNew contents of line
passelin 1:6e31c704f4d6 1 #include "main.h"
trixrabbit 0:11dd239703cc 2
trixrabbit 0:11dd239703cc 3 InterruptIn signal(p15);
trixrabbit 0:11dd239703cc 4 Serial pc(USBTX,USBRX);
trixrabbit 0:11dd239703cc 5
passelin 3:204e23521e39 6 Queue<string, 16> ReaderQueue;
passelin 3:204e23521e39 7 Queue<string, 16> WriterQueue;
passelin 3:204e23521e39 8 Mail<message_t, 16> mailBox;
trixrabbit 0:11dd239703cc 9
trixrabbit 0:11dd239703cc 10 int main (void)
trixrabbit 0:11dd239703cc 11 {
passelin 1:6e31c704f4d6 12 Thread thread1(Writer_thread);
passelin 1:6e31c704f4d6 13 Thread thread2(Reader_thread);
passelin 1:6e31c704f4d6 14 Thread thread3(Modulator_thread);
passelin 1:6e31c704f4d6 15 Thread thread4(Demodulator_thread);
passelin 1:6e31c704f4d6 16 Thread thread5(Sender_thread);
passelin 1:6e31c704f4d6 17 Thread thread6(Receiver_thread);
trixrabbit 0:11dd239703cc 18
passelin 2:124a066878cc 19 /*thread1.set_priority(osPriorityNormal);
passelin 2:124a066878cc 20 thread2.set_priority(osPriorityRealtime);
passelin 2:124a066878cc 21 thread3.set_priority(osPriorityNormal);
passelin 4:af325c921e79 22 thread4.set_priority(osPriorityNormal);*/
passelin 4:af325c921e79 23 thread5.set_priority(osPriorityRealtime);
passelin 4:af325c921e79 24 //thread6.set_priority(osPriorityNormal);
passelin 2:124a066878cc 25
trixrabbit 0:11dd239703cc 26 while(1)
trixrabbit 0:11dd239703cc 27 {
passelin 1:6e31c704f4d6 28 // wait forever...
trixrabbit 0:11dd239703cc 29 }
trixrabbit 0:11dd239703cc 30 }