Skip to content

Instantly share code, notes, and snippets.

@damex
Created October 14, 2020 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damex/ac70c2e435f0e33040115532423db560 to your computer and use it in GitHub Desktop.
Save damex/ac70c2e435f0e33040115532423db560 to your computer and use it in GitHub Desktop.
#include <dt-bindings/gpio/gpio.h>
/ {
leds {
compatible = "gpio-leds";
power_on {
label = "on:power";
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
default-state = "on";
};
power_off {
label = "off:power";
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
power_white {
label = "white:power";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
default-state = "on";
};
power_blue {
label = "blue:power";
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment