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

Revision:
4:1c9fde2d3d2d
Parent:
3:423191a375dc
--- 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) {