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.
Diff: DO/DO.cpp
- Revision:
- 5:19a7a0f972cb
- Parent:
- 4:e0ca69606fdf
--- a/DO/DO.cpp Mon Oct 23 20:39:18 2017 +0000 +++ b/DO/DO.cpp Mon Oct 23 21:24:39 2017 +0000 @@ -20,7 +20,6 @@ res = res | (((char)evt.value.p)<<i); } } - queueCharReception.put((char*)res); } @@ -30,12 +29,10 @@ { timer.start(); int oldTime; - bool bitType=true; + bool bitType=false; oldTime = timer.read_ms(); - printf("\n %d \n ",oldTime); while(1) { Thread::signal_wait(0x01); - //printf("\n %d",timer.read_ms()-oldTime); if(timer.read_ms()-oldTime<(T-(T*0.15))*1000){ Thread::signal_wait(0x01); } @@ -43,11 +40,11 @@ bitType=!bitType; } if(bitType) { + pc.putc(0x31); queueBitReception.put((void*)0x01); - pc.putc(0x31); } else { + pc.putc(0x30); queueBitReception.put((void*)0x00); - pc.putc(0x30); } oldTime=timer.read_ms(); } @@ -72,7 +69,7 @@ } -void recieveData() +void receiveData() { osEvent evt; char reception;