gpiod_set_value(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, this is gpiod_set_value(9) from the Kernel API Manual, and it’s literally here to assign a gpio's value πŸ’…βœ¨

✨ SYNOPSIS ✨

int gpiod_set_value (struct gpio_desc *desc , int value );

πŸ’… ARGUMENTS πŸ’…

  • desc β€” the gpio whose value will be assigned 🫢
  • value β€” the value to assign πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

Set the logical value of the GPIO, i.e. taking its ACTIVE_LOW, OPEN_DRAIN and OPEN_SOURCE flags into account. It’s giving β€œnot raw vibes, logical vibes,” and honestly? iconic πŸ’…

This function can be called from contexts where we cannot sleep 😴🚫, and it will complain if the GPIO chip functions potentially sleep. So yeah, no nap time for this one, fr fr.

πŸŽ€ RETURN πŸŽ€

0 on success, negative error number on failure. Zero is the slay outcome; a negative number means something went sideways πŸ’€

πŸ”— SEE ALSO πŸ”—

Kernel file: ./drivers/gpio/gpiolib.c 🫢

And the whole gpio friend group, no cap:


okay bye bestie! source/version: ./drivers/gpio, date: October 2026, page: gpiod_set_value(9) β€” periodt πŸ’–βœ¨

πŸ“¦ where this page comes from