ULED(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

✨ ULED(4) ✨

okay so bestie, gather round, because today we're talking about uled β€” the USB LED driver πŸŽ€ yes, the manual page is called ULED(4), and yes, it's giving "tiny driver, main character energy" πŸ’…


🌸 NAME 🌸

uled β€” USB LED driver πŸ’‘βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

so if you wanna compile this driver into the kernel (she's built different, no cap), you drop these lines into your kernel configuration file:

device uled
device usb

alternatively β€” and this is the lowkey easier route β€” to load the driver as a module at boot time, you put this line in loader.conf(5):

uled_load="YES"

periodt. that's it. 🫢


πŸŽ€ DESCRIPTION πŸŽ€

the uled driver provides support for the Dream Cheeky WebMail Notifier and the ThingM blink(1) notification LED. πŸ”₯ like literally little LEDs that tell you stuff. iconic.

subsequently, the /dev/uled0 device can be used by userland applications. so your apps can talk to it. slay. πŸ’–


πŸ‘‘ IOCTLS πŸ‘‘

the following ioctl(2) commands can be performed on /dev/uled0, which are defined in <dev/usb/uled_ioctl.h>:

  • ULED_GET_COLOR β€” this command returns LED colors with values for RGB 🌈. this ioctl(2) takes the following structure:
struct uled_color {
        uint8_t red;
        uint8_t green;
        uint8_t blue;
};
  • ULED_SET_COLOR β€” this command sets LED colors with values for RGB 🎨. it uses the same structure as above. same vibe, different direction, iykyk.

πŸ“ FILES πŸ“

  • /dev/uled0 β€” blocking device node πŸ’€ (yes, blocking, bestie, read it and weep)

🌈 SEE ALSO 🌈

ohci(4), uhci(4), usb(4) β€” go read these too, they're the supporting cast 🫢


πŸ’œ AUTHORS πŸ’œ

the uled driver was written by Kevin Lo <kevlo@FreeBSD.org> πŸ‘‘ absolute legend behaviour.


ngl bestie, that's the whole page. no cap, no missing flags, nothing skipped. πŸ’…

cute little sign-off: this slice of manual-page realness comes to you from Debian, dated March 31, 2017 🌸 β€” and that's the vibe check, passed with flying colours πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from