SdFat
Loading...
Searching...
No Matches
Classes | Macros | Functions
DbgLog.h File Reference

Classes for Debug messages. More...

#include "Printable.h"
Include dependency graph for DbgLog.h:

Classes

class  Bin
 Print binary with byte and nibble separators. More...
 
class  Dbl
 Print floating point with precision. More...
 
class  Hex
 Print in hex format. More...
 
class  Num
 Print 64-bit print, lower case hex, alt binary or precision. More...
 

Macros

#define DBG_FILE   __FILE__
 
#define DBG_LOG_PORT   Serial
 
#define DBG_MSG(...)
 
#define ENABLE_DBG_MSG   1
 
#define NUM64_HEX_A   'a'
 

Functions

size_t logmsg ()
 
size_t logmsg (bool b)
 
template<typename T >
size_t logmsg (T arg)
 
template<typename T , typename... Types>
size_t logmsg (T var1, Types... vars)
 
template<typename... Types>
size_t logmsgln (Types... vars)
 

Detailed Description

Classes for Debug messages.

Copyright (c) 2011-2025 Bill Greiman This file is part of the SdFat library for SD memory cards.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Macro Definition Documentation

◆ DBG_FILE

#define DBG_FILE   __FILE__

Filename to print in message.

◆ DBG_LOG_PORT

#define DBG_LOG_PORT   Serial

Port for debug messages

◆ DBG_MSG

#define DBG_MSG ( ...)

Macro for debug messages

◆ ENABLE_DBG_MSG

#define ENABLE_DBG_MSG   1

Enable or disable debug messages

◆ NUM64_HEX_A

#define NUM64_HEX_A   'a'

Character used in Num class for HEX format

Function Documentation

◆ logmsg() [1/4]

size_t logmsg ( )
inline
Returns
Zero to end recursive template

◆ logmsg() [2/4]

size_t logmsg ( bool b)
inline
Parameters
[in]bItem to print.
Returns
Number of bytes printed.

◆ logmsg() [3/4]

template<typename T >
size_t logmsg ( T arg)
inline
Parameters
[in]argItem to print.
Returns
Number of bytes printed.

◆ logmsg() [4/4]

template<typename T , typename... Types>
size_t logmsg ( T var1,
Types... vars )
inline
Parameters
[in]var1Next item to print.
[in]varsRest of items to print.
Returns
number of bytes printed.

◆ logmsgln()

template<typename... Types>
size_t logmsgln ( Types... vars)
inline
Parameters
[in]varsList of items to print.
Returns
number of bytes printed.