25 #if !defined(_usb_h_) || defined(__PRINTHEX_H__) 26 #error "Never include printhex.h directly; include Usb.h instead" 28 #define __PRINTHEX_H__ 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);
76 template <
class T>
void D_PrintHex(
T val __attribute__((unused)),
int lvl __attribute__((unused))) {
78 PrintHex<T > (val, lvl);
85 PrintBin<T > (val, lvl);
91 #endif // __PRINTHEX_H__ void SerialPrintHex(T val)
void PrintBin(T val, int lvl)
void D_PrintBin(T val, int lvl)
void E_Notifyc(char c, int lvl)
void PrintHex(T val, int lvl)
void PrintHex2(Print *prn, T val)
void D_PrintHex(T val, int lvl)