From d2ff66a985b938e87fffe55c1d9f1dc55e356f91 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 23 Aug 2017 22:29:07 -0400 Subject: Creates a layouts/ folder for keymaps shared between keyboards (#1609) * include variables and .h files as pp directives * start layout compilation * split ergodoxes up * don't compile all layouts for everything * might seg fault * reset layouts variable * actually reset layouts * include rules.mk instead * remove includes from rules.mk * update variable setting * load visualizer from path * adds some more examples * adds more layouts * more boards added * more boards added * adds documentation for layouts * use lowercase names for LAYOUT_ * add layout.json files for each layout * add community folder, default keymaps for layouts * touch-up default layouts * touch-up layouts, some keyboard rules.mk * update documentation for layouts * fix up serial/i2c switches --- keyboards/planck/config.h | 7 +------ keyboards/planck/planck.c | 2 +- keyboards/planck/planck.h | 8 ++------ keyboards/planck/rev3/config.h | 2 +- keyboards/planck/rev3/rev3.h | 2 +- keyboards/planck/rev3/rules.mk | 6 +----- keyboards/planck/rev4/config.h | 2 +- keyboards/planck/rev4/rev4.h | 2 +- keyboards/planck/rev4/rules.mk | 6 +----- keyboards/planck/rules.mk | 2 ++ 10 files changed, 12 insertions(+), 27 deletions(-) (limited to 'keyboards/planck') diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index c86f8491e..ebaf3fb64 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -81,11 +81,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#ifdef SUBPROJECT_rev3 - #include "rev3/config.h" -#endif -#ifdef SUBPROJECT_rev4 - #include "rev4/config.h" -#endif +#include QMK_SUBPROJECT_CONFIG_H #endif diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index 3980b02f5..caef2fe5f 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -1,4 +1,4 @@ -#include "planck.h" +#include QMK_KEYBOARD_H #ifdef ONEHAND_ENABLE __attribute__ ((weak)) diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index 10f17b4a4..c055d73cb 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h @@ -1,12 +1,7 @@ #ifndef PLANCK_H #define PLANCK_H -#ifdef SUBPROJECT_rev3 - #include "rev3.h" -#endif -#ifdef SUBPROJECT_rev4 - #include "rev4.h" -#endif +#include QMK_SUBPROJECT_H #include "quantum.h" @@ -37,5 +32,6 @@ } #define KEYMAP PLANCK_GRID +#define LAYOUT_ortho_4x12 PLANCK_GRID #endif diff --git a/keyboards/planck/rev3/config.h b/keyboards/planck/rev3/config.h index cc37874e8..ade11ffe1 100644 --- a/keyboards/planck/rev3/config.h +++ b/keyboards/planck/rev3/config.h @@ -1,7 +1,7 @@ #ifndef REV3_CONFIG_H #define REV3_CONFIG_H -#include "../config.h" +#include QMK_KEYBOARD_CONFIG_H #define DEVICE_VER 0x0003 diff --git a/keyboards/planck/rev3/rev3.h b/keyboards/planck/rev3/rev3.h index 628951d97..e5e05236c 100644 --- a/keyboards/planck/rev3/rev3.h +++ b/keyboards/planck/rev3/rev3.h @@ -1,6 +1,6 @@ #ifndef REV3_H #define REV3_H -#include "../planck.h" +#include QMK_KEYBOARD_H #endif \ No newline at end of file diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index 559409682..114857100 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -1,5 +1 @@ -AUDIO_ENABLE = no # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +AUDIO_ENABLE = no # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/planck/rev4/config.h b/keyboards/planck/rev4/config.h index 98189fba7..dcc76c11c 100644 --- a/keyboards/planck/rev4/config.h +++ b/keyboards/planck/rev4/config.h @@ -1,7 +1,7 @@ #ifndef REV4_CONFIG_H #define REV4_CONFIG_H -#include "../config.h" +#include QMK_KEYBOARD_CONFIG_H #define DEVICE_VER 0x0004 diff --git a/keyboards/planck/rev4/rev4.h b/keyboards/planck/rev4/rev4.h index e4cf1800b..2d35df19d 100644 --- a/keyboards/planck/rev4/rev4.h +++ b/keyboards/planck/rev4/rev4.h @@ -1,6 +1,6 @@ #ifndef REV4_H #define REV4_H -#include "../planck.h" +#include QMK_KEYBOARD_H #endif \ No newline at end of file diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index 01d848e98..3b22e0a01 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -1,5 +1 @@ -AUDIO_ENABLE = yes # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +AUDIO_ENABLE = yes # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk index 5580bb387..8f8477c18 100644 --- a/keyboards/planck/rules.mk +++ b/keyboards/planck/rules.mk @@ -66,3 +66,5 @@ API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_4x12 \ No newline at end of file -- cgit v1.2.3