17 #if !defined(__PRINTHEX_H__)
18 #define __PRINTHEX_H__
20 #if defined(ARDUINO) && ARDUINO >=100
29 int num_nibbles =
sizeof(
T) * 2;
32 char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0f);
35 }
while(--num_nibbles);
40 for(
T mask = (((
T) 1) << ((
sizeof(
T) << 3) - 1)); mask; mask >>= 1)
49 int num_nibbles =
sizeof(
T) * 2;
52 char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0f);
55 }
while(--num_nibbles);
60 T mask = (((
T) 1) << (((
sizeof(
T) << 1) - 1) << 2));
68 prn->print((
T) val, HEX);
71 #endif // __PRINTHEX_H__