My implementation of VT100 ESC-sequence utility

Files at this revision

API Documentation at this revision

Comitter:
Rhyme
Date:
Thu Feb 08 01:12:39 2018 +0000
Parent:
2:b7229a9eae1c
Child:
4:d2c3bf5d00f4
Commit message:
runStateMachine() started working

Changed in this revision

vt100.cpp Show annotated file Show diff for this revision Revisions of this file
vt100.h Show annotated file Show diff for this revision Revisions of this file
--- a/vt100.cpp	Sun Aug 02 14:02:50 2015 +0000
+++ b/vt100.cpp	Thu Feb 08 01:12:39 2018 +0000
@@ -13,13 +13,18 @@
 
 char ESC = '\033' ;
 
-vt100::vt100(int baud)
+extern serial_t stdio_uart ;
+vt100::vt100(int baud) : Serial(USBTX, USBRX, baud) 
 {
-   extern serial_t stdio_uart ;
-   serial_baud(&stdio_uart, baud) ;
+//   extern serial_t stdio_uart ;
+//   serial_baud(&stdio_uart, baud) ;
 }
 
-vt100::~vt100()
+vt100::vt100(PinName tx_pin, PinName rx_pin, int baud) :Serial(tx_pin, rx_pin, baud) 
+{
+}
+    
+vt100::~vt100(void)
 {
 }
 
--- a/vt100.h	Sun Aug 02 14:02:50 2015 +0000
+++ b/vt100.h	Thu Feb 08 01:12:39 2018 +0000
@@ -1,5 +1,6 @@
 #ifndef VT100_H
 #define VT100_H included
+#include "mbed.h"
 
 /** vt100 class
  * Utility for handling text/letter on a terminal
@@ -31,13 +32,15 @@
  *  writing one for myself anyway.
  */
 
-class vt100 {
+class vt100 : public Serial {
 public:
     /** constructor 
      * @param baud baud rate
      */
     vt100(int baud = 115200) ;
     
+    vt100(PinName tx_pin, PinName rx_pin, int baud=115200) ;
+    
     /** destructor */
     ~vt100(void) ;