global printer function
This commit is contained in:
parent
6dc05e4951
commit
effac0e9b7
13
globalfunctions/printer.cpp
Normal file
13
globalfunctions/printer.cpp
Normal 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
12
globalfunctions/printer.h
Normal 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_ */
|
Loading…
Reference in New Issue
Block a user