summaryrefslogtreecommitdiffstats
path: root/docs/feature_layouts.md
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-10-14 23:32:19 +0200
committerGitHub <noreply@github.com>2017-10-14 23:32:19 +0200
commit800ec55dfca06b4630acf62cbb5f130c4031e4f1 (patch)
tree718e43d976bc71627558b5f9e1b657e8a64e4131 /docs/feature_layouts.md
parente5dc2253e26a105a11e0fad3e4e39c306e49cc92 (diff)
downloadqmk_firmware-800ec55dfca06b4630acf62cbb5f130c4031e4f1.tar.gz
qmk_firmware-800ec55dfca06b4630acf62cbb5f130c4031e4f1.tar.xz
Make arguments redo, subproject elimination (#1784)
* redo make args to use colons, better folder structuring system [skip ci] * don't put spaces after statements - hard lessons in makefile development * fix-up some other rules.mk * give travis a chance * reset KEYMAPS variable * start converting keyboards to new system * try making all with travis * redo make args to use colons, better folder structuring system [skip ci] * don't put spaces after statements - hard lessons in makefile development * fix-up some other rules.mk * give travis a chance * reset KEYMAPS variable * start converting keyboards to new system * try making all with travis * start to update readmes and keyboards * look in keyboard directories for board.mk * update visualizer rules * fix up some other keyboards/keymaps * fix arm board ld includes * fix board rules * fix up remaining keyboards * reset layout variable * reset keyboard_layouts * fix remainging keymaps/boards * update readmes, docs * add note to makefile error * update readmes * remove planck keymap warnings * update references and docs * test out tarvis build stages * don't use stages for now * don't use stages for now
Diffstat (limited to 'docs/feature_layouts.md')
-rw-r--r--docs/feature_layouts.md15
1 files changed, 7 insertions, 8 deletions
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md
index 4d75270dc..5763b7380 100644
--- a/docs/feature_layouts.md
+++ b/docs/feature_layouts.md
@@ -43,15 +43,15 @@ The folder name must be added to the keyboard's `rules.mk`:
LAYOUTS = 60_ansi
-`LAYOUTS` can be appended in the subproject's `rules.mk`:
+`LAYOUTS` can be set in any keyboard folder level's `rules.mk`:
- LAYOUTS += 60_iso
+ LAYOUTS = 60_iso
-but the `LAYOUT_<layout>` variable must be defined in `<subproject>.h` as well.
+but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
## Tips for making layouts keyboard-agnostic
-Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<subproject>.h` should not be included here) file that is being compiled:
+Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled:
#include QMK_KEYBOARD_H
@@ -61,17 +61,16 @@ In your config.h, you can also use this variable to include the keyboard's `conf
If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement:
-* `KEYBOARD_<keyboard>`
-* `SUBPROJECT_<subproject>`
+* `KEYBOARD_<folder1>_<folder2>`
For example:
```c
#ifdef KEYBOARD_planck
- #ifdef SUBPROJECT_rev4
+ #ifdef KEYBOARD_planck_rev4
planck_rev4_function();
#endif
#endif
```
-Note that the names are lowercase and match the folder/file names for the keyboard/subproject exactly. \ No newline at end of file
+Note that the names are lowercase and match the folder/file names for the keyboard/revision exactly. \ No newline at end of file