Closed grge-v closed 5 months ago
This example uses the led light which is already defined by dts: arch/arm64/boot/dts/allwinner/sun50i-h618-longanpi-3h.dts
leds {
compatible = "gpio-leds";
led-0 {
color = <LED_COLOR_ID_ORANGE>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <0>;
gpios = <&pio 6 2 GPIO_ACTIVE_LOW>; /* PG2 */
};
led-1 {
color = <LED_COLOR_ID_ORANGE>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <1>;
gpios = <&pio 6 4 GPIO_ACTIVE_LOW>; /* PG4 */
};
};
which means it already occupied, if you want to control the leds in userspace, you can disable them in dts. The GPIO example is to show how to control a GPIO generically.
I like this board, but unfortunately the example of using GPIO does not work in build 20240228. Perhaps it worked in previous builds. I can’t control the LED from the echo and the C code doesn’t work either. Please fix this in the build or example.