led example with 2 timers

Dependencies:   mbed mbed-rtos

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "main.h"
00002 
00003 InterruptIn signal(p15);
00004 Serial pc(USBTX,USBRX);
00005 
00006 Queue<string, 16> ReaderQueue;
00007 Queue<string, 16> WriterQueue;
00008 Mail<message_t, 16> mailBox;
00009 
00010 int main (void) 
00011 {
00012     Thread thread1(Writer_thread);
00013     Thread thread2(Reader_thread);
00014     Thread thread3(Modulator_thread);
00015     Thread thread4(Demodulator_thread);
00016     Thread thread5(Sender_thread);
00017     Thread thread6(Receiver_thread);
00018     
00019     /*thread1.set_priority(osPriorityNormal);
00020     thread2.set_priority(osPriorityRealtime);
00021     thread3.set_priority(osPriorityNormal);
00022     thread4.set_priority(osPriorityNormal);*/
00023     thread5.set_priority(osPriorityRealtime);
00024     //thread6.set_priority(osPriorityNormal);
00025     
00026     while(1)
00027     {
00028     // wait forever...        
00029     }
00030 }