rpi: add GPIO keys
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 31 Oct 2024 15:35:48 +0000 (11:35 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 12 Nov 2024 03:40:44 +0000 (22:40 -0500)
raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend

index ea3d705..67e5cdb 100644 (file)
@@ -22,4 +22,12 @@ do_deploy:append() {
 
     # Enable hvmpd overlay:
     echo "dtoverlay=hvmpd" >> $CONFIG
+
+    # Important: no whistespace...
+    echo "dtoverlay=gpio-key,gpio=23,active_low=0,gpio_pull=up,label=play,keycode=164" >> $CONFIG
+    echo "dtoverlay=gpio-key,gpio=24,active_low=0,gpio_pull=up,label=left,keycode=105" >> $CONFIG
+    echo "dtoverlay=gpio-key,gpio=12,active_low=0,gpio_pull=up,label=down,keycode=108">> $CONFIG
+    echo "dtoverlay=gpio-key,gpio=16,active_low=0,gpio_pull=up,label=enter,keycode=28">> $CONFIG
+    echo "dtoverlay=gpio-key,gpio=7,active_low=0,gpio_pull=up,label=right,keycode=106">> $CONFIG
+    echo "dtoverlay=gpio-key,gpio=8,active_low=0,gpio_pull=up,label=up,keycode=103">> $CONFIG
 }