diff --git a/globalfunctions/printer.cpp b/globalfunctions/printer.cpp new file mode 100644 index 00000000..d6ede0a5 --- /dev/null +++ b/globalfunctions/printer.cpp @@ -0,0 +1,13 @@ +#include +#include + +void printer::print(uint8_t *data, size_t size) { + sif::info << "StorageAccessor: Printing data: ["; + for(size_t i = 0; i < size; i++) { + sif::info << std::hex << (int)data[i]; + if(i < size - 1){ + sif::info << " , "; + } + } + sif::info << " ] " << std::endl; +} diff --git a/globalfunctions/printer.h b/globalfunctions/printer.h new file mode 100644 index 00000000..d4a573e9 --- /dev/null +++ b/globalfunctions/printer.h @@ -0,0 +1,12 @@ +#ifndef FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_ +#define FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_ +#include +#include + +namespace printer { +void print(uint8_t *data, size_t size); +} + + + +#endif /* FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_ */