emlib/src/em_cmu.c
static uint32_t usbRateClkGet(void)
{
  uint32_t ret;
  CMU_Select_TypeDef clk;

  clk = CMU_ClockSelectGet(cmuClock_USBR);

  switch (clk) {
    case cmuSelect_USHFRCO:
      ret = ushfrcoFreq;
      break;

    case cmuSelect_HFXO:
      ret = SystemHFXOClockGet();
      break;

    case cmuSelect_HFXOX2:
      ret = 2u * SystemHFXOClockGet();
      break;

    case cmuSelect_HFRCO:
      ret = SystemHfrcoFreq;
      break;

    case cmuSelect_LFXO:
      ret = SystemLFXOClockGet();
      break;

    case cmuSelect_LFRCO:
      ret = SystemLFRCOClockGet();
      break;

    default:
      EFM_ASSERT(0);
      ret = 0;
      break;
  }
  return ret;
}
/***************************************************************************/
/**
 * @brief
 *   Get the USB rate clock frequency
 *
 * @return
 *   USB rate clock frequency in Hz
 ******************************************************************************/
@brief
Get the USB rate clock frequency

@return
USB rate clock frequency in Hz
@brief Get the USB rate clock frequency @return USB rate clock frequency in Hz
static uint32_t usbRateClkGet(void)
{
  uint32_t ret;
  CMU_Select_TypeDef clk;
  clk = CMU_ClockSelectGet(cmuClock_USBR);
  switch (clk) {
    case cmuSelect_USHFRCO:
      ret = ushfrcoFreq;
      break;
    case cmuSelect_HFXO:
      ret = SystemHFXOClockGet();
      break;
    case cmuSelect_HFXOX2:
      ret = 2u * SystemHFXOClockGet();
      break;
    case cmuSelect_HFRCO:
      ret = SystemHfrcoFreq;
      break;
    case cmuSelect_LFXO:
      ret = SystemLFXOClockGet();
      break;
    case cmuSelect_LFRCO:
      ret = SystemLFRCOClockGet();
      break;
    default:
      EFM_ASSERT(0);
      ret = 0;
      break;
  }
  return ret;
}
static uint32_t usbRateClkGet ( void ) { uint32_t ret ; CMU_Select_TypeDef clk ; clk = CMU_ClockSelectGet ( cmuClock_USBR ) ; switch ( clk ) { case cmuSelect_USHFRCO : ret = ushfrcoFreq ; break ; case cmuSelect_HFXO : ret = SystemHFXOClockGet ( ) ; break ; case cmuSelect_HFXOX2 : ret = 2u * SystemHFXOClockGet ( ) ; break ; case cmuSelect_HFRCO : ret = SystemHfrcoFreq ; break ; case cmuSelect_LFXO : ret = SystemLFXOClockGet ( ) ; break ; case cmuSelect_LFRCO : ret = SystemLFRCOClockGet ( ) ; break ; default : EFM_ASSERT ( 0 ) ; ret = 0 ; break ; } return ret ; }
@brief
   Get the USB rate clock frequency
@brief Get the USB rate clock frequency