led_blink_set_oneshot(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, so this one is a kernel API manual page, led_blink_set_oneshot(9), and it's genuinely the cutest little function β€” it makes an LED do exactly one blink and then chill. Let's get into it πŸ’…


🌸 SYNOPSIS 🌸

void led_blink_set_oneshot (struct led_classdev *led_cdev , unsigned
long *delay_on , unsigned long *delay_off , int invert );

Yup, that's the whole signature β€” no return value, it just does the thing. Periodt.


πŸŽ€ ARGUMENTS πŸŽ€

  • led_cdev β€” the LED you wanna start blinking. Your main character, fr.
  • delay_on β€” the time it should be on, in ms. Like how long the glow-up lasts ✨
  • delay_off β€” the time it should ble off, in ms. (Yes, the original says "ble" β€” we're keeping that typo, it's iconic and we don't gatekeep. 😭) Basically how long the lil' guy naps.
  • invert β€” blink off, then on, leaving the led on. The chaotic order. Love that for you.

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this function makes the LED blink one time for delay_on + delay_off time. One blink, that's it, no encore. 🎀

And listen β€” if another one-shot blink is already in progress, this request just gets ignored. Not me showing up late to the party πŸ™ˆ. It literally ignores it. No queuing, no nothing.

If invert is set, the led blinks for delay_off first, then for delay_on, and it leaves the led on after the on-off cycle. So the order gets flipped and you end up glowing at the end. Slay πŸ’–

And the best part? This function is guaranteed not to sleep. No cap. It does not sleep. Ever. So you can call it from places where sleeping is not allowed β€” that's the whole vibe check it passes πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

Go read these, bestie, they're all in the Kernel file ./include/linux/leds.h:


Okay that's the whole page, mwah 🫢. It lives in ./include/linux, and this lil' slice of kernel lore dropped in October 2026. Bye bestie, go blink something once πŸ’œπŸŽ€

πŸ“¦ where this page comes from