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 VLC_decoder_test by
Revision 4:7ef585175a7b, committed 2018-05-15
- Comitter:
- JelleRaes
- Date:
- Tue May 15 08:31:13 2018 +0000
- Parent:
- 3:4fad63952e4c
- Commit message:
- with timeout;
Changed in this revision
| manchester.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/manchester.cpp Tue May 15 08:05:16 2018 +0000
+++ b/manchester.cpp Tue May 15 08:31:13 2018 +0000
@@ -4,7 +4,7 @@
DigitalIn signal(p7);
Serial pc(USBTX, USBRX);
Timer timer;
-//Timeout timeout;
+Timeout timeout;
int datal[] = {1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0};
bool notTimedOut;
@@ -33,9 +33,9 @@
wait_us(100);
}
i = 0;
- //timeout.attach(callback(this,&manchester::isTimedOut), 3);
+ timeout.attach(callback(this,&manchester::isTimedOut), 3);
//pc.printf("start clockcalculation\r\n");
- while(i<4 ) {
+ while(i<4 && notTimedOut) {
end = begin;
previous = current;
current = signal.read();
