USBHost/mydebug.h@0:42b8e1bc6235, 2017-08-22 (annotated)
- Committer:
- nhiro3303
- Date:
- Tue Aug 22 06:18:15 2017 +0000
- Revision:
- 0:42b8e1bc6235
ps3 test library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nhiro3303 | 0:42b8e1bc6235 | 1 | #pragma once |
nhiro3303 | 0:42b8e1bc6235 | 2 | template<class SERIAL_T> |
nhiro3303 | 0:42b8e1bc6235 | 3 | void debug_hex(SERIAL_T& pc, const uint8_t* buf, int size) |
nhiro3303 | 0:42b8e1bc6235 | 4 | { |
nhiro3303 | 0:42b8e1bc6235 | 5 | for(int i = 0; i < size; i++) { |
nhiro3303 | 0:42b8e1bc6235 | 6 | pc.printf("%02x ", buf[i]); |
nhiro3303 | 0:42b8e1bc6235 | 7 | if (i%16 == 15) { |
nhiro3303 | 0:42b8e1bc6235 | 8 | pc.puts("\n"); |
nhiro3303 | 0:42b8e1bc6235 | 9 | } |
nhiro3303 | 0:42b8e1bc6235 | 10 | } |
nhiro3303 | 0:42b8e1bc6235 | 11 | pc.puts("\n"); |
nhiro3303 | 0:42b8e1bc6235 | 12 | } |
nhiro3303 | 0:42b8e1bc6235 | 13 |