Utility function declarations. More...
#include <Arduino.h>
Go to the source code of this file.
Macros | |
#define | assert(e) ((e) ? (void)0 : assertSerial(__func__, __FILE__, __LINE__, F(#e))) |
Macro to assert using FlashStringHelper to reduce memory usage. More... | |
Enumerations | |
enum | endl { endl } |
Special type to allow Serial << endl to print a line and flush the stream. More... | |
Functions | |
void | assertSerial (const char *func, const char *file, int lineno, const __FlashStringHelper *exp) |
Output assertion to Serial when the assertion expression is false. More... | |
template<typename T > | |
Print & | operator<< (Print &p, const T o) |
Output a specific type to the Print stream. More... | |
Print & | operator<< (Print &p, enum endl) |
Special stream operator for turning Serial << endl into new line and stream flush. More... | |
Utility function declarations.
The Utils module defines general utilities. An assert(bool-expression) that outputs to Serial if its false and print-stream << operators to make it easier to output to the Serial object using C++ style stream output operations.
Definition in file Utils.h.
#define assert | ( | e | ) | ((e) ? (void)0 : assertSerial(__func__, __FILE__, __LINE__, F(#e))) |
Macro to assert using FlashStringHelper to reduce memory usage.
If the boolean expression is false, then an assertion error is output to Serial including the function name, source file, line number and the expression itself.
e | A boolean expression evaluating to true/false. |
enum endl |
void assertSerial | ( | const char * | func, |
const char * | file, | ||
int | lineno, | ||
const __FlashStringHelper * | exp | ||
) |
|
inline |
|
inline |
Special stream operator for turning Serial << endl into new line and stream flush.
p | The print-stream to output a new line and flush. |
endl | The special endl enumeration type |
Serial << x << y << z;
).