Skip to content

Commit

Permalink
Add config INIT_MSG_DISABLE
Browse files Browse the repository at this point in the history
- This control has been added to hide initialization status (during success) in DEBUG_ERR mode
- By default, it is commented out (ie. successful initialization reports a status message during DEBUG_ERR)
  • Loading branch information
ImpulseAdventure committed Jan 15, 2019
1 parent 8b2c735 commit b60f841
Show file tree
Hide file tree
Showing 29 changed files with 202 additions and 0 deletions.
7 changes: 7 additions & 0 deletions configs/ard-adagfx-hx8357-ft6206.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-hx8357-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-hx8357-simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-hx8357-stmpe610.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-ili9341-ft6206.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-ili9341-input.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-ili9341-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-ili9341-simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-ili9341-stmpe610.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-mcufriend-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-mcufriend-simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-pcd8544-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-shld-tft18v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-ssd1306-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ard-adagfx-st7735-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/esp-tftespi-default-ft6206.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/esp-tftespi-default-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/esp-tftespi-default-simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/esp-tftespi-default-stmpe610.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/esp-tftespi-default-xpt2046.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/linux-sdl1-default-mouse.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/m5-m5-default-btn3.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/m5-m5-default-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/misc-adagfx-shld-featherwing24.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/rpi-sdl1-default-tslib.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions configs/ttgo-adagfx-ili9341-notouch.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ extern "C" {
// confirmed basic operation of the library is successful.
#define DEBUG_ERR 1 // 1 to enable, 0 to disable

// Debug initialization message
// - By default, GUIslice outputs a message in DEBUG_ERR mode
// to indicate the initialization status, even during success.
// - To disable the messages during successful initialization,
// uncomment the following line.
//#define INIT_MSG_DISABLE

// -----------------------------------------------------------------------------
// Optional Features
// -----------------------------------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions src/GUIslice.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ bool gslc_Init(gslc_tsGui* pGui,void* pvDriver,gslc_tsPage* asPage,uint8_t nMaxP
bool bTouchOk = true;

// Provide indication that debug messaging is active
#if !defined(INIT_MSG_DISABLE)
GSLC_DEBUG_PRINT("GUIslice version [%s]:\n", gslc_GetVer(pGui));
#endif

pGui->eInitStatTouch = GSLC_INITSTAT_UNDEF;

Expand Down Expand Up @@ -168,7 +170,9 @@ bool gslc_Init(gslc_tsGui* pGui,void* pvDriver,gslc_tsPage* asPage,uint8_t nMaxP
if (bOk) {
bOk &= gslc_DrvInit(pGui);
if (bOk) {
#if !defined(INIT_MSG_DISABLE)
GSLC_DEBUG_PRINT("- Initialized display handler OK\n", "");
#endif
} else {
GSLC_DEBUG_PRINT("- Initialized display handler FAIL\n", "");
}
Expand All @@ -184,7 +188,9 @@ bool gslc_Init(gslc_tsGui* pGui,void* pvDriver,gslc_tsPage* asPage,uint8_t nMaxP
// not enabled)
bTouchOk &= gslc_InitTouch(pGui,GSLC_DEV_TOUCH);
if (bTouchOk) {
#if !defined(INIT_MSG_DISABLE)
GSLC_DEBUG_PRINT("- Initialized touch handler OK\n", "");
#endif
pGui->eInitStatTouch = GSLC_INITSTAT_ACTIVE;
} else {
GSLC_DEBUG_PRINT("- Initialized touch handler FAIL\n", "");
Expand Down
Loading

0 comments on commit b60f841

Please sign in to comment.