aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/sys_options.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-03-04 14:14:15 +1000
committerinmarket <andrewh@inmarket.com.au>2014-03-04 14:14:15 +1000
commitc1105485079fba97a62df62baeff3a4dcc7686ef (patch)
tree541731c9c4431ad81728122df90c2b2f77b6a03a /src/gwin/sys_options.h
parent43527de2c09eb90e5c1cebbce587b5da2bda957d (diff)
downloaduGFX-c1105485079fba97a62df62baeff3a4dcc7686ef.tar.gz
uGFX-c1105485079fba97a62df62baeff3a4dcc7686ef.tar.bz2
uGFX-c1105485079fba97a62df62baeff3a4dcc7686ef.zip
Add support for ANSI like escape sequences to control display color and attributes in a GWIN console.
Updated the console demo to demonstrate this.
Diffstat (limited to 'src/gwin/sys_options.h')
-rw-r--r--src/gwin/sys_options.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gwin/sys_options.h b/src/gwin/sys_options.h
index 02467916..e7bb93b4 100644
--- a/src/gwin/sys_options.h
+++ b/src/gwin/sys_options.h
@@ -160,6 +160,25 @@
#define GWIN_CONSOLE_USE_FLOAT FALSE
#endif
/**
+ * @brief Console windows support escape sequences to control display
+ * @details Defaults to FALSE
+ *
+ * @note
+ * Currently supported:
+ * ESC color Change subsequent text color
+ * color: "0" = black, "1" = red, "2" = green, "3" = yellow, "4" = blue,
+ * "5" = magenta, "6" = cyan, "7" = white
+ * ESC C Revert subsequent text color to the window default
+ * ESC u Turn on underline
+ * ESC U Turn off underline
+ * ESC b Turn on bold
+ * ESC B Turn off bold
+ * ESC J Clear the window
+ */
+ #ifndef GWIN_CONSOLE_ESCSEQ
+ #define GWIN_CONSOLE_ESCSEQ FALSE
+ #endif
+ /**
* @brief Console Windows need BaseStreamSequential support (ChibiOS only)
* @details Defaults to FALSE
* @note To use the ChibiOS basestream functions such as chprintf()