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:
- 11:8b9668e37646
- Parent:
- 6:da3c4393efee
- Child:
- 12:845639da2f03
--- a/main.cpp Mon May 08 04:16:10 2017 +0000
+++ b/main.cpp Mon May 08 05:06:11 2017 +0000
@@ -10,6 +10,8 @@
RawSerial pc(USBTX, USBRX); // use USB-serial for testing purpose
Mail<char, 2> mbx; // use Mail API to forward data
+Thread ledThred;
+
/**
* @brief ISR code: reception of XBee API frame
@@ -25,14 +27,7 @@
* @brief Main code: initial serial RX handler, then wait for detected frame
*/
int main() {
- pc.attach(rxHandler);
- while (true) {
- osEvent evt = mbx.get();
- if (evt.status == osEventMail) {
- char *mail = (char*)evt.value.p;
- pc.printf("Got %c\n", *mail);
- mbx.free(mail);
- }
- }
+ ledThread.start(led1_thread);
+ while(1);
}
