emlib/src/em_cmu.c
static uint32_t adcAsyncClkGet(uint32_t adc)
{
  uint32_t ret;
  CMU_Select_TypeDef clk;

  /* Get selected clock source */
  switch (adc) {
    case 0:
      clk = CMU_ClockSelectGet(cmuClock_ADC0ASYNC);
      break;

#if defined(_CMU_ADCCTRL_ADC1CLKSEL_MASK)
    case 1:
      clk = CMU_ClockSelectGet(cmuClock_ADC1ASYNC);
      break;
#endif

    default:
      EFM_ASSERT(0);
      return 0;
  }

  switch (clk) {
    case cmuSelect_Disabled:
      ret = 0;
      break;

    case cmuSelect_AUXHFRCO:
      ret = auxClkGet();
      break;

    case cmuSelect_HFXO:
      ret = SystemHFXOClockGet();
      break;

    case cmuSelect_HFSRCCLK:
      ret = hfSrcClkGet();
      break;

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

@return
ADC n asynchronous frequency in Hz
@brief Get the ADC n asynchronous clock frequency @return ADC n asynchronous frequency in Hz
static uint32_t adcAsyncClkGet(uint32_t adc)
{
  uint32_t ret;
  CMU_Select_TypeDef clk;
  switch (adc) {
    case 0:
      clk = CMU_ClockSelectGet(cmuClock_ADC0ASYNC);
      break;
#if defined(_CMU_ADCCTRL_ADC1CLKSEL_MASK)
    case 1:
      clk = CMU_ClockSelectGet(cmuClock_ADC1ASYNC);
      break;
#endif
    default:
      EFM_ASSERT(0);
      return 0;
  }
  switch (clk) {
    case cmuSelect_Disabled:
      ret = 0;
      break;
    case cmuSelect_AUXHFRCO:
      ret = auxClkGet();
      break;
    case cmuSelect_HFXO:
      ret = SystemHFXOClockGet();
      break;
    case cmuSelect_HFSRCCLK:
      ret = hfSrcClkGet();
      break;
    default:
      EFM_ASSERT(0);
      ret = 0;
      break;
  }
  return ret;
}
static uint32_t adcAsyncClkGet ( uint32_t adc ) { uint32_t ret ; CMU_Select_TypeDef clk ; switch ( adc ) { case 0 : clk = CMU_ClockSelectGet ( cmuClock_ADC0ASYNC ) ; break ; #if defined ( _CMU_ADCCTRL_ADC1CLKSEL_MASK ) case 1 : clk = CMU_ClockSelectGet ( cmuClock_ADC1ASYNC ) ; break ; #endif default : EFM_ASSERT ( 0 ) ; return 0 ; } switch ( clk ) { case cmuSelect_Disabled : ret = 0 ; break ; case cmuSelect_AUXHFRCO : ret = auxClkGet ( ) ; break ; case cmuSelect_HFXO : ret = SystemHFXOClockGet ( ) ; break ; case cmuSelect_HFSRCCLK : ret = hfSrcClkGet ( ) ; break ; default : EFM_ASSERT ( 0 ) ; ret = 0 ; break ; } return ret ; }
@brief
   Get the ADC n asynchronous clock frequency
@brief Get the ADC n asynchronous clock frequency
/* Get selected clock source */