stm32f3: adc: remove invalid eoc group methods.

This code was copied from the f4, and blindly modified to make it seem
to work.  The f3 has separate flags for EOC and EOS, it doesn't use a
second bit to configure what the EOC bit does.

Consequently, update the documentation to correctly indicate that the
EOC bits are only set per conversion.

Discovered in github bug: #493
This commit is contained in:
Karl Palsson 2015-07-29 13:20:09 +00:00
parent 42983e2790
commit e65140d0d3
2 changed files with 4 additions and 36 deletions

View File

@ -926,8 +926,6 @@ void adc_disable_overrun_interrupt(uint32_t adc);
bool adc_get_overrun_flag(uint32_t adc);
void adc_clear_overrun_flag(uint32_t adc);
bool adc_awd(uint32_t adc);
void adc_eoc_after_each(uint32_t adc);
void adc_eoc_after_group(uint32_t adc);
/*void adc_set_dma_continue(uint32_t adc);*/
/*void adc_set_dma_terminate(uint32_t adc);*/
void adc_enable_temperature_sensor(void);

View File

@ -714,8 +714,8 @@ void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[])
/*---------------------------------------------------------------------------*/
/** @brief ADC Read the End-of-Conversion Flag
*
* This flag is set after all channels of a regular or injected group have been
* converted.
* This flag is set by hardware at the end of each regular conversion of a
* channel when a new data is available in the ADCx_DR register.
*
* @param[in] adc Unsigned int32. ADC block register address base
* @ref adc_reg_base
@ -730,8 +730,8 @@ bool adc_eoc(uint32_t adc)
/*---------------------------------------------------------------------------*/
/** @brief ADC Read the End-of-Conversion Flag for Injected Conversion
*
* This flag is set after all channels of an injected group have been
* converted.
* This flag is set by hardware at the end of each injected conversion of a
* channel when a new data is available in the corresponding ADCx_JDRy register.
*
* @param[in] adc Unsigned int32. ADC block register address base
* @ref adc_reg_base
@ -1030,36 +1030,6 @@ void adc_clear_overrun_flag(uint32_t adc)
ADC_ISR(adc) |= ADC_ISR_OVR;
}
/*---------------------------------------------------------------------------*/
/** @brief ADC Enable an EOC for Each Conversion
*
* The EOC is set after each conversion in a sequence rather than at the end of
* the sequence. Overrun detection is enabled only if DMA is enabled.
*
* @param[in] adc Unsigned int32. ADC block register address base
* @ref adc_reg_base
*/
void adc_eoc_after_each(uint32_t adc)
{
ADC_ISR(adc) |= ADC_ISR_EOS;
}
/*---------------------------------------------------------------------------*/
/** @brief ADC Disable the EOC for Each Conversion
*
* The EOC is set at the end of each sequence rather than after each conversion
* in the sequence. Overrun detection is enabled always.
*
* @param[in] adc Unsigned int32. ADC block register address base @ref
* adc_reg_base
*/
void adc_eoc_after_group(uint32_t adc)
{
ADC_ISR(adc) &= ~ADC_ISR_EOS;
}
/*---------------------------------------------------------------------------*/
/** @brief ADC Set DMA to Continue
*