You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "raiden00pl (via GitHub)" <gi...@apache.org> on 2023/06/27 13:15:30 UTC
[GitHub] [nuttx] raiden00pl commented on a diff in pull request #9629: ioexpander: add SX1509 support
raiden00pl commented on code in PR #9629:
URL: https://github.com/apache/nuttx/pull/9629#discussion_r1243718674
##########
drivers/leds/userled_upper.c:
##########
@@ -464,6 +464,53 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
break;
+#ifdef CONFIG_USERLED_EFFECTS
+ /* Command: ULEDIOC_SUPEFFECT
+ * Description: Get supported effects of one LED.
+ * Argument: A write-able pointer to a struct userled_effect_sup_s
+ * which to return the supported LED effects.
+ * Return: Zero (OK) on success. Minus one will be returned on
+ * failure with the errno value set appropriately.
+ */
+
+ case ULEDIOC_SUPEFFECT:
Review Comment:
`_GETEFFECT` seems more suitable for getting the currently set effect for a LED and this feature is currently not supported now.
`_SUPEFFECT` returns the available functionality of a given LED, not the currently set effect.
Different LED outputs can support different effects, one will only support intensity control and another will support blinking. `_SUPEFFECT` is to provide this information to user-space.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org