97. Convert Hexadecimal String to Integer Without strtol or sscanf functions
In embedded systems, you often receive hex strings from serial terminals or config files, like "1A3F", and need to convert them into integers — without using strtol(), sscanf(), or other library functions.
Your task is to:
Read a hex string of up to 4 characters (e.g., "1A3F")
Convert it into a uint16_t integer
Handle both uppercase and lowercase (e.g., "af" = "AF" = 175)