Zoltan Hudak / USBHost-STM32F4

Dependents:   STM32F407VET6_USBHostMSD STM32F407VET6_USBHostMouse STM32F407VET6_USBHostKeyboard STM32F407VET6_USBHostMSD_1

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mydebug.h Source File

mydebug.h

00001 #pragma once
00002 template<class SERIAL_T>
00003 void debug_hex(SERIAL_T& pc, const uint8_t* buf, int size)
00004 {
00005     for(int i = 0; i < size; i++) {
00006         pc.printf("%02x ", buf[i]);
00007         if (i%16 == 15) {
00008             pc.puts("\n");
00009         }
00010     }
00011     pc.puts("\n");
00012 }
00013