/* Initializes the SDADCx peripheral according to the specified parameters in the SDADC_InitStruct.  */
void SDADC_Init(SDADC_TypeDef *SDADCx, SDADC_InitTypeDef *SDADC_InitStruct)
/* Initializes the SDADCx peripheral according to the specified parameters in the SDADC_InitStruct.  */
void SDADC_Init(SDADC_TypeDef *SDADCx, SDADC_InitTypeDef *SDADC_InitStruct)
{
  uint32_t tmpcr2 = 0;
  assert_param(IS_SDADC_ALL_PERIPH(SDADCx));
  assert_param(IS_SDADC_REGULAR_CHANNEL(SDADC_InitStruct->SDADC_Channel)); 
  assert_param(IS_FUNCTIONAL_STATE(SDADC_InitStruct->SDADC_ContinuousConvMode)); 
  assert_param(IS_FUNCTIONAL_STATE(SDADC_InitStruct->SDADC_FastConversionMode));
  tmpcr2 = SDADCx->CR2;
  tmpcr2 &= CR2_CLEAR_MASK;
  tmpcr2 |= (uint32_t)(((uint32_t)SDADC_InitStruct->SDADC_ContinuousConvMode<<22) |
                       (SDADC_InitStruct->SDADC_FastConversionMode<<(uint32_t)24) |
                       (SDADC_InitStruct->SDADC_Channel & SDADC_CR2_RCH));
  SDADCx->CR2 = tmpcr2;
}