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/10/04 12:01:36 UTC

[GitHub] [incubator-nuttx] jarivanewijk commented on pull request #4635: Userled driver: Implement getall by checking actual pin state

jarivanewijk commented on pull request #4635:
URL: https://github.com/apache/incubator-nuttx/pull/4635#issuecomment-933414007


   Thanks for your feedback, @acassis. I used "userled_ledgetall" because the IOCTL command is named ULEDIOC_GETALL, so I was trying to keep it consistent.
   
   There are also IOCTL commands for setting a single LED (ULEDIOC_SETLED) and for setting all LEDs (ULEDIOC_SETALL). If in the future maybe a ULEDIOC_GETLED command (to get the state of a single LED) is to be added, then the naming will get confusing if I named it "userled_ledget" instead of "userled_ledgetall". 
   
   Naming is unfortunately not really consistent between userled_lower.c and userled_upper.c, which makes this a bit of a mess. I just felt that naming it "userled_ledgetall" would avoid most of this confusion and keep it somewhat consistent with the existing IOCTL commands and function names (userled_led and userled_ledset).
   
   I think it would be more clear if we renamed all userled_ functions; "userled_supported" can remain as it is, but "userled_led" should become "userled_setled". "userled_ledset" should become "userled_setall". Then the new one can become "userled_getall"?


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