/* Deinitializes the adc peripheral registers to their default reset values.  */
void ADC_DeInit(ADC_TypeDef *adc)
/* Deinitializes the adc peripheral registers to their default reset values.  */
void ADC_DeInit(ADC_TypeDef *adc)
{
    switch (*(vu32*)&adc) {
        case ADC1_BASE:
            exRCC_APB2PeriphReset(RCC_APB2ENR_ADC1);
            break;
        case ADC2_BASE:
            exRCC_APB2PeriphReset(RCC_APB2ENR_ADC2);
            break;
        case ADC3_BASE:
            exRCC_APB2PeriphReset(RCC_APB2ENR_ADC3);
            break;
        default:
            break;
    }
}