17 #if !defined(__PRINTHEX_H__)
18 #define __PRINTHEX_H__
20 #if defined(ARDUINO) && ARDUINO >=100
26 #ifndef USB_HOST_SERIAL
27 #define USB_HOST_SERIAL Serial
34 int num_nibbles =
sizeof(
T) * 2;
37 char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0f);
40 }
while(--num_nibbles);
45 for(
T mask = (((
T) 1) << ((
sizeof(
T) << 3) - 1)); mask; mask >>= 1)
54 int num_nibbles =
sizeof(
T) * 2;
57 char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0f);
60 }
while(--num_nibbles);
65 T mask = (((
T) 1) << (((
sizeof(
T) << 1) - 1) << 2));
73 prn->print((
T) val, HEX);
78 PrintHex<T>(val, lvl);
85 PrintBin<T>(val, lvl);
91 #endif // __PRINTHEX_H__