aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Huber <[email protected]>2024-03-03 21:05:00 -0800
committerCem Aksoylar <[email protected]>2024-03-04 20:08:52 -0800
commit37af94edde7b42f1894484831b6d958bc4b27124 (patch)
treeabaf891e844d71c878a8a642b9144a9208d711b4
parentdb7b197790c57c3fb5b8281bd8242286921ae77c (diff)
downloadzmk-37af94edde7b42f1894484831b6d958bc4b27124.tar.gz
zmk-37af94edde7b42f1894484831b6d958bc4b27124.zip
feat(docs): Add warning to new shield docs how Kconfig treats whitspaces
Added a warning to the shield section explaining that Kconfig does not ignore whitespaces on function calls and therefore adding whitespaces after the comma will break functionality.
-rw-r--r--docs/docs/development/new-shield.mdx4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/docs/development/new-shield.mdx b/docs/docs/development/new-shield.mdx
index 0dcface373..2cd82bc67e 100644
--- a/docs/docs/development/new-shield.mdx
+++ b/docs/docs/development/new-shield.mdx
@@ -79,6 +79,10 @@ config SHIELD_MY_BOARD
def_bool $(shields_list_contains,my_board)
```
+:::warning
+Kconfig uses only commas for delimiters, and keeps all whitespaces in the function call. Therefore do not add a whitespace after the comma when configuring your shield as this would be treated as <code>&nbsp;my_board</code> (with a leading whitespace) and will cause issues.
+:::
+
This will make sure that a new configuration value named `SHIELD_MY_BOARD` is set to true whenever `my_board` is used as the shield name, either as the `SHIELD` variable [in a local build](build-flash.mdx) or in your `build.yaml` file [when using Github Actions](../customization). Note that this configuration value will be used in `Kconfig.defconfig` to set other properties about your shield, so make sure that they match.
**For split boards**, you will need to add configurations for the left and right sides. For example, if your split halves are named `my_board_left` and `my_board_right`, it would look like this: