summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-05-25 09:16:54 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-05-25 09:16:54 +0200
commitc58ebc7703eed57c57b66bf153608e2f58969b64 (patch)
treedaac57b9d5a74b88faa5e409d904f874b0e5d9e1 /examples
parent913893354cd316b7d79f334c644c915204d75b5a (diff)
toy example: Add non-choice configuration options
Diffstat (limited to 'examples')
-rw-r--r--examples/kconfig-static/Kconfig6
-rwxr-xr-xexamples/kconfig-static/nfpvalues.sh8
2 files changed, 14 insertions, 0 deletions
diff --git a/examples/kconfig-static/Kconfig b/examples/kconfig-static/Kconfig
index 1b02bac..8d6fa64 100644
--- a/examples/kconfig-static/Kconfig
+++ b/examples/kconfig-static/Kconfig
@@ -1,3 +1,9 @@
+config XP23
+bool "X += 23"
+
+config YP42
+bool "Y += 42"
+
choice
prompt "pi or tau?"
diff --git a/examples/kconfig-static/nfpvalues.sh b/examples/kconfig-static/nfpvalues.sh
index 574aa47..fc41085 100755
--- a/examples/kconfig-static/nfpvalues.sh
+++ b/examples/kconfig-static/nfpvalues.sh
@@ -19,4 +19,12 @@ if [ "$CONFIG_Y4" = y ]; then
Y=4
fi
+if [ "$CONFIG_XP23" = y ]; then
+ X=$((X+23))
+fi
+
+if [ "$CONFIG_YP42" = y ]; then
+ Y=$((Y+42))
+fi
+
echo '{"Synthetic": {"X": '$X', "Y": '$Y'}}'