Merge branch 'mueller_globalPrinter' into mueller_framework

This commit is contained in:
Robin Müller 2020-05-15 18:23:45 +02:00
commit 5ac32b14f0
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#include <framework/globalfunctions/printer.h>
#include <framework/serviceinterface/ServiceInterfaceStream.h>
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;
}

12
globalfunctions/printer.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_
#define FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_
#include <cstdint>
#include <cstddef>
namespace printer {
void print(uint8_t *data, size_t size);
}
#endif /* FRAMEWORK_GLOBALFUNCTIONS_PRINTER_H_ */