Charles Tritt / Mbed OS 21_SerialPass_v5
Revision:
116:8990686eedf5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/whiteText.cpp	Sun Oct 17 02:15:18 2021 +0000
@@ -0,0 +1,22 @@
+/* File: whiteText.cpp
+
+This function uses ANSI/VT100 escapse sequences to change text to blue. Serial
+object must be passed by reference (since it is physically unique and can't be
+copied). The call will look normal as does the usage of pc here.
+
+Created by Dr. C. S. Tritt
+Last revised: 10/16/21 (v. 1.0)
+*/
+
+// Need for mbed use.
+#include "mbed.h"
+
+// Including the myFuncs.h header here will catch mismatches between the
+// declaration and the definition.
+#include "myFuncs.h"
+
+void whiteText(Serial & pc)
+{
+    const char ESC = 27; // Define escape character for escape sequence.
+    pc.printf("%c[37m", ESC); // ANSI/VT100 white text.
+}
\ No newline at end of file