The string variable will contain a hexadecimal, which we need to safely place in the uint16_t
?
Example:
String hexa = "0x11A0";
uint16_t num = ???;
Remember, I dont need to conversion to decimal here.
i.e. my requirement is, unint16_t num = 0x11A0;
. I need to convert to an unint16_t
from a hexadecimal.
unint16_t
can contain 0x11A0
, but however my problem is that I cant get the value from a string variable and save it in unint16_t
.