/* Enable the selected ADC channel and configure its sample time. Please use this function if you want to be compatible with older versions of the library.  */
void ADC_InjectedSequencerConfig(ADC_TypeDef *adc, u32 event, u32 sample_time)
/* Enable the selected ADC channel and configure its sample time. Please use this function if you want to be compatible with older versions of the library.  */
void ADC_InjectedSequencerConfig(ADC_TypeDef *adc, u32 event, u32 sample_time)
{
    adc->ANYCR &= ~(ADC_ANY_CR_JCEN | ADC_ANY_CR_CHANY_MDEN | ADC_ANY_CR_JTRGSEL_EXTI12 \
                    | ADC_ANY_CR_JTRGSHIFT_512 | ADC_ANY_CR_JTRGEN);
    adc->ANYCR |= (ADC_ANY_CR_JCEN | ADC_ANY_CR_CHANY_MDEN | sample_time | event | ADC_ANY_CR_JTRGEN);
}