17 #if !defined(__PRINTHEX_H__)
18 #define __PRINTHEX_H__
20 #if defined(ARDUINO) && ARDUINO >=100
26 #define USB_HOST_SERIAL Serial
33 int num_nibbles =
sizeof(
T) * 2;
36 char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0f);
39 }
while(--num_nibbles);
46 for(
T mask = (((
T) 1) << ((
sizeof(
T) << 3) - 1)); mask; mask >>= 1)
57 int num_nibbles =
sizeof(
T) * 2;
60 char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0f);
63 }
while(--num_nibbles);
70 T mask = (((
T) 1) << (((
sizeof(
T) << 1) - 1) << 2));
78 prn->print((
T) val, HEX);
82 #endif // __PRINTHEX_H__