/* Helper function to convert a sequence of 2 characters that represent a hexadecimal value to the actual byte value. Example: SRecParserHexStringToByte("2f") --> returns 47.  */
static uint8_t SRecParserHexStringToByte(char const *hexstring)
/* Helper function to convert a sequence of 2 characters that represent a hexadecimal value to the actual byte value. Example: SRecParserHexStringToByte("2f") --> returns 47.  */
static uint8_t SRecParserHexStringToByte(char const *hexstring)
{
  uint8_t result = 0;
  int32_t c;
  uint8_t counter;
  assert(hexstring != NULL);
  if (hexstring != NULL)
  {
    for (counter = 0; counter < 2u; counter++)
    {
      c = toupper((int32_t)(hexstring[counter]));
      if (isxdigit(c))
      {
        c -= '0';
        if (c > 9)
        {
          c -= 7;
        }
        result = (uint8_t)((result << 4u) + c);
      }
    }
  }
  return result;
}