Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of adf_check_from_shubham_28dec by
Diff: main.cpp
- Revision:
- 6:ff50e2e02680
- Parent:
- 5:0f1594e416ae
- Child:
- 7:20e25489f982
--- a/main.cpp Tue Dec 29 05:14:52 2015 +0000 +++ b/main.cpp Tue Dec 29 06:18:03 2015 +0000 @@ -37,6 +37,7 @@ bool sent_tmfrom_SDcard; bool loop_on; bool ADF_off; +bool done =false; bool buffer_state; uint8_t signal = 0x00; unsigned char bbram_buffer[66]={0x19,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x00,0xF4,0xC2,0x10,0xC0,0x00,0x30,0x31,0x07,0x00,0x01,0x00,0x7F,0x00,0x0B,0x37,0x00,0x00,0x40,0x0C,0x00,0x05,0x00,0x00,0x18,0x12,0x34,0x56,0x10,0x10,0xC4,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00}; @@ -284,8 +285,11 @@ transmitdata(); } } - else{ - wait_ms(20); + else if (ADF_off &&(!done)){ + done=true; + } + else if(done){ +// wait_ms(0); ticker.detach(); gCS_ADF=0; spi.write(0xB1); @@ -293,7 +297,11 @@ gPC.puts("transmission done\r\n"); cout<<counter<<endl; loop_on=false; - } + + } + else{ + cout<<"error in check"<<endl; + } } }