1
0
forked from fsfw/fsfw

printf support for array printer

This commit is contained in:
2021-01-15 16:32:25 +01:00
parent f69d6d49c7
commit 05508418a7
2 changed files with 95 additions and 51 deletions

View File

@ -1,20 +1,24 @@
#ifndef FRAMEWORK_GLOBALFUNCTIONS_ARRAYPRINTER_H_
#define FRAMEWORK_GLOBALFUNCTIONS_ARRAYPRINTER_H_
#include <cstdint>
#include <cstddef>
enum class OutputType {
DEC,
HEX,
BIN
DEC,
HEX,
BIN
};
//! TODO: Write unit tests for this module.
namespace arrayprinter {
void print(const uint8_t* data, size_t size, OutputType type = OutputType::HEX,
bool printInfo = true, size_t maxCharPerLine = 12);
bool printInfo = true, size_t maxCharPerLine = 12);
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);
void printBin(const uint8_t* data, size_t size);
}
#endif /* FRAMEWORK_GLOBALFUNCTIONS_ARRAYPRINTER_H_ */