emlib/src/em_cmu.c
static uint32_t CMU_HFRCODevinfoGet(CMU_HFRCOFreq_TypeDef freq)
{
  switch (freq) {
    /* 1, 2 and 4MHz share the same calibration word */
    case cmuHFRCOFreq_1M0Hz:
    case cmuHFRCOFreq_2M0Hz:
    case cmuHFRCOFreq_4M0Hz:
      return DEVINFO->HFRCOCAL0;

    case cmuHFRCOFreq_7M0Hz:
      return DEVINFO->HFRCOCAL3;

    case cmuHFRCOFreq_13M0Hz:
      return DEVINFO->HFRCOCAL6;

    case cmuHFRCOFreq_16M0Hz:
      return DEVINFO->HFRCOCAL7;

    case cmuHFRCOFreq_19M0Hz:
      return DEVINFO->HFRCOCAL8;

    case cmuHFRCOFreq_26M0Hz:
      return DEVINFO->HFRCOCAL10;

    case cmuHFRCOFreq_32M0Hz:
      return DEVINFO->HFRCOCAL11;

    case cmuHFRCOFreq_38M0Hz:
      return DEVINFO->HFRCOCAL12;

#if defined(_DEVINFO_HFRCOCAL16_MASK)
    case cmuHFRCOFreq_48M0Hz:
      return DEVINFO->HFRCOCAL13;

    case cmuHFRCOFreq_56M0Hz:
      return DEVINFO->HFRCOCAL14;

    case cmuHFRCOFreq_64M0Hz:
      return DEVINFO->HFRCOCAL15;

    case cmuHFRCOFreq_72M0Hz:
      return DEVINFO->HFRCOCAL16;
#endif

    default: /* cmuHFRCOFreq_UserDefined */
      return 0;
  }
}
/**************************************************************************/
/**
 * @brief
 *   Get the HFRCO frequency calibration word in DEVINFO
 *
 * @param[in] freq
 *   Frequency in Hz
 *
 * @return
 *   HFRCO calibration word for a given frequency
 *****************************************************************************/
@brief
Get the HFRCO frequency calibration word in DEVINFO

@param[in] freq
Frequency in Hz

@return
HFRCO calibration word for a given frequency
@brief Get the HFRCO frequency calibration word in DEVINFO @param [ in ] freq Frequency in Hz @return HFRCO calibration word for a given frequency
static uint32_t CMU_HFRCODevinfoGet(CMU_HFRCOFreq_TypeDef freq)
{
  switch (freq) {
    case cmuHFRCOFreq_1M0Hz:
    case cmuHFRCOFreq_2M0Hz:
    case cmuHFRCOFreq_4M0Hz:
      return DEVINFO->HFRCOCAL0;
    case cmuHFRCOFreq_7M0Hz:
      return DEVINFO->HFRCOCAL3;
    case cmuHFRCOFreq_13M0Hz:
      return DEVINFO->HFRCOCAL6;
    case cmuHFRCOFreq_16M0Hz:
      return DEVINFO->HFRCOCAL7;
    case cmuHFRCOFreq_19M0Hz:
      return DEVINFO->HFRCOCAL8;
    case cmuHFRCOFreq_26M0Hz:
      return DEVINFO->HFRCOCAL10;
    case cmuHFRCOFreq_32M0Hz:
      return DEVINFO->HFRCOCAL11;
    case cmuHFRCOFreq_38M0Hz:
      return DEVINFO->HFRCOCAL12;
#if defined(_DEVINFO_HFRCOCAL16_MASK)
    case cmuHFRCOFreq_48M0Hz:
      return DEVINFO->HFRCOCAL13;
    case cmuHFRCOFreq_56M0Hz:
      return DEVINFO->HFRCOCAL14;
    case cmuHFRCOFreq_64M0Hz:
      return DEVINFO->HFRCOCAL15;
    case cmuHFRCOFreq_72M0Hz:
      return DEVINFO->HFRCOCAL16;
#endif
    default: 
      return 0;
  }
}
static uint32_t CMU_HFRCODevinfoGet ( CMU_HFRCOFreq_TypeDef freq ) { switch ( freq ) { case cmuHFRCOFreq_1M0Hz : case cmuHFRCOFreq_2M0Hz : case cmuHFRCOFreq_4M0Hz : return DEVINFO -> HFRCOCAL0 ; case cmuHFRCOFreq_7M0Hz : return DEVINFO -> HFRCOCAL3 ; case cmuHFRCOFreq_13M0Hz : return DEVINFO -> HFRCOCAL6 ; case cmuHFRCOFreq_16M0Hz : return DEVINFO -> HFRCOCAL7 ; case cmuHFRCOFreq_19M0Hz : return DEVINFO -> HFRCOCAL8 ; case cmuHFRCOFreq_26M0Hz : return DEVINFO -> HFRCOCAL10 ; case cmuHFRCOFreq_32M0Hz : return DEVINFO -> HFRCOCAL11 ; case cmuHFRCOFreq_38M0Hz : return DEVINFO -> HFRCOCAL12 ; #if defined ( _DEVINFO_HFRCOCAL16_MASK ) case cmuHFRCOFreq_48M0Hz : return DEVINFO -> HFRCOCAL13 ; case cmuHFRCOFreq_56M0Hz : return DEVINFO -> HFRCOCAL14 ; case cmuHFRCOFreq_64M0Hz : return DEVINFO -> HFRCOCAL15 ; case cmuHFRCOFreq_72M0Hz : return DEVINFO -> HFRCOCAL16 ; #endif default : return 0 ; } }
@brief
   Get the HFRCO frequency calibration word in DEVINFO
@brief Get the HFRCO frequency calibration word in DEVINFO
/* 1, 2 and 4MHz share the same calibration word */ /* cmuHFRCOFreq_UserDefined */