SyntaxFix
Write A Post
Hire A Developer
Questions
Try below block of code, its working for me.
char *p = "0x820"; uint16_t intVal; sscanf(p, "%x", &intVal); printf("value x: %x - %d", intVal, intVal);
Output is:
value x: 820 - 2080