/* Stop ADC conversion of normal group (and insert group in case of auto_insert mode), disable ADC DMA transfer, disable ADC peripheral.  */
ald_status_t ald_adc_stop_by_dma(ald_adc_handle_t *hperh, uint8_t channel)
/* Stop ADC conversion of normal group (and insert group in case of auto_insert mode), disable ADC DMA transfer, disable ADC peripheral.  */
ald_status_t ald_adc_stop_by_dma(ald_adc_handle_t *hperh, uint8_t channel)
{
    assert_param(IS_ADC_TYPE(hperh->perh));
    ALD_ADC_DISABLE(hperh);
    CLEAR_BIT(hperh->perh->CON1, ADC_CON1_DMA_MSK);
    ald_dma_channel_config(channel, DISABLE);
    CLEAR_BIT(hperh->state, ALD_ADC_STATE_BUSY_N);
    return ALD_OK;
}