SparkFun SSD168x Library  v1.0.2
Library for SSD1680 / SSD1681 e-paper displays on SPI
Loading...
Searching...
No Matches
SparkFun_SSD168x::SfeDebugPrint Class Reference

#include <sfe_debug.h>

Inheritance diagram for SparkFun_SSD168x::SfeDebugPrint:

Public Member Functions

void enableDebugging (sfe_print_t &debugPort, bool printLimitedDebug=false)
 Enable debug messages, sent to the given port. More...
 
void disableDebugging (void)
 Turn off debug message printing. More...
 
void debugPrint (const char *message, bool important=false)
 Print a debug message (no trailing newline), if debugging is enabled. More...
 
void debugPrint (uint32_t value, bool important=false)
 Print a debug value in decimal (no trailing newline), if debugging is enabled. More...
 
void debugPrint (uint32_t value, int printBase, bool important=false)
 Print a debug value in a given base (no trailing newline), if debugging is enabled. More...
 
void debugPrintln (const char *message, bool important=false)
 Print a debug message followed by a newline, if debugging is enabled. More...
 
void debugPrintln (uint32_t value, bool important=false)
 Print a debug value in decimal followed by a newline, if debugging is enabled. More...
 
void debugPrintln (uint32_t value, int printBase, bool important=false)
 Print a debug value in a given base followed by a newline, if debugging is enabled. More...
 
void debugPrintln (void)
 Print a blank debug line, if debugging is enabled and not in limited-debug mode. More...
 
void copyDebugStateFrom (const SfeDebugPrint &other)
 Copy debug state (output stream and enabled flags) from another SfeDebugPrint. More...
 

Protected Attributes

SfePrint _debugSerial
 
bool _printDebug = false
 
bool _printLimitedDebug = false
 

Member Function Documentation

◆ copyDebugStateFrom()

void SparkFun_SSD168x::SfeDebugPrint::copyDebugStateFrom ( const SfeDebugPrint &  other)
inline

Copy debug state (output stream and enabled flags) from another SfeDebugPrint.

Parameters
otherThe SfeDebugPrint object whose debug state to copy.

◆ debugPrint() [1/3]

void SfeDebugPrint::debugPrint ( const char *  message,
bool  important = false 
)

Print a debug message (no trailing newline), if debugging is enabled.

A no-op unless _printDebug is true; further suppressed if _printLimitedDebug is true and 'important' is false - see enableDebugging().

Parameters
messageNull-terminated string to print.
importantIf true, print even when limited debugging is active. Defaults to false.

◆ debugPrint() [2/3]

void SfeDebugPrint::debugPrint ( uint32_t  value,
bool  important = false 
)

Print a debug value in decimal (no trailing newline), if debugging is enabled.

Parameters
valueThe value to print.
importantIf true, print even when limited debugging is active. Defaults to false.

◆ debugPrint() [3/3]

void SfeDebugPrint::debugPrint ( uint32_t  value,
int  printBase,
bool  important = false 
)

Print a debug value in a given base (no trailing newline), if debugging is enabled.

Parameters
valueThe value to print.
printBaseNumber base to print in (e.g. HEX, DEC).
importantIf true, print even when limited debugging is active. Defaults to false.

◆ debugPrintln() [1/4]

void SfeDebugPrint::debugPrintln ( const char *  message,
bool  important = false 
)

Print a debug message followed by a newline, if debugging is enabled.

Parameters
messageNull-terminated string to print.
importantIf true, print even when limited debugging is active. Defaults to false.

◆ debugPrintln() [2/4]

void SfeDebugPrint::debugPrintln ( uint32_t  value,
bool  important = false 
)

Print a debug value in decimal followed by a newline, if debugging is enabled.

Parameters
valueThe value to print.
importantIf true, print even when limited debugging is active. Defaults to false.

◆ debugPrintln() [3/4]

void SfeDebugPrint::debugPrintln ( uint32_t  value,
int  printBase,
bool  important = false 
)

Print a debug value in a given base followed by a newline, if debugging is enabled.

Parameters
valueThe value to print.
printBaseNumber base to print in (e.g. HEX, DEC).
importantIf true, print even when limited debugging is active. Defaults to false.

◆ debugPrintln() [4/4]

void SfeDebugPrint::debugPrintln ( void  )

Print a blank debug line, if debugging is enabled and not in limited-debug mode.

◆ disableDebugging()

void SparkFun_SSD168x::SfeDebugPrint::disableDebugging ( void  )
inline

Turn off debug message printing.

◆ enableDebugging()

void SparkFun_SSD168x::SfeDebugPrint::enableDebugging ( sfe_print_t &  debugPort,
bool  printLimitedDebug = false 
)
inline

Enable debug messages, sent to the given port.

Parameters
debugPortThe port to print debug messages to (Arduino: a Print, e.g. Serial. ESP-IDF: an SfeOutput, e.g. SparkFun_SSD168x::sfeStdout).
printLimitedDebugIf true, only print messages flagged as "important". Defaults to false (print everything).

Member Data Documentation

◆ _debugSerial

SfePrint SparkFun_SSD168x::SfeDebugPrint::_debugSerial
protected

◆ _printDebug

bool SparkFun_SSD168x::SfeDebugPrint::_printDebug = false
protected

◆ _printLimitedDebug

bool SparkFun_SSD168x::SfeDebugPrint::_printLimitedDebug = false
protected

The documentation for this class was generated from the following files: