FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Class recording I2C status notifications for later output. More...
#include <fastarduino/i2c_status.h>
Public Member Functions | |
I2CStatusRecorder (STATUS trace=STATUS::TRACE_ALL) | |
Create an I2CStatusRecorder that can record I2C status notifications determined by trace . More... | |
void | reset () |
Clear all recorded notifications. More... | |
template<typename OSTREAM > | |
void | trace (OSTREAM &out, bool hex_status=true) |
Output all recorded I2C status notifications to out then clear all records. More... | |
Class recording I2C status notifications for later output.
SIZE | the maximum number of notifications to record (each notification is 2 bytes) |
Definition at line 60 of file i2c_status.h.
|
inlineexplicit |
Create an I2CStatusRecorder that can record I2C status notifications determined by trace
.
list. The number of recorded notifications is limited by SIZE
. Once SIZE
notifications have been recorded by this I2CStatusRecorder, any additional notification will be trashed. To be effective, this must be attached to an I2C Manager (at construction time). Recorded notifications can be output to a streams::ostream
with trace()
.
trace | the list of notifications to be recorded |
Definition at line 77 of file i2c_status.h.
|
inline |
|
inline |
Output all recorded I2C status notifications to out
then clear all records.
out | the streams::ostream to output traces to |
hex_status | if true (the default), status values will be displayed in hexadecimal, otherwise status name will be displayed |
Definition at line 96 of file i2c_status.h.