pkarashchenko commented on code in PR #11595:
URL: https://github.com/apache/nuttx/pull/11595#discussion_r1465502293
##########
arch/arm/src/samv7/sam_dac.c:
##########
@@ -277,7 +341,43 @@ static int dac_setup(struct dac_dev_s *dev)
static void dac_shutdown(struct dac_dev_s *dev)
{
-#warning "Missing logic"
+ struct sam_chan_s *chan = dev->ad_priv;
+
+ /* We can use dac_reset() to disable the channel. */
+
+ chan->inuse = 0;
+ dac_reset(dev);
+
+ /* Decrement number of peripheral users. */
+
+ g_dacmodule.users -= 1;
Review Comment:
minor, optional
```suggestion
g_dacmodule.users--;
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]