/* Convert a single character to number. It assumes the input Char is in the scope of L'0' ~ L'9' and L'A' ~ L'F' */
UINTN BmCharToUint(IN CHAR16 Char)
/* Convert a single character to number. It assumes the input Char is in the scope of L'0' ~ L'9' and L'A' ~ L'F' */
UINTN BmCharToUint(IN CHAR16 Char)
{
  if ((Char >= L'0') && (Char <= L'9')) {
    return (Char - L'0');
  }
  if ((Char >= L'A') && (Char <= L'F')) {
    return (Char - L'A' + 0xA);
  }
  return (UINTN)-1;
}