michallenc commented on code in PR #17510:
URL: https://github.com/apache/nuttx/pull/17510#discussion_r2622335090


##########
drivers/ioexpander/gpio.c:
##########
@@ -576,6 +576,31 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, 
unsigned long arg)
         }
         break;
 
+      /* Command:     GPIOC_SETDEBOUNCE
+       * Description: Set the GPIO pin debounce duration.
+       * Argument:    The duration of the channel debounce, uint is ns.
+       */
+
+      case GPIOC_SETDEBOUNCE:
+        {
+          DEBUGASSERT(dev->gp_ops->go_setdebounce != NULL);
+          ret = dev->gp_ops->go_setdebounce(dev, arg);
+          break;
+        }
+
+      /* Command:     GPIOC_SETMASK
+       * Description: Set the GPIO pin type.
+       * Argument:    Whether to enable interrupt mask.
+       */
+
+    case GPIOC_SETMASK:
+        {
+          bool mask = (bool)arg;
+          DEBUGASSERT(dev->gp_ops->go_setmask != NULL);
+          ret = dev->gp_ops->go_setmask(dev, mask);

Review Comment:
   Is a separate function necessary? I think we could use `go_enable` here.



-- 
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]

Reply via email to