test
Dependencies: SDFileSystem mbed-dev
Fork of Nucleo_Ex06_EMU by
Diff: USBHost/mydebug.h
- Revision:
- 0:3dac1f1bc9e0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBHost/mydebug.h Sun Apr 03 07:45:29 2016 +0000 @@ -0,0 +1,14 @@ +#pragma once +template<class SERIAL_T> +void debug_hex(SERIAL_T& pc, const uint8_t* buf, int size) +{ + for(int i = 0; i < size; i++) { + pc.printf("%02x ", buf[i]); + if (i%16 == 15) { + pc.puts("\n"); + } + } + pc.puts("\n"); +} + +