2020-05-11 12:22:06 +02:00
|
|
|
#ifndef FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_
|
|
|
|
#define FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_
|
|
|
|
#include <cstdint>
|
|
|
|
#include <cstddef>
|
|
|
|
|
|
|
|
namespace printer {
|
|
|
|
|
2020-05-15 18:46:58 +02:00
|
|
|
enum class OutputType {
|
|
|
|
DEC,
|
2020-05-19 23:07:28 +02:00
|
|
|
HEX,
|
|
|
|
BIN
|
2020-05-15 18:46:58 +02:00
|
|
|
};
|
2020-05-11 12:22:06 +02:00
|
|
|
|
2020-05-19 20:24:58 +02:00
|
|
|
void print(const uint8_t* data, size_t size, OutputType type = OutputType::HEX,
|
2020-05-19 19:53:10 +02:00
|
|
|
bool printInfo = true, size_t maxCharPerLine = 12);
|
2020-05-19 20:24:58 +02:00
|
|
|
void printHex(const uint8_t* data, size_t size, size_t maxCharPerLine = 12);
|
|
|
|
void printDec(const uint8_t* data, size_t size, size_t maxCharPerLine = 12);
|
2020-05-19 23:07:28 +02:00
|
|
|
void printBin(const uint8_t* data, size_t size);
|
2020-05-15 18:46:58 +02:00
|
|
|
}
|
2020-05-11 12:22:06 +02:00
|
|
|
|
|
|
|
#endif /* FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_ */
|