mirror of
https://git.yoctoproject.org/meta-raspberrypi
synced 2026-07-16 03:46:56 +00:00
rpi-config: Add ENABLE_IR variable for infrared
Users who want infrared device tree overlays gpio-ir and gpio-ir-tx to be set in config.txt can now easily do it through variable ENABLE_IR, for example in local.conf: ENABLE_IR = "1" By default the GPIO pin for gpio-ir is set to 18 and the pin for gpio-ir-tx is 17. Both pins can be easily changed by modifying variables GPIO_IR and GPIO_IR_TX (for example in local.conf). Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
committed by
Andrei Gherzan
parent
ee402d3e9d
commit
3d04b1ccfe
@@ -25,6 +25,8 @@ PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
|
|||||||
|
|
||||||
VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
|
VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
|
||||||
VC4DTBO ?= "vc4-kms-v3d"
|
VC4DTBO ?= "vc4-kms-v3d"
|
||||||
|
GPIO_IR ?= "18"
|
||||||
|
GPIO_IR_TX ?= "17"
|
||||||
|
|
||||||
inherit deploy nopackages
|
inherit deploy nopackages
|
||||||
|
|
||||||
@@ -161,6 +163,13 @@ do_deploy() {
|
|||||||
echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Infrared support
|
||||||
|
if [ "${ENABLE_IR}" = "1" ]; then
|
||||||
|
echo "# Enable infrared" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||||
|
echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||||
|
echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||||
|
fi
|
||||||
|
|
||||||
# VC4 Graphics support
|
# VC4 Graphics support
|
||||||
if [ "${VC4GRAPHICS}" = "1" ]; then
|
if [ "${VC4GRAPHICS}" = "1" ]; then
|
||||||
echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user