ULED(4)

πŸ’– ULED πŸ’–

okay bestie, welcome to the uled manual page β€” it's the USB LED driver and it is, no cap, the cutest little corner of the kernel πŸŽ€ (this one lives in the Kernel Interfaces Manual, iykyk)


✨ NAME ✨

uled β€” the USB LED driver, fr fr πŸ’‘


🌸 SYNOPSIS 🌸

so if you wanna bake this driver straight into your kernel, you gotta drop these lines into your kernel configuration file, periodt:

device uled
device usb

orrr, if you'd rather load it as a module at boot time (iconic behaviour honestly), just put this line in loader.conf(5):

uled_load="YES"

πŸ¦‹ DESCRIPTION πŸ¦‹

the uled driver provides support for the Dream Cheeky WebMail Notifier and the ThingM blink(1) notification LED. yes bestie, actual physical LEDs, actual vibes ✨

and then? the /dev/uled0 device can be used by userland applications. that's the whole point, she's serving 🫢


πŸ’… IOCTLS πŸ’…

these are the ioctl(2) commands you can run on /dev/uled0, and they're all defined in <dev/usb/uled_ioctl.h>:

  • ULED_GET_COLOR β€” this command returns LED colors with values for RGB. it takes this structure, look:
struct uled_color {
        uint8_t red;
        uint8_t green;
        uint8_t blue;
};
  • ULED_SET_COLOR β€” this one sets the LED colors with values for RGB. it uses the exact same structure as above, she's consistent πŸ’…

πŸ“ FILES πŸ“

  • /dev/uled0 β€” blocking device node

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHORS πŸ‘‘

the uled driver was written by Kevin Lo <kevlo@FreeBSD.org>. king behaviour, we love to see it πŸ’œ


and that's the whole page bestie, you ate it up πŸ’– this one came from Debian, dated March 31, 2017, and yeah she's filed under that Kernel Interfaces Manual energy. mwah, go blink some LEDs πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from