git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13353 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2020-02-12 15:06:03 +00:00
parent 13ca75bdbf
commit 44b7d29577
1 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,7 @@ typedef struct hal_adc_configuration_group ADCConversionGroup;
* @brief Type of an ADC notification callback.
*
* @param[in] adcp pointer to the @p ADCDriver object triggering the
* callback
*/
typedef void (*adccallback_t)(ADCDriver *adcp);
@ -360,10 +361,11 @@ struct hal_adc_driver {
if ((adcp)->grpp->error_cb != NULL) { \
(adcp)->state = ADC_ERROR; \
(adcp)->grpp->error_cb(adcp, err); \
if ((adcp)->state == ADC_ERROR) \
if ((adcp)->state == ADC_ERROR) { \
(adcp)->state = ADC_READY; \
(adcp)->grpp = NULL; \
} \
} \
else { \
(adcp)->state = ADC_READY; \
(adcp)->grpp = NULL; \