Charles Tritt / Mbed OS 21_SerialPass_v5
Revision:
115:6ba84689e2c9
Child:
116:8990686eedf5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/clrTerm.cpp	Wed Oct 13 13:08:42 2021 +0000
@@ -0,0 +1,13 @@
+/* File: clrTerm.cpp
+
+This function uses ANSI/VT100 escapse sequences to clear the terminal.
+
+Created by Dr. C. S. Tritt
+Last revised: 10/13/21 (v. 1.0)
+*/
+#include "mbed.h"
+
+void clrTerm(Serial *termPort){
+    const char ESC = 27; // Define escape character for escape sequence.
+    termPort->printf("%c[2J%c[H", ESC, ESC); // ANSI/VT100 clear screen/home.
+}
\ No newline at end of file