diff options
Diffstat (limited to 'os/hal/include/hal_adc.h')
-rw-r--r-- | os/hal/include/hal_adc.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/os/hal/include/hal_adc.h b/os/hal/include/hal_adc.h index 7b93851c5..527821245 100644 --- a/os/hal/include/hal_adc.h +++ b/os/hal/include/hal_adc.h @@ -230,8 +230,12 @@ typedef enum { (adcp)->grpp->error_cb(adcp, err); \
if ((adcp)->state == ADC_ERROR) \
(adcp)->state = ADC_READY; \
+ (adcp)->grpp = NULL; \
+ } \
+ else { \
+ (adcp)->state = ADC_READY; \
+ (adcp)->grpp = NULL; \
} \
- (adcp)->grpp = NULL; \
_adc_timeout_isr(adcp); \
}
/** @} */
|