From a6f823612afad8592eb0659b0feb6b6813925d3b Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Wed, 16 Jun 2021 17:19:38 +0200 Subject: [PATCH] Build kmap.h as part of a build process --- inputd/build.sh | 1 + inputd/map-to-c.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/inputd/build.sh b/inputd/build.sh index d2e5891..e2fb71d 100755 --- a/inputd/build.sh +++ b/inputd/build.sh @@ -1,3 +1,4 @@ #!/bin/sh +php map-to-c.php factory-keymap.txt > kmap.h gcc -o ppkbd main.c || exit 1 diff --git a/inputd/map-to-c.php b/inputd/map-to-c.php index 2455de5..7d4eb3a 100644 --- a/inputd/map-to-c.php +++ b/inputd/map-to-c.php @@ -21,7 +21,7 @@ */ $pmap = file_get_contents("physical-map.txt"); -$kmap = file_get_contents("factory-keymap.txt"); +$kmap = file_get_contents($argv[1]); // high nibble = row, low nibble col $el_phys_map = [];