Converts keystrokes to Morse code - Morse is transmitted on a background thread. updated for mbed os 5.4

Files at this revision

API Documentation at this revision

Comitter:
noutram
Date:
Thu Mar 30 14:28:41 2017 +0000
Parent:
3:423191a375dc
Commit message:
updated for mbed os 5.4

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Mar 09 10:12:51 2016 +0000
+++ b/main.cpp	Thu Mar 30 14:28:41 2017 +0000
@@ -1,5 +1,5 @@
 #include "mbed.h"
-#include "rtos.h"
+
 #include "string.h"
 #include <stdio.h>
 #include <ctype.h>
@@ -150,7 +150,7 @@
     return cc;
 }
 
-void morseGenerator( const void* arg ) 
+void morseGenerator() 
 {
     while (true) {
         
@@ -207,6 +207,8 @@
 
 //Main thread
 int main() {
+    Thread writer;
+    
     redLED    = 0;
     yellowLED = 0;
     greenLED  = 0;
@@ -222,7 +224,7 @@
     
     
     //Thread for outputting mors
-    Thread writer(morseGenerator);
+    writer.start(morseGenerator);
     
     pc.printf("Type characters to send\n");
     while (true) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Thu Mar 30 14:28:41 2017 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#50b3418e45484ebf442b88cd935a2d5355402d7d
--- a/mbed-rtos.lib	Wed Mar 09 10:12:51 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#b4c5542476ba
--- a/mbed.bld	Wed Mar 09 10:12:51 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/252557024ec3
\ No newline at end of file