Serial.print() improvements

long long n;
Serial.print(&n, HEX);

while it appears that there is support for a 64-bit long long, Serial.print does not support it. And Serial.print(&n, HEX) claims an ambiguous resolution. Is there a serial.print(void*, fat) call?

What would it take to get these added?

Are you sure that you actually need a 64bit data type? If so then try to print it as two 32-bit values:

long long n;

//Method 1

//High DWORD
Serial.print((unsigned long)((n >> 32) & ALLBITS32), HEX);

Serial.print((unsigned long)(n & ALLBITS32), HEX);

//Method 2
unsigned long two32[2];
memcpy(&two32, &n, sizeof(n));
Serial.print(two32[0], HEX);
Serial.print(two32[1], HEX);

Method 1 is faster, but may be more confusing.

EDIT: Swapped &n and &two32!

Discussed in the passed several times e.g. -