![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
cdms stnd alone isr i2c
Fork of TV_MASTER_I2C_RTOS by
Revision 2:e9b8e19ca9c4, committed 2015-11-03
- Comitter:
- sakthipriya
- Date:
- Tue Nov 03 14:39:32 2015 +0000
- Parent:
- 1:963697dc5199
- Commit message:
- I2C in rtos working....!!!
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 963697dc5199 -r e9b8e19ca9c4 main.cpp --- a/main.cpp Sun Nov 01 13:13:05 2015 +0000 +++ b/main.cpp Tue Nov 03 14:39:32 2015 +0000 @@ -59,7 +59,9 @@ if (write_ack == 1) { + led2 = 1; pc.printf("\n\r data not sent \n"); + led2 = 0; } irpt_2_slv = 0; //pc.printf("\n\r %d \n",t.read_us()); @@ -78,7 +80,9 @@ // pc.printf("\n\rData received from BAE %s \n",data); if (read_ack == 1) { + led2 = 1; pc.printf("\n \r data not received \n"); + led2 = 0; } //if(read_ack == 1) //pc.printf("\n \r data not received \n"); @@ -90,12 +94,12 @@ void FCTN_ISR_I2C() { - led1 = 1; + //led1 = 1; //pc.printf("in isr"); ptr_t_i2c->signal_set(0x1); //test.start(); //wait(0.5); - led1 = 0; + //led1 = 0; } void T_TM(void const * args) @@ -105,10 +109,10 @@ Thread::signal_wait(0x1); // wait(2); //test.stop(); - led2 = 1; + led1 = 1; // wait(3); FCTN_I2C_READ(telemetry,tm_len); - led2 = 0; + led1 = 0; //pc.printf("\n \r %d",test.read_us()); //test.reset(); //irpt_2_slv = 1; @@ -141,7 +145,7 @@ irpt_4m_slv.rise(&FCTN_ISR_I2C); while(1) { - Thread::wait(10000); + Thread::wait(2000); //ptr_t_i2c->signal_set(0x1); pc.printf("\n\rTELEMETRY received from BAE is %d %s \n",t_read.read_us(),telemetry); pc.printf("\n\rHK Data received from BAE is %d %s \n",t_read.read_us(),hk_data);