From 9dd3e08fdd7e84f77692d5d611fb4ac67d6d82ba Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 19 Dec 2017 07:50:58 -0800 Subject: [PATCH] Octagon V2 Refactor (#2170) * rename octagon_v2 directory to octagon directory * Move octagon_v2 files to v2 sub-directory * Edit readme files * setup header files for building multiple versions of the Duck Octagon. * Changes as per Jack's PR 2170 comments --- .../{octagon_v2 => octagon}/keymaps/default/keymap.c | 2 +- .../{octagon_v2 => octagon}/keymaps/default/readme.md | 0 keyboards/octagon/octagon.c | 1 + keyboards/octagon/octagon.h | 10 ++++++++++ keyboards/octagon/readme.md | 9 +++++++++ keyboards/octagon/rules.mk | 1 + keyboards/{octagon_v2 => octagon/v2}/config.h | 0 keyboards/{octagon_v2 => octagon/v2}/indicator_leds.c | 0 keyboards/{octagon_v2 => octagon/v2}/indicator_leds.h | 0 keyboards/{octagon_v2 => octagon/v2}/matrix.c | 0 keyboards/{octagon_v2 => octagon/v2}/readme.md | 4 ++-- keyboards/{octagon_v2 => octagon/v2}/rules.mk | 0 keyboards/{octagon_v2/octagon_v2.c => octagon/v2/v2.c} | 2 +- keyboards/{octagon_v2/octagon_v2.h => octagon/v2/v2.h} | 6 +++--- 14 files changed, 28 insertions(+), 7 deletions(-) rename keyboards/{octagon_v2 => octagon}/keymaps/default/keymap.c (99%) rename keyboards/{octagon_v2 => octagon}/keymaps/default/readme.md (100%) create mode 100644 keyboards/octagon/octagon.c create mode 100644 keyboards/octagon/octagon.h create mode 100644 keyboards/octagon/readme.md create mode 100644 keyboards/octagon/rules.mk rename keyboards/{octagon_v2 => octagon/v2}/config.h (100%) rename keyboards/{octagon_v2 => octagon/v2}/indicator_leds.c (100%) rename keyboards/{octagon_v2 => octagon/v2}/indicator_leds.h (100%) rename keyboards/{octagon_v2 => octagon/v2}/matrix.c (100%) rename keyboards/{octagon_v2 => octagon/v2}/readme.md (97%) rename keyboards/{octagon_v2 => octagon/v2}/rules.mk (100%) rename keyboards/{octagon_v2/octagon_v2.c => octagon/v2/v2.c} (99%) rename keyboards/{octagon_v2/octagon_v2.h => octagon/v2/v2.h} (96%) diff --git a/keyboards/octagon_v2/keymaps/default/keymap.c b/keyboards/octagon/keymaps/default/keymap.c similarity index 99% rename from keyboards/octagon_v2/keymaps/default/keymap.c rename to keyboards/octagon/keymaps/default/keymap.c index 123da6069c..5fd2d0aeb9 100644 --- a/keyboards/octagon_v2/keymaps/default/keymap.c +++ b/keyboards/octagon/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "octagon_v2.h" +#include "octagon.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ diff --git a/keyboards/octagon_v2/keymaps/default/readme.md b/keyboards/octagon/keymaps/default/readme.md similarity index 100% rename from keyboards/octagon_v2/keymaps/default/readme.md rename to keyboards/octagon/keymaps/default/readme.md diff --git a/keyboards/octagon/octagon.c b/keyboards/octagon/octagon.c new file mode 100644 index 0000000000..6eb9e73b24 --- /dev/null +++ b/keyboards/octagon/octagon.c @@ -0,0 +1 @@ +#include "octagon.h" diff --git a/keyboards/octagon/octagon.h b/keyboards/octagon/octagon.h new file mode 100644 index 0000000000..d48a715bbc --- /dev/null +++ b/keyboards/octagon/octagon.h @@ -0,0 +1,10 @@ +#ifndef OCTAGON_H +#define OCTAGON_H + +#include "quantum.h" + +#ifdef KEYBOARD_octagon_v2 + #include "v2.h" +#endif + +#endif diff --git a/keyboards/octagon/readme.md b/keyboards/octagon/readme.md new file mode 100644 index 0000000000..bf937a3f66 --- /dev/null +++ b/keyboards/octagon/readme.md @@ -0,0 +1,9 @@ +# Duck Octagon + +Non official firmware for custom Korean keyboard with 75% key layout made by Duck. + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +Make example for this keyboard (after setting up your build environment): + + make octagon/v2:default diff --git a/keyboards/octagon/rules.mk b/keyboards/octagon/rules.mk new file mode 100644 index 0000000000..ce04362e6f --- /dev/null +++ b/keyboards/octagon/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = octagon/v2 \ No newline at end of file diff --git a/keyboards/octagon_v2/config.h b/keyboards/octagon/v2/config.h similarity index 100% rename from keyboards/octagon_v2/config.h rename to keyboards/octagon/v2/config.h diff --git a/keyboards/octagon_v2/indicator_leds.c b/keyboards/octagon/v2/indicator_leds.c similarity index 100% rename from keyboards/octagon_v2/indicator_leds.c rename to keyboards/octagon/v2/indicator_leds.c diff --git a/keyboards/octagon_v2/indicator_leds.h b/keyboards/octagon/v2/indicator_leds.h similarity index 100% rename from keyboards/octagon_v2/indicator_leds.h rename to keyboards/octagon/v2/indicator_leds.h diff --git a/keyboards/octagon_v2/matrix.c b/keyboards/octagon/v2/matrix.c similarity index 100% rename from keyboards/octagon_v2/matrix.c rename to keyboards/octagon/v2/matrix.c diff --git a/keyboards/octagon_v2/readme.md b/keyboards/octagon/v2/readme.md similarity index 97% rename from keyboards/octagon_v2/readme.md rename to keyboards/octagon/v2/readme.md index 37783c84ce..125f09f9cd 100644 --- a/keyboards/octagon_v2/readme.md +++ b/keyboards/octagon/v2/readme.md @@ -9,7 +9,7 @@ Hardware Availability: Wait until GB of the next revision Make example for this keyboard (after setting up your build environment): - make octagon_v2:default + make octagon/v2:default See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. @@ -25,4 +25,4 @@ The Duck Octagon V2 PCB consists of: ## Notes Thanks to Ralf Schmitt for previous implementations in his [TMK fork](https://github.com/xauser/tmk_keyboard/tree/xauser/) and few helping words. -Based heavily on Rasmus Schults [Duck Lightsaver QMK Port](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lightsaver) \ No newline at end of file +Based heavily on Rasmus Schults [Duck Lightsaver QMK Port](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lightsaver) diff --git a/keyboards/octagon_v2/rules.mk b/keyboards/octagon/v2/rules.mk similarity index 100% rename from keyboards/octagon_v2/rules.mk rename to keyboards/octagon/v2/rules.mk diff --git a/keyboards/octagon_v2/octagon_v2.c b/keyboards/octagon/v2/v2.c similarity index 99% rename from keyboards/octagon_v2/octagon_v2.c rename to keyboards/octagon/v2/v2.c index 05c12c527b..52653b37e7 100644 --- a/keyboards/octagon_v2/octagon_v2.c +++ b/keyboards/octagon/v2/v2.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "octagon_v2.h" +#include "v2.h" #include "indicator_leds.h" enum BACKLIGHT_AREAS { diff --git a/keyboards/octagon_v2/octagon_v2.h b/keyboards/octagon/v2/v2.h similarity index 96% rename from keyboards/octagon_v2/octagon_v2.h rename to keyboards/octagon/v2/v2.h index 64d2d0169b..7ad9f3826b 100644 --- a/keyboards/octagon_v2/octagon_v2.h +++ b/keyboards/octagon/v2/v2.h @@ -13,10 +13,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef OCTAGON_V2_H -#define OCTAGON_V2_H +#ifndef V2_H +#define V2_H -#include "quantum.h" +#include "../octagon.h" #define KEYMAP( \ K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5Q, \