test

Dependencies:   SDFileSystem mbed-dev

Fork of Nucleo_Ex06_EMU by woodstock .

USBHost/mydebug.h

Committer:
charliex
Date:
2017-05-27
Revision:
4:53ef91c87d74
Parent:
0:3dac1f1bc9e0

File content as of revision 4:53ef91c87d74:

#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");
}