/* This function is to convert unicode hex number to a UINT8. */
EFI_STATUS PxeBcUniHexToUint8(OUT UINT8 *Digit, IN CHAR16 Char)
/* This function is to convert unicode hex number to a UINT8. */
EFI_STATUS PxeBcUniHexToUint8(OUT UINT8 *Digit, IN CHAR16 Char)
{
  if ((Char >= L'0') && (Char <= L'9')) {
    *Digit = (UINT8)(Char - L'0');
    return EFI_SUCCESS;
  }
  if ((Char >= L'A') && (Char <= L'F')) {
    *Digit = (UINT8)(Char - L'A' + 0x0A);
    return EFI_SUCCESS;
  }
  if ((Char >= L'a') && (Char <= L'f')) {
    *Digit = (UINT8)(Char - L'a' + 0x0A);
    return EFI_SUCCESS;
  }
  return EFI_INVALID_PARAMETER;
}