Fixed bug #1072.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13353 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
13ca75bdbf
commit
44b7d29577
|
@ -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; \
|
||||
|
|
Loading…
Reference in New Issue