emlib/src/em_system.c
bool SYSTEM_GetCalibrationValue(volatile uint32_t *regAddress)
{
  SYSTEM_CalAddrVal_TypeDef * p, * end;

  p   = (SYSTEM_CalAddrVal_TypeDef *)(DEVINFO_BASE & 0xFFFFF000);
  end = (SYSTEM_CalAddrVal_TypeDef *)DEVINFO_BASE;

  for (; p < end; p++) {
    if (p->address == 0xFFFFFFFF) {
      /* Found table terminator */
      return false;
    }
    if (p->address == (uint32_t)regAddress) {
      *regAddress = p->calValue;
      return true;
    }
  }
  /* Nothing found for regAddress */
  return false;
}
/***************************************************************************/
/**
 * @brief
 *    Get factory calibration value for a given peripheral register.
 *
 * @param[in] regAddress
 *    Peripheral calibration register address to get calibration value for. If
 *    a calibration value is found then this register is updated with the
 *    calibration value.
 *
 * @return
 *    True if a calibration value exists, false otherwise.
 ******************************************************************************/
@brief
Get factory calibration value for a given peripheral register.

@param[in] regAddress
Peripheral calibration register address to get calibration value for. If
a calibration value is found then this register is updated with the
calibration value.

@return
True if a calibration value exists, false otherwise.
@brief Get factory calibration value for a given peripheral register . @param [ in ] regAddress Peripheral calibration register address to get calibration value for . If a calibration value is found then this register is updated with the calibration value . @return True if a calibration value exists false otherwise .
bool SYSTEM_GetCalibrationValue(volatile uint32_t *regAddress)
{
  SYSTEM_CalAddrVal_TypeDef * p, * end;
  p   = (SYSTEM_CalAddrVal_TypeDef *)(DEVINFO_BASE & 0xFFFFF000);
  end = (SYSTEM_CalAddrVal_TypeDef *)DEVINFO_BASE;
  for (; p < end; p++) {
    if (p->address == 0xFFFFFFFF) {
      return false;
    }
    if (p->address == (uint32_t)regAddress) {
      *regAddress = p->calValue;
      return true;
    }
  }
  return false;
}
bool SYSTEM_GetCalibrationValue ( volatile uint32_t * regAddress ) { SYSTEM_CalAddrVal_TypeDef * p , * end ; p = ( SYSTEM_CalAddrVal_TypeDef * ) ( DEVINFO_BASE & 0xFFFFF000 ) ; end = ( SYSTEM_CalAddrVal_TypeDef * ) DEVINFO_BASE ; for ( ; p < end ; p ++ ) { if ( p -> address == 0xFFFFFFFF ) { return false ; } if ( p -> address == ( uint32_t ) regAddress ) { * regAddress = p -> calValue ; return true ; } } return false ; }
@brief
    Get factory calibration value for a given peripheral register.
@brief Get factory calibration value for a given peripheral register .
/* Found table terminator */ /* Nothing found for regAddress */