seems to work
This commit is contained in:
@ -12,14 +12,17 @@ all: $(DTBO)
|
|||||||
$(DTBO): $(DTS)
|
$(DTBO): $(DTS)
|
||||||
dtc -@ -I dts -O dtb -o $@ $<
|
dtc -@ -I dts -O dtb -o $@ $<
|
||||||
|
|
||||||
install: $(DTBO)
|
load: $(DTBO)
|
||||||
sudo cp $(DTBO) $(OVERLAY_DIR)/
|
sudo dtoverlay -d . $(OVERLAY_NAME)
|
||||||
@if ! grep -q "^dtoverlay=$(OVERLAY_NAME)$$" $(CONFIG_TXT); then \
|
@echo "Overlay loaded"
|
||||||
echo "dtoverlay=$(OVERLAY_NAME)" | sudo tee -a $(CONFIG_TXT); \
|
|
||||||
else \
|
unload: $(DTBO)
|
||||||
echo "Overlay already present in config.txt."; \
|
sudo dtoverlay -R $(OVERLAY_NAME)
|
||||||
fi
|
@echo "Overlay unloaded"
|
||||||
@echo "Installation complete. Reboot your Raspberry Pi to activate the overlay."
|
|
||||||
|
list:
|
||||||
|
sudo dtoverlay -l
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.dtbo
|
rm -f *.dtbo
|
||||||
|
@ -7,13 +7,12 @@
|
|||||||
fragment@0 {
|
fragment@0 {
|
||||||
target = <&gpio>;
|
target = <&gpio>;
|
||||||
__overlay__ {
|
__overlay__ {
|
||||||
gpio_led_blue: gpio_led_blue {
|
gpio_led_blue: gpio_led_blues@26 {
|
||||||
brcm,pins = <26>;
|
brcm,pins = <26>;
|
||||||
brcm,function = <1>; // output
|
brcm,function = <1>; // output
|
||||||
brcm,pull = <0>; // no pull
|
brcm,pull = <0>; // no pull
|
||||||
};
|
};
|
||||||
|
gpio_led_red: gpio_led_reds@21 {
|
||||||
gpio_led_red: gpio_led_red {
|
|
||||||
brcm,pins = <21>;
|
brcm,pins = <21>;
|
||||||
brcm,function = <1>; // output
|
brcm,function = <1>; // output
|
||||||
brcm,pull = <0>; // no pull
|
brcm,pull = <0>; // no pull
|
||||||
@ -22,3 +21,4 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user