You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/06/15 17:03:41 UTC
[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3924: stm32h7 fix for adc to handle overrun and the DR's fifo
gustavonihei commented on a change in pull request #3924:
URL: https://github.com/apache/incubator-nuttx/pull/3924#discussion_r651985035
##########
File path: drivers/analog/adc.c
##########
@@ -420,6 +435,23 @@ static int adc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
return ret;
}
+/****************************************************************************
+ * Name: adc_reset
+ ****************************************************************************/
+
+static int adc_reset(FAR struct adc_dev_s *dev)
+{
+ /* Set overrun flag to give read a chance to recover */
+
+ dev->ad_isovr = true;
+
+ /* No need to notify here. The adc_receive callback will be called next.
+ * If an adc overrun occurs then there must be at least one conversion.
Review comment:
```suggestion
* If an ADC overrun occurs then there must be at least one conversion.
```
nit: ADC acronym in all caps, for consistency.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org