Legen Dary
/
APP4
APP4 - S5 H16
Diff: main.cpp
- Revision:
- 3:cd69f04a084e
- Parent:
- 2:f57df1b4a7a4
- Child:
- 4:d773812f9f7b
--- a/main.cpp Tue Feb 23 04:47:56 2016 +0000 +++ b/main.cpp Tue Feb 23 14:47:09 2016 +0000 @@ -10,6 +10,7 @@ DigitalOut led4(LED4); DigitalOut d_out(p9); +Thread* debugTH; Serial pc(USBTX, USBRX); @@ -77,6 +78,7 @@ { pc.putc( 0xA ); pc.putc( 0xD ); + pc.printf("debug : message sent to mailbox : %s", message ); OutGoingMail.put( new trame( message ) ); message = ""; c_count = 0; @@ -130,6 +132,7 @@ LPC_TIM2->MR0 = PERIODE/2; } LPC_TIM1->IR |= 1; + debugTH->signal_set(0x1); } else { @@ -141,6 +144,17 @@ } } +void debug( void const *args ) +{ + while( true ) + { + Thread::signal_wait(0x1); + pc.printf( "debug1 sent %d\n\r", d_out ); + } + + +} + bool analyze_state(bool bit) { switch(state) @@ -490,6 +504,8 @@ init_timer1(); init_timer2(); + debugTH = new Thread(debug); + Thread fp( frame_printer ); Thread fs( frame_sender ); Thread ir( inputReceiver );