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: main.cpp
- Revision:
- 3:9658e127c4f8
- Parent:
- 2:a4a73ba6f492
- Child:
- 4:e0ca69606fdf
diff -r a4a73ba6f492 -r 9658e127c4f8 main.cpp
--- a/main.cpp Mon Oct 23 15:56:24 2017 +0000
+++ b/main.cpp Mon Oct 23 18:45:55 2017 +0000
@@ -12,6 +12,8 @@
Serial pc(USBTX,USBRX);
+Ticker ticker;
+
char test[5]={0x01,0x01,0x01,0x01,0x01};
@@ -21,7 +23,7 @@
Thread receiveBitThread;
Thread receiveCharThread;
-Ticker ticker;
+
void interruptRise()
@@ -41,18 +43,19 @@
}
+
int main()
{
+
led1=1;
- in.rise(&interruptRise);
- in.fall(&interruptFall);
- wait(1);
sendCharThread.start(&sendChar);
receiveBitThread.start(&receiveBit);
receiveCharThread.start(&receiveChar);
sendDataThread.start(&sendData);
+ ticker.attach(&wake,T/2.0);
wait(1);
- ticker.attach(&wake,T/2.0);
+ in.rise(&interruptRise);
+ in.fall(&interruptFall);
createTrame(test,5);
while(1) {