#define SCNx16 "x" 

hexadecimal scanf format for uint16_t