git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1324 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
e30cff9c54
commit
808c218d7b
|
@ -217,6 +217,9 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
|
||||||
adcp->ad_adc->SQR3 = grpp->acg_sqr3;
|
adcp->ad_adc->SQR3 = grpp->acg_sqr3;
|
||||||
adcp->ad_adc->CR1 = grpp->acg_cr1 | ADC_CR1_SCAN;
|
adcp->ad_adc->CR1 = grpp->acg_cr1 | ADC_CR1_SCAN;
|
||||||
adcp->ad_adc->CR2 = grpp->acg_cr2 | ADC_CR2_DMA | ADC_CR2_ADON;
|
adcp->ad_adc->CR2 = grpp->acg_cr2 | ADC_CR2_DMA | ADC_CR2_ADON;
|
||||||
|
|
||||||
|
/* ADC start.*/
|
||||||
|
adcp->ad_adc->CR2 |= ADC_CR2_SWSTART | ADC_CR2_EXTTRIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -226,7 +229,7 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
|
||||||
*/
|
*/
|
||||||
void adc_lld_stop_conversion(ADCDriver *adcp) {
|
void adc_lld_stop_conversion(ADCDriver *adcp) {
|
||||||
|
|
||||||
adcp->ad_adc->CR2 &= ~(ADC_CR2_SWSTART | ADC_CR2_EXTTRIG);
|
adcp->ad_adc->CR2 = ADC_CR2_ADON;
|
||||||
adcp->ad_dma->CCR = 0;
|
adcp->ad_dma->CCR = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue