seems to work

This commit is contained in:
2025-06-02 14:08:05 +01:00
parent bb2342a30b
commit 494bb9b3ae
2 changed files with 14 additions and 11 deletions

View File

@ -12,14 +12,17 @@ all: $(DTBO)
$(DTBO): $(DTS)
dtc -@ -I dts -O dtb -o $@ $<
install: $(DTBO)
sudo cp $(DTBO) $(OVERLAY_DIR)/
@if ! grep -q "^dtoverlay=$(OVERLAY_NAME)$$" $(CONFIG_TXT); then \
echo "dtoverlay=$(OVERLAY_NAME)" | sudo tee -a $(CONFIG_TXT); \
else \
echo "Overlay already present in config.txt."; \
fi
@echo "Installation complete. Reboot your Raspberry Pi to activate the overlay."
load: $(DTBO)
sudo dtoverlay -d . $(OVERLAY_NAME)
@echo "Overlay loaded"
unload: $(DTBO)
sudo dtoverlay -R $(OVERLAY_NAME)
@echo "Overlay unloaded"
list:
sudo dtoverlay -l
clean:
rm -f *.dtbo

View File

@ -7,13 +7,12 @@
fragment@0 {
target = <&gpio>;
__overlay__ {
gpio_led_blue: gpio_led_blue {
gpio_led_blue: gpio_led_blues@26 {
brcm,pins = <26>;
brcm,function = <1>; // output
brcm,pull = <0>; // no pull
};
gpio_led_red: gpio_led_red {
gpio_led_red: gpio_led_reds@21 {
brcm,pins = <21>;
brcm,function = <1>; // output
brcm,pull = <0>; // no pull
@ -22,3 +21,4 @@
};
};