From 156fd4e9693e05fb12933bddb49e1a387fa1fab3 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 12:09:47 -0700 Subject: [PATCH 001/331] Initial commit --- keyboards/dz60/keymaps/billiams/README.md | 62 +++++++++++++++++++ .../dz60/keymaps/billiams/build_flash.sh | 8 +++ keyboards/dz60/keymaps/billiams/config.h | 1 + keyboards/dz60/keymaps/billiams/keymap.c | 50 +++++++++++++++ 4 files changed, 121 insertions(+) create mode 100644 keyboards/dz60/keymaps/billiams/README.md create mode 100644 keyboards/dz60/keymaps/billiams/build_flash.sh create mode 100644 keyboards/dz60/keymaps/billiams/config.h create mode 100644 keyboards/dz60/keymaps/billiams/keymap.c diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md new file mode 100644 index 000000000000..c1ea2127b247 --- /dev/null +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -0,0 +1,62 @@ +## Billiam's DZ60 layout + +### Initial Installation + +These are the steps if you've never done this before: + +1. Build your hex file +``` +make dz60:billiams # be in the qmk_firmware directory to do this +``` +A hex file `dz60_billiams.hex` will be created in the base qmk_firmware directory + +2. Before plugging in your keyboard into your computer, hold SPACE and B keys down +3. Plug the computer in, which will put the keyboard in bootlegger mode +4. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. Don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. + + +### Notes + +This layout is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow +cluster in the bottom right. + +Settings: + +* The capslock key is replaced with a second function key. +* The Alt an Cmd keys are swapped to replicate the Mac layout. +* Del is available as Fn+Backspace +* / ? are available when you tap the right shift. Otherwise RShift is shift when held down +* RESET is available as Fn+Esc +* Underglow toggle and mode selection are available as Fn+A and Fn+S + +### 0 Qwerty +``` +,-----------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC | +|-----------------------------------------------------------------------------------------+ +| Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R | +`-----------------------------------------------------------------------------------------' +``` + +### 1 Fn Layer +``` +FN Layer +,-----------------------------------------------------------------------------------------. +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | +|-----------------------------------------------------------------------------------------+ +| |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | Prev | Next | +|-----------------------------------------------------------------------------------------+ +| | BL T| BL M| BL+ | BL- | | | | | | Vol-| Vol+| Play/Pause | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET| +|-----------------------------------------------------------------------------------------+ +| | | | | | | HOME | PG_DN | END | +`-----------------------------------------------------------------------------------------' +``` + diff --git a/keyboards/dz60/keymaps/billiams/build_flash.sh b/keyboards/dz60/keymaps/billiams/build_flash.sh new file mode 100644 index 000000000000..d98b79c9deca --- /dev/null +++ b/keyboards/dz60/keymaps/billiams/build_flash.sh @@ -0,0 +1,8 @@ +# dfu-programmer atmega32u4 erase --force +# dfu-programmer atmega32u4 flash /path/to/firmware.hex +# dfu-programmer atmega32u4 reset + +make dz60:billiams +dfu-programmer atmega32u4 erase --force && \ +dfu-programmer atmega32u4 flash .build/dz60_billiams.hex && \ +dfu-programmer atmega32u4 reset \ No newline at end of file diff --git a/keyboards/dz60/keymaps/billiams/config.h b/keyboards/dz60/keymaps/billiams/config.h new file mode 100644 index 000000000000..9560d51a6f94 --- /dev/null +++ b/keyboards/dz60/keymaps/billiams/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c new file mode 100644 index 000000000000..7195639de187 --- /dev/null +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -0,0 +1,50 @@ +#include QMK_KEYBOARD_H + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, ______, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, ______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | Prev | Next | + * |-----------------------------------------------------------------------------------------+ + * | | BL T| BL M| BL- | BL+ | | | | | | Vol-| Vol+| Play/Pause | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET| + * |-----------------------------------------------------------------------------------------+ + * | | | | Play/Pause | | | HOME|PG_DN| END | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, KC_DEL, + ______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, ______, ______, ______, KC_MEDIA_REWIND, KC_MEDIA_FAST_FORWARD, + ______, BL_TOGG, BL_STEP, BL_DEC, BL_INC, ______, ______, ______, ______, ______, KC__VOLDOWN, KC__VOLUP, + KC_MEDIA_PLAY_PAUSE, ______, ______, ______, ______, ______, ______, ______, ______, KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP, ______, ______, KC_PGUP, RESET, + ______, ______, ______, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_PLAY_PAUSE, ______, ______, KC_HOME, KC_PGDOWN, KC_END + ), +}; From cd379c69a03d339e1eb87646824c2b49cb4db982 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 12:41:28 -0700 Subject: [PATCH 002/331] Modified keymap and updated readme. --- keyboards/dz60/keymaps/billiams/README.md | 43 ++++++++++++------- .../dz60/keymaps/billiams/build_flash.sh | 3 +- keyboards/dz60/keymaps/billiams/keymap.c | 14 +++--- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index c1ea2127b247..84b441ac0830 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -1,8 +1,30 @@ ## Billiam's DZ60 layout +This layout is optimized for MacOS is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow +cluster in the bottom right. Don't use this layout if you didn't get Build 4, you will enter a world of pain Donny. + +Settings: + +* The capslock key is replaced with a second function key. +* The Alt an Cmd keys are swapped to replicate the Mac layout. +* Del is available as Fn+Backspace +* / ? are available when you tap the right shift. Otherwise RShift is shift when held down +* RESET is available as Fn+Esc +* Underglow toggle and mode selection are available as Fn+A and Fn+S +* Media play/pause doesn't seem to work with anything but iTunes at the moment. FML + + ### Initial Installation -These are the steps if you've never done this before: +I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process. + +1. Clone the qmk_firmware repo locally +``` +# Choose one: +git clone git@github.com:qmk/qmk_firmware.git # OR +git clone https://github.com/qmk/qmk_firmware.git +``` +2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`. 1. Build your hex file ``` @@ -14,20 +36,9 @@ A hex file `dz60_billiams.hex` will be created in the base qmk_firmware director 3. Plug the computer in, which will put the keyboard in bootlegger mode 4. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. Don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. +Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. You don't have to unplug the keyboard. -### Notes - -This layout is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow -cluster in the bottom right. - -Settings: - -* The capslock key is replaced with a second function key. -* The Alt an Cmd keys are swapped to replicate the Mac layout. -* Del is available as Fn+Backspace -* / ? are available when you tap the right shift. Otherwise RShift is shift when held down -* RESET is available as Fn+Esc -* Underglow toggle and mode selection are available as Fn+A and Fn+S +Hope this helps! ### 0 Qwerty ``` @@ -50,9 +61,9 @@ FN Layer ,-----------------------------------------------------------------------------------------. | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | |-----------------------------------------------------------------------------------------+ -| |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | Prev | Next | +| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ | |-----------------------------------------------------------------------------------------+ -| | BL T| BL M| BL+ | BL- | | | | | | Vol-| Vol+| Play/Pause | +| | | | | | | | | | | Prev | Next | Play/Pause | |-----------------------------------------------------------------------------------------+ | | | | | | | | |Scr- |Scr+ | | PG_UP |RESET| |-----------------------------------------------------------------------------------------+ diff --git a/keyboards/dz60/keymaps/billiams/build_flash.sh b/keyboards/dz60/keymaps/billiams/build_flash.sh index d98b79c9deca..e7a81114415c 100644 --- a/keyboards/dz60/keymaps/billiams/build_flash.sh +++ b/keyboards/dz60/keymaps/billiams/build_flash.sh @@ -2,7 +2,8 @@ # dfu-programmer atmega32u4 flash /path/to/firmware.hex # dfu-programmer atmega32u4 reset +# run this in the qmk_firmware directory make dz60:billiams dfu-programmer atmega32u4 erase --force && \ -dfu-programmer atmega32u4 flash .build/dz60_billiams.hex && \ +dfu-programmer atmega32u4 flash dz60_billiams.hex && \ dfu-programmer atmega32u4 reset \ No newline at end of file diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c index 7195639de187..596ec19dbfd7 100644 --- a/keyboards/dz60/keymaps/billiams/keymap.c +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -30,21 +30,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | * |-----------------------------------------------------------------------------------------+ - * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | Prev | Next | + * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ | * |-----------------------------------------------------------------------------------------+ - * | | BL T| BL M| BL- | BL+ | | | | | | Vol-| Vol+| Play/Pause | + * | | | | | | | | | | | Prev | Next | Play/Pause | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET| * |-----------------------------------------------------------------------------------------+ - * | | | | Play/Pause | | | HOME|PG_DN| END | + * | | | | | | | HOME|PG_DN| END | * `-----------------------------------------------------------------------------------------' */ LAYOUT_directional( ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, KC_DEL, - ______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, ______, ______, ______, KC_MEDIA_REWIND, KC_MEDIA_FAST_FORWARD, - ______, BL_TOGG, BL_STEP, BL_DEC, BL_INC, ______, ______, ______, ______, ______, KC__VOLDOWN, KC__VOLUP, - KC_MEDIA_PLAY_PAUSE, ______, ______, ______, ______, ______, ______, ______, ______, KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP, ______, ______, KC_PGUP, RESET, - ______, ______, ______, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_PLAY_PAUSE, ______, ______, KC_HOME, KC_PGDOWN, KC_END + ______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, ______, ______, KC_MUTE, KC__VOLDOWN, KC__VOLUP, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MRWD, KC_MFFD, + KC_MPLY, ______, ______, ______, ______, ______, ______, ______, ______, KC_BRID, KC_BRIU, ______, ______, KC_PGUP, RESET, + ______, ______, ______, ______, ______, ______, ______, ______, KC_HOME, KC_PGDOWN, KC_END ), }; From a5337b349552da25009f05fff127cd2228329912 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 12:43:05 -0700 Subject: [PATCH 003/331] fixed numbering in readme --- keyboards/dz60/keymaps/billiams/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index 84b441ac0830..ea8d326a3a41 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -26,15 +26,15 @@ git clone https://github.com/qmk/qmk_firmware.git ``` 2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`. -1. Build your hex file +3. Build your hex file ``` make dz60:billiams # be in the qmk_firmware directory to do this ``` A hex file `dz60_billiams.hex` will be created in the base qmk_firmware directory -2. Before plugging in your keyboard into your computer, hold SPACE and B keys down -3. Plug the computer in, which will put the keyboard in bootlegger mode -4. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. Don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. +4. Before plugging in your keyboard into your computer, hold SPACE and B keys down +5. Plug the computer in, which will put the keyboard in bootlegger mode +6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. Don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. You don't have to unplug the keyboard. From 5a86db22592cc23d42803e08fc83e0e22f100cc8 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 13:04:48 -0700 Subject: [PATCH 004/331] Update README.md --- keyboards/dz60/keymaps/billiams/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index ea8d326a3a41..9db5d2174a93 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -1,6 +1,6 @@ ## Billiam's DZ60 layout -This layout is optimized for MacOS is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow +This layout is optimized for MacOS and is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow cluster in the bottom right. Don't use this layout if you didn't get Build 4, you will enter a world of pain Donny. Settings: From fa73d43818e3e2a7dcd4b0982ca1e7a33b25c499 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 13:05:34 -0700 Subject: [PATCH 005/331] Update README.md --- keyboards/dz60/keymaps/billiams/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index 9db5d2174a93..b9756ac2ebd1 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -8,7 +8,7 @@ Settings: * The capslock key is replaced with a second function key. * The Alt an Cmd keys are swapped to replicate the Mac layout. * Del is available as Fn+Backspace -* / ? are available when you tap the right shift. Otherwise RShift is shift when held down +* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * RESET is available as Fn+Esc * Underglow toggle and mode selection are available as Fn+A and Fn+S * Media play/pause doesn't seem to work with anything but iTunes at the moment. FML From 7f8b0906c60e3d659089bfe7ab4ea7dfa65eb9a4 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 13:06:40 -0700 Subject: [PATCH 006/331] Update README.md --- keyboards/dz60/keymaps/billiams/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index b9756ac2ebd1..641bcd930349 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -7,10 +7,10 @@ Settings: * The capslock key is replaced with a second function key. * The Alt an Cmd keys are swapped to replicate the Mac layout. -* Del is available as Fn+Backspace +* Del is available as `Fn` + `Backspace` * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down -* RESET is available as Fn+Esc -* Underglow toggle and mode selection are available as Fn+A and Fn+S +* RESET is available as `Fn`+ ` ESC` +* Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S` * Media play/pause doesn't seem to work with anything but iTunes at the moment. FML From 5b80e10b8239b038719355441989ef392572cdd6 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 13:07:59 -0700 Subject: [PATCH 007/331] Update README.md --- keyboards/dz60/keymaps/billiams/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index 641bcd930349..dda19fe0fd1f 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -5,7 +5,7 @@ cluster in the bottom right. Don't use this layout if you didn't get Build 4, yo Settings: -* The capslock key is replaced with a second function key. +* The `CAPS LOCK` key is replaced with a second function key. * The Alt an Cmd keys are swapped to replicate the Mac layout. * Del is available as `Fn` + `Backspace` * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down From 472060d3338b509f82fc4c1cfaa6c0483109dfed Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 13:11:16 -0700 Subject: [PATCH 008/331] Update README.md --- keyboards/dz60/keymaps/billiams/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index dda19fe0fd1f..22c09cb8f807 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -10,7 +10,7 @@ Settings: * Del is available as `Fn` + `Backspace` * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * RESET is available as `Fn`+ ` ESC` -* Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S` +* Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! * Media play/pause doesn't seem to work with anything but iTunes at the moment. FML @@ -32,11 +32,11 @@ make dz60:billiams # be in the qmk_firmware directory to do this ``` A hex file `dz60_billiams.hex` will be created in the base qmk_firmware directory -4. Before plugging in your keyboard into your computer, hold SPACE and B keys down -5. Plug the computer in, which will put the keyboard in bootlegger mode -6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. Don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. +4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down +5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode +6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. -Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. You don't have to unplug the keyboard. +Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard. Hope this helps! From dc3a8ddb6be228d5385b1d10982715c6072d740b Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 13:59:07 -0700 Subject: [PATCH 009/331] Update README.md --- keyboards/dz60/keymaps/billiams/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index 22c09cb8f807..5a3a7213f86c 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -6,7 +6,7 @@ cluster in the bottom right. Don't use this layout if you didn't get Build 4, yo Settings: * The `CAPS LOCK` key is replaced with a second function key. -* The Alt an Cmd keys are swapped to replicate the Mac layout. +* The `ALT` and `CMD` keys are swapped to replicate the Mac layout. * Del is available as `Fn` + `Backspace` * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * RESET is available as `Fn`+ ` ESC` From 42cb78f98eb3ab0e4de638ec8e0db99fcab8d4a4 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 17:01:18 -0700 Subject: [PATCH 010/331] Made requested changes in PR. --- keyboards/dz60/keymaps/billiams/keymap.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c index 596ec19dbfd7..88ce0f329ca3 100644 --- a/keyboards/dz60/keymaps/billiams/keymap.c +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define ______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -19,10 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_directional( - KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, ______, KC_BSPC, + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, ______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -41,10 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_directional( - ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, KC_DEL, - ______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, ______, ______, KC_MUTE, KC__VOLDOWN, KC__VOLUP, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MRWD, KC_MFFD, - KC_MPLY, ______, ______, ______, ______, ______, ______, ______, ______, KC_BRID, KC_BRIU, ______, ______, KC_PGUP, RESET, - ______, ______, ______, ______, ______, ______, ______, ______, KC_HOME, KC_PGDOWN, KC_END + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC_MFFD, + KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END ), }; From da1dc28d31f1d48d558ad88bd2b5b5cdd4fa15cb Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 17:06:32 -0700 Subject: [PATCH 011/331] Rename README.md to readme.md --- keyboards/dz60/keymaps/billiams/{README.md => readme.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/dz60/keymaps/billiams/{README.md => readme.md} (100%) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/readme.md similarity index 100% rename from keyboards/dz60/keymaps/billiams/README.md rename to keyboards/dz60/keymaps/billiams/readme.md From a41e6804fcf97ac85a1b21c923df12a2fcaf9f7a Mon Sep 17 00:00:00 2001 From: William Chang Date: Mon, 22 Apr 2019 14:56:30 -0700 Subject: [PATCH 012/331] swapped media control keys --- keyboards/dz60/keymaps/billiams/README.md | 5 ++--- keyboards/dz60/keymaps/billiams/keymap.c | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/README.md b/keyboards/dz60/keymaps/billiams/README.md index 5a3a7213f86c..b8d8f4014bd2 100644 --- a/keyboards/dz60/keymaps/billiams/README.md +++ b/keyboards/dz60/keymaps/billiams/README.md @@ -11,7 +11,6 @@ Settings: * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * RESET is available as `Fn`+ ` ESC` * Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! -* Media play/pause doesn't seem to work with anything but iTunes at the moment. FML ### Initial Installation @@ -61,9 +60,9 @@ FN Layer ,-----------------------------------------------------------------------------------------. | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | |-----------------------------------------------------------------------------------------+ -| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ | +| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Prev | Next | |-----------------------------------------------------------------------------------------+ -| | | | | | | | | | | Prev | Next | Play/Pause | +| | | | | | | | | | | Vol- | Vol+ | Play/Pause | |-----------------------------------------------------------------------------------------+ | | | | | | | | |Scr- |Scr+ | | PG_UP |RESET| |-----------------------------------------------------------------------------------------+ diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c index 88ce0f329ca3..9311b33d95f4 100644 --- a/keyboards/dz60/keymaps/billiams/keymap.c +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -28,9 +28,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | * |-----------------------------------------------------------------------------------------+ - * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ | + * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | Prev | Next | Play/Pause | + * | | | | | | | | | | | Vol- | Vol+ | Play/Pause | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET| * |-----------------------------------------------------------------------------------------+ @@ -40,8 +40,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_directional( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, - _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC_MFFD, + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, KC_MRWD, KC_MFFD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END ), From 89e8e0d2774064362fa5e73d19df3b1e760d7016 Mon Sep 17 00:00:00 2001 From: William Chang Date: Thu, 25 Apr 2019 10:27:04 -0700 Subject: [PATCH 013/331] updated right alt key to apply shift key for emacs --- keyboards/dz60/keymaps/billiams/keymap.c | 4 ++-- keyboards/dz60/keymaps/billiams/readme.md | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c index 9311b33d95f4..c5b27ae4ec51 100644 --- a/keyboards/dz60/keymaps/billiams/keymap.c +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC | * |-----------------------------------------------------------------------------------------+ - * | Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R | + * | Ctrl | Opt | Cmd | Space | Alt | Fn | L | D | R | * `-----------------------------------------------------------------------------------------' */ @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, LSFT(KC_RALT), MO(1), KC_LEFT, KC_DOWN, KC_RIGHT ), /* FN Layer diff --git a/keyboards/dz60/keymaps/billiams/readme.md b/keyboards/dz60/keymaps/billiams/readme.md index b8d8f4014bd2..f618670dd44b 100644 --- a/keyboards/dz60/keymaps/billiams/readme.md +++ b/keyboards/dz60/keymaps/billiams/readme.md @@ -10,6 +10,7 @@ Settings: * Del is available as `Fn` + `Backspace` * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * RESET is available as `Fn`+ ` ESC` +* Right `ALT` sends a Left Shift with the unshifted keycode (for emacs convenience) * Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! @@ -50,7 +51,7 @@ Hope this helps! |-----------------------------------------------------------------------------------------+ | Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC | |-----------------------------------------------------------------------------------------+ -| Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R | +| Ctrl | Opt | Cmd | Space | Alt | Fn | L | D | R | `-----------------------------------------------------------------------------------------' ``` From 57a6ea11df685d84a1ea07953e88f224ce2b24f7 Mon Sep 17 00:00:00 2001 From: William Chang Date: Thu, 25 Apr 2019 10:38:18 -0700 Subject: [PATCH 014/331] updated R_Alt to remove shift --- keyboards/dz60/keymaps/billiams/keymap.c | 4 ++-- keyboards/dz60/keymaps/billiams/readme.md | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c index c5b27ae4ec51..9de51fbfb3b2 100644 --- a/keyboards/dz60/keymaps/billiams/keymap.c +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC | * |-----------------------------------------------------------------------------------------+ - * | Ctrl | Opt | Cmd | Space | Alt | Fn | L | D | R | + * | Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R | * `-----------------------------------------------------------------------------------------' */ @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, LSFT(KC_RALT), MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT ), /* FN Layer diff --git a/keyboards/dz60/keymaps/billiams/readme.md b/keyboards/dz60/keymaps/billiams/readme.md index f618670dd44b..a5ecb71f53f7 100644 --- a/keyboards/dz60/keymaps/billiams/readme.md +++ b/keyboards/dz60/keymaps/billiams/readme.md @@ -10,7 +10,6 @@ Settings: * Del is available as `Fn` + `Backspace` * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * RESET is available as `Fn`+ ` ESC` -* Right `ALT` sends a Left Shift with the unshifted keycode (for emacs convenience) * Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! @@ -51,7 +50,7 @@ Hope this helps! |-----------------------------------------------------------------------------------------+ | Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC | |-----------------------------------------------------------------------------------------+ -| Ctrl | Opt | Cmd | Space | Alt | Fn | L | D | R | +| Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R | `-----------------------------------------------------------------------------------------' ``` From 7b0200660ee23b4bec278747ec010d16575bce42 Mon Sep 17 00:00:00 2001 From: William Chang Date: Thu, 9 May 2019 20:59:11 -0700 Subject: [PATCH 015/331] Updated readme --- keyboards/dz60/keymaps/billiams/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/keymaps/billiams/readme.md b/keyboards/dz60/keymaps/billiams/readme.md index a5ecb71f53f7..209f2686b63c 100644 --- a/keyboards/dz60/keymaps/billiams/readme.md +++ b/keyboards/dz60/keymaps/billiams/readme.md @@ -10,7 +10,7 @@ Settings: * Del is available as `Fn` + `Backspace` * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * RESET is available as `Fn`+ ` ESC` -* Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! +* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! ### Initial Installation From 6bcaf01c3f4625c536f25ca5ab75fa0e136a598d Mon Sep 17 00:00:00 2001 From: William Chang Date: Wed, 20 Nov 2019 23:03:47 -0800 Subject: [PATCH 016/331] add layout 2 and rename existing folder to layout 4 - renamed existing folder with directional layout to layout 4 - udpated existing readme - Added layout_60_2 --- .../build_flash.sh | 6 +- .../{billiams => billiams_layout2}/config.h | 0 .../dz60/keymaps/billiams_layout2/keymap.c | 48 +++++++++++++ .../dz60/keymaps/billiams_layout2/readme.md | 68 ++++++++++++++++++ .../keymaps/billiams_layout4/build_flash.sh | 9 +++ .../dz60/keymaps/billiams_layout4/config.h | 1 + .../dz60/keymaps/billiams_layout4/keymap.c | 48 +++++++++++++ .../dz60/keymaps/billiams_layout4/readme.md | 71 +++++++++++++++++++ 8 files changed, 248 insertions(+), 3 deletions(-) rename keyboards/dz60/keymaps/{billiams => billiams_layout2}/build_flash.sh (64%) rename keyboards/dz60/keymaps/{billiams => billiams_layout2}/config.h (100%) create mode 100644 keyboards/dz60/keymaps/billiams_layout2/keymap.c create mode 100644 keyboards/dz60/keymaps/billiams_layout2/readme.md create mode 100644 keyboards/dz60/keymaps/billiams_layout4/build_flash.sh create mode 100644 keyboards/dz60/keymaps/billiams_layout4/config.h create mode 100644 keyboards/dz60/keymaps/billiams_layout4/keymap.c create mode 100644 keyboards/dz60/keymaps/billiams_layout4/readme.md diff --git a/keyboards/dz60/keymaps/billiams/build_flash.sh b/keyboards/dz60/keymaps/billiams_layout2/build_flash.sh similarity index 64% rename from keyboards/dz60/keymaps/billiams/build_flash.sh rename to keyboards/dz60/keymaps/billiams_layout2/build_flash.sh index e7a81114415c..db4882ec9240 100644 --- a/keyboards/dz60/keymaps/billiams/build_flash.sh +++ b/keyboards/dz60/keymaps/billiams_layout2/build_flash.sh @@ -3,7 +3,7 @@ # dfu-programmer atmega32u4 reset # run this in the qmk_firmware directory -make dz60:billiams +make dz60:billiams_layout2 dfu-programmer atmega32u4 erase --force && \ -dfu-programmer atmega32u4 flash dz60_billiams.hex && \ -dfu-programmer atmega32u4 reset \ No newline at end of file +dfu-programmer atmega32u4 flash dz60_billiams_layout2.hex && \ +dfu-programmer atmega32u4 reset diff --git a/keyboards/dz60/keymaps/billiams/config.h b/keyboards/dz60/keymaps/billiams_layout2/config.h similarity index 100% rename from keyboards/dz60/keymaps/billiams/config.h rename to keyboards/dz60/keymaps/billiams_layout2/config.h diff --git a/keyboards/dz60/keymaps/billiams_layout2/keymap.c b/keyboards/dz60/keymaps/billiams_layout2/keymap.c new file mode 100644 index 000000000000..6f0ae55d1473 --- /dev/null +++ b/keyboards/dz60/keymaps/billiams_layout2/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | ESC | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Cmd | Alt | Ctrl | Fn | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_60_2_function( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_ESCAPE, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(1) + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute| Prev | Next | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | Left| Down| Up |Right| | | Play/Pause | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |Scr- |Scr+ | | | |RESET| + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_60_2_function( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC__VOLDOWN, KC__VOLUP, + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, KC_MUTE, KC_MRWD, KC_MFFD, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/dz60/keymaps/billiams_layout2/readme.md b/keyboards/dz60/keymaps/billiams_layout2/readme.md new file mode 100644 index 000000000000..bef96f4671d5 --- /dev/null +++ b/keyboards/dz60/keymaps/billiams_layout2/readme.md @@ -0,0 +1,68 @@ +## Billiam's DZ60 60_2 layout (KBDFANS Layout 2 with split backspace and split right shift) + +This layout is optimized for MacOS and is for a Build 2 DZ60 with a 2U left shift, 1.75U right shift and no arrow cluster. Don't use this layout if you didn't get Build 2, you will enter a world of pain Donny. + +Settings: + +* The `CAPS LOCK` key is a function key. +* The `ALT` and `CMD` keys are swapped to replicate the Mac layout. +* RESET is available as `Fn`+ ` ESC` +* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! +* vim-style arrow key bindings H J K L in layer 1 + +### Initial Installation + +I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process. + +1. Clone the qmk_firmware repo locally +``` +# Choose one: +git clone git@github.com:qmk/qmk_firmware.git # OR +git clone https://github.com/qmk/qmk_firmware.git +``` +2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`. + +3. Build your hex file +``` +make dz60:billiams_layout2 # be in the qmk_firmware directory to do this +``` +A hex file `dz60_billiams_layout2.hex` will be created in the base qmk_firmware directory + +4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down +5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode +6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. + +Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard. + +Hope this helps! + +### 0 Qwerty +``` +,-----------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | DEL | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | ESC | +|-----------------------------------------------------------------------------------------+ +| Ctrl | Alt | Cmd | Space | Cmd | Alt | Ctrl | Fn | +`-----------------------------------------------------------------------------------------' +``` + +### 1 Fn Layer +``` +FN Layer +,-----------------------------------------------------------------------------------------. +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ | +|-----------------------------------------------------------------------------------------+ +| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next | +|-----------------------------------------------------------------------------------------+ +| | | | | | | Left| Down| Up |Right| | | Play/Pause | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | |Scr- |Scr+ | | | | RESET | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` diff --git a/keyboards/dz60/keymaps/billiams_layout4/build_flash.sh b/keyboards/dz60/keymaps/billiams_layout4/build_flash.sh new file mode 100644 index 000000000000..bcc9ee99b96a --- /dev/null +++ b/keyboards/dz60/keymaps/billiams_layout4/build_flash.sh @@ -0,0 +1,9 @@ +# dfu-programmer atmega32u4 erase --force +# dfu-programmer atmega32u4 flash /path/to/firmware.hex +# dfu-programmer atmega32u4 reset + +# run this in the qmk_firmware directory +make dz60:billiams_layout4 +dfu-programmer atmega32u4 erase --force && \ +dfu-programmer atmega32u4 flash dz60_billiams_layout4.hex && \ +dfu-programmer atmega32u4 reset diff --git a/keyboards/dz60/keymaps/billiams_layout4/config.h b/keyboards/dz60/keymaps/billiams_layout4/config.h new file mode 100644 index 000000000000..9560d51a6f94 --- /dev/null +++ b/keyboards/dz60/keymaps/billiams_layout4/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/billiams_layout4/keymap.c b/keyboards/dz60/keymaps/billiams_layout4/keymap.c new file mode 100644 index 000000000000..b1c75d9036ea --- /dev/null +++ b/keyboards/dz60/keymaps/billiams_layout4/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | Left| Down| Up |Right| | | Play/Pause | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET| + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | HOME|PG_DN| END | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_MUTE, KC__VOLDOWN, KC__VOLUP, KC_MRWD, KC_MFFD, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END + ), +}; diff --git a/keyboards/dz60/keymaps/billiams_layout4/readme.md b/keyboards/dz60/keymaps/billiams_layout4/readme.md new file mode 100644 index 000000000000..37bbd6a65d1e --- /dev/null +++ b/keyboards/dz60/keymaps/billiams_layout4/readme.md @@ -0,0 +1,71 @@ +## Billiam's DZ60 Directional layout + +This layout is optimized for MacOS and is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow +cluster in the bottom right. Don't use this layout if you didn't get Build 4, you will enter a world of pain Donny. + +Settings: + +* The `CAPS LOCK` key is replaced with a second function key. +* The `ALT` and `CMD` keys are swapped to replicate the Mac layout. +* Del is available as `Fn` + `Backspace` +* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down +* RESET is available as `Fn`+ ` ESC` +* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! +* vim-style arrow key bindings H J K L in layer 1 + +### Initial Installation + +I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process. + +1. Clone the qmk_firmware repo locally +``` +# Choose one: +git clone git@github.com:qmk/qmk_firmware.git # OR +git clone https://github.com/qmk/qmk_firmware.git +``` +2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`. + +3. Build your hex file +``` +make dz60:billiams_layout4 # be in the qmk_firmware directory to do this +``` +A hex file `dz60_billiams_layout4.hex` will be created in the base qmk_firmware directory + +4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down +5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode +6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. + +Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard. + +Hope this helps! + +### 0 Qwerty +``` +,-----------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC | +|-----------------------------------------------------------------------------------------+ +| Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R | +`-----------------------------------------------------------------------------------------' +``` + +### 1 Fn Layer +``` +FN Layer +,-----------------------------------------------------------------------------------------. +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | +|-----------------------------------------------------------------------------------------+ +| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next | +|-----------------------------------------------------------------------------------------+ +| | | | | | | Left| Down| Up |Right| | | Play/Pause | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET| +|-----------------------------------------------------------------------------------------+ +| | | | | | | HOME | PG_DN | END | +`-----------------------------------------------------------------------------------------' +``` From e7541faadc27b53efc8421757a6354654f1a22b4 Mon Sep 17 00:00:00 2001 From: William Chang Date: Fri, 6 Dec 2019 17:05:36 -0800 Subject: [PATCH 017/331] update flash script per pull request review --- keyboards/dz60/keymaps/billiams_layout2/build_flash.sh | 5 +---- keyboards/dz60/keymaps/billiams_layout4/build_flash.sh | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams_layout2/build_flash.sh b/keyboards/dz60/keymaps/billiams_layout2/build_flash.sh index db4882ec9240..116b0bf336e3 100644 --- a/keyboards/dz60/keymaps/billiams_layout2/build_flash.sh +++ b/keyboards/dz60/keymaps/billiams_layout2/build_flash.sh @@ -3,7 +3,4 @@ # dfu-programmer atmega32u4 reset # run this in the qmk_firmware directory -make dz60:billiams_layout2 -dfu-programmer atmega32u4 erase --force && \ -dfu-programmer atmega32u4 flash dz60_billiams_layout2.hex && \ -dfu-programmer atmega32u4 reset +make dz60:billiams_layout2:flash diff --git a/keyboards/dz60/keymaps/billiams_layout4/build_flash.sh b/keyboards/dz60/keymaps/billiams_layout4/build_flash.sh index bcc9ee99b96a..8f9988ca0cb5 100644 --- a/keyboards/dz60/keymaps/billiams_layout4/build_flash.sh +++ b/keyboards/dz60/keymaps/billiams_layout4/build_flash.sh @@ -3,7 +3,4 @@ # dfu-programmer atmega32u4 reset # run this in the qmk_firmware directory -make dz60:billiams_layout4 -dfu-programmer atmega32u4 erase --force && \ -dfu-programmer atmega32u4 flash dz60_billiams_layout4.hex && \ -dfu-programmer atmega32u4 reset +make dz60:billiams_layout4:flash From 1290039d7e5be1985d183e93d65cca18e828e8f8 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 7 Dec 2019 12:50:41 -0800 Subject: [PATCH 018/331] Added keymap profile to space65 - This keymap profile is for MacOS with VIM key bindings - See readme for more information --- .../space65/keymaps/billiams/config.h | 20 +++ .../space65/keymaps/billiams/keymap.c | 125 ++++++++++++++++++ .../space65/keymaps/billiams/readme.md | 81 ++++++++++++ 3 files changed, 226 insertions(+) create mode 100644 keyboards/gray_studio/space65/keymaps/billiams/config.h create mode 100644 keyboards/gray_studio/space65/keymaps/billiams/keymap.c create mode 100644 keyboards/gray_studio/space65/keymaps/billiams/readme.md diff --git a/keyboards/gray_studio/space65/keymaps/billiams/config.h b/keyboards/gray_studio/space65/keymaps/billiams/config.h new file mode 100644 index 000000000000..c2fdc91084f9 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/billiams/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/gray_studio/space65/keymaps/billiams/keymap.c b/keyboards/gray_studio/space65/keymaps/billiams/keymap.c new file mode 100644 index 000000000000..838b3d13e71f --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/billiams/keymap.c @@ -0,0 +1,125 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del | INS | + * |------------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | PGUP | + * |------------------------------------------------------------------------------------------------+ + * | Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PGDN | + * |------------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | up | ESC | + * |------------------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Alt | Ctrl | Left | Down | Right | + * `------------------------------------------------------------------------------------------------' + */ + +[0] = LAYOUT( \ + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_INS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_ESC, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /* 1st Layer + * ,------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ | Next | + * |------------------------------------------------------------------------------------------------+ + * | |RGB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | | | | Prev | + * |------------------------------------------------------------------------------------------------+ + * | | | | | | | Left| Down| Up |Right| | | Play/Pause | Vol+ | + * |------------------------------------------------------------------------------------------------+ + * | | | | | | | | | | Scr- | Scr+ | | |PGUP | Vol- | + * |------------------------------------------------------------------------------------------------+ + * | | | | | | Fn2 | HOME | PGDN | END | + * `------------------------------------------------------------------------------------------------' + */ + +[1] = LAYOUT( \ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MFFD, \ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLU, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGDN, KC_END \ + ), + + /* 2nd Layer + * ,------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | | + * |------------------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | RESET | + * |------------------------------------------------------------------------------------------------+ + * | | | | | | | | | | + * `------------------------------------------------------------------------------------------------' + */ + +[2] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/gray_studio/space65/keymaps/billiams/readme.md b/keyboards/gray_studio/space65/keymaps/billiams/readme.md new file mode 100644 index 000000000000..daebc2e9daa3 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/billiams/readme.md @@ -0,0 +1,81 @@ +## Billiam's Space65 layout (with split backspace) + +This layout is optimized for vim users on MacOS with a split backspace. + +Settings: + +* The `CAPS LOCK` key is a function key. +* The `ALT` and `CMD` keys are swapped to replicate the Mac layout. +* RESET is available as `Fn`+ `Right Ctrl` + `ESC` +* Underglow toggle is available as `Fn` + `Q`. +* Backlighting toggle is available as `Fn` + `Z` +* vim-style arrow key bindings H J K L in layer 1 + +### Initial Installation + +I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process. + +1. Fork and Clone the qmk_firmware repo locally +``` +# Choose one: +git clone git@github.com:qmk/qmk_firmware.git # OR +git clone https://github.com/qmk/qmk_firmware.git +``` +2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/gray_studio/space65/keymaps). I copied the default and changed it to my liking. +3. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down +4. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode. Note that if you've done this before, it could be that you need to simply press `ESC` prior to plugging in the board to put it in Bootlegger mode. +5. Build your hex file and flash your keyboard +``` +make gray_studio/space65:billiams:flash # be in the qmk_firmware directory to do this +``` + +Notes: +- If you are using QMK Toolbox, use `make gray_studio/space65:` in the base qmk_firmware directory instead of step 5 above which will create a hex file like `space65_billiams.hex` which you can then choose in the toolbox and hit flash +- If you accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootlegger mode again, hold the `ESC` key and plug the board in. + +Hope this helps! + +### 0 Qwerty +``` +,------------------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del | INS | +|------------------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | PGUP | +|------------------------------------------------------------------------------------------------+ +| Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PGDN | +|------------------------------------------------------------------------------------------------+ +| Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | up | ESC | +|------------------------------------------------------------------------------------------------+ +| Ctrl | Alt | Cmd | Space | Alt | Ctrl | Left | Down | Right | +`------------------------------------------------------------------------------------------------' +``` + +### 1 Fn Layer +``` +,------------------------------------------------------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ | Next | +|------------------------------------------------------------------------------------------------+ +| |RGB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | | | | Prev | +|------------------------------------------------------------------------------------------------+ +| | | | | | | Left| Down| Up |Right| | | Play/Pause | Vol+ | +|------------------------------------------------------------------------------------------------+ +| | | | | | | | | | Scr- | Scr+ | | |PGUP | Vol- | +|------------------------------------------------------------------------------------------------+ +| | | | | | Fn2 | HOME | PGDN | END | +`------------------------------------------------------------------------------------------------' +``` + +### 2 Fn Layer - Just for bootleg mode button +``` +,------------------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | | | | +|------------------------------------------------------------------------------------------------+ +| | | | | | | | | | | | | | | | +|------------------------------------------------------------------------------------------------+ +| | | | | | | | | | | | | | | +|------------------------------------------------------------------------------------------------+ +| | | | | | | | | | | | | | | RESET | +|------------------------------------------------------------------------------------------------+ +| | | | | | | | | | +`------------------------------------------------------------------------------------------------' +``` From d5e0f217980f9c1cdae627af5530154f845aa660 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sun, 8 Dec 2019 10:31:33 -0800 Subject: [PATCH 019/331] Update keyboards/gray_studio/space65/keymaps/billiams/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/gray_studio/space65/keymaps/billiams/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gray_studio/space65/keymaps/billiams/readme.md b/keyboards/gray_studio/space65/keymaps/billiams/readme.md index daebc2e9daa3..24715abd4fbe 100644 --- a/keyboards/gray_studio/space65/keymaps/billiams/readme.md +++ b/keyboards/gray_studio/space65/keymaps/billiams/readme.md @@ -65,7 +65,7 @@ Hope this helps! `------------------------------------------------------------------------------------------------' ``` -### 2 Fn Layer - Just for bootleg mode button +### 2 Fn Layer - Just for bootloader mode button ``` ,------------------------------------------------------------------------------------------------. | | | | | | | | | | | | | | | | | From 3cd7cb81d4835c0b7acb79db6b96abfb4a344ea1 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sun, 8 Dec 2019 10:32:38 -0800 Subject: [PATCH 020/331] Update keyboards/gray_studio/space65/keymaps/billiams/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/gray_studio/space65/keymaps/billiams/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gray_studio/space65/keymaps/billiams/readme.md b/keyboards/gray_studio/space65/keymaps/billiams/readme.md index 24715abd4fbe..b46d7fa94846 100644 --- a/keyboards/gray_studio/space65/keymaps/billiams/readme.md +++ b/keyboards/gray_studio/space65/keymaps/billiams/readme.md @@ -31,7 +31,7 @@ make gray_studio/space65:billiams:flash # be in the qmk_firmware directory to do Notes: - If you are using QMK Toolbox, use `make gray_studio/space65:` in the base qmk_firmware directory instead of step 5 above which will create a hex file like `space65_billiams.hex` which you can then choose in the toolbox and hit flash -- If you accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootlegger mode again, hold the `ESC` key and plug the board in. +- If you accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootloader mode again, hold the `ESC` key and plug the board in. Hope this helps! From 6e463c8084f61202be3bc7a748ab9eeca9e6bfe8 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sun, 8 Dec 2019 10:32:55 -0800 Subject: [PATCH 021/331] Update keyboards/gray_studio/space65/keymaps/billiams/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/gray_studio/space65/keymaps/billiams/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gray_studio/space65/keymaps/billiams/readme.md b/keyboards/gray_studio/space65/keymaps/billiams/readme.md index b46d7fa94846..58a1e8afe633 100644 --- a/keyboards/gray_studio/space65/keymaps/billiams/readme.md +++ b/keyboards/gray_studio/space65/keymaps/billiams/readme.md @@ -30,7 +30,7 @@ make gray_studio/space65:billiams:flash # be in the qmk_firmware directory to do ``` Notes: -- If you are using QMK Toolbox, use `make gray_studio/space65:` in the base qmk_firmware directory instead of step 5 above which will create a hex file like `space65_billiams.hex` which you can then choose in the toolbox and hit flash +- If you are using QMK Toolbox, use `make gray_studio/space65:` in the base qmk_firmware directory instead of step 5 above which will create a hex file `gray_studio_space65_billiams.hex` which you can then choose in the toolbox and hit flash - If you accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootloader mode again, hold the `ESC` key and plug the board in. Hope this helps! From dc2ed13a1ccd96fdeb7b01ae1b39bf3e313ed901 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sun, 8 Dec 2019 10:33:06 -0800 Subject: [PATCH 022/331] Update keyboards/gray_studio/space65/keymaps/billiams/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/gray_studio/space65/keymaps/billiams/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gray_studio/space65/keymaps/billiams/readme.md b/keyboards/gray_studio/space65/keymaps/billiams/readme.md index 58a1e8afe633..8941bfcd0c35 100644 --- a/keyboards/gray_studio/space65/keymaps/billiams/readme.md +++ b/keyboards/gray_studio/space65/keymaps/billiams/readme.md @@ -23,7 +23,7 @@ git clone https://github.com/qmk/qmk_firmware.git ``` 2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/gray_studio/space65/keymaps). I copied the default and changed it to my liking. 3. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down -4. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode. Note that if you've done this before, it could be that you need to simply press `ESC` prior to plugging in the board to put it in Bootlegger mode. +4. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootloader mode. Note that if you've done this before, it could be that you need to simply press `ESC` prior to plugging in the board to put it in Bootloader mode. 5. Build your hex file and flash your keyboard ``` make gray_studio/space65:billiams:flash # be in the qmk_firmware directory to do this From 013ac11c958feb1fc9e1fff491bf1ec6807873ac Mon Sep 17 00:00:00 2001 From: William Chang Date: Sun, 8 Dec 2019 10:34:24 -0800 Subject: [PATCH 023/331] Update keyboards/gray_studio/space65/keymaps/billiams/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/gray_studio/space65/keymaps/billiams/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gray_studio/space65/keymaps/billiams/keymap.c b/keyboards/gray_studio/space65/keymaps/billiams/keymap.c index 838b3d13e71f..87d0c207cda1 100644 --- a/keyboards/gray_studio/space65/keymaps/billiams/keymap.c +++ b/keyboards/gray_studio/space65/keymaps/billiams/keymap.c @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ ), }; From 2d94e02ea1e0c3baf91669e7c326dfc4c503d8c9 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sun, 8 Dec 2019 10:39:26 -0800 Subject: [PATCH 024/331] remove unnecessary code from keymap --- .../space65/keymaps/billiams/keymap.c | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/keyboards/gray_studio/space65/keymaps/billiams/keymap.c b/keyboards/gray_studio/space65/keymaps/billiams/keymap.c index 838b3d13e71f..3ff04708e924 100644 --- a/keyboards/gray_studio/space65/keymaps/billiams/keymap.c +++ b/keyboards/gray_studio/space65/keymaps/billiams/keymap.c @@ -15,12 +15,6 @@ */ #include QMK_KEYBOARD_H -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -89,37 +83,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ ), }; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; -} - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} From dff4f13c195ff8b799e886ec671d40d1448b55b9 Mon Sep 17 00:00:00 2001 From: William Chang Date: Wed, 1 Jan 2020 22:31:00 -0800 Subject: [PATCH 025/331] updated keys and cleaned up readme --- .../space65/keymaps/billiams/keymap.c | 30 +++++++++---------- .../space65/keymaps/billiams/readme.md | 11 ++++--- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/keyboards/gray_studio/space65/keymaps/billiams/keymap.c b/keyboards/gray_studio/space65/keymaps/billiams/keymap.c index e1fd72e35f25..9a0a00403326 100644 --- a/keyboards/gray_studio/space65/keymaps/billiams/keymap.c +++ b/keyboards/gray_studio/space65/keymaps/billiams/keymap.c @@ -19,24 +19,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,------------------------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del | INS | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | DEL | INS | * |------------------------------------------------------------------------------------------------+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | PGUP | * |------------------------------------------------------------------------------------------------+ * | Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PGDN | * |------------------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | up | ESC | + * | Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | Up | ESC | * |------------------------------------------------------------------------------------------------+ * | Ctrl | Alt | Cmd | Space | Alt | Ctrl | Left | Down | Right | * `------------------------------------------------------------------------------------------------' */ [0] = LAYOUT( \ - KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_INS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, \ - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ - KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_ESC, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_INS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_ESC, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), /* 1st Layer @@ -45,20 +45,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------------------------------------------------------------------------------------------+ * | |RGB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | | | | Prev | * |------------------------------------------------------------------------------------------------+ - * | | | | | | | Left| Down| Up |Right| | | Play/Pause | Vol+ | + * | | RGBP | RGPG | RGPK | | | Left| Down| Up |Right| | | Play/Pause | | * |------------------------------------------------------------------------------------------------+ - * | | | | | | | | | | Scr- | Scr+ | | |PGUP | Vol- | + * | | | | | | | | | | Scr- | Scr+ | | | PGUP | | * |------------------------------------------------------------------------------------------------+ * | | | | | | Fn2 | HOME | PGDN | END | * `------------------------------------------------------------------------------------------------' */ [1] = LAYOUT( \ - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MFFD, \ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLU, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGDN, KC_END \ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, KC_MFFD, \ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, \ + KC_TRNS, RGB_M_P, RGB_M_G, RGB_M_K, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGDN, KC_END \ ), /* 2nd Layer @@ -80,6 +80,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ ), }; diff --git a/keyboards/gray_studio/space65/keymaps/billiams/readme.md b/keyboards/gray_studio/space65/keymaps/billiams/readme.md index 8941bfcd0c35..bf14fbfe949b 100644 --- a/keyboards/gray_studio/space65/keymaps/billiams/readme.md +++ b/keyboards/gray_studio/space65/keymaps/billiams/readme.md @@ -8,7 +8,6 @@ Settings: * The `ALT` and `CMD` keys are swapped to replicate the Mac layout. * RESET is available as `Fn`+ `Right Ctrl` + `ESC` * Underglow toggle is available as `Fn` + `Q`. -* Backlighting toggle is available as `Fn` + `Z` * vim-style arrow key bindings H J K L in layer 1 ### Initial Installation @@ -22,8 +21,8 @@ git clone git@github.com:qmk/qmk_firmware.git # OR git clone https://github.com/qmk/qmk_firmware.git ``` 2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/gray_studio/space65/keymaps). I copied the default and changed it to my liking. -3. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down -4. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootloader mode. Note that if you've done this before, it could be that you need to simply press `ESC` prior to plugging in the board to put it in Bootloader mode. +3. Before plugging in your keyboard into your computer, hold `ESC` key down +4. Plug the keyboard into your computer, which will put the keyboard in bootloader mode. 5. Build your hex file and flash your keyboard ``` make gray_studio/space65:billiams:flash # be in the qmk_firmware directory to do this @@ -55,11 +54,11 @@ Hope this helps! ,------------------------------------------------------------------------------------------------. | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ | Next | |------------------------------------------------------------------------------------------------+ -| |RGB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | | | | Prev | +| |RGB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Spd- | Spd+ | | | | Prev | |------------------------------------------------------------------------------------------------+ -| | | | | | | Left| Down| Up |Right| | | Play/Pause | Vol+ | +| | RGBP | RGBG | RGBK | | | Left| Down| Up |Right| | | Play/Pause | | |------------------------------------------------------------------------------------------------+ -| | | | | | | | | | Scr- | Scr+ | | |PGUP | Vol- | +| | | | | | | | | | Scr- | Scr+ | | |PGUP | | |------------------------------------------------------------------------------------------------+ | | | | | | Fn2 | HOME | PGDN | END | `------------------------------------------------------------------------------------------------' From 5cb83dd5d7c60f4f19905a6e35f30b6bbfe562be Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sun, 12 Jan 2020 16:10:21 -0600 Subject: [PATCH 026/331] Personal keymap updates for the new year (#7871) * Update keymaps for split ergo boards * Update keymaps for 60% boards --- keyboards/crkbd/keymaps/bcat/keymap.c | 18 +++++----- keyboards/crkbd/keymaps/bcat/readme.md | 6 ++-- keyboards/lily58/keymaps/bcat/keymap.c | 14 ++++---- keyboards/lily58/keymaps/bcat/readme.md | 34 ++++++++++--------- .../60_ansi_split_bs_rshift/bcat/keymap.c | 8 ++--- .../60_ansi_split_bs_rshift/bcat/readme.md | 4 +-- .../community/60_tsangan_hhkb/bcat/keymap.c | 8 ++--- .../community/60_tsangan_hhkb/bcat/readme.md | 4 +-- 8 files changed, 49 insertions(+), 47 deletions(-) diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index 59ed00b5d7d1..c9df7a1e31ee 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -23,25 +23,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ [LAYER_LOWER] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, _______, _______, KC_PIPE, KC_TILD, KC_DEL, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, - _______, _______, _______, KC_BSLS, KC_GRV, KC_INS, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_DEL, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, KC_APP, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______ ), /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7 */ [LAYER_RAISE] = LAYOUT( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_END, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */ [LAYER_ADJUST] = LAYOUT( - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_HUI, RGB_SAI, - _______, _______, _______, KC_MUTE, _______, _______, RGB_SPD, RGB_SPI, _______, _______, RGB_HUD, RGB_SAD, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______, + _______, _______, _______, KC_MUTE, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______, _______, _______, _______, RGB_TOG, _______, _______ ), }; diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md index aa2d943d18b8..e378f64cddb3 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -13,18 +13,18 @@ more details on the principles that went into the layout. ## Lower layer -![Lower layer layout](https://i.imgur.com/9ShGkJI.png) +![Lower layer layout](https://i.imgur.com/v4DjXM6.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) ## Raise layer -![Raise layer layout](https://i.imgur.com/HcmW99r.png) +![Raise layer layout](https://i.imgur.com/Wr6Ptyy.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/53qLnxo.png) +![Adjust layer layout](https://i.imgur.com/9OtGLCT.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee)) diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 9a85a55e1bcd..b0378d19a765 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -25,25 +25,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, _______, _______, KC_PIPE, KC_TILD, KC_DEL, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, - _______, _______, _______, KC_BSLS, KC_GRV, KC_INS, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_DEL, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, KC_APP, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823 */ [LAYER_RAISE] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_F11, KC_F12, _______, _______, KC_END, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7 */ [LAYER_ADJUST] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, + KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index f90c5110bcc6..fd3ba9b8ec5a 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -6,25 +6,26 @@ around the ESDF cluster in the adjust (raise + lower) layer. A few general principles went into this layout: * The number row is optional, as are the outermost bottom row keys and the -"extra" keys on the innnermost columns below the controllers. This will enable -easy translation to a Crkbd or similar 40% ortho if I go that route. +"extra" keys on the innnermost columns below the controllers. This allows me to +switch between this keyboard and a 40% like the +[Crkbd](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) +without breaking muscle memory. -* Space and Enter are on the big thumb keys so they're easy to press -(particularly with G20 or other low-profile keycaps there). +* Space and Enter are on the big thumb keys so they're easy to press. -* There are two shift keys because really, Right Shift is important. +* There are two shift keys because Right Shift is all that important, but just +because I don't have any better ideas for what to put there. * Arrow keys are on VIM-style HJKL keys. -* Home/End and Page Up/Page Down are easy to reach and in a square kind of like -on the HHKB. +* Home/End and Page Up/Page Down are equivalent to the arrow keys, but +translated down one row. -* Navigation should be usable with just the right hand, to enable left-handed -mousing at the same time. Additionally, Web page scrolling (Space, Shift+Space) -should be possible with just the left hand, for writing at the same time as -scrolling. +* Navigation is usable with just the right hand, to enable left-handed mousing +at the same time. Additionally, Web page scrolling (Space, Shift+Space) is +possible with just the left hand, for writing at the same time as scrolling. -* Escape is easy to reach because Vim. +* Escape is easy to reach because Vim is life. * Since most of the modifiers are on the left half, keys frequently pressed together with mods (e.g., numbers, function keys, etc.) are on the Raise layer @@ -40,8 +41,9 @@ allow typing numbers with thousand separators and decimal points without releasing the layer key. * Brackets and braces are on or near the home row for quick access when coding. +They're positioned below the parens on the Raise layer for easy recall. -* Other than Right Shift (sorry), modifiers aren't rebound on layers. +* For consistency, mods aren't rebound on layers (except for the Tab key). ## Default layer @@ -51,18 +53,18 @@ releasing the layer key. ## Lower layer -![Lower layer layout](https://i.imgur.com/ytNFySG.png) +![Lower layer layout](https://i.imgur.com/6ms2ll7.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) ## Raise layer -![Raise layer layout](https://i.imgur.com/S7S29G6.png) +![Raise layer layout](https://i.imgur.com/HBowZ0w.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/fCIySG2.png) +![Adjust layer layout](https://i.imgur.com/udhzfON.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7)) diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c index 92cc366aca21..ac5f2dcef71a 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915 */ [LAYER_FUNCTION] = LAYOUT_60_ansi_split_bs_rshift( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -31,9 +31,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ [LAYER_ADJUST] = LAYOUT_60_ansi_split_bs_rshift( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, RGB_VAI, _______, _______, - _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, _______, _______, KC_MUTE, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + _______, BL_BRTG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, + _______, BL_INC, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, BL_DEC, _______, KC_MUTE, _______, _______, _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md index 35ce63196cb4..d08ddb136d55 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md @@ -15,12 +15,12 @@ backlight, as well as media keys centered around the ESDF cluster. ## Function layer -![Function layer layout](https://i.imgur.com/oLdVfn0.png) +![Function layer layout](https://i.imgur.com/3swWxPn.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/bqC6QYS.png) +![Adjust layer layout](https://i.imgur.com/lQfcnQV.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c)) diff --git a/layouts/community/60_tsangan_hhkb/bcat/keymap.c b/layouts/community/60_tsangan_hhkb/bcat/keymap.c index 19516542f0a5..ab639b05ff9a 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/keymap.c +++ b/layouts/community/60_tsangan_hhkb/bcat/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551 */ [LAYER_FUNCTION] = LAYOUT_60_tsangan_hhkb( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -31,9 +31,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */ [LAYER_ADJUST] = LAYOUT_60_tsangan_hhkb( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, RGB_VAI, _______, _______, - _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, _______, _______, KC_MUTE, _______, BL_BRTG, BL_DEC, BL_INC, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + _______, BL_BRTG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, + _______, BL_INC, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, BL_DEC, _______, KC_MUTE, _______, _______, _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_tsangan_hhkb/bcat/readme.md b/layouts/community/60_tsangan_hhkb/bcat/readme.md index c0debdef5b74..eb6722261e36 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/readme.md +++ b/layouts/community/60_tsangan_hhkb/bcat/readme.md @@ -14,12 +14,12 @@ the ESDF cluster. ## Function layer -![Function layer layout](https://i.imgur.com/s2uyH2U.png) +![Function layer layout](https://i.imgur.com/NdJTW9f.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/BKNez3Z.png) +![Adjust layer layout](https://i.imgur.com/XQR4AEf.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4)) From ff5742da9ff468a7e2743c23c2e8551503792401 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 12 Jan 2020 22:21:42 +0000 Subject: [PATCH 027/331] Fix KEYBOARD_SHARED_EP on ChibiOS (#7860) --- tmk_core/protocol/chibios/usb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 740763de2f4a..a4f996b8d7b5 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -381,7 +381,7 @@ static uint16_t get_hword(uint8_t *p) { * Other Device Required Optional Optional Optional Optional Optional */ -#ifdef SHARED_EP_ENABLE +#if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP) static uint8_t set_report_buf[2] __attribute__((aligned(2))); static void set_led_transfer_cb(USBDriver *usbp) { if ((set_report_buf[0] == REPORT_ID_KEYBOARD) || (set_report_buf[0] == REPORT_ID_NKRO)) { From 2ce3025be2fd28c7ea3f2fd33c7aba7277ff668b Mon Sep 17 00:00:00 2001 From: Xelus22 Date: Mon, 13 Jan 2020 10:11:02 +1000 Subject: [PATCH 028/331] [Keyboard] Dawn60 Keyboard (#7832) * dawn60_proper * change default * changes * master merge and via keymap * rgb underglow better * rename of folder * rename folder complete * rename * dawn60/underglow specifics * dawn60 specific * simplify * requested changes * small errors * layouts remove * remove parentheses and update rules.mk * fix error message --- keyboards/wilba_tech/wt_rgb_backlight.c | 215 +++++++++++++++++- keyboards/wilba_tech/wt_rgb_backlight.h | 1 - keyboards/xelus/dawn60/config.h | 145 ++++++++++++ keyboards/xelus/dawn60/dawn60.c | 18 ++ keyboards/xelus/dawn60/dawn60.h | 36 +++ .../xelus/dawn60/keymaps/default/config.h | 17 ++ .../xelus/dawn60/keymaps/default/keymap.c | 46 ++++ keyboards/xelus/dawn60/keymaps/via/config.h | 17 ++ keyboards/xelus/dawn60/keymaps/via/keymap.c | 46 ++++ keyboards/xelus/dawn60/keymaps/via/rules.mk | 1 + keyboards/xelus/dawn60/readme.md | 13 ++ keyboards/xelus/dawn60/rules.mk | 49 ++++ 12 files changed, 597 insertions(+), 7 deletions(-) create mode 100644 keyboards/xelus/dawn60/config.h create mode 100644 keyboards/xelus/dawn60/dawn60.c create mode 100644 keyboards/xelus/dawn60/dawn60.h create mode 100644 keyboards/xelus/dawn60/keymaps/default/config.h create mode 100644 keyboards/xelus/dawn60/keymaps/default/keymap.c create mode 100644 keyboards/xelus/dawn60/keymaps/via/config.h create mode 100644 keyboards/xelus/dawn60/keymaps/via/keymap.c create mode 100644 keyboards/xelus/dawn60/keymaps/via/rules.mk create mode 100644 keyboards/xelus/dawn60/readme.md create mode 100644 keyboards/xelus/dawn60/rules.mk diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 1ca3117fb44e..88fecba174b9 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -14,9 +14,9 @@ * along with this program. If not, see . */ -#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) || defined(RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_U80_A) +#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) || defined(RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_U80_A) || defined(RGB_BACKLIGHT_DAWN60) #else -#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU, RGB_BACKLIGHT_HS60, RGB_BACKLIGHT_NK65, RGB_BACKLIGHT_U80_A +#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU, RGB_BACKLIGHT_HS60, RGB_BACKLIGHT_NK65, RGB_BACKLIGHT_U80_A, RGB_BACKLIGHT_DAWN60 #endif #ifndef MAX @@ -41,6 +41,11 @@ #include "drivers/arm/i2c_master.h" #endif +#if defined(RGB_BACKLIGHT_DAWN60) +#include "drivers/avr/ws2812.h" +LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; +#endif + #include "progmem.h" #include "quantum/color.h" #include "tmk_core/common/eeprom.h" @@ -61,6 +66,8 @@ #include "drivers/issi/is31fl3731.h" #if defined(RGB_BACKLIGHT_U80_A) #define BACKLIGHT_LED_COUNT 108 +#elif defined(RGB_BACKLIGHT_DAWN60) +#define BACKLIGHT_LED_COUNT 84 //64 + 20 #else #define BACKLIGHT_LED_COUNT 72 #endif @@ -463,6 +470,87 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {2, C9_16, C7_15, C6_15}, // LF16 {2, C8_16, C7_16, C6_16}, // LF17 }; +#elif defined(RGB_BACKLIGHT_DAWN60) +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +#define ISSI_ADDR_1 0x74 +#define ISSI_ADDR_2 0x76 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_1, C3_2, C4_2}, //A1 + {0, C1_2, C2_2, C4_3}, //A2 + {0, C1_3, C2_3, C3_3}, //A3 + {0, C1_4, C2_4, C3_4}, //A4 + {0, C1_5, C2_5, C3_5}, //A5 + {0, C1_6, C2_6, C3_6}, //A6 + {0, C1_7, C2_7, C3_7}, //A7 + {0, C1_8, C2_8, C3_8}, //A8 + {0, C9_1, C8_1, C7_1}, //A9 + {0, C9_2, C8_2, C7_2}, //A10 + {0, C9_3, C8_3, C7_3}, //A11 + {0, C9_4, C8_4, C7_4}, //A12 + {0, C9_5, C8_5, C7_5}, //A13 + {0, C9_6, C8_6, C7_6}, //A14 + {0, C9_7, C8_7, C6_6}, //A15 + {0, C9_8, C7_7, C6_7}, //A16 + + {0, C1_9, C3_10, C4_10}, //B1 + {0, C1_10, C2_10, C4_11}, //B2 + {0, C1_11, C2_11, C3_11}, //B3 + {0, C1_12, C2_12, C3_12}, //B4 + {0, C1_13, C2_13, C3_13}, //B5 + {0, C1_14, C2_14, C3_14}, //B6 + {0, C1_15, C2_15, C3_15}, //B7 + {0, C1_16, C2_16, C3_16}, //B8 + {0, C9_9, C8_9, C7_9}, //B9 + {0, C9_10, C8_10, C7_10}, //B10 + {0, C9_11, C8_11, C7_11}, //B11 + {0, C9_12, C8_12, C7_12}, //B12 + {0, C9_13, C8_13, C7_13}, //B13 + {0, C9_14, C8_14, C7_14}, //B14 + {0, C9_15, C8_15, C6_14}, //B15 + {0, C9_16, C7_15, C6_15}, //B16 + + {1, C1_1, C3_2, C4_2}, //C1 + {1, C1_2, C2_2, C4_3}, //C2 + {1, C1_3, C2_3, C3_3}, //C3 + {1, C1_4, C2_4, C3_4}, //C4 + {1, C1_5, C2_5, C3_5}, //C5 + {1, C1_6, C2_6, C3_6}, //C6 + {1, C1_7, C2_7, C3_7}, //C7 + {1, C1_8, C2_8, C3_8}, //C8 + {1, C9_1, C8_1, C7_1}, //C9 + {1, C9_2, C8_2, C7_2}, //C10 + {1, C9_3, C8_3, C7_3}, //C11 + {1, C9_4, C8_4, C7_4}, //C12 + {1, C9_5, C8_5, C7_5}, //C13 + {1, C9_6, C8_6, C7_6}, //C14 + {1, C9_7, C8_7, C6_6}, //C15 + {1, C9_8, C7_7, C6_7}, //C16 + + {1, C1_9, C3_10, C4_10}, //D1 + {1, C1_10, C2_10, C4_11}, //D2 + {1, C1_11, C2_11, C3_11}, //D3 + {1, C1_12, C2_12, C3_12}, //D4 + {1, C1_13, C2_13, C3_13}, //D5 + {1, C1_14, C2_14, C3_14}, //D6 + {1, C1_15, C2_15, C3_15}, //D7 + {1, C1_16, C2_16, C3_16}, //D8 + {1, C9_9, C8_9, C7_9}, //D9 + {1, C9_10, C8_10, C7_10}, //D10 + {1, C9_11, C8_11, C7_11}, //D11 + {1, C9_12, C8_12, C7_12}, //D12 + {1, C9_13, C8_13, C7_13}, //D13 + {1, C9_14, C8_14, C7_14}, //D14 + {1, C9_15, C8_15, C6_14}, //D15 + {1, C9_16, C7_15, C6_15} //D16 +}; #elif !defined(RGB_BACKLIGHT_M6_B) // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -805,6 +893,50 @@ const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} }; +#elif defined(RGB_BACKLIGHT_DAWN60) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA16 + {104, 16}, {88 , 16}, {72 , 16}, {56 , 16}, {40 , 16}, {24 , 16}, {4 , 16}, {6 , 32}, + {112, 0}, {96 , 0}, {80 , 0}, {64 , 0}, {48 , 0}, {32 , 0}, {16 , 0}, {0 , 0}, + + // LB1..LB16 + {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, {224, 0}, {214, 32}, + {120, 16}, {136, 16}, {152, 16}, {168, 16}, {184, 16}, {200, 16}, {220, 16}, {224, 48}, + + // LC1..LC16 + {100, 48}, {84 , 48}, {68 , 48}, {52 , 48}, {36 , 48}, {102, 64}, {42 , 64}, {22 , 64}, + {108, 32}, {92 , 32}, {76 , 32}, {60 , 32}, {44 , 32}, {28 , 32}, {10 , 48}, {2 , 64}, + + // LD1..LD16 + {124, 32}, {140, 32}, {156, 32}, {172, 32}, {188, 32}, {180, 48}, {202, 48}, {224, 64}, + {116, 48}, {132, 48}, {148, 48}, {164, 48}, {160, 64}, {176, 64}, {192, 64}, {208, 64}, + + //RGB UNDERGLOW + {27 , 3}, {64 , 3}, {100, 3}, {137, 3}, {173, 3}, {209, 3}, {242, 4}, {255, 8}, {255,32}, {255,64}, + {241,64}, {212,64}, {173,64}, {137,64}, {100,64}, {63 ,64}, {28 ,64}, {0 ,64}, {0 ,32}, {0 , 8}, //20 +}; + +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + //LA1..LA16 + {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, + {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, + //LB1..LB16 + {58,255}, {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,233}, + {58,129}, {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {237,255}, + //LC1..LC16 + {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {188,255}, {170,255}, {165,255}, + {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {147,255}, {161,255}, + //LD1..LD16 + {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {228,201}, {235,255}, {224,255}, + {195,128}, {206,136}, {215,152}, {222,175}, {208,255}, {213,255}, {217, 255}, {222,225}, + + //UNDERGLOW, {A,D} + //1 - 10 + {91,255}, {84,255}, {74,255}, {60,255}, {48,255}, {39,255}, {32,255}, {27,255}, {0,255}, {236,255}, + //11 - 20 + {234,255}, {222,255}, {213,255}, {197,255}, {180,255}, {167,255}, {152,255}, {147,255}, {128,255}, {101,255} +}; + #endif // This may seem counter-intuitive, but it's quite flexible. @@ -824,10 +956,12 @@ void map_led_to_point( uint8_t index, Point *point ) switch (index) { +#if !defined(RGB_BACKLIGHT_DAWN60) case 18+4: // LB4A if ( g_config.use_split_backspace ) point->x -= 8; break; +#endif #if defined(RGB_BACKLIGHT_ZEAL60) case 18+14: // LB14A if ( g_config.use_iso_enter ) @@ -855,6 +989,28 @@ void map_led_to_point( uint8_t index, Point *point ) if ( !g_config.use_split_right_shift ) point->x -= 8; break; +#endif +#if defined(RGB_BACKLIGHT_DAWN60) + case 15+6: // LB6A + if ( !g_config.use_split_backspace ) + point->x += 8; + break; + case 31+6: // LC6A + if ( g_config.use_7u_spacebar ) + point->x = 112; + break; + case 47+16: // LD16A + if ( g_config.use_7u_spacebar ) + point->x -= 8; + break; + case 47+6: // LD6A + if ( g_config.use_split_right_shift ) + point->x += 6; + break; + case 47+7: // LD7A + if ( g_config.use_split_right_shift ) + point->x += 6; + break; #endif } } @@ -994,6 +1150,20 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 0, 3, 5, 1, 2, 4 } }; +#elif defined(RGB_BACKLIGHT_DAWN60) +//Dawn60 +// A16, A15, A14, A13, A12, A11, A10, A9, B1, B2, B3, B4, B5, B6, +// A7, A6, A5, A4, A3, A2, A1, B9, B10, B11, B12, B13, B14, B15, +// A8, C14, C13, C12, C11, C10, C9, D1, D2, D3, D4, D5, B8, B7, +// C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, ---, D6, D7, B16, +// C16, C8, C7, ---, ---, C6, ---, ---, ---, D13, D14, D15, D16, D8, +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { -1+16, -1+15, -1+14, -1+13, -1+12, -1+11, -1+10, -1+9 , 15+1 , 15+2 , 15+3 , 15+4 , 15+5 , 15+6 }, + { -1+7 , -1+6 , -1+5 , -1+4 , -1+3 , -1+2 , -1 +1, 15+9 , 15+10, 15+11, 15+12, 15+13, 15+14, 15+15}, + { -1+8 , 31+14, 31+13, 31+12, 31+11, 31+10, 31+9 , 47+1 , 47+2 , 47+3 , 47+4 , 47+5 , 15+8 , 15+7 }, + { 31+15, 31+5 , 31+4 , 31+3 , 31+2 , 31+1 , 47+9 , 47+10, 47+11, 47+12, 255 ,47+6 , 47+7 , 15+16}, + { 31+16, 31+8 , 31+7 , 255 , 255 , 31+6 , 255 , 255 , 255 , 47+13, 47+14, 47+15, 47+16, 47+8 } +}; #endif void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led ) @@ -1049,6 +1219,15 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) IS31FL3218_set_color( index, red, green, blue ); #elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) IS31FL3733_set_color( index, red, green, blue ); +#elif defined(RGB_BACKLIGHT_DAWN60) + if( index < DRIVER_LED_TOTAL ) { + IS31FL3731_set_color( index, red, green, blue ); + } else { + g_ws2812_leds[index - DRIVER_LED_TOTAL].r = red; + g_ws2812_leds[index - DRIVER_LED_TOTAL].g = green; + g_ws2812_leds[index - DRIVER_LED_TOTAL].b = blue; + ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL); + } #else IS31FL3731_set_color( index, red, green, blue ); #endif @@ -1060,6 +1239,14 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) IS31FL3218_set_color_all( red, green, blue ); #elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) IS31FL3733_set_color_all( red, green, blue ); +#elif defined(RGB_BACKLIGHT_DAWN60) + IS31FL3731_set_color_all( red, green, blue ); + for (uint8_t i = 0; i < WS2812_LED_TOTAL; i++) { + g_ws2812_leds[i].r = red; + g_ws2812_leds[i].g = green; + g_ws2812_leds[i].b = blue; + } + ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL); #else IS31FL3731_set_color_all( red, green, blue ); #endif @@ -1266,6 +1453,16 @@ void backlight_effect_alphas_mods(void) } } } +#if defined(RGB_BACKLIGHT_DAWN60) + for (int i = 0; i < WS2812_LED_TOTAL; i++) { + if ((RGB_UNDERGLOW_ALPHA_TOP_START <= i && i <= RGB_UNDERGLOW_ALPHA_TOP_END) || + (RGB_UNDERGLOW_ALPHA_BOT_START <= i && i <= RGB_UNDERGLOW_ALPHA_BOT_END)) { + backlight_set_color(i + DRIVER_LED_TOTAL, rgb1.r, rgb1.g, rgb1.b); + } else { + backlight_set_color(i + DRIVER_LED_TOTAL, rgb2.r, rgb2.g, rgb2.b); + } + } +#endif } void backlight_effect_gradient_up_down(void) @@ -1302,6 +1499,7 @@ void backlight_effect_gradient_up_down(void) hsv.h = g_config.color_1.h + ( deltaH * y ); hsv.s = g_config.color_1.s + ( deltaS * y ); rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); } } @@ -1342,7 +1540,7 @@ void backlight_effect_raindrops(bool initialize) hsv.h = h1 + ( deltaH * ( rand() & 0x03 ) ); hsv.s = s1 + ( deltaS * ( rand() & 0x03 ) ); // Override brightness with global brightness control - hsv.v = g_config.brightness;; + hsv.v = g_config.brightness; rgb = hsv_to_rgb( hsv ); backlight_set_color( i, rgb.r, rgb.g, rgb.b ); @@ -1358,7 +1556,7 @@ void backlight_effect_cycle_all(void) for ( int i=0; i= 72+0 && index <= 72+8 ) || // LE0-LE8 ( index == 90+13 ) ); // LF13 +#elif defined(RGB_BACKLIGHT_DAWN60) + bool enabled = !( ( index == 15+7 && !g_config.use_split_backspace ) || //other backspace + ( index == 47+13 && g_config.use_7u_spacebar ) || //LD13 + ( index == 47+15 && g_config.use_7u_spacebar ) ); //LD15 #endif // This only caches it for later IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); @@ -2420,3 +2622,4 @@ void backlight_debug_led( bool state ) } #endif // defined(RGB_DEBUGGING_ONLY) + diff --git a/keyboards/wilba_tech/wt_rgb_backlight.h b/keyboards/wilba_tech/wt_rgb_backlight.h index aa24e3491d6a..648465886684 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.h +++ b/keyboards/wilba_tech/wt_rgb_backlight.h @@ -107,4 +107,3 @@ void backlight_color_2_sat_decrease(void); void backlight_test_led( uint8_t index, bool red, bool green, bool blue ); void backlight_debug_led(bool state); - diff --git a/keyboards/xelus/dawn60/config.h b/keyboards/xelus/dawn60/config.h new file mode 100644 index 000000000000..da709aa4ab13 --- /dev/null +++ b/keyboards/xelus/dawn60/config.h @@ -0,0 +1,145 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x5845 // XE +#define PRODUCT_ID 0x0060 // Dawn60 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Xelus +#define PRODUCT Dawn60 +#define DESCRIPTION Dawn60 + +// key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +//no underglow - prototype +//#define MATRIX_ROW_PINS { B1, B3, B7, F6, F7 } +//#define MATRIX_COL_PINS { B0, D5, B2, F5, D2, D3, D4, D6, D7, B4, B5, B6, C6, C7 } +//#define UNUSED_PINS + +//underglow +#define MATRIX_ROW_PINS { B1, B3, F1, F6, F7 } +#define MATRIX_COL_PINS { B0, D5, B2, F5, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 64 + +// COL2ROW or ROW2COL +#define DIODE_DIRECTION COL2ROW + +// Set 0 if debouncing isn't needed +#define DEBOUNCE 5 + +// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +#define LOCKING_SUPPORT_ENABLE +// Locking resynchronize hack +#define LOCKING_RESYNC_ENABLE + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +// disable debug print +//#define NO_DEBUG + +// disable print +//#define NO_PRINT + +// disable action features +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for Dawn60 specifics +#define RGB_BACKLIGHT_DAWN60 + +// enable/disable LEDs based on layout +// switch between split backspace (1) or normal backspace(0) +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 +// switch between Tsangan (1) or Arrows Bottom Row (0) +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +// switch between standard split rshift (0) or arrows r shift (1) +// .------------------. .-------------------. +// | ? | Shift | Fn | vs | Shift | Up | Fn | +// `------------------' `-------------------' +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 + +//not used +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +//RGB Underglow defines +#define RGB_DI_PIN F0 +#define WS2812_LED_TOTAL 20 + +#define RGB_UNDERGLOW_ALPHA_TOP_START 0 +#define RGB_UNDERGLOW_ALPHA_TOP_END 6 +#define RGB_UNDERGLOW_ALPHA_BOT_START 12 +#define RGB_UNDERGLOW_ALPHA_BOT_END 15 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011111000011111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +//RGB reactive only on keypress (put 1 to enable) +#define RGB_REACTIVE_LEFT_RIGHT 0 +#define RGB_REACTIVE_CYCLE_ALL 0 +#define RGB_REACTIVE_VERTICAL 0 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/xelus/dawn60/dawn60.c b/keyboards/xelus/dawn60/dawn60.c new file mode 100644 index 000000000000..bce6eea9df0c --- /dev/null +++ b/keyboards/xelus/dawn60/dawn60.c @@ -0,0 +1,18 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef RGB_BACKLIGHT_DAWN60 +#error RGB_BACKLIGHT_DAWN60 not defined, you done goofed somehao, brah +#endif diff --git a/keyboards/xelus/dawn60/dawn60.h b/keyboards/xelus/dawn60/dawn60.h new file mode 100644 index 000000000000..b1de35a7eb6f --- /dev/null +++ b/keyboards/xelus/dawn60/dawn60.h @@ -0,0 +1,36 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" +#include "via.h" + +#define XXX KC_NO + +#define LAYOUT_60_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3B, K3C, K3D, \ + K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, XXX, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D } \ +} diff --git a/keyboards/xelus/dawn60/keymaps/default/config.h b/keyboards/xelus/dawn60/keymaps/default/config.h new file mode 100644 index 000000000000..8f4e8ac4c2e5 --- /dev/null +++ b/keyboards/xelus/dawn60/keymaps/default/config.h @@ -0,0 +1,17 @@ +#pragma once + +/* enable/disable LEDs based on layout */ +// switch between split backspace (1) or normal backspace(0) +#undef RGB_BACKLIGHT_USE_SPLIT_BACKSPACE +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 + +// switch between Tsangan (1) or Arrows Bottom Row (0) +#undef RGB_BACKLIGHT_USE_7U_SPACEBAR +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 + +// switch between standard split rshift (0) or arrows r shift (1) +// .------------------. .-------------------. +// | ? | Shift | Fn | vs | Shift | Up | Fn | +// `------------------' `-------------------' +#undef RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 diff --git a/keyboards/xelus/dawn60/keymaps/default/keymap.c b/keyboards/xelus/dawn60/keymaps/default/keymap.c new file mode 100644 index 000000000000..522997342c70 --- /dev/null +++ b/keyboards/xelus/dawn60/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +// Default layout for Dawn60 +#include QMK_KEYBOARD_H + +// RGB-specific keys: +// EF_INC, EF_DEC, // next/previous backlight effect +// H1_INC, H1_DEC, // Color 1 hue increase/decrease +// S1_INC, S1_DEC, // Color 1 saturation increase/decrease +// H2_INC, H2_DEC, // Color 2 hue increase/decrease +// S2_INC, S2_DEC, // Color 2 saturation increase/decrease +// BR_INC, BR_DEC, // backlight brightness increase/decrease + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Default layer: Pressing caps-lock momentarily switches to Layer 1. +// This is the default layer. Pressing an empty keycode on another layer will take you here. + [0] = LAYOUT_60_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL , KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_DEL , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_60_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, + KC_CAPS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [2] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/xelus/dawn60/keymaps/via/config.h b/keyboards/xelus/dawn60/keymaps/via/config.h new file mode 100644 index 000000000000..45c7e511f165 --- /dev/null +++ b/keyboards/xelus/dawn60/keymaps/via/config.h @@ -0,0 +1,17 @@ +#pragma once + +/* enable/disable LEDs based on layout */ +// switch between split backspace (1) or normal backspace(0) +#undef RGB_BACKLIGHT_USE_SPLIT_BACKSPACE +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 + +// switch between Tsangan (1) or Arrows Bottom Row (0) +#undef RGB_BACKLIGHT_USE_7U_SPACEBAR +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 + +// switch between standard split rshift (0) or arrows r shift (1) +// .------------------. .-------------------. +// | ? | Shift | Fn | vs | Shift | Up | Fn | +// `------------------' `-------------------' +#undef RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 diff --git a/keyboards/xelus/dawn60/keymaps/via/keymap.c b/keyboards/xelus/dawn60/keymaps/via/keymap.c new file mode 100644 index 000000000000..522997342c70 --- /dev/null +++ b/keyboards/xelus/dawn60/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +// Default layout for Dawn60 +#include QMK_KEYBOARD_H + +// RGB-specific keys: +// EF_INC, EF_DEC, // next/previous backlight effect +// H1_INC, H1_DEC, // Color 1 hue increase/decrease +// S1_INC, S1_DEC, // Color 1 saturation increase/decrease +// H2_INC, H2_DEC, // Color 2 hue increase/decrease +// S2_INC, S2_DEC, // Color 2 saturation increase/decrease +// BR_INC, BR_DEC, // backlight brightness increase/decrease + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Default layer: Pressing caps-lock momentarily switches to Layer 1. +// This is the default layer. Pressing an empty keycode on another layer will take you here. + [0] = LAYOUT_60_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL , KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_DEL , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_60_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, + KC_CAPS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [2] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/xelus/dawn60/keymaps/via/rules.mk b/keyboards/xelus/dawn60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xelus/dawn60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xelus/dawn60/readme.md b/keyboards/xelus/dawn60/readme.md new file mode 100644 index 000000000000..3409bac1ee40 --- /dev/null +++ b/keyboards/xelus/dawn60/readme.md @@ -0,0 +1,13 @@ +# Dawn60 + +An in-switch RGB LED keyboard with RGB underglow. + +* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +* Hardware Supported: Dawn60 +* Hardware Availability: [Keyboard Treehouse](https://keyboardtreehouse.com) + +Make example for this keyboard (after setting up your build environment): + + make xelus/dawn60:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/xelus/dawn60/rules.mk b/keyboards/xelus/dawn60/rules.mk new file mode 100644 index 000000000000..3ac5f9977d06 --- /dev/null +++ b/keyboards/xelus/dawn60/rules.mk @@ -0,0 +1,49 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - We have custom RGB underglow + +CIE1931_CURVE = yes + + +# project specific files +SRC += keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + ws2812.c + +QUANTUM_LIB_SRC += i2c_master.c From b89e35bdd33b3953711de8b0be64c76b64e9701b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 13 Jan 2020 01:30:56 +0000 Subject: [PATCH 029/331] Relocate common backlight functionally (#7273) --- common_features.mk | 8 +++---- quantum/backlight/backlight.c | 21 +++++++++++++++++++ quantum/backlight/backlight.h | 23 +++++++++++++++++--- quantum/backlight/backlight_arm.c | 25 +++------------------- quantum/backlight/backlight_avr.c | 35 +++++++------------------------ quantum/quantum.h | 24 --------------------- 6 files changed, 55 insertions(+), 81 deletions(-) diff --git a/common_features.mk b/common_features.mk index 67c64b425f68..01ceb82789c7 100644 --- a/common_features.mk +++ b/common_features.mk @@ -257,13 +257,11 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) SRC += $(QUANTUM_DIR)/backlight/backlight.c OPT_DEFS += -DBACKLIGHT_ENABLE - ifeq ($(strip $(BACKLIGHT_DRIVER)), software) + ifeq ($(strip $(BACKLIGHT_DRIVER)), custom) + OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER + else ifeq ($(strip $(BACKLIGHT_DRIVER)), software) SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c else - ifeq ($(strip $(BACKLIGHT_DRIVER)), custom) - OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER - endif - ifeq ($(PLATFORM),AVR) SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c else diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c index 708022f68f66..e57b31d103b2 100644 --- a/quantum/backlight/backlight.c +++ b/quantum/backlight/backlight.c @@ -21,6 +21,9 @@ along with this program. If not, see . backlight_config_t backlight_config; +// TODO: migrate to backlight_config_t +static uint8_t breathing_period = BREATHING_PERIOD; + /** \brief Backlight initialization * * FIXME: needs doc @@ -191,3 +194,21 @@ void backlight_disable_breathing(void) { */ bool is_backlight_breathing(void) { return backlight_config.breathing; } #endif + +// following are marked as weak purely for backwards compatibility +__attribute__((weak)) void breathing_period_set(uint8_t value) { breathing_period = value ? value : 1; } + +__attribute__((weak)) uint8_t get_breathing_period(void) { return breathing_period; } + +__attribute__((weak)) void breathing_period_default(void) { breathing_period_set(BREATHING_PERIOD); } + +__attribute__((weak)) void breathing_period_inc(void) { breathing_period_set(breathing_period + 1); } + +__attribute__((weak)) void breathing_period_dec(void) { breathing_period_set(breathing_period - 1); } + +// defaults for backlight api +__attribute__((weak)) void backlight_init_ports(void) {} + +__attribute__((weak)) void backlight_set(uint8_t level) {} + +__attribute__((weak)) void backlight_task(void) {} diff --git a/quantum/backlight/backlight.h b/quantum/backlight/backlight.h index 1e581055db12..9f0a5e81d771 100644 --- a/quantum/backlight/backlight.h +++ b/quantum/backlight/backlight.h @@ -41,22 +41,39 @@ typedef union { } backlight_config_t; void backlight_init(void); -void backlight_increase(void); -void backlight_decrease(void); void backlight_toggle(void); void backlight_enable(void); void backlight_disable(void); bool is_backlight_enabled(void); void backlight_step(void); -void backlight_set(uint8_t level); +void backlight_increase(void); +void backlight_decrease(void); void backlight_level(uint8_t level); uint8_t get_backlight_level(void); +// implementation specific +void backlight_init_ports(void); +void backlight_set(uint8_t level); +void backlight_task(void); + #ifdef BACKLIGHT_BREATHING + void backlight_toggle_breathing(void); void backlight_enable_breathing(void); void backlight_disable_breathing(void); bool is_backlight_breathing(void); + +void breathing_period_set(uint8_t value); +uint8_t get_breathing_period(void); +void breathing_period_default(void); +void breathing_period_inc(void); +void breathing_period_dec(void); + +// implementation specific void breathing_enable(void); void breathing_disable(void); +void breathing_toggle(void); +bool is_breathing(void); +void breathing_pulse(void); +void breathing_task(void); #endif diff --git a/quantum/backlight/backlight_arm.c b/quantum/backlight/backlight_arm.c index 8c6909a4ae83..f7065906f8b2 100644 --- a/quantum/backlight/backlight_arm.c +++ b/quantum/backlight/backlight_arm.c @@ -106,7 +106,6 @@ void backlight_task(void) {} # define BREATHING_HALT_ON 2 # define BREATHING_STEPS 128 -static uint8_t breathing_period = BREATHING_PERIOD; static uint8_t breathing_halt = BREATHING_NO_HALT; static uint16_t breathing_counter = 0; @@ -114,7 +113,7 @@ bool is_breathing(void) { return BACKLIGHT_PWM_DRIVER.config == &pwmCFG_breathin static inline void breathing_min(void) { breathing_counter = 0; } -static inline void breathing_max(void) { breathing_counter = breathing_period * 256 / 2; } +static inline void breathing_max(void) { breathing_counter = get_breathing_period() * 256 / 2; } void breathing_interrupt_enable(void) { pwmStop(&BACKLIGHT_PWM_DRIVER); @@ -166,17 +165,6 @@ void breathing_toggle(void) { breathing_enable(); } -void breathing_period_set(uint8_t value) { - if (!value) value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { breathing_period_set(BREATHING_PERIOD); } - -void breathing_period_inc(void) { breathing_period_set(breathing_period + 1); } - -void breathing_period_dec(void) { breathing_period_set(breathing_period - 1); } - /* To generate breathing curve in python: * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] */ @@ -187,7 +175,8 @@ static inline uint16_t scale_backlight(uint16_t v) { return v / BACKLIGHT_LEVELS static void breathing_callback(PWMDriver *pwmp) { (void)pwmp; - uint16_t interval = (uint16_t)breathing_period * 256 / BREATHING_STEPS; + uint8_t breathing_period = get_breathing_period(); + uint16_t interval = (uint16_t)breathing_period * 256 / BREATHING_STEPS; // resetting after one period to prevent ugly reset at overflow. breathing_counter = (breathing_counter + 1) % (breathing_period * 256); uint8_t index = breathing_counter / interval % BREATHING_STEPS; @@ -203,12 +192,4 @@ static void breathing_callback(PWMDriver *pwmp) { chSysUnlockFromISR(); } -#else - -__attribute__((weak)) void backlight_init_ports(void) {} - -__attribute__((weak)) void backlight_set(uint8_t level) {} - -__attribute__((weak)) void backlight_task(void) {} - #endif diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c index edda6ea0b602..7cf1e0fb3043 100644 --- a/quantum/backlight/backlight_avr.c +++ b/quantum/backlight/backlight_avr.c @@ -206,7 +206,7 @@ static const pin_t backlight_pin = BACKLIGHT_PIN; # endif # ifdef NO_HARDWARE_PWM -__attribute__((weak)) void backlight_init_ports(void) { +void backlight_init_ports(void) { // Setup backlight pin as output and output to on state. FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);) @@ -217,8 +217,6 @@ __attribute__((weak)) void backlight_init_ports(void) { # endif } -__attribute__((weak)) void backlight_set(uint8_t level) {} - uint8_t backlight_tick = 0; # ifndef BACKLIGHT_CUSTOM_DRIVER @@ -303,7 +301,7 @@ static uint16_t cie_lightness(uint16_t v) { static inline void set_pwm(uint16_t val) { OCRxx = val; } # ifndef BACKLIGHT_CUSTOM_DRIVER -__attribute__((weak)) void backlight_set(uint8_t level) { +void backlight_set(uint8_t level) { if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; if (level == 0) { @@ -342,7 +340,6 @@ void backlight_task(void) {} # define BREATHING_HALT_ON 2 # define BREATHING_STEPS 128 -static uint8_t breathing_period = BREATHING_PERIOD; static uint8_t breathing_halt = BREATHING_NO_HALT; static uint16_t breathing_counter = 0; @@ -377,9 +374,9 @@ bool is_breathing(void) { return !!(TIMSKx & _BV(TOIEx)); } do { \ breathing_counter = 0; \ } while (0) -# define breathing_max() \ - do { \ - breathing_counter = breathing_period * 244 / 2; \ +# define breathing_max() \ + do { \ + breathing_counter = get_breathing_period() * 244 / 2; \ } while (0) void breathing_enable(void) { @@ -417,17 +414,6 @@ void breathing_toggle(void) { breathing_enable(); } -void breathing_period_set(uint8_t value) { - if (!value) value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { breathing_period_set(BREATHING_PERIOD); } - -void breathing_period_inc(void) { breathing_period_set(breathing_period + 1); } - -void breathing_period_dec(void) { breathing_period_set(breathing_period - 1); } - /* To generate breathing curve in python: * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] */ @@ -445,6 +431,7 @@ void breathing_task(void) ISR(TIMERx_OVF_vect) # endif { + uint8_t breathing_period = get_breathing_period(); uint16_t interval = (uint16_t)breathing_period * 244 / BREATHING_STEPS; // resetting after one period to prevent ugly reset at overflow. breathing_counter = (breathing_counter + 1) % (breathing_period * 244); @@ -459,7 +446,7 @@ ISR(TIMERx_OVF_vect) # endif // BACKLIGHT_BREATHING -__attribute__((weak)) void backlight_init_ports(void) { +void backlight_init_ports(void) { // Setup backlight pin as output and output to on state. FOR_EACH_LED(setPinOutput(backlight_pin); backlight_on(backlight_pin);) @@ -500,10 +487,4 @@ __attribute__((weak)) void backlight_init_ports(void) { # endif // hardware backlight -#else // no backlight - -__attribute__((weak)) void backlight_init_ports(void) {} - -__attribute__((weak)) void backlight_set(uint8_t level) {} - -#endif // backlight \ No newline at end of file +#endif // backlight diff --git a/quantum/quantum.h b/quantum/quantum.h index 9758374f64ca..09550fec301f 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -251,30 +251,6 @@ void register_code16(uint16_t code); void unregister_code16(uint16_t code); void tap_code16(uint16_t code); -#ifdef BACKLIGHT_ENABLE -void backlight_init_ports(void); -void backlight_task(void); -void backlight_task_internal(void); -void backlight_on(pin_t backlight_pin); -void backlight_off(pin_t backlight_pin); - -# ifdef BACKLIGHT_BREATHING -void breathing_task(void); -void breathing_enable(void); -void breathing_pulse(void); -void breathing_disable(void); -void breathing_self_disable(void); -void breathing_toggle(void); -bool is_breathing(void); - -void breathing_intensity_default(void); -void breathing_period_default(void); -void breathing_period_set(uint8_t value); -void breathing_period_inc(void); -void breathing_period_dec(void); -# endif -#endif - void send_dword(uint32_t number); void send_word(uint16_t number); void send_byte(uint8_t number); From be7d70b15c4b3db4ae2aa2ea7c67caa48c9ef50b Mon Sep 17 00:00:00 2001 From: John M Daly Date: Sun, 12 Jan 2020 22:48:24 -0500 Subject: [PATCH 030/331] Enable RGB underglow on the CO60 and SteamVan, switch backlight code to QMK built-in code (#7874) * Add: RGB underglow support using SPI to SteamVan and CO60 * Update: Switch to QMK's baclight implementation for CO60 and SteamVan * Fix: Remove now unnecessary backlighting code from keyboard files --- keyboards/handwired/co60/rev6/config.h | 3 +- keyboards/handwired/co60/rev6/led.c | 240 ----------------- keyboards/handwired/co60/rev6/led_custom.h | 22 -- keyboards/handwired/co60/rev6/rev6.c | 22 -- keyboards/handwired/co60/rev6/rev6.h | 18 -- keyboards/handwired/co60/rev6/rules.mk | 3 - keyboards/handwired/co60/rev7/config.h | 7 +- keyboards/handwired/co60/rev7/halconf.h | 2 +- keyboards/handwired/co60/rev7/led.c | 242 ------------------ keyboards/handwired/co60/rev7/led_custom.h | 22 -- keyboards/handwired/co60/rev7/mcuconf.h | 2 +- keyboards/handwired/co60/rev7/rev7.c | 22 -- keyboards/handwired/co60/rev7/rev7.h | 18 -- keyboards/handwired/co60/rev7/rules.mk | 6 +- .../steamvan/keymaps/jmdaly/keymap.c | 8 +- keyboards/handwired/steamvan/rev1/config.h | 6 +- keyboards/handwired/steamvan/rev1/halconf.h | 2 +- keyboards/handwired/steamvan/rev1/led.c | 242 ------------------ .../handwired/steamvan/rev1/led_custom.h | 22 -- keyboards/handwired/steamvan/rev1/mcuconf.h | 2 +- keyboards/handwired/steamvan/rev1/rev1.c | 19 -- keyboards/handwired/steamvan/rev1/rev1.h | 10 - keyboards/handwired/steamvan/rev1/rules.mk | 6 +- 23 files changed, 24 insertions(+), 922 deletions(-) delete mode 100644 keyboards/handwired/co60/rev6/led.c delete mode 100644 keyboards/handwired/co60/rev6/led_custom.h delete mode 100644 keyboards/handwired/co60/rev7/led.c delete mode 100644 keyboards/handwired/co60/rev7/led_custom.h delete mode 100644 keyboards/handwired/steamvan/rev1/led.c delete mode 100644 keyboards/handwired/steamvan/rev1/led_custom.h diff --git a/keyboards/handwired/co60/rev6/config.h b/keyboards/handwired/co60/rev6/config.h index b1ab99fd9ba9..a2c73853ca2a 100644 --- a/keyboards/handwired/co60/rev6/config.h +++ b/keyboards/handwired/co60/rev6/config.h @@ -55,6 +55,5 @@ /* Backlight configuration * Backlight LEDs on B8 */ -#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_PIN B8 #define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 diff --git a/keyboards/handwired/co60/rev6/led.c b/keyboards/handwired/co60/rev6/led.c deleted file mode 100644 index fe28ce2e8f5f..000000000000 --- a/keyboards/handwired/co60/rev6/led.c +++ /dev/null @@ -1,240 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "hal.h" -#include "led_custom.h" -#include "rev6.h" -#include "printf.h" - -static void breathing_callback(PWMDriver *pwmp); - -static PWMConfig pwmCFG = { - 0xFFFF, /* PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - NULL, /* No Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -static PWMConfig pwmCFG_breathing = { - 0xFFFF, /* 10kHz PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - breathing_callback, /* Breathing Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t)v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t)y; - } -} - -void backlight_init_ports(void) { - palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); - pwmStart(&PWMD4, &pwmCFG); - if (kb_backlight_config.enable) { - if (kb_backlight_config.breathing) { - breathing_enable(); - } else { - backlight_set(kb_backlight_config.level); - } - } else { - backlight_set(0); - } -} - -void backlight_set(uint8_t level) { - uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t)level / BACKLIGHT_LEVELS)); - if (level == 0) { - // Turn backlight off - // Disable channel 3 on PWM4 - pwmDisableChannel(&PWMD4, 2); - } else { - // Turn backlight on - if (!is_breathing()) { - // Enable channel 3 on PWM4 - pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4, 0xFFFF, duty)); - } - } -} - -uint8_t backlight_tick = 0; - -void backlight_task(void) { -} - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -bool is_breathing(void) { - return PWMD4.config == &pwmCFG_breathing; -} - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) - - -void breathing_interrupt_enable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG_breathing); - chSysLockFromISR(); - pwmEnablePeriodicNotification(&PWMD4); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - 0xFFFF - ) - ); - chSysUnlockFromISR(); -} - -void breathing_interrupt_disable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG); -} - -void breathing_enable(void) -{ - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - breathing_interrupt_enable(); -} - -void breathing_pulse(void) -{ - if (kb_backlight_config.level == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - breathing_interrupt_enable(); -} - -void breathing_disable(void) -{ - breathing_interrupt_disable(); - // Restore backlight level - backlight_set(kb_backlight_config.level); -} - -void breathing_self_disable(void) -{ - if (kb_backlight_config.level == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()){ - breathing_disable(); - } else { - breathing_enable(); - } -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * kb_backlight_config.level; -} - -static void breathing_callback(PWMDriver *pwmp) -{ - (void)pwmp; - uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 256); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - breathing_interrupt_disable(); - } - - uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); - - chSysLockFromISR(); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - duty - ) - ); - chSysUnlockFromISR(); -} diff --git a/keyboards/handwired/co60/rev6/led_custom.h b/keyboards/handwired/co60/rev6/led_custom.h deleted file mode 100644 index 96c4d0c2ba70..000000000000 --- a/keyboards/handwired/co60/rev6/led_custom.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2019 John M Daly - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -void backlight_task(void); -void breathing_interrupt_disable(void); -void breathing_interrupt_enable(void); diff --git a/keyboards/handwired/co60/rev6/rev6.c b/keyboards/handwired/co60/rev6/rev6.c index f597513b16db..e2645871a008 100644 --- a/keyboards/handwired/co60/rev6/rev6.c +++ b/keyboards/handwired/co60/rev6/rev6.c @@ -15,25 +15,3 @@ */ #include "rev6.h" -#include "backlight.h" -#include "led.h" -#include "printf.h" - -backlight_levels_config_t kb_backlight_config = { - .enable = true, - .breathing = true, - .level = BACKLIGHT_LEVELS -}; - -uint8_t *o_fb; - -uint16_t counterst = 0; - -void matrix_init_kb(void) { - matrix_init_user(); - backlight_init_ports(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} diff --git a/keyboards/handwired/co60/rev6/rev6.h b/keyboards/handwired/co60/rev6/rev6.h index 7d11f19d3c95..1f0fe51e23db 100644 --- a/keyboards/handwired/co60/rev6/rev6.h +++ b/keyboards/handwired/co60/rev6/rev6.h @@ -126,21 +126,3 @@ { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, KC_NO }, \ } -// Backlighting -typedef union { - uint8_t raw; - struct { - bool enable :1; - bool breathing : 1; - uint8_t level :6; - }; -} backlight_levels_config_t; - -extern backlight_levels_config_t kb_backlight_config; -extern bool kb_backlight_breathing; - -void backlight_init_ports(void); -void backlight_set(uint8_t level); -bool is_breathing(void); -void breathing_enable(void); -void breathing_disable(void); diff --git a/keyboards/handwired/co60/rev6/rules.mk b/keyboards/handwired/co60/rev6/rules.mk index fc7cabb10891..b20c2efedc76 100644 --- a/keyboards/handwired/co60/rev6/rules.mk +++ b/keyboards/handwired/co60/rev6/rules.mk @@ -1,9 +1,6 @@ # MCU name MCU = STM32F303 -# Code for backlight breathing: -SRC += led.c - # Build Options # comment out to disable the options. # diff --git a/keyboards/handwired/co60/rev7/config.h b/keyboards/handwired/co60/rev7/config.h index 1ccc12ad4c01..e13d28f5074a 100644 --- a/keyboards/handwired/co60/rev7/config.h +++ b/keyboards/handwired/co60/rev7/config.h @@ -57,9 +57,12 @@ along with this program. If not, see . /* Backlight configuration * Backlight LEDs on B8 */ -#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_PIN B8 #define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 + +/* RGB underglow configuration */ +#define WS2812_SPI SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 5 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/handwired/co60/rev7/halconf.h b/keyboards/handwired/co60/rev7/halconf.h index 5e5d70219e2b..7363a21a2131 100644 --- a/keyboards/handwired/co60/rev7/halconf.h +++ b/keyboards/handwired/co60/rev7/halconf.h @@ -153,7 +153,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI TRUE #endif /** diff --git a/keyboards/handwired/co60/rev7/led.c b/keyboards/handwired/co60/rev7/led.c deleted file mode 100644 index 13f8d98608f1..000000000000 --- a/keyboards/handwired/co60/rev7/led.c +++ /dev/null @@ -1,242 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "hal.h" -#include "led_custom.h" -#include "rev7.h" -#include "printf.h" - -static void breathing_callback(PWMDriver *pwmp); - -static PWMConfig pwmCFG = { - 0xFFFF, /* PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - NULL, /* No Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -static PWMConfig pwmCFG_breathing = { - 0xFFFF, /* 10kHz PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - breathing_callback, /* Breathing Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - - -void backlight_init_ports(void) { - palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); - pwmStart(&PWMD4, &pwmCFG); - if(kb_backlight_config.enable){ - if(kb_backlight_config.breathing){ - breathing_enable(); - } else{ - backlight_set(kb_backlight_config.level); - } - } else { - backlight_set(0); - } -} - -void backlight_set(uint8_t level) { - uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); - if (level == 0) { - // Turn backlight off - // Disable channel 3 on PWM4 - pwmDisableChannel(&PWMD4, 2); - } else { - // Turn backlight on - if(!is_breathing()){ - // Enable channel 3 on PWM4 - pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,duty)); - } - } -} - - -uint8_t backlight_tick = 0; - -void backlight_task(void) { -} - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -bool is_breathing(void) { - return PWMD4.config == &pwmCFG_breathing; -} - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) - - -void breathing_interrupt_enable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG_breathing); - chSysLockFromISR(); - pwmEnablePeriodicNotification(&PWMD4); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - 0xFFFF - ) - ); - chSysUnlockFromISR(); -} - -void breathing_interrupt_disable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG); -} - -void breathing_enable(void) -{ - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - breathing_interrupt_enable(); -} - -void breathing_pulse(void) -{ - if (kb_backlight_config.level == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - breathing_interrupt_enable(); -} - -void breathing_disable(void) -{ - breathing_interrupt_disable(); - // Restore backlight level - backlight_set(kb_backlight_config.level); -} - -void breathing_self_disable(void) -{ - if (kb_backlight_config.level == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()){ - breathing_disable(); - } else { - breathing_enable(); - } -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * kb_backlight_config.level; -} - -static void breathing_callback(PWMDriver *pwmp) -{ - (void)pwmp; - uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 256); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - breathing_interrupt_disable(); - } - - uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); - - chSysLockFromISR(); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - duty - ) - ); - chSysUnlockFromISR(); -} diff --git a/keyboards/handwired/co60/rev7/led_custom.h b/keyboards/handwired/co60/rev7/led_custom.h deleted file mode 100644 index 56e723db8f77..000000000000 --- a/keyboards/handwired/co60/rev7/led_custom.h +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2019 John M Daly - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -void backlight_task(void); -void breathing_interrupt_disable(void); -void breathing_interrupt_enable(void); diff --git a/keyboards/handwired/co60/rev7/mcuconf.h b/keyboards/handwired/co60/rev7/mcuconf.h index 69bf9185d170..7ad013744665 100644 --- a/keyboards/handwired/co60/rev7/mcuconf.h +++ b/keyboards/handwired/co60/rev7/mcuconf.h @@ -210,7 +210,7 @@ /* * SPI driver system settings. */ -#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI1 TRUE #define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE #define STM32_SPI_SPI1_DMA_PRIORITY 1 diff --git a/keyboards/handwired/co60/rev7/rev7.c b/keyboards/handwired/co60/rev7/rev7.c index 3d0964d899e2..40fd7e664900 100644 --- a/keyboards/handwired/co60/rev7/rev7.c +++ b/keyboards/handwired/co60/rev7/rev7.c @@ -15,25 +15,3 @@ */ #include "rev7.h" -#include "backlight.h" -#include "led.h" -#include "printf.h" - -backlight_levels_config_t kb_backlight_config = { - .enable = true, - .breathing = true, - .level = BACKLIGHT_LEVELS -}; - -uint8_t *o_fb; - -uint16_t counterst = 0; - -void matrix_init_kb(void) { - matrix_init_user(); - backlight_init_ports(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} diff --git a/keyboards/handwired/co60/rev7/rev7.h b/keyboards/handwired/co60/rev7/rev7.h index 4ab2b8d72200..fb9c7cb315a3 100644 --- a/keyboards/handwired/co60/rev7/rev7.h +++ b/keyboards/handwired/co60/rev7/rev7.h @@ -126,21 +126,3 @@ { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, KC_NO }, \ } -// Backlighting -typedef union { - uint8_t raw; - struct { - bool enable :1; - bool breathing : 1; - uint8_t level :6; - }; -} backlight_levels_config_t; - -extern backlight_levels_config_t kb_backlight_config; -extern bool kb_backlight_breathing; - -void backlight_init_ports(void); -void backlight_set(uint8_t level); -bool is_breathing(void); -void breathing_enable(void); -void breathing_disable(void); diff --git a/keyboards/handwired/co60/rev7/rules.mk b/keyboards/handwired/co60/rev7/rules.mk index 9daeaf047a7b..50e4bb8918c2 100644 --- a/keyboards/handwired/co60/rev7/rules.mk +++ b/keyboards/handwired/co60/rev7/rules.mk @@ -1,8 +1,8 @@ # MCU name MCU = STM32F303 -# Code for backlight breathing: -SRC += led.c +# Use SPI for RGB underglow: +WS2812_DRIVER = spi # Build Options # comment out to disable the options. @@ -15,7 +15,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c b/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c index 2bc5432712ae..1c835bad1f9d 100644 --- a/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c +++ b/keyboards/handwired/steamvan/keymaps/jmdaly/keymap.c @@ -44,10 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_LGUI, _______, _______, _______, _______, _______, MO(_L4) ), [_L3] = LAYOUT_standard( /* LAYER 3 */ - KC_MINS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_EQL, KC_PIPE, KC_TILD, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_INS, - _______, _______, _______, KC_DQUO, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, - _______, _______, _______, _______, _______, _______, _______, _______ + KC_MINS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_EQL, KC_PIPE, KC_TILD, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_INS, + _______, RGB_TOG, RGB_MOD, RGB_RMOD, KC_DQUO, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ ), [_L4] = LAYOUT_standard( /* LAYER 4 */ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_PGUP, _______, diff --git a/keyboards/handwired/steamvan/rev1/config.h b/keyboards/handwired/steamvan/rev1/config.h index f10f42966b41..f47dc90c1912 100644 --- a/keyboards/handwired/steamvan/rev1/config.h +++ b/keyboards/handwired/steamvan/rev1/config.h @@ -57,9 +57,11 @@ along with this program. If not, see . /* Backlight configuration * Backlight LEDs on B8 */ -#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_PIN B8 #define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 + +#define WS2812_SPI SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 5 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/handwired/steamvan/rev1/halconf.h b/keyboards/handwired/steamvan/rev1/halconf.h index 5e5d70219e2b..7363a21a2131 100644 --- a/keyboards/handwired/steamvan/rev1/halconf.h +++ b/keyboards/handwired/steamvan/rev1/halconf.h @@ -153,7 +153,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI TRUE #endif /** diff --git a/keyboards/handwired/steamvan/rev1/led.c b/keyboards/handwired/steamvan/rev1/led.c deleted file mode 100644 index 1b78fa2f86c0..000000000000 --- a/keyboards/handwired/steamvan/rev1/led.c +++ /dev/null @@ -1,242 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "hal.h" -#include "led_custom.h" -#include "rev1.h" -#include "printf.h" - -static void breathing_callback(PWMDriver *pwmp); - -static PWMConfig pwmCFG = { - 0xFFFF, /* PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - NULL, /* No Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -static PWMConfig pwmCFG_breathing = { - 0xFFFF, /* 10kHz PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - breathing_callback, /* Breathing Callback */ - { - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ - {PWM_OUTPUT_DISABLED, NULL} - }, - 0, /* HW dependent part.*/ - 0 -}; - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - - -void backlight_init_ports(void) { - palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); - pwmStart(&PWMD4, &pwmCFG); - if(kb_backlight_config.enable){ - if(kb_backlight_config.breathing){ - breathing_enable(); - } else{ - backlight_set(kb_backlight_config.level); - } - } else { - backlight_set(0); - } -} - -void backlight_set(uint8_t level) { - uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); - if (level == 0) { - // Turn backlight off - // Disable channel 3 on PWM4 - pwmDisableChannel(&PWMD4, 2); - } else { - // Turn backlight on - if(!is_breathing()){ - // Enable channel 3 on PWM4 - pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,duty)); - } - } -} - - -uint8_t backlight_tick = 0; - -void backlight_task(void) { -} - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -bool is_breathing(void) { - return PWMD4.config == &pwmCFG_breathing; -} - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) - - -void breathing_interrupt_enable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG_breathing); - chSysLockFromISR(); - pwmEnablePeriodicNotification(&PWMD4); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - 0xFFFF - ) - ); - chSysUnlockFromISR(); -} - -void breathing_interrupt_disable(void){ - pwmStop(&PWMD4); - pwmStart(&PWMD4, &pwmCFG); -} - -void breathing_enable(void) -{ - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - breathing_interrupt_enable(); -} - -void breathing_pulse(void) -{ - if (kb_backlight_config.level == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - breathing_interrupt_enable(); -} - -void breathing_disable(void) -{ - breathing_interrupt_disable(); - // Restore backlight level - backlight_set(kb_backlight_config.level); -} - -void breathing_self_disable(void) -{ - if (kb_backlight_config.level == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()){ - breathing_disable(); - } else { - breathing_enable(); - } -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * kb_backlight_config.level; -} - -static void breathing_callback(PWMDriver *pwmp) -{ - (void)pwmp; - uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 256); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - breathing_interrupt_disable(); - } - - uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); - - chSysLockFromISR(); - pwmEnableChannelI( - &PWMD4, - 2, - PWM_FRACTION_TO_WIDTH( - &PWMD4, - 0xFFFF, - duty - ) - ); - chSysUnlockFromISR(); -} diff --git a/keyboards/handwired/steamvan/rev1/led_custom.h b/keyboards/handwired/steamvan/rev1/led_custom.h deleted file mode 100644 index 56e723db8f77..000000000000 --- a/keyboards/handwired/steamvan/rev1/led_custom.h +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2019 John M Daly - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -void backlight_task(void); -void breathing_interrupt_disable(void); -void breathing_interrupt_enable(void); diff --git a/keyboards/handwired/steamvan/rev1/mcuconf.h b/keyboards/handwired/steamvan/rev1/mcuconf.h index 69bf9185d170..7ad013744665 100644 --- a/keyboards/handwired/steamvan/rev1/mcuconf.h +++ b/keyboards/handwired/steamvan/rev1/mcuconf.h @@ -210,7 +210,7 @@ /* * SPI driver system settings. */ -#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI1 TRUE #define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE #define STM32_SPI_SPI1_DMA_PRIORITY 1 diff --git a/keyboards/handwired/steamvan/rev1/rev1.c b/keyboards/handwired/steamvan/rev1/rev1.c index 3188649494b7..53f9a400f492 100644 --- a/keyboards/handwired/steamvan/rev1/rev1.c +++ b/keyboards/handwired/steamvan/rev1/rev1.c @@ -15,22 +15,3 @@ */ #include "rev1.h" -#include "led.h" -#include "printf.h" - -backlight_config_t kb_backlight_config = { - .enable = true, - .breathing = true, - .level = BACKLIGHT_LEVELS -}; - - - -void matrix_init_kb(void) { - matrix_init_user(); - backlight_init_ports(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} diff --git a/keyboards/handwired/steamvan/rev1/rev1.h b/keyboards/handwired/steamvan/rev1/rev1.h index 83f7ecb9ca0b..1cb72277ff91 100644 --- a/keyboards/handwired/steamvan/rev1/rev1.h +++ b/keyboards/handwired/steamvan/rev1/rev1.h @@ -16,7 +16,6 @@ #pragma once #include "quantum.h" -#include "backlight.h" // This a shortcut to help you visually see your layout. // There are a number of variations depending on the layout of your bottom row. @@ -79,12 +78,3 @@ { K30, K31, K32, K33, K34, KC_NO, K36, KC_NO, K38, K39, K3A, K3B } \ } -// Backlighting -extern backlight_config_t kb_backlight_config; -extern bool kb_backlight_breathing; - -void backlight_init_ports(void); -void backlight_set(uint8_t level); -bool is_breathing(void); -void breathing_enable(void); -void breathing_disable(void); diff --git a/keyboards/handwired/steamvan/rev1/rules.mk b/keyboards/handwired/steamvan/rev1/rules.mk index 471cb4c1e1b8..797d7b35da2e 100644 --- a/keyboards/handwired/steamvan/rev1/rules.mk +++ b/keyboards/handwired/steamvan/rev1/rules.mk @@ -1,8 +1,8 @@ # MCU name MCU = STM32F303 -# Code for backlight breathing: -SRC += led.c +# Use SPI for RGB underglow: +WS2812_DRIVER = spi # Build Options # comment out to disable the options. @@ -15,7 +15,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID From af03ff145d914dd5fc7edb17ebe574e42554bd92 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 13 Jan 2020 03:49:01 +0000 Subject: [PATCH 031/331] Remove backlight_init_ports from duck/orion/v3 (#7878) --- keyboards/duck/orion/v3/matrix.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c index f93c7a9cd95b..84673bd44f05 100644 --- a/keyboards/duck/orion/v3/matrix.c +++ b/keyboards/duck/orion/v3/matrix.c @@ -46,11 +46,6 @@ __attribute__ ((weak)) void matrix_scan_user(void) { } -void backlight_init_ports(void) -{ - -} - void indicator_init_ports(void) { // Num LED From 869ce2f500ce48afdb2880c686aae2e522d0ec75 Mon Sep 17 00:00:00 2001 From: Michael Firmin Date: Mon, 13 Jan 2020 11:34:12 -0500 Subject: [PATCH 032/331] Update Levinson Readme to reflect changes to directory structure (#7883) Updates the example make commands in the Levinson readme to keebio/levinson/... instead of levinson/... Also updated the example to rev3 (the current version of the board) --- keyboards/keebio/levinson/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/keebio/levinson/readme.md b/keyboards/keebio/levinson/readme.md index 8cb4ff1cf795..f328aa4205f5 100644 --- a/keyboards/keebio/levinson/readme.md +++ b/keyboards/keebio/levinson/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make levinson/rev2:default + make keebio/levinson/rev3:default Example of flashing this keyboard with Pro micro: - make levinson/rev2:default:avrdude + make keebio/levinson/rev3:default:avrdude Example of flashing this keyboard with Elite-C: @@ -21,7 +21,7 @@ You'll need to add `BOOTLOADER = atmel-dfu` to your `rules.mk` to ensure that re Hold the reset button on the Elite-C board, or the reset button on the keyboard if already assembled, then release the button and run: - make levinson/rev2:default:dfu + make keebio/levinson/rev3:default:dfu See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From 1034df577d2931292802e00c61dc9133c67dcabd Mon Sep 17 00:00:00 2001 From: Xelus22 Date: Tue, 14 Jan 2020 03:36:12 +1000 Subject: [PATCH 033/331] [Keyboard] Dawn60 bug fix [URGENT] (#7881) --- keyboards/xelus/dawn60/config.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/keyboards/xelus/dawn60/config.h b/keyboards/xelus/dawn60/config.h index da709aa4ab13..7691bb301f44 100644 --- a/keyboards/xelus/dawn60/config.h +++ b/keyboards/xelus/dawn60/config.h @@ -77,6 +77,15 @@ // This conditionally compiles the backlight code for Dawn60 specifics #define RGB_BACKLIGHT_DAWN60 +//RGB Underglow defines +#define RGB_DI_PIN F0 +#define WS2812_LED_TOTAL 20 + +#define RGB_UNDERGLOW_ALPHA_TOP_START 0 +#define RGB_UNDERGLOW_ALPHA_TOP_END 6 +#define RGB_UNDERGLOW_ALPHA_BOT_START 12 +#define RGB_UNDERGLOW_ALPHA_BOT_END 15 + // enable/disable LEDs based on layout // switch between split backspace (1) or normal backspace(0) #define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 @@ -112,15 +121,6 @@ #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } -//RGB Underglow defines -#define RGB_DI_PIN F0 -#define WS2812_LED_TOTAL 20 - -#define RGB_UNDERGLOW_ALPHA_TOP_START 0 -#define RGB_UNDERGLOW_ALPHA_TOP_END 6 -#define RGB_UNDERGLOW_ALPHA_BOT_START 12 -#define RGB_UNDERGLOW_ALPHA_BOT_END 15 - // These define which keys in the matrix are alphas/mods // Used for backlight effects so colors are different for // alphas vs. mods @@ -137,9 +137,6 @@ #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -//RGB reactive only on keypress (put 1 to enable) -#define RGB_REACTIVE_LEFT_RIGHT 0 -#define RGB_REACTIVE_CYCLE_ALL 0 -#define RGB_REACTIVE_VERTICAL 0 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 From 390a4fdc9d9a7c65c202d69eb40fbfcfcb070bb0 Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Mon, 13 Jan 2020 12:40:00 -0500 Subject: [PATCH 034/331] [Keymap] fixed conflicts and made sure keymaps compiled, and some newer (older) keymaps snuck in (#7828) * hope this works * Some new things crept in * remove nonsense config file * spacing fix * more spacing * quick revert of mysterious file * file revert take two * take three * take four * deleted unneeded lines * brought back not-unneeded line * whitespace delete --- .../tragicforce68/keymaps/rossman360/rules.mk | 1 + keyboards/keebio/viterbi/keymaps/met/keymap.c | 321 ++++++++++++++++++ keyboards/keebio/viterbi/keymaps/met/rules.mk | 1 + users/rossman360/rossman360.h | 1 - 4 files changed, 323 insertions(+), 1 deletion(-) create mode 100644 keyboards/keebio/viterbi/keymaps/met/keymap.c create mode 100644 keyboards/keebio/viterbi/keymaps/met/rules.mk diff --git a/keyboards/keebio/tragicforce68/keymaps/rossman360/rules.mk b/keyboards/keebio/tragicforce68/keymaps/rossman360/rules.mk index 4c2b0289a2da..d10eda0fbe27 100644 --- a/keyboards/keebio/tragicforce68/keymaps/rossman360/rules.mk +++ b/keyboards/keebio/tragicforce68/keymaps/rossman360/rules.mk @@ -1 +1,2 @@ +MACROS_ENABLED = yes BOOTLOADER = atmel-dfu diff --git a/keyboards/keebio/viterbi/keymaps/met/keymap.c b/keyboards/keebio/viterbi/keymaps/met/keymap.c new file mode 100644 index 000000000000..45427018a7b4 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/met/keymap.c @@ -0,0 +1,321 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define CANCEL LCTL(KC_C) +#define TERM LCTL(LALT(KC_T)) +#define ALPHAMOD LT(_ALPHA, KC_VOLD) +#define CTLBSP MT(MOD_LCTL, KC_BSPC) +#define GUIDEL MT(MOD_LGUI, KC_DEL) +#define ALTSPC MT(MOD_LALT, KC_SPACE) +#define SPCMOD LT(_MOD, KC_SPACE) +#define JUMPBACK LSFT(KC_TAB) +#define NTAB LCTL(KC_T) +#define CTAB LCTL(KC_W) +#define TAB1 LCTL(KC_1) +#define TAB2 LCTL(KC_2) +#define TAB3 LCTL(KC_3) +#define TAB4 LCTL(KC_4) +#define BWORD LCTL(KC_BSPC) +#define LWORD LCTL(KC_LEFT) +#define RWORD LCTL(KC_RIGHT) +#define TABMOD LT(_MOD, KC_TAB) +#define ENTMOD LT(_ENT, KC_ENTER) + +enum layer_names { + _BASE, + _PLAYING, + _PLAYED, + _NUMS, + _FN, + _TEST, + _ALPHA, + _QWERTY, + _REV, + _DEL, + _MOD, + _ENT +}; + +enum custom_keycodes { + MET = SAFE_RANGE, + SET, + GO, + STOP, + RESUME, + NEWRESUME, + SYNC, + SHUTDOWN, + REBOOT, + SOURCE, + PUSH, + TEST, + TST, + ENAME, + SNAME, + LNAME, + BUS, + PMERGE, + CSPEAK +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SET: + if (record->event.pressed) { + layer_on(_NUMS); + SEND_STRING("met "); +} + break; + case GO: + if (record->event.pressed) { + layer_off(_NUMS); + layer_off(_ALPHA); + layer_off(_PLAYED); + layer_on(_PLAYING); + SEND_STRING(SS_TAP(X_ENTER)); +} + break; + case STOP: + if (record->event.pressed) { + layer_off(_PLAYING); + layer_on(_PLAYED); + layer_off(_NUMS); + layer_off(_ALPHA); + SEND_STRING(SS_TAP(X_N)); + SEND_STRING(SS_TAP(X_N)); + SEND_STRING(SS_LCTRL(SS_TAP(X_C))); +} + break; + case RESUME: + if (record->event.pressed) { + layer_off(_PLAYED); + layer_on(_PLAYING); + SEND_STRING(SS_LCTRL(SS_TAP(X_C))); + SEND_STRING(SS_TAP(X_UP)); + SEND_STRING(SS_TAP(X_ENTER)); +} + break; + case NEWRESUME: + if (record->event.pressed) { + layer_off(_NUMS); + layer_off(_ALPHA); + layer_off(_PLAYED); + layer_on(_PLAYING); + SEND_STRING(SS_TAP(X_R)); + SEND_STRING(SS_TAP(X_ENTER)); +} + break; + case SYNC: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_N)); +} + break; + case SHUTDOWN: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL(SS_TAP(X_C))); + SEND_STRING("shutdown now"); + SEND_STRING(SS_TAP(X_ENTER)); +} + break; + case REBOOT: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL(SS_TAP(X_C))); + SEND_STRING("reboot"); + SEND_STRING(SS_TAP(X_ENTER)); + } + break; + case SOURCE: + if (record->event.pressed) { + SEND_STRING("source .bashrc"); + SEND_STRING(SS_TAP(X_ENTER)); + } + break; + case PUSH: + if (record->event.pressed) { + SEND_STRING("ftp rossmontsinger.net"); + _delay_ms(250); + SEND_STRING(SS_TAP(X_ENTER)); + _delay_ms(2250); + SEND_STRING("met@rossmontsinger.net"); + _delay_ms(250); + SEND_STRING(SS_TAP(X_ENTER)); + _delay_ms(2500); + SEND_STRING("metboard"); + _delay_ms(250); + SEND_STRING(SS_TAP(X_ENTER)); + } + break; + case TEST: + if (record->event.pressed) { + layer_off(_NUMS); + layer_off(_ALPHA); + layer_off(_PLAYED); + layer_on(_PLAYING); + SEND_STRING(SS_LCTRL(SS_TAP(X_C))); + _delay_ms(250); + SEND_STRING("play Desktop/met/a_lazoom.mp3"); + SEND_STRING(SS_TAP(X_ENTER)); + } + case TST: + if (record->event.pressed) { + SEND_STRING("tst"); + SEND_STRING(SS_TAP(X_ENTER)); + } + break; + case ENAME: + if (record->event.pressed) { + SEND_STRING("sname "); + layer_on(_NUMS); + layer_on(_ALPHA); + } + break; + case SNAME: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ENTER)); + layer_off(_NUMS); + layer_off(_ALPHA); + } + break; + case LNAME: + if (record->event.pressed) { + SEND_STRING("met $"); + layer_off(_NUMS); + layer_on(_ALPHA); + } + break; + case BUS: + if (record->event.pressed) { + SEND_STRING("met $bus"); + layer_off(_NUMS); + layer_off(_ALPHA); + layer_off(_PLAYED); + layer_on(_PLAYING); + SEND_STRING(SS_TAP(X_ENTER)); + } + break; + case PMERGE: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_HOME)); + SEND_STRING(SS_TAP(X_BSPACE)); + SEND_STRING(SS_TAP(X_SPACE)); + SEND_STRING(SS_LCTRL(SS_TAP(X_BSPACE))); + SEND_STRING(SS_TAP(X_SPACE)); + } +break; +case CSPEAK: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN)); + SEND_STRING(SS_TAP(X_ENTER)); + SEND_STRING(SS_TAP(X_ENTER)); + SEND_STRING(SS_TAP(X_PGDOWN)); +} + break; +}; + + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_5x14( + KC_NO, STOP , TST , _______, _______, _______, BUS , _______, _______, _______, _______, _______, _______, _______, \ + KC_NO, _______, SET , SET , SET , _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_NO, _______, SET , SET , SET , _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_NO, LNAME , SET , SET , SET , _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_NO, MO(_FN), _______, SET , _______, _______, _______, TG(_QWERTY),KC_B, _______, _______, _______, _______, _______ \ + ), + + [_PLAYING] = LAYOUT_ortho_5x14( + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, STOP , _______, _______, _______, _______, _______, _______, _______ + ), + + [_PLAYED] = LAYOUT_ortho_5x14( + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______,_______, _______, _______, _______,NEWRESUME, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NUMS] = LAYOUT_ortho_5x14( + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, KC_7 , KC_8 , KC_9 , _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, KC_4 , KC_5 , KC_6 , _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, KC_1 , KC_2 , KC_3 , _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, KC_0 , _______, _______, GO , _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT_ortho_5x14( + KC_NO, SHUTDOWN,_______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, + KC_NO, REBOOT , _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, ENAME , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, _______, _______, _______, _______, SOURCE , _______, _______, _______, _______, _______, _______, _______ + ), + + [_TEST] = LAYOUT_ortho_5x14( + KC_NO, TST , TST , TST , TST , TST , TST , _______, _______, _______, _______, _______, _______, _______, + KC_NO, TST , TST , TST , TST , TST , TST , _______, _______, _______, _______, _______, _______, _______, + KC_NO, TST , TST , TST , TST , TST , TST , _______, _______, _______, _______, _______, _______, _______, + KC_NO, TST , TST , TST , TST , TST , TST , _______, _______, _______, _______, _______, _______, _______, + KC_NO, TST , TST , TST , TST , TST , TST , _______, _______, _______, _______, _______, _______, _______ + ), + + [_ALPHA] = LAYOUT_ortho_5x14( + KC_NO, _______, KC_Y , KC_U , KC_I , KC_O , KC_P , _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_N , KC_Q , KC_W , KC_E , KC_R , KC_T , _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_M , KC_A , KC_S , KC_D , KC_F , KC_G , _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, _______, _______, _______, _______, _______, _______, + KC_NO, _______, KC_H , KC_J , KC_K , KC_L , GO , _______, _______, _______, _______, _______, _______, _______ + ), + + [_QWERTY] = LAYOUT_ortho_5x14( + KC_NO, KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , + KC_NO, KC_CAPS, KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC , + KC_NO, KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_PGUP , + KC_NO, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_UP, KC_PGDN , + KC_NO, CTLBSP , GUIDEL , KC_ENTER, ALTSPC, TABMOD , KC_BSPC, ENTMOD , SPCMOD ,MO(_DEL), KC_BSLS, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + + [_REV] = LAYOUT_ortho_5x14( + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, KC_TAB , KC_PGDN, _______, _______, _______, _______, _______, _______, _______ + ), + + + [_DEL] = LAYOUT_ortho_5x14( + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, KC_BSPC, BWORD , _______, _______, _______, _______, _______, _______, _______ + ), + + [_MOD] = LAYOUT_ortho_5x14( + KC_NO , KC_GRAVE,KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , NTAB , + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CTAB, + KC_NO , _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP ,KC_RIGHT, KC_END , _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, PMERGE , KC_DOWN, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, LWORD , RWORD , TG(_QWERTY),_______,_______,_______,_______, _______, _______ + ), + + [_ENT] = LAYOUT_ortho_5x14( + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NO , _______, _______, _______, _______, _______, CSPEAK , _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/keebio/viterbi/keymaps/met/rules.mk b/keyboards/keebio/viterbi/keymaps/met/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/met/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/users/rossman360/rossman360.h b/users/rossman360/rossman360.h index e5629e20edf2..9d6ee5981b1e 100644 --- a/users/rossman360/rossman360.h +++ b/users/rossman360/rossman360.h @@ -26,4 +26,3 @@ enum custom_keycodes { PMERGE, REMCAPS, }; - From 1b8cb95f2e56acf09bb66e779b800ae14aa074e5 Mon Sep 17 00:00:00 2001 From: csc027 Date: Mon, 13 Jan 2020 17:41:13 +0000 Subject: [PATCH 035/331] [Keymap] csc027/macro-sync-keymap (#7873) * Basic functionality to synchronize the strings and enums using C preprocessor macros. * Updated all the custom convenience macros to work. * Removed some duplicate update_tri_layer calls. * Simplified the convenience accelerator macros for synchronizing enums and strings by removing the short enum names. * Updated the CUSTOM_MACROS macro to use SS_LCTL instead of SS_LCTRL. * Fixed a bug where the right side of the convenience layer in the Iris keymap was incorrectly listed twice. * Removed the tenkey from the convenience layer. Added Windows 10 virtual desktop shortcuts to the convenience layer. * Fixed a bug where the macro range was not set correctly. * Added sigil values for the keycode enum so that additions to the sync macros will not require changes to the process_record_user ranges. * Hacked send_string_P to work with ChibiOS boards. * Switched to using I2C for the Iris keyboard. * Finished a comment. * Updated comments to explain that for non-AVR MCUs, the PROGMEM macro doesn't do anything. * Updated the synchronization macros to use the more descriptive "NAME" instead of "CALL". Moved the Control-Alt-Delete chord macro to the synchronization macro. * Simplified the custom macros by consolidating the macros into a context change macro instead of using alt-tab and minimize macros. * Fixed a formatting issue where several tabs were used instead of 4 spaces. * Added more comments to explain the synchronization macros. * Simplified the PARAMS macro, since any parameters could be passed with a space by the declarer instead. * Consolidated the synchronization macros into a single list. Simplified the synchronization mechanism. * Removed the overloading macro, since it is no longer needed. * Updated the convenience layer comments to reflect the changes made. * Renamed the git_macros pointer table to custom_macros, since it no longer solely consists of git macros. * Clarified that the send_string_P function's use of pgm_read_byte is different for AVR and non-AVR compilation targets. --- keyboards/keebio/iris/keymaps/csc027/config.h | 2 +- keyboards/keebio/iris/keymaps/csc027/keymap.c | 8 +- users/csc027/csc027.c | 60 +++---- users/csc027/csc027.h | 32 +--- users/csc027/defines.h | 157 ++++++++++++------ 5 files changed, 141 insertions(+), 118 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/csc027/config.h b/keyboards/keebio/iris/keymaps/csc027/config.h index 01bb31a6e14a..5d201a6f10a6 100644 --- a/keyboards/keebio/iris/keymaps/csc027/config.h +++ b/keyboards/keebio/iris/keymaps/csc027/config.h @@ -17,7 +17,7 @@ along with this program. If not, see . #pragma once -// #define USE_I2C +#define USE_I2C #define EE_HANDS #undef RGBLED_NUM diff --git a/keyboards/keebio/iris/keymaps/csc027/keymap.c b/keyboards/keebio/iris/keymaps/csc027/keymap.c index 398947555c7f..82a07739141a 100644 --- a/keyboards/keebio/iris/keymaps/csc027/keymap.c +++ b/keyboards/keebio/iris/keymaps/csc027/keymap.c @@ -45,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_CN] = LAYOUT_wrapper( - ___________________CONVENIENCE_L1__________________, ___________________CONVENIENCE_L1__________________, - ___________________CONVENIENCE_L2__________________, ___________________CONVENIENCE_L2__________________, - ___________________CONVENIENCE_L3__________________, ___________________CONVENIENCE_L3__________________, - ___________________CONVENIENCE_L4__________________, _______, _______, ___________________CONVENIENCE_L4__________________, + ___________________CONVENIENCE_L1__________________, ___________________CONVENIENCE_R1__________________, + ___________________CONVENIENCE_L2__________________, ___________________CONVENIENCE_R2__________________, + ___________________CONVENIENCE_L3__________________, ___________________CONVENIENCE_R3__________________, + ___________________CONVENIENCE_L4__________________, _______, _______, ___________________CONVENIENCE_R4__________________, _______, _______, _______, _______, _______, _______ ), diff --git a/users/csc027/csc027.c b/users/csc027/csc027.c index 106be9b690fe..de1bad6f2547 100644 --- a/users/csc027/csc027.c +++ b/users/csc027/csc027.c @@ -1,32 +1,11 @@ #include "csc027.h" -static const char* git_macros[] = { - // Make sure that the macro strings match the order they are declared - // in the custom_keycodes enum. - "git add ", - "git branch ", - "git checkout ", - "git cherry-pick ", - "git commit -m \"\""SS_TAP(X_LEFT), - "git diff ", - "git fetch ", - "git grep ", - "git log --decorate --oneline --graph ", - "git init ", - "git mv ", - "git merge ", - "git push ", - "git pull ", - "git rebase ", - "git remote ", - "git reset ", - "git show ", - "git stash ", - "git status ", - "git tag ", - SS_LCTL(SS_LALT(SS_TAP(X_HOME)))"\t ", - SS_LCTL(SS_LALT(SS_TAP(X_HOME)))"\t\t\t ", - SS_LCTL(SS_LALT(SS_TAP(X_HOME)))SS_LALT("\t") +// Declare the strings in PROGMEM using the convenience macro +CUSTOM_MACROS(CUSTOM_DEF, CUSTOM_MACRO_STRING, SEMI_DELIM); + +static const char* const custom_macros[] PROGMEM = { + // Declare the pointer to the strings in PROGMEM + CUSTOM_MACROS(CUSTOM_VAR, DROP, COMMA_DELIM) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -34,26 +13,37 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LOWER: if(record->event.pressed) { layer_on(_LW); - update_tri_layer(_LW, _RS, _MS); } else { layer_off(_LW); - update_tri_layer(_LW, _RS, _MS); } + update_tri_layer(_LW, _RS, _MS); return false; case RAISE: if(record->event.pressed) { layer_on(_RS); - update_tri_layer(_LW, _RS, _MS); } else { layer_off(_RS); - update_tri_layer(_LW, _RS, _MS); } + update_tri_layer(_LW, _RS, _MS); return false; - case GIT_ADD...MC_ATRD: + case (MC_first + 1)...(MC_last - 1): if(record->event.pressed) { - // The calculation here is to make sure that the custom keycode - // aligns with the git_macros array. - send_string(git_macros[keycode - GIT_ADD]); + send_string_P( +#if defined(__AVR__) + // The accessor here first reads from the pointer array that is located + // in PROGMEM. The pointer is taken and passed to the send_string_P + // function, which is aware of the difference between RAM and PROGMEM + // pointers. + (char*)pgm_read_word(&custom_macros[keycode - MC_first - 1]) +#else + // For non-AVR MCUs, the PROGMEM macro is defined as nothing. So, the strings are + // declared in RAM instead of flash. The send_string_P function, when compiled for + // non-AVR targets, uses a different definition of pgm_read_byte internally. This + // definition uses RAM pointers instead. This is why the raw pointer is passed for + // non-AVR MCUs. + custom_macros[keycode - MC_first - 1] +#endif + ); return true; } return false; diff --git a/users/csc027/csc027.h b/users/csc027/csc027.h index 2a4c8a8a6e2a..96bf7dc0eb09 100644 --- a/users/csc027/csc027.h +++ b/users/csc027/csc027.h @@ -8,33 +8,13 @@ enum custom_keycodes { LOWER = SAFE_RANGE, RAISE, - // Git Keycodes - GIT_ADD, // Add - GIT_BRC, // Branch - GIT_CHK, // Checkout - GIT_CHR, // Cherry-Pick - GIT_CMT, // Commit - GIT_DIF, // Diff - GIT_FTC, // Fetch - GIT_GRP, // Grep - GIT_LOG, // Log - GIT_INT, // Init - GIT_MRG, // Merge - GIT_MOV, // Move (mv) - GIT_PSH, // Push - GIT_PUL, // Pull - GIT_RBS, // Rebase - GIT_RMT, // Remote - GIT_RST, // Reset - GIT_SHW, // Show - GIT_STH, // Stash - GIT_STS, // Status - GIT_TAG, // Tag - // Remote Desktop - MC_MRD7, // Minimize Remote Desktop on Windows 7 - MC_MRD8, // Minimize Remote Desktop on Windows 8+ - MC_ATRD // Switch windows on local machine from Remote Desktop on Windows + MC_first, + + // Macro Keycodes + CUSTOM_MACROS(CUSTOM_ENUM, DROP, COMMA_DELIM), + + MC_last }; enum custom_layers { diff --git a/users/csc027/defines.h b/users/csc027/defines.h index 3eaa95d83bd4..4f52938f1f68 100644 --- a/users/csc027/defines.h +++ b/users/csc027/defines.h @@ -1,7 +1,6 @@ #pragma once #include "csc027.h" -#define MC_LCAD LCA(KC_DEL) // Control-Alt-Delete #define MC_RSFE RSFT_T(KC_ENT) // Right Shift on hold, Enter on tap #define MC_LSEC LSFT_T(KC_ESC) // Left Shift on hold, Escape on tap @@ -85,15 +84,15 @@ * `-----------------------------------' `-----------------------------------' */ -#define ______________________RAISE_L1_____________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define ______________________RAISE_L2_____________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CAPS -#define ______________________RAISE_L3_____________________ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define ______________________RAISE_L4_____________________ _______, _______, _______, _______, _______, _______ +#define ______________________RAISE_L1_____________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define ______________________RAISE_L2_____________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CAPS +#define ______________________RAISE_L3_____________________ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ______________________RAISE_L4_____________________ _______, _______, _______, _______, _______, _______ -#define ______________________RAISE_R1_____________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT -#define ______________________RAISE_R2_____________________ KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX -#define ______________________RAISE_R3_____________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______ -#define ______________________RAISE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX +#define ______________________RAISE_R1_____________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT +#define ______________________RAISE_R2_____________________ KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX +#define ______________________RAISE_R3_____________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______ +#define ______________________RAISE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX /* Lower Layer * @@ -118,15 +117,15 @@ * `-----------------------------------' `-----------------------------------' */ -#define ______________________LOWER_L1_____________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 -#define ______________________LOWER_L2_____________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX -#define ______________________LOWER_L3_____________________ _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX -#define ______________________LOWER_L4_____________________ _______, _______, _______, _______, _______, _______ +#define ______________________LOWER_L1_____________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 +#define ______________________LOWER_L2_____________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX +#define ______________________LOWER_L3_____________________ _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX +#define ______________________LOWER_L4_____________________ _______, _______, _______, _______, _______, _______ -#define ______________________LOWER_R1_____________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT -#define ______________________LOWER_R2_____________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX -#define ______________________LOWER_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ -#define ______________________LOWER_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX +#define ______________________LOWER_R1_____________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT +#define ______________________LOWER_R2_____________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX +#define ______________________LOWER_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ +#define ______________________LOWER_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX /* MIT Layout (Mouse) @@ -144,15 +143,15 @@ * `-----------------------------------' `-----------------------------------' */ -#define ______________________MOUSE_L1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define ______________________MOUSE_L2_____________________ _______, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX -#define ______________________MOUSE_L3_____________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define ______________________MOUSE_L4_____________________ _______, _______, _______, _______, _______, _______ +#define ______________________MOUSE_L1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define ______________________MOUSE_L2_____________________ _______, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX +#define ______________________MOUSE_L3_____________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define ______________________MOUSE_L4_____________________ _______, _______, _______, _______, _______, _______ -#define ______________________MOUSE_R1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define ______________________MOUSE_R2_____________________ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX -#define ______________________MOUSE_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ -#define ______________________MOUSE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX +#define ______________________MOUSE_R1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define ______________________MOUSE_R2_____________________ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX +#define ______________________MOUSE_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ +#define ______________________MOUSE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX /* MIT Layout (Git) * @@ -169,49 +168,103 @@ * `-----------------------------------' `-----------------------------------' */ -#define _______________________GIT_L1______________________ XXXXXXX, GIT_CHR, GIT_SHW, GIT_RBS, GIT_RST, GIT_TAG -#define _______________________GIT_L2______________________ _______, GIT_ADD, GIT_STS, GIT_DIF, GIT_FTC, GIT_GRP -#define _______________________GIT_L3______________________ _______, XXXXXXX, XXXXXXX, GIT_CMT, GIT_MOV, GIT_BRC -#define _______________________GIT_L4______________________ _______, _______, _______, _______, _______, _______ +#define _______________________GIT_L1______________________ XXXXXXX, MC_cherrypick, MC_show, MC_rebase, MC_reset, MC_tag +#define _______________________GIT_L2______________________ _______, MC_add, MC_status, MC_diff, MC_fetch, MC_grep +#define _______________________GIT_L3______________________ _______, XXXXXXX, XXXXXXX, MC_commit, MC_mv, MC_branch +#define _______________________GIT_L4______________________ _______, _______, _______, _______, _______, _______ -#define _______________________GIT_R1______________________ XXXXXXX, GIT_PUL, GIT_INT, GIT_RMT, GIT_PSH, XXXXXXX -#define _______________________GIT_R2______________________ GIT_STH, XXXXXXX, GIT_CHK, GIT_LOG, XXXXXXX, XXXXXXX -#define _______________________GIT_R3______________________ XXXXXXX, GIT_MRG, XXXXXXX, XXXXXXX, XXXXXXX, _______ -#define _______________________GIT_R4______________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX +#define _______________________GIT_R1______________________ XXXXXXX, MC_pull, MC_init, MC_remote, MC_push, XXXXXXX +#define _______________________GIT_R2______________________ MC_stash, XXXXXXX, MC_checkout, MC_log, XXXXXXX, XXXXXXX +#define _______________________GIT_R3______________________ XXXXXXX, MC_merge, XXXXXXX, XXXXXXX, XXXXXXX, _______ +#define _______________________GIT_R4______________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX /* MIT Layout (Convenience) * - * The Convenience layer adds a tenkey and miscellaneous chords to the keyboard. - * The lack of a fifth row means that some of the tenkey's functions need to be - * moved to the left of tenkey from the top. + * The Convenience layer adds miscellaneous chords to the keyboard. * * - The Number Lock key is physically in the same spot as the Caps Lock key * in the raise layer. * - There is also a Backspace Key for convenience. * - There is a convenience macro to type the Control-Alt-Delete login chord for Windows. - * - There is a convenience macro to Minimize Remote Desktop within Remote Desktop - * in Windows. - * - There is a convenience macro to cycle through programs in Windows. - * - There is a convenience macro to go to the previous program in Windows. + * - There is a convenience macro to switch context from the Remote Desktop to the local + * machine in Windows. + * - There are convenience macros to switch between virtual desktops in Windows. + * - There are convenience macros to create and delete virtual desktops in Windows. * * ,-----------------------------------. ,-----------------------------------. - * | | |Insrt|ScrLk|PrtSc| | | * | 7 | 8 | 9 | - |BkSpc| + * | | |Insrt|ScrLk|PrtSc| | | | | | | |BkSpc| * |-----------------------------------| |-----------------------------------| - * | | | App | LCAD|MRDP7|NmLck| | / | 4 | 5 | 6 | + | | + * | | | App | LCAD|MRDCC|NmLck| |MVTDL|MVTDC|MVTDN|MVTDR| | | * |-----------------------------------| |-----------------------------------| - * | | | | ATRD|MRDP8| | | | 1 | 2 | 3 |Enter| | + * | | | | | | | | | | | | | | * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | 0 | 0 | . | | | + * | | | | | | | | | | | | | | * `-----------------------------------' `-----------------------------------' */ -#define ___________________CONVENIENCE_L1__________________ XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PSCR, XXXXXXX -#define ___________________CONVENIENCE_L2__________________ _______, XXXXXXX, KC_APP, MC_LCAD, MC_MRD7, KC_NLCK -#define ___________________CONVENIENCE_L3__________________ _______, XXXXXXX, XXXXXXX, MC_ATRD, MC_MRD8, XXXXXXX -#define ___________________CONVENIENCE_L4__________________ _______, _______, _______, _______, _______, _______ +#define ___________________CONVENIENCE_L1__________________ XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PSCR, XXXXXXX +#define ___________________CONVENIENCE_L2__________________ _______, XXXXXXX, KC_APP, MC_lcad, MC_rdcc, KC_NLCK +#define ___________________CONVENIENCE_L3__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define ___________________CONVENIENCE_L4__________________ _______, _______, _______, _______, _______, _______ + +#define ___________________CONVENIENCE_R1__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC +#define ___________________CONVENIENCE_R2__________________ MC_vtdl, MC_vtdc, MC_vtdn, MC_vtdr, XXXXXXX, XXXXXXX +#define ___________________CONVENIENCE_R3__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ +#define ___________________CONVENIENCE_R4__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + +/* Convenience macros + * + * These are accelerator macros for simplifying declaration of PROGMEM strings + */ + +// Declare variable name +#define CUSTOM_VAR(VAR) mc_##VAR + +// Declare PROGMEM string using the variable name +#define CUSTOM_DEF(VAR) const char CUSTOM_VAR(VAR)[] PROGMEM = + +// Declare enum name +#define CUSTOM_ENUM(VAR) MC_##VAR + +#define CUSTOM_MACRO_STRING(X) X + +#define COMMA_DELIM(...) , +#define SEMI_DELIM(...) ; + +#define DROP(...) + +/* Keycode synchronization macros + * + * These macros help synchronize the keycodes between the string declaration, string pointer declaration, and enum order. + */ + -#define ___________________CONVENIENCE_R1__________________ KC_PAST, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC -#define ___________________CONVENIENCE_R2__________________ KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX -#define ___________________CONVENIENCE_R3__________________ XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, _______ -#define ___________________CONVENIENCE_R4__________________ _______, KC_P0, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX +#define CUSTOM_MACROS(CUSTOM_NAME, CUSTOM_STRING, CUSTOM_DELIM) \ + CUSTOM_NAME(add) CUSTOM_STRING("git add ") CUSTOM_DELIM() \ + CUSTOM_NAME(branch) CUSTOM_STRING("git branch ") CUSTOM_DELIM() \ + CUSTOM_NAME(checkout) CUSTOM_STRING("git checkout ") CUSTOM_DELIM() \ + CUSTOM_NAME(cherrypick) CUSTOM_STRING("git cherry-pick ") CUSTOM_DELIM() \ + CUSTOM_NAME(commit) CUSTOM_STRING("git commit -m \"\""SS_TAP(X_LEFT)) CUSTOM_DELIM() \ + CUSTOM_NAME(diff) CUSTOM_STRING("git diff ") CUSTOM_DELIM() \ + CUSTOM_NAME(fetch) CUSTOM_STRING("git fetch ") CUSTOM_DELIM() \ + CUSTOM_NAME(grep) CUSTOM_STRING("git grep ") CUSTOM_DELIM() \ + CUSTOM_NAME(log) CUSTOM_STRING("git log --decorate --oneline --graph ") CUSTOM_DELIM() \ + CUSTOM_NAME(init) CUSTOM_STRING("git init ") CUSTOM_DELIM() \ + CUSTOM_NAME(mv) CUSTOM_STRING("git mv ") CUSTOM_DELIM() \ + CUSTOM_NAME(merge) CUSTOM_STRING("git merge ") CUSTOM_DELIM() \ + CUSTOM_NAME(push) CUSTOM_STRING("git push ") CUSTOM_DELIM() \ + CUSTOM_NAME(pull) CUSTOM_STRING("git pull ") CUSTOM_DELIM() \ + CUSTOM_NAME(rebase) CUSTOM_STRING("git rebase ") CUSTOM_DELIM() \ + CUSTOM_NAME(remote) CUSTOM_STRING("git remote ") CUSTOM_DELIM() \ + CUSTOM_NAME(reset) CUSTOM_STRING("git reset ") CUSTOM_DELIM() \ + CUSTOM_NAME(show) CUSTOM_STRING("git show ") CUSTOM_DELIM() \ + CUSTOM_NAME(stash) CUSTOM_STRING("git stash ") CUSTOM_DELIM() \ + CUSTOM_NAME(status) CUSTOM_STRING("git status ") CUSTOM_DELIM() \ + CUSTOM_NAME(tag) CUSTOM_STRING("git tag ") CUSTOM_DELIM() \ + CUSTOM_NAME(rdcc) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_HOME)))) CUSTOM_DELIM() \ + CUSTOM_NAME(lcad) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_DELETE)))) CUSTOM_DELIM() \ + CUSTOM_NAME(vtdl) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_LEFT)))) CUSTOM_DELIM() \ + CUSTOM_NAME(vtdc) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_F4)))) CUSTOM_DELIM() \ + CUSTOM_NAME(vtdn) CUSTOM_STRING(SS_LCTL(SS_LGUI("d"))) CUSTOM_DELIM() \ + CUSTOM_NAME(vtdr) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_RIGHT)))) From 240e1ef6fd4b3356f3d21a50b0a0ad6c0673b1dd Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Tue, 14 Jan 2020 03:06:40 +0900 Subject: [PATCH 036/331] [Keyboard] Rebuild treadstone48 rev1 firmware (#7856) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * I re-created treastone48 keyboard firmware from ./util/new_keyboard.sh After that I use common OLED_DRIVER, RGB_LIGHT and SPLIT_KEYBOARD options. And then check all keymap. * Modified by PR review --- keyboards/treadstone48/common/oled_helper.c | 25 +- keyboards/treadstone48/common/oled_helper.h | 28 +- keyboards/treadstone48/config.h | 43 -- keyboards/treadstone48/i2c.c | 162 ----- keyboards/treadstone48/i2c.h | 46 -- .../treadstone48/keymaps/default/config.h | 54 +- .../treadstone48/keymaps/default/keymap.c | 115 ++-- .../treadstone48/keymaps/default/rules.mk | 48 +- .../treadstone48/keymaps/like_jis/config.h | 55 +- .../treadstone48/keymaps/like_jis/keymap.c | 116 ++-- .../treadstone48/keymaps/like_jis/rules.mk | 66 +- .../treadstone48/keymaps/like_jis_rs/config.h | 53 +- .../treadstone48/keymaps/like_jis_rs/keymap.c | 116 ++-- .../keymaps/like_jis_rs/readme_jp.md | 4 +- .../treadstone48/keymaps/like_jis_rs/rules.mk | 67 +- keyboards/treadstone48/rev1/config.h | 275 +++++--- keyboards/treadstone48/rev1/matrix.c | 357 ----------- keyboards/treadstone48/rev1/rev1.c | 30 +- keyboards/treadstone48/rev1/rev1.h | 43 +- keyboards/treadstone48/rev1/rules.mk | 3 - keyboards/treadstone48/rev1/serial_config.h | 8 - .../rev1/serial_config_simpleapi.h | 8 - keyboards/treadstone48/rev1/split_scomm.c | 92 --- keyboards/treadstone48/rev1/split_scomm.h | 21 - keyboards/treadstone48/rev1/split_util.c | 70 --- keyboards/treadstone48/rev1/split_util.h | 16 - keyboards/treadstone48/rules.mk | 40 +- keyboards/treadstone48/serial.c | 589 ------------------ keyboards/treadstone48/serial.h | 86 --- keyboards/treadstone48/ssd1306.c | 342 ---------- keyboards/treadstone48/ssd1306.h | 90 --- keyboards/treadstone48/treadstone48.c | 1 - keyboards/treadstone48/treadstone48.h | 15 - 33 files changed, 513 insertions(+), 2571 deletions(-) delete mode 100644 keyboards/treadstone48/config.h delete mode 100644 keyboards/treadstone48/i2c.c delete mode 100644 keyboards/treadstone48/i2c.h delete mode 100644 keyboards/treadstone48/rev1/matrix.c delete mode 100644 keyboards/treadstone48/rev1/rules.mk delete mode 100644 keyboards/treadstone48/rev1/serial_config.h delete mode 100644 keyboards/treadstone48/rev1/serial_config_simpleapi.h delete mode 100644 keyboards/treadstone48/rev1/split_scomm.c delete mode 100644 keyboards/treadstone48/rev1/split_scomm.h delete mode 100644 keyboards/treadstone48/rev1/split_util.c delete mode 100644 keyboards/treadstone48/rev1/split_util.h delete mode 100644 keyboards/treadstone48/serial.c delete mode 100644 keyboards/treadstone48/serial.h delete mode 100644 keyboards/treadstone48/ssd1306.c delete mode 100644 keyboards/treadstone48/ssd1306.h delete mode 100644 keyboards/treadstone48/treadstone48.c delete mode 100644 keyboards/treadstone48/treadstone48.h diff --git a/keyboards/treadstone48/common/oled_helper.c b/keyboards/treadstone48/common/oled_helper.c index 500d3c0dc10c..18d8681a4ffb 100644 --- a/keyboards/treadstone48/common/oled_helper.c +++ b/keyboards/treadstone48/common/oled_helper.c @@ -1,8 +1,9 @@ -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE #include QMK_KEYBOARD_H -#include "ssd1306.h" +#include +#include -void render_logo(struct CharacterMatrix *matrix) { +void render_logo(void) { const char logo_buf[]={ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, @@ -10,10 +11,10 @@ void render_logo(struct CharacterMatrix *matrix) { 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, 0}; - matrix_write(matrix, logo_buf); + oled_write(logo_buf, false); } -static char keylog_buf[24] = "Key state ready."; +static char keylog_buf[24] = "Key state ready.\n"; const char code_to_name[60] = { ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', @@ -27,14 +28,14 @@ void update_key_status(uint16_t keycode, keyrecord_t *record) { if (!record->event.pressed) return; char name = (keycode < 60) ? code_to_name[keycode] : ' '; - snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c", + snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c\n", record->event.key.row, record->event.key.col, (uint16_t)keycode, name); } -void render_key_status(struct CharacterMatrix *matrix) { +void render_key_status(void) { - matrix_write(matrix, keylog_buf); + oled_write(keylog_buf, false); } static char lock_buf[24] = "Lock state ready.\n"; @@ -48,9 +49,9 @@ void update_lock_status(void) { num_lock, caps_lock, scrl_lock); } -void render_lock_status(struct CharacterMatrix *matrix) { +void render_lock_status(void) { - matrix_write(matrix, lock_buf); + oled_write(lock_buf, false); } #ifdef RGBLIGHT_ENABLE @@ -75,9 +76,9 @@ void update_led_status(void) { } } -void render_led_status(struct CharacterMatrix *matrix) { +void render_led_status(void) { - matrix_write(matrix, led_buf); + oled_write(led_buf, false); } #endif #endif diff --git a/keyboards/treadstone48/common/oled_helper.h b/keyboards/treadstone48/common/oled_helper.h index 44628a526118..69ab70560689 100644 --- a/keyboards/treadstone48/common/oled_helper.h +++ b/keyboards/treadstone48/common/oled_helper.h @@ -1,35 +1,35 @@ -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE -void render_logo(struct CharacterMatrix *matrix); +void render_logo(void); void update_key_status(uint16_t keycode, keyrecord_t *record); -void render_key_status(struct CharacterMatrix *matrix); +void render_key_status(void); void update_lock_status(void); -void render_lock_status(struct CharacterMatrix *matrix); +void render_lock_status(void); -#define RENDER_LOGO(a) render_logo(a) +#define RENDER_LOGO() render_logo() #define UPDATE_KEY_STATUS(a, b) update_key_status(a, b) -#define RENDER_KEY_STATUS(a) render_key_status(a) +#define RENDER_KEY_STATUS() render_key_status() #define UPDATE_LOCK_STATUS() update_lock_status() -#define RENDER_LOCK_STATUS(a) render_lock_status(a) +#define RENDER_LOCK_STATUS() render_lock_status() #ifdef RGBLIGHT_ENABLE void update_led_status(void); - void render_led_status(struct CharacterMatrix *matrix); + void render_led_status(void); #define UPDATE_LED_STATUS() update_led_status() - #define RENDER_LED_STATUS(a) render_led_status(a) + #define RENDER_LED_STATUS() render_led_status() #else #define UPDATE_LED_STATUS() - #define RENDER_LED_STATUS(a) + #define RENDER_LED_STATUS() #endif #else -#define RENDER_LOGO(a) +#define RENDER_LOGO() #define UPDATE_KEY_STATUS(a, b) -#define RENDER_KEY_STATUS(a) +#define RENDER_KEY_STATUS() #define UPDATE_LOCK_STATUS() -#define RENDER_LOCK_STATUS(a) +#define RENDER_LOCK_STATUS() #define UPDATE_LED_STATUS() -#define RENDER_LED_STATUS(a) +#define RENDER_LED_STATUS() #endif diff --git a/keyboards/treadstone48/config.h b/keyboards/treadstone48/config.h deleted file mode 100644 index 2e571e2690ab..000000000000 --- a/keyboards/treadstone48/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "config_common.h" - -// GCC include 'config.h" sequence in qmk_firmware/keyboards/treadstone48/ -// -include keyboards/treadstone48/config.h -// -include keyboards/treadstone48/rev?/config.h -// -include keyboards/treadstone48/rev?/keymaps/MAPNAME/config.h -// XXXX.c - -#include - -// GCC include search path in qmk_firmare/keyboards/treadstone48/ -// #include "..." search starts here: -// #include <...> search starts here: -// keyboards/treadstone48/rev?/keymaps/MAPNAME -// keyboards/treadstone48 -// keyboards/treadstone48/rev? -// . -// ./tmk_core -// ...... - -// MACRO and FUNCTION are features that are depreciated. -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/keyboards/treadstone48/i2c.c b/keyboards/treadstone48/i2c.c deleted file mode 100644 index 4bee5c639829..000000000000 --- a/keyboards/treadstone48/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); diff --git a/keyboards/treadstone48/keymaps/default/config.h b/keyboards/treadstone48/keymaps/default/config.h index e22040cdd63f..baa4ec84615f 100644 --- a/keyboards/treadstone48/keymaps/default/config.h +++ b/keyboards/treadstone48/keymaps/default/config.h @@ -1,22 +1,18 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +/* Copyright 2020 marksard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once @@ -26,7 +22,6 @@ along with this program. If not, see . #undef TAPPING_TERM #endif #define TAPPING_TERM 225 -// #define IGNORE_MOD_TAP_INTERRUPT #ifdef MOUSEKEY_ENABLE #undef MOUSEKEY_INTERVAL @@ -45,15 +40,10 @@ along with this program. If not, see . #define MOUSEKEY_DELAY 0 #endif -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif +// If you use the HashTwenty(alpha), please enable USE_HASHTWENTY +// #define ANGELINA_KEYMAP + +// If you plug in the USB on the right side, please enable MASTER_RIGHT +// #define RHYMESTONE_RIGHTHAND + +#define OLED_FONT_H "keyboards/treadstone48/common/glcdfont.c" diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c index 6143307528c1..100434246d9a 100644 --- a/keyboards/treadstone48/keymaps/default/keymap.c +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -1,8 +1,22 @@ +/* Copyright 2020 marksard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include QMK_KEYBOARD_H #include "keymap_jp.h" #include "../common/oled_helper.h" - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -115,7 +129,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE +#include +#include + typedef struct { uint8_t state; char name[8]; @@ -152,18 +169,42 @@ static inline void update_keymap_status(void) { keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); } -static inline void render_keymap_status(struct CharacterMatrix *matrix) { +static inline void render_keymap_status(void) { - matrix_write(matrix, layer_status_buf); + oled_write(layer_status_buf, false); } #define UPDATE_KEYMAP_STATUS() update_keymap_status() -#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +static inline void render_status(void) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(); + render_keymap_status(); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(); + RENDER_KEY_STATUS(); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + +// if (is_keyboard_master()) +// return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +void oled_task_user(void) { + + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + } +} #else #define UPDATE_KEYMAP_STATUS() -#define RENDER_KEYMAP_STATUS(a) #endif @@ -198,18 +239,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; #ifdef RGBLIGHT_ENABLE - case RGB_MOD: - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - } - break; case RGBRST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); - RGB_current_mode = rgblight_config.mode; } break; #endif @@ -221,57 +254,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { UPDATE_KEYMAP_STATUS(); return result; } - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -void matrix_scan_user(void) { - iota_gfx_task(); // this is what updates the display continuously -} - -static inline void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -static inline void render_status(struct CharacterMatrix *matrix) { - - UPDATE_LED_STATUS(); - RENDER_LED_STATUS(matrix); - RENDER_KEYMAP_STATUS(matrix); - UPDATE_LOCK_STATUS(); - RENDER_LOCK_STATUS(matrix); - RENDER_KEY_STATUS(matrix); -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } - #endif - - matrix_clear(&matrix); - if (is_master) { - render_status(&matrix); - } - - matrix_update(&display, &matrix); -} - -#endif diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk index 38ef4cc9fe08..474e71ab113b 100644 --- a/keyboards/treadstone48/keymaps/default/rules.mk +++ b/keyboards/treadstone48/keymaps/default/rules.mk @@ -1,49 +1,9 @@ +MOUSEKEY_ENABLE = yes # Mouse keys TAP_DANCE_ENABLE = yes -# If your custom treadstone48 pcb, you can rewrite to yes. -OLED_ENABLE = no # OLED_ENABLE -LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations - -# Other selectable option -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" -# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. -ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) -# OPT_DEFS += -DRHYMESTONE_RIGHTHAND -# endif - -ifeq ($(strip $(ANGELINA_KEYMAP)), yes) - OPT_DEFS += -DANGELINA_KEYMAP -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +OLED_DRIVER_ENABLE = no +LTO_ENABLE = yes # If you want to change the display of OLED, you need to change here SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/keymaps/like_jis/config.h b/keyboards/treadstone48/keymaps/like_jis/config.h index 3f63a0cfbbd2..baa4ec84615f 100644 --- a/keyboards/treadstone48/keymaps/like_jis/config.h +++ b/keyboards/treadstone48/keymaps/like_jis/config.h @@ -1,22 +1,18 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +/* Copyright 2020 marksard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once @@ -26,8 +22,6 @@ along with this program. If not, see . #undef TAPPING_TERM #endif #define TAPPING_TERM 225 -// #define PREVENT_STUCK_MODIFIERS -// #define IGNORE_MOD_TAP_INTERRUPT #ifdef MOUSEKEY_ENABLE #undef MOUSEKEY_INTERVAL @@ -46,15 +40,10 @@ along with this program. If not, see . #define MOUSEKEY_DELAY 0 #endif -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif +// If you use the HashTwenty(alpha), please enable USE_HASHTWENTY +// #define ANGELINA_KEYMAP + +// If you plug in the USB on the right side, please enable MASTER_RIGHT +// #define RHYMESTONE_RIGHTHAND + +#define OLED_FONT_H "keyboards/treadstone48/common/glcdfont.c" diff --git a/keyboards/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c index b63b0c9f4958..6cde28d24b62 100644 --- a/keyboards/treadstone48/keymaps/like_jis/keymap.c +++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c @@ -1,9 +1,22 @@ +/* Copyright 2020 marksard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include QMK_KEYBOARD_H #include "keymap_jp.h" #include "../common/oled_helper.h" -extern keymap_config_t keymap_config; - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -116,7 +129,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE +#include +#include + typedef struct { uint8_t state; char name[8]; @@ -153,18 +169,42 @@ static inline void update_keymap_status(void) { keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); } -static inline void render_keymap_status(struct CharacterMatrix *matrix) { +static inline void render_keymap_status(void) { - matrix_write(matrix, layer_status_buf); + oled_write(layer_status_buf, false); } #define UPDATE_KEYMAP_STATUS() update_keymap_status() -#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +static inline void render_status(void) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(); + render_keymap_status(); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(); + RENDER_KEY_STATUS(); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + +// if (is_keyboard_master()) +// return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +void oled_task_user(void) { + + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + } +} #else #define UPDATE_KEYMAP_STATUS() -#define RENDER_KEYMAP_STATUS(a) #endif @@ -199,18 +239,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; #ifdef RGBLIGHT_ENABLE - case RGB_MOD: - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - } - break; case RGBRST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); - RGB_current_mode = rgblight_config.mode; } break; #endif @@ -222,57 +254,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { UPDATE_KEYMAP_STATUS(); return result; } - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -void matrix_scan_user(void) { - iota_gfx_task(); // this is what updates the display continuously -} - -static inline void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -static inline void render_status(struct CharacterMatrix *matrix) { - - UPDATE_LED_STATUS(); - RENDER_LED_STATUS(matrix); - RENDER_KEYMAP_STATUS(matrix); - UPDATE_LOCK_STATUS(); - RENDER_LOCK_STATUS(matrix); - RENDER_KEY_STATUS(matrix); -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } - #endif - - matrix_clear(&matrix); - if (is_master) { - render_status(&matrix); - } - - matrix_update(&display, &matrix); -} - -#endif diff --git a/keyboards/treadstone48/keymaps/like_jis/rules.mk b/keyboards/treadstone48/keymaps/like_jis/rules.mk index c53226431d33..474e71ab113b 100644 --- a/keyboards/treadstone48/keymaps/like_jis/rules.mk +++ b/keyboards/treadstone48/keymaps/like_jis/rules.mk @@ -1,67 +1,9 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +MOUSEKEY_ENABLE = yes # Mouse keys TAP_DANCE_ENABLE = yes -# If your custom treadstone48 pcb, you can rewrite to yes. -OLED_ENABLE = no # OLED_ENABLE -LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations - -# Other selectable option -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" -# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. -ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) -# OPT_DEFS += -DRHYMESTONE_RIGHTHAND -# endif - -ifeq ($(strip $(ANGELINA_KEYMAP)), yes) - OPT_DEFS += -DANGELINA_KEYMAP -endif - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +OLED_DRIVER_ENABLE = no +LTO_ENABLE = yes # If you want to change the display of OLED, you need to change here SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/config.h b/keyboards/treadstone48/keymaps/like_jis_rs/config.h index e8acd5c76d4d..95b58c23db4f 100644 --- a/keyboards/treadstone48/keymaps/like_jis_rs/config.h +++ b/keyboards/treadstone48/keymaps/like_jis_rs/config.h @@ -1,22 +1,18 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +/* Copyright 2020 marksard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once @@ -46,15 +42,10 @@ along with this program. If not, see . #define MOUSEKEY_DELAY 0 #endif -// Selection of RGBLIGHT MODE to use. -#if defined(LED_ANIMATIONS) - //#define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_ALTERNATING -#endif +// If you use the HashTwenty(alpha), please enable USE_HASHTWENTY +// #define ANGELINA_KEYMAP + +// If you plug in the USB on the right side, please enable MASTER_RIGHT +// #define RHYMESTONE_RIGHTHAND + +#define OLED_FONT_H "keyboards/treadstone48/common/glcdfont.c" diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c index 0e4ec063ccb6..354e40146f95 100644 --- a/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c +++ b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c @@ -1,9 +1,22 @@ +/* Copyright 2020 marksard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include QMK_KEYBOARD_H #include "keymap_jp.h" #include "../common/oled_helper.h" -extern keymap_config_t keymap_config; - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -165,7 +178,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE +#include +#include + typedef struct { uint8_t state; char name[8]; @@ -204,18 +220,42 @@ static inline void update_keymap_status(void) { keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); } -static inline void render_keymap_status(struct CharacterMatrix *matrix) { +static inline void render_keymap_status(void) { - matrix_write(matrix, layer_status_buf); + oled_write(layer_status_buf, false); } #define UPDATE_KEYMAP_STATUS() update_keymap_status() -#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +static inline void render_status(void) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(); + render_keymap_status(); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(); + RENDER_KEY_STATUS(); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + +// if (is_keyboard_master()) +// return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +void oled_task_user(void) { + + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + } +} #else #define UPDATE_KEYMAP_STATUS() -#define RENDER_KEYMAP_STATUS(a) #endif @@ -263,18 +303,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; #ifdef RGBLIGHT_ENABLE - case RGB_MOD: - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - } - break; case RGBRST: if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); - RGB_current_mode = rgblight_config.mode; } break; #endif @@ -286,57 +318,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { UPDATE_KEYMAP_STATUS(); return result; } - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -void matrix_scan_user(void) { - iota_gfx_task(); // this is what updates the display continuously -} - -static inline void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -static inline void render_status(struct CharacterMatrix *matrix) { - - UPDATE_LED_STATUS(); - RENDER_LED_STATUS(matrix); - RENDER_KEYMAP_STATUS(matrix); - UPDATE_LOCK_STATUS(); - RENDER_LOCK_STATUS(matrix); - RENDER_KEY_STATUS(matrix); -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } - #endif - - matrix_clear(&matrix); - if (is_master) { - render_status(&matrix); - } - - matrix_update(&display, &matrix); -} - -#endif diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md index 5a6fc1d73b83..d3ce8eb3f80c 100644 --- a/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md +++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md @@ -4,9 +4,9 @@  デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。  オプションのRhymestone用のマップを使用するために拡張しています。RhymestoneのpromicroにもTreadstone48のキーマップを入れてください。 - Rhymestoneは基本的には左手側を使うことを想定していますが、右手側を使用する場合はrules.mkにあるRHYMESTONE_RIGHTHAND設定をyesにすれば使えるようになります。 + Rhymestoneは基本的には左手側を使うことを想定していますが、右手側を使用する場合はconfig.hの以下の行を有効にしてください。 -```RHYMESTONE_RIGHTHAND=yes``` +```#define RHYMESTONE_RIGHTHAND``` ## キーマップの見かた diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk index c34bb2e34a03..3f116d1902f1 100644 --- a/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk +++ b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk @@ -1,67 +1,12 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +MOUSEKEY_ENABLE = yes # Mouse keys TAP_DANCE_ENABLE = yes -# If your custom treadstone48 pcb, you can rewrite to yes. -OLED_ENABLE = no # OLED_ENABLE -LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) -LED_ANIMATIONS = yes # LED animations - -# Other selectable option -IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" -RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. -ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. - -ifeq ($(strip $(OLED_ENABLE)), yes) - OPT_DEFS += -DOLED_ENABLE -endif - -ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -else - RGBLIGHT_ENABLE = no -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - # OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT -endif - -ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) - OPT_DEFS += -DRHYMESTONE_RIGHTHAND -endif - -ifeq ($(strip $(ANGELINA_KEYMAP)), yes) - OPT_DEFS += -DANGELINA_KEYMAP -endif +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +OLED_DRIVER_ENABLE = no +LTO_ENABLE = yes -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# If you use connection the Rhymestone, please enable RS_EXTRA_LED +OPT_DEFS += -DRS_EXTRA_LED # If you want to change the display of OLED, you need to change here SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/rev1/config.h b/keyboards/treadstone48/rev1/config.h index a46951c71a36..56ffbaef0165 100644 --- a/keyboards/treadstone48/rev1/config.h +++ b/keyboards/treadstone48/rev1/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 marksard This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,8 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once + +#include "config_common.h" /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -27,83 +27,159 @@ along with this program. If not, see . #define PRODUCT treadstone48 #define DESCRIPTION Symmetrical staggered 47+1 Keys Keyboard -#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 150 - -/* Use I2C or Serial */ -#define USE_I2C -#define USE_SERIAL -//#define USE_MATRIX_I2C - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -// OLED support -// see ./rules.mk: OLED_ENABLE=yes or no -#ifdef OLED_ENABLE - #define SSD1306OLED -#endif - /* key matrix size */ -// Rows are doubled-up #define MATRIX_ROWS 16 -#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } - -// wiring of each half #define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define UNUSED_PINS -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW -/* number of backlight levels */ +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 -/* Set 0 if debouncing isn't needed */ +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #ifndef RS_EXTRA_LED + #define RGBLED_NUM 12 + #define RGBLED_SPLIT {12, 0} + #else + #define RGBLED_NUM 32 + #define RGBLED_SPLIT {12, 20} + #endif + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 180 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE +#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE +#define LOCKING_RESYNC_ENABLE -/* ws2812 RGB LED */ -#define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER -//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD - -// treadstone48 keyboard RGB LED support -//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no -// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes -#define RGBLED_NUM 12 - -#ifndef IOS_DEVICE_ENABLE - #define RGBLIGHT_LIMIT_VAL 180 - #define RGBLIGHT_VAL_STEP 17 -#else - #define RGBLIGHT_LIMIT_VAL 50 - #define RGBLIGHT_VAL_STEP 4 -#endif -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) -// USB_MAX_POWER_CONSUMPTION value for treadstone48 keyboard -// 120 RGBoff, OLEDoff -// 120 OLED -// 330 RGB 6 -// 300 RGB 32 -// 310 OLED & RGB 32 - #define USB_MAX_POWER_CONSUMPTION 400 -#else - // fix iPhone and iPad power adapter issue - // iOS device need lessthan 100 - #define USB_MAX_POWER_CONSUMPTION 100 -#endif +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z /* * Feature disable options @@ -111,17 +187,72 @@ along with this program. If not, see . */ /* disable debug print */ -// #define NO_DEBUG +//#define NO_DEBUG /* disable print */ -// #define NO_PRINT +//#define NO_PRINT /* disable action features */ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line #endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/treadstone48/rev1/matrix.c b/keyboards/treadstone48/rev1/matrix.c deleted file mode 100644 index 8685a8125e49..000000000000 --- a/keyboards/treadstone48/rev1/matrix.c +++ /dev/null @@ -1,357 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "split_scomm.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - TX_RX_LED_INIT; - TXLED0; - RXLED0; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - matrix_init_quantum(); -} - -uint8_t _matrix_scan(void) -{ - // Right hand is stored after the left in the matirx so, we need to offset it - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); - - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_MATRIX_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(int master_changed) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; -#ifdef SERIAL_USE_MULTI_TRANSACTION - int ret=serial_update_buffers(master_changed); -#else - int ret=serial_update_buffers(); -#endif - if (ret ) { - if(ret==2) RXLED1; - return 1; - } - RXLED0; - memcpy(&matrix[slaveOffset], - (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - memcpy(&matrix[offset], - (void *)serial_master_buffer, sizeof(serial_master_buffer)); - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - int mchanged = 1; - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_I2C -// for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ -// i2c_slave_buffer[i] = matrix[offset+i]; -// } -#else // USE_SERIAL - #ifdef SERIAL_USE_MULTI_TRANSACTION - mchanged = memcmp((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); - #endif - memcpy((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); -#endif - -#ifdef USE_MATRIX_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction(mchanged) ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - #ifdef SERIAL_USE_MULTI_TRANSACTION - int change = 0; - #endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - #ifdef SERIAL_USE_MULTI_TRANSACTION - if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; - #endif - serial_slave_buffer[i] = matrix[offset+i]; - } - #ifdef SERIAL_USE_MULTI_TRANSACTION - slave_buffer_change_count += change; - #endif -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} - -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} diff --git a/keyboards/treadstone48/rev1/rev1.c b/keyboards/treadstone48/rev1/rev1.c index 2637864271a8..3daa3e8e81a8 100644 --- a/keyboards/treadstone48/rev1/rev1.c +++ b/keyboards/treadstone48/rev1/rev1.c @@ -1,15 +1,17 @@ -#include "treadstone48.h" - - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - //led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - matrix_init_user(); -}; +/* Copyright 2020 marksard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev1.h" diff --git a/keyboards/treadstone48/rev1/rev1.h b/keyboards/treadstone48/rev1/rev1.h index 16ab2d716e04..9a66d855d884 100644 --- a/keyboards/treadstone48/rev1/rev1.h +++ b/keyboards/treadstone48/rev1/rev1.h @@ -1,22 +1,31 @@ -#ifndef REV1_H -#define REV1_CONFIG_H - -#include "../treadstone48.h" +/* Copyright 2020 marksard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ // full Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -197,5 +206,3 @@ #endif ////////////////////////////////////////////////////////////////////////////// - -#endif diff --git a/keyboards/treadstone48/rev1/rules.mk b/keyboards/treadstone48/rev1/rules.mk deleted file mode 100644 index 6028b5a5b95a..000000000000 --- a/keyboards/treadstone48/rev1/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c diff --git a/keyboards/treadstone48/rev1/serial_config.h b/keyboards/treadstone48/rev1/serial_config.h deleted file mode 100644 index 37135213d55f..000000000000 --- a/keyboards/treadstone48/rev1/serial_config.h +++ /dev/null @@ -1,8 +0,0 @@ -//// #error rev2 serial config - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 - -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/treadstone48/rev1/serial_config_simpleapi.h b/keyboards/treadstone48/rev1/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e7bc..000000000000 --- a/keyboards/treadstone48/rev1/serial_config_simpleapi.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SERIAL_CONFIG_SIMPLEAPI_H -#define SERIAL_CONFIG_SIMPLEAPI_H - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/treadstone48/rev1/split_scomm.c b/keyboards/treadstone48/rev1/split_scomm.c deleted file mode 100644 index ada7867960b9..000000000000 --- a/keyboards/treadstone48/rev1/split_scomm.c +++ /dev/null @@ -1,92 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include -#include -#include -#include -#include "serial.h" -#ifdef CONSOLE_ENABLE - #include -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3], - serial_slave_buffer[4] ); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/treadstone48/rev1/split_scomm.h b/keyboards/treadstone48/rev1/split_scomm.h deleted file mode 100644 index 16887eb74f7b..000000000000 --- a/keyboards/treadstone48/rev1/split_scomm.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif diff --git a/keyboards/treadstone48/rev1/split_util.c b/keyboards/treadstone48/rev1/split_util.c deleted file mode 100644 index e1ff8b4379dc..000000000000 --- a/keyboards/treadstone48/rev1/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else -# include "split_scomm.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk index fd3c6df5700a..df284153c946 100644 --- a/keyboards/treadstone48/rules.mk +++ b/keyboards/treadstone48/rules.mk @@ -12,30 +12,28 @@ MCU = atmega32u4 BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = no -USE_I2C = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +SPLIT_KEYBOARD = yes -CUSTOM_MATRIX = yes +MOUSEKEY_ENABLE = yes # Mouse keys +TAP_DANCE_ENABLE = no -DEFAULT_FOLDER = treadstone48/rev1 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +OLED_DRIVER_ENABLE = yes -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c +DEFAULT_FOLDER = treadstone48/rev1 diff --git a/keyboards/treadstone48/serial.c b/keyboards/treadstone48/serial.c deleted file mode 100644 index 674c42d593b1..000000000000 --- a/keyboards/treadstone48/serial.c +++ /dev/null @@ -1,589 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include -#include "serial.h" - -#ifdef SOFT_SERIAL_PIN - -#ifdef __AVR_ATmega32U4__ - // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. - #ifdef USE_I2C - #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 - #error Using ATmega32U4 I2C, so can not use PD0, PD1 - #endif - #endif - - #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 - #define SERIAL_PIN_DDR DDRD - #define SERIAL_PIN_PORT PORTD - #define SERIAL_PIN_INPUT PIND - #if SOFT_SERIAL_PIN == D0 - #define SERIAL_PIN_MASK _BV(PD0) - #define EIMSK_BIT _BV(INT0) - #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) - #define SERIAL_PIN_INTERRUPT INT0_vect - #elif SOFT_SERIAL_PIN == D1 - #define SERIAL_PIN_MASK _BV(PD1) - #define EIMSK_BIT _BV(INT1) - #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) - #define SERIAL_PIN_INTERRUPT INT1_vect - #elif SOFT_SERIAL_PIN == D2 - #define SERIAL_PIN_MASK _BV(PD2) - #define EIMSK_BIT _BV(INT2) - #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) - #define SERIAL_PIN_INTERRUPT INT2_vect - #elif SOFT_SERIAL_PIN == D3 - #define SERIAL_PIN_MASK _BV(PD3) - #define EIMSK_BIT _BV(INT3) - #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) - #define SERIAL_PIN_INTERRUPT INT3_vect - #endif - #elif SOFT_SERIAL_PIN == E6 - #define SERIAL_PIN_DDR DDRE - #define SERIAL_PIN_PORT PORTE - #define SERIAL_PIN_INPUT PINE - #define SERIAL_PIN_MASK _BV(PE6) - #define EIMSK_BIT _BV(INT6) - #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) - #define SERIAL_PIN_INTERRUPT INT6_vect - #else - #error invalid SOFT_SERIAL_PIN value - #endif - -#else - #error serial.c now support ATmega32U4 only -#endif - -//////////////// for backward compatibility //////////////////////////////// -#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) -/* --- USE OLD API (compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - #endif - uint8_t volatile status0 = 0; - -SSTD_t transactions[] = { - { (uint8_t *)&status0, - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - #else - 0, (uint8_t *)NULL, - #endif - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - #else - 0, (uint8_t *)NULL, - #endif - } -}; - -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers() -{ - int result; - result = soft_serial_transaction(); - return result; -} - -#endif // end of OLD API (compatible with let's split serial.c) -//////////////////////////////////////////////////////////////////////////// - -#define ALWAYS_INLINE __attribute__((always_inline)) -#define NO_INLINE __attribute__((noinline)) -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// parity check -#define ODD_PARITY 1 -#define EVEN_PARITY 0 -#define PARITY EVEN_PARITY - -#ifdef SERIAL_DELAY - // custom setup in config.h - // #define TID_SEND_ADJUST 2 - // #define SERIAL_DELAY 6 // micro sec - // #define READ_WRITE_START_ADJUST 30 // cycles - // #define READ_WRITE_WIDTH_ADJUST 8 // cycles -#else -// ============ Standard setups ============ - -#ifndef SELECT_SOFT_SERIAL_SPEED -#define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -#if __GNUC__ < 6 - #define TID_SEND_ADJUST 14 -#else - #define TID_SEND_ADJUST 2 -#endif - -#if SELECT_SOFT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 34 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 36 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 5 - // Ultra Low speed - #define SERIAL_DELAY 48 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#else -#error invalid SELECT_SOFT_SERIAL_SPEED value -#endif /* SELECT_SOFT_SERIAL_SPEED */ -#endif /* SERIAL_DELAY */ - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH_US 1 -#ifndef SERIAL_USE_MULTI_TRANSACTION - #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -#else - #define SLAVE_INT_ACK_WIDTH_UNIT 2 - #define SLAVE_INT_ACK_WIDTH 4 -#endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static void serial_output(void) ALWAYS_INLINE; -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static void serial_low(void) ALWAYS_INLINE; -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static void serial_high(void) ALWAYS_INLINE; -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT3,INT6 - EIMSK |= EIMSK_BIT; -#if SERIAL_PIN_MASK == _BV(PE6) - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -#else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static -void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { - serial_delay_half1(); // read the middle of pulses - if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; - } else { - byte = (byte << 1) | 0; p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb)? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if(p & 1) { serial_high(); } - else { serial_low(); } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data,8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static -void change_sender2reciver(void) { - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 -} - -inline static -void change_reciver2sender(void) { - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); //3 - serial_delay_half1(); //4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) -{ - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { - -#ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -#else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount,7); - tid = bits>>3; - bits = (bits&7) != nibble_bits_count(tid); - if( bits || pecount> 0 || tid > Transaction_table_size ) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -#endif - - // target send phase - if( trans->target2initiator_buffer_size > 0 ) - serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if( trans->initiator2target_buffer_size > 0 ) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); //weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -#else -int soft_serial_transaction(int sstd_index) { - if( sstd_index > Transaction_table_size ) - return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -#endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -#ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -#else - // send transaction table index - int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while( !serial_read_pin() ) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for( int i = 0; serial_read_pin(); i++ ) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -#endif - - // initiator recive phase - // if the target is present syncronize with it - if( trans->target2initiator_buffer_size > 0 ) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if( trans->initiator2target_buffer_size > 0 ) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0;; - sei(); - return retval; -} -#endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/treadstone48/serial.h b/keyboards/treadstone48/serial.h deleted file mode 100644 index 5deaf789e30c..000000000000 --- a/keyboards/treadstone48/serial.h +++ /dev/null @@ -1,86 +0,0 @@ -#pragma once - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE OLD API (compatible with let's split serial.c) -// ex. -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 -// -// //// USE NEW API -// //// USE simple API (using signle-type transaction function) -// #define SERIAL_USE_SINGLE_TRANSACTION -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -//////////////// for backward compatibility //////////////////////////////// -#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) -/* --- USE OLD API (compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - #endif - - void serial_master_init(void); - void serial_slave_init(void); - int serial_update_buffers(void); - -#endif // end of USE OLD API -//////////////////////////////////////////////////////////////////////////// - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif diff --git a/keyboards/treadstone48/ssd1306.c b/keyboards/treadstone48/ssd1306.c deleted file mode 100644 index dd3290ba0cc8..000000000000 --- a/keyboards/treadstone48/ssd1306.c +++ /dev/null @@ -1,342 +0,0 @@ - -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c.h" -#include -#include "print.h" -#ifndef LOCAL_GLCDFONT -#include "common/glcdfont.c" -#else -#include -#endif -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -// Set this to 1 to help diagnose early startup problems -// when testing power-on with ble. Turn it off otherwise, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ - -// 'last_flush' is declared as uint16_t, -// so this must be less than 65535 -#define ScreenOffInterval 60000 /* milliseconds */ -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -static bool force_dirty = true; - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start_write(SSD1306_ADDRESS)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } - - if (i2c_master_write(0x0 /* command byte follows */)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_master_write(cmd)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_master_stop(); - return res; -} - -// Write 2-byte command sequence. -// Returns true on success -static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { - if (!_send_cmd1(cmd)) { - return false; - } - return _send_cmd1(opr); -} - -// Write 3-byte command sequence. -// Returns true on success -static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { - if (!_send_cmd1(cmd)) { - return false; - } - if (!_send_cmd1(opr1)) { - return false; - } - return _send_cmd1(opr2); -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} -#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); - send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < DisplayWidth; ++col) { - i2c_master_write(0); - } - } - - display.dirty = false; - -done: - i2c_master_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(bool rotate) { - bool success = false; - - i2c_master_init(); - send_cmd1(DisplayOff); - send_cmd2(SetDisplayClockDiv, 0x80); - send_cmd2(SetMultiPlex, DisplayHeight - 1); - - send_cmd2(SetDisplayOffset, 0); - - - send_cmd1(SetStartLine | 0x0); - send_cmd2(SetChargePump, 0x14 /* Enable */); - send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); - - if(rotate){ - // the following Flip the display orientation 180 degrees - send_cmd1(SegRemap); - send_cmd1(ComScanInc); - }else{ - // Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); - } - - send_cmd2(SetComPins, 0x2); - send_cmd2(SetContrast, 0x8f); - send_cmd2(SetPreCharge, 0xf1); - send_cmd2(SetVComDetect, 0x40); - send_cmd1(DisplayAllOnResume); - send_cmd1(NormalDisplay); - send_cmd1(DeActivateScroll); - send_cmd1(DisplayOn); - - send_cmd2(SetContrast, 0); // Dim - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, ' ', MatrixCols); - } -} - -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, ' '); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -void matrix_write(struct CharacterMatrix *matrix, const char *data) { - const char *end = data + strlen(data); - while (data < end) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, ' ', sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - send_cmd3(PageAddr, 0, MatrixRows - 1); - send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_master_write(colBits); - } - - // 1 column of space between chars (it's not included in the glyph) - //i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_master_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} - -void iota_gfx_task(void) { - iota_gfx_task_user(); - - if (display.dirty|| force_dirty) { - iota_gfx_flush(); - force_dirty = false; - } - - if (timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } -} - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { - force_dirty = true; - return true; -} - -#endif diff --git a/keyboards/treadstone48/ssd1306.h b/keyboards/treadstone48/ssd1306.h deleted file mode 100644 index 49f258efa921..000000000000 --- a/keyboards/treadstone48/ssd1306.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once - -#include -#include -#include "pincontrol.h" -#include "action.h" - -enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, - - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, - - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, - - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, - - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, - - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, -}; - -// Controls the SSD1306 128x32 OLED display via i2c - -#ifndef SSD1306_ADDRESS -#define SSD1306_ADDRESS 0x3C -#endif - -#define DisplayHeight 32 -#define DisplayWidth 128 - -#define FontHeight 8 -#define FontWidth 6 - -#define MatrixRows (DisplayHeight / FontHeight) -#define MatrixCols (DisplayWidth / FontWidth) - -struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; -}; - -struct CharacterMatrix display; - -bool iota_gfx_init(bool rotate); -void iota_gfx_task(void); -bool iota_gfx_off(void); -bool iota_gfx_on(void); -void iota_gfx_flush(void); -void iota_gfx_write_char(uint8_t c); -void iota_gfx_write(const char *data); -void iota_gfx_write_P(const char *data); -void iota_gfx_clear_screen(void); - -void iota_gfx_task_user(void); - -void matrix_clear(struct CharacterMatrix *matrix); -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write(struct CharacterMatrix *matrix, const char *data); -void matrix_write_P(struct CharacterMatrix *matrix, const char *data); -void matrix_render(struct CharacterMatrix *matrix); - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/treadstone48/treadstone48.c b/keyboards/treadstone48/treadstone48.c deleted file mode 100644 index faadb269065a..000000000000 --- a/keyboards/treadstone48/treadstone48.c +++ /dev/null @@ -1 +0,0 @@ -#include "treadstone48.h" diff --git a/keyboards/treadstone48/treadstone48.h b/keyboards/treadstone48/treadstone48.h deleted file mode 100644 index 3123d1de5315..000000000000 --- a/keyboards/treadstone48/treadstone48.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#ifdef KEYBOARD_treadstone48_rev1 - #include "rev1.h" -#endif - -#include "quantum.h" - -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif From 94ea13e73de3f41c724406c9ec38760109037651 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Mon, 13 Jan 2020 21:16:27 +0100 Subject: [PATCH 037/331] [Keyboard] Add minitomic keyboard (#7140) * Add minitomic keyboard * Small change to readme * Make changes necessary for merging Remove extra comma in info.json, move caps lock led status from keymap to keyboard, removes unused keys on full space bar layout, cleans up rules.mk and update readme blurb. * Update readme.md * Update led function, fix spacing and remove custom keycodes Removes the custom keycodes in default keymap, fixes spacing in keymap and minitomic.c and puts the new led function in as well --- keyboards/maartenwut/minitomic/config.h | 252 ++++++++++++++++++ keyboards/maartenwut/minitomic/info.json | 15 ++ .../minitomic/keymaps/default/keymap.c | 46 ++++ .../minitomic/keymaps/default/readme.md | 1 + keyboards/maartenwut/minitomic/minitomic.c | 50 ++++ keyboards/maartenwut/minitomic/minitomic.h | 53 ++++ keyboards/maartenwut/minitomic/readme.md | 23 ++ keyboards/maartenwut/minitomic/rules.mk | 32 +++ 8 files changed, 472 insertions(+) create mode 100644 keyboards/maartenwut/minitomic/config.h create mode 100644 keyboards/maartenwut/minitomic/info.json create mode 100644 keyboards/maartenwut/minitomic/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/minitomic/keymaps/default/readme.md create mode 100644 keyboards/maartenwut/minitomic/minitomic.c create mode 100644 keyboards/maartenwut/minitomic/minitomic.h create mode 100644 keyboards/maartenwut/minitomic/readme.md create mode 100644 keyboards/maartenwut/minitomic/rules.mk diff --git a/keyboards/maartenwut/minitomic/config.h b/keyboards/maartenwut/minitomic/config.h new file mode 100644 index 000000000000..8a6eed5416e3 --- /dev/null +++ b/keyboards/maartenwut/minitomic/config.h @@ -0,0 +1,252 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x0145 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Minitomic +#define DESCRIPTION A 45% staggered keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS {B1,B3,D4,D6} +#define MATRIX_COL_PINS {C6,B6,B5,B4,D7,F0,F1,F4,F5,F6,F7,B7,E6} +#define UNUSED_PINS {B2,D0,D1,D2,D3,D5} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +#define QMK_ESC_OUTPUT C6 // usually COL +#define QMK_ESC_INPUT B1 // usually ROW +#define QMK_LED C7 diff --git a/keyboards/maartenwut/minitomic/info.json b/keyboards/maartenwut/minitomic/info.json new file mode 100644 index 000000000000..4af72b36e110 --- /dev/null +++ b/keyboards/maartenwut/minitomic/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Minitomic", + "url": "", + "maintainer": "qmk", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_split_space": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3, "w":1.25}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3, "w":1.75}, {"x":6.25, "y":3, "w":2}, {"x":8.25, "y":3}, {"x":9.25, "y":3, "w":1.25}, {"x":10.5, "y":3, "w":1.25}, {"x":11.75, "y":3, "w":1.25}] + }, + "LAYOUT_full_space": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3, "w":6.25}, {"x":9.5, "y":3}, {"x":10.5, "y":3, "w":1.25}, {"x":11.75, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/maartenwut/minitomic/keymaps/default/keymap.c b/keyboards/maartenwut/minitomic/keymaps/default/keymap.c new file mode 100644 index 000000000000..4d9a69fec4d7 --- /dev/null +++ b/keyboards/maartenwut/minitomic/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _MA 0 //Main layer +#define _LO 1 //Low +#define _HI 2 //High + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_MA] = LAYOUT_split_space( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, MO(_LO), KC_SPC, KC_SPC, MO(_HI), KC_RALT, KC_APP, KC_RCTRL), \ + +[_LO] = LAYOUT_split_space( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), \ + +[_HI] = LAYOUT_split_space( + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_PSCR, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/minitomic/keymaps/default/readme.md b/keyboards/maartenwut/minitomic/keymaps/default/readme.md new file mode 100644 index 000000000000..0ec508ffa32d --- /dev/null +++ b/keyboards/maartenwut/minitomic/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the Minitomic. diff --git a/keyboards/maartenwut/minitomic/minitomic.c b/keyboards/maartenwut/minitomic/minitomic.c new file mode 100644 index 000000000000..71447b196641 --- /dev/null +++ b/keyboards/maartenwut/minitomic/minitomic.c @@ -0,0 +1,50 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "minitomic.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +void led_init_ports(void) { + //Set led pin as output, then high (off) + writePinHigh(C7); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(C7, !led_state.caps_lock); + } + return res; +} + diff --git a/keyboards/maartenwut/minitomic/minitomic.h b/keyboards/maartenwut/minitomic/minitomic.h new file mode 100644 index 000000000000..ad2e8330b879 --- /dev/null +++ b/keyboards/maartenwut/minitomic/minitomic.h @@ -0,0 +1,53 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_split_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k36, k37, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX }, \ + { k30, k31, k32, k33, k34, XXX, k36, k37, XXX, k39, k3a, k3b, XXX } \ +} + +#define LAYOUT_full_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k36, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX }, \ + { k30, k31, k32, XXX, XXX, XXX, k36, XXX, XXX, k39, k3a, k3b, XXX } \ +} diff --git a/keyboards/maartenwut/minitomic/readme.md b/keyboards/maartenwut/minitomic/readme.md new file mode 100644 index 000000000000..df0a611f89f6 --- /dev/null +++ b/keyboards/maartenwut/minitomic/readme.md @@ -0,0 +1,23 @@ +# Minitomic + +![Minitomic](https://i.imgur.com/wGtNokW.jpg) + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: Minitomic +* Hardware Availability: [maartenwut.com](https://maartenwut.com) + + +## Features +- QMK Firmware +- European switch spacing (19mm) +- USB-C Connector +- Capslock indicator under tab key +- Reset button under left shift key + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/minitomic:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/maartenwut/minitomic/rules.mk b/keyboards/maartenwut/minitomic/rules.mk new file mode 100644 index 000000000000..d483b8db71d3 --- /dev/null +++ b/keyboards/maartenwut/minitomic/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file From f609e125e4a2ba4aa6a95d3afb8026fd2e68a6e0 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 13 Jan 2020 13:28:35 -0800 Subject: [PATCH 038/331] Merlin's LAYOUT_65_ansi keymap (#7879) * add my own user keymap for LAYOUT_65_ansi for my new NK65 * remove unneeded config --- layouts/community/65_ansi/mechmerlin/keymap.c | 49 +++++++++++++++++++ .../community/65_ansi/mechmerlin/readme.md | 10 ++++ layouts/community/65_ansi/mechmerlin/rules.mk | 0 3 files changed, 59 insertions(+) create mode 100644 layouts/community/65_ansi/mechmerlin/keymap.c create mode 100644 layouts/community/65_ansi/mechmerlin/readme.md create mode 100644 layouts/community/65_ansi/mechmerlin/rules.mk diff --git a/layouts/community/65_ansi/mechmerlin/keymap.c b/layouts/community/65_ansi/mechmerlin/keymap.c new file mode 100644 index 000000000000..e604c23c6f72 --- /dev/null +++ b/layouts/community/65_ansi/mechmerlin/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "mechmerlin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│GUI │Alt │ │Alt│FN │Ctl│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [_BL] = LAYOUT_65_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FL] = LAYOUT_65_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +}; + diff --git a/layouts/community/65_ansi/mechmerlin/readme.md b/layouts/community/65_ansi/mechmerlin/readme.md new file mode 100644 index 000000000000..a0860849254f --- /dev/null +++ b/layouts/community/65_ansi/mechmerlin/readme.md @@ -0,0 +1,10 @@ +# MechMerlin's 65_ansi layout + +This is the 65% layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) +YouTube channel. + +It is used on his +* [Novelkeys NK65](https://github.com/qmk/qmk_firmware/tree/master/keyboards/nk65) + +### Build +To build the firmware file associated with this keymap, simply run `make your_keyboard:mechmerlin`. \ No newline at end of file diff --git a/layouts/community/65_ansi/mechmerlin/rules.mk b/layouts/community/65_ansi/mechmerlin/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From c293d9049a53a9589152571e9322899155b5b623 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 14 Jan 2020 08:49:31 +1100 Subject: [PATCH 039/331] Tidy up dztech keyboard.c/h and readmes (#7664) * Tidy up dztech keyboard.c/h and readmes * Use new lock LED function * Undo changes to led flags * Fix make examples * Update readmes some more * Clarify filetypes * Format as list --- keyboards/dztech/dz60rgb/dz60rgb.c | 194 +++++++++--------- keyboards/dztech/dz60rgb/dz60rgb.h | 9 +- keyboards/dztech/dz60rgb/readme.md | 14 +- keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c | 190 +++++++++--------- keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.h | 9 +- keyboards/dztech/dz60rgb_ansi/readme.md | 16 +- keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c | 191 +++++++++--------- keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h | 25 ++- keyboards/dztech/dz60rgb_wkl/readme.md | 14 +- keyboards/dztech/dz65rgb/dz65rgb.c | 200 +++++++++---------- keyboards/dztech/dz65rgb/dz65rgb.h | 9 +- keyboards/dztech/dz65rgb/readme.md | 13 +- 12 files changed, 443 insertions(+), 441 deletions(-) diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index a8217480d0b5..747b8854d479 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -1,120 +1,112 @@ #include "dz60rgb.h" + #ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_14, G_14, I_14}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_14, A_14, C_14}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, E_15, D_15, F_15}, - {0, H_15, G_15, I_15}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, -}; + { 0, K_14, J_14, L_14 }, + { 0, K_13, J_13, L_13 }, + { 0, K_12, J_12, L_12 }, + { 0, K_11, J_11, L_11 }, + { 0, K_10, J_10, L_10 }, + { 0, K_9, J_9, L_9 }, + { 0, K_8, J_8, L_8 }, + { 0, K_7, J_7, L_7 }, + { 0, K_6, J_6, L_6 }, + { 0, K_5, J_5, L_5 }, + { 0, K_4, J_4, L_4 }, + { 0, K_3, J_3, L_3 }, + { 0, K_2, J_2, L_2 }, + { 0, K_1, J_1, L_1 }, -led_config_t g_led_config = { { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, - { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } -}, { - { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, - { 214, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 224, 48 }, - { 208, 48 }, { 186, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 36, 48 }, { 9, 48 }, { 224, 64 }, { 208, 64 }, - { 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 4, 1, 1, 1 -} }; + { 0, H_14, G_14, I_14 }, + { 0, H_13, G_13, I_13 }, + { 0, H_12, G_12, I_12 }, + { 0, H_11, G_11, I_11 }, + { 0, H_10, G_10, I_10 }, + { 0, H_9, G_9, I_9 }, + { 0, H_8, G_8, I_8 }, + { 0, H_7, G_7, I_7 }, + { 0, H_6, G_6, I_6 }, + { 0, H_5, G_5, I_5 }, + { 0, H_4, G_4, I_4 }, + { 0, H_3, G_3, I_3 }, + { 0, H_2, G_2, I_2 }, + { 0, H_1, G_1, I_1 }, + { 0, E_14, D_14, F_14 }, + { 0, E_12, D_12, F_12 }, + { 0, E_11, D_11, F_11 }, + { 0, E_10, D_10, F_10 }, + { 0, E_9, D_9, F_9 }, + { 0, E_8, D_8, F_8 }, + { 0, E_7, D_7, F_7 }, + { 0, E_6, D_6, F_6 }, + { 0, E_5, D_5, F_5 }, + { 0, E_4, D_4, F_4 }, + { 0, E_3, D_3, F_3 }, + { 0, E_2, D_2, F_2 }, + { 0, E_1, D_1, F_1 }, + { 0, B_14, A_14, C_14 }, + { 0, B_13, A_13, C_13 }, + { 0, B_11, A_11, C_11 }, + { 0, B_10, A_10, C_10 }, + { 0, B_9, A_9, C_9 }, + { 0, B_8, A_8, C_8 }, + { 0, B_7, A_7, C_7 }, + { 0, B_6, A_6, C_6 }, + { 0, B_5, A_5, C_5 }, + { 0, B_4, A_4, C_4 }, + { 0, B_3, A_3, C_3 }, + { 0, B_2, A_2, C_2 }, + { 0, B_1, A_1, C_1 }, + + { 0, B_15, A_15, C_15 }, + { 0, E_13, D_13, F_13 }, + { 0, B_12, A_12, C_12 }, + { 0, E_15, D_15, F_15 }, + { 0, H_15, G_15, I_15 }, + { 0, B_16, A_16, C_16 }, + { 0, E_16, D_16, F_16 }, + { 0, H_16, G_16, I_16 }, + { 0, K_16, J_16, L_16 } +}; + +led_config_t g_led_config = { + { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, + { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, + { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } + }, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 214, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 208, 48 }, { 186, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 36, 48 }, { 9, 48 }, + { 224, 64 }, { 208, 64 }, { 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } + }, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 4, 1, 1, 1 + } +}; #endif -void matrix_init_kb(void) { - matrix_init_user(); -} -void matrix_scan_kb(void) { - matrix_scan_user(); -} -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} -void suspend_power_down_kb(void) -{ +void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); suspend_power_down_user(); } -void suspend_wakeup_init_kb(void) -{ +void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); suspend_wakeup_init_user(); } + __attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) - { +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } } - diff --git a/keyboards/dztech/dz60rgb/dz60rgb.h b/keyboards/dztech/dz60rgb/dz60rgb.h index a029933f1fff..872be7e1b328 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.h +++ b/keyboards/dztech/dz60rgb/dz60rgb.h @@ -1,12 +1,15 @@ #pragma once -#define XXX KC_NO + #include "quantum.h" + +#define XXX KC_NO + #define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K48, K49, K4A, K4B, K4D \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K48, K49, K4A, K4B, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ diff --git a/keyboards/dztech/dz60rgb/readme.md b/keyboards/dztech/dz60rgb/readme.md index 2fffa413b695..1b2eb6f85ff9 100644 --- a/keyboards/dztech/dz60rgb/readme.md +++ b/keyboards/dztech/dz60rgb/readme.md @@ -4,12 +4,18 @@ A hotswap 60% RGB keyboard. -Keyboard Maintainer: DZtech -Hardware Supported: DZtech dz60rgb, dz60rgb-ansi -Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: DZtech DZ60RGB V1 and V2 +* Hardware Availability: [KBDfans](https://kbdfans.com/) + +There are two versions of the DZ60RGB. Please use the appropriate firmware for your board. + +* V1: STM32F303 (Arm), takes .bin files +* V2: ATmega32U4 (AVR), takes .hex files Make example for this keyboard (after setting up your build environment): - make dztech/dz60rgb:default + make dztech/dz60rgb/v1:default # Arm (STM32F303) + make dztech/dz60rgb/v2:default # AVR (ATmega32U4) See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c index 6cb82dd5428f..910797120b74 100644 --- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c +++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c @@ -1,118 +1,110 @@ #include "dz60rgb_ansi.h" + #ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_14, G_14, I_14}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, E_15, D_15, F_15}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, + { 0, K_14, J_14, L_14 }, + { 0, K_13, J_13, L_13 }, + { 0, K_12, J_12, L_12 }, + { 0, K_11, J_11, L_11 }, + { 0, K_10, J_10, L_10 }, + { 0, K_9, J_9, L_9 }, + { 0, K_8, J_8, L_8 }, + { 0, K_7, J_7, L_7 }, + { 0, K_6, J_6, L_6 }, + { 0, K_5, J_5, L_5 }, + { 0, K_4, J_4, L_4 }, + { 0, K_3, J_3, L_3 }, + { 0, K_2, J_2, L_2 }, + { 0, K_1, J_1, L_1 }, + + { 0, H_14, G_14, I_14 }, + { 0, H_13, G_13, I_13 }, + { 0, H_12, G_12, I_12 }, + { 0, H_11, G_11, I_11 }, + { 0, H_10, G_10, I_10 }, + { 0, H_9, G_9, I_9 }, + { 0, H_8, G_8, I_8 }, + { 0, H_7, G_7, I_7 }, + { 0, H_6, G_6, I_6 }, + { 0, H_5, G_5, I_5 }, + { 0, H_4, G_4, I_4 }, + { 0, H_3, G_3, I_3 }, + { 0, H_2, G_2, I_2 }, + { 0, H_1, G_1, I_1 }, + + { 0, E_14, D_14, F_14 }, + { 0, E_12, D_12, F_12 }, + { 0, E_11, D_11, F_11 }, + { 0, E_10, D_10, F_10 }, + { 0, E_9, D_9, F_9 }, + { 0, E_8, D_8, F_8 }, + { 0, E_7, D_7, F_7 }, + { 0, E_6, D_6, F_6 }, + { 0, E_5, D_5, F_5 }, + { 0, E_4, D_4, F_4 }, + { 0, E_3, D_3, F_3 }, + { 0, E_2, D_2, F_2 }, + { 0, E_1, D_1, F_1 }, + + { 0, B_13, A_13, C_13 }, + { 0, B_11, A_11, C_11 }, + { 0, B_10, A_10, C_10 }, + { 0, B_9, A_9, C_9 }, + { 0, B_8, A_8, C_8 }, + { 0, B_7, A_7, C_7 }, + { 0, B_6, A_6, C_6 }, + { 0, B_5, A_5, C_5 }, + { 0, B_4, A_4, C_4 }, + { 0, B_3, A_3, C_3 }, + { 0, B_2, A_2, C_2 }, + { 0, B_1, A_1, C_1 }, + + { 0, B_15, A_15, C_15 }, + { 0, E_13, D_13, F_13 }, + { 0, B_12, A_12, C_12 }, + { 0, E_15, D_15, F_15 }, + { 0, B_16, A_16, C_16 }, + { 0, E_16, D_16, F_16 }, + { 0, H_16, G_16, I_16 }, + { 0, K_16, J_16, L_16 } }; -led_config_t g_led_config = { { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, - { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } -}, { - { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, - { 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, - { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, - { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 1, 1, 1 -} }; +led_config_t g_led_config = { + { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, + { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } + }, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 210, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, + { 222, 64 }, { 202, 64 }, { 182, 64 }, { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } + }, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 4, 1, 1, 1 + } +}; #endif -void matrix_init_kb(void) { - matrix_init_user(); -} -void matrix_scan_kb(void) { - matrix_scan_user(); -} -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} -void suspend_power_down_kb(void) -{ +void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); suspend_power_down_user(); } -void suspend_wakeup_init_kb(void) -{ +void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); suspend_wakeup_init_user(); } - __attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) - { +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } } - diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.h b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.h index de30c58a73d7..e522c482c24f 100644 --- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.h +++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.h @@ -1,12 +1,15 @@ #pragma once -#define XXX KC_NO + #include "quantum.h" + +#define XXX KC_NO + #define LAYOUT_60_ansi( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ - K40, K41, K42, K45, K49, K4A, K4B, K4D \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ diff --git a/keyboards/dztech/dz60rgb_ansi/readme.md b/keyboards/dztech/dz60rgb_ansi/readme.md index 2fffa413b695..aa15dda89019 100644 --- a/keyboards/dztech/dz60rgb_ansi/readme.md +++ b/keyboards/dztech/dz60rgb_ansi/readme.md @@ -1,15 +1,21 @@ -# DZ60RGB +# DZ60RGB-ANSI ![dz60rgb](https://cdn.shopify.com/s/files/1/0043/9140/3591/products/TIM_20190130170231_grande.jpg?v=1548839053) A hotswap 60% RGB keyboard. -Keyboard Maintainer: DZtech -Hardware Supported: DZtech dz60rgb, dz60rgb-ansi -Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: DZtech DZ60RGB-ANSI V1 and V2 +* Hardware Availability: [KBDfans](https://kbdfans.com/) + +There are two versions of the DZ60RGB-ANSI. Please use the appropriate firmware for your board. + +* V1: STM32F303 (Arm), takes .bin files +* V2: ATmega32U4 (AVR), takes .hex files Make example for this keyboard (after setting up your build environment): - make dztech/dz60rgb:default + make dztech/dz60rgb_ansi/v1:default # Arm (STM32F303) + make dztech/dz60rgb_ansi/v2:default # AVR (ATmega32U4) See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c index 1c0edb7227e1..482e98fa4309 100644 --- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c @@ -1,116 +1,111 @@ #include "dz60rgb_wkl.h" + #ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, H_15, G_15, I_15}, - {0, K_14, J_14, L_14}, - {0, K_13, J_13, L_13}, - {0, K_12, J_12, L_12}, - {0, K_11, J_11, L_11}, - {0, K_10, J_10, L_10}, - {0, K_9, J_9, L_9}, - {0, K_8, J_8, L_8}, - {0, K_7, J_7, L_7}, - {0, K_6, J_6, L_6}, - {0, K_5, J_5, L_5}, - {0, K_4, J_4, L_4}, - {0, K_3, J_3, L_3}, - {0, K_2, J_2, L_2}, - {0, K_1, J_1, L_1}, - {0, H_14, G_14, I_14}, - {0, H_13, G_13, I_13}, - {0, H_12, G_12, I_12}, - {0, H_11, G_11, I_11}, - {0, H_10, G_10, I_10}, - {0, H_9, G_9, I_9}, - {0, H_8, G_8, I_8}, - {0, H_7, G_7, I_7}, - {0, H_6, G_6, I_6}, - {0, H_5, G_5, I_5}, - {0, H_4, G_4, I_4}, - {0, H_3, G_3, I_3}, - {0, H_2, G_2, I_2}, - {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, - {0, E_12, D_12, F_12}, - {0, E_11, D_11, F_11}, - {0, E_10, D_10, F_10}, - {0, E_9, D_9, F_9}, - {0, E_8, D_8, F_8}, - {0, E_7, D_7, F_7}, - {0, E_6, D_6, F_6}, - {0, E_5, D_5, F_5}, - {0, E_4, D_4, F_4}, - {0, E_3, D_3, F_3}, - {0, E_2, D_2, F_2}, - {0, E_1, D_1, F_1}, - {0, B_14, A_14, C_14}, - {0, B_13, A_13, C_13}, - {0, B_11, A_11, C_11}, - {0, B_10, A_10, C_10}, - {0, B_9, A_9, C_9}, - {0, B_8, A_8, C_8}, - {0, B_7, A_7, C_7}, - {0, B_6, A_6, C_6}, - {0, B_5, A_5, C_5}, - {0, B_4, A_4, C_4}, - {0, B_3, A_3, C_3}, - {0, B_2, A_2, C_2}, - {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, - {0, E_13, D_13, F_13}, - {0, B_12, A_12, C_12}, - {0, B_16, A_16, C_16}, - {0, E_16, D_16, F_16}, - {0, H_16, G_16, I_16}, - {0, K_16, J_16, L_16}, + { 0, H_15, G_15, I_15 }, + { 0, K_14, J_14, L_14 }, + { 0, K_13, J_13, L_13 }, + { 0, K_12, J_12, L_12 }, + { 0, K_11, J_11, L_11 }, + { 0, K_10, J_10, L_10 }, + { 0, K_9, J_9, L_9 }, + { 0, K_8, J_8, L_8 }, + { 0, K_7, J_7, L_7 }, + { 0, K_6, J_6, L_6 }, + { 0, K_5, J_5, L_5 }, + { 0, K_4, J_4, L_4 }, + { 0, K_3, J_3, L_3 }, + { 0, K_2, J_2, L_2 }, + { 0, K_1, J_1, L_1 }, + + { 0, H_14, G_14, I_14 }, + { 0, H_13, G_13, I_13 }, + { 0, H_12, G_12, I_12 }, + { 0, H_11, G_11, I_11 }, + { 0, H_10, G_10, I_10 }, + { 0, H_9, G_9, I_9 }, + { 0, H_8, G_8, I_8 }, + { 0, H_7, G_7, I_7 }, + { 0, H_6, G_6, I_6 }, + { 0, H_5, G_5, I_5 }, + { 0, H_4, G_4, I_4 }, + { 0, H_3, G_3, I_3 }, + { 0, H_2, G_2, I_2 }, + { 0, H_1, G_1, I_1 }, + + { 0, E_14, D_14, F_14 }, + { 0, E_12, D_12, F_12 }, + { 0, E_11, D_11, F_11 }, + { 0, E_10, D_10, F_10 }, + { 0, E_9, D_9, F_9 }, + { 0, E_8, D_8, F_8 }, + { 0, E_7, D_7, F_7 }, + { 0, E_6, D_6, F_6 }, + { 0, E_5, D_5, F_5 }, + { 0, E_4, D_4, F_4 }, + { 0, E_3, D_3, F_3 }, + { 0, E_2, D_2, F_2 }, + { 0, E_1, D_1, F_1 }, + + { 0, B_14, A_14, C_14 }, + { 0, B_13, A_13, C_13 }, + { 0, B_11, A_11, C_11 }, + { 0, B_10, A_10, C_10 }, + { 0, B_9, A_9, C_9 }, + { 0, B_8, A_8, C_8 }, + { 0, B_7, A_7, C_7 }, + { 0, B_6, A_6, C_6 }, + { 0, B_5, A_5, C_5 }, + { 0, B_4, A_4, C_4 }, + { 0, B_3, A_3, C_3 }, + { 0, B_2, A_2, C_2 }, + { 0, B_1, A_1, C_1 }, + + { 0, B_15, A_15, C_15 }, + { 0, E_13, D_13, F_13 }, + { 0, B_12, A_12, C_12 }, + { 0, B_16, A_16, C_16 }, + { 0, E_16, D_16, F_16 }, + { 0, H_16, G_16, I_16 }, + { 0, K_16, J_16, L_16 } }; -led_config_t g_led_config = { { - { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, - { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, - { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, - { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } -}, { - { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, - { 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, - { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, - { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, - { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 1, 1, 1 -} }; +led_config_t g_led_config = { + { + { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, + { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, + { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, + { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } + }, { + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, + { 218, 64 }, { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } + }, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1 + } +}; #endif -void matrix_init_kb(void) { - matrix_init_user(); -} -void matrix_scan_kb(void) { - matrix_scan_user(); -} -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} -void suspend_power_down_kb(void) -{ + +void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); suspend_power_down_user(); } -void suspend_wakeup_init_kb(void) -{ +void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); suspend_wakeup_init_user(); } __attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) - { +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(41, 0xFF, 0xFF, 0xFF); } } diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h index 0c448994f950..5f47903fc8e0 100644 --- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.h @@ -1,18 +1,21 @@ #pragma once -#define XXX KC_NO + #include "quantum.h" + +#define XXX KC_NO + #define LAYOUT_60_tsangan_hhkb( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2C,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,\ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D,\ - K40, K41, K42, K45, K4A, K4B, K4D \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D}, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ } #define LAYOUT_HHKB LAYOUT_60_tsangan_hhkb diff --git a/keyboards/dztech/dz60rgb_wkl/readme.md b/keyboards/dztech/dz60rgb_wkl/readme.md index 2fffa413b695..a80236437a08 100644 --- a/keyboards/dztech/dz60rgb_wkl/readme.md +++ b/keyboards/dztech/dz60rgb_wkl/readme.md @@ -4,12 +4,18 @@ A hotswap 60% RGB keyboard. -Keyboard Maintainer: DZtech -Hardware Supported: DZtech dz60rgb, dz60rgb-ansi -Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: DZtech DZ60RGB-WKL V1 and V2 +* Hardware Availability: [KBDfans](https://kbdfans.com/) + +There are two versions of the DZ60RGB-WKL. Please use the appropriate firmware for your board. + +* V1: STM32F303 (Arm), takes .bin files +* V2: ATmega32U4 (AVR), takes .hex files Make example for this keyboard (after setting up your build environment): - make dztech/dz60rgb:default + make dztech/dz60rgb_wkl/v1:default # Arm (STM32F303) + make dztech/dz60rgb_wkl/v2:default # AVR (ATmega32U4) See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dztech/dz65rgb/dz65rgb.c b/keyboards/dztech/dz65rgb/dz65rgb.c index 8f095960d471..5d35bc898215 100644 --- a/keyboards/dztech/dz65rgb/dz65rgb.c +++ b/keyboards/dztech/dz65rgb/dz65rgb.c @@ -1,129 +1,117 @@ #include "dz65rgb.h" + #ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + { 0, C8_8, C7_8, C6_8 }, + { 0, C9_8, C7_7, C6_7 }, + { 0, C9_7, C8_7, C6_6 }, + { 0, C9_6, C8_6, C7_6 }, + { 0, C9_5, C8_5, C7_5 }, + { 0, C9_4, C8_4, C7_4 }, + { 0, C9_3, C8_3, C7_3 }, + { 0, C9_2, C8_2, C7_2 }, + { 0, C9_1, C8_1, C7_1 }, + { 0, C2_9, C3_9, C4_9 }, + { 0, C1_9, C3_10, C4_10 }, + { 0, C1_10, C2_10, C4_11 }, + { 0, C1_11, C2_11, C3_11 }, + { 0, C1_13, C2_13, C3_13 }, + { 0, C1_14, C2_14, C3_14 }, - {0, C8_8, C7_8, C6_8}, // LA17 - {0, C9_8, C7_7, C6_7}, // LA16 - {0, C9_7, C8_7, C6_6}, // LA15 - {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_1, C8_1, C7_1}, // LA9 - {0, C2_9, C3_9, C4_9}, // LB0 - {0, C1_9, C3_10, C4_10}, // LB1 - {0, C1_10, C2_10, C4_11}, // LB2 - {0, C1_11, C2_11, C3_11}, // LB3 - {0, C1_13, C2_13, C3_13}, // LB5 - {0, C1_14, C2_14, C3_14}, // LB6 - - {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_1, C3_2, C4_2}, // LA1 - {0, C2_1, C3_1, C4_1}, // LA0 - {0, C9_9, C8_9, C7_9}, // LB9 - {0, C9_10, C8_10, C7_10}, // LB10 - {0, C9_11, C8_11, C7_11}, // LB11 - {0, C9_12, C8_12, C7_12}, // LB12 - {0, C9_13, C8_13, C7_13}, // LB13 - {0, C9_14, C8_14, C7_14}, // LB14 - {0, C1_15, C2_15, C3_15}, // LB7 - - {0, C1_8, C2_8, C3_8}, // LA8 - {1, C9_6, C8_6, C7_6}, // LC14 - {1, C9_5, C8_5, C7_5}, // LC13 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_2, C8_2, C7_2}, // LC10 - {1, C9_1, C8_1, C7_1}, // LC9 - {1, C2_9, C3_9, C4_9}, // LD0 - {1, C1_9, C3_10, C4_10}, // LD1 - {1, C1_10, C2_10, C4_11}, // LD2 - {1, C1_11, C2_11, C3_11}, // LD3 - {1, C1_12, C2_12, C3_12}, // LD4 - {1, C1_13, C2_13, C3_13}, // LD5 - {0, C1_16, C2_16, C3_16}, // LB8 + { 0, C1_7, C2_7, C3_7 }, + { 0, C1_6, C2_6, C3_6 }, + { 0, C1_5, C2_5, C3_5 }, + { 0, C1_4, C2_4, C3_4 }, + { 0, C1_3, C2_3, C3_3 }, + { 0, C1_2, C2_2, C4_3 }, + { 0, C1_1, C3_2, C4_2 }, + { 0, C2_1, C3_1, C4_1 }, + { 0, C9_9, C8_9, C7_9 }, + { 0, C9_10, C8_10, C7_10 }, + { 0, C9_11, C8_11, C7_11 }, + { 0, C9_12, C8_12, C7_12 }, + { 0, C9_13, C8_13, C7_13 }, + { 0, C9_14, C8_14, C7_14 }, + { 0, C1_15, C2_15, C3_15 }, - {1, C9_8, C7_7, C6_7}, // LC16 - {1, C1_5, C2_5, C3_5}, // LC5 - {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_2, C2_2, C4_3}, // LC2 - {1, C1_1, C3_2, C4_2}, // LC1 - {1, C9_9, C8_9, C7_9}, // LD9 - {1, C9_10, C8_10, C7_10}, // LD10 - {1, C9_11, C8_11, C7_11}, // LD11 - {1, C9_12, C8_12, C7_12}, // LD12 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_16, C2_16, C3_16}, // LD8 - {0, C9_15, C8_15, C6_14}, // LB15 + { 0, C1_8, C2_8, C3_8 }, + { 1, C9_6, C8_6, C7_6 }, + { 1, C9_5, C8_5, C7_5 }, + { 1, C9_4, C8_4, C7_4 }, + { 1, C9_3, C8_3, C7_3 }, + { 1, C9_2, C8_2, C7_2 }, + { 1, C9_1, C8_1, C7_1 }, + { 1, C2_9, C3_9, C4_9 }, + { 1, C1_9, C3_10, C4_10 }, + { 1, C1_10, C2_10, C4_11 }, + { 1, C1_11, C2_11, C3_11 }, + { 1, C1_12, C2_12, C3_12 }, + { 1, C1_13, C2_13, C3_13 }, + { 0, C1_16, C2_16, C3_16 }, - {1, C8_8, C7_8, C6_8}, // LC17 - {1, C1_8, C2_8, C3_8}, // LC8 - {1, C1_7, C2_7, C3_7}, // LC7 - {1, C2_1, C3_1, C4_1}, // LC0 - {1, C9_14, C8_14, C7_14}, // LD14 - {1, C9_15, C8_15, C6_14}, // LD15 - {1, C9_16, C7_15, C6_15}, // LD16 - {1, C8_16, C7_16, C6_16}, // LD17 - {0, C8_16, C7_16, C6_16}, // LB17 - {0, C9_16, C7_15, C6_15}, // LB16 + { 1, C9_8, C7_7, C6_7 }, + { 1, C1_5, C2_5, C3_5 }, + { 1, C1_4, C2_4, C3_4 }, + { 1, C1_3, C2_3, C3_3 }, + { 1, C1_2, C2_2, C4_3 }, + { 1, C1_1, C3_2, C4_2 }, + { 1, C9_9, C8_9, C7_9 }, + { 1, C9_10, C8_10, C7_10 }, + { 1, C9_11, C8_11, C7_11 }, + { 1, C9_12, C8_12, C7_12 }, + { 1, C1_14, C2_14, C3_14 }, + { 1, C1_15, C2_15, C3_15 }, + { 1, C1_16, C2_16, C3_16 }, + { 0, C9_15, C8_15, C6_14 }, + { 1, C8_8, C7_8, C6_8 }, + { 1, C1_8, C2_8, C3_8 }, + { 1, C1_7, C2_7, C3_7 }, + { 1, C2_1, C3_1, C4_1 }, + { 1, C9_14, C8_14, C7_14 }, + { 1, C9_15, C8_15, C6_14 }, + { 1, C9_16, C7_15, C6_15 }, + { 1, C8_16, C7_16, C6_16 }, + { 0, C8_16, C7_16, C6_16 }, + { 0, C9_16, C7_15, C6_15 } }; -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED,42, 43 }, - { 44, 45, 46, 47, 48, 49, 59, 51, 52, 53, 54, 55, NO_LED,56, 57 }, - { 58, 59, 60, NO_LED,NO_LED,61, NO_LED,NO_LED,62, 63, 64, 65, NO_LED,66, 67 } -}, { - {0,0}, {15,0}, {30,0}, {45,0}, {60,0}, {75,0}, {90,0}, {105,0}, {120,0}, {135,0}, {150,0}, {165,0}, {180,0}, {203,0},{224,0}, - {4,16},{23,16},{38,16},{53,16},{68,16}, {83,16}, {98,16}, {113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, - {6,32},{26,32},{41,32},{56,32},{71,32}, {86,32}, {101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, - {9,48},{34,48},{49,48},{64,48},{79,48}, {94,48}, {109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, - {2,64},{21,64},{39,64},{96,64},{150,64},{165,64},{180,64},{195,64},{210,64},{224,64} -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 -} }; +led_config_t g_led_config = { + { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 }, + { 44, 45, 46, 47, 48, 49, 59, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, NO_LED, 66, 67 } + }, { + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 203, 0 }, { 224, 0 }, + { 4, 16 }, { 23, 16 }, { 38, 16 }, { 53, 16 }, { 68, 16 }, { 83, 16 }, { 98, 16 }, { 113, 16 }, { 128, 16 }, { 143, 16 }, { 158, 16 }, { 173, 16 }, { 188, 16 }, { 206, 16 }, { 224, 16 }, + { 6, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 201, 32 }, { 224, 32 }, + { 9, 48 }, { 34, 48 }, { 49, 48 }, { 64, 48 }, { 79, 48 }, { 94, 48 }, { 109, 48 }, { 124, 48 }, { 139, 48 }, { 154, 48 }, { 169, 48 }, { 189, 48 }, { 210, 48 }, { 224, 48 }, + { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } + }, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 + } +}; #endif -void matrix_init_kb(void) { - matrix_init_user(); -} -void matrix_scan_kb(void) { - matrix_scan_user(); -} -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} -void suspend_power_down_kb(void) -{ +void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); suspend_power_down_user(); } -void suspend_wakeup_init_kb(void) -{ +void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); suspend_wakeup_init_user(); } __attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) - { +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } } diff --git a/keyboards/dztech/dz65rgb/dz65rgb.h b/keyboards/dztech/dz65rgb/dz65rgb.h index b251a339f91d..371facc89e0d 100644 --- a/keyboards/dztech/dz65rgb/dz65rgb.h +++ b/keyboards/dztech/dz65rgb/dz65rgb.h @@ -1,12 +1,15 @@ #pragma once -#define XXX KC_NO + #include "quantum.h" + +#define XXX KC_NO + #define LAYOUT_65_ansi( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K45, K48, K49, K4A, K4B, K4D, K4E \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K42, K45, K48, K49, K4A, K4B, K4D, K4E \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ diff --git a/keyboards/dztech/dz65rgb/readme.md b/keyboards/dztech/dz65rgb/readme.md index 7f8aad95f87e..8d7b95b3d600 100644 --- a/keyboards/dztech/dz65rgb/readme.md +++ b/keyboards/dztech/dz65rgb/readme.md @@ -2,13 +2,18 @@ A customizable 65% RGB keyboard. -Keyboard Maintainer: [DZtech](http://keyboarddiy.taobao.com) -Hardware Supported: [DZtech](http://keyboarddiy.taobao.com) -Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: DZ65RGB V1 and V2 +* Hardware Availability: [KBDfans](https://kbdfans.com/) +There are two versions of the DZ65RGB. Please use the appropriate firmware for your board. + +* V1: STM32F303 (Arm), takes .bin files +* V2: ATmega32U4 (AVR), takes .hex files Make example for this keyboard (after setting up your build environment): - make dztech/dz65rgb:default + make dztech/dz65rgb/v1:default # Arm (STM32F303) + make dztech/dz65rgb/v2:default # AVR (ATmega32U4) See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From 83be1aed7631efdeccf9fbcd5d702b3048f08fd7 Mon Sep 17 00:00:00 2001 From: xyzz <1065521+xyzz@users.noreply.github.com> Date: Mon, 13 Jan 2020 18:08:14 -0500 Subject: [PATCH 040/331] chibios/usb_main: re-check USB status in send_keyboard after sleeping the thread (#7784) * chibios/usb_main: re-check USB status in send_keyboard after sleeping the thread * change send_keyboard to only have 1 exit point --- tmk_core/protocol/chibios/usb_main.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index a4f996b8d7b5..8fbe877dbf38 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -620,10 +620,8 @@ uint8_t keyboard_leds(void) { return (uint8_t)(keyboard_led_stats & 0xFF); } void send_keyboard(report_keyboard_t *report) { osalSysLock(); if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { - osalSysUnlock(); - return; + goto unlock; } - osalSysUnlock(); #ifdef NKRO_ENABLE if (keymap_config.nkro && keyboard_protocol) { /* NKRO protocol */ @@ -632,28 +630,35 @@ void send_keyboard(report_keyboard_t *report) { * until *after* the packet has been transmitted. I think * this is more efficient */ /* busy wait, should be short and not very common */ - osalSysLock(); if (usbGetTransmitStatusI(&USB_DRIVER, SHARED_IN_EPNUM)) { /* Need to either suspend, or loop and call unlock/lock during * every iteration - otherwise the system will remain locked, * no interrupts served, so USB not going through as well. * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ osalThreadSuspendS(&(&USB_DRIVER)->epc[SHARED_IN_EPNUM]->in_state->thread); + + /* after osalThreadSuspendS returns USB status might have changed */ + if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { + goto unlock; + } } usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)report, sizeof(struct nkro_report)); - osalSysUnlock(); } else #endif /* NKRO_ENABLE */ { /* regular protocol */ /* need to wait until the previous packet has made it through */ /* busy wait, should be short and not very common */ - osalSysLock(); if (usbGetTransmitStatusI(&USB_DRIVER, KEYBOARD_IN_EPNUM)) { /* Need to either suspend, or loop and call unlock/lock during * every iteration - otherwise the system will remain locked, * no interrupts served, so USB not going through as well. * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ osalThreadSuspendS(&(&USB_DRIVER)->epc[KEYBOARD_IN_EPNUM]->in_state->thread); + + /* after osalThreadSuspendS returns USB status might have changed */ + if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { + goto unlock; + } } uint8_t *data, size; if (keyboard_protocol) { @@ -664,9 +669,11 @@ void send_keyboard(report_keyboard_t *report) { size = 8; } usbStartTransmitI(&USB_DRIVER, KEYBOARD_IN_EPNUM, data, size); - osalSysUnlock(); } keyboard_report_sent = *report; + +unlock: + osalSysUnlock(); } /* --------------------------------------------------------- From e80fdbf3dc2ed7c2db39b2ac48abd67519fecb02 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 14 Jan 2020 08:31:21 +0000 Subject: [PATCH 041/331] NK65 Bootmagic lite for default (#7895) --- keyboards/nk65/config.h | 4 ++++ keyboards/nk65/rules.mk | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 33a3f908a69e..767959b62676 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -82,6 +82,10 @@ along with this program. If not, see . * */ +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + /* Backlight options */ #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk index 01765538a280..1b734161fc00 100755 --- a/keyboards/nk65/rules.mk +++ b/keyboards/nk65/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug From c58f7857bdeb5b0c4edbf03abefb9d659c2f3cbd Mon Sep 17 00:00:00 2001 From: Koichi Katano <36572567+kkatano@users.noreply.github.com> Date: Tue, 14 Jan 2020 19:31:21 +0900 Subject: [PATCH 042/331] [Keyboard] Add Yurei PCB (#7880) * Add yurei * Implement keyboard * Update readme.md * Update config.h * Update info.json * Update info.json * Update keyboards/yurei/config.h * Delete config.h * Update rules.mk * Update yurei.c * Update keymap.c * Update keyboards/yurei/yurei.h * Update keyboards/yurei/keymaps/default/keymap.c * Update keyboards/yurei/info.json * Update keyboards/yurei/rules.mk --- keyboards/yurei/config.h | 252 ++++++++++++++++++++++ keyboards/yurei/info.json | 101 +++++++++ keyboards/yurei/keymaps/default/keymap.c | 27 +++ keyboards/yurei/keymaps/default/readme.md | 1 + keyboards/yurei/readme.md | 13 ++ keyboards/yurei/rules.mk | 34 +++ keyboards/yurei/yurei.c | 25 +++ keyboards/yurei/yurei.h | 44 ++++ 8 files changed, 497 insertions(+) create mode 100644 keyboards/yurei/config.h create mode 100644 keyboards/yurei/info.json create mode 100644 keyboards/yurei/keymaps/default/keymap.c create mode 100644 keyboards/yurei/keymaps/default/readme.md create mode 100644 keyboards/yurei/readme.md create mode 100644 keyboards/yurei/rules.mk create mode 100644 keyboards/yurei/yurei.c create mode 100644 keyboards/yurei/yurei.h diff --git a/keyboards/yurei/config.h b/keyboards/yurei/config.h new file mode 100644 index 000000000000..da37d3ce88d8 --- /dev/null +++ b/keyboards/yurei/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2019 Koichi Katano + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x5D5E +#define DEVICE_VER 0x0001 +#define MANUFACTURER Koichi Katano +#define PRODUCT Yurei +#define DESCRIPTION A Tenkeyless PCB + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B5, B4, B3, B2, B1, B0 } +#define MATRIX_COL_PINS { D5, C7, C6, D4, D0, E6, F0, F1, F4, F5, F6, F7, D7, D6, D1, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/yurei/info.json b/keyboards/yurei/info.json new file mode 100644 index 000000000000..ff6fec7a5f91 --- /dev/null +++ b/keyboards/yurei/info.json @@ -0,0 +1,101 @@ +{ + "keyboard_name": "Yurei", + "url": "https://github.com/kkatano/yurei", + "maintainer": "Koichi Katano", + "width": 18.26, + "height": 6.47, + "layouts": { + "LAYOUT_tkl_ansi": { + "key_count": 87, + "layout": [ + {"label":"1", "x":0, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6.5, "y":0}, + {"label":"7", "x":7.5, "y":0}, + {"label":"8", "x":8.5, "y":0}, + {"label":"9", "x":9.5, "y":0}, + {"label":"10", "x":11, "y":0}, + {"label":"11", "x":12, "y":0}, + {"label":"12", "x":13, "y":0}, + {"label":"13", "x":14, "y":0}, + {"label":"14", "x":15.26, "y":0}, + {"label":"15", "x":16.26, "y":0}, + {"label":"16", "x":17.26, "y":0}, + {"label":"17", "x":0, "y":1.47}, + {"label":"18", "x":1, "y":1.47}, + {"label":"19", "x":2, "y":1.47}, + {"label":"20", "x":3, "y":1.47}, + {"label":"21", "x":4, "y":1.47}, + {"label":"22", "x":5, "y":1.47}, + {"label":"23", "x":6, "y":1.47}, + {"label":"24", "x":7, "y":1.47}, + {"label":"25", "x":8, "y":1.47}, + {"label":"26", "x":9, "y":1.47}, + {"label":"27", "x":10, "y":1.47}, + {"label":"28", "x":11, "y":1.47}, + {"label":"29", "x":12, "y":1.47}, + {"label":"30", "x":13, "y":1.47, "w":2}, + {"label":"31", "x":15.26, "y":1.47}, + {"label":"32", "x":16.26, "y":1.47}, + {"label":"33", "x":17.26, "y":1.47}, + {"label":"34", "x":0, "y":2.47, "w":1.5}, + {"label":"35", "x":1.5, "y":2.47}, + {"label":"36", "x":2.5, "y":2.47}, + {"label":"37", "x":3.5, "y":2.47}, + {"label":"38", "x":4.5, "y":2.47}, + {"label":"39", "x":5.5, "y":2.47}, + {"label":"40", "x":6.5, "y":2.47}, + {"label":"41", "x":7.5, "y":2.47}, + {"label":"42", "x":8.5, "y":2.47}, + {"label":"43", "x":9.5, "y":2.47}, + {"label":"44", "x":10.5, "y":2.47}, + {"label":"45", "x":11.5, "y":2.47}, + {"label":"46", "x":12.5, "y":2.47}, + {"label":"47", "x":13.5, "y":2.47, "w":1.5}, + {"label":"48", "x":15.26, "y":2.47}, + {"label":"49", "x":16.26, "y":2.47}, + {"label":"50", "x":17.26, "y":2.47}, + {"label":"51", "x":0, "y":3.47, "w":1.75}, + {"label":"52", "x":1.75, "y":3.47}, + {"label":"53", "x":2.75, "y":3.47}, + {"label":"54", "x":3.75, "y":3.47}, + {"label":"55", "x":4.75, "y":3.47}, + {"label":"56", "x":5.75, "y":3.47}, + {"label":"57", "x":6.75, "y":3.47}, + {"label":"58", "x":7.75, "y":3.47}, + {"label":"59", "x":8.75, "y":3.47}, + {"label":"60", "x":9.75, "y":3.47}, + {"label":"61", "x":10.75, "y":3.47}, + {"label":"62", "x":11.75, "y":3.47}, + {"label":"63", "x":12.75, "y":3.47, "w":2.25}, + {"label":"64", "x":0, "y":4.47, "w":2.25}, + {"label":"65", "x":2.25, "y":4.47}, + {"label":"66", "x":3.25, "y":4.47}, + {"label":"67", "x":4.25, "y":4.47}, + {"label":"68", "x":5.25, "y":4.47}, + {"label":"69", "x":6.25, "y":4.47}, + {"label":"70", "x":7.25, "y":4.47}, + {"label":"71", "x":8.25, "y":4.47}, + {"label":"72", "x":9.25, "y":4.47}, + {"label":"73", "x":10.25, "y":4.47}, + {"label":"74", "x":11.25, "y":4.47}, + {"label":"75", "x":12.25, "y":4.47, "w":2.75}, + {"label":"76", "x":16.26, "y":4.47}, + {"label":"77", "x":0, "y":5.47, "w":1.25}, + {"label":"78", "x":1.25, "y":5.47, "w":1.25}, + {"label":"79", "x":2.5, "y":5.47, "w":1.25}, + {"label":"80", "x":3.75, "y":5.47, "w":6.25}, + {"label":"81", "x":10, "y":5.47, "w":1.25}, + {"label":"82", "x":11.25, "y":5.47, "w":1.25}, + {"label":"83", "x":12.5, "y":5.47, "w":1.25}, + {"label":"84", "x":13.75, "y":5.47, "w":1.25}, + {"label":"85", "x":15.26, "y":5.47}, + {"label":"86", "x":16.26, "y":5.47}, + {"label":"87", "x":17.26, "y":5.47} + ] + } + } +} diff --git a/keyboards/yurei/keymaps/default/keymap.c b/keyboards/yurei/keymaps/default/keymap.c new file mode 100644 index 000000000000..45f955fb0fe0 --- /dev/null +++ b/keyboards/yurei/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 Koichi Katano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/keyboards/yurei/keymaps/default/readme.md b/keyboards/yurei/keymaps/default/readme.md new file mode 100644 index 000000000000..4134a11e4274 --- /dev/null +++ b/keyboards/yurei/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for yurei diff --git a/keyboards/yurei/readme.md b/keyboards/yurei/readme.md new file mode 100644 index 000000000000..fc5b3eb5c047 --- /dev/null +++ b/keyboards/yurei/readme.md @@ -0,0 +1,13 @@ +# Yurei + +A Tenkeyless PCB inspired by Phantom, for customizing Filco Majestouch 2. + +* Keyboard Maintainer: [Koichi Katano](https://github.com/kkatano) +* Hardware Supported: Yurei PCB +* Hardware Availability: https://github.com/kkatano/yurei + +Make example for this keyboard (after setting up your build environment): + + make yurei:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/yurei/rules.mk b/keyboards/yurei/rules.mk new file mode 100644 index 000000000000..37d7d6d4bec2 --- /dev/null +++ b/keyboards/yurei/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = tkl_ansi diff --git a/keyboards/yurei/yurei.c b/keyboards/yurei/yurei.c new file mode 100644 index 000000000000..3ac0d32bef57 --- /dev/null +++ b/keyboards/yurei/yurei.c @@ -0,0 +1,25 @@ +/* Copyright 2019 Koichi Katano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "yurei.h" + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(B6, led_state.caps_lock); + writePin(B7, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/yurei/yurei.h b/keyboards/yurei/yurei.h new file mode 100644 index 000000000000..d117d2a02f10 --- /dev/null +++ b/keyboards/yurei/yurei.h @@ -0,0 +1,44 @@ +/* Copyright 2019 Koichi Katano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_tkl_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k56, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, KC_NO, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, KC_NO, KC_NO, KC_NO }, \ + { k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, KC_NO, k4F, KC_NO }, \ + { k50, k51, k52, KC_NO, KC_NO, KC_NO, k56, KC_NO, KC_NO, KC_NO, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} From c7b2d60a2391f64cf2fd1e18266e2df1086815ca Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 15 Jan 2020 01:02:13 +1100 Subject: [PATCH 043/331] Move Space Cadet keycodes to their own section in keycode reference (#7889) --- docs/he-il/quantum_keycodes.md | 10 ---------- docs/keycodes.md | 22 ++++++++++++---------- docs/quantum_keycodes.md | 10 ---------- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/docs/he-il/quantum_keycodes.md b/docs/he-il/quantum_keycodes.md index 3ca545e9774f..5374fd47ad44 100644 --- a/docs/he-il/quantum_keycodes.md +++ b/docs/he-il/quantum_keycodes.md @@ -17,18 +17,8 @@ |`DEBUG` | |Toggle debug mode | |`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it | |`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| -|`KC_LSPO` | |Left Shift when held, `(` when tapped | -|`KC_RSPC` | |Right Shift when held, `)` when tapped | -|`KC_LCPO` | |Left Control when held, `(` when tapped | -|`KC_RCPC` | |Right Control when held, `)` when tapped | -|`KC_LAPO` | |Left Alt when held, `(` when tapped | -|`KC_RAPC` | |Right Alt when held, `)` when tapped | -|`KC_SFTENT` | |Right Shift when held, Enter when tapped | |`KC_LEAD` | |The [Leader key](feature_leader_key.md) | |`KC_LOCK` | |The [Lock key](feature_key_lock.md) | -|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | -|`M(n)` | |Call macro `n` | -|`MACROTAP(n)` | |Macro-tap `n` idk FIXME | ``` diff --git a/docs/keycodes.md b/docs/keycodes.md index ae0bfb7af7a9..dd4c4418ba52 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -214,18 +214,8 @@ This is a reference only. Each group of keys links to the page documenting their |`DEBUG` | |Toggle debug mode | |`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it | |`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| -|`KC_LSPO` | |Left Shift when held, `(` when tapped | -|`KC_RSPC` | |Right Shift when held, `)` when tapped | -|`KC_LCPO` | |Left Control when held, `(` when tapped | -|`KC_RCPC` | |Right Control when held, `)` when tapped | -|`KC_LAPO` | |Left Alt when held, `(` when tapped | -|`KC_RAPC` | |Right Alt when held, `)` when tapped | -|`KC_SFTENT` | |Right Shift when held, Enter when tapped | |`KC_LEAD` | |The [Leader key](feature_leader_key.md) | |`KC_LOCK` | |The [Lock key](feature_key_lock.md) | -|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | -|`M(n)` | |Call macro `n` | -|`MACROTAP(n)` | |Macro-tap `n` idk FIXME | ## [Audio Keys](feature_audio.md) @@ -461,6 +451,18 @@ This is a reference only. Each group of keys links to the page documenting their |`OSM(mod)` |Hold `mod` for one keypress | |`OSL(layer)`|Switch to `layer` for one keypress| +## [Space Cadet](feature_space_cadet.md) + +|Key |Description | +|-----------|----------------------------------------| +|`KC_LCPO` |Left Control when held, `(` when tapped | +|`KC_RCPC` |Right Control when held, `)` when tapped| +|`KC_LSPO` |Left Shift when held, `(` when tapped | +|`KC_RSPC` |Right Shift when held, `)` when tapped | +|`KC_LAPO` |Left Alt when held, `(` when tapped | +|`KC_RAPC` |Right Alt when held, `)` when tapped | +|`KC_SFTENT`|Right Shift when held, Enter when tapped| + ## [Swap Hands](feature_swap_hands.md) |Key |Description | diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md index a2ba34c32dd0..26ce6d2447a8 100644 --- a/docs/quantum_keycodes.md +++ b/docs/quantum_keycodes.md @@ -14,15 +14,5 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are |`DEBUG` | |Toggle debug mode | |`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it | |`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| -|`KC_LSPO` | |Left Shift when held, `(` when tapped | -|`KC_RSPC` | |Right Shift when held, `)` when tapped | -|`KC_LCPO` | |Left Control when held, `(` when tapped | -|`KC_RCPC` | |Right Control when held, `)` when tapped | -|`KC_LAPO` | |Left Alt when held, `(` when tapped | -|`KC_RAPC` | |Right Alt when held, `)` when tapped | -|`KC_SFTENT` | |Right Shift when held, Enter when tapped | |`KC_LEAD` | |The [Leader key](feature_leader_key.md) | |`KC_LOCK` | |The [Lock key](feature_key_lock.md) | -|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | -|`M(n)` | |Call macro `n` | -|`MACROTAP(n)` | |Macro-tap `n` idk FIXME | From 44168baaa74190bb78216c27500101a75516fad6 Mon Sep 17 00:00:00 2001 From: skullY Date: Mon, 13 Jan 2020 21:24:55 -0800 Subject: [PATCH 044/331] Add a section on python tests --- docs/coding_conventions_python.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/coding_conventions_python.md b/docs/coding_conventions_python.md index 9dd95e4b7310..cf9ab838ed77 100644 --- a/docs/coding_conventions_python.md +++ b/docs/coding_conventions_python.md @@ -309,6 +309,18 @@ FIXME(username): Revisit this code when the frob feature is done. ...where username is your GitHub username. -# Unit Tests +# Testing -These are good. We should have some one day. +We use a combination of Integration and Unit testing to ensure that the our code is as bug-free as possible. All the tests can be found in `lib/python/qmk/tests/`. + +At the time of this writing our tests are not very comprehensive. Looking at the current tests and writing new test cases for untested situations is a great way to both familiarize yourself with the codebase and contribute to QMK. + +## Integration Tests + +Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.5/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened. + +## Unit Tests + +The other `test_*.py` files in `lib/python/qmk/tests/` contain unit tests. You can write tests for individual functions inside `lib/python/qmk/` here. Generally these files are named after the module, with dots replaced by underscores. + +At the time of this writing we do not do any mocking for our tests. If you would like to help us change this please [open an issue](https://github.com/qmk/qmk_firmware/issues/new?assignees=&labels=cli%2C+python&template=other_issues.md&title=) or [join #cli on Discord](https://discord.gg/heQPAgy) and start a conversation there. From 58d27cf404b2a7e02f4adf17eaba9163aac3abf7 Mon Sep 17 00:00:00 2001 From: skullY Date: Mon, 13 Jan 2020 21:27:12 -0800 Subject: [PATCH 045/331] Add a note explaining how to run tests --- docs/coding_conventions_python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/coding_conventions_python.md b/docs/coding_conventions_python.md index cf9ab838ed77..1aefc044e84c 100644 --- a/docs/coding_conventions_python.md +++ b/docs/coding_conventions_python.md @@ -311,7 +311,7 @@ FIXME(username): Revisit this code when the frob feature is done. # Testing -We use a combination of Integration and Unit testing to ensure that the our code is as bug-free as possible. All the tests can be found in `lib/python/qmk/tests/`. +We use a combination of Integration and Unit testing to ensure that the our code is as bug-free as possible. All the tests can be found in `lib/python/qmk/tests/`. You can run all the tests with `qmk pytest`. At the time of this writing our tests are not very comprehensive. Looking at the current tests and writing new test cases for untested situations is a great way to both familiarize yourself with the codebase and contribute to QMK. From 9b4052e5a356732441c9349976af7e444698c539 Mon Sep 17 00:00:00 2001 From: Adi M Date: Tue, 14 Jan 2020 13:44:59 -0800 Subject: [PATCH 046/331] Adi's KBD67 layout (#7896) * Add files via upload * Rename keyboards/kbdfans/kbd67/rev2/keymaps/keymap.c to keyboards/kbdfans/kbd67/rev2/keymaps/adi/keymap.c * Rename keyboards/kbdfans/kbd67/rev2/keymaps/readme.md to keyboards/kbdfans/kbd67/rev2/keymaps/adi/readme.md * Update readme.md * Update readme.md * Update keyboards/kbdfans/kbd67/rev2/keymaps/adi/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kbdfans/kbd67/rev2/keymaps/adi/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kbdfans/kbd67/rev2/keymaps/adi/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- .../kbdfans/kbd67/rev2/keymaps/adi/keymap.c | 18 ++++++++++++++++++ .../kbdfans/kbd67/rev2/keymaps/adi/readme.md | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/adi/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/adi/readme.md diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/adi/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/adi/keymap.c new file mode 100644 index 000000000000..807b67d6f19c --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/adi/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + LCTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PGUP, + KC_TRNS, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_MPLY, KC_VOLU, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_VOLD, KC_MFFD + ) +}; diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/adi/readme.md b/keyboards/kbdfans/kbd67/rev2/keymaps/adi/readme.md new file mode 100644 index 000000000000..638b067cb9b0 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/adi/readme.md @@ -0,0 +1,8 @@ +# Adi's KBD67 Layout +![Layout Visual](https://i.imgur.com/xuFkvVI.png) + +This layout modifies the extra row on the right and makes some of the key bindings easier to reach on Layer 1. + +Build and flash your firmware: press reset button below keyboard and run build command in directory: + +```make kbdfans/kbd67/rev2:adi:flash``` From bb652314beb34fe4680d58d05a4538e5772f97be Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 14 Jan 2020 22:45:55 +0100 Subject: [PATCH 047/331] Update personal keymap (#7898) Signed-off-by: Sascha Grunert --- keyboards/planck/keymaps/sascha/keymap.c | 4 ++-- keyboards/planck/keymaps/sascha/rules.mk | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/sascha/keymap.c b/keyboards/planck/keymaps/sascha/keymap.c index 665598c9b586..d17d4deaa4d9 100644 --- a/keyboards/planck/keymaps/sascha/keymap.c +++ b/keyboards/planck/keymaps/sascha/keymap.c @@ -24,14 +24,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ ` │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ü │ ö │ ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ SINS │ ♥ │ ’ │ “ │ ” │ ← │ → │ € │ ß │ Ü │ Ö │ Ä │ + * │ SINS │ … │ ’ │ “ │ ” │ ← │ → │ € │ ß │ Ü │ Ö │ Ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ Rset │ BLSt │ F1 │ Home │ End │ PgUp │ PgDn │ Left │ Down │ Up │ Rght │ │ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL, KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , UC(L'ü') , UC(L'ö') , UC(L'ä'), - S(KC_INS) , UC(L'♥') , UC(L'’') , UC(L'“') , UC(L'”') , UC(L'←') , UC(L'→') , UC(L'€') , UC(L'ß') , UC(L'Ü') , UC(L'Ö') , UC(L'Ä'), + S(KC_INS) , UC(L'…') , UC(L'’') , UC(L'“') , UC(L'”') , UC(L'←') , UC(L'→') , UC(L'€') , UC(L'ß') , UC(L'Ü') , UC(L'Ö') , UC(L'Ä'), RESET , BL_STEP , KC_F1 , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_TRNS ) }; diff --git a/keyboards/planck/keymaps/sascha/rules.mk b/keyboards/planck/keymaps/sascha/rules.mk index 276b71daa8b0..57e5e2643eb1 100644 --- a/keyboards/planck/keymaps/sascha/rules.mk +++ b/keyboards/planck/keymaps/sascha/rules.mk @@ -1,6 +1,7 @@ AUTO_SHIFT_ENABLE = yes AUTO_SHIFT_MODIFIERS = yes UNICODE_ENABLE = yes +LINK_TIME_OPTIMIZATION_ENABLE = yes ifeq ($(strip $(KEYBOARD)), planck/rev5) BACKLIGHT_ENABLE = yes From b69b1ad4fcd9f011153973f2ccec004ea004ecb6 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 14 Jan 2020 22:03:01 +0000 Subject: [PATCH 048/331] Fix NK65 indicator code after refactoring (#7902) --- keyboards/wilba_tech/wt_rgb_backlight.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 88fecba174b9..babb844d26f6 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -1238,7 +1238,10 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_set_color_all( red, green, blue ); #elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) - IS31FL3733_set_color_all( red, green, blue ); + // This is done to avoid indicator LEDs being set + for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) { + IS31FL3733_set_color(i, red, green, blue); + } #elif defined(RGB_BACKLIGHT_DAWN60) IS31FL3731_set_color_all( red, green, blue ); for (uint8_t i = 0; i < WS2812_LED_TOTAL; i++) { From 61cd180163cbe1324bde25abcc95d0c380459b70 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 14 Jan 2020 22:03:48 +0000 Subject: [PATCH 049/331] Add ws2812 driver type define (#7888) --- common_features.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common_features.mk b/common_features.mk index 01ceb82789c7..09d01debd39c 100644 --- a/common_features.mk +++ b/common_features.mk @@ -278,6 +278,8 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) $(error WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver) endif + OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]')) + ifeq ($(strip $(WS2812_DRIVER)), bitbang) SRC += ws2812.c else From 537b8713e5bc9690dca3c1ad8733132892d48ea2 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 14 Jan 2020 17:31:17 -0800 Subject: [PATCH 050/331] XD68 Configurator Layout Support and Minor Refactor (#7904) * XD68: QMK Configurator layout support * elevate backlight breathing settings to keyboard level * remove empty keymap config.h files * rules.mk templating * keymap polishing - four-space indent - keycode alignment --- keyboards/xd68/config.h | 2 + keyboards/xd68/info.json | 156 ++++++++++++++++++++ keyboards/xd68/keymaps/default/config.h | 5 - keyboards/xd68/keymaps/default/keymap.c | 80 +++++----- keyboards/xd68/keymaps/default_iso/config.h | 4 - keyboards/xd68/keymaps/default_iso/keymap.c | 80 +++++----- keyboards/xd68/rules.mk | 19 ++- 7 files changed, 249 insertions(+), 97 deletions(-) create mode 100644 keyboards/xd68/info.json delete mode 100644 keyboards/xd68/keymaps/default/config.h delete mode 100644 keyboards/xd68/keymaps/default_iso/config.h diff --git a/keyboards/xd68/config.h b/keyboards/xd68/config.h index 41ede7b6c08e..f0a78c1fd2d0 100644 --- a/keyboards/xd68/config.h +++ b/keyboards/xd68/config.h @@ -50,6 +50,8 @@ along with this program. If not, see . #define BACKLIGHT_PIN F5 #define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/xd68/info.json b/keyboards/xd68/info.json new file mode 100644 index 000000000000..01b5bb201ef2 --- /dev/null +++ b/keyboards/xd68/info.json @@ -0,0 +1,156 @@ +{ + "keyboard_name": "xd68", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "key_count": 68, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Home", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Page Up", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Down", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Menu", "x":10, "y":4}, + {"label":"Ctrl", "x":11, "y":4}, + {"label":"Fn", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + }, + "LAYOUT_65_iso": { + "key_count": 69, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Home", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"PgUp", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"#", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"PgDn", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"\\", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Menu", "x":10, "y":4}, + {"label":"Ctrl", "x":11, "y":4}, + {"label":"Fn", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/xd68/keymaps/default/config.h b/keyboards/xd68/keymaps/default/config.h deleted file mode 100644 index 9ff66e3cf664..000000000000 --- a/keyboards/xd68/keymaps/default/config.h +++ /dev/null @@ -1,5 +0,0 @@ - -#pragma once - -#define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 \ No newline at end of file diff --git a/keyboards/xd68/keymaps/default/keymap.c b/keyboards/xd68/keymaps/default/keymap.c index 5ce09cde535d..d9cfe5bf0dc0 100644 --- a/keyboards/xd68/keymaps/default/keymap.c +++ b/keyboards/xd68/keymaps/default/keymap.c @@ -4,45 +4,45 @@ #define _FL 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,----------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| - * |----------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| - * |----------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| - * |----------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | - * |----------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |App|Ctrl|FN |Lef|Dow|Rig | - * `----------------------------------------------------------------' - */ -[_BL] = LAYOUT_65_ansi( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_APP, KC_RCTRL, MO(_FL), KC_LEFT,KC_DOWN,KC_RGHT - ), + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |App|Ctrl|FN |Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BL] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT + ), - /* Keymap _FL: Function Layer - * ,----------------------------------------------------------------. - * |~ `| F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | - * |----------------------------------------------------------------| - * |RESET| |Up | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | |<- |Dn | ->| | | | | | | | | | | - * |----------------------------------------------------------------| - * |HUI |SAI|VAI|RGBMOD|BL-|BL |BL+| | | | |Play |V+ |Mut | - * |----------------------------------------------------------------| - * |HUD |SAD |VAD | RGB_Tog | | | | | - * `----------------------------------------------------------------' - */ -[_FL] = LAYOUT_65_ansi( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, - RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, - RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, _______, _______, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT -), + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * |~ `| F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * |RESET| |Up | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | |<- |Dn | ->| | | | | | | | | | | + * |----------------------------------------------------------------| + * |HUI |SAI|VAI|RGBMOD|BL-|BL |BL+| | | | |Play |V+ |Mut | + * |----------------------------------------------------------------| + * |HUD |SAD |VAD | RGB_Tog | | | | | + * `----------------------------------------------------------------' + */ + [_FL] = LAYOUT_65_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, + RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, _______, _______, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ), }; diff --git a/keyboards/xd68/keymaps/default_iso/config.h b/keyboards/xd68/keymaps/default_iso/config.h deleted file mode 100644 index 0d063653618e..000000000000 --- a/keyboards/xd68/keymaps/default_iso/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 \ No newline at end of file diff --git a/keyboards/xd68/keymaps/default_iso/keymap.c b/keyboards/xd68/keymaps/default_iso/keymap.c index 6edcf748f1f4..428715a669d1 100644 --- a/keyboards/xd68/keymaps/default_iso/keymap.c +++ b/keyboards/xd68/keymaps/default_iso/keymap.c @@ -4,45 +4,45 @@ #define _FL 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,----------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| - * |----------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |PgUp| - * |------------------------------------------------------- -----| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|PgDn| - * |----------------------------------------------------------------| - * |Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|End | - * |----------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |App|Ctrl |Fn|Lef|Dow|Rig | - * `----------------------------------------------------------------' - */ - [_BL] = LAYOUT_65_iso( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT - ), + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |PgUp| + * |------------------------------------------------------- -----| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|PgDn| + * |----------------------------------------------------------------| + * |Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|End | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |App|Ctrl |Fn|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BL] = LAYOUT_65_iso( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT + ), - /* Keymap _FL1: Function Layer 1 - * ,----------------------------------------------------------------. - * |~ `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Delete| Ins| - * |----------------------------------------------------------------| - * |RESET| | ↑ | | | | | | | | | | | | | - * |------------------------------------------------------- -----| - * | | ← | ↓ | → | | | | | | | | | | | | - * |----------------------------------------------------------------| - * |HUI |SAI|VAI |RGBMOD| L+|LED| L-| | | | | |Play|V+|Mut| - * |----------------------------------------------------------------| - * |HUD |SAD |VAD | RGB_Tog | | | | | - * `----------------------------------------------------------------' - */ - [_FL] = LAYOUT_65_iso( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, - RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, - RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, _______, _______, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT - ) + /* Keymap _FL1: Function Layer 1 + * ,----------------------------------------------------------------. + * |~ `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Delete| Ins| + * |----------------------------------------------------------------| + * |RESET| | ↑ | | | | | | | | | | | | | + * |------------------------------------------------------- -----| + * | | ← | ↓ | → | | | | | | | | | | | | + * |----------------------------------------------------------------| + * |HUI |SAI|VAI |RGBMOD| L+|LED| L-| | | | | |Play|V+|Mut| + * |----------------------------------------------------------------| + * |HUD |SAD |VAD | RGB_Tog | | | | | + * `----------------------------------------------------------------' + */ + [_FL] = LAYOUT_65_iso( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, + RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, _______, _______, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ) }; diff --git a/keyboards/xd68/rules.mk b/keyboards/xd68/rules.mk index 91f9a48f3d84..c8b7950c9119 100644 --- a/keyboards/xd68/rules.mk +++ b/keyboards/xd68/rules.mk @@ -12,21 +12,24 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = 65_ansi 65_iso \ No newline at end of file From 48cac9e3c8710ae3e27c66fbd7043f38e7c6535e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 15 Jan 2020 01:58:32 +0000 Subject: [PATCH 051/331] Migrate more custom matrix 'lite' code to core (#7863) * Migrate more custom matrix lite code to core * Align function names * fix up MATRIX_MASKED --- keyboards/xd84/custom_matrix_helper.c | 71 --------------------------- keyboards/xd84/matrix.c | 4 +- keyboards/xd84/rules.mk | 2 +- keyboards/xd96/custom_matrix_helper.c | 71 --------------------------- keyboards/xd96/matrix.c | 4 +- keyboards/xd96/rules.mk | 2 +- quantum/matrix.c | 22 +-------- quantum/matrix_common.c | 48 ++++++++++++++++++ quantum/split_common/matrix.c | 10 +--- 9 files changed, 58 insertions(+), 176 deletions(-) delete mode 100644 keyboards/xd84/custom_matrix_helper.c delete mode 100644 keyboards/xd96/custom_matrix_helper.c diff --git a/keyboards/xd84/custom_matrix_helper.c b/keyboards/xd84/custom_matrix_helper.c deleted file mode 100644 index e4e256381948..000000000000 --- a/keyboards/xd84/custom_matrix_helper.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "debounce.h" -#include "quantum.h" - -//_____COULD BE COMMON_________________________________________________________ -/* matrix state(1:on, 0:off) */ -/*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; -/*static*/ matrix_row_t matrix[MATRIX_ROWS]; - -__attribute__ ((weak)) -matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -//_____CUSTOM MATRIX 'LITE'____________________________________________________ -__attribute__ ((weak)) -void custom_matrix_init(void) { -} - -__attribute__ ((weak)) -bool custom_matrix_scan(matrix_row_t current_matrix[]) { - bool changed = true; - return changed; -} - -__attribute__ ((weak)) -void matrix_init(void) { - - custom_matrix_init(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - raw_matrix[i] = 0; - matrix[i] = 0; - } - - debounce_init(MATRIX_ROWS); - - matrix_init_quantum(); -} - -__attribute__ ((weak)) -uint8_t matrix_scan(void) { - bool changed = custom_matrix_scan(raw_matrix); - - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - - matrix_scan_quantum(); - return 1; -} diff --git a/keyboards/xd84/matrix.c b/keyboards/xd84/matrix.c index a4ddbee9a09b..92b8ff854670 100644 --- a/keyboards/xd84/matrix.c +++ b/keyboards/xd84/matrix.c @@ -82,14 +82,14 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) //_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ -void custom_matrix_init(void) { +void matrix_init_custom(void) { pca9555_init(IC1); pca9555_init(IC2); init_pins(); } -bool custom_matrix_scan(matrix_row_t current_matrix[]) { +bool matrix_scan_custom(matrix_row_t current_matrix[]) { bool changed = false; for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { changed |= read_cols_on_row(current_matrix, current_row); diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index 4a460d91faa0..13e1b4ba37c2 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk @@ -37,7 +37,7 @@ LINK_TIME_OPTIMIZATION_ENABLE = yes CUSTOM_MATRIX = lite VPATH += drivers/gpio -SRC += custom_matrix_helper.c pca9555.c matrix.c +SRC += pca9555.c matrix.c QUANTUM_LIB_SRC += i2c_master.c LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/xd96/custom_matrix_helper.c b/keyboards/xd96/custom_matrix_helper.c deleted file mode 100644 index e4e256381948..000000000000 --- a/keyboards/xd96/custom_matrix_helper.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "debounce.h" -#include "quantum.h" - -//_____COULD BE COMMON_________________________________________________________ -/* matrix state(1:on, 0:off) */ -/*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; -/*static*/ matrix_row_t matrix[MATRIX_ROWS]; - -__attribute__ ((weak)) -matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -//_____CUSTOM MATRIX 'LITE'____________________________________________________ -__attribute__ ((weak)) -void custom_matrix_init(void) { -} - -__attribute__ ((weak)) -bool custom_matrix_scan(matrix_row_t current_matrix[]) { - bool changed = true; - return changed; -} - -__attribute__ ((weak)) -void matrix_init(void) { - - custom_matrix_init(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - raw_matrix[i] = 0; - matrix[i] = 0; - } - - debounce_init(MATRIX_ROWS); - - matrix_init_quantum(); -} - -__attribute__ ((weak)) -uint8_t matrix_scan(void) { - bool changed = custom_matrix_scan(raw_matrix); - - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - - matrix_scan_quantum(); - return 1; -} diff --git a/keyboards/xd96/matrix.c b/keyboards/xd96/matrix.c index e8fd850edbfb..8cecc79c2660 100644 --- a/keyboards/xd96/matrix.c +++ b/keyboards/xd96/matrix.c @@ -80,14 +80,14 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) //_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ -void custom_matrix_init(void) { +void matrix_init_custom(void) { pca9555_init(IC1); pca9555_init(IC2); init_pins(); } -bool custom_matrix_scan(matrix_row_t current_matrix[]) { +bool matrix_scan_custom(matrix_row_t current_matrix[]) { bool changed = false; for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { changed |= read_cols_on_row(current_matrix, current_row); diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index d5ac5df36a62..9afd4eec4e4b 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk @@ -37,5 +37,5 @@ LINK_TIME_OPTIMIZATION_ENABLE = yes CUSTOM_MATRIX = lite VPATH += drivers/gpio -SRC += custom_matrix_helper.c pca9555.c matrix.c +SRC += pca9555.c matrix.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/quantum/matrix.c b/quantum/matrix.c index 62a86fba6807..1675f2477b2d 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -22,10 +22,6 @@ along with this program. If not, see . #include "debounce.h" #include "quantum.h" -#ifdef MATRIX_MASKED -extern const matrix_row_t matrix_mask[]; -#endif - #ifdef DIRECT_PINS static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; #elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) @@ -34,22 +30,8 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -static matrix_row_t matrix[MATRIX_ROWS]; // debounced values - -// helper functions - -inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } - -inline matrix_row_t matrix_get_row(uint8_t row) { - // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a - // switch blocker installed and the switch is always pressed. -#ifdef MATRIX_MASKED - return matrix[row] & matrix_mask[row]; -#else - return matrix[row]; -#endif -} +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values // matrix code diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index 22704e8ee2c6..a8948a264bb5 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -3,6 +3,14 @@ #include "print.h" #include "debug.h" +/* matrix state(1:on, 0:off) */ +matrix_row_t raw_matrix[MATRIX_ROWS]; +matrix_row_t matrix[MATRIX_ROWS]; + +#ifdef MATRIX_MASKED +extern const matrix_row_t matrix_mask[]; +#endif + // user-defined overridable functions __attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } @@ -19,6 +27,18 @@ inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } inline uint8_t matrix_cols(void) { return MATRIX_COLS; } +inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } + +inline matrix_row_t matrix_get_row(uint8_t row) { + // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a + // switch blocker installed and the switch is always pressed. +#ifdef MATRIX_MASKED + return matrix[row] & matrix_mask[row]; +#else + return matrix[row]; +#endif +} + // Deprecated. bool matrix_is_modified(void) { if (debounce_active()) return false; @@ -57,3 +77,31 @@ uint8_t matrix_key_count(void) { } return count; } + +// CUSTOM MATRIX 'LITE' +__attribute__((weak)) void matrix_init_custom(void) {} + +__attribute__((weak)) bool matrix_scan_custom(matrix_row_t current_matrix[]) { return true; } + +__attribute__((weak)) void matrix_init(void) { + matrix_init_custom(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +__attribute__((weak)) uint8_t matrix_scan(void) { + bool changed = matrix_scan_custom(raw_matrix); + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return 1; +} diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 58602af859dc..ed1ff5acf398 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -41,8 +41,8 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -static matrix_row_t matrix[MATRIX_ROWS]; // debounced values +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values // row offsets for each hand uint8_t thisHand, thatHand; @@ -50,12 +50,6 @@ uint8_t thisHand, thatHand; // user-defined overridable functions __attribute__((weak)) void matrix_slave_scan_user(void) {} -// helper functions - -inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } - -inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } - // matrix code #ifdef DIRECT_PINS From 2081c5e40e5ff92e1c028bba084c446db1e8684a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 15 Jan 2020 04:51:43 +0000 Subject: [PATCH 052/331] Fix CUSTOM_MATRIX lite matrix_scan return code (#7908) --- quantum/matrix_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index a8948a264bb5..c326e59ca382 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -103,5 +103,5 @@ __attribute__((weak)) uint8_t matrix_scan(void) { debounce(raw_matrix, matrix, MATRIX_ROWS, changed); matrix_scan_quantum(); - return 1; + return changed; } From 2a6cb426efc8544a5a1de59106357ccef127e6b1 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Tue, 14 Jan 2020 21:01:58 -0800 Subject: [PATCH 053/331] Hhkb keymap (#7907) * Initial commit of HHKB layout. * Moved keymap to the correct location. This keymap is for a hasu alt controller-equipped HHKB, so the keymap was in the wrong place. Added comments to the keymap. --- keyboards/hhkb/keymaps/xyverz/keymap.c | 135 +++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 keyboards/hhkb/keymaps/xyverz/keymap.c diff --git a/keyboards/hhkb/keymaps/xyverz/keymap.c b/keyboards/hhkb/keymaps/xyverz/keymap.c new file mode 100644 index 000000000000..56816354d183 --- /dev/null +++ b/keyboards/hhkb/keymaps/xyverz/keymap.c @@ -0,0 +1,135 @@ +/* +Xyverz's HHKB layout + +Rev 0.1, initial commit. + +This is my initial keymap for the HHKB with Hasu's alternate controller. +The default layer is Dvorak, with Qwerty and Colemak being optional. +Will probably add to it later, but for now I'm going to enjoy this as it is. +*/ + +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _DV, + _CM, + _FL, +}; + +enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * _QW: Qwerty Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|BkSpc| + * |-----------------------------------------------------------| + * |Fn | A| S| D| F| G| H| J| K| L| ;| '| Return| + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |Fn| + * |-----------------------------------------------------------| + * | |Alt |Gui | Space |Gui |Alt | | + * `-----------------------------------------------------------' + */ + /* Layer 0: Qwerty */ + [_QW] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT + ), + + /* + * _DV: Dvorak Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \ |Del| + * |-----------------------------------------------------------| + * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =|BkSpc| + * |-----------------------------------------------------------| + * |Fn | A| O| E| U| I| D| H| T| N| S| -| Return| + * |-----------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift |Fn| + * |-----------------------------------------------------------| + * | |Alt |Gui | Space |Gui |Alt | | + * `-----------------------------------------------------------' + */ + /* Layer 1: Dvorak */ + [_DV] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_FL), + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT + ), + + /* + * _CM: Colemak Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del| + * |-----------------------------------------------------------| + * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]|BkSpc| + * |-----------------------------------------------------------| + * |Fn | A| R| S| T| D| H| N| E| I| O| '| Return| + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift |Fn| + * |-----------------------------------------------------------| + * | |Alt |Gui | Space |Gui |Alt | | + * `-----------------------------------------------------------' + */ + /* Layer 2: Colemak */ + [_CM] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT + ), + + /* + * _FL: Function Layer + * ,-----------------------------------------------------------. + * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |RST| + * |-----------------------------------------------------------| + * | | |_QW|_DV|_CM| | |PgU| Up|PgD|PSc|SLk|Pau| | + * |-----------------------------------------------------------| + * | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | | + * |-----------------------------------------------------------| + * |CAPS | |Mut|VlD|VlU| |End| | | | | | | + * |-----------------------------------------------------------| + * | | | | Ins | | | | + * `-----------------------------------------------------------' + */ + /* Layer 3: Functions */ + [_FL] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET , + _______, _______, QWERTY, DVORAK, COLEMAK, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, + KC_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DV); + return false; + case QWERTY: + set_single_persistent_default_layer(_QW); + return false; + case COLEMAK: + set_single_persistent_default_layer(_CM); + return false; + } + } + return true; +} \ No newline at end of file From 3a69232213643ca77f81f3e6c359bb3ce9b2ecee Mon Sep 17 00:00:00 2001 From: Ahmed Elshafey <12426718+ash0x0@users.noreply.github.com> Date: Wed, 15 Jan 2020 07:34:41 +0200 Subject: [PATCH 054/331] [Keymap] Massdrop ctrl keymap (#7639) * RGB config overhaul Changing RGB config from setrgb to sethsv, trying out different color values. * Merged changes * Various changes and a couple additions Added Git Layer with git macros for most operations and LED config to show the macro keys on layer. Activated with FN+3. Added VIM Layer, this is a normal keycode layer with no macros for now but it has LED config that highlights the navigation and edit keys in VIM. Added a sticky CTRL and sticky SHIFT layers. I have no idea why I did this actually, it's mildly useful but oneshot and tapdance would be better, will be removed in later commit. Changed the LED config from setrgb to sethsv and the key by key LED config to array. Some code improvements in process_record_user. Better way to manage string macros using char array. Inspired by drashna's secret macros. * Various keymap changes and added documentation Updated massdrop/ctrl endgame keymap: Added layers for git and vim. Better LED config method, using ledmap, similar to what's used in many other keymaps. Improved process_record_user() mainly with reduced conditionals. Cleaned things up in the header and config. Added pretty much all qmk feature headers to rules and config, commented out to be enabled if desired. Firmware size should be considered. Not many features added in this commit. Shifting for a while to work on implementing raw hid for the keyboard and expanding qmk terminal. Added documentation.md for massdrop/ctrl at keyboard level to house all related information for future use. Added documentation for raw hid in docs, added the doc to feature index. Need some review for this documentation and suggested additions/changes. * Some fixes Fixed keymap documentation to include changes. Removed useless double tap keys and simplified layer maps. * Fixed error in keymap * Removed documentation changes. Will present in another PR * Update keyboards/massdrop/ctrl/DOCUMENTATION.md Co-Authored-By: fauxpark * Update DOCUMENTATION.md * Update keymap.c fixed mouse layout incomplete arrow cluster * Update keyboards/massdrop/ctrl/keymaps/endgame/keymap.c Fixed Git layer led config Co-Authored-By: totolouis * Update DOCUMENTATION.md Remove raw hid details * Update rules.mk Remove useless stuff * fixed malformed led map causing compile fail, indentation fixes * Update keyboards/massdrop/ctrl/keymaps/endgame/config.h switch from TG_NKRO to NK_TOGG Co-Authored-By: fauxpark * Update keymap.c Switching from TG_NKRO to NK_TOGG * Added yakuake layout * Update keyboards/massdrop/ctrl/keymaps/endgame/keymap.c Change biton32(layer_state) to get_highest_layer() Co-Authored-By: fauxpark * Update keymap.c Change from biton32 to get_highest_layer * Fixed custom LED not toggling off Co-authored-by: fauxpark Co-authored-by: totolouis --- keyboards/massdrop/ctrl/DOCUMENTATION.md | 29 ++ .../massdrop/ctrl/keymaps/endgame/README.md | 24 +- .../massdrop/ctrl/keymaps/endgame/config.h | 170 +++--- .../massdrop/ctrl/keymaps/endgame/keymap.c | 489 +++++++++--------- .../massdrop/ctrl/keymaps/endgame/keymap.h | 100 ++++ .../massdrop/ctrl/keymaps/endgame/rules.mk | 18 +- 6 files changed, 493 insertions(+), 337 deletions(-) create mode 100644 keyboards/massdrop/ctrl/DOCUMENTATION.md create mode 100644 keyboards/massdrop/ctrl/keymaps/endgame/keymap.h diff --git a/keyboards/massdrop/ctrl/DOCUMENTATION.md b/keyboards/massdrop/ctrl/DOCUMENTATION.md new file mode 100644 index 000000000000..6b3206ab91d5 --- /dev/null +++ b/keyboards/massdrop/ctrl/DOCUMENTATION.md @@ -0,0 +1,29 @@ +# Massdrop CTRL Documentation + +This is a WIP and will contine to be updated for some time in the future. + +This doc will include all currently available information, including low level information, for the CTRL keyboard collected from code committed by Drop, Inc. and freely available sources. It will also include a deprecation list of code committed by Drop, Inc. that is no longer needed and a TODO list for necessary code fixes and changes for existing protocol and a list of suggested improvements. This is the hopes of making MD CTRL fully QMK compatible by improving the existing protocol and/or perhaps working on a ChibiOS port at one point. + +**Note**: given that all Drop, Inc. keyboards to date have used the same MCU and the same protocol, the MCU and protocol documentation should apply to all keyboards in Massdrop folder. Most HID-related information however is product-specific and will not apply to other keyboards. + +### MCU + +* Microchip Technology SAMD51J18A +* RISC 32-Bit +* 120MHz Cortex®-M4 +* [Datasheet](https://www.datasheets360.com/pdf/3214995481162464753) + +### HID descriptor + +* VENDOR_ID 0x04D8 +* PRODUCT_ID 0xEED2 +* DEVICE_VER 0x0101 +* MANUFACTURER "Massdrop Inc." +* PRODUCT "CTRL Keyboard" + +### USB Hub descriptor + +* VENDOR_ID 0x04D8 +* PRODUCT_ID 0xEEC5 +* MANUFACTURER "Massdrop Inc." +* PRODUCT "Massdrop Hub" diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/README.md b/keyboards/massdrop/ctrl/keymaps/endgame/README.md index 9a0b2d8efabb..f65b70475f53 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/README.md +++ b/keyboards/massdrop/ctrl/keymaps/endgame/README.md @@ -6,15 +6,19 @@ This keymap is here to show some love to the MD Ctrl. ### Typing Layer -![Typing Layer](https://i.imgur.com/1uSVUdU.png) +![Typing Layer](https://imgur.com/QUIU2SL.png) ### Function Layer -![Function Layer](https://i.imgur.com/rINs7ro.png) +![Function Layer](https://imgur.com/4q4ld4X.png) ### Mouse Layer -![Mouse Layer](https://i.imgur.com/IaS0nAB.png) +![Mouse Layer](https://imgur.com/xXVFyEE.png) + +### Git Layer + +![Git Layer](https://imgur.com/WMMM0zz.png) ## Features @@ -36,19 +40,23 @@ This allows setting a dynamic timeout for RGB to turn off. The following is supp Not really a feature. I just want to document what tapdance keys this keymap has because there will be many of them. 1. LGUI is used for both LGUI and toggle mouse layer for double tap. -2. LCTRL and RCTRL are used for their respective keycodes at single tap and to send LCTRL+LALT+T for double tap, which opens terminal in most environments. +2. LCTRL sends LCTRL for single tap and LCTRL+LALT+T for double tap, which opens terminal in most environments. ## Future Work By the time this is project has accomplished its original primary objectives, the following features will be available for the ctrl: 1. Automatic RGB timeout with all the options you would need. **DONE** -2. Macro and Shortcut layers for at least the following: Git, IntelliJ, VIM, Yakuake, KDE, Firefox, Slack, Discord. All using default program configuration. [This list may and probably will get longer] -3. Custom LED configs that offer all the RGB layouts I deem useful or having a unique feature, look or feel. +2. Macro and Shortcut layers for at least the following: Git **DONE**, IntelliJ, VIM **WIP**, Yakuake, KDE, Firefox, Slack, Discord. All using default program configuration. [This list may and probably will get longer] +3. Custom LED configs that offer all the RGB layouts I deem useful or having a unique feature, look or feel. **DONE** 4. Increased Dynamic Macro slots, because two simply isn't enough. This particular one falls outside Ctrl config and into QMK core modification. However, it is on the list of features I would like this keyboard to have and is a **TOP PRIORITY** for me. It won't be easy, but I will figure it out. -5. Porting from the Drop, Inc. way of doing things to the QMK way of doing things, wherever possible. Full QMK support of this keyboard is the goal, not that it's possible, but I'd like to get as close as it gets. +5. Porting from the Drop, Inc. way of doing things to the QMK way of doing things, wherever possible. Full QMK support of this keyboard is the goal, not that it's possible, but I'd like to get as close as it gets. **WIP** 6. An easier way to configure LED than both the QMK way and the Drop way. I'm thinking of a graphical LED config like Drop configurator that offers the advanced LED config features QMK offers. This may or may not get done depending on whether or not I get sick of QMK LED config at any point. If it does get done, it may or may not be added to QMK Configurator. -7. Better documentation of the MD Ctrl specifications, features, etc. This will be included here in the form of C and doxygen comments. The bigger portion will be included in QMK docs if and where possible. +7. Better documentation of the MD Ctrl specifications, features, etc. This will be included here in the form of C and doxygen comments. The bigger portion will be included in QMK docs if and where possible. **WIP** + +Additions: + +8. Implement Raw HID. **WIP** This list will most probably either expand or have some items removed if they're deemed not worthy, probably both. Nothing will be removed because it can't be done though, I am a firm believer in You Can Do It. Anything modified in this list will be clearly marked, for posterity. diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index cd9a56c82068..0ef485591fbf 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -1,74 +1,116 @@ #pragma once -#define FORCE_NKRO - -#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode #define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) -#define MODS_CTRL (get_mods() & MOD_MASK_CTRL) -#define MODS_ALT (get_mods() & MOD_MASK_ALT) +#define MODS_CTRL (get_mods() & MOD_MASK_CTRL) +#define MODS_ALT (get_mods() & MOD_MASK_ALT) -#define PERMISSIVE_HOLD -#define TAPPING_TERM 250 +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) // Key combination that allows the use of magic commands (useful for debugging) -#define TAP_HOLD_CAPS_DELAY 0 +// #define NO_DEBUG // Disable debugging +// #define NO_PRINT // Disable printing/debugging using hid_listen +// #define NO_ACTION_LAYER // Disable layers +// #define NO_ACTION_TAPPING // Disable tap dance and other tapping features +// #define NO_ACTION_ONESHOT // Disable one-shot modifiers +// #define NO_ACTION_MACRO // Disable old style macro handling: MACRO() & action_get_macro +#define TERMINAL_HELP +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 10 +#define MOUSEKEY_WHEEL_DELAY 0 +#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. +// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. +// #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) +// #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +// #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state +#define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too +// #define TAPPING_TERM_PER_KEY // Enables handling for per key TAPPING_TERM settings +// #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release +#define TAPPING_TOGGLE 2 // How many taps before triggering the toggle +// #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details +// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details +// #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) +// #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. +// #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall +// #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. +// #define ONESHOT_TIMEOUT 300 // How long before oneshot times out +// #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered +// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. +// #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. +// #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. +// #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPSLOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. #define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_ALPHAS_MODS // Sets the default mode, if none has been set +// #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue +// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation +// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) +// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// #define RGBLIGHT_ANIMATIONS // Run RGB animations +// #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. +// #define RGBLIGHT_EFFECT_ALTERNATING // Enable alternating animation mode. +// #define RGBLIGHT_EFFECT_BREATHING // Enable breathing animation mode. +// #define RGBLIGHT_EFFECT_CHRISTMAS // Enable christmas animation mode. +// #define RGBLIGHT_EFFECT_KNIGHT // Enable knight animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // Enable rainbow mood animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // Enable rainbow swirl animation mode. +// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. +// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. -// #define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -// #define DISABLE_RGB_MATRIX_SOLID_COLOR -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - -#define QMK_KEYS_PER_SCAN 4 - -// #define RGB_MATRIX_KEYRELEASES - -// some speed shit -// #define NO_ACTION_MACRO -// #define NO_ACTION_FUNCTION - -// #ifndef NO_DEBUG -// #define NO_DEBUG -// #endif // !NO_DEBUG - -// #if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) -// #define NO_PRINT -// #endif // !NO_PRINT +// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 +// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds +// #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 // The number of LEDs to group the red/green colors by for the "Christmas" animation +// #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM // The number of LEDs to have the "Knight" animation travel +// #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // The number of LEDs to light up for the "Knight" animation +// #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 // The number of LEDs to start the "Knight" animation from the start of the strip by +// #define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 // Range adjustment for the rainbow swirl effect to get different swirls +// #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation -// #define NO_ACTION_ONESHOT -// #define TAPPING_FORCE_HOLD -// #define IGNORE_MOD_TAP_INTERRUPT +// This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. +// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +// #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c b/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c index a6e0c9f5057c..c28434e06b31 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c @@ -1,111 +1,105 @@ -#include QMK_KEYBOARD_H - -// Include for debugging. -#include - -#define MILLISECONDS_IN_SECOND 1000 - -//========================================================== CONFIGURABLE DEFAULTS ========================================================== -#define RGB_DEFAULT_TIME_OUT 30 -#define RGB_FAST_MODE_TIME_OUT 3 -#define RGB_TIME_OUT_MAX 600 -#define RGB_TIME_OUT_MIN 10 -#define RGB_TIME_OUT_STEP 10 +#include "keymap.h" static uint16_t idle_timer; // Idle LED timeout timer static uint8_t idle_second_counter; // Idle LED seconds counter, counts seconds not milliseconds +static uint8_t key_event_counter; // This counter is used to check if any keys are being held -bool rgb_enabled_flag; // Current LED state flag. If false then LED is off. -bool rgb_time_out_enable; // Idle LED toggle enable. If false then LED will not turn off after idle timeout. -bool rgb_time_out_fast_mode_enabled; -bool rgb_time_out_user_value; // This holds the toggle value set by user with ROUT_TG. It's necessary as RGB_TOG changes timeout enable. -uint16_t rgb_time_out_seconds; // Idle LED timeout value, in seconds not milliseconds -uint16_t rgb_time_out_saved_seconds; -led_flags_t rgb_time_out_saved_flag; // Store LED flag before timeout so it can be restored when LED is turned on again. - -enum tapdance_keycodes { - TD_GUI_ML = 0, // Tap dance key to switch to mouse layer _ML - TD_LCTRL_TERM, - TD_RCTRL_TERM, -}; - -enum ctrl_keycodes { - U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout - SEL_CPY, //Select Copy. Select the word cursor is pointed at and copy, using double mouse click and ctrl+c - ROUT_TG, //Timeout Toggle. Toggle idle LED time out on or off - ROUT_VI, //Timeout Value Increase. Increase idle time out before LED disabled - ROUT_VD, //Timeout Value Decrease. Decrease idle time out before LED disabled - ROUT_FM, //RGB timeout fast mode toggle - COPY_ALL, //Copy all text using ctrl(a+c) - TERMINAL, -}; - -enum layout_names { - _KL=0, // Keys Layout: The main keyboard layout that has all the characters - _FL, // Function Layout: The function key activated layout with default functions and some added ones - _ML, // Mouse Layout: Mouse Keys and mouse movement - _VL, // VIM Layout: VIM shorcuts and macros - _GL, // GIT Layout: GIT shortcuts and macros - _YL, // Yakuake Layout: Yakuake drop-down terminal shortcuts and macros - _EL, // KDE Layout: Shortcuts for KDE desktop using default KDE shortcuts settings +static const char * sendstring_commands[] = { + "git init ", + "git clone ", + "git config --global ", + "git add ", + "git diff ", + "git reset ", + "git rebase ", + "git branch -b \"", + "git checkout ", + "git merge ", + "git remote add ", + "git fetch ", + "git pull ", + "git push ", + "git commit ", + "git status ", + "git log ", }; //Associate our tap dance key with its functionality qk_tap_dance_action_t tap_dance_actions[] = { - [TD_GUI_ML] = ACTION_TAP_DANCE_LAYER_TOGGLE(KC_LGUI, _ML), - [TD_LCTRL_TERM] = ACTION_TAP_DANCE_DOUBLE(KC_LCTRL, LCA(KC_T)), - [TD_RCTRL_TERM] = ACTION_TAP_DANCE_DOUBLE(KC_RCTRL, LCA(KC_T)), + [TD_LGUI_ML] = ACTION_TAP_DANCE_LAYER_TOGGLE(KC_LGUI, _ML), + [TD_APP_YL] = ACTION_TAP_DANCE_LAYER_TOGGLE(KC_APP, _YL), + [TD_CTRL_TERM] = ACTION_TAP_DANCE_DOUBLE(KC_LCTRL, LCA(KC_T)), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* [DEFAULT] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), */ [_KL] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, KC_UP, - TD(TD_LCTRL_TERM), TD(TD_GUI_ML), KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, KC_UP, + TD(TD_CTRL_TERM), TD(TD_LGUI_ML), KC_LALT, KC_SPC, KC_RALT, TT(_FL), TD(TD_APP_YL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FL] = LAYOUT( - _______, DM_PLY1, DM_PLY2, _______, _______, DM_REC1, DM_REC2, _______, _______, DM_RSTP, _______, KC_WAKE, KC_SLEP, KC_MUTE, _______, _______, - _______, RGB_M_P, _______, _______, _______, _______, _______, _______, _______, ROUT_FM, ROUT_TG, ROUT_VD, ROUT_VI, _______, KC_MSTP, KC_MPLY, KC_VOLU, - _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO, U_T_AGCR, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, + _______, DM_PLY1, DM_PLY2, _______, _______, DM_REC1, DM_REC2, _______, _______, DM_RSTP, _______, KC_WAKE, KC_SLEP, KC_MUTE, TERM_ON, TERM_OFF, + _______, _______, TG(_ML), TG(_GL), TG(_VL), TG(_YL), _______, _______, _______, ROUT_FM, ROUT_TG, ROUT_VD, ROUT_VI, _______, KC_MSTP, KC_MPLY, KC_VOLU, + RGB_M_P, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO, U_T_AGCR, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, COPY_ALL, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_BRIU, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, _______ + _______, RGB_TOG, _______, COPY_ALL, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_BRIU, + _______, _______, _______, _______, _______, TG(_FL), _______, _______, _______, KC_BRID, _______ ), [_ML] = LAYOUT( - _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_BTN4, KC_BTN3, KC_BTN5, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, SEL_CPY, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, - _______, TD(TD_GUI_ML), _______, _______, _______, _______, TG(_ML), _______, _______, _______, _______ + _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_BTN4, KC_BTN3, KC_BTN5, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, SEL_CPY, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, + _______, TG(_ML), _______, _______, _______, TG(_ML), _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), + [_GL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, G_REMTE, G_RESET, G_REBAS, _______, G_INIT, _______, G_PULL, G_PUSH, _______, _______, _______, _______, _______, + _______, G_ADD, G_STAT, G_DIFF, G_FETCH, _______, _______, _______, _______, G_LOG, _______, _______, _______, + _______, G_CONF, G_CHECK, G_CLONE, G_COMM, G_BRANH, _______, G_MERGE, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TG(_GL), _______, _______, _______, _______, _______ + ), + // This layout doesn't have custom keycodes for now, just custom LED config + [_VL] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TG(_VL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + // Works with https://github.com/ash0x0/config/blob/master/yakuake.shortcuts + [_YL] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, + KC_NO, KC_Q, KC_NO, KC_E, KC_NO, KC_T, KC_NO, KC_NO, KC_I, KC_NO, KC_P, KC_NO, KC_RBRC, KC_BSLS, KC_NO, KC_END, KC_PGDN, + KC_NO, KC_A, KC_NO, KC_D, KC_NO, KC_G, KC_NO, KC_J, KC_K, KC_L, KC_SCLN, KC_NO, KC_NO, + KC_NO, KC_Z, KC_X, KC_NO, KC_NO, KC_NO, KC_NO, KC_M, KC_COMM, KC_DOT, KC_NO, KC_NO, KC_UP, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(_YL), KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT ), /* [X] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [RGB] = LAYOUT( ESC: 0, F1: 1, F2: 2, F3: 3, F4: 4, F5: 5, F6: 6, F7: 7, F8: 8, F9: 9, F10: 10, F11: 11, F12: 12, PSCR: 13, SLCK: 14, PAUS: 15, @@ -126,6 +120,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; +#ifdef _______ +#undef _______ +#define _______ {0, 0, 0} + +const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { + [_FL] = { + _______, CORAL, CORAL, _______, _______, CORAL, CORAL, _______, _______, CORAL, _______, YELLOW, YELLOW, TEAL, GOLD, GOLD, + _______, _______, PINK, PINK, PINK, PINK, _______, _______, _______, GREEN, GREEN, GREEN, GREEN, _______, TEAL, TEAL, TEAL, + ORANGE, ORANGE, ORANGE, ORANGE, ORANGE, ORANGE, _______, AZURE, AZURE, _______, _______, _______, _______, _______, TEAL, TEAL, TEAL, + _______, ORANGE, ORANGE, ORANGE, ORANGE, ORANGE, _______, _______, _______, _______, _______, _______, _______, + _______, ORANGE, _______, CORAL, _______, AZURE, AZURE, _______, _______, _______, _______, AZURE, SPRING, + _______, _______, _______, _______, _______, PINK, _______, AZURE, _______, SPRING, _______ + }, + [_ML] = { + _______, GOLD, GOLD, GOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, MAGENT, MAGENT, MAGENT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, MAGENT, GOLD, MAGENT, GOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, GOLD, GOLD, GOLD, GOLD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, CORAL, _______, _______, _______, _______, _______, _______, _______, _______, GOLD, + _______, PINK, _______, _______, _______, PINK, _______, _______, GOLD, GOLD, GOLD + }, + [_GL] = { + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BLUE, AZURE, AZURE, _______, CYAN, _______, TURQ, PURPLE, _______, _______, _______, _______, _______, + _______, CORAL, GREEN, GREEN, TURQ, _______, _______, _______, _______, GREEN, _______, _______, _______, + _______, CYAN, CHART, TURQ, ORANGE, CHART, _______, CHART, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, PINK, _______, _______, _______, _______, _______ + }, + [_VL] = { + PURPLE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, TURQ, _______, _______, _______, _______, TURQ, _______, _______, _______, _______, _______, _______, _______, _______, + _______, AZURE, AZURE, AZURE, PURPLE, _______, BLUE, PURPLE, PURPLE, PURPLE, BLUE, _______, _______, _______, _______, _______, _______, + _______, PURPLE, _______, BLUE, _______, GOLD, GOLDEN, GOLDEN, GOLDEN, GOLDEN, _______, _______, _______, + _______, _______, BLUE, BLUE, _______, _______, TURQ, _______, _______, _______, TURQ, _______, _______, + _______, _______, _______, _______, _______, PINK, _______, _______, _______, _______, _______ + }, + [_YL] = { + RED, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + CHART, BLUE, BLUE, BLUE, BLUE, BLUE, BLUE, BLUE, BLUE, BLUE, BLUE, _______, _______, _______, _______, PURPLE, PURPLE, + _______, RED, _______, BLUE, _______, GOLD, _______, _______, GREEN, _______, MAGENT, _______, GOLD, GOLD, _______, PURPLE, PURPLE, + _______, BLUE, _______, BLUE, _______, MAGENT, _______, GREEN, GREEN, GREEN, MAGENT, _______, _______, + _______, ORANGE, ORANGE, _______, _______, _______, _______, RED, MAGENT, MAGENT, _______, _______, GREEN, + _______, _______, _______, _______, _______, PINK, _______, _______, BLUE, GREEN, BLUE + }, +}; + +#undef _______ +#define _______ KC_TRNS +#endif + // Runs just one time when the keyboard initializes. void matrix_init_user(void) { // Enable or disable debugging @@ -134,19 +179,27 @@ void matrix_init_user(void) { debug_keyboard=true; debug_mouse=true; - idle_second_counter = 0; - rgb_time_out_seconds = RGB_DEFAULT_TIME_OUT; - rgb_time_out_enable = true; - rgb_enabled_flag = true; - rgb_time_out_user_value = true; - rgb_time_out_fast_mode_enabled = false; - rgb_time_out_saved_flag = rgb_matrix_get_flags(); + idle_second_counter = 0; // Counter for number of seconds keyboard has been idle. + key_event_counter = 0; // Counter to determine if keys are being held, neutral at 0. + rgb_time_out_seconds = RGB_DEFAULT_TIME_OUT; // RGB timeout initialized to its default configure in keymap.h + rgb_time_out_enable = false; // Disable RGB timeout by default. Enable using toggle key. + rgb_time_out_user_value = false; // Has to have the same initial value as rgb_time_out_enable. + rgb_enabled_flag = true; // Initially, keyboard RGB is enabled. Change to false config.h initializes RGB disabled. + rgb_time_out_fast_mode_enabled = false; // RGB timeout fast mode disabled initially. + rgb_time_out_saved_flag = rgb_matrix_get_flags(); // Save RGB matrix state for when keyboard comes back from ide. }; +void keyboard_post_init_user(void) { + rgb_matrix_enable(); +} + // Runs constantly in the background, in a loop. void matrix_scan_user(void) { if(rgb_time_out_enable && rgb_enabled_flag) { - if (timer_elapsed(idle_timer) > MILLISECONDS_IN_SECOND) { + // If the key event counter is not zero then some key was pressed down but not released, thus reset the timeout counter. + if (key_event_counter) { + idle_second_counter = 0; + } else if (timer_elapsed(idle_timer) > MILLISECONDS_IN_SECOND) { idle_second_counter++; idle_timer = timer_read(); } @@ -164,6 +217,13 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + // Increment key event counter for every press and decrement for every release. + if (record->event.pressed) { + key_event_counter++; + } else { + key_event_counter--; + } + if (rgb_time_out_enable) { idle_timer = timer_read(); // Reset the seconds counter. Without this, something like press> leave x seconds> press, would be x seconds on the effective counter not 0 as it should. @@ -186,26 +246,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; - case DBG_TOG: - if (record->event.pressed) { - TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); - } - return false; - case DBG_MTRX: - if (record->event.pressed) { - TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); - } - return false; - case DBG_KBD: - if (record->event.pressed) { - TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); - } - return false; - case DBG_MOU: - if (record->event.pressed) { - TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); - } - return false; case MD_BOOT: if (record->event.pressed) { key_timer = timer_read32(); @@ -215,8 +255,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; - case RGB_TOG: - if (record->event.pressed) { + } + + if (record->event.pressed) { + // The Yakuake config uses LGUI+Ctrl+Shift+. KC_NO used for undesired key, all mapped ones get mods. + if (get_highest_layer(layer_state) == _YL && keycode != TG(_YL)) { + tap_code16(C(G(S(keycode)))); + return false; + } + switch (keycode) { + case DBG_TOG: + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + return false; + case DBG_MTRX: + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + return false; + case DBG_KBD: + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + return false; + case DBG_MOU: + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + return false; + case RGB_TOG: rgb_time_out_enable = rgb_time_out_user_value; switch (rgb_matrix_get_flags()) { case LED_FLAG_ALL: { @@ -242,52 +302,40 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; } - } - return false; - // ======================================================== CUSTOM KEYCOADS BELOW ======================================================== - case COPY_ALL: - if (record->event.pressed) { + return false; + // ======================================================== CUSTOM KEYCOADS BELOW ======================================================== + case COPY_ALL: // Selects all and text and copy SEND_STRING(SS_LCTRL("ac")); - } - return false; - case SEL_CPY: - // Select word under cursor and copy. Double mouse click then ctrl+c - if (record->event.pressed) { + return false; + case SEL_CPY: + // Select word under cursor and copy. Double mouse click then ctrl+c tap_code16(KC_BTN1); tap_code16(KC_BTN1); tap_code16(C(KC_C)); - } - return false; - case ROUT_TG: - // Toggle idle LED timeout on or off - if (record->event.pressed) { + return false; + case ROUT_TG: + // Toggle idle LED timeout on or off rgb_time_out_enable = !rgb_time_out_enable; rgb_time_out_user_value = rgb_time_out_enable; - } - return false; - case ROUT_VI: - // Increase idle LED timeout value in seconds - if (record->event.pressed) { + return false; + case ROUT_VI: + // Increase idle LED timeout value in seconds // Only increase if current value is lower than RGB_TIME_OUT_MAX. Don't care what value the result will be // Modity RGB_TIME_OUT_STEP for bigger or smaller increments if (!rgb_time_out_fast_mode_enabled && rgb_time_out_seconds <= RGB_TIME_OUT_MAX) { rgb_time_out_seconds += RGB_TIME_OUT_STEP; } - } - return false; - case ROUT_VD: + return false; + case ROUT_VD: // Decrease idle LED timeout value in seconds - if (record->event.pressed) { // Only decrease if current value is higher than minimum value and the result is larger than zero // Modity RGB_TIME_OUT_STEP for bigger or smaller decrements if (!rgb_time_out_fast_mode_enabled && rgb_time_out_seconds > RGB_TIME_OUT_MIN) { rgb_time_out_seconds -= RGB_TIME_OUT_STEP; } - } - return false; - case ROUT_FM: - if (record->event.pressed) { + return false; + case ROUT_FM: if (rgb_time_out_fast_mode_enabled) { rgb_time_out_seconds = rgb_time_out_saved_seconds; } else { @@ -295,127 +343,52 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rgb_time_out_seconds = RGB_FAST_MODE_TIME_OUT; } rgb_time_out_fast_mode_enabled = !rgb_time_out_fast_mode_enabled; - } - return false; - default: - return true; //Process all other keycodes normally + return false; + case G_INIT ... G_LOG: + send_string_with_delay(sendstring_commands[keycode - G_INIT], 5); + return false; + } } + return true; } -void rgb_matrix_indicators_user(void) { - /* - [RGB] = LAYOUT( - ESC: 0, F1: 1, F2: 2, F3: 3, F4: 4, F5: 5, F6: 6, F7: 7, F8: 8, F9: 9, F10: 10, F11: 11, F12: 12, PSCR: 13, SLCK: 14, PAUS: 15, - GRV: 16, 1: 17, 2: 18, 3: 19, 4: 20, 5: 21, 6: 22, 7: 23, 8: 24, 9: 25, 0: 26, MINS: 27, EQL: 28, BSPC: 29, INS: 30, HOME: 31, PGUP: 32, - TAB: 33, Q: 34, W: 35, E: 36, R: 37, T: 38, Y: 39, U: 40, I: 41, O: 42, P: 43, LBRC: 44, RBRC: 45, BSLS: 46, DEL: 47, END: 48, PGDN: 49, - CAPS: 50, A: 51, S: 52, D: 53, F: 54, G: 55, H: 56, J: 57, K: 58, L: 59, SCLN: 60, QUOT: 61, ENT: 62, - LSFT: 63, Z: 64, X: 65, C: 66, V: 67, B: 68, N: 69, M: 70, COMM: 71, DOT: 72, SLSH: 73, RSFT: 74, UP: 75, - LCTL: 76, LGUI: 77, LALT: 78, SPC: 79, RALT: 80, Fn: 81, APP: 82, RCTL: 83, LEFT: 84, DOWN: 85, RGHT: 86 - ) - */ - if (!g_suspend_state && rgb_matrix_config.enable) { - switch (biton32(layer_state)) { - case _FL: { - /* - [_FL] = LAYOUT( - _______, DM_PLY1, DM_PLY2, _______, _______, DM_REC1, DM_REC2, _______, _______, DM_RSTP, _______, KC_WAKE, KC_SLEP, KC_MUTE, _______, _______, - _______, RGB_M_P, _______, _______, _______, _______, _______, _______, _______, ROUT_FM, ROUT_TG, ROUT_VD, ROUT_VI, _______, KC_MSTP, KC_MPLY, KC_VOLU, - _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO, U_T_AGCR, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, - _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, COPY_ALL, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_BRIU, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, _______ - ) - */ +void set_layer_color(int layer) { + if (layer == 0) { return; } + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + HSV hsv = { + .h = pgm_read_byte(&ledmap[layer][i][0]), + .s = pgm_read_byte(&ledmap[layer][i][1]), + .v = pgm_read_byte(&ledmap[layer][i][2]), + }; + if (hsv.h || hsv.s || hsv.v) { + RGB rgb = hsv_to_rgb(hsv); + float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX; + rgb_matrix_set_color(i, f * rgb.r, f * rgb.g, f * rgb.b); + } else if (layer != 1) { + // Only deactivate non-defined key LEDs at layers other than FN. Because at FN we have RGB adjustments and need to see them live. + // If the values are all false then it's a transparent key and deactivate LED at this layer + rgb_matrix_set_color(i, 0, 0, 0); + } + } +} - // Function key. Color code #ffc100 - rgb_matrix_set_color(81, 0xff, 0xc1, 0x00); - // Sleep and Wake. Color code #aeb0b0 - rgb_matrix_set_color(11, 0xae, 0xb0, 0xb0); - rgb_matrix_set_color(12, 0xae, 0xb0, 0xb0); - // Power Control Keys. Color code #cb2f2a - rgb_matrix_set_color(40, 0xcb, 0x2f, 0x2a); - rgb_matrix_set_color(41, 0xcb, 0x2f, 0x2a); - rgb_matrix_set_color(74, 0xcb, 0x2f, 0x2a); - rgb_matrix_set_color(83, 0xcb, 0x2f, 0x2a); - // Keyboard Control Keys. Color code #f4791e - rgb_matrix_set_color(68, 0xf4, 0x79, 0x1e); - rgb_matrix_set_color(69, 0xf4, 0x79, 0x1e); - // Copy All Key. Color Code #45b866 - rgb_matrix_set_color(66, 0x45, 0xb8, 0x66); - // Brightness Keys. Color code #aeb0b0 - rgb_matrix_set_color(75, 0xae, 0xb0, 0xb0); - rgb_matrix_set_color(85, 0xae, 0xb0, 0xb0); - // RGB Timeout Keys. Color code #34a4b9 - rgb_matrix_set_color(25, 0x34, 0xa3, 0xb9); - rgb_matrix_set_color(26, 0x34, 0xa3, 0xb9); - rgb_matrix_set_color(27, 0x34, 0xa3, 0xb9); - rgb_matrix_set_color(28, 0x34, 0xa3, 0xb9); - // Media Keys. Color code #51c0dd - rgb_matrix_set_color(13, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(30, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(31, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(32, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(47, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(48, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(49, 0x51, 0xc0, 0xdd); - // RBG Control Keys. Color code #2790c2 - rgb_matrix_set_color(17, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(34, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(35, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(36, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(37, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(38, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(51, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(52, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(53, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(54, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(55, 0x27, 0x90, 0xc2); - rgb_matrix_set_color(64, 0x27, 0x90, 0xc2); - // Dynamic Macro Keys. Color code #45b866 - rgb_matrix_set_color(1, 0x45, 0xb8, 0x66); - rgb_matrix_set_color(2, 0x45, 0xb8, 0x66); - rgb_matrix_set_color(5, 0x45, 0xb8, 0x66); - rgb_matrix_set_color(6, 0x45, 0xb8, 0x66); - rgb_matrix_set_color(9, 0x45, 0xb8, 0x66); - } - break; - case _ML: { - /* - [_ML] = LAYOUT( - _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN4, KC_BTN3, KC_BTN5, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, SEL_CPY, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, - _______, TD(TD_GUI_ML), _______, _______, _______, _______, TG(_ML), _______, _______, _______, _______ - ) - */ +void rgb_matrix_indicators_user(void) { + if (g_suspend_state || disable_layer_color || + rgb_matrix_get_flags() == LED_FLAG_NONE || + rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { + return; + } + set_layer_color(get_highest_layer(layer_state)); +} - // Mouse movement keys. Color code #51c0dd - rgb_matrix_set_color(35, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(51, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(52, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(53, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(54, 0x51, 0xc0, 0xdd); - rgb_matrix_set_color(37, 0x51, 0xc0, 0xdd); - // Mouse Button keys. Color code #009bca - rgb_matrix_set_color(17, 0x00, 0x9b, 0xca); - rgb_matrix_set_color(18, 0x00, 0x9b, 0xca); - rgb_matrix_set_color(19, 0x00, 0x9b, 0xca); - rgb_matrix_set_color(34, 0x00, 0x9b, 0xca); - rgb_matrix_set_color(36, 0x00, 0x9b, 0xca); - // Mouse acceleration control. Color code #5dcde3 - rgb_matrix_set_color(1, 0x5d, 0xcd, 0xe3); - rgb_matrix_set_color(2, 0x5d, 0xcd, 0xe3); - rgb_matrix_set_color(3, 0x5d, 0xcd, 0xe3); - // Layer toggle keys. Color code #ffc100 - rgb_matrix_set_color(77, 0xff, 0xc1, 0x00); - rgb_matrix_set_color(82, 0xff, 0xc1, 0x00); - // Select copy key. Color code #45b866 - rgb_matrix_set_color(66, 0x45, 0xb8, 0x66); - // NKRO key. Color code #f4791e - rgb_matrix_set_color(69, 0xf4, 0x79, 0x1e); - } - break; - } - } +/* This is a test function for Raw HID, which is currently not implemented for this keyboard */ +/** +void raw_hid_receive(uint8_t *data, uint8_t length) { + uint8_t response[RAW_EPSIZE]; + memset(response+1, 'C', 1); + memset(response+2, 'T', 1); + memset(response+3, 'R', 1); + memset(response+4, 'L', 1); + raw_hid_send(data, length); } +*/ diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/keymap.h b/keyboards/massdrop/ctrl/keymaps/endgame/keymap.h new file mode 100644 index 000000000000..1a204311d47d --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/endgame/keymap.h @@ -0,0 +1,100 @@ +#include QMK_KEYBOARD_H + +#include +#include +// HID has not yet been implemented for this keyboard +// #include "raw_hid.h" + +#define MILLISECONDS_IN_SECOND 1000 + +// These are just to make it neater to use builtin HSV values in the keymap +#define RED {HSV_RED} +#define CORAL {HSV_CORAL} +#define ORANGE {HSV_ORANGE} +#define GOLDEN {HSV_GOLDENROD} +#define GOLD {HSV_GOLD} +#define YELLOW {HSV_YELLOW} +#define CHART {HSV_CHARTREUSE} +#define GREEN {HSV_GREEN} +#define SPRING {HSV_SPRINGGREEN} +#define TURQ {HSV_TURQUOISE} +#define TEAL {HSV_TEAL} +#define CYAN {HSV_CYAN} +#define AZURE {HSV_AZURE} +#define BLUE {HSV_BLUE} +#define PURPLE {HSV_PURPLE} +#define MAGENT {HSV_MAGENTA} +#define PINK {HSV_PINK} + +//========================================================== CONFIGURABLE DEFAULTS ========================================================== +#define RGB_DEFAULT_TIME_OUT 30 +#define RGB_FAST_MODE_TIME_OUT 3 +#define RGB_TIME_OUT_MAX 600 +#define RGB_TIME_OUT_MIN 10 +#define RGB_TIME_OUT_STEP 10 + +extern bool g_suspend_state; +extern rgb_config_t rgb_matrix_config; +bool disable_layer_color; + +bool rgb_enabled_flag; // Current LED state flag. If false then LED is off. +bool rgb_time_out_enable; // Idle LED toggle enable. If false then LED will not turn off after idle timeout. +bool rgb_time_out_fast_mode_enabled; // Enable flag for RGB timeout fast mode +bool rgb_time_out_user_value; // This holds the toggle value set by user with ROUT_TG. It's necessary as RGB_TOG changes timeout enable. +uint16_t rgb_time_out_seconds; // Idle LED timeout value, in seconds not milliseconds +uint16_t rgb_time_out_saved_seconds; // The saved user config for RGB timeout period +led_flags_t rgb_time_out_saved_flag; // Store LED flag before timeout so it can be restored when LED is turned on again. + +enum layout_names { + _KL=0, // Keys Layout: The main keyboard layout that has all the characters + _FL, // Function Layout: The function key activated layout with default functions and some added ones + _ML, // Mouse Layout: Mouse Keys and mouse movement + _GL, // GIT Layout: GIT shortcuts and macros + _VL, // VIM Layout: VIM shorcuts and macros + _YL, // Yakuake Layout: Yakuake drop-down terminal shortcuts and macros + _EL, // KDE Layout: Shortcuts for KDE desktop using default KDE shortcuts settings +}; + +enum tapdance_keycodes { + TD_LGUI_ML = 0, // Tap dance key to switch to mouse layer _ML + TD_APP_YL, + TD_CTRL_TERM, // Tap dance key to open terminal on LCTRL double press +}; + +enum ctrl_keycodes { + U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, // USB Toggle Automatic GCR control + DBG_TOG, // DEBUG Toggle On / Off + DBG_MTRX, // DEBUG Toggle Matrix Prints + DBG_KBD, // DEBUG Toggle Keyboard Prints + DBG_MOU, // DEBUG Toggle Mouse Prints + MD_BOOT, // Restart into bootloader after hold timeout + SEL_CPY, // Select Copy. Select the word cursor is pointed at and copy, using double mouse click and ctrl+c + ROUT_TG, // Timeout Toggle. Toggle idle LED time out on or off + ROUT_VI, // Timeout Value Increase. Increase idle time out before LED disabled + ROUT_VD, // Timeout Value Decrease. Decrease idle time out before LED disabled + ROUT_FM, // RGB timeout fast mode toggle + COPY_ALL, // Copy all text using ctrl(a+c) + TERMINAL, // CTRL+ALT+T +}; + +enum string_macro_keycodes { + // The start of this enum should always be equal to end of ctrl_keycodes + 1 + G_INIT = TERMINAL + 1, // git init + G_CLONE, // git clone + G_CONF, // git config --global + G_ADD, // git add + G_DIFF, // git diff + G_RESET, // git reset + G_REBAS, // git rebase + G_BRANH, // git branch + G_CHECK, // git checkout + G_MERGE, // git merge + G_REMTE, // git remote add + G_FETCH, // git fetch + G_PULL, // git pull + G_PUSH, // git push + G_COMM, // git commit + G_STAT, // git status + G_LOG, // git log +}; diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk b/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk index 2a599810f879..09bf488daba9 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk +++ b/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk @@ -1,12 +1,16 @@ -# NKRO_ENABLE = yes # USB Nkey Rollover -# AUTO_SHIFT_ENABLE = yes # Auto Shift -# # RGBLIGHT_ENABLE is not for MD boards. This is here in case you forget. -# RGBLIGHT_ENABLE = no -# COMMAND_ENABLE = yes -# BOOTMAGIC_ENABLE = full +# RGBLIGHT_ENABLE = no # Not for MD boards. This is here in case you forget. +COMMAND_ENABLE = yes # Commands for debug and configuration +# BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration # BOOTMAGIC_ENABLE = lite +# AUTO_SHIFT_ENABLE = yes # Auto Shift +NKRO_ENABLE = yes # USB Nkey Rollover DYNAMIC_MACRO_ENABLE = yes # Dynamic macro recording and play MOUSEKEY_ENABLE = yes # Enable mouse control keycodes. Increases firmware size. TAP_DANCE_ENABLE = yes # Enable tap dance keys CONSOLE_ENABLE = yes # Enable debugging console. Increases firmware size. -SRC += config_led.c +SRC += config_led.c # Used to add files to the compilation/linking list. +TERMINAL_ENABLE = yes +EXTRAKEY_ENABLE = yes # Audio control and System control +# RAW_ENABLE = yes # Raw HID has not yet been implemented for this keyboard +# COMBO_ENABLE # Key combo feature +# LEADER_ENABLE # Enable leader key chording From 5153580698740739e3071683c2cba7eeb6ccde04 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 15 Jan 2020 09:38:17 -0800 Subject: [PATCH 055/331] [Keyboard] Xbows Knight: Configurator layout polishing (#7903) --- keyboards/xbows/knight/info.json | 121 +++++++++++++++++++++++++++++-- 1 file changed, 115 insertions(+), 6 deletions(-) diff --git a/keyboards/xbows/knight/info.json b/keyboards/xbows/knight/info.json index 9eafde01bcaa..63ff8d293eac 100644 --- a/keyboards/xbows/knight/info.json +++ b/keyboards/xbows/knight/info.json @@ -1,12 +1,121 @@ { - "keyboard_name": "knight", - "url": "", - "maintainer": "xbows", - "width": 23.5, - "height": 6.5, + "keyboard_name": "knight", + "url": "", + "maintainer": "xbows", + "width": 23, + "height": 6.5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":6, "y":0}, {"label":"F6", "x":7, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "y":0}, {"label":"F9", "x":10.5, "y":0}, {"label":"F10", "x":11.5, "y":0}, {"label":"F11", "x":12.5, "y":0}, {"label":"F12", "x":13.5, "y":0}, {"x":14.5, "y":0, "w":2}, {"x":16.5, "y":0, "w":2}, {"x":19.5, "y":0}, {"x":20.5, "y":0}, {"x":21.5, "y":0}, {"x":22.5, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":9.5, "y":1.5}, {"label":"&", "x":10.5, "y":1.5}, {"label":"*", "x":11.5, "y":1.5}, {"label":"(", "x":12.5, "y":1.5}, {"label":")", "x":13.5, "y":1.5}, {"label":"_", "x":14.5, "y":1.5}, {"label":"+", "x":15.5, "y":1.5}, {"label":"Backspace", "x":16.5, "y":1.5, "w":2}, {"label":"Num Lock", "x":19.5, "y":1.5}, {"label":"/", "x":20.5, "y":1.5}, {"label":"*", "x":21.5, "y":1.5}, {"label":"-", "x":22.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5}, {"label":"Q", "x":1, "y":2.5}, {"label":"W", "x":2, "y":2.5}, {"label":"E", "x":3, "y":2.5}, {"label":"R", "x":4, "y":2.5}, {"label":"T", "x":5, "y":2.5}, {"label":"Y", "x":9.5, "y":2.5}, {"label":"U", "x":10.5, "y":2.5}, {"label":"I", "x":11.5, "y":2.5}, {"label":"O", "x":12.5, "y":2.5}, {"label":"P", "x":13.5, "y":2.5}, {"label":"{", "x":14.5, "y":2.5}, {"label":"}", "x":15.5, "y":2.5}, {"label":"|", "x":16.5, "y":2.5}, {"x":17.5, "y":2.5}, {"label":"7", "x":19.5, "y":2.5}, {"label":"8", "x":20.5, "y":2.5}, {"label":"9", "x":21.5, "y":2.5}, {"label":"+", "x":22.5, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5}, {"label":"A", "x":1, "y":3.5}, {"label":"S", "x":2, "y":3.5}, {"label":"D", "x":3, "y":3.5}, {"label":"F", "x":4, "y":3.5}, {"label":"G", "x":5, "y":3.5}, {"label":"Backspace", "x":6, "y":3.5, "w":3.25}, {"label":"H", "x":9.25, "y":3.5}, {"label":"J", "x":10.25, "y":3.5}, {"label":"K", "x":11.25, "y":3.5}, {"label":"L", "x":12.25, "y":3.5}, {"label":":", "x":13.25, "y":3.5}, {"label":"\"", "x":14.25, "y":3.5}, {"label":"Enter", "x":15.25, "y":3.5, "w":2.25}, {"x":17.5, "y":3.5}, {"label":"4", "x":19.5, "y":3.5}, {"label":"5", "x":20.5, "y":3.5}, {"label":"6", "x":21.5, "y":3.5}, {"x":22.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5}, {"label":"Z", "x":1, "y":4.5}, {"label":"X", "x":2, "y":4.5}, {"label":"C", "x":3, "y":4.5}, {"label":"V", "x":4, "y":4.5}, {"label":"B", "x":5, "y":4.5}, {"label":"Enter", "x":6, "y":4.5, "w":3.25}, {"label":"N", "x":9.25, "y":4.5}, {"label":"M", "x":10.25, "y":4.5}, {"label":"<", "x":11.25, "y":4.5}, {"label":">", "x":12.25, "y":4.5}, {"label":"?", "x":13.25, "y":4.5}, {"label":"Shift", "x":14.25, "y":4.5}, {"x":16.5, "y":4.5}, {"label":"1", "x":19.5, "y":4.5}, {"label":"2", "x":20.5, "y":4.5}, {"label":"3", "x":21.5, "y":4.5}, {"label":"Enter", "x":22.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":2.25}, {"label":"Ctrl", "x":6, "y":5.5, "w":1.25}, {"label":"Shift", "x":7.25, "y":5.5, "w":1.25}, {"x":8.5, "y":5.5, "w":2.25}, {"label":"Alt", "x":10.75, "y":5.5, "w":2.25}, {"x":13, "y":5.5}, {"label":"Ctrl", "x":14, "y":5.5}, {"x":15.5, "y":5.5}, {"x":16.5, "y":5.5}, {"x":17.5, "y":5.5}, {"x":19.5, "y":5.5, "w":2}, {"x":21.5, "y":5.5}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Delete", "x":14, "y":0, "w":2}, + {"label":"Print Screen", "x":16, "y":0, "w":2}, + {"label":"Esc", "x":19, "y":0}, + {"label":"Tab", "x":20, "y":0}, + {"label":"Backspace", "x":21, "y":0}, + {"label":"Fn", "x":22, "y":0}, + {"label":"~", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"@", "x":2, "y":1.5}, + {"label":"#", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":9, "y":1.5}, + {"label":"&", "x":10, "y":1.5}, + {"label":"*", "x":11, "y":1.5}, + {"label":"(", "x":12, "y":1.5}, + {"label":")", "x":13, "y":1.5}, + {"label":"_", "x":14, "y":1.5}, + {"label":"+", "x":15, "y":1.5}, + {"label":"Backspace", "x":16, "y":1.5, "w":2}, + {"label":"Num Lock", "x":19, "y":1.5}, + {"label":"/", "x":20, "y":1.5}, + {"label":"*", "x":21, "y":1.5}, + {"label":"-", "x":22, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5}, + {"label":"Q", "x":1, "y":2.5}, + {"label":"W", "x":2, "y":2.5}, + {"label":"E", "x":3, "y":2.5}, + {"label":"R", "x":4, "y":2.5}, + {"label":"T", "x":5, "y":2.5}, + {"label":"Y", "x":9, "y":2.5}, + {"label":"U", "x":10, "y":2.5}, + {"label":"I", "x":11, "y":2.5}, + {"label":"O", "x":12, "y":2.5}, + {"label":"P", "x":13, "y":2.5}, + {"label":"{", "x":14, "y":2.5}, + {"label":"}", "x":15, "y":2.5}, + {"label":"|", "x":16, "y":2.5}, + {"label":"Page Up", "x":17, "y":2.5}, + {"label":"7", "x":19, "y":2.5}, + {"label":"8", "x":20, "y":2.5}, + {"label":"9", "x":21, "y":2.5}, + {"label":"+", "x":22, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5}, + {"label":"A", "x":1, "y":3.5}, + {"label":"S", "x":2, "y":3.5}, + {"label":"D", "x":3, "y":3.5}, + {"label":"F", "x":4, "y":3.5}, + {"label":"G", "x":5, "y":3.5}, + {"label":"Backspace", "x":6, "y":3.5, "w":3}, + {"label":"H", "x":9, "y":3.5}, + {"label":"J", "x":10, "y":3.5}, + {"label":"K", "x":11, "y":3.5}, + {"label":"L", "x":12, "y":3.5}, + {"label":":", "x":13, "y":3.5}, + {"label":"\"", "x":14, "y":3.5}, + {"label":"Enter", "x":15, "y":3.5, "w":2}, + {"label":"Page Down", "x":17, "y":3.5}, + {"label":"4", "x":19, "y":3.5}, + {"label":"5", "x":20, "y":3.5}, + {"label":"6", "x":21, "y":3.5}, + {"label":"+", "x":22, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5}, + {"label":"Z", "x":1, "y":4.5}, + {"label":"X", "x":2, "y":4.5}, + {"label":"C", "x":3, "y":4.5}, + {"label":"V", "x":4, "y":4.5}, + {"label":"B", "x":5, "y":4.5}, + {"label":"Enter", "x":6, "y":4.5, "w":3}, + {"label":"N", "x":9, "y":4.5}, + {"label":"M", "x":10, "y":4.5}, + {"label":"<", "x":11, "y":4.5}, + {"label":">", "x":12, "y":4.5}, + {"label":"?", "x":13, "y":4.5}, + {"label":"Shift", "x":14, "y":4.5}, + {"label":"Up", "x":16, "y":4.5}, + {"label":"1", "x":19, "y":4.5}, + {"label":"2", "x":20, "y":4.5}, + {"label":"3", "x":21, "y":4.5}, + {"label":"Enter", "x":22, "y":4.5, "h":2}, + {"label":"Ctrl", "x":0, "y":5.5}, + {"label":"Win", "x":1, "y":5.5}, + {"label":"Alt", "x":2, "y":5.5, "w":2}, + {"label":"Space", "x":4, "y":5.5, "w":2}, + {"label":"Ctrl", "x":6, "y":5.5, "w":1.5}, + {"label":"Shift", "x":7.5, "y":5.5, "w":1.5}, + {"label":"Space", "x":9, "y":5.5, "w":2}, + {"label":"Alt", "x":11, "y":5.5, "w":2}, + {"label":"Fn", "x":13, "y":5.5}, + {"label":"Ctrl", "x":14, "y":5.5}, + {"label":"Left", "x":15, "y":5.5}, + {"label":"Down", "x":16, "y":5.5}, + {"label":"Right", "x":17, "y":5.5}, + {"label":"0", "x":19, "y":5.5, "w":2}, + {"label":".", "x":21, "y":5.5} + ] } } } From bf397fdd9fe5adfea67cc7650c5eba53086f8a63 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Thu, 16 Jan 2020 00:53:09 +0100 Subject: [PATCH 056/331] [Keyboard] Add Eon40 keyboard (#7885) * Add Eon40 files * Make required changes * Add missing comma * Update rules.mk --- keyboards/maartenwut/eon40/config.h | 254 ++++++++++++++++++ keyboards/maartenwut/eon40/eon40.c | 16 ++ keyboards/maartenwut/eon40/eon40.h | 67 +++++ keyboards/maartenwut/eon40/info.json | 18 ++ .../maartenwut/eon40/keymaps/default/keymap.c | 46 ++++ .../eon40/keymaps/default/readme.md | 1 + keyboards/maartenwut/eon40/readme.md | 21 ++ keyboards/maartenwut/eon40/rules.mk | 37 +++ 8 files changed, 460 insertions(+) create mode 100644 keyboards/maartenwut/eon40/config.h create mode 100644 keyboards/maartenwut/eon40/eon40.c create mode 100644 keyboards/maartenwut/eon40/eon40.h create mode 100644 keyboards/maartenwut/eon40/info.json create mode 100644 keyboards/maartenwut/eon40/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/eon40/keymaps/default/readme.md create mode 100644 keyboards/maartenwut/eon40/readme.md create mode 100644 keyboards/maartenwut/eon40/rules.mk diff --git a/keyboards/maartenwut/eon40/config.h b/keyboards/maartenwut/eon40/config.h new file mode 100644 index 000000000000..e786255ffb70 --- /dev/null +++ b/keyboards/maartenwut/eon40/config.h @@ -0,0 +1,254 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x0140 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Eon40 +#define DESCRIPTION A 40% ortholinear PCB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS {B7,D5,F5,F6} +#define MATRIX_COL_PINS {F0,F1,F4,D3,D4,D6,D7,B4,B5,B6,C6,C7} +#define UNUSED_PINS {B1,B2,B3} + +#define ENCODERS_PAD_A { E6, B0, D1 } +#define ENCODERS_PAD_B { F7, D0, D2 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +#define QMK_ESC_OUTPUT F0 // usually COL +#define QMK_ESC_INPUT B7 // usually ROW diff --git a/keyboards/maartenwut/eon40/eon40.c b/keyboards/maartenwut/eon40/eon40.c new file mode 100644 index 000000000000..5a6fe4b20414 --- /dev/null +++ b/keyboards/maartenwut/eon40/eon40.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "eon40.h" diff --git a/keyboards/maartenwut/eon40/eon40.h b/keyboards/maartenwut/eon40/eon40.h new file mode 100644 index 000000000000..194e470327d5 --- /dev/null +++ b/keyboards/maartenwut/eon40/eon40.h @@ -0,0 +1,67 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_planck_mit( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_ortho_4x12_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, XXX, XXX, k37, k38, k39, k3a, k3b } \ +} diff --git a/keyboards/maartenwut/eon40/info.json b/keyboards/maartenwut/eon40/info.json new file mode 100644 index 000000000000..056be65d0da8 --- /dev/null +++ b/keyboards/maartenwut/eon40/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Eon40", + "url": "https://maartenwut.com/product/eon40/", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + }, + "LAYOUT_planck_mit": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + }, + "LAYOUT_ortho_4x12_2x2u": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "w":2}, {"x":6, "y":3, "w":2}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + } + } +} diff --git a/keyboards/maartenwut/eon40/keymaps/default/keymap.c b/keyboards/maartenwut/eon40/keymaps/default/keymap.c new file mode 100644 index 000000000000..e9b364230793 --- /dev/null +++ b/keyboards/maartenwut/eon40/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _MA 0 //Main layer +#define _LO 1 //Low +#define _HI 2 //High + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_MA] = LAYOUT_ortho_4x12( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, MO(_LO), KC_SPC, KC_BSPC, MO(_HI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + +[_LO] = LAYOUT_ortho_4x12( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), + +[_HI] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon40/keymaps/default/readme.md b/keyboards/maartenwut/eon40/keymaps/default/readme.md new file mode 100644 index 000000000000..7185afb0e0a1 --- /dev/null +++ b/keyboards/maartenwut/eon40/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the Eon40. diff --git a/keyboards/maartenwut/eon40/readme.md b/keyboards/maartenwut/eon40/readme.md new file mode 100644 index 000000000000..05dffd7afade --- /dev/null +++ b/keyboards/maartenwut/eon40/readme.md @@ -0,0 +1,21 @@ +# Eon40 + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: Eon40 +* Hardware Availability: [maartenwut.com](https://maartenwut.com) + + +## Features +- QMK Firmware +- 19mm switch spacing +- USB-C Connector +- Up to three rotary encoders +- No leds + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/eon40:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/maartenwut/eon40/rules.mk b/keyboards/maartenwut/eon40/rules.mk new file mode 100644 index 000000000000..5161f8d071c1 --- /dev/null +++ b/keyboards/maartenwut/eon40/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = yes + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no From 1e670f5e679f691c5cade1f9b43d743a1f8e26dc Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 17 Jan 2020 00:32:09 +1100 Subject: [PATCH 057/331] Remove `KEYMAP_SECTION_ENABLE` (#7882) --- keyboards/ergodone/rules.mk | 7 - keyboards/hotdox/rules.mk | 1 - show_options.mk | 5 - tmk_core/common.mk | 12 -- tmk_core/common/command.c | 3 - tmk_core/ldscript_keymap_avr35.x | 268 ------------------------------- tmk_core/ldscript_keymap_avr5.x | 268 ------------------------------- 7 files changed, 564 deletions(-) delete mode 100644 tmk_core/ldscript_keymap_avr35.x delete mode 100644 tmk_core/ldscript_keymap_avr5.x diff --git a/keyboards/ergodone/rules.mk b/keyboards/ergodone/rules.mk index 4c2fcf159531..aaeedb4311e9 100644 --- a/keyboards/ergodone/rules.mk +++ b/keyboards/ergodone/rules.mk @@ -25,13 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA USB_6KRO_ENABLE = no # USB 6key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -KEYMAP_IN_EEPROM_ENABLE = no # External keymap in eeprom -KEYMAP_SECTION_ENABLE = no # Fixed address keymap for keymap editor -SOFTPWM_LED_ENABLE = no # Enable SoftPWM to drive backlight -FADING_LED_ENABLE = no # Enable fading backlight -BREATHING_LED_ENABLE = no # Enable breathing backlight -LEDMAP_ENABLE = no # Enable LED mapping -LEDMAP_IN_EEPROM_ENABLE = no # Read LED mapping from eeprom SWAP_HANDS_ENABLE = no # Disable Onehand RGBLIGHT_ENABLE = no MIDI_ENABLE = no diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk index be21552055cc..b5b1483c724b 100644 --- a/keyboards/hotdox/rules.mk +++ b/keyboards/hotdox/rules.mk @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA USB_6KRO_ENABLE = no # USB 6key Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -KEYMAP_SECTION_ENABLE = no # Fixed address keymap for keymap editor SWAP_HANDS_ENABLE = no # Disable Onehand RGBLIGHT_ENABLE = no MIDI_ENABLE = no diff --git a/show_options.mk b/show_options.mk index 003169d4cb65..b79653d5c3ff 100644 --- a/show_options.mk +++ b/show_options.mk @@ -68,16 +68,11 @@ OTHER_OPTION_NAMES = \ ISSI_ENABLE \ KEYBOARD_LOCK_ENABLE \ KEYLOGGER_ENABLE \ - KEYMAP_IN_EEPROM_ENABLE \ - KEYMAP_SECTION_ENABLE \ LCD_BACKLIGHT_ENABLE \ - LEDMAP_ENABLE \ - LEDMAP_IN_EEPROM_ENABLE \ MACROS_ENABLED \ ONEHAND_ENABLE \ PS2_MOUSE_ENABLE \ RAW_ENABLE \ - SOFTPWM_LED_ENABLE \ SWAP_HANDS_ENABLE \ USB_6KRO_ENABLE \ WATCHDOG_ENABLE \ diff --git a/tmk_core/common.mk b/tmk_core/common.mk index d43950299b1b..8f355da1233a 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -187,18 +187,6 @@ ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes) TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK endif -ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes) - TMK_COMMON_DEFS += -DKEYMAP_SECTION_ENABLE - - ifeq ($(strip $(MCU)),atmega32u2) - TMK_COMMON_LDFLAGS = -Wl,-L$(TMK_DIR),-Tldscript_keymap_avr35.x - else ifeq ($(strip $(MCU)),atmega32u4) - TMK_COMMON_LDFLAGS = -Wl,-L$(TMK_DIR),-Tldscript_keymap_avr5.x - else - TMK_COMMON_LDFLAGS = $(error no ldscript for keymap section) - endif -endif - ifeq ($(strip $(SHARED_EP_ENABLE)), yes) TMK_COMMON_DEFS += -DSHARED_EP_ENABLE endif diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index 82cd80609134..0d6661d6035d 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -192,9 +192,6 @@ static void print_version(void) { #ifdef NKRO_ENABLE " NKRO" #endif -#ifdef KEYMAP_SECTION_ENABLE - " KEYMAP_SECTION" -#endif " " STR(BOOTLOADER_SIZE) "\n"); diff --git a/tmk_core/ldscript_keymap_avr35.x b/tmk_core/ldscript_keymap_avr35.x deleted file mode 100644 index 6665020af9b3..000000000000 --- a/tmk_core/ldscript_keymap_avr35.x +++ /dev/null @@ -1,268 +0,0 @@ -/* - * linker script for configurable keymap - * - * This adds keymap section which places keymap at fixed address and - * is based on binutils-avr ldscripts(/usr/lib/ldscripts/avr5.x). - */ -OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr") -OUTPUT_ARCH(avr:35) -MEMORY -{ - /* With keymap section - * - * Flash Map of ATMega32U4(32KB) - * +------------+ 0x0000 - * | .vectors | - * | .progmem | - * | .init0-9 | > text region - * | .text | - * | .fini9-0 | - * | | - * |------------| _etext - * | .data | - * | .bss | > data region - * | .noinit | - * | | - * |------------| 0x6800 - * | .keymap | > keymap region(2KB) - * |------------| 0x7000 - * | bootloader | 4KB - * +------------+ 0x7FFF - */ - text (rx) : ORIGIN = 0, LENGTH = 64K - keymap (rw!x) : ORIGIN = 0x6800, LENGTH = 2K - data (rw!x) : ORIGIN = 0x800060, LENGTH = 0xffa0 - eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 64K - fuse (rw!x) : ORIGIN = 0x820000, LENGTH = 1K - lock (rw!x) : ORIGIN = 0x830000, LENGTH = 1K - signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K -} -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.text : - { - *(.rel.text) - *(.rel.text.*) - *(.rel.gnu.linkonce.t*) - } - .rela.text : - { - *(.rela.text) - *(.rela.text.*) - *(.rela.gnu.linkonce.t*) - } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.rodata : - { - *(.rel.rodata) - *(.rel.rodata.*) - *(.rel.gnu.linkonce.r*) - } - .rela.rodata : - { - *(.rela.rodata) - *(.rela.rodata.*) - *(.rela.gnu.linkonce.r*) - } - .rel.data : - { - *(.rel.data) - *(.rel.data.*) - *(.rel.gnu.linkonce.d*) - } - .rela.data : - { - *(.rela.data) - *(.rela.data.*) - *(.rela.gnu.linkonce.d*) - } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - /* Internal text space or external memory. */ - .text : - { - *(.vectors) - KEEP(*(.vectors)) - /* For data that needs to reside in the lower 64k of progmem. */ - *(.progmem.gcc*) - *(.progmem*) - . = ALIGN(2); - __trampolines_start = . ; - /* The jump trampolines for the 16-bit limited relocs will reside here. */ - *(.trampolines) - *(.trampolines*) - __trampolines_end = . ; - /* For future tablejump instruction arrays for 3 byte pc devices. - We don't relax jump/call instructions within these sections. */ - *(.jumptables) - *(.jumptables*) - /* For code that needs to reside in the lower 128k progmem. */ - *(.lowtext) - *(.lowtext*) - __ctors_start = . ; - *(.ctors) - __ctors_end = . ; - __dtors_start = . ; - *(.dtors) - __dtors_end = . ; - KEEP(SORT(*)(.ctors)) - KEEP(SORT(*)(.dtors)) - /* From this point on, we don't bother about wether the insns are - below or above the 16 bits boundary. */ - *(.init0) /* Start here after reset. */ - KEEP (*(.init0)) - *(.init1) - KEEP (*(.init1)) - *(.init2) /* Clear __zero_reg__, set up stack pointer. */ - KEEP (*(.init2)) - *(.init3) - KEEP (*(.init3)) - *(.init4) /* Initialize data and BSS. */ - KEEP (*(.init4)) - *(.init5) - KEEP (*(.init5)) - *(.init6) /* C++ constructors. */ - KEEP (*(.init6)) - *(.init7) - KEEP (*(.init7)) - *(.init8) - KEEP (*(.init8)) - *(.init9) /* Call main(). */ - KEEP (*(.init9)) - *(.text) - . = ALIGN(2); - *(.text.*) - . = ALIGN(2); - *(.fini9) /* _exit() starts here. */ - KEEP (*(.fini9)) - *(.fini8) - KEEP (*(.fini8)) - *(.fini7) - KEEP (*(.fini7)) - *(.fini6) /* C++ destructors. */ - KEEP (*(.fini6)) - *(.fini5) - KEEP (*(.fini5)) - *(.fini4) - KEEP (*(.fini4)) - *(.fini3) - KEEP (*(.fini3)) - *(.fini2) - KEEP (*(.fini2)) - *(.fini1) - KEEP (*(.fini1)) - *(.fini0) /* Infinite loop after program termination. */ - KEEP (*(.fini0)) - _etext = . ; - } > text - .data : AT (ADDR (.text) + SIZEOF (.text)) - { - PROVIDE (__data_start = .) ; - *(.data) - *(.data*) - *(.rodata) /* We need to include .rodata here if gcc is used */ - *(.rodata*) /* with -fdata-sections. */ - *(.gnu.linkonce.d*) - . = ALIGN(2); - _edata = . ; - PROVIDE (__data_end = .) ; - } > data - .bss : AT (ADDR (.bss)) - { - PROVIDE (__bss_start = .) ; - *(.bss) - *(.bss*) - *(COMMON) - PROVIDE (__bss_end = .) ; - } > data - __data_load_start = LOADADDR(.data); - __data_load_end = __data_load_start + SIZEOF(.data); - /* Global data not cleared after reset. */ - .noinit : - { - PROVIDE (__noinit_start = .) ; - *(.noinit*) - PROVIDE (__noinit_end = .) ; - _end = . ; - PROVIDE (__heap_start = .) ; - } > data - /* keymap region is located at end of flash - * .fn_actions Fn actions definitions - * .keymaps Mapping layers - */ - .keymap : - { - PROVIDE(__keymap_start = .) ; - *(.keymap.fn_actions) /* 32*actions = 64bytes */ - . = ALIGN(0x40); - *(.keymap.keymaps) /* rest of .keymap section */ - *(.keymap*) - /* . = ALIGN(0x800); */ /* keymap section takes 2KB- */ - } > keymap = 0x00 /* zero fill */ - .eeprom : - { - *(.eeprom*) - __eeprom_end = . ; - } > eeprom - .fuse : - { - KEEP(*(.fuse)) - KEEP(*(.lfuse)) - KEEP(*(.hfuse)) - KEEP(*(.efuse)) - } > fuse - .lock : - { - KEEP(*(.lock*)) - } > lock - .signature : - { - KEEP(*(.signature*)) - } > signature - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } -} diff --git a/tmk_core/ldscript_keymap_avr5.x b/tmk_core/ldscript_keymap_avr5.x deleted file mode 100644 index 9b46e6c36fff..000000000000 --- a/tmk_core/ldscript_keymap_avr5.x +++ /dev/null @@ -1,268 +0,0 @@ -/* - * linker script for configurable keymap - * - * This adds keymap section which places keymap at fixed address and - * is based on binutils-avr ldscripts(/usr/lib/ldscripts/avr5.x). - */ -OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr") -OUTPUT_ARCH(avr:5) -MEMORY -{ - /* With keymap section - * - * Flash Map of ATMega32U4(32KB) - * +------------+ 0x0000 - * | .vectors | - * | .progmem | - * | .init0-9 | > text region - * | .text | - * | .fini9-0 | - * | | - * |------------| _etext - * | .data | - * | .bss | > data region - * | .noinit | - * | | - * |------------| 0x6800 - * | .keymap | > keymap region(2KB) - * |------------| 0x7000 - * | bootloader | 4KB - * +------------+ 0x7FFF - */ - text (rx) : ORIGIN = 0, LENGTH = 128K - keymap (rw!x) : ORIGIN = 0x6800, LENGTH = 2K - data (rw!x) : ORIGIN = 0x800060, LENGTH = 0xffa0 - eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 64K - fuse (rw!x) : ORIGIN = 0x820000, LENGTH = 1K - lock (rw!x) : ORIGIN = 0x830000, LENGTH = 1K - signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K -} -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.text : - { - *(.rel.text) - *(.rel.text.*) - *(.rel.gnu.linkonce.t*) - } - .rela.text : - { - *(.rela.text) - *(.rela.text.*) - *(.rela.gnu.linkonce.t*) - } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.rodata : - { - *(.rel.rodata) - *(.rel.rodata.*) - *(.rel.gnu.linkonce.r*) - } - .rela.rodata : - { - *(.rela.rodata) - *(.rela.rodata.*) - *(.rela.gnu.linkonce.r*) - } - .rel.data : - { - *(.rel.data) - *(.rel.data.*) - *(.rel.gnu.linkonce.d*) - } - .rela.data : - { - *(.rela.data) - *(.rela.data.*) - *(.rela.gnu.linkonce.d*) - } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - /* Internal text space or external memory. */ - .text : - { - *(.vectors) - KEEP(*(.vectors)) - /* For data that needs to reside in the lower 64k of progmem. */ - *(.progmem.gcc*) - *(.progmem*) - . = ALIGN(2); - __trampolines_start = . ; - /* The jump trampolines for the 16-bit limited relocs will reside here. */ - *(.trampolines) - *(.trampolines*) - __trampolines_end = . ; - /* For future tablejump instruction arrays for 3 byte pc devices. - We don't relax jump/call instructions within these sections. */ - *(.jumptables) - *(.jumptables*) - /* For code that needs to reside in the lower 128k progmem. */ - *(.lowtext) - *(.lowtext*) - __ctors_start = . ; - *(.ctors) - __ctors_end = . ; - __dtors_start = . ; - *(.dtors) - __dtors_end = . ; - KEEP(SORT(*)(.ctors)) - KEEP(SORT(*)(.dtors)) - /* From this point on, we don't bother about wether the insns are - below or above the 16 bits boundary. */ - *(.init0) /* Start here after reset. */ - KEEP (*(.init0)) - *(.init1) - KEEP (*(.init1)) - *(.init2) /* Clear __zero_reg__, set up stack pointer. */ - KEEP (*(.init2)) - *(.init3) - KEEP (*(.init3)) - *(.init4) /* Initialize data and BSS. */ - KEEP (*(.init4)) - *(.init5) - KEEP (*(.init5)) - *(.init6) /* C++ constructors. */ - KEEP (*(.init6)) - *(.init7) - KEEP (*(.init7)) - *(.init8) - KEEP (*(.init8)) - *(.init9) /* Call main(). */ - KEEP (*(.init9)) - *(.text) - . = ALIGN(2); - *(.text.*) - . = ALIGN(2); - *(.fini9) /* _exit() starts here. */ - KEEP (*(.fini9)) - *(.fini8) - KEEP (*(.fini8)) - *(.fini7) - KEEP (*(.fini7)) - *(.fini6) /* C++ destructors. */ - KEEP (*(.fini6)) - *(.fini5) - KEEP (*(.fini5)) - *(.fini4) - KEEP (*(.fini4)) - *(.fini3) - KEEP (*(.fini3)) - *(.fini2) - KEEP (*(.fini2)) - *(.fini1) - KEEP (*(.fini1)) - *(.fini0) /* Infinite loop after program termination. */ - KEEP (*(.fini0)) - _etext = . ; - } > text - .data : AT (ADDR (.text) + SIZEOF (.text)) - { - PROVIDE (__data_start = .) ; - *(.data) - *(.data*) - *(.rodata) /* We need to include .rodata here if gcc is used */ - *(.rodata*) /* with -fdata-sections. */ - *(.gnu.linkonce.d*) - . = ALIGN(2); - _edata = . ; - PROVIDE (__data_end = .) ; - } > data - .bss : AT (ADDR (.bss)) - { - PROVIDE (__bss_start = .) ; - *(.bss) - *(.bss*) - *(COMMON) - PROVIDE (__bss_end = .) ; - } > data - __data_load_start = LOADADDR(.data); - __data_load_end = __data_load_start + SIZEOF(.data); - /* Global data not cleared after reset. */ - .noinit : - { - PROVIDE (__noinit_start = .) ; - *(.noinit*) - PROVIDE (__noinit_end = .) ; - _end = . ; - PROVIDE (__heap_start = .) ; - } > data - /* keymap region is located at end of flash - * .fn_actions Fn actions definitions - * .keymaps Mapping layers - */ - .keymap : - { - PROVIDE(__keymap_start = .) ; - *(.keymap.fn_actions) /* 32*actions = 64bytes */ - . = ALIGN(0x40); - *(.keymap.keymaps) /* rest of .keymap section */ - *(.keymap*) - /* . = ALIGN(0x800); */ /* keymap section takes 2KB- */ - } > keymap = 0x00 /* zero fill */ - .eeprom : - { - *(.eeprom*) - __eeprom_end = . ; - } > eeprom - .fuse : - { - KEEP(*(.fuse)) - KEEP(*(.lfuse)) - KEEP(*(.hfuse)) - KEEP(*(.efuse)) - } > fuse - .lock : - { - KEEP(*(.lock*)) - } > lock - .signature : - { - KEEP(*(.signature*)) - } > signature - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } -} From 919d69266ea487db4016e092c329f4bd667bf6fd Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Thu, 16 Jan 2020 18:06:42 +0000 Subject: [PATCH 058/331] [Keyboard] Graystudio Space65 ISO UK layout and keymap (#7912) * ISO UK layout for Graystudio Space65 * Quick line on how to build it in the readme * Update ASCII art layout guide to match reality * Whoops, space is actually K47, not K46 * Rename to 65_iso_blocker and remove uk designation --- .../gray_studio/space65/keymaps/iso/keymap.c | 59 +++++++++++++++++++ .../gray_studio/space65/keymaps/iso/readme.md | 3 + keyboards/gray_studio/space65/rules.mk | 2 +- keyboards/gray_studio/space65/space65.h | 13 ++++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 keyboards/gray_studio/space65/keymaps/iso/keymap.c create mode 100644 keyboards/gray_studio/space65/keymaps/iso/readme.md diff --git a/keyboards/gray_studio/space65/keymaps/iso/keymap.c b/keyboards/gray_studio/space65/keymaps/iso/keymap.c new file mode 100644 index 000000000000..66c69eba8b57 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/iso/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Rys Sommefeldt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_blocker( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │PUp│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PDn│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│LGUI│LAlt│      Spaaaaaaace       │RAlt│ L1 │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_blocker( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │RST│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ TOG │PLN│MOD│HU+│HU-│SA+│SA-│VA+│VA-│   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │   │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │   │   │   │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + RGB_TOG, RGB_M_P, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/gray_studio/space65/keymaps/iso/readme.md b/keyboards/gray_studio/space65/keymaps/iso/readme.md new file mode 100644 index 000000000000..e7d3dd8238fe --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/iso/readme.md @@ -0,0 +1,3 @@ +# ISO keymap for Space65 + +Make this firmware with `make gray_studio/space65:iso`. diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index ced89eac045d..e3909d8dd465 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -32,4 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = 65_ansi_blocker +LAYOUTS = 65_ansi_blocker 65_iso_blocker diff --git a/keyboards/gray_studio/space65/space65.h b/keyboards/gray_studio/space65/space65.h index 520679a2ad56..943e9e66c9ae 100644 --- a/keyboards/gray_studio/space65/space65.h +++ b/keyboards/gray_studio/space65/space65.h @@ -55,3 +55,16 @@ { k40, k41, KC_NO, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4A, k4B, KC_NO, k4D, k4E, k4F }, \ } +#define LAYOUT_65_iso_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1E, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K47, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} From d6e6feb3770e9ce465df137c944398ed19fd5797 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Thu, 16 Jan 2020 14:34:25 -0800 Subject: [PATCH 059/331] Further changes to HHKB keymap (#7918) * Changes to HHKB Keymap for useability * Changes to HHKB Keymap for useability * Added KC_GRV to _FL. --- keyboards/hhkb/keymaps/xyverz/keymap.c | 30 ++++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/keyboards/hhkb/keymaps/xyverz/keymap.c b/keyboards/hhkb/keymaps/xyverz/keymap.c index 56816354d183..eebaede979fc 100644 --- a/keyboards/hhkb/keymaps/xyverz/keymap.c +++ b/keyboards/hhkb/keymaps/xyverz/keymap.c @@ -19,6 +19,8 @@ enum layer_names { enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; +#define FN_TAB LT(_FL, KC_TAB) + // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -27,9 +29,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------. * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del| * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|BkSpc| + * |Fn/Tb| Q| W| E| R| T| Y| U| I| O| P| [| ]|BkSpc| * |-----------------------------------------------------------| - * |Fn | A| S| D| F| G| H| J| K| L| ;| '| Return| + * |Control| A| S| D| F| G| H| J| K| L| ;| '| Return| * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |Fn| * |-----------------------------------------------------------| @@ -38,8 +40,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* Layer 0: Qwerty */ [_QW] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , + FN_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT @@ -50,9 +52,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------. * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \ |Del| * |-----------------------------------------------------------| - * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =|BkSpc| + * |Fn/Tb| '| ,| .| P| Y| F| G| C| R| L| /| =|BkSpc| * |-----------------------------------------------------------| - * |Fn | A| O| E| U| I| D| H| T| N| S| -| Return| + * |Control| A| O| E| U| I| D| H| T| N| S| -| Return| * |-----------------------------------------------------------| * |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift |Fn| * |-----------------------------------------------------------| @@ -61,8 +63,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* Layer 1: Dvorak */ [_DV] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + FN_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_FL), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT @@ -73,9 +75,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------. * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del| * |-----------------------------------------------------------| - * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]|BkSpc| + * |Fn/Tb| Q| W| F| P| G| J| L| U| Y| ;| [| ]|BkSpc| * |-----------------------------------------------------------| - * |Fn | A| R| S| T| D| H| N| E| I| O| '| Return| + * |Control| A| R| S| T| D| H| N| E| I| O| '| Return| * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift |Fn| * |-----------------------------------------------------------| @@ -84,8 +86,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* Layer 2: Colemak */ [_CM] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , + FN_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT @@ -94,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * _FL: Function Layer * ,-----------------------------------------------------------. - * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |RST| + * |Grv |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |RST| * |-----------------------------------------------------------| * | | |_QW|_DV|_CM| | |PgU| Up|PgD|PSc|SLk|Pau| | * |-----------------------------------------------------------| @@ -107,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* Layer 3: Functions */ [_FL] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET , + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET , _______, _______, QWERTY, DVORAK, COLEMAK, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, _______, _______, From b6d8840915b9f323cad95186b8ac269bd559b9f7 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Fri, 17 Jan 2020 02:15:08 -0500 Subject: [PATCH 060/331] [Keyboard] add VIA support for hiney PCBs (#7910) * add VIA support for hiney PCBs * update LED per request * update LED text per request * remove extra stuff --- .../hineybush/h75_singa/keymaps/via/keymap.c | 63 +++++++++++++++++++ .../hineybush/h75_singa/keymaps/via/readme.md | 1 + .../hineybush/h75_singa/keymaps/via/rules.mk | 1 + keyboards/hineybush/h87a/keymaps/via/keymap.c | 63 +++++++++++++++++++ .../hineybush/h87a/keymaps/via/readme.md | 1 + keyboards/hineybush/h87a/keymaps/via/rules.mk | 1 + keyboards/hineybush/h88/keymaps/via/keymap.c | 52 +++++++++++++++ keyboards/hineybush/h88/keymaps/via/readme.md | 1 + keyboards/hineybush/h88/keymaps/via/rules.mk | 1 + keyboards/hineybush/h88/rules.mk | 2 +- keyboards/hineybush/hbcp/keymaps/via/keymap.c | 60 ++++++++++++++++++ .../hineybush/hbcp/keymaps/via/readme.md | 2 + keyboards/hineybush/hbcp/keymaps/via/rules.mk | 1 + keyboards/hineybush/physix/rules.mk | 2 +- keyboards/hineybush/sm68/rules.mk | 2 +- 15 files changed, 250 insertions(+), 3 deletions(-) create mode 100644 keyboards/hineybush/h75_singa/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/h75_singa/keymaps/via/readme.md create mode 100644 keyboards/hineybush/h75_singa/keymaps/via/rules.mk create mode 100644 keyboards/hineybush/h87a/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/h87a/keymaps/via/readme.md create mode 100644 keyboards/hineybush/h87a/keymaps/via/rules.mk create mode 100644 keyboards/hineybush/h88/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/h88/keymaps/via/readme.md create mode 100644 keyboards/hineybush/h88/keymaps/via/rules.mk create mode 100644 keyboards/hineybush/hbcp/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/hbcp/keymaps/via/readme.md create mode 100644 keyboards/hineybush/hbcp/keymaps/via/rules.mk diff --git a/keyboards/hineybush/h75_singa/keymaps/via/keymap.c b/keyboards/hineybush/h75_singa/keymaps/via/keymap.c new file mode 100644 index 000000000000..37efc344c0e4 --- /dev/null +++ b/keyboards/hineybush/h75_singa/keymaps/via/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2019 hineybush + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115, \ + k200, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k214, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, \ + k400, k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k414, k415, \ + k500, k501, k502, k504, k506, k508, k510, k511, k513, k514, k515 \ */ + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + + ), + + [1] = LAYOUT_all( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RGB_TOG, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RGB_MOD, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + + [2] = LAYOUT_all( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + + [3] = LAYOUT_all( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), +}; + + diff --git a/keyboards/hineybush/h75_singa/keymaps/via/readme.md b/keyboards/hineybush/h75_singa/keymaps/via/readme.md new file mode 100644 index 000000000000..4c3cfd80098a --- /dev/null +++ b/keyboards/hineybush/h75_singa/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for h75_singa diff --git a/keyboards/hineybush/h75_singa/keymaps/via/rules.mk b/keyboards/hineybush/h75_singa/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/h75_singa/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h87a/keymaps/via/keymap.c b/keyboards/hineybush/h87a/keymaps/via/keymap.c new file mode 100644 index 000000000000..e4be1cfc9bf8 --- /dev/null +++ b/keyboards/hineybush/h87a/keymaps/via/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2020 Josh Hinnebusch + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +void led_init_ports(void) { + setPinOutput(D5); + setPinOutput(E6); +} + +bool led_update_user(led_t led_state) { + writePin(D5, !led_state.caps_lock); + writePin(E6, !led_state.scroll_lock); + return true; +} diff --git a/keyboards/hineybush/h87a/keymaps/via/readme.md b/keyboards/hineybush/h87a/keymaps/via/readme.md new file mode 100644 index 000000000000..f81b69ee8386 --- /dev/null +++ b/keyboards/hineybush/h87a/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for h87a diff --git a/keyboards/hineybush/h87a/keymaps/via/rules.mk b/keyboards/hineybush/h87a/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/h87a/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h88/keymaps/via/keymap.c b/keyboards/hineybush/h88/keymaps/via/keymap.c new file mode 100644 index 000000000000..0e6bd37c1b46 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Josh Hinnebusch + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_0, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/hineybush/h88/keymaps/via/readme.md b/keyboards/hineybush/h88/keymaps/via/readme.md new file mode 100644 index 000000000000..086686e7d675 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for h88a diff --git a/keyboards/hineybush/h88/keymaps/via/rules.mk b/keyboards/hineybush/h88/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/h88/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h88/rules.mk b/keyboards/hineybush/h88/rules.mk index 62b2d7b8b371..f39537546045 100644 --- a/keyboards/hineybush/h88/rules.mk +++ b/keyboards/hineybush/h88/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/hbcp/keymaps/via/keymap.c b/keyboards/hineybush/hbcp/keymaps/via/keymap.c new file mode 100644 index 000000000000..8a260cee8fe5 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2019 hineybush + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_TRNS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + + ), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK,KC_HOME, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RESET ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_SAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RGB_TOG, RGB_MOD,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS,KC_TRNS, KC_TRNS + + ), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS + + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS + + ), +}; + diff --git a/keyboards/hineybush/hbcp/keymaps/via/readme.md b/keyboards/hineybush/hbcp/keymaps/via/readme.md new file mode 100644 index 000000000000..be77ea7ff61c --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The default VIA keymap for hbcp + diff --git a/keyboards/hineybush/hbcp/keymaps/via/rules.mk b/keyboards/hineybush/hbcp/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/hbcp/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/physix/rules.mk b/keyboards/hineybush/physix/rules.mk index 5c1f5fb4b074..010cb024d0dd 100644 --- a/keyboards/hineybush/physix/rules.mk +++ b/keyboards/hineybush/physix/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/sm68/rules.mk b/keyboards/hineybush/sm68/rules.mk index 49f5ca7fdcab..28e24020af0c 100644 --- a/keyboards/hineybush/sm68/rules.mk +++ b/keyboards/hineybush/sm68/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug From 619ee543b8093f643585870db87bad06630c39d4 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 17 Jan 2020 09:30:32 +0100 Subject: [PATCH 061/331] [Keyboard] Add Plaid-Pad 4x4 numpad (#7900) * Add Plaid-Pad code * Move ENCODER_ENABLE under Build Options * Update keyboards/keycapsss/plaid_pad/info.json * Update keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c * Update keyboards/keycapsss/plaid_pad/plaid_pad.h * Update keyboards/keycapsss/plaid_pad/rules.mk * Update keyboards/keycapsss/plaid_pad/rules.mk * Update keyboards/keycapsss/plaid_pad/rules.mk * Update keyboards/keycapsss/plaid_pad/rules.mk * Update keyboards/keycapsss/plaid_pad/rules.mk * Update keyboards/keycapsss/plaid_pad/rules.mk * Update keyboards/keycapsss/plaid_pad/rules.mk * Update keyboards/keycapsss/plaid_pad/readme.md * Update keyboards/keycapsss/plaid_pad/readme.md * Update keyboards/keycapsss/plaid_pad/readme.md * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/config.h * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/rules.mk * Update keyboards/keycapsss/plaid_pad/config.h * Update keyboards/keycapsss/plaid_pad/config.h * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/usbconfig.h * Update keyboards/keycapsss/plaid_pad/config.h --- keyboards/keycapsss/plaid_pad/config.h | 38 ++ keyboards/keycapsss/plaid_pad/info.json | 31 ++ .../plaid_pad/keymaps/default/config.h | 3 + .../plaid_pad/keymaps/default/keymap.c | 44 ++ .../plaid_pad/keymaps/default/readme.md | 11 + keyboards/keycapsss/plaid_pad/plaid_pad.c | 1 + keyboards/keycapsss/plaid_pad/plaid_pad.h | 18 + keyboards/keycapsss/plaid_pad/readme.md | 25 ++ keyboards/keycapsss/plaid_pad/rules.mk | 41 ++ keyboards/keycapsss/plaid_pad/usbconfig.h | 383 ++++++++++++++++++ 10 files changed, 595 insertions(+) create mode 100644 keyboards/keycapsss/plaid_pad/config.h create mode 100644 keyboards/keycapsss/plaid_pad/info.json create mode 100644 keyboards/keycapsss/plaid_pad/keymaps/default/config.h create mode 100644 keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c create mode 100644 keyboards/keycapsss/plaid_pad/keymaps/default/readme.md create mode 100644 keyboards/keycapsss/plaid_pad/plaid_pad.c create mode 100644 keyboards/keycapsss/plaid_pad/plaid_pad.h create mode 100644 keyboards/keycapsss/plaid_pad/readme.md create mode 100644 keyboards/keycapsss/plaid_pad/rules.mk create mode 100644 keyboards/keycapsss/plaid_pad/usbconfig.h diff --git a/keyboards/keycapsss/plaid_pad/config.h b/keyboards/keycapsss/plaid_pad/config.h new file mode 100644 index 000000000000..c4d22b6636b6 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/config.h @@ -0,0 +1,38 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xAF12 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keycapsss +#define PRODUCT Plaid-Pad +#define DESCRIPTION 4x4 numpad with through hole components + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { C0, C1, C2, C3 } +#define MATRIX_COL_PINS { B0, D7, D6, D5 } +#define UNUSED_PINS { B3, B4, B5, D4} + +#define ENCODERS_PAD_A { D0, B1 } +#define ENCODERS_PAD_B { D1, B2 } +#define ENCODER_RESOLUTION 4 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/keycapsss/plaid_pad/info.json b/keyboards/keycapsss/plaid_pad/info.json new file mode 100644 index 000000000000..cbc2b5210d42 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/info.json @@ -0,0 +1,31 @@ +{ + "keyboard_name": "Plaid-Pad", + "keyboard_folder": "plaid_pad", + "url": "https://keycapsss.com/diy-kits/104/plaid-pad-4x4-numpad", + "maintainer": "BenRoe", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "key_count": 16, + "layout": [ + {"w": 1,"x": 0,"y": 0}, + {"w": 1,"x": 1,"y": 0}, + {"w": 1,"x": 2,"y": 0}, + {"w": 1,"x": 3,"y": 0}, + {"w": 1,"x": 0,"y": 1}, + {"w": 1,"x": 1,"y": 1}, + {"w": 1,"x": 2,"y": 1}, + {"w": 1,"x": 3,"y": 1}, + {"w": 1,"x": 0,"y": 2}, + {"w": 1,"x": 1,"y": 2}, + {"w": 1,"x": 2,"y": 2}, + {"w": 1,"x": 3,"y": 2}, + {"w": 1,"x": 0,"y": 3}, + {"w": 1,"x": 1,"y": 3}, + {"w": 1,"x": 2,"y": 3}, + {"w": 1,"x": 3,"y": 3} + ] + } + } +} diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/config.h b/keyboards/keycapsss/plaid_pad/keymaps/default/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c new file mode 100644 index 000000000000..bdfd7fb780bc --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,-----------------------, + * | 7 | 8 | 9 | / | + * |-----+-----+-----+-----| + * | 4 | 5 | 6 | * | + * |-----+-----+-----+-----| + * | 1 | 2 | 3 | - | + * |-----+-----+-----+-----| + * | 0 | . | = | + | + * `-----------------------' + */ +LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_PSLS, + KC_P4, KC_P5, KC_P6, KC_PAST, + KC_P1, KC_P2, KC_P3, KC_PMNS, + KC_P0, KC_PDOT, KC_PEQL, KC_PPLS +) + +}; + +// Set led state during powerup +void keyboard_post_init_user(void) { + writePinHigh(LED_RED); +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // First encoder - top left + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } else if (index == 1) { // Second encoder - top right + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md b/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md new file mode 100644 index 000000000000..1c1b1513dd1a --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md @@ -0,0 +1,11 @@ + + + +# Default Plaid-Pad Layout + +This is the default layout that comes flashed on every Plaid-Pad. +The upper left (7) and right (/) switch, can be replaced by a rotary encoder. +They do "Up Arrow" (KC_UP) and "Down Arrow" (KC_DOWN). +Encoder with build-in switch are supported. + + diff --git a/keyboards/keycapsss/plaid_pad/plaid_pad.c b/keyboards/keycapsss/plaid_pad/plaid_pad.c new file mode 100644 index 000000000000..befddf42a994 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/plaid_pad.c @@ -0,0 +1 @@ +#include "plaid_pad.h" diff --git a/keyboards/keycapsss/plaid_pad/plaid_pad.h b/keyboards/keycapsss/plaid_pad/plaid_pad.h new file mode 100644 index 000000000000..fae9b132a873 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/plaid_pad.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LED_RED C5 // LED1 +#define LED_GREEN C4 // LED2 diff --git a/keyboards/keycapsss/plaid_pad/readme.md b/keyboards/keycapsss/plaid_pad/readme.md new file mode 100644 index 000000000000..ad38f119ce8f --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/readme.md @@ -0,0 +1,25 @@ +# Plaid-Pad + + + +A 4x4 numpad with only through hole components. +It's a great companion to the Plaid keyboard by [hsgw](https://github.com/hsgw/) and heavily inspired by it. + +* Keyboard Maintainer: BenRoe [Github](https://github.com/BenRoe) / [Twitter](https://twitter.com/keycapsss) +* Hardware Supported: ATmega328P with VUSB ([see Bootloader section](#Bootloader)) +* Hardware Availability: [Keycapsss.com](https://keycapsss.com) + +Make example for this keyboard (after setting up your build environment): + + make keycapsss/plaid_pad:default + +Flashing example for this keyboard: + + make keycapsss/plaid_pad:default:flash + +## Bootloader +- same usbasploader as Plaid ([Instruction](https://github.com/hsgw/plaid/blob/master/doc/en/bootloader.md), [Repository](https://github.com/hsgw/USBaspLoader/tree/plaid)) + +--- + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/keycapsss/plaid_pad/rules.mk b/keyboards/keycapsss/plaid_pad/rules.mk new file mode 100644 index 000000000000..f62833ca6bc9 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rules.mk @@ -0,0 +1,41 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + +# disable debug code +OPT_DEFS = -DDEBUG_LEVEL=0 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = yes + +LAYOUTS = ortho_4x4 +LAYOUTS_HAS_RGB = no diff --git a/keyboards/keycapsss/plaid_pad/usbconfig.h b/keyboards/keycapsss/plaid_pad/usbconfig.h new file mode 100644 index 000000000000..e208e99f2e47 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/usbconfig.h @@ -0,0 +1,383 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'K','e','y','c','a','p','s','s','s' +#define USB_CFG_VENDOR_NAME_LEN 9 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'P', 'l', 'a', 'i', 'd', '-', 'P', 'a', 'd' +#define USB_CFG_DEVICE_NAME_LEN 9 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +// /* #define USB_INTR_CFG_CLR 0 */ +// /* #define USB_INTR_ENABLE EIMSK */ +// #define USB_INTR_ENABLE_BIT INT1 +// /* #define USB_INTR_PENDING EIFR */ +// #define USB_INTR_PENDING_BIT INTF1 +// #define USB_INTR_VECTOR INT1_vect From 1fcd0b25783d188576f54146632f42806d22d489 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 17 Jan 2020 15:59:07 +0000 Subject: [PATCH 062/331] move caps because it can be triggered accidentally by sequences such as '("' (#7923) Thanks! --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index c6298d247ba9..34ef05248747 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -163,12 +163,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = LAYOUT_planck_grid( esc, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash, del, at, dlr, eql, lprn, lbrc, rbrc, rprn, astr, hash, plus, gbp, - caps, grv, pipe, bsls, lcbr, tild, circ, rcbr, ampr, exlm, perc, caps, + ____, grv, pipe, bsls, lcbr, tild, circ, rcbr, ampr, exlm, perc, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), [MOVE] = LAYOUT_planck_grid( - esc, xxxx, slup, dtl, dtr, xxxx, xxxx, home, up, end, xxxx, xxxx, + esc, xxxx, slup, dtl, dtr, xxxx, xxxx, home, up, end, xxxx, caps, del, xxxx, sldn, tabl, tabr, xxxx, xxxx, left, down, rght, xxxx, xxxx, ____, xxxx, xxxx, back, fwd, xxxx, xxxx, pgdn, pgup, xxxx, xxxx, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ From 952e805edb5b5c42a8bbe35b6689c28943a53858 Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 17 Jan 2020 18:50:58 +0000 Subject: [PATCH 063/331] Initial refactor of ergo42 to split common --- keyboards/ergo42/config.h | 5 +- keyboards/ergo42/ergo42.h | 6 +- keyboards/ergo42/i2c.c | 162 ------------ keyboards/ergo42/i2c.h | 49 ---- keyboards/ergo42/matrix.c | 459 --------------------------------- keyboards/ergo42/readme.md | 10 +- keyboards/ergo42/rev1/config.h | 9 +- keyboards/ergo42/rev1/rev1.c | 21 -- keyboards/ergo42/rev1/rev1.h | 13 +- keyboards/ergo42/rules.mk | 38 ++- keyboards/ergo42/serial.c | 228 ---------------- keyboards/ergo42/serial.h | 26 -- keyboards/ergo42/split_util.c | 86 ------ keyboards/ergo42/split_util.h | 20 -- 14 files changed, 26 insertions(+), 1106 deletions(-) delete mode 100644 keyboards/ergo42/i2c.c delete mode 100644 keyboards/ergo42/i2c.h delete mode 100644 keyboards/ergo42/matrix.c delete mode 100644 keyboards/ergo42/serial.c delete mode 100644 keyboards/ergo42/serial.h delete mode 100644 keyboards/ergo42/split_util.c delete mode 100644 keyboards/ergo42/split_util.h diff --git a/keyboards/ergo42/config.h b/keyboards/ergo42/config.h index c910d8f24f0c..cfb6bf4ffccd 100644 --- a/keyboards/ergo42/config.h +++ b/keyboards/ergo42/config.h @@ -16,9 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif diff --git a/keyboards/ergo42/ergo42.h b/keyboards/ergo42/ergo42.h index faa8170ef904..ced1709d3e5b 100644 --- a/keyboards/ergo42/ergo42.h +++ b/keyboards/ergo42/ergo42.h @@ -1,5 +1,4 @@ -#ifndef ERGO42_H -#define ERGO42_H +#pragma once #include "quantum.h" @@ -7,7 +6,6 @@ #include "rev1.h" #endif - // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc_ortho_4x14( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ @@ -23,5 +21,3 @@ ) #define LAYOUT_kc LAYOUT_kc_ortho_4x14 - -#endif diff --git a/keyboards/ergo42/i2c.c b/keyboards/ergo42/i2c.c deleted file mode 100644 index 084c890c405f..000000000000 --- a/keyboards/ergo42/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/ergo42/matrix.c b/keyboards/ergo42/matrix.c deleted file mode 100644 index 328d16c77bf5..000000000000 --- a/keyboards/ergo42/matrix.c +++ /dev/null @@ -1,459 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#if (DEBOUNCE > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col -#if (DIODE_DIRECTION == COL2ROW) - unselect_rows(); - init_cols(); -#elif (DIODE_DIRECTION == ROW2COL) - unselect_cols(); - init_rows(); -#endif - - TX_RX_LED_INIT; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); - -} - -uint8_t _matrix_scan(void) -{ - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); -#if (DIODE_DIRECTION == COL2ROW) - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# else - read_cols_on_row(matrix+offset, current_row); -# endif - - } - -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix+offset, current_col); -# endif - - } -#endif - -# if (DEBOUNCE > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selecton to stabilize - select_row(current_row); - wait_us(30); - - // For each col... - for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - - // Select the col pin to read (active low) - uint8_t pin = col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - - // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); - } - - // Unselect row - unselect_row(current_row); - - return (last_row_value != current_matrix[current_row]); -} - -static void select_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -static void init_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - // Select col and wait for col selecton to stabilize - select_col(current_col); - wait_us(30); - - // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) - { - - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[row_index]; - - // Check row pin state - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) - { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); - } - else - { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -static void select_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#endif diff --git a/keyboards/ergo42/readme.md b/keyboards/ergo42/readme.md index 112e62b551ad..c43b47382b27 100644 --- a/keyboards/ergo42/readme.md +++ b/keyboards/ergo42/readme.md @@ -5,12 +5,12 @@ __The Answer to the Ultimate Question of Life, the Universe, and at least Keyboards.__ A split 7x4 ortholinear keyboard. [Hardware project repo](https://github.com/Biacco42/Ergo42) -Keyboard Maintainer: [Biacco42](https://github.com/Biacco42) [@Biacco42](https://twitter.com/Biacco42) -Hardware Supported: Ergo42 PCB, Pro Micro ATmega32u4 -Hardware Availability: [Ergo42 PCB and case](https://github.com/Biacco42/Ergo42) +* Keyboard Maintainer: [Biacco42](https://github.com/Biacco42) [@Biacco42](https://twitter.com/Biacco42) +* Hardware Supported: Ergo42 PCB, Pro Micro ATmega32u4 +* Hardware Availability: [Ergo42 PCB and case](https://github.com/Biacco42/Ergo42) Make example for this keyboard (after setting up your build environment): - make ergo42/rev1:default:avrdude + make ergo42/rev1:default:flash -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ergo42/rev1/config.h b/keyboards/ergo42/rev1/config.h index f8fae93cf40f..8d146bb8b9c3 100644 --- a/keyboards/ergo42/rev1/config.h +++ b/keyboards/ergo42/rev1/config.h @@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" @@ -40,8 +39,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order -/* define tapping term */ -#define TAPPING_TERM 100 +#define SOFT_SERIAL_PIN D0 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -59,7 +57,6 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - #define RGBLED_NUM 12 // Number of LEDs /* @@ -79,5 +76,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/ergo42/rev1/rev1.c b/keyboards/ergo42/rev1/rev1.c index f2e8abb1a025..626a0893bb4a 100644 --- a/keyboards/ergo42/rev1/rev1.c +++ b/keyboards/ergo42/rev1/rev1.c @@ -1,22 +1 @@ #include "ergo42.h" - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - diff --git a/keyboards/ergo42/rev1/rev1.h b/keyboards/ergo42/rev1/rev1.h index 724ec3897079..9a5aec4d266d 100644 --- a/keyboards/ergo42/rev1/rev1.h +++ b/keyboards/ergo42/rev1/rev1.h @@ -1,18 +1,9 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "ergo42.h" #include "quantum.h" -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) @@ -54,5 +45,3 @@ #endif #define LAYOUT LAYOUT_ortho_4x14 - -#endif diff --git a/keyboards/ergo42/rules.mk b/keyboards/ergo42/rules.mk index a02e3ca74e1b..3f55da67a9c3 100644 --- a/keyboards/ergo42/rules.mk +++ b/keyboards/ergo42/rules.mk @@ -12,32 +12,26 @@ MCU = atmega32u4 BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs -CUSTOM_MATRIX = yes -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c \ - ssd1306.c +SPLIT_KEYBOARD = yes LAYOUTS = ortho_4x14 diff --git a/keyboards/ergo42/serial.c b/keyboards/ergo42/serial.c deleted file mode 100644 index 74bcbb6bf6e2..000000000000 --- a/keyboards/ergo42/serial.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/ergo42/serial.h b/keyboards/ergo42/serial.h deleted file mode 100644 index 15fe4db7b4c6..000000000000 --- a/keyboards/ergo42/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/ergo42/split_util.c b/keyboards/ergo42/split_util.c deleted file mode 100644 index 346cbc908949..000000000000 --- a/keyboards/ergo42/split_util.c +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { -#ifdef USE_I2C - i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); -void keyboard_slave_loop(void); - -void matrix_master_OLED_init (void); - -#endif From 75d4ff7d51160690558cf4bee1bae057f847b706 Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 17 Jan 2020 18:55:24 +0000 Subject: [PATCH 064/331] Prevent fallthrough for DIODE_DIRECTION --- keyboards/ergo42/rev1/config.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboards/ergo42/rev1/config.h b/keyboards/ergo42/rev1/config.h index 8d146bb8b9c3..3850be968d0e 100644 --- a/keyboards/ergo42/rev1/config.h +++ b/keyboards/ergo42/rev1/config.h @@ -39,6 +39,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + #define SOFT_SERIAL_PIN D0 /* define if matrix has ghost */ From 1b0854fdca06d24324eecbb565702bbd337ef339 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 17 Jan 2020 12:33:08 -0800 Subject: [PATCH 065/331] Cleanup check for PERMISSIVE_HOLD (#7861) * Fix bug in PERMISSIVE_HOLD check caused by #5009 (aka, me) * Remove check for per key --- tmk_core/common/action_tapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index e0f524ad7a64..8531dff360f4 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -111,7 +111,7 @@ bool process_tapping(keyrecord_t *keyp) { * This can register the key before settlement of tapping, * useful for long TAPPING_TERM but may prevent fast typing. */ -# if defined(TAPPING_TERM_PER_KEY) || (!defined(PER_KEY_TAPPING_TERM) && TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) +# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) # ifdef TAPPING_TERM_PER_KEY else if ((get_tapping_term(get_event_keycode(tapping_key.event)) >= 500) && IS_RELEASED(event) && waiting_buffer_typed(event)) # else From 95c24bbaf8ed2b3c9ee79226dea782dc84764c56 Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Fri, 17 Jan 2020 15:49:23 -0500 Subject: [PATCH 066/331] Implement and document TAPPING_FORCE_HOLD_PER_KEY (#7859) * Implement and document TAPPING_FORCE_HOLD_PER_KEY * Added "record" parameter to "get_tapping_force_hold" * Correct typo -- remove 'IGNORE_' from 'IGNORE_TAPPING_FORCE_HOLD_PER_KEY' Co-authored-by: GeorgeKoenig <35542036+GeorgeKoenig@users.noreply.github.com> --- docs/config_options.md | 2 ++ docs/feature_advanced_keycodes.md | 38 +++++++++++++++++++++++++++++++ tmk_core/common/action_tapping.c | 13 +++++++++-- 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 0b83ed9e4af7..6df08233560d 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -149,6 +149,8 @@ If you define these options you will enable the associated feature, which may in * makes it possible to use a dual role key as modifier shortly after having been tapped * See [Hold after tap](feature_advanced_keycodes.md#tapping-force-hold) * Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle) +* `#define TAPPING_FORCE_HOLD_PER_KEY` + * enables handling for per key `TAPPING_FORCE_HOLD` settings * `#define LEADER_TIMEOUT 300` * how long before the leader key times out * If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index ec3807f400eb..ebb24dc990c2 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -291,6 +291,25 @@ Normally, this would send `X` (`SHIFT`+`x`). With `Ignore Mod Tap Interrupt` ena ?> If you have `Permissive Hold` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`. +For more granular control of this feature, you can add the following to your `config.h`: + +```c +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY +``` + +You can then add the following function to your keymap: + +```c +bool get_ignore_mod_tap_interrupt(uint16_t keycode) { + switch (keycode) { + case SFT_T(KC_SPC): + return true; + default: + return false; + } +} +``` + ## Tapping Force Hold To enable `tapping force hold`, add the following to your `config.h`: @@ -315,6 +334,25 @@ With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allo !> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle). +For more granular control of this feature, you can add the following to your `config.h`: + +```c +#define TAPPING_FORCE_HOLD_PER_KEY +``` + +You can then add the following function to your keymap: + +```c +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_BSPC): + return true; + default: + return false; + } +} +``` + ## Retro Tapping To enable `retro tapping`, add the following to your `config.h`: diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index 8531dff360f4..c0f1f694b7e2 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -27,6 +27,10 @@ __attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode) { return TAPPI # define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM) # endif +# ifdef TAPPING_FORCE_HOLD_PER_KEY +__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return false; } +# endif + static keyrecord_t tapping_key = {}; static keyrecord_t waiting_buffer[WAITING_BUFFER_SIZE] = {}; static uint8_t waiting_buffer_head = 0; @@ -232,8 +236,13 @@ bool process_tapping(keyrecord_t *keyp) { if (WITHIN_TAPPING_TERM(event)) { if (event.pressed) { if (IS_TAPPING_KEY(event.key)) { -# ifndef TAPPING_FORCE_HOLD - if (!tapping_key.tap.interrupted && tapping_key.tap.count > 0) { +//# ifndef TAPPING_FORCE_HOLD +# if !defined(TAPPING_FORCE_HOLD) || defined(TAPPING_FORCE_HOLD_PER_KEY) + if ( +# ifdef TAPPING_FORCE_HOLD_PER_KEY + !get_tapping_force_hold(get_event_keycode(tapping_key.event), keyp) && +# endif + !tapping_key.tap.interrupted && tapping_key.tap.count > 0) { // sequential tap. keyp->tap = tapping_key.tap; if (keyp->tap.count < 15) keyp->tap.count += 1; From d11238f748554d66718b8fc13caa6e3da93fdf16 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Fri, 17 Jan 2020 15:15:58 -0600 Subject: [PATCH 067/331] switching to you know whats up mode (#7921) --- common_features.mk | 2 +- quantum/process_keycode/process_steno.c | 4 ++++ quantum/process_keycode/process_steno.h | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common_features.mk b/common_features.mk index 09d01debd39c..6c3646db94f1 100644 --- a/common_features.mk +++ b/common_features.mk @@ -61,7 +61,7 @@ endif ifeq ($(strip $(STENO_ENABLE)), yes) OPT_DEFS += -DSTENO_ENABLE - VIRTSER_ENABLE := yes + VIRTSER_ENABLE ?= yes SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c endif diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index e0b33ec861a6..57e279f2113e 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c @@ -73,7 +73,9 @@ static void steno_clear_state(void) { static void send_steno_state(uint8_t size, bool send_empty) { for (uint8_t i = 0; i < size; ++i) { if (chord[i] || send_empty) { +#ifdef VIRTSER_ENABLE virtser_send(chord[i]); +#endif } } } @@ -105,7 +107,9 @@ static void send_steno_chord(void) { switch (mode) { case STENO_MODE_BOLT: send_steno_state(BOLT_STATE_SIZE, false); +#ifdef VIRTSER_ENABLE virtser_send(0); // terminating byte +#endif break; case STENO_MODE_GEMINI: chord[0] |= 0x80; // Indicate start of packet diff --git a/quantum/process_keycode/process_steno.h b/quantum/process_keycode/process_steno.h index 367542372838..ed049eb13fec 100644 --- a/quantum/process_keycode/process_steno.h +++ b/quantum/process_keycode/process_steno.h @@ -18,10 +18,6 @@ #include "quantum.h" -#if defined(STENO_ENABLE) && !defined(VIRTSER_ENABLE) -# error "must have virtser enabled to use steno" -#endif - typedef enum { STENO_MODE_BOLT, STENO_MODE_GEMINI } steno_mode_t; bool process_steno(uint16_t keycode, keyrecord_t *record); From 6e710426a4cf7020b3649e5a1b43d37e607fbcc6 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 18 Jan 2020 01:56:33 +0000 Subject: [PATCH 068/331] Add docs for 'CUSTOM_MATRIX = lite' (#7906) * Add some docs to cover 'CUSTOM_MATRIX = lite' * Apply suggestions from code review Co-Authored-By: fauxpark * Add 'SRC += matrix.c' docs * Update docs/custom_matrix.md Co-Authored-By: fauxpark Co-authored-by: fauxpark --- docs/_summary.md | 1 + docs/custom_matrix.md | 108 +++++++++++++++++++++++++++++ docs/getting_started_make_guide.md | 2 +- 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 docs/custom_matrix.md diff --git a/docs/_summary.md b/docs/_summary.md index f6b03867fcbb..de81481382a5 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -105,6 +105,7 @@ * [I2C Driver](i2c_driver.md) * [WS2812 Driver](ws2812_driver.md) * [GPIO Controls](internals_gpio_control.md) + * [Custom Matrix](custom_matrix.md) * [Proton C Conversion](proton_c_conversion.md) * For a Deeper Understanding diff --git a/docs/custom_matrix.md b/docs/custom_matrix.md new file mode 100644 index 000000000000..cfa900a33d3a --- /dev/null +++ b/docs/custom_matrix.md @@ -0,0 +1,108 @@ +# Custom Matrix + +QMK provides a mechanism to supplement or replace the default matrix scanning routine with your own code. + +The reasons to use this feature include: + +* Extra hardware between the keyboard's switches and MCU pins + * I/O multiplexer + * Line decoder +* Irregular switch matrix + * Simultaneous use of `COL2ROW` and `ROW2COL` + +## Prerequisites + +Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`. + +Add a new file to your keyboard directory: +```text +keyboards//matrix.c +``` + +And to configure compilation for the new file, add this to your `rules.mk`: +```make +SRC += matrix.c +``` + +## 'lite' + +Provides a default implementation for various scanning functions, reducing the boilerplate code when implementing custom matrix. +To configure it, add this to your `rules.mk`: + +```make +CUSTOM_MATRIX = lite +``` + +And implement the following functions in a `matrix.c` file in your keyboard folder: + +```c +void matrix_init_custom(void) { + // TODO: initialize hardware here +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; + + // TODO: add matrix scanning routine here + + return matrix_has_changed; +} +``` + + +## Full Replacement + +When more control over the scanning routine is required, you can choose to implement the full scanning routine. +To configure it, add this to your rules.mk: + +```make +CUSTOM_MATRIX = yes +``` + +And implement the following functions in a `matrix.c` file in your keyboard folder: + +```c +matrix_row_t matrix_get_row(uint8_t row) { + // TODO: return the requested row data +} + +void matrix_print(void) { + // TODO: use print() to dump the current matrix state to console +} + +void matrix_init(void) { + // TODO: initialize hardware and global matrix state here + + // Unless hardware debouncing - Init the configured debounce routine + debounce_init(MATRIX_ROWS); + + // This *must* be called for correct keyboard behavior + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + bool matrix_has_changed = false; + + // TODO: add matrix scanning routine here + + // Unless hardware debouncing - use the configured debounce routine + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + // This *must* be called for correct keyboard behavior + matrix_scan_quantum(); + + return matrix_has_changed; +} +``` + +And also provide defaults for the following callbacks: + +```c +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__((weak)) void matrix_init_user(void) {} + +__attribute__((weak)) void matrix_scan_user(void) {} +``` diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index bf8d472d0e70..df82a001f049 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -135,7 +135,7 @@ As there is no standard split communication driver for ARM-based split keyboards `CUSTOM_MATRIX` -Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan(). +Lets you replace the default matrix scanning routine with your own code. For further details, see the [Custom Matrix page](custom_matrix.md). `DEBOUNCE_TYPE` From 3dd43d9cabce8f2b749cf439f9dae5123800d37f Mon Sep 17 00:00:00 2001 From: Hybrid65 <47335616+Hybrid65@users.noreply.github.com> Date: Fri, 17 Jan 2020 21:56:13 -0600 Subject: [PATCH 069/331] [Keyboard] Support for a Southpaw Keyboard KVT (#7892) * Support for KVT This branch adds support for the southpaw keyboard KVT * Updated readme.md and keymap.c * Update readme.md * Update keyboards/kv/revT/readme.md Co-Authored-By: fauxpark * Update keyboards/kv/revT/readme.md Co-Authored-By: fauxpark * Update keyboards/kv/revT/readme.md Co-Authored-By: fauxpark * Update keyboards/kv/revT/readme.md Co-Authored-By: fauxpark * Update keyboards/kv/revT/rules.mk Co-Authored-By: fauxpark * Update keyboards/kv/revT/rules.mk Co-Authored-By: fauxpark * Update keyboards/kv/revT/readme.md Co-Authored-By: fauxpark * Update keyboards/kv/revT/readme.md Co-Authored-By: fauxpark * Updated from suggestions from pull request * Update readme.md * Update rules.mk * Update rules.mk * Update rules.mk * Update rules.mk * Update rules.mk * Update revT.c * Update readme.md * changing T to lowercase * Change revT to revt * edit * Update keyboards/kv/revt/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update readme.md Co-authored-by: fauxpark Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/kv/revt/config.h | 39 +++++++++++++ keyboards/kv/revt/keymaps/default/keymap.c | 64 +++++++++++++++++++++ keyboards/kv/revt/keymaps/default/readme.md | 1 + keyboards/kv/revt/readme.md | 18 ++++++ keyboards/kv/revt/revt.c | 25 ++++++++ keyboards/kv/revt/revt.h | 36 ++++++++++++ keyboards/kv/revt/rules.mk | 22 +++++++ 7 files changed, 205 insertions(+) create mode 100644 keyboards/kv/revt/config.h create mode 100644 keyboards/kv/revt/keymaps/default/keymap.c create mode 100644 keyboards/kv/revt/keymaps/default/readme.md create mode 100644 keyboards/kv/revt/readme.md create mode 100644 keyboards/kv/revt/revt.c create mode 100644 keyboards/kv/revt/revt.h create mode 100644 keyboards/kv/revt/rules.mk diff --git a/keyboards/kv/revt/config.h b/keyboards/kv/revt/config.h new file mode 100644 index 000000000000..8aa5a1d310bd --- /dev/null +++ b/keyboards/kv/revt/config.h @@ -0,0 +1,39 @@ +/* Copyright 2020 Hybrid65 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6565 +#define PRODUCT_ID 0x6520 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Hybrid +#define PRODUCT KVT +#define DESCRIPTION SouthPaw Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 21 +#define MATRIX_ROW_PINS { A6, B13, B8, A0, A1, A2 } +#define MATRIX_COL_PINS { B7, B6, B5, B4, B3, B2, B14, B1, B15, B0, B9, B10, B11, B12, A14, A13, A4, A5, A7, A8, A15 } +#define UNUSED_PINS { } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/kv/revt/keymaps/default/keymap.c b/keyboards/kv/revt/keymaps/default/keymap.c new file mode 100644 index 000000000000..c1f9c6b5c0b4 --- /dev/null +++ b/keyboards/kv/revt/keymaps/default/keymap.c @@ -0,0 +1,64 @@ +/* Copyright 2020 Hybrid65 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + *.----------------------------------------------------------------------------------------------------------------. + *| |Esc| | F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F12|F12| |Pscr| Slck | Pause| + *| Nlck| / | * | - | | ~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| - | = |Backsp | | Inc| Home | PgUp| + *|----------------------------------------------------------------------------------------------------------------| + *| NP7 | NP8| NP9| | |Tab | Q| W| E| R| T| Y| U| I| O| P| [ | ] | \ | | Del| End | PgDw| + *|---------------| + |------------------------------------------------------------------------------------------| + *| NP4 | NP5| NP6| | |CAPS | A| S| D| F| G| H| J| K| L| ; | ' |Return | | + *|---------------|-----|------------------------------------------------------------------------------------------| + *| NP1 | NP2| NP3| | |Shift | Z| X| C| V| B| N| M| , | . | / | Shift | | Up | | + *|---------------|Enter|------------------------------------------------------------------------------------------| + *| 0 | Del| | |Ctrl|Win |Alt | Space |Alt | Win |FN |Ctrl | |Left| Down | Right| + *`----------------------------------------------------------------------------------------------------------------' + */ +[0] = LAYOUT_default( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_KP_4, KC_KP_5, KC_KP_6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_KP_0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), \ + +/* Keymap Fn Layer + *.-----------------------------------------------------------------------------------------------------------------. + *| | | |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| | | | | + *| | | | | | | | | | | | | | | | | | | | |Pl/Pa| Next| Vol+| + *|-----------------------------------------------------------------------------------------------------------------| + *| | | | | | |MB1|MBU|MB2|MWU| | | | | | | | | | | Stop| Prev| Vol-| + *|---------------| |-------------------------------------------------------------------------------------------| + *| | | | | | |MBL|MBD|MBR|MWD| | | |Rst| | | | | | + *|---------------|-----|-------------------------------------------------------------------------------------------| + *| | | | | | | | |Calc| | | |Mute| | | | | | | | + *|---------------| |-------------------------------------------------------------------------------------------| + *| | | | | | | | | | | | | | | | | + *'-----------------------------------------------------------------------------------------------------------------' + */ +[1] = LAYOUT_default( + _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_VOLU, \ +_______, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_U, KC_MS_BTN2, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPRV, KC_VOLD, \ +_______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, _______, RESET, _______, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ + +}; diff --git a/keyboards/kv/revt/keymaps/default/readme.md b/keyboards/kv/revt/keymaps/default/readme.md new file mode 100644 index 000000000000..63fb4e78dfba --- /dev/null +++ b/keyboards/kv/revt/keymaps/default/readme.md @@ -0,0 +1 @@ +# The Default keymap for KVT diff --git a/keyboards/kv/revt/readme.md b/keyboards/kv/revt/readme.md new file mode 100644 index 000000000000..e2f463b37d37 --- /dev/null +++ b/keyboards/kv/revt/readme.md @@ -0,0 +1,18 @@ +# KVT + +![KVT default layout](https://i.imgur.com/nPwxzdU.jpg) + +A open source southpaw keyboard. The Default layer is a standard 104 ANSI keyboard just the numpad is on the left. +There is a fn layer (its not in the layout image but in the keymap file) it adds media keys, f13-f24, and mouse keys. + +[More info on KVT github](https://github.com/Hybrid65/KVT) + +* Keyboard Maintainer: [Neil Feagan](https://github.com/Hybrid65) +* Hardware Supported: KVT, Proton C +* Hardware Availability: [List of vendors](https://qmk.fm/proton-c) + +Make example for this keyboard (after setting up your build environment): + + make kv/revt:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kv/revt/revt.c b/keyboards/kv/revt/revt.c new file mode 100644 index 000000000000..443a814015d6 --- /dev/null +++ b/keyboards/kv/revt/revt.c @@ -0,0 +1,25 @@ +/* Copyright 2020 Hybrid65 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "revt.h" + +void matrix_init_kb(void) { + // Turn status LED on + setPinOutput(C14); + writePinHigh(C14); + + matrix_init_user(); +} diff --git a/keyboards/kv/revt/revt.h b/keyboards/kv/revt/revt.h new file mode 100644 index 000000000000..ed98f4aabe99 --- /dev/null +++ b/keyboards/kv/revt/revt.h @@ -0,0 +1,36 @@ +/* Copyright 2020 Hybrid65 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_default( \ + K04, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J, K0K, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, \ + K30, K31, K32, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3H, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4H, K4J, \ + K50, K52, K54, K55, K56, K59, K5E, K5F, K5G, K5H, K5I, K5J, K5K \ +) \ +{ \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, KC_NO, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J, K0K, }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, }, \ + { K30, K31, K32, KC_NO, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, KC_NO, K3H, KC_NO, KC_NO, KC_NO, }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, KC_NO, KC_NO, K4H, KC_NO, K4J, KC_NO, }, \ + { K50, KC_NO, K52, KC_NO, K54, K55, K56, KC_NO, KC_NO, K59, KC_NO, KC_NO, KC_NO, KC_NO, K5E, K5F, K5G, K5H, K5I, K5J, K5K }, \ +} diff --git a/keyboards/kv/revt/rules.mk b/keyboards/kv/revt/rules.mk new file mode 100644 index 000000000000..3a09683c3786 --- /dev/null +++ b/keyboards/kv/revt/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 055e940f0653ab057f3b95053f1be44c44799664 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 18 Jan 2020 15:01:17 +1100 Subject: [PATCH 070/331] [Keyboard] Wasdat matrix cleanup (#7909) * Wasdat matrix cleanup * Use _custom functions * More deduping, and signature fix --- keyboards/maartenwut/wasdat/matrix.c | 246 ++++++--------------------- keyboards/maartenwut/wasdat/rules.mk | 2 +- 2 files changed, 54 insertions(+), 194 deletions(-) diff --git a/keyboards/maartenwut/wasdat/matrix.c b/keyboards/maartenwut/wasdat/matrix.c index 04d221971352..6dd79b53306c 100644 --- a/keyboards/maartenwut/wasdat/matrix.c +++ b/keyboards/maartenwut/wasdat/matrix.c @@ -17,34 +17,11 @@ along with this program. If not, see . #include #include #include "wait.h" -#include "print.h" -#include "debug.h" #include "util.h" #include "matrix.h" #include "debounce.h" #include "quantum.h" -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop16(matrix[i]) -# define ROW_SHIFTER ((uint16_t)1) -#elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop32(matrix[i]) -# define ROW_SHIFTER ((uint32_t)1) -#endif - -#ifdef MATRIX_MASKED - extern const matrix_row_t matrix_mask[]; -#endif - #ifdef DIRECT_PINS static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; #elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) @@ -52,150 +29,58 @@ static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; //static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif -/* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values -static matrix_row_t matrix[MATRIX_ROWS]; //debounced values - -__attribute__ ((weak)) -void matrix_init_quantum(void) { - matrix_init_kb(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} - -//Deprecated. -bool matrix_is_modified(void) -{ - if (debounce_active()) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1< Date: Fri, 17 Jan 2020 20:26:30 -0800 Subject: [PATCH 071/331] [Keyboard] Fix the order of underglow LEDs on ergodash/rev1 (#7791) On the v1.2 PCB the slave half leds go in reverse order compared to the master half. With this change, the leds are all in order from left to right, so animations like Knight Rider look like you'd expect. --- keyboards/ergodash/rev1/config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/ergodash/rev1/config.h b/keyboards/ergodash/rev1/config.h index 52f81e4ac9dc..7e84a3cab031 100644 --- a/keyboards/ergodash/rev1/config.h +++ b/keyboards/ergodash/rev1/config.h @@ -69,6 +69,10 @@ along with this program. If not, see . #define RGBLIGHT_SPLIT #define RGBLED_SPLIT { 12, 12 } // Number of LEDs +// The LEDs on the slave half go in reverse order +#define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, \ + 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12} + #define SOFT_SERIAL_PIN D0 #define SELECT_SOFT_SERIAL_SPEED 1 /*Sets the protocol speed when using serial communication*/ From 9b9a0f0bcb791e3652627a642f19f7cebd30955d Mon Sep 17 00:00:00 2001 From: "M. de Verteuil" Date: Sat, 18 Jan 2020 14:24:56 -0500 Subject: [PATCH 072/331] [Keymap] Added mverteuil keymaps and userspace common code (#7876) * Added mverteuil content - Userspace - Knops keymap - Preonic keymaps * Simplified and replaced some magic numbers * Convert tabs to spaces * Clean up LED handling, better animation, better layer init * Use get_highest_layer per @drashna suggestion * Reorder prototypes/reformat * Simplified/more expessive and fixed initial layer LED * Remove changes to git ignored files --- .../knops/mini/keymaps/mverteuil/config.h | 25 + .../knops/mini/keymaps/mverteuil/keymap.c | 306 +++++++++++ .../knops/mini/keymaps/mverteuil/readme.md | 1 + .../knops/mini/keymaps/mverteuil/rules.mk | 6 + keyboards/preonic/keymaps/mverteuil/config.h | 39 ++ keyboards/preonic/keymaps/mverteuil/keymap.c | 508 ++++++++++++++++++ keyboards/preonic/keymaps/mverteuil/readme.md | 2 + keyboards/preonic/keymaps/mverteuil/rules.mk | 5 + .../preonic/keymaps/mverteuil_2x2u/config.h | 39 ++ .../preonic/keymaps/mverteuil_2x2u/keymap.c | 413 ++++++++++++++ .../preonic/keymaps/mverteuil_2x2u/rules.mk | 6 + users/mverteuil/.gitignore | 1 + users/mverteuil/mverteuil.c | 2 + users/mverteuil/mverteuil.h | 21 + users/mverteuil/rules.mk | 1 + 15 files changed, 1375 insertions(+) create mode 100644 keyboards/knops/mini/keymaps/mverteuil/config.h create mode 100644 keyboards/knops/mini/keymaps/mverteuil/keymap.c create mode 100644 keyboards/knops/mini/keymaps/mverteuil/readme.md create mode 100644 keyboards/knops/mini/keymaps/mverteuil/rules.mk create mode 100644 keyboards/preonic/keymaps/mverteuil/config.h create mode 100644 keyboards/preonic/keymaps/mverteuil/keymap.c create mode 100644 keyboards/preonic/keymaps/mverteuil/readme.md create mode 100644 keyboards/preonic/keymaps/mverteuil/rules.mk create mode 100644 keyboards/preonic/keymaps/mverteuil_2x2u/config.h create mode 100644 keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c create mode 100644 keyboards/preonic/keymaps/mverteuil_2x2u/rules.mk create mode 100644 users/mverteuil/.gitignore create mode 100644 users/mverteuil/mverteuil.c create mode 100644 users/mverteuil/mverteuil.h create mode 100644 users/mverteuil/rules.mk diff --git a/keyboards/knops/mini/keymaps/mverteuil/config.h b/keyboards/knops/mini/keymaps/mverteuil/config.h new file mode 100644 index 000000000000..f72145c5a86e --- /dev/null +++ b/keyboards/knops/mini/keymaps/mverteuil/config.h @@ -0,0 +1,25 @@ +/* Copyright 2017 Pawnerd, 2019 Matthew de Verteuil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#if defined(AUDIO_ENABLE) + #define AUDIO_CLICKY + #define B5_AUDIO + #define C6_AUDIO + #define STARTUP_SONG SONG(ZELDA_PUZZLE) + #define GOODBYE_SONG SONG(COIN_SOUND) +#endif diff --git a/keyboards/knops/mini/keymaps/mverteuil/keymap.c b/keyboards/knops/mini/keymaps/mverteuil/keymap.c new file mode 100644 index 000000000000..5ecba0d5a1b0 --- /dev/null +++ b/keyboards/knops/mini/keymaps/mverteuil/keymap.c @@ -0,0 +1,306 @@ +#include QMK_KEYBOARD_H + +#define MAXIMIZ A(G(KC_F)) +#define NXTDSPL C(A(G(KC_RIGHT))) +#define BTMHALF A(G(KC_DOWN)) +#define TOPHALF A(G(KC_UP)) +#define NXTTHRD SS_LCTL(SS_LALT(SS_TAP(X_RIGHT))) +#define PRVTHRD C(A(KC_LEFT)) + +#define LT_MSTP LT(_LAYER_SELECT, KC_MSTP) +#define LT_ESC LT(_LAYER_SELECT, KC_ESC) +#define LT_NXTH TD(TD_SPEC) + +#define writeLayerLedState(layer) writePin(layer) +#define layer_led_0_off B6, false +#define layer_led_1_off D5, true +#define layer_led_2_off B0, false +#define layer_led_0_on B6, true +#define layer_led_1_on D5, false +#define layer_led_2_on B0, true + +void led_init_animation(void); +void led_set_layer(int layer); +void td_spectacles_finish(qk_tap_dance_state_t *state, void *user_data); +void td_spectacles_reset(qk_tap_dance_state_t *state, void *user_data); + +enum layer_led_mode { + ALL_LAYERS_OFF = -1, + LAYER_0, + LAYER_1, + LAYER_2, + LAYER_3, + LAYER_4, + LAYER_5, + ALL_LAYERS_ON, +}; + +enum mini_layers { + _MEDIA, + _COPYPASTA, + _SPECTACLES, + _LAYER_3, + _LAYER_4, + _LAYER_5, + _LAYER_SELECT, +}; + +enum { TD_SPEC = 0 }; + +qk_tap_dance_action_t tap_dance_actions[] = { + /* Tap once for spectacles macro, hold for layer toggle */ + [TD_SPEC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_spectacles_finish, td_spectacles_reset), +}; + +/* + * Key Layout + * _____ _____ _____ + * | | | | | | + * | 1 | | 2 | | 3 | + * |_____| |_____| |_____| + * _____ _____ _____ + * | | | | | | + * | 4 | | 5 | | 6 | + * |_____| |_____| |_____| + * + * Hold 1 and: + * - press 4, 5, or 6 to change layers + * - press 3 to reset, or press and hold 3 to enter DFU programming mode + * + * If something prevents you from using the above to reprogram, you can hold 3 while powering on as a fallback. + */ + +/* clang-format off */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * Layer 0 (Media Keys) + * _____ _____ _____ + * | | | | | | + * |Stop | |VolUp| |Play | + * |_____| |_____| |_____| + * _____ _____ _____ + * | | | | | | + * |Prev | |VolDn| |Next | + * |_____| |_____| |_____| + * + */ + [_MEDIA] = LAYOUT( + LT_MSTP, KC_VOLU, KC_MPLY, + KC_MPRV, KC_VOLD, KC_MNXT + ), + + /* + * Layer 1 (Copy and Paste Macros) + * _____ _____ _____ + * | | | | | | + * | ESC | |Ctl+Z| |CSf+Z| + * |_____| |_____| |_____| + * _____ _____ _____ + * | | | | | | + * |Ctl+X| |Ctl+C| |Ctl+V| + * |_____| |_____| |_____| + * + */ + + [_COPYPASTA] = LAYOUT( + LT_ESC, C(KC_Z), C(S(KC_Z)), + C(KC_X), C(KC_C), C(KC_V) + ), + + /* + * Layer 2 (Spectacles Macros) + * _LT&_ _____ _____ + * | Win | | Win | | Win | + * | Next| | Top | |Mximze + * |_1/3_| |_1/2_| |_____| + * _____ _____ _____ + * | Win | | Win | | Win | + * | Prev| | Bot | | Next| + * |_1/3_| |_1/2_| |Displ| + * + */ + [_SPECTACLES] = LAYOUT( + LT_NXTH,TOPHALF,MAXIMIZ, + PRVTHRD,BTMHALF,NXTDSPL + ), + + /* + * Layer 6 (Layer Select/Reset) + * _____ _____ _____ + * | | | | | | + * |None | |None | |Reset| + * |_____| |_____| |_____| + * _____ _____ _____ + * |Layer| |Layer| |Layer| + * | 0 | | 1 | | 2 | + * |_____| |_____| |_____| + * + * Layers 0, 1, and 2 have the top left button held to activate this layer. + * Then press the specific layer to switch to it. + * + */ + [_LAYER_SELECT] = LAYOUT( + _______, _______, RESET, + TO(_MEDIA),TO(_COPYPASTA),TO(_SPECTACLES) + ) +}; +/* clang-format on */ + +/* + * Knops Mini LED Numbers: + * _____ _____ _____ + * | | | | | | + * | 1 | | 2 | | 3 | <--- + * |_____| |_____| |_____| | These LEDs are called 'Switch LEDs' + * _____ _____ _____ |----- To turn on/off these leds, use: + * | | | | | | | set_switch_led( [1-6], [true/false]); + * | 4 | | 5 | | 6 | <--- + * |_____| |_____| |_____| + * + * < 0 > < 1 > < 2 > <--- These front-LEDs are called 'Layer LEDs' + * To turn on/off these leds, use: + * set_layer_led( [0-2], [true/false] ); + */ + +void set_switch_led(int ledId, bool state) { + switch (ledId) { + case 1: + writePin(D7, state); + break; + case 2: + writePin(readPin(B7) ? C6 : C7, state); + break; + case 3: + writePin(D4, state); + break; + case 4: + writePin(E6, state); + break; + case 5: + writePin(B4, state); + break; + case 6: + writePin(D6, state); + break; + } +} + +void set_layer_led(int layerLedMode) { + writeLayerLedState(layer_led_0_off); + writeLayerLedState(layer_led_1_off); + writeLayerLedState(layer_led_2_off); + + switch (layerLedMode) { + case ALL_LAYERS_OFF: + break; + case LAYER_0: + writeLayerLedState(layer_led_0_on); + break; + case LAYER_1: + writeLayerLedState(layer_led_1_on); + break; + case LAYER_2: + writeLayerLedState(layer_led_2_on); + break; + case LAYER_3: + writeLayerLedState(layer_led_0_on); + writeLayerLedState(layer_led_1_on); + break; + case LAYER_4: + writeLayerLedState(layer_led_1_on); + writeLayerLedState(layer_led_2_on); + break; + case LAYER_5: + writeLayerLedState(layer_led_0_on); + writeLayerLedState(layer_led_2_on); + break; + default: + writeLayerLedState(layer_led_0_on); + writeLayerLedState(layer_led_1_on); + writeLayerLedState(layer_led_2_on); + break; + } +} + +void led_init_animation() { + for (int i = ALL_LAYERS_OFF; i <= ALL_LAYERS_ON; i++) { + led_set_layer(i); + } + + led_set_layer(LAYER_0); +} + +/* + * This function led_set_layer gets called when you switch between layers. + * It allows you to turn on and off leds for each different layer and do + * other cool stuff. + */ +void led_set_layer(int layer) { + switch (layer) { + case ALL_LAYERS_OFF: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, false); + + case _LAYER_SELECT: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, true); + set_switch_led(5, true); + set_switch_led(6, true); + break; + + default: + set_switch_led(1, true); + set_switch_led(2, true); + set_switch_led(3, true); + set_switch_led(4, true); + set_switch_led(5, true); + set_switch_led(6, true); + break; + } + + set_layer_led(layer); +} + +/* + * Prepare all LED ports for output + */ +void led_init_ports() { + setPinOutput(D7); // Switch 1 LED + setPinOutput(C6); // Switch 2 LED Pin1 + setPinOutput(C7); // Switch 2 LED Pin2 + setPinOutput(D4); // Switch 3 LED + setPinOutput(E6); // Switch 4 LED + setPinOutput(B4); // Switch 5 LED + setPinOutput(D6); // Switch 6 LED + setPinOutput(D5); // Layer 0 LED + setPinOutput(B6); // Layer 1 LED + setPinOutput(B0); // Layer 2 LED +} + +// Runs on layer change, no matter where the change was initiated +layer_state_t layer_state_set_user(layer_state_t state) { + set_layer_led(get_highest_layer(state)); + led_set_layer(get_highest_layer(state)); + return state; +} + +void matrix_init_user(void) { + led_init_ports(); + led_init_animation(); +} + +void td_spectacles_finish(qk_tap_dance_state_t *state, void *user_data) { + if (state->pressed) { + layer_on(_LAYER_SELECT); + } else { + SEND_STRING(NXTTHRD); + } +} + +void td_spectacles_reset(qk_tap_dance_state_t *state, void *user_data) { layer_off(_LAYER_SELECT); } diff --git a/keyboards/knops/mini/keymaps/mverteuil/readme.md b/keyboards/knops/mini/keymaps/mverteuil/readme.md new file mode 100644 index 000000000000..46ea01583213 --- /dev/null +++ b/keyboards/knops/mini/keymaps/mverteuil/readme.md @@ -0,0 +1 @@ +# mverteuil does knops mini diff --git a/keyboards/knops/mini/keymaps/mverteuil/rules.mk b/keyboards/knops/mini/keymaps/mverteuil/rules.mk new file mode 100644 index 000000000000..91a53d56ac88 --- /dev/null +++ b/keyboards/knops/mini/keymaps/mverteuil/rules.mk @@ -0,0 +1,6 @@ +BACKLIGHT_ENABLE = no +CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = no +AUDIO_ENABLE = no + diff --git a/keyboards/preonic/keymaps/mverteuil/config.h b/keyboards/preonic/keymaps/mverteuil/config.h new file mode 100644 index 000000000000..51b278f6478b --- /dev/null +++ b/keyboards/preonic/keymaps/mverteuil/config.h @@ -0,0 +1,39 @@ +#ifdef AUDIO_ENABLE +# if __has_include("copyright.h") +# include "copyright.h" +# endif + +# define AUDIO_CLICKY_DELAY_DURATION 0 +# define AUDIO_CLICKY_FREQ_DEFAULT 100.0f +# define AUDIO_CLICKY_FREQ_MIN 61.0f +# define AUDIO_CLICKY_FREQ_RANDOMNESS 0.2f +# define DAC_SAMPLE_MAX 7000U +# define STARTUP_SONG SONG(WORKMAN_SOUND) +# define GOODBYE_SONG SONG(COIN_SOUND) +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/preonic/keymaps/mverteuil/keymap.c b/keyboards/preonic/keymaps/mverteuil/keymap.c new file mode 100644 index 000000000000..621d60be6af4 --- /dev/null +++ b/keyboards/preonic/keymaps/mverteuil/keymap.c @@ -0,0 +1,508 @@ +/* Copyright 2015-2017 Jack Humbert, 2019 Matthew de Verteuil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "muse.h" +#include "mverteuil.h" + +/* TapDance Aliases */ +#define TD_LBRK TD(TD_BRACKETS_LEFT) +#define TD_RBRK TD(TD_BRACKETS_RIGHT) +#define TD_CLES TD(TD_CONTROL_ESCAPE) +#define TD_NPFR TD(TD_NUMPAD_FUNCTIONROW) +#define TD_PLEQ TD(TD_PLUS_EQUALS) +#define TD_SCOL TD(TD_SEMICOLON_COLON) +#define TD_SLQU TD(TD_SLASH_QUESTION) +#define TD_SQDQ TD(TD_QUOTE_DOUBLEQUOTE) +#define TD_USMI TD(TD_UNDERSCORE_MINUS) + +/* Sentinel value for invalid tap dance exit */ +#define TAP_DANCE_NO_MATCH 64 + +enum preonic_layers { + _QWERTY, + _FUNCTIONROW, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + NUMPAD, + LOWER, + RAISE, + BACKLIT, +}; + +enum tapdance_keycodes { + TD_BRACKETS_LEFT, + TD_BRACKETS_RIGHT, + TD_CONTROL_ESCAPE, + TD_NUMPAD_FUNCTIONROW, + TD_PLUS_EQUALS, + TD_QUOTE_DOUBLEQUOTE, + TD_SEMICOLON_COLON, + TD_SLASH_QUESTION, + TD_UNDERSCORE_MINUS, +}; + +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_TAP, + DOUBLE_HOLD, + TRIPLE_TAP, + TRIPLE_HOLD, +} t_tap_state; + +typedef struct { + t_tap_state left_brackets; + t_tap_state numpad_funcrow; + t_tap_state right_brackets; +} t_tap; + +t_tap_state get_tapdance_state(qk_tap_dance_state_t *state); + +void td_numpad_funcrow_finished(qk_tap_dance_state_t *state, void *user_data); +void td_numpad_funcrow_reset(qk_tap_dance_state_t *state, void *user_data); +void td_brackets_left_finished(qk_tap_dance_state_t *state, void *user_data); +void td_brackets_left_reset(qk_tap_dance_state_t *state, void *user_data); +void td_brackets_right_finished(qk_tap_dance_state_t *state, void *user_data); +void td_brackets_right_reset(qk_tap_dance_state_t *state, void *user_data); + +/* Tap Dance Definitions */ +qk_tap_dance_action_t tap_dance_actions[] = { + /* Tap once for left parenthesis, twice for left bracket, thrice for left brace */ + [TD_BRACKETS_LEFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_brackets_left_finished, td_brackets_left_reset), + /* Tap once for right parenthesis, twice for right bracket, thrice for right brace */ + [TD_BRACKETS_RIGHT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_brackets_right_finished, td_brackets_right_reset), + /* Tap once for control, twice for escape */ + [TD_CONTROL_ESCAPE] = ACTION_TAP_DANCE_DOUBLE(KC_LCTRL, KC_ESCAPE), + /* Tap once for plus, twice for equals */ + [TD_PLUS_EQUALS] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQUAL), + /* Hold for numpad, tap twice to toggle function row, double hold for temporary function row */ + [TD_NUMPAD_FUNCTIONROW] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_numpad_funcrow_finished, td_numpad_funcrow_reset), + /* Tap once for single quote, twice for double quote */ + [TD_QUOTE_DOUBLEQUOTE] = ACTION_TAP_DANCE_DOUBLE(KC_QUOTE, KC_DOUBLE_QUOTE), + /* Tap once for semicolon, twice for colon */ + [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCOLON, KC_COLON), + /* Tap once for slash, twice for question mark */ + [TD_SLASH_QUESTION] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_QUESTION), + /* Tap once for underscore, twice for minus */ + [TD_UNDERSCORE_MINUS] = ACTION_TAP_DANCE_DOUBLE(KC_UNDERSCORE, KC_MINUS), +}; + +/* clang-format off */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | ! | @ | # | $ | % | ^ | & | * | _ - | + = | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | ' " | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |CtlEsc| A | S | D | F | G | H | J | K | L | ; : | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up | GUI | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NP FRw| Ctrl | Alt | GUI |Lower | Space |Raise | / ? | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_1x2uC ( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, TD_USMI, TD_PLEQ, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_SQDQ, + TD_CLES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD_SCOL, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RGUI, + TD_NPFR, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, TD_SLQU, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Function Row + * ,-----------------------------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCTIONROW] = LAYOUT_preonic_1x2uC ( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Numpad + * ,------+------+------+------+------+------|------+------+------+------+------+------. + * | | | | | | | | Tab | / | * |Bksp | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 7 | 8 | 9 | - | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 4 | 5 | 6 | + | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 |Enter | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 0 | . |Enter | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_1x2uC ( + _______, _______, _______, _______, _______, _______, _______, KC_TAB, KC_SLSH, KC_PAST, KC_BSPC, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Vol+ | | | | | | | | Play | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Prev | Vol- | Next | | | ? | _ | + | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | Mute | | | PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |RGBmod| | | | | | | \ | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_1x2uC ( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, + _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, KC_QUES, KC_UNDS, KC_PLUS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_BSLS, KC_HOME, KC_PGDN, KC_END +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | [ { (| ) } ]| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_1x2uC ( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, TD_LBRK, TD_RBRK, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |AudTog|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX| Debug| Reset| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |ClkTog|ClkFq-|ClkFq+|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|TermOn|TermOf| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |MusTog|Voice- Voice+|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|AGnorm|AGswap| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |MidTog|Rplain|Rbreat|Rrainb|Rswirl|Rsnake|Rkridr|Rxmas |Rgrad |RGBtst|XXXXXX|Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |RGBmod|RGBhue|RBGsat|RGBval| | | |XXXXXX|XXXXXX|XXXXXX|XXXXXX| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_1x2uC ( + AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, RESET, + CK_TOGG, CK_DOWN, CK_UP, XXXXXXX, RGB_SAI, RGB_SAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TERM_ON, TERM_OFF, + MU_TOG, MUV_DE, MUV_IN, XXXXXXX, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AG_NORM, AG_SWAP, + MI_TOG, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_SPI, KC_LSHIFT, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_TOG, _______, XXXXXXX,RGB_RMOD, RGB_SPD, RGB_MOD +) + +}; +/* clang-format on */ + +float s_audio_on[][2] = AUDIO_ON_SONG; +float s_layer_lower[][2] = LAYER_LOWER_SONG; +float s_layer_raise[][2] = LAYER_RAISE_SONG; + +void audio_on_user() { PLAY_SONG(s_audio_on); }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + PLAY_SONG(s_layer_lower); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + PLAY_SONG(s_layer_raise); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif +#ifdef __AVR__ + writePinLow(E6); +#endif + } else { + unregister_code(KC_RSFT); +#ifdef __AVR__ + writePinHigh(E6); +#endif + } + return false; + break; + } + return true; +}; + +/* Global TapDance State */ +static t_tap qk_tap_state = { + .left_brackets = 0, + .numpad_funcrow = 0, + .right_brackets = 0, +}; + +float s_functionrow_on[][2] = LAYER_FUNCROW_ON_SONG; +float s_functionrow_off[][2] = LAYER_FUNCROW_OFF_SONG; +float s_numpad_toggle[][2] = LAYER_NMPAD_SONG; + +t_tap_state get_tapdance_state(qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + return SINGLE_TAP; + } else { + return SINGLE_HOLD; + } + } else if (state->count == 2) { + if (state->interrupted || !state->pressed) { + return DOUBLE_TAP; + } else { + return DOUBLE_HOLD; + } + } else if (state->count == 3) { + if (state->interrupted || !state->pressed) { + return TRIPLE_TAP; + } else { + return TRIPLE_HOLD; + } + } else + return TAP_DANCE_NO_MATCH; +} + +void td_numpad_funcrow_finished(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_state.numpad_funcrow = get_tapdance_state(state); + switch (qk_tap_state.numpad_funcrow) { + case SINGLE_TAP ... SINGLE_HOLD: + layer_on(_NUMPAD); + PLAY_SONG(s_numpad_toggle); + break; + case DOUBLE_HOLD: + layer_on(_FUNCTIONROW); + break; + case DOUBLE_TAP: + if (layer_state_is(_FUNCTIONROW)) { + layer_off(_FUNCTIONROW); + PLAY_SONG(s_functionrow_off); + } else { + layer_on(_FUNCTIONROW); + PLAY_SONG(s_functionrow_on); + } + break; + default: + break; + } +} + +void td_numpad_funcrow_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (qk_tap_state.numpad_funcrow) { + case SINGLE_HOLD: + layer_off(_NUMPAD); + break; + case DOUBLE_HOLD: + layer_off(_FUNCTIONROW); + break; + default: + break; + } +} + +void td_brackets_left_finished(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_state.left_brackets = get_tapdance_state(state); + switch (qk_tap_state.left_brackets) { + case SINGLE_TAP: + register_code16(KC_LEFT_PAREN); + break; + case DOUBLE_TAP: + register_code(KC_LBRACKET); + break; + case TRIPLE_TAP: + register_code16(KC_LEFT_CURLY_BRACE); + break; + default: + break; + } +} + +void td_brackets_left_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (qk_tap_state.left_brackets) { + case SINGLE_TAP: + unregister_code16(KC_LEFT_PAREN); + break; + case DOUBLE_TAP: + unregister_code(KC_LBRACKET); + break; + case TRIPLE_TAP: + unregister_code16(KC_LEFT_CURLY_BRACE); + break; + default: + break; + } + qk_tap_state.left_brackets = 0; +} + +void td_brackets_right_finished(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_state.right_brackets = get_tapdance_state(state); + switch (qk_tap_state.right_brackets) { + case SINGLE_TAP: + register_code16(KC_RIGHT_PAREN); + break; + case DOUBLE_TAP: + register_code(KC_RBRACKET); + break; + case TRIPLE_TAP: + register_code16(KC_RIGHT_CURLY_BRACE); + break; + default: + break; + } +} + +void td_brackets_right_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (qk_tap_state.right_brackets) { + case SINGLE_TAP: + unregister_code16(KC_RIGHT_PAREN); + break; + case DOUBLE_TAP: + unregister_code(KC_RBRACKET); + break; + case TRIPLE_TAP: + unregister_code16(KC_RIGHT_CURLY_BRACE); + break; + default: + break; + } + qk_tap_state.right_brackets = 0; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo += 1; + } else { + muse_tempo -= 1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/mverteuil/readme.md b/keyboards/preonic/keymaps/mverteuil/readme.md new file mode 100644 index 000000000000..b21df3f8fa87 --- /dev/null +++ b/keyboards/preonic/keymaps/mverteuil/readme.md @@ -0,0 +1,2 @@ +# mverteuil does olkb preonic +## 1x2u: One 2u spacebar on bottom row diff --git a/keyboards/preonic/keymaps/mverteuil/rules.mk b/keyboards/preonic/keymaps/mverteuil/rules.mk new file mode 100644 index 000000000000..a29a3cad7981 --- /dev/null +++ b/keyboards/preonic/keymaps/mverteuil/rules.mk @@ -0,0 +1,5 @@ +SRC += muse.c + +AUDIO_ENABLE = yes +MIDI_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/config.h b/keyboards/preonic/keymaps/mverteuil_2x2u/config.h new file mode 100644 index 000000000000..51b278f6478b --- /dev/null +++ b/keyboards/preonic/keymaps/mverteuil_2x2u/config.h @@ -0,0 +1,39 @@ +#ifdef AUDIO_ENABLE +# if __has_include("copyright.h") +# include "copyright.h" +# endif + +# define AUDIO_CLICKY_DELAY_DURATION 0 +# define AUDIO_CLICKY_FREQ_DEFAULT 100.0f +# define AUDIO_CLICKY_FREQ_MIN 61.0f +# define AUDIO_CLICKY_FREQ_RANDOMNESS 0.2f +# define DAC_SAMPLE_MAX 7000U +# define STARTUP_SONG SONG(WORKMAN_SOUND) +# define GOODBYE_SONG SONG(COIN_SOUND) +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c new file mode 100644 index 000000000000..232b853114b7 --- /dev/null +++ b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c @@ -0,0 +1,413 @@ +/* Copyright 2015-2017 Jack Humbert, 2019 Matthew de Verteuil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "muse.h" +#include "mverteuil.h" + +/* Layer Aliases */ +#define LT_LWSP LT(_LOWER, KC_SPACE) +#define LT_RSRT LT(_RAISE, KC_ENTER) +#define MO_NUMS MO(_NUMPAD) + +/* Mod-Tap Aliases */ +#define MT_CESC CTL_T(KC_ESCAPE) + +/* TapDance Aliases */ +#define TD_LBRK TD(TD_BRACKETS_LEFT) +#define TD_RBRK TD(TD_BRACKETS_RIGHT) +#define TD_PLEQ TD(TD_PLUS_EQUALS) +#define TD_SCOL TD(TD_SEMICOLON_COLON) +#define TD_SLQU TD(TD_SLASH_QUESTION) +#define TD_SQDQ TD(TD_QUOTE_DOUBLEQUOTE) +#define TD_USMI TD(TD_UNDERSCORE_MINUS) + +/* Sentinel value for invalid tap dance exit */ +#define TAP_DANCE_NO_MATCH 64 + +enum preonic_layers { + _QWERTY, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + NUMPAD, + LOWER, + RAISE, + BACKLIT, +}; + +enum tapdance_keycodes { + TD_BRACKETS_LEFT, + TD_BRACKETS_RIGHT, + TD_CONTROL_ESCAPE, + TD_PLUS_EQUALS, + TD_QUOTE_DOUBLEQUOTE, + TD_SEMICOLON_COLON, + TD_SLASH_QUESTION, + TD_UNDERSCORE_MINUS, +}; + +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_TAP, + DOUBLE_HOLD, + TRIPLE_TAP, + TRIPLE_HOLD, +} t_tap_state; + +typedef struct { + t_tap_state left_brackets; + t_tap_state right_brackets; +} t_tap; + +t_tap_state get_tapdance_state(qk_tap_dance_state_t *state); + +void td_brackets_left_finished(qk_tap_dance_state_t *state, void *user_data); +void td_brackets_left_reset(qk_tap_dance_state_t *state, void *user_data); +void td_brackets_right_finished(qk_tap_dance_state_t *state, void *user_data); +void td_brackets_right_reset(qk_tap_dance_state_t *state, void *user_data); + +/* Tap Dance Definitions */ +qk_tap_dance_action_t tap_dance_actions[] = { + /* Tap once for left parenthesis, twice for left bracket, thrice for left brace */ + [TD_BRACKETS_LEFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_brackets_left_finished, td_brackets_left_reset), + /* Tap once for right parenthesis, twice for right bracket, thrice for right brace */ + [TD_BRACKETS_RIGHT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_brackets_right_finished, td_brackets_right_reset), + /* Tap once for plus, twice for equals */ + [TD_PLUS_EQUALS] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQUAL), + /* Tap once for single quote, twice for double quote */ + [TD_QUOTE_DOUBLEQUOTE] = ACTION_TAP_DANCE_DOUBLE(KC_QUOTE, KC_DOUBLE_QUOTE), + /* Tap once for semicolon, twice for colon */ + [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCOLON, KC_COLON), + /* Tap once for slash, twice for question mark */ + [TD_SLASH_QUESTION] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_QUESTION), + /* Tap once for underscore, twice for minus */ + [TD_UNDERSCORE_MINUS] = ACTION_TAP_DANCE_DOUBLE(KC_UNDERSCORE, KC_MINUS), +}; + +/* clang-format off */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. + * | ` | ! | @ | # | $ | % | ^ | & | * | _ - | + = | Bksp | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | ' " | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * |CtrlEsc| A | S | D | F | G | H | J | K | L | ; : | / ? | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | Shift | Z | X | C | V | B | N | M | , | . | ↑ | RShift| + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * |NumPad | Ctrl | Alt | GUI | Lower/Space | Raise/Enter | GUI | ← | ↓ | → | + * `-----------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_2x2u ( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, TD_USMI, TD_PLEQ, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_SQDQ, + MT_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD_SCOL, TD_SLQU, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + MO_NUMS, KC_LCTL, KC_LALT, KC_LGUI, LT_LWSP, LT_RSRT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Numpad + * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. + * | | | | | | | | Tab | / | * | Bksp | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | | | | | | | 7 | 8 | 9 | - | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | | | | | | | 4 | 5 | 6 | + | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | | | | | | | 1 | 2 | 3 | Enter | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | 0 | . | Enter | | + * `-----------------------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_2x2u ( + _______, _______, _______, _______, _______, _______, _______, KC_TAB, KC_SLSH, KC_PAST, KC_BSPC, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, + _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______ +), + +/* Lower + * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |Delete | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | | Vol+ | | | | | | | | MPlay | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | MPrev | Vol- | MNext | | | | | | | | \ | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | | | | | | | Mute | | | PgUp | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | Home | PgDn | End | + * `-----------------------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_2x2u ( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, + _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END +), + +/* Raise + * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | | | | | | | | [ { ( | ) } ] | | | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_2x2u ( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, TD_LBRK, TD_RBRK, _______, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. + * |AudTog |███████|███████|███████|███████|███████|███████|███████|███████|███████| Debug | Reset | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * |Clicky |ClkFrq-|ClkFrq+|███████|███████|███████|███████|███████|███████|███████|TermOn |TermOff| + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | Music |Voice- |Voice+ |███████|███████|███████|███████|███████|███████|███████|AGnorm |AGswap | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | MIDI |R plain|R breat|R rnbow|R swirl|R snake|R knigt|R xmas |R grade|RGBtest|███████| Shift | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * |RGBmode|RGBhue+|RGBsat+|RGBval+| | |███████|███████|███████|███████| + * `-----------------------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_2x2u ( + AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, RESET, + CK_TOGG, CK_DOWN, CK_UP, XXXXXXX, RGB_SAI, RGB_SAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TERM_ON, TERM_OFF, + MU_TOG, MUV_DE, MUV_IN, XXXXXXX, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AG_NORM, AG_SWAP, + MI_TOG, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_SPI, KC_LSHIFT, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX,RGB_RMOD, RGB_SPD, RGB_MOD +) + +}; +/* clang-format on */ + +float s_audio_on[][2] = AUDIO_ON_SONG; +float s_layer_lower[][2] = LAYER_LOWER_SONG; +float s_layer_raise[][2] = LAYER_RAISE_SONG; + +void audio_on_user() { PLAY_SONG(s_audio_on); }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + PLAY_SONG(s_layer_lower); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + PLAY_SONG(s_layer_raise); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif +#ifdef __AVR__ + writePinLow(E6); +#endif + } else { + unregister_code(KC_RSFT); +#ifdef __AVR__ + writePinHigh(E6); +#endif + } + return false; + break; + } + return true; +}; + +/* Global TapDance State */ +static t_tap qk_tap_state = { + .left_brackets = 0, + .right_brackets = 0, +}; + +float s_numpad_toggle[][2] = LAYER_NMPAD_SONG; + +t_tap_state get_tapdance_state(qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + return SINGLE_TAP; + } else { + return SINGLE_HOLD; + } + } else if (state->count == 2) { + if (state->interrupted || !state->pressed) { + return DOUBLE_TAP; + } else { + return DOUBLE_HOLD; + } + } else if (state->count == 3) { + if (state->interrupted || !state->pressed) { + return TRIPLE_TAP; + } else { + return TRIPLE_HOLD; + } + } else + return TAP_DANCE_NO_MATCH; +} + +void td_brackets_left_finished(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_state.left_brackets = get_tapdance_state(state); + switch (qk_tap_state.left_brackets) { + case SINGLE_TAP: + register_code16(KC_LEFT_PAREN); + break; + case DOUBLE_TAP: + register_code(KC_LBRACKET); + break; + case TRIPLE_TAP: + register_code16(KC_LEFT_CURLY_BRACE); + break; + default: + break; + } +} + +void td_brackets_left_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (qk_tap_state.left_brackets) { + case SINGLE_TAP: + unregister_code16(KC_LEFT_PAREN); + break; + case DOUBLE_TAP: + unregister_code(KC_LBRACKET); + break; + case TRIPLE_TAP: + unregister_code16(KC_LEFT_CURLY_BRACE); + break; + default: + break; + } + qk_tap_state.left_brackets = 0; +} + +void td_brackets_right_finished(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_state.right_brackets = get_tapdance_state(state); + switch (qk_tap_state.right_brackets) { + case SINGLE_TAP: + register_code16(KC_RIGHT_PAREN); + break; + case DOUBLE_TAP: + register_code(KC_RBRACKET); + break; + case TRIPLE_TAP: + register_code16(KC_RIGHT_CURLY_BRACE); + break; + default: + break; + } +} + +void td_brackets_right_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (qk_tap_state.right_brackets) { + case SINGLE_TAP: + unregister_code16(KC_RIGHT_PAREN); + break; + case DOUBLE_TAP: + unregister_code(KC_RBRACKET); + break; + case TRIPLE_TAP: + unregister_code16(KC_RIGHT_CURLY_BRACE); + break; + default: + break; + } + qk_tap_state.right_brackets = 0; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo += 1; + } else { + muse_tempo -= 1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/rules.mk b/keyboards/preonic/keymaps/mverteuil_2x2u/rules.mk new file mode 100644 index 000000000000..9e55d0aa67d5 --- /dev/null +++ b/keyboards/preonic/keymaps/mverteuil_2x2u/rules.mk @@ -0,0 +1,6 @@ +USER_NAME := mverteuil +SRC += muse.c + +AUDIO_ENABLE = yes +MIDI_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/users/mverteuil/.gitignore b/users/mverteuil/.gitignore new file mode 100644 index 000000000000..785f649dc6e2 --- /dev/null +++ b/users/mverteuil/.gitignore @@ -0,0 +1 @@ +copyright.h diff --git a/users/mverteuil/mverteuil.c b/users/mverteuil/mverteuil.c new file mode 100644 index 000000000000..a3afc417fa91 --- /dev/null +++ b/users/mverteuil/mverteuil.c @@ -0,0 +1,2 @@ +#include QMK_KEYBOARD_H +#include "mverteuil.h" diff --git a/users/mverteuil/mverteuil.h b/users/mverteuil/mverteuil.h new file mode 100644 index 000000000000..1119b75adf2e --- /dev/null +++ b/users/mverteuil/mverteuil.h @@ -0,0 +1,21 @@ +#if AUDIO_ENABLE +# if __has_include("copyright.h") +# include "copyright.h" +# endif + +# define LOWER_SOUND S__NOTE(_EF5), W__NOTE(_REST), Q__NOTE(_E4) +# define NUMPAD_SOUND S__NOTE(_DF5), S__NOTE(_REST), S__NOTE(_C6) +# define RAISE_SOUND S__NOTE(_E4), W__NOTE(_REST), Q__NOTE(_EF5) + +# define AUDIO_ON_SONG SONG(ZELDA_PUZZLE) +# define LAYER_FUNCROW_ON_SONG SONG(COLEMAK_SOUND) +# define LAYER_FUNCROW_OFF_SONG SONG(QWERTY_SOUND) +# define LAYER_NMPAD_SONG SONG(NUMPAD_SOUND) +# define LAYER_LOWER_SONG SONG(LOWER_SOUND) +# define LAYER_RAISE_SONG SONG(RAISE_SOUND) +#else +// No-op version of PLAY_SONG instead of many checks for AUDIO_ENABLED +# ifndef PLAY_SONG +# define PLAY_SONG(ARG) // ARG +# endif +#endif diff --git a/users/mverteuil/rules.mk b/users/mverteuil/rules.mk new file mode 100644 index 000000000000..bfc4b1ed1481 --- /dev/null +++ b/users/mverteuil/rules.mk @@ -0,0 +1 @@ +SRC += mverteuil.c From a1452db98abc2a95bac30a5f36d514748cc9851d Mon Sep 17 00:00:00 2001 From: Rob Haswell Date: Sat, 18 Jan 2020 20:11:33 +0000 Subject: [PATCH 073/331] Configuration values for starting HSV and speed (#7740) * Define default HSV and speed for RGB matrix. * Documentation for configuration values RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT and RGB_MATRIX_STARTUP_VAL. * Document RGB_MATRIX_STARTUP_SPD. * Preserve the ordering. --- docs/feature_rgb_matrix.md | 4 ++++ quantum/rgb_matrix.c | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 92fd62b32a1b..23082ef2a996 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -380,6 +380,10 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set +#define RGB_MATRIX_STARTUP_HUE 0 // Sets the default hue value, if none has been set +#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set +#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set ``` ## EEPROM storage diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 9bbeff833269..25ca44054dfd 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -95,6 +95,23 @@ const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; # endif #endif +#if !defined(RGB_MATRIX_STARTUP_HUE) +# define RGB_MATRIX_STARTUP_HUE 0 +#endif + +#if !defined(RGB_MATRIX_STARTUP_SAT) +# define RGB_MATRIX_STARTUP_SAT UINT8_MAX +#endif + +#if !defined(RGB_MATRIX_STARTUP_VAL) +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#endif + +#if !defined(RGB_MATRIX_STARTUP_SPD) +# define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2 +#endif + + bool g_suspend_state = false; rgb_config_t rgb_matrix_config; @@ -119,8 +136,8 @@ void eeconfig_update_rgb_matrix_default(void) { dprintf("eeconfig_update_rgb_matrix_default\n"); rgb_matrix_config.enable = 1; rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; - rgb_matrix_config.hsv = (HSV){0, UINT8_MAX, RGB_MATRIX_MAXIMUM_BRIGHTNESS}; - rgb_matrix_config.speed = UINT8_MAX / 2; + rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL}; + rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD; eeconfig_update_rgb_matrix(); } From ba628a28bcf09421739922d8eeef05e6ca9e9b6b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 19 Jan 2020 00:59:09 +0000 Subject: [PATCH 074/331] Move rgblight and backlight task to common location (#7733) --- quantum/quantum.c | 6 +----- tmk_core/common/keyboard.c | 10 ++++++++++ tmk_core/protocol/chibios/main.c | 3 --- tmk_core/protocol/lufa/lufa.c | 4 ---- tmk_core/protocol/vusb/main.c | 4 ---- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index bf159644ab6d..9cd50b11d8a4 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -634,12 +634,8 @@ void matrix_scan_quantum() { matrix_scan_combo(); #endif -#if defined(BACKLIGHT_ENABLE) -# if defined(LED_MATRIX_ENABLE) +#ifdef LED_MATRIX_ENABLE led_matrix_task(); -# elif defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS) - backlight_task(); -# endif #endif #ifdef RGB_MATRIX_ENABLE diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 794a9152fbeb..cb4e7637fa1a 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -335,6 +335,16 @@ void keyboard_task(void) { matrix_scan_perf_task(); #endif +#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) + rgblight_task(); +#endif + +#if defined(BACKLIGHT_ENABLE) +# if defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS) + backlight_task(); +# endif +#endif + #ifdef QWIIC_ENABLE qwiic_task(); #endif diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index c304f4d795c2..4b66bc5224b6 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -219,9 +219,6 @@ int main(void) { #endif #ifdef RAW_ENABLE raw_hid_task(); -#endif -#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) - rgblight_task(); #endif } } diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 8319b34e94dd..7d325a9ba2bc 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -998,10 +998,6 @@ int main(void) { MIDI_Device_USBTask(&USB_MIDI_Interface); #endif -#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) - rgblight_task(); -#endif - #ifdef MODULE_ADAFRUIT_BLE adafruit_ble_task(); #endif diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index e6291900e6c8..06dc8ae67fee 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -99,10 +99,6 @@ int main(void) { // To prevent failing to configure NOT scan keyboard during configuration if (usbConfiguration && usbInterruptIsReady()) { keyboard_task(); - -#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) - rgblight_task(); -#endif } vusb_transfer_keyboard(); } From eb5d267e637db4c2c639932b8c8176bf47dff78f Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 19 Jan 2020 14:11:57 +1100 Subject: [PATCH 075/331] Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards (#7915) * Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards * Define diode direction for failing boards * Matching parentheses * Put onekey diode directions in top level config --- keyboards/40percentclub/luddite/config.h | 2 ++ keyboards/7skb/rev1/config.h | 2 ++ keyboards/adkb96/rev1/config.h | 2 ++ keyboards/alps64/config.h | 2 ++ keyboards/blackplum/config.h | 2 ++ keyboards/db/db63/config.h | 2 ++ keyboards/ergodash/mini/config.h | 2 ++ keyboards/ergodash/rev1/config.h | 2 ++ keyboards/handwired/aek64/config.h | 2 ++ keyboards/handwired/dactyl_manuform/4x5/config.h | 2 ++ keyboards/handwired/dactyl_manuform/5x6/config.h | 2 ++ keyboards/handwired/dactyl_manuform/5x7/config.h | 2 ++ keyboards/handwired/dactyl_manuform/6x6/config.h | 2 ++ .../handwired/dactyl_manuform/dmote/62key/config.h | 2 ++ keyboards/handwired/dactyl_promicro/config.h | 2 ++ keyboards/handwired/hacked_motospeed/config.h | 4 ++-- keyboards/handwired/lovelive9/config.h | 2 ++ keyboards/handwired/nicekey/config.h | 2 ++ keyboards/handwired/onekey/config.h | 2 ++ keyboards/handwired/splittest/config.h | 2 ++ keyboards/handwired/wulkan/config.h | 2 ++ keyboards/keebio/bfo9000/config.h | 2 ++ keyboards/keebio/fourier/config.h | 2 ++ keyboards/keebio/levinson/rev1/config.h | 2 ++ keyboards/keebio/levinson/rev2/config.h | 2 ++ keyboards/keebio/levinson/rev3/config.h | 2 ++ keyboards/keebio/quefrency/rev1/config.h | 2 ++ keyboards/keebio/wavelet/config.h | 2 ++ keyboards/lets_split/rev1/config.h | 2 ++ keyboards/lets_split/rev2/config.h | 2 ++ keyboards/lets_split/sockets/config.h | 2 ++ keyboards/nafuda/config.h | 2 ++ keyboards/naked48/rev1/config.h | 2 ++ keyboards/naked60/rev1/config.h | 2 ++ keyboards/naked64/rev1/config.h | 2 ++ keyboards/rgbkb/sol/config.h | 2 ++ keyboards/rgbkb/zygomorph/rev1/config.h | 2 ++ keyboards/runner3680/3x6/config.h | 2 ++ keyboards/runner3680/3x7/config.h | 2 ++ keyboards/runner3680/3x8/config.h | 2 ++ keyboards/runner3680/4x6/config.h | 2 ++ keyboards/runner3680/4x7/config.h | 2 ++ keyboards/runner3680/4x8/config.h | 2 ++ keyboards/runner3680/5x6/config.h | 2 ++ keyboards/runner3680/5x7/config.h | 2 ++ keyboards/runner3680/5x8/config.h | 2 ++ keyboards/setta21/rev1/config.h | 2 ++ keyboards/signum/3_0/elitec/config.h | 2 ++ keyboards/tanuki/config.h | 2 ++ keyboards/uzu42/rev1/config.h | 2 ++ keyboards/vitamins_included/rev1/config.h | 2 ++ keyboards/vitamins_included/rev2/config.h | 2 ++ quantum/matrix.c | 10 ++++++++-- quantum/split_common/matrix.c | 10 ++++++++-- 54 files changed, 120 insertions(+), 6 deletions(-) diff --git a/keyboards/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h index 36bda061439f..005cb7a705e8 100644 --- a/keyboards/40percentclub/luddite/config.h +++ b/keyboards/40percentclub/luddite/config.h @@ -19,6 +19,8 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* number of backlight levels */ #define BACKLIGHT_PIN B5 #ifdef BACKLIGHT_PIN diff --git a/keyboards/7skb/rev1/config.h b/keyboards/7skb/rev1/config.h index 01b1ef4a1cc3..b1096c4d69b3 100644 --- a/keyboards/7skb/rev1/config.h +++ b/keyboards/7skb/rev1/config.h @@ -34,6 +34,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/adkb96/rev1/config.h b/keyboards/adkb96/rev1/config.h index cff135c261a9..42685123b175 100644 --- a/keyboards/adkb96/rev1/config.h +++ b/keyboards/adkb96/rev1/config.h @@ -33,6 +33,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } +#define DIODE_DIRECTION COL2ROW + #define SOFT_SERIAL_PIN D0 /* define tapping term */ diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index cc7eada11a15..237dfbbe770f 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -35,6 +35,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/blackplum/config.h b/keyboards/blackplum/config.h index 0fd7e21cb6a1..256603744e21 100644 --- a/keyboards/blackplum/config.h +++ b/keyboards/blackplum/config.h @@ -19,6 +19,8 @@ #define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/db/db63/config.h b/keyboards/db/db63/config.h index 468e0f8a97a9..488409e3a606 100644 --- a/keyboards/db/db63/config.h +++ b/keyboards/db/db63/config.h @@ -32,6 +32,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + #define RGBLED_NUM 18 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergodash/mini/config.h b/keyboards/ergodash/mini/config.h index 2fa51dcc126c..1a0ecc0a7e93 100644 --- a/keyboards/ergodash/mini/config.h +++ b/keyboards/ergodash/mini/config.h @@ -38,6 +38,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/ergodash/rev1/config.h b/keyboards/ergodash/rev1/config.h index 7e84a3cab031..0e89ca3402af 100644 --- a/keyboards/ergodash/rev1/config.h +++ b/keyboards/ergodash/rev1/config.h @@ -38,6 +38,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/handwired/aek64/config.h b/keyboards/handwired/aek64/config.h index 7d235358c3dc..a072d562a783 100644 --- a/keyboards/handwired/aek64/config.h +++ b/keyboards/handwired/aek64/config.h @@ -39,6 +39,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/handwired/dactyl_manuform/4x5/config.h b/keyboards/handwired/dactyl_manuform/4x5/config.h index 1f24c9aca627..698418fb73c9 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . // #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/dactyl_manuform/5x6/config.h b/keyboards/handwired/dactyl_manuform/5x6/config.h index 413039449f8c..fd0c23961c12 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/config.h @@ -32,6 +32,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + // WS2812 RGB LED strip input and number of LEDs #define RGB_DI_PIN D3 #define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/5x7/config.h b/keyboards/handwired/dactyl_manuform/5x7/config.h index 43583749874c..bf56d0825126 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/config.h @@ -32,6 +32,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + // WS2812 RGB LED strip input and number of LEDs #define RGB_DI_PIN D3 #define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/6x6/config.h b/keyboards/handwired/dactyl_manuform/6x6/config.h index 9bc501c5e906..522e98b6873d 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/config.h +++ b/keyboards/handwired/dactyl_manuform/6x6/config.h @@ -32,6 +32,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + // WS2812 RGB LED strip input and number of LEDs #define RGB_DI_PIN D3 #define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h index 7db3ceb753be..d315cb180dd2 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h @@ -37,6 +37,8 @@ #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define DIODE_DIRECTION COL2ROW + // WS2812 RGB LED, normally used to indicate keyboard state: #define RGBLIGHT_EFFECT_KNIGHT #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 diff --git a/keyboards/handwired/dactyl_promicro/config.h b/keyboards/handwired/dactyl_promicro/config.h index 3c0b541d1a02..c57e766243f9 100644 --- a/keyboards/handwired/dactyl_promicro/config.h +++ b/keyboards/handwired/dactyl_promicro/config.h @@ -30,6 +30,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3060 diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index d4bf11f235cd..0035a5e282b3 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define UNUSED_PINS /* COL2ROW, ROW2COL*/ -//#define DIODE_DIRECTION COL2ROW +#define DIODE_DIRECTION COL2ROW /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. @@ -245,4 +245,4 @@ along with this program. If not, see . /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/lovelive9/config.h b/keyboards/handwired/lovelive9/config.h index c11a25df6006..f1f6f69c55e0 100644 --- a/keyboards/handwired/lovelive9/config.h +++ b/keyboards/handwired/lovelive9/config.h @@ -19,6 +19,8 @@ #define MATRIX_ROW_PINS { NO_PIN } #define MATRIX_COL_PINS { B4, B6, B2, D7, B1, F7, F6, F5, F4 } +#define DIODE_DIRECTION COL2ROW + #define UNUSED_PINS /* ws2812 RGB LED */ diff --git a/keyboards/handwired/nicekey/config.h b/keyboards/handwired/nicekey/config.h index 4af56cc52899..9c1b18117bf8 100644 --- a/keyboards/handwired/nicekey/config.h +++ b/keyboards/handwired/nicekey/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B6 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index 64a447481d2b..652a99cab646 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -29,6 +29,8 @@ along with this program. If not, see . #define MATRIX_ROWS 1 #define MATRIX_COLS 1 +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/splittest/config.h b/keyboards/handwired/splittest/config.h index 56574f75296a..3ff8547fc93f 100644 --- a/keyboards/handwired/splittest/config.h +++ b/keyboards/handwired/splittest/config.h @@ -33,6 +33,8 @@ along with this program. If not, see . #define MATRIX_ROWS 2 #define MATRIX_COLS 1 +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/wulkan/config.h b/keyboards/handwired/wulkan/config.h index 4a9cbada7e16..628206535055 100644 --- a/keyboards/handwired/wulkan/config.h +++ b/keyboards/handwired/wulkan/config.h @@ -17,6 +17,8 @@ #define MATRIX_ROW_PINS { B8, A0, A1, A2 } #define MATRIX_COL_PINS { B13, B14, B15, B9, B7, B6, B5, B4, B3, B2, B1, B0 } +#define DIODE_DIRECTION COL2ROW + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h index b45ec9c2fafe..0b279bc34368 100644 --- a/keyboards/keebio/bfo9000/config.h +++ b/keyboards/keebio/bfo9000/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D3, D2, D4, C6, D7, E6 } #define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/fourier/config.h b/keyboards/keebio/fourier/config.h index 9ddc53a0c8e9..a0e85a3b1e78 100644 --- a/keyboards/keebio/fourier/config.h +++ b/keyboards/keebio/fourier/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, D7, E6, B4 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + #define QMK_ESC_OUTPUT F5 #define QMK_ESC_INPUT F4 #define QMK_LED B0 diff --git a/keyboards/keebio/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h index a34c8bdcc557..5b23f18c1d36 100644 --- a/keyboards/keebio/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h index 9d694712538c..e8e7294dd867 100644 --- a/keyboards/keebio/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, D7, E6, B4 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/levinson/rev3/config.h b/keyboards/keebio/levinson/rev3/config.h index 3e45b9d422b4..da5f4e74173f 100644 --- a/keyboards/keebio/levinson/rev3/config.h +++ b/keyboards/keebio/levinson/rev3/config.h @@ -40,6 +40,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT { F4, F7, D3, B5, B4, E6 } #define SPLIT_HAND_PIN D2 +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index 1d726a0fc320..1e3be6347ac8 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -38,6 +38,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS_RIGHT { F5, F6, F7, B1, B3, B2, B6, C6 } #define SPLIT_HAND_PIN D2 +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/wavelet/config.h b/keyboards/keebio/wavelet/config.h index 6f67fdbaf536..71366ec24b7f 100644 --- a/keyboards/keebio/wavelet/config.h +++ b/keyboards/keebio/wavelet/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F7, B3, D2, D1, D4, D7 } #define MATRIX_COL_PINS { F6, B1, B2, B6, B4, E6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index c6e7f6479ec5..d75343735407 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } // #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 2481ce0413eb..0977d7c6701c 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h index eb8092a8f4ea..f6ecb70947c0 100644 --- a/keyboards/lets_split/sockets/config.h +++ b/keyboards/lets_split/sockets/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6} // #define MATRIX_COL_PINS { B6, B2, B3, D7, F7, F4} //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/nafuda/config.h b/keyboards/nafuda/config.h index 3db4401d49fd..be3348668dcf 100644 --- a/keyboards/nafuda/config.h +++ b/keyboards/nafuda/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D1, D0, D4 } #define MATRIX_COL_PINS { F4, F5, F6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/naked48/rev1/config.h b/keyboards/naked48/rev1/config.h index d770fefb498f..21f7aa55ecb4 100644 --- a/keyboards/naked48/rev1/config.h +++ b/keyboards/naked48/rev1/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6 } #define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5, B2, B2 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/naked60/rev1/config.h b/keyboards/naked60/rev1/config.h index ac0c0ab2fca1..b082e1227f29 100644 --- a/keyboards/naked60/rev1/config.h +++ b/keyboards/naked60/rev1/config.h @@ -41,6 +41,8 @@ along with this program. If not, see . //#define MATRIX_ROW_PINS_RIGHT { D1, D0, D4, C6, B6 } //#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, D7, E6, B4, B5, D3 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/naked64/rev1/config.h b/keyboards/naked64/rev1/config.h index 2e48edbc0339..d9aff6be13e9 100644 --- a/keyboards/naked64/rev1/config.h +++ b/keyboards/naked64/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B4, B5, B2, B2 } #define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/rgbkb/sol/config.h b/keyboards/rgbkb/sol/config.h index 9b136db05842..f42783f719d9 100644 --- a/keyboards/rgbkb/sol/config.h +++ b/keyboards/rgbkb/sol/config.h @@ -35,6 +35,8 @@ along with this program. If not, see . #define MATRIX_COLS 7 #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/rgbkb/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h index 6e55a6a5f5dd..246e391ac175 100644 --- a/keyboards/rgbkb/zygomorph/rev1/config.h +++ b/keyboards/rgbkb/zygomorph/rev1/config.h @@ -38,6 +38,8 @@ along with this program. If not, see . #define MATRIX_COLS 6 #define MATRIX_COL_PINS { F4, F6, C7, C6, B6, D4 } +#define DIODE_DIRECTION COL2ROW + #define SOFT_SERIAL_PIN D3 #define ENCODERS_PAD_A { D2 } diff --git a/keyboards/runner3680/3x6/config.h b/keyboards/runner3680/3x6/config.h index d3f3605f55e5..fd462afb2468 100644 --- a/keyboards/runner3680/3x6/config.h +++ b/keyboards/runner3680/3x6/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/3x7/config.h b/keyboards/runner3680/3x7/config.h index e0e6ae8e06b5..e6acb3735dc0 100644 --- a/keyboards/runner3680/3x7/config.h +++ b/keyboards/runner3680/3x7/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/3x8/config.h b/keyboards/runner3680/3x8/config.h index 0d4e3296a122..257f63a8f45a 100644 --- a/keyboards/runner3680/3x8/config.h +++ b/keyboards/runner3680/3x8/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/4x6/config.h b/keyboards/runner3680/4x6/config.h index 08838d1b66c9..06b9bc4dfc53 100644 --- a/keyboards/runner3680/4x6/config.h +++ b/keyboards/runner3680/4x6/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/4x7/config.h b/keyboards/runner3680/4x7/config.h index f33f8f9f2b76..8bc2da4cdc67 100644 --- a/keyboards/runner3680/4x7/config.h +++ b/keyboards/runner3680/4x7/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/4x8/config.h b/keyboards/runner3680/4x8/config.h index d85ebb29cf5e..9f9adfa9d21b 100644 --- a/keyboards/runner3680/4x8/config.h +++ b/keyboards/runner3680/4x8/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/5x6/config.h b/keyboards/runner3680/5x6/config.h index ae3853a8e8a4..3ae72dcfd9e3 100644 --- a/keyboards/runner3680/5x6/config.h +++ b/keyboards/runner3680/5x6/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/5x7/config.h b/keyboards/runner3680/5x7/config.h index 1d56608e6d61..004f84edd684 100644 --- a/keyboards/runner3680/5x7/config.h +++ b/keyboards/runner3680/5x7/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/5x8/config.h b/keyboards/runner3680/5x8/config.h index 5349fa06aaf9..11b7d647ed72 100644 --- a/keyboards/runner3680/5x8/config.h +++ b/keyboards/runner3680/5x8/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/setta21/rev1/config.h b/keyboards/setta21/rev1/config.h index 57451a7e30dc..c6c1357d0a96 100644 --- a/keyboards/setta21/rev1/config.h +++ b/keyboards/setta21/rev1/config.h @@ -34,6 +34,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/signum/3_0/elitec/config.h b/keyboards/signum/3_0/elitec/config.h index 1e045e2e10f3..eeafb7236098 100644 --- a/keyboards/signum/3_0/elitec/config.h +++ b/keyboards/signum/3_0/elitec/config.h @@ -22,6 +22,8 @@ #define MATRIX_COL_PINS { B4, D7, D0, E6, D4, F6, F4, F7, B1, B3, C6, B2 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h index 1439ed43e8c1..2dcd7b27d641 100644 --- a/keyboards/tanuki/config.h +++ b/keyboards/tanuki/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F7 , B1 , D4 , D0 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/uzu42/rev1/config.h b/keyboards/uzu42/rev1/config.h index 8f86d22bf15d..13b278970ffa 100644 --- a/keyboards/uzu42/rev1/config.h +++ b/keyboards/uzu42/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h index c4881db01b31..88b43ffc3325 100644 --- a/keyboards/vitamins_included/rev1/config.h +++ b/keyboards/vitamins_included/rev1/config.h @@ -38,6 +38,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F5, F6, C7, F7 } #define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6} +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/vitamins_included/rev2/config.h b/keyboards/vitamins_included/rev2/config.h index 0aa0e7063f9b..d0f9e64003e9 100644 --- a/keyboards/vitamins_included/rev2/config.h +++ b/keyboards/vitamins_included/rev2/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F5, F6, C7, F7 } #define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6} +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/quantum/matrix.c b/quantum/matrix.c index 1675f2477b2d..6bd604bb79c6 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -62,7 +62,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -#elif (DIODE_DIRECTION == COL2ROW) +#elif defined(DIODE_DIRECTION) +# if (DIODE_DIRECTION == COL2ROW) static void select_row(uint8_t row) { setPinOutput(row_pins[row]); @@ -110,7 +111,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -#elif (DIODE_DIRECTION == ROW2COL) +# elif (DIODE_DIRECTION == ROW2COL) static void select_col(uint8_t col) { setPinOutput(col_pins[col]); @@ -165,6 +166,11 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) return matrix_changed; } +# else +# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! +# endif +#else +# error DIODE_DIRECTION is not defined! #endif void matrix_init(void) { diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index ed1ff5acf398..454ea59c3b1e 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -79,7 +79,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -#elif (DIODE_DIRECTION == COL2ROW) +#elif defined(DIODE_DIRECTION) +# if (DIODE_DIRECTION == COL2ROW) static void select_row(uint8_t row) { setPinOutput(row_pins[row]); @@ -124,7 +125,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -#elif (DIODE_DIRECTION == ROW2COL) +# elif (DIODE_DIRECTION == ROW2COL) static void select_col(uint8_t col) { setPinOutput(col_pins[col]); @@ -179,6 +180,11 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) return matrix_changed; } +# else +# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! +# endif +#else +# error DIODE_DIRECTION is not defined! #endif void matrix_init(void) { From f5209aa4e941c7f3a942ef4a7e256ab432ec98ce Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 19 Jan 2020 18:00:32 +1100 Subject: [PATCH 076/331] Remove custom backlight code for PS2AVRGB boards (#7775) * Remove custom backlight code for PS2AVRGB boards * Remove custom driver setting * BACKLIGHT_BREATHING goes in config.h, not here * Don't need to include backlight.c again here either * Turn on backlight for Canoe * Disable console on a few boards due to oversize --- keyboards/ares/ares.c | 34 ++- keyboards/ares/config.h | 3 +- keyboards/ares/rules.mk | 2 +- keyboards/bfake/bfake.c | 35 +-- keyboards/bfake/config.h | 8 +- keyboards/bfake/rules.mk | 2 +- keyboards/donutcables/budget96/budget96.c | 32 +-- keyboards/donutcables/budget96/config.h | 3 +- keyboards/donutcables/budget96/rules.mk | 2 +- keyboards/eve/meteor/config.h | 3 +- keyboards/eve/meteor/meteor.c | 33 +-- keyboards/exclusive/e6v2/le_bmc/config.h | 3 + keyboards/exclusive/e6v2/le_bmc/le_bmc.c | 33 +-- keyboards/exclusive/e6v2/le_bmc/rules.mk | 4 +- keyboards/exclusive/e6v2/oe_bmc/config.h | 3 + keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c | 33 +-- keyboards/exclusive/e6v2/oe_bmc/rules.mk | 4 +- keyboards/exent/config.h | 3 +- keyboards/exent/exent.c | 23 ++ keyboards/exent/rules.mk | 2 +- keyboards/facew/config.h | 3 +- keyboards/facew/facew.c | 37 ++- keyboards/facew/rules.mk | 2 +- keyboards/ft/mars80/config.h | 3 +- keyboards/ft/mars80/mars80.c | 32 +-- keyboards/gray_studio/hb85/hb85.c | 31 +-- keyboards/gray_studio/hb85/rules.mk | 2 +- keyboards/jc65/v32a/config.h | 4 +- keyboards/jc65/v32a/v32a.c | 37 +-- keyboards/jj40/config.h | 2 +- keyboards/jj4x4/config.h | 2 +- keyboards/jj50/backlight.c | 213 ----------------- keyboards/jj50/backlight_custom.h | 15 -- keyboards/jj50/breathing_custom.h | 140 ------------ keyboards/jj50/config.h | 2 +- keyboards/jj50/jj50.c | 17 -- keyboards/jj50/rules.mk | 2 - keyboards/kbdfans/kbdpad/mk1/mk1.c | 19 +- keyboards/mechmini/v1/config.h | 8 +- keyboards/mechmini/v1/rules.mk | 2 +- keyboards/mehkee96/config.h | 3 + keyboards/mehkee96/mehkee96.c | 20 ++ keyboards/mehkee96/rules.mk | 4 +- keyboards/panc60/config.h | 4 +- keyboards/panc60/panc60.c | 35 +-- keyboards/pearl/config.h | 3 +- keyboards/pearl/pearl.c | 31 +-- keyboards/percent/canoe/canoe.c | 37 +-- keyboards/percent/canoe/config.h | 4 +- keyboards/percent/canoe/rules.mk | 2 +- keyboards/percent/skog/backlight.c | 211 ----------------- keyboards/percent/skog/backlight_custom.h | 13 -- keyboards/percent/skog/breathing_custom.h | 140 ------------ keyboards/percent/skog/config.h | 6 +- keyboards/percent/skog/rules.mk | 4 - keyboards/percent/skog/skog.c | 26 ++- keyboards/percent/skog_lite/config.h | 4 +- keyboards/percent/skog_lite/skog_lite.c | 32 +-- keyboards/singa/config.h | 4 +- keyboards/singa/rules.mk | 2 +- keyboards/singa/singa.c | 33 +-- keyboards/tgr/alice/alice.c | 23 ++ keyboards/tgr/alice/config.h | 3 + keyboards/tgr/alice/rules.mk | 2 +- keyboards/tgr/jane/config.h | 3 +- keyboards/tgr/jane/jane.c | 32 +-- keyboards/unikorn/config.h | 4 +- keyboards/unikorn/unikorn.c | 33 +-- keyboards/winkeyless/bface/bface.c | 31 +-- keyboards/winkeyless/bface/config.h | 9 +- keyboards/winkeyless/bface/rules.mk | 2 - keyboards/winkeyless/bmini/bmini.c | 23 ++ keyboards/winkeyless/bmini/config.h | 8 +- keyboards/winkeyless/bmini/rules.mk | 2 +- keyboards/winkeyless/bminiex/backlight.c | 211 ----------------- .../winkeyless/bminiex/backlight_custom.h | 13 -- keyboards/winkeyless/bminiex/bminiex.c | 29 ++- .../winkeyless/bminiex/breathing_custom.h | 140 ------------ keyboards/winkeyless/bminiex/config.h | 1 + keyboards/winkeyless/bminiex/rules.mk | 3 - keyboards/ymd75/backlight.c | 216 ------------------ keyboards/ymd75/backlight_custom.h | 15 -- keyboards/ymd75/breathing_custom.h | 140 ------------ keyboards/ymd75/config.h | 6 +- keyboards/ymd75/rules.mk | 6 - keyboards/ymd75/ymd75.c | 23 +- keyboards/ymd96/backlight.c | 214 ----------------- keyboards/ymd96/backlight_custom.h | 15 -- keyboards/ymd96/breathing_custom.h | 140 ------------ keyboards/ymd96/config.h | 8 +- keyboards/ymd96/rules.mk | 3 - keyboards/ymd96/ymd96.c | 26 ++- keyboards/ymdk/bface/bface.c | 27 +-- keyboards/ymdk/bface/config.h | 2 - keyboards/ymdk/bface/rules.mk | 3 - keyboards/ymdk_np21/backlight.c | 213 ----------------- keyboards/ymdk_np21/backlight_custom.h | 15 -- keyboards/ymdk_np21/breathing_custom.h | 140 ------------ keyboards/ymdk_np21/config.h | 10 +- keyboards/ymdk_np21/rules.mk | 3 - keyboards/ymdk_np21/ymdk_np21.c | 23 +- 101 files changed, 474 insertions(+), 2802 deletions(-) delete mode 100644 keyboards/jj50/backlight.c delete mode 100644 keyboards/jj50/backlight_custom.h delete mode 100644 keyboards/jj50/breathing_custom.h delete mode 100644 keyboards/percent/skog/backlight.c delete mode 100644 keyboards/percent/skog/backlight_custom.h delete mode 100644 keyboards/percent/skog/breathing_custom.h delete mode 100644 keyboards/winkeyless/bminiex/backlight.c delete mode 100644 keyboards/winkeyless/bminiex/backlight_custom.h delete mode 100644 keyboards/winkeyless/bminiex/breathing_custom.h delete mode 100644 keyboards/ymd75/backlight.c delete mode 100644 keyboards/ymd75/backlight_custom.h delete mode 100644 keyboards/ymd75/breathing_custom.h delete mode 100644 keyboards/ymd96/backlight.c delete mode 100644 keyboards/ymd96/backlight_custom.h delete mode 100644 keyboards/ymd96/breathing_custom.h delete mode 100644 keyboards/ymdk_np21/backlight.c delete mode 100644 keyboards/ymdk_np21/backlight_custom.h delete mode 100644 keyboards/ymdk_np21/breathing_custom.h diff --git a/keyboards/ares/ares.c b/keyboards/ares/ares.c index 07276491c513..e6379cb18da6 100644 --- a/keyboards/ares/ares.c +++ b/keyboards/ares/ares.c @@ -17,27 +17,19 @@ along with this program. If not, see . #include "ares.h" -#ifdef BACKLIGHT_ENABLE -void backlight_init_ports(void) { - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_set(uint8_t level) { - if (level == 0) { - // Turn out the lights - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // Turn on the lights - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); - } +void led_init_ports(void) { + setPinOutput(D1); + writePinHigh(D1); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + } + return true; } -#endif diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h index f0aa926ea5b5..c50587db9c49 100644 --- a/keyboards/ares/config.h +++ b/keyboards/ares/config.h @@ -37,7 +37,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/ares/rules.mk b/keyboards/ares/rules.mk index 58d36bc67350..f540741721d4 100644 --- a/keyboards/ares/rules.mk +++ b/keyboards/ares/rules.mk @@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no WS2812_DRIVER = i2c diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index 9039fe5465ae..eb328ba8336c 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c @@ -17,30 +17,19 @@ along with this program. If not, see . #include "bfake.h" -void backlight_init_ports(void) { - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); +void led_init_ports(void) { + setPinOutput(D1); + writePinHigh(D1); } -void backlight_set(uint8_t level) { - if (level == 0) { - // Turn out the lights - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // Turn on the lights - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); - } +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + } + return true; } diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index 65f1f3a759ff..7c814ccc9328 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef BFAKE_CONFIG_H -#define BFAKE_CONFIG_H +#pragma once #include "config_common.h" @@ -38,9 +37,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 - -#endif diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk index 107bb4fa903a..ab6af983cee0 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no WS2812_DRIVER = i2c diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c index e9125a3e609e..7317e24e2607 100644 --- a/keyboards/donutcables/budget96/budget96.c +++ b/keyboards/donutcables/budget96/budget96.c @@ -16,32 +16,22 @@ #include "budget96.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); - - // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); } + return true; } diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h index 127e542f1c67..dddc8075b19e 100644 --- a/keyboards/donutcables/budget96/config.h +++ b/keyboards/donutcables/budget96/config.h @@ -37,5 +37,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/donutcables/budget96/rules.mk b/keyboards/donutcables/budget96/rules.mk index 54328d248d13..84eace5ed6d1 100644 --- a/keyboards/donutcables/budget96/rules.mk +++ b/keyboards/donutcables/budget96/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes +CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes diff --git a/keyboards/eve/meteor/config.h b/keyboards/eve/meteor/config.h index b23bc877fe9b..2100c3a4580a 100644 --- a/keyboards/eve/meteor/config.h +++ b/keyboards/eve/meteor/config.h @@ -36,4 +36,5 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/eve/meteor/meteor.c b/keyboards/eve/meteor/meteor.c index f5ecbad02543..ac1ca5d6434b 100644 --- a/keyboards/eve/meteor/meteor.c +++ b/keyboards/eve/meteor/meteor.c @@ -16,32 +16,19 @@ #include "meteor.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - // turn backlight LEDs on - writePinHigh(D0); +void led_init_ports(void) { + setPinOutput(D1); writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); } + return true; } diff --git a/keyboards/exclusive/e6v2/le_bmc/config.h b/keyboards/exclusive/e6v2/le_bmc/config.h index d0b976c1ec2f..ca680f5029ea 100644 --- a/keyboards/exclusive/e6v2/le_bmc/config.h +++ b/keyboards/exclusive/e6v2/le_bmc/config.h @@ -45,5 +45,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLED_NUM 6 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c index e3b81c81ba43..b09e588795cd 100644 --- a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c +++ b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c @@ -16,32 +16,19 @@ #include "le_bmc.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - // turn backlight LEDs on - writePinHigh(D0); +void led_init_ports(void) { + setPinOutput(D1); writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); } + return true; } diff --git a/keyboards/exclusive/e6v2/le_bmc/rules.mk b/keyboards/exclusive/e6v2/le_bmc/rules.mk index 106044ba7257..ded651d3d8f7 100644 --- a/keyboards/exclusive/e6v2/le_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/le_bmc/rules.mk @@ -17,13 +17,13 @@ BOOTLOADER = bootloadHID BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) diff --git a/keyboards/exclusive/e6v2/oe_bmc/config.h b/keyboards/exclusive/e6v2/oe_bmc/config.h index fc7c91ca6654..a6b56ba00335 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/config.h +++ b/keyboards/exclusive/e6v2/oe_bmc/config.h @@ -45,5 +45,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLED_NUM 6 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c index 97d354653f1b..a0a6c579bdd3 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c @@ -16,32 +16,19 @@ #include "oe_bmc.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - // turn backlight LEDs on - writePinHigh(D0); +void led_init_ports(void) { + setPinOutput(D1); writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); } + return true; } diff --git a/keyboards/exclusive/e6v2/oe_bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk index 106044ba7257..ded651d3d8f7 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/oe_bmc/rules.mk @@ -17,13 +17,13 @@ BOOTLOADER = bootloadHID BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) diff --git a/keyboards/exent/config.h b/keyboards/exent/config.h index 08d241f653a1..4921746c1c59 100644 --- a/keyboards/exent/config.h +++ b/keyboards/exent/config.h @@ -39,7 +39,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/exent/exent.c b/keyboards/exent/exent.c index 82066f7e8553..c6870f2c7917 100644 --- a/keyboards/exent/exent.c +++ b/keyboards/exent/exent.c @@ -15,3 +15,26 @@ */ #include "exent.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D6); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/exent/rules.mk b/keyboards/exent/rules.mk index 10442b31ba61..0ea425ac7e90 100644 --- a/keyboards/exent/rules.mk +++ b/keyboards/exent/rules.mk @@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index 9a31f927835d..0dc35e625889 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h @@ -37,5 +37,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c index fa58f0cf79a1..fc176466fe39 100644 --- a/keyboards/facew/facew.c +++ b/keyboards/facew/facew.c @@ -17,30 +17,21 @@ along with this program. If not, see . #include "facew.h" -void backlight_init_ports(void) { - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); +void led_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + writePinHigh(D0); + writePinHigh(D1); } -void backlight_set(uint8_t level) { - if (level == 0) { - // Turn out the lights - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // Turn on the lights - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); - } +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + } + return true; } diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk index c4117d15d768..81cfb758c05c 100644 --- a/keyboards/facew/rules.mk +++ b/keyboards/facew/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes +CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h index 1bf93928725c..38c3e851a83d 100644 --- a/keyboards/ft/mars80/config.h +++ b/keyboards/ft/mars80/config.h @@ -38,7 +38,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/ft/mars80/mars80.c b/keyboards/ft/mars80/mars80.c index 8e512740877f..ca1950353be4 100644 --- a/keyboards/ft/mars80/mars80.c +++ b/keyboards/ft/mars80/mars80.c @@ -16,32 +16,22 @@ #include "mars80.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D1); - setPinOutput(D4); setPinOutput(D6); - - // turn backlight LEDs on - writePinHigh(D0); writePinHigh(D1); - writePinHigh(D4); writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); } + return true; } diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c index 21562b9e0f0c..57f5e6031456 100644 --- a/keyboards/gray_studio/hb85/hb85.c +++ b/keyboards/gray_studio/hb85/hb85.c @@ -18,32 +18,25 @@ along with this program. If not, see . #include "hb85.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); - setPinOutput(D4); setPinOutput(D6); - - // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); - writePinHigh(D4); writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); } + return true; } diff --git a/keyboards/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk index ec57b03dcbce..79b783e42136 100644 --- a/keyboards/gray_studio/hb85/rules.mk +++ b/keyboards/gray_studio/hb85/rules.mk @@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index 5439dbe396b3..392aebc2a4c4 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h @@ -32,7 +32,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index 2a289872fefc..627661a57ca1 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c @@ -17,32 +17,19 @@ along with this program. If not, see . #include "v32a.h" -#ifdef BACKLIGHT_ENABLE -void backlight_init_ports(void) { - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); +void led_init_ports(void) { + setPinOutput(D1); + writePinHigh(D1); } -void backlight_set(uint8_t level) { - if (level == 0) { - // Turn out the lights - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // Turn on the lights - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); - } +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + } + return true; } -#endif diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index 2310ce87e2df..90bcacfd1623 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 -// #define BACKLIGHT_BREATHING // Requires #4324 to enable hardware pwm for atmega32a +#define BACKLIGHT_BREATHING /* RGB underglow */ // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index 8918e60dad7e..b3f33d6e7ada 100644 --- a/keyboards/jj4x4/config.h +++ b/keyboards/jj4x4/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 -// #define BACKLIGHT_BREATHING // Requires #4324 to enable hardware pwm for atmega32a +#define BACKLIGHT_BREATHING /* RGB underglow */ // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. diff --git a/keyboards/jj50/backlight.c b/keyboards/jj50/backlight.c deleted file mode 100644 index fbd241fa9dee..000000000000 --- a/keyboards/jj50/backlight.c +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#include "backlight.h" -#include "quantum.h" - -#include -#include - -#include "backlight_custom.h" -#include "breathing_custom.h" - -// DEBUG -#include -#include - -// Port D: digital pins of the AVR chipset -#define NUMLOCK_PORT (1 << 0) // D0 -#define CAPSLOCK_PORT (1 << 1) // D1 -#define BACKLIGHT_PORT (1 << 4) // D4 -#define SCROLLLOCK_PORT (1 << 6) // D6 - -#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 -#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default - -#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask - -#define PWM_MAX 0xFF -#define TIMER_TOP 255 // 8 bit PWM - -extern backlight_config_t backlight_config; - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - } -} - -#ifdef BACKLIGHT_ENABLE - -// sets up Timer 1 for 8-bit PWM -void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE - // default 8 bit mode - TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH - TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW - - // clear output compare value A - // outb(OCR1AH, 0); - // outb(OCR1AL, 0); - - // clear output comparator registers for B - OCR1BH = 0; // outb(OCR1BH, 0); - OCR1BL = 0; // outb(OCR1BL, 0); -} - -bool is_init = false; -void timer1Init(void) { - // timer1SetPrescaler(TIMER1PRESCALE) - // set to DIV/64 - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; - - // reset TCNT1 - TCNT1H = 0; // outb(TCNT1H, 0); - TCNT1L = 0; // outb(TCNT1L, 0); - - // TOIE1: Timer Overflow Interrupt Enable (Timer 1); - TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); - - is_init = true; -} - -void timer1UnInit(void) { - // set prescaler back to NONE - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP - - // disable timer overflow interrupt - TIMSK &= ~_BV(TOIE1); // overflow bit? - - setPWM(0); - - is_init = false; -} - - -// handle TCNT1 overflow -//! Interrupt handler for tcnt1 overflow interrupt -ISR(TIMER1_OVF_vect, ISR_NOBLOCK) -{ - // sei(); - // handle breathing here - #ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - custom_breathing_handler(); - } - #endif - - // TODO call user defined function -} - -// enable timer 1 PWM -// timer1PWMBOn() -void timer1PWMBEnable(void) { - // turn on channel B (OC1B) PWM output - // set OC1B as non-inverted PWM - TCCR1A |= _BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -// disable timer 1 PWM -// timer1PWMBOff() -void timer1PWMBDisable(void) { - TCCR1A &= ~_BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -void enableBacklight(void) { - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high -} - -void disableBacklight(void) { - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low -} - -void startPWM(void) { - timer1Init(); - timer1PWMBEnable(); - enableBacklight(); -} - -void stopPWM(void) { - timer1UnInit(); - disableBacklight(); - timer1PWMBDisable(); -} - -void b_led_init_ports(void) { - /* turn backlight on/off depending on user preference */ - #if BACKLIGHT_ON_STATE == 0 - // DDRx register: sets the direction of Port D - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low - #else - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high - #endif - - timer1PWMSetup(); - startPWM(); - - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif -} - -void b_led_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) { - level = BACKLIGHT_LEVELS; - } - - setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); -} - -// called every matrix scan -void b_led_task(void) { - // do nothing for now -} - -void setPWM(uint16_t xValue) { - if (xValue > TIMER_TOP) { - xValue = TIMER_TOP; - } - OCR1B = xValue; // timer1PWMBSet(xValue); -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj50/backlight_custom.h b/keyboards/jj50/backlight_custom.h deleted file mode 100644 index 7210be840e09..000000000000 --- a/keyboards/jj50/backlight_custom.h +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifndef BACKLIGHT_CUSTOM_H -#define BACKLIGHT_CUSTOM_H - -#include -void b_led_init_ports(void); -void b_led_set(uint8_t level); -void b_led_task(void); -void setPWM(uint16_t xValue); - -#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/jj50/breathing_custom.h b/keyboards/jj50/breathing_custom.h deleted file mode 100644 index 71416b1b45da..000000000000 --- a/keyboards/jj50/breathing_custom.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Breathing effect code for PS2AVRGB boards (ATMEGA32A) - * Works in conjunction with `backlight.c`. - * - * Code adapted from `quantum.c` to register with the existing TIMER1 overflow - * handler in `backlight.c` instead of setting up its own timer. - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifdef BACKLIGHT_ENABLE -#ifdef BACKLIGHT_BREATHING - -#include "backlight_custom.h" - -#ifndef BREATHING_PERIOD -#define BREATHING_PERIOD 6 -#endif - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) - -// TODO make this share code with quantum.c - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -static bool breathing = false; - -bool is_breathing(void) { - return breathing; -} - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - -void breathing_enable(void) { - breathing = true; - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - // interrupt already registered -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - // breathing_interrupt_enable(); - breathing = true; -} - -void breathing_disable(void) { - breathing = false; - // backlight_set(get_backlight_level()); - b_led_set(get_backlight_level()); // custom implementation of backlight_set() -} - -void breathing_self_disable(void) -{ - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * get_backlight_level(); -} - -void custom_breathing_handler(void) { - uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - // breathing_interrupt_disable(); - } - - setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -#endif // BACKLIGHT_BREATHING -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h index 884a28d50698..9b9feb0676d9 100644 --- a/keyboards/jj50/config.h +++ b/keyboards/jj50/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4 } #define DIODE_DIRECTION COL2ROW -//#define BACKLIGHT_PIN D4 +#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 #define RGB_DI_PIN E2 diff --git a/keyboards/jj50/jj50.c b/keyboards/jj50/jj50.c index a302adf40509..91b10aebee37 100644 --- a/keyboards/jj50/jj50.c +++ b/keyboards/jj50/jj50.c @@ -16,20 +16,3 @@ along with this program. If not, see . */ #include "jj50.h" - -#include "backlight.h" -#include "backlight_custom.h" - -#ifdef BACKLIGHT_ENABLE -void backlight_init_ports(void) { - b_led_init_ports(); -} - -void backlight_task(void) { - b_led_task(); -} - -void backlight_set(uint8_t level) { - b_led_set(level); -} -#endif diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk index 62b21e4df23d..38faf3716299 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -29,6 +29,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #OPT_DEFS = -DDEBUG_LEVEL=0 -SRC = backlight.c - LAYOUTS = ortho_5x12 diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.c b/keyboards/kbdfans/kbdpad/mk1/mk1.c index aa781875ce06..f5fe47741b08 100644 --- a/keyboards/kbdfans/kbdpad/mk1/mk1.c +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.c @@ -16,14 +16,19 @@ #include "mk1.h" -#define NUMLOCK_PIN D0 +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} -void matrix_init_kb(void) { - setPinOutput(NUMLOCK_PIN); - matrix_init_user(); +void led_init_ports(void) { + setPinOutput(D0); + writePinHigh(D0); } -void led_set_kb(uint8_t usb_led) { - writePin(NUMLOCK_PIN, IS_LED_ON(usb_led, USB_LED_NUM_LOCK)); - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + } + return true; } diff --git a/keyboards/mechmini/v1/config.h b/keyboards/mechmini/v1/config.h index eb15a368ad58..07422f9ffda9 100644 --- a/keyboards/mechmini/v1/config.h +++ b/keyboards/mechmini/v1/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef V1_CONFIG_H -#define V1_CONFIG_H +#pragma once #include "config_common.h" @@ -38,11 +37,12 @@ along with this program. If not, see . #define NO_UART 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + /* RGB underglow */ // The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. // The same pin is used on the JJ40, at least. #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN E2 - -#endif diff --git a/keyboards/mechmini/v1/rules.mk b/keyboards/mechmini/v1/rules.mk index 1c6252c59bd4..6f2adc2f8183 100644 --- a/keyboards/mechmini/v1/rules.mk +++ b/keyboards/mechmini/v1/rules.mk @@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c diff --git a/keyboards/mehkee96/config.h b/keyboards/mehkee96/config.h index d506626d1e74..afc9d0a7b17c 100644 --- a/keyboards/mehkee96/config.h +++ b/keyboards/mehkee96/config.h @@ -16,6 +16,9 @@ #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS /* key combination for command */ diff --git a/keyboards/mehkee96/mehkee96.c b/keyboards/mehkee96/mehkee96.c index d9e2bac7a595..2da25b6b845f 100644 --- a/keyboards/mehkee96/mehkee96.c +++ b/keyboards/mehkee96/mehkee96.c @@ -16,3 +16,23 @@ along with this program. If not, see . */ #include "mehkee96.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + writePinHigh(D0); + writePinHigh(D1); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + } + return true; +} diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk index a7d36548f063..772706e6cca0 100644 --- a/keyboards/mehkee96/rules.mk +++ b/keyboards/mehkee96/rules.mk @@ -17,9 +17,9 @@ BOOTLOADER = bootloadHID BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h index c565f39bcc98..b3bcdc97334b 100644 --- a/keyboards/panc60/config.h +++ b/keyboards/panc60/config.h @@ -37,5 +37,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/panc60/panc60.c b/keyboards/panc60/panc60.c index 6bd16a4bdc48..a200b2587848 100644 --- a/keyboards/panc60/panc60.c +++ b/keyboards/panc60/panc60.c @@ -16,30 +16,19 @@ #include "panc60.h" -void backlight_init_ports(void) { - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); +void led_init_ports(void) { + setPinOutput(D1); + writePinHigh(D1); } -void backlight_set(uint8_t level) { - if (level == 0) { - // Turn out the lights - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // Turn on the lights - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); - } +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + } + return true; } diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index 0ae69e8e2b99..5dbba3ec0d90 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -31,7 +31,8 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 #define MATRIX_ROWS 4 #define MATRIX_COLS 13 diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index 093b5fdd9378..cebbc9fcbacf 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c @@ -17,32 +17,25 @@ along with this program. If not, see . #include "pearl.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); - setPinOutput(D4); setPinOutput(D6); - - // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); - writePinHigh(D4); writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); } + return true; } diff --git a/keyboards/percent/canoe/canoe.c b/keyboards/percent/canoe/canoe.c index 79c6330fe868..d3c66dbf1395 100644 --- a/keyboards/percent/canoe/canoe.c +++ b/keyboards/percent/canoe/canoe.c @@ -17,32 +17,19 @@ along with this program. If not, see . #include "canoe.h" -#ifdef BACKLIGHT_ENABLE -void backlight_set(uint8_t level) { - if (level == 0) { - // Turn out the lights - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // Turn on the lights - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); - } +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_init_ports(void) { - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void led_init_ports(void) { + setPinOutput(D1); + writePinHigh(D1); +} - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + } + return true; } -#endif diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h index 950e0806e599..21b3dcea6482 100644 --- a/keyboards/percent/canoe/config.h +++ b/keyboards/percent/canoe/config.h @@ -38,7 +38,9 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/percent/canoe/rules.mk b/keyboards/percent/canoe/rules.mk index 6340c81224b3..9661eaefeb28 100644 --- a/keyboards/percent/canoe/rules.mk +++ b/keyboards/percent/canoe/rules.mk @@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c diff --git a/keyboards/percent/skog/backlight.c b/keyboards/percent/skog/backlight.c deleted file mode 100644 index 94e8126d888e..000000000000 --- a/keyboards/percent/skog/backlight.c +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#include "backlight.h" -#include "quantum.h" - -#include -#include - -#include "backlight_custom.h" -#include "breathing_custom.h" - -// DEBUG -#include -#include - -// Port D: digital pins of the AVR chipset -#define NUMLOCK_PORT (1 << 0) // D0 -#define CAPSLOCK_PORT (1 << 1) // D1 -#define BACKLIGHT_PORT (1 << 4) // D4 -#define SCROLLLOCK_PORT (1 << 6) // D6 - -#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 -#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default - -#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask - -#define PWM_MAX 0xFF -#define TIMER_TOP 255 // 8 bit PWM - -extern backlight_config_t backlight_config; - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - } -} - -#ifdef BACKLIGHT_ENABLE - -// sets up Timer 1 for 8-bit PWM -void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE - // default 8 bit mode - TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH - TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW - - // clear output compare value A - // outb(OCR1AH, 0); - // outb(OCR1AL, 0); - - // clear output comparator registers for B - OCR1BH = 0; // outb(OCR1BH, 0); - OCR1BL = 0; // outb(OCR1BL, 0); -} - -bool is_init = false; -void timer1Init(void) { - // timer1SetPrescaler(TIMER1PRESCALE) - // set to DIV/64 - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; - - // reset TCNT1 - TCNT1H = 0; // outb(TCNT1H, 0); - TCNT1L = 0; // outb(TCNT1L, 0); - - // TOIE1: Timer Overflow Interrupt Enable (Timer 1); - TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); - - is_init = true; -} - -void timer1UnInit(void) { - // set prescaler back to NONE - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP - - // disable timer overflow interrupt - TIMSK &= ~_BV(TOIE1); // overflow bit? - - setPWM(0); - - is_init = false; -} - - -// handle TCNT1 overflow -//! Interrupt handler for tcnt1 overflow interrupt -ISR(TIMER1_OVF_vect, ISR_NOBLOCK) -{ - // sei(); - // handle breathing here - #ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - custom_breathing_handler(); - } - #endif -} - -// enable timer 1 PWM -// timer1PWMBOn() -void timer1PWMBEnable(void) { - // turn on channel B (OC1B) PWM output - // set OC1B as non-inverted PWM - TCCR1A |= _BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -// disable timer 1 PWM -// timer1PWMBOff() -void timer1PWMBDisable(void) { - TCCR1A &= ~_BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -void enableBacklight(void) { - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high -} - -void disableBacklight(void) { - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low -} - -void startPWM(void) { - timer1Init(); - timer1PWMBEnable(); - enableBacklight(); -} - -void stopPWM(void) { - timer1UnInit(); - disableBacklight(); - timer1PWMBDisable(); -} - -void b_led_init_ports(void) { - /* turn backlight on/off depending on user preference */ - #if BACKLIGHT_ON_STATE == 0 - // DDRx register: sets the direction of Port D - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low - #else - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high - #endif - - timer1PWMSetup(); - startPWM(); - - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif -} - -void b_led_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) { - level = BACKLIGHT_LEVELS; - } - - setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); -} - -// called every matrix scan -void b_led_task(void) { - // do nothing for now -} - -void setPWM(uint16_t xValue) { - if (xValue > TIMER_TOP) { - xValue = TIMER_TOP; - } - OCR1B = xValue; // timer1PWMBSet(xValue); -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/percent/skog/backlight_custom.h b/keyboards/percent/skog/backlight_custom.h deleted file mode 100644 index 51365fe3ba44..000000000000 --- a/keyboards/percent/skog/backlight_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#pragma once - -#include -void b_led_init_ports(void); -void b_led_set(uint8_t level); -void b_led_task(void); -void setPWM(uint16_t xValue); - diff --git a/keyboards/percent/skog/breathing_custom.h b/keyboards/percent/skog/breathing_custom.h deleted file mode 100644 index 71416b1b45da..000000000000 --- a/keyboards/percent/skog/breathing_custom.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Breathing effect code for PS2AVRGB boards (ATMEGA32A) - * Works in conjunction with `backlight.c`. - * - * Code adapted from `quantum.c` to register with the existing TIMER1 overflow - * handler in `backlight.c` instead of setting up its own timer. - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifdef BACKLIGHT_ENABLE -#ifdef BACKLIGHT_BREATHING - -#include "backlight_custom.h" - -#ifndef BREATHING_PERIOD -#define BREATHING_PERIOD 6 -#endif - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) - -// TODO make this share code with quantum.c - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -static bool breathing = false; - -bool is_breathing(void) { - return breathing; -} - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - -void breathing_enable(void) { - breathing = true; - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - // interrupt already registered -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - // breathing_interrupt_enable(); - breathing = true; -} - -void breathing_disable(void) { - breathing = false; - // backlight_set(get_backlight_level()); - b_led_set(get_backlight_level()); // custom implementation of backlight_set() -} - -void breathing_self_disable(void) -{ - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * get_backlight_level(); -} - -void custom_breathing_handler(void) { - uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - // breathing_interrupt_disable(); - } - - setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -#endif // BACKLIGHT_BREATHING -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/percent/skog/config.h b/keyboards/percent/skog/config.h index 7a0c703ec9bc..15844711f6c1 100644 --- a/keyboards/percent/skog/config.h +++ b/keyboards/percent/skog/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D @@ -36,8 +35,7 @@ along with this program. If not, see . #define RGBLED_NUM 2 #define RGBLIGHT_ANIMATIONS +#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 5 #define NO_UART 1 - -#endif diff --git a/keyboards/percent/skog/rules.mk b/keyboards/percent/skog/rules.mk index da03a2e0c329..0d243b858107 100644 --- a/keyboards/percent/skog/rules.mk +++ b/keyboards/percent/skog/rules.mk @@ -21,11 +21,7 @@ BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c -BACKLIGHT_CUSTOM_DRIVER = yes - OPT_DEFS = -DDEBUG_LEVEL=0 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -SRC = backlight.c diff --git a/keyboards/percent/skog/skog.c b/keyboards/percent/skog/skog.c index 1c26c550e516..241833937bb8 100644 --- a/keyboards/percent/skog/skog.c +++ b/keyboards/percent/skog/skog.c @@ -19,20 +19,22 @@ ps2avrGB support code by Kenneth A. (bminiex/.[ch]) #include "skog.h" -#include "backlight.h" -#include "backlight_custom.h" - -#ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` -void backlight_init_ports(void) { - b_led_init_ports(); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_task(void) { - b_led_task(); +void led_init_ports(void) { + setPinOutput(D1); + setPinOutput(D6); + writePinHigh(D1); + writePinHigh(D6); } -void backlight_set(uint8_t level) { - b_led_set(level); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); + } + return true; } -#endif diff --git a/keyboards/percent/skog_lite/config.h b/keyboards/percent/skog_lite/config.h index 97d11238e3b7..ec3928b72e3b 100644 --- a/keyboards/percent/skog_lite/config.h +++ b/keyboards/percent/skog_lite/config.h @@ -38,5 +38,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/percent/skog_lite/skog_lite.c b/keyboards/percent/skog_lite/skog_lite.c index a6c00f52931f..e611885a6103 100644 --- a/keyboards/percent/skog_lite/skog_lite.c +++ b/keyboards/percent/skog_lite/skog_lite.c @@ -16,32 +16,22 @@ #include "skog_lite.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D1); - setPinOutput(D4); setPinOutput(D6); - - // turn backlight LEDs on - writePinHigh(D0); writePinHigh(D1); - writePinHigh(D4); writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); } + return true; } diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h index badaef51365f..e998e6ea96db 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h @@ -37,5 +37,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/singa/rules.mk b/keyboards/singa/rules.mk index 54328d248d13..84eace5ed6d1 100644 --- a/keyboards/singa/rules.mk +++ b/keyboards/singa/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes +CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c index 144065d02953..7b60e3c29d80 100644 --- a/keyboards/singa/singa.c +++ b/keyboards/singa/singa.c @@ -16,32 +16,19 @@ #include "singa.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - // turn backlight LEDs on - writePinHigh(D0); +void led_init_ports(void) { + setPinOutput(D1); writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); } + return true; } diff --git a/keyboards/tgr/alice/alice.c b/keyboards/tgr/alice/alice.c index 39aed2cf5676..9fb4957ac895 100644 --- a/keyboards/tgr/alice/alice.c +++ b/keyboards/tgr/alice/alice.c @@ -16,3 +16,26 @@ along with this program. If not, see . */ #include "alice.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D6); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/tgr/alice/config.h b/keyboards/tgr/alice/config.h index 4c36896b709a..1f1b32d4e3f9 100644 --- a/keyboards/tgr/alice/config.h +++ b/keyboards/tgr/alice/config.h @@ -33,6 +33,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #define RGBLED_NUM 18 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/tgr/alice/rules.mk b/keyboards/tgr/alice/rules.mk index 530e8ea32979..a8fea7efa7f7 100644 --- a/keyboards/tgr/alice/rules.mk +++ b/keyboards/tgr/alice/rules.mk @@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c diff --git a/keyboards/tgr/jane/config.h b/keyboards/tgr/jane/config.h index dd119d3b04a5..5fb9a90560ac 100644 --- a/keyboards/tgr/jane/config.h +++ b/keyboards/tgr/jane/config.h @@ -36,4 +36,5 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/tgr/jane/jane.c b/keyboards/tgr/jane/jane.c index 4ab0b300735e..24183a0f7b91 100644 --- a/keyboards/tgr/jane/jane.c +++ b/keyboards/tgr/jane/jane.c @@ -16,32 +16,22 @@ #include "jane.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D1); - setPinOutput(D4); setPinOutput(D6); - - // turn backlight LEDs on - writePinHigh(D0); writePinHigh(D1); - writePinHigh(D4); writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); } + return true; } diff --git a/keyboards/unikorn/config.h b/keyboards/unikorn/config.h index 1c4f3431a0b3..e6bdbe7f2fc4 100644 --- a/keyboards/unikorn/config.h +++ b/keyboards/unikorn/config.h @@ -36,7 +36,9 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + #ifdef RGBLIGHT_ENABLE #define RGBLED_NUM 17 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/unikorn/unikorn.c b/keyboards/unikorn/unikorn.c index 70bc5a988f43..26a5092a59cd 100644 --- a/keyboards/unikorn/unikorn.c +++ b/keyboards/unikorn/unikorn.c @@ -16,32 +16,19 @@ #include "unikorn.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} - // turn backlight LEDs on - writePinHigh(D0); +void led_init_ports(void) { + setPinOutput(D1); writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); } + return true; } diff --git a/keyboards/winkeyless/bface/bface.c b/keyboards/winkeyless/bface/bface.c index 8cb5b600cdd7..49e8bbcd2d42 100644 --- a/keyboards/winkeyless/bface/bface.c +++ b/keyboards/winkeyless/bface/bface.c @@ -16,32 +16,25 @@ #include "bface.h" -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); - setPinOutput(D4); setPinOutput(D6); - - // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); - writePinHigh(D4); writePinHigh(D6); } -void backlight_set(uint8_t level) { - if (level == 0) { - // turn backlight LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn backlight LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); } + return true; } diff --git a/keyboards/winkeyless/bface/config.h b/keyboards/winkeyless/bface/config.h index 95d44557a51a..7ada9a49ac06 100644 --- a/keyboards/winkeyless/bface/config.h +++ b/keyboards/winkeyless/bface/config.h @@ -42,10 +42,5 @@ along with this program. If not, see . #define NO_UART 1 -#ifdef BACKLIGHT_ENABLE - // the backlight PWM does not work (yet). Therefore, we only have two backlight levels (on/off) - #define BACKLIGHT_LEVELS 1 - #define LED_PIN PORTD - #define BACKLIGHT_PORT_NUM (1 << 4) -#endif - +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/winkeyless/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk index 506e37ac9c02..84eace5ed6d1 100644 --- a/keyboards/winkeyless/bface/rules.mk +++ b/keyboards/winkeyless/bface/rules.mk @@ -18,8 +18,6 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes -BACKLIGHT_CUSTOM_DRIVER = yes -BACKLIGHT_BREATHING = no RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c diff --git a/keyboards/winkeyless/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c index f44fd36a8cc7..fe3b74be133f 100644 --- a/keyboards/winkeyless/bmini/bmini.c +++ b/keyboards/winkeyless/bmini/bmini.c @@ -16,3 +16,26 @@ along with this program. If not, see . */ #include "bmini.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D6); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/winkeyless/bmini/config.h b/keyboards/winkeyless/bmini/config.h index f8a26e4f0049..95c44be9a428 100644 --- a/keyboards/winkeyless/bmini/config.h +++ b/keyboards/winkeyless/bmini/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef BMINI_CONFIG_H -#define BMINI_CONFIG_H +#pragma once #include "config_common.h" @@ -37,6 +36,7 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS -#define NO_UART 1 +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 -#endif +#define NO_UART 1 diff --git a/keyboards/winkeyless/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk index 530e8ea32979..a8fea7efa7f7 100644 --- a/keyboards/winkeyless/bmini/rules.mk +++ b/keyboards/winkeyless/bmini/rules.mk @@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c diff --git a/keyboards/winkeyless/bminiex/backlight.c b/keyboards/winkeyless/bminiex/backlight.c deleted file mode 100644 index 94e8126d888e..000000000000 --- a/keyboards/winkeyless/bminiex/backlight.c +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#include "backlight.h" -#include "quantum.h" - -#include -#include - -#include "backlight_custom.h" -#include "breathing_custom.h" - -// DEBUG -#include -#include - -// Port D: digital pins of the AVR chipset -#define NUMLOCK_PORT (1 << 0) // D0 -#define CAPSLOCK_PORT (1 << 1) // D1 -#define BACKLIGHT_PORT (1 << 4) // D4 -#define SCROLLLOCK_PORT (1 << 6) // D6 - -#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 -#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default - -#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask - -#define PWM_MAX 0xFF -#define TIMER_TOP 255 // 8 bit PWM - -extern backlight_config_t backlight_config; - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - } -} - -#ifdef BACKLIGHT_ENABLE - -// sets up Timer 1 for 8-bit PWM -void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE - // default 8 bit mode - TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH - TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW - - // clear output compare value A - // outb(OCR1AH, 0); - // outb(OCR1AL, 0); - - // clear output comparator registers for B - OCR1BH = 0; // outb(OCR1BH, 0); - OCR1BL = 0; // outb(OCR1BL, 0); -} - -bool is_init = false; -void timer1Init(void) { - // timer1SetPrescaler(TIMER1PRESCALE) - // set to DIV/64 - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; - - // reset TCNT1 - TCNT1H = 0; // outb(TCNT1H, 0); - TCNT1L = 0; // outb(TCNT1L, 0); - - // TOIE1: Timer Overflow Interrupt Enable (Timer 1); - TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); - - is_init = true; -} - -void timer1UnInit(void) { - // set prescaler back to NONE - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP - - // disable timer overflow interrupt - TIMSK &= ~_BV(TOIE1); // overflow bit? - - setPWM(0); - - is_init = false; -} - - -// handle TCNT1 overflow -//! Interrupt handler for tcnt1 overflow interrupt -ISR(TIMER1_OVF_vect, ISR_NOBLOCK) -{ - // sei(); - // handle breathing here - #ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - custom_breathing_handler(); - } - #endif -} - -// enable timer 1 PWM -// timer1PWMBOn() -void timer1PWMBEnable(void) { - // turn on channel B (OC1B) PWM output - // set OC1B as non-inverted PWM - TCCR1A |= _BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -// disable timer 1 PWM -// timer1PWMBOff() -void timer1PWMBDisable(void) { - TCCR1A &= ~_BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -void enableBacklight(void) { - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high -} - -void disableBacklight(void) { - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low -} - -void startPWM(void) { - timer1Init(); - timer1PWMBEnable(); - enableBacklight(); -} - -void stopPWM(void) { - timer1UnInit(); - disableBacklight(); - timer1PWMBDisable(); -} - -void b_led_init_ports(void) { - /* turn backlight on/off depending on user preference */ - #if BACKLIGHT_ON_STATE == 0 - // DDRx register: sets the direction of Port D - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low - #else - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high - #endif - - timer1PWMSetup(); - startPWM(); - - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif -} - -void b_led_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) { - level = BACKLIGHT_LEVELS; - } - - setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); -} - -// called every matrix scan -void b_led_task(void) { - // do nothing for now -} - -void setPWM(uint16_t xValue) { - if (xValue > TIMER_TOP) { - xValue = TIMER_TOP; - } - OCR1B = xValue; // timer1PWMBSet(xValue); -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/winkeyless/bminiex/backlight_custom.h b/keyboards/winkeyless/bminiex/backlight_custom.h deleted file mode 100644 index 51365fe3ba44..000000000000 --- a/keyboards/winkeyless/bminiex/backlight_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#pragma once - -#include -void b_led_init_ports(void); -void b_led_set(uint8_t level); -void b_led_task(void); -void setPWM(uint16_t xValue); - diff --git a/keyboards/winkeyless/bminiex/bminiex.c b/keyboards/winkeyless/bminiex/bminiex.c index 11315b921073..365aeee2b24f 100644 --- a/keyboards/winkeyless/bminiex/bminiex.c +++ b/keyboards/winkeyless/bminiex/bminiex.c @@ -17,20 +17,25 @@ along with this program. If not, see . #include "bminiex.h" -#include "backlight.h" -#include "backlight_custom.h" - -#ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` -void backlight_init_ports(void) { - b_led_init_ports(); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_task(void) { - b_led_task(); +void led_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D6); } -void backlight_set(uint8_t level) { - b_led_set(level); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + writePin(D6, !led_state.scroll_lock); + } + return true; } -#endif diff --git a/keyboards/winkeyless/bminiex/breathing_custom.h b/keyboards/winkeyless/bminiex/breathing_custom.h deleted file mode 100644 index 71416b1b45da..000000000000 --- a/keyboards/winkeyless/bminiex/breathing_custom.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Breathing effect code for PS2AVRGB boards (ATMEGA32A) - * Works in conjunction with `backlight.c`. - * - * Code adapted from `quantum.c` to register with the existing TIMER1 overflow - * handler in `backlight.c` instead of setting up its own timer. - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifdef BACKLIGHT_ENABLE -#ifdef BACKLIGHT_BREATHING - -#include "backlight_custom.h" - -#ifndef BREATHING_PERIOD -#define BREATHING_PERIOD 6 -#endif - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) - -// TODO make this share code with quantum.c - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -static bool breathing = false; - -bool is_breathing(void) { - return breathing; -} - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - -void breathing_enable(void) { - breathing = true; - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - // interrupt already registered -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - // breathing_interrupt_enable(); - breathing = true; -} - -void breathing_disable(void) { - breathing = false; - // backlight_set(get_backlight_level()); - b_led_set(get_backlight_level()); // custom implementation of backlight_set() -} - -void breathing_self_disable(void) -{ - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * get_backlight_level(); -} - -void custom_breathing_handler(void) { - uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - // breathing_interrupt_disable(); - } - - setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -#endif // BACKLIGHT_BREATHING -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/winkeyless/bminiex/config.h b/keyboards/winkeyless/bminiex/config.h index 037ca002840b..8952796a813d 100644 --- a/keyboards/winkeyless/bminiex/config.h +++ b/keyboards/winkeyless/bminiex/config.h @@ -36,6 +36,7 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS +#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 5 #define NO_UART 1 diff --git a/keyboards/winkeyless/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk index 2c999dcbf6f4..df7124400f96 100644 --- a/keyboards/winkeyless/bminiex/rules.mk +++ b/keyboards/winkeyless/bminiex/rules.mk @@ -19,7 +19,6 @@ CONSOLE_ENABLE = no DEBUG_ENABLE = no COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes -BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c TAP_DANCE_ENABLE = no @@ -28,5 +27,3 @@ TAP_DANCE_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += backlight.c diff --git a/keyboards/ymd75/backlight.c b/keyboards/ymd75/backlight.c deleted file mode 100644 index cb0a979234d0..000000000000 --- a/keyboards/ymd75/backlight.c +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - Modified by Wayne K Jones (github.com/WarmCatUK) 2018 - */ - -#include "backlight.h" -#include "quantum.h" - -#include -#include - -#include "backlight_custom.h" -#include "breathing_custom.h" - -// DEBUG -#include -#include - -// Port D: digital pins of the AVR chipset -//#define NUMLOCK_PORT (1 << 2) // 2nd pin of Port D (digital) -#define CAPSLOCK_PORT (1 << 1) // 1st pin -#define BACKLIGHT_PORT (1 << 4) // D4 -//#define SCROLLLOCK_PORT (1 << 6) // D6 - -#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 -#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default - -#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask - -#define PWM_MAX 0xFF -#define TIMER_TOP 255 // 8 bit PWM - -extern backlight_config_t backlight_config; - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - /* - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - */ - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - /* - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - } - */ -} - -#ifdef BACKLIGHT_ENABLE - -// sets up Timer 1 for 8-bit PWM -void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE - // default 8 bit mode - TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH - TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW - - // clear output compare value A - // outb(OCR1AH, 0); - // outb(OCR1AL, 0); - - // clear output comparator registers for B - OCR1BH = 0; // outb(OCR1BH, 0); - OCR1BL = 0; // outb(OCR1BL, 0); -} - -bool is_init = false; -void timer1Init(void) { - // timer1SetPrescaler(TIMER1PRESCALE) - // set to DIV/64 - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; - - // reset TCNT1 - TCNT1H = 0; // outb(TCNT1H, 0); - TCNT1L = 0; // outb(TCNT1L, 0); - - // TOIE1: Timer Overflow Interrupt Enable (Timer 1); - TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); - - is_init = true; -} - -void timer1UnInit(void) { - // set prescaler back to NONE - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP - - // disable timer overflow interrupt - TIMSK &= ~_BV(TOIE1); // overflow bit? - - setPWM(0); - - is_init = false; -} - - -// handle TCNT1 overflow -//! Interrupt handler for tcnt1 overflow interrupt -ISR(TIMER1_OVF_vect, ISR_NOBLOCK) -{ - // sei(); - // handle breathing here - #ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - custom_breathing_handler(); - } - #endif - - // TODO call user defined function -} - -// enable timer 1 PWM -// timer1PWMBOn() -void timer1PWMBEnable(void) { - // turn on channel B (OC1B) PWM output - // set OC1B as non-inverted PWM - TCCR1A |= _BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -// disable timer 1 PWM -// timer1PWMBOff() -void timer1PWMBDisable(void) { - TCCR1A &= ~_BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -void enableBacklight(void) { - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high -} - -void disableBacklight(void) { - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low -} - -void startPWM(void) { - timer1Init(); - timer1PWMBEnable(); - enableBacklight(); -} - -void stopPWM(void) { - timer1UnInit(); - disableBacklight(); - timer1PWMBDisable(); -} - -void b_led_init_ports(void) { - /* turn backlight on/off depending on user preference */ - #if BACKLIGHT_ON_STATE == 0 - // DDRx register: sets the direction of Port D - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low - #else - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high - #endif - - timer1PWMSetup(); - startPWM(); - - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif -} - -void b_led_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) { - level = BACKLIGHT_LEVELS; - } - - setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); -} - -// called every matrix scan -void b_led_task(void) { - // do nothing for now -} - -void setPWM(uint16_t xValue) { - if (xValue > TIMER_TOP) { - xValue = TIMER_TOP; - } - OCR1B = xValue; // timer1PWMBSet(xValue); -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/ymd75/backlight_custom.h b/keyboards/ymd75/backlight_custom.h deleted file mode 100644 index 7210be840e09..000000000000 --- a/keyboards/ymd75/backlight_custom.h +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifndef BACKLIGHT_CUSTOM_H -#define BACKLIGHT_CUSTOM_H - -#include -void b_led_init_ports(void); -void b_led_set(uint8_t level); -void b_led_task(void); -void setPWM(uint16_t xValue); - -#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/ymd75/breathing_custom.h b/keyboards/ymd75/breathing_custom.h deleted file mode 100644 index 71416b1b45da..000000000000 --- a/keyboards/ymd75/breathing_custom.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Breathing effect code for PS2AVRGB boards (ATMEGA32A) - * Works in conjunction with `backlight.c`. - * - * Code adapted from `quantum.c` to register with the existing TIMER1 overflow - * handler in `backlight.c` instead of setting up its own timer. - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifdef BACKLIGHT_ENABLE -#ifdef BACKLIGHT_BREATHING - -#include "backlight_custom.h" - -#ifndef BREATHING_PERIOD -#define BREATHING_PERIOD 6 -#endif - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) - -// TODO make this share code with quantum.c - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -static bool breathing = false; - -bool is_breathing(void) { - return breathing; -} - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - -void breathing_enable(void) { - breathing = true; - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - // interrupt already registered -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - // breathing_interrupt_enable(); - breathing = true; -} - -void breathing_disable(void) { - breathing = false; - // backlight_set(get_backlight_level()); - b_led_set(get_backlight_level()); // custom implementation of backlight_set() -} - -void breathing_self_disable(void) -{ - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * get_backlight_level(); -} - -void custom_breathing_handler(void) { - uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - // breathing_interrupt_disable(); - } - - setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -#endif // BACKLIGHT_BREATHING -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index 00f6bd292c05..88916be62f8e 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h @@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -39,6 +38,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 #define RGB_DI_PIN E2 @@ -49,5 +49,3 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 18 #define NO_UART 1 - -#endif diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index eb41e19cf3c3..9d584b2b418b 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -23,14 +23,8 @@ WS2812_DRIVER = i2c NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work - DISABLE_WS2812 = no KEY_LOCK_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - - -#OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC = backlight.c diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c index e32a745bfd01..1c5c38039024 100644 --- a/keyboards/ymd75/ymd75.c +++ b/keyboards/ymd75/ymd75.c @@ -17,20 +17,19 @@ along with this program. If not, see . #include "ymd75.h" -#include "backlight.h" -#include "backlight_custom.h" - -#ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` -void backlight_init_ports(void) { - b_led_init_ports(); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_task(void) { - b_led_task(); +void led_init_ports(void) { + setPinOutput(D1); + writePinHigh(D1); } -void backlight_set(uint8_t level) { - b_led_set(level); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); + } + return true; } -#endif diff --git a/keyboards/ymd96/backlight.c b/keyboards/ymd96/backlight.c deleted file mode 100644 index f3f2b7a05b45..000000000000 --- a/keyboards/ymd96/backlight.c +++ /dev/null @@ -1,214 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#include "backlight.h" -#include "quantum.h" - -#include -#include - -#include "backlight_custom.h" -#include "breathing_custom.h" - -// DEBUG -#include -#include - -// Port D: digital pins of the AVR chipset -#define NUMLOCK_PORT (1 << 0) // 0th pin of Port D (digital) -#define CAPSLOCK_PORT (1 << 1) // 1st pin -#define BACKLIGHT_PORT (1 << 4) // D4 -//#define SCROLLLOCK_PORT (1 << 6) // D6 - -#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 -#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default - -#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask - -#define PWM_MAX 0xFF -#define TIMER_TOP 255 // 8 bit PWM - -extern backlight_config_t backlight_config; - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - - /* YMD96 does not have scroll lock led - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - }*/ -} - -#ifdef BACKLIGHT_ENABLE - -// sets up Timer 1 for 8-bit PWM -void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE - // default 8 bit mode - TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH - TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW - - // clear output compare value A - // outb(OCR1AH, 0); - // outb(OCR1AL, 0); - - // clear output comparator registers for B - OCR1BH = 0; // outb(OCR1BH, 0); - OCR1BL = 0; // outb(OCR1BL, 0); -} - -bool is_init = false; -void timer1Init(void) { - // timer1SetPrescaler(TIMER1PRESCALE) - // set to DIV/64 - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; - - // reset TCNT1 - TCNT1H = 0; // outb(TCNT1H, 0); - TCNT1L = 0; // outb(TCNT1L, 0); - - // TOIE1: Timer Overflow Interrupt Enable (Timer 1); - TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); - - is_init = true; -} - -void timer1UnInit(void) { - // set prescaler back to NONE - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP - - // disable timer overflow interrupt - TIMSK &= ~_BV(TOIE1); // overflow bit? - - setPWM(0); - - is_init = false; -} - - -// handle TCNT1 overflow -//! Interrupt handler for tcnt1 overflow interrupt -ISR(TIMER1_OVF_vect, ISR_NOBLOCK) -{ - // sei(); - // handle breathing here - #ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - custom_breathing_handler(); - } - #endif - - // TODO call user defined function -} - -// enable timer 1 PWM -// timer1PWMBOn() -void timer1PWMBEnable(void) { - // turn on channel B (OC1B) PWM output - // set OC1B as non-inverted PWM - TCCR1A |= _BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -// disable timer 1 PWM -// timer1PWMBOff() -void timer1PWMBDisable(void) { - TCCR1A &= ~_BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -void enableBacklight(void) { - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high -} - -void disableBacklight(void) { - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low -} - -void startPWM(void) { - timer1Init(); - timer1PWMBEnable(); - enableBacklight(); -} - -void stopPWM(void) { - timer1UnInit(); - disableBacklight(); - timer1PWMBDisable(); -} - -void b_led_init_ports(void) { - /* turn backlight on/off depending on user preference */ - #if BACKLIGHT_ON_STATE == 0 - // DDRx register: sets the direction of Port D - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low - #else - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high - #endif - - timer1PWMSetup(); - startPWM(); - - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif -} - -void b_led_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) { - level = BACKLIGHT_LEVELS; - } - - setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); -} - -// called every matrix scan -void b_led_task(void) { - // do nothing for now -} - -void setPWM(uint16_t xValue) { - if (xValue > TIMER_TOP) { - xValue = TIMER_TOP; - } - OCR1B = xValue; // timer1PWMBSet(xValue); -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/ymd96/backlight_custom.h b/keyboards/ymd96/backlight_custom.h deleted file mode 100644 index 7210be840e09..000000000000 --- a/keyboards/ymd96/backlight_custom.h +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifndef BACKLIGHT_CUSTOM_H -#define BACKLIGHT_CUSTOM_H - -#include -void b_led_init_ports(void); -void b_led_set(uint8_t level); -void b_led_task(void); -void setPWM(uint16_t xValue); - -#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/ymd96/breathing_custom.h b/keyboards/ymd96/breathing_custom.h deleted file mode 100644 index 71416b1b45da..000000000000 --- a/keyboards/ymd96/breathing_custom.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Breathing effect code for PS2AVRGB boards (ATMEGA32A) - * Works in conjunction with `backlight.c`. - * - * Code adapted from `quantum.c` to register with the existing TIMER1 overflow - * handler in `backlight.c` instead of setting up its own timer. - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifdef BACKLIGHT_ENABLE -#ifdef BACKLIGHT_BREATHING - -#include "backlight_custom.h" - -#ifndef BREATHING_PERIOD -#define BREATHING_PERIOD 6 -#endif - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) - -// TODO make this share code with quantum.c - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -static bool breathing = false; - -bool is_breathing(void) { - return breathing; -} - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - -void breathing_enable(void) { - breathing = true; - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - // interrupt already registered -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - // breathing_interrupt_enable(); - breathing = true; -} - -void breathing_disable(void) { - breathing = false; - // backlight_set(get_backlight_level()); - b_led_set(get_backlight_level()); // custom implementation of backlight_set() -} - -void breathing_self_disable(void) -{ - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * get_backlight_level(); -} - -void custom_breathing_handler(void) { - uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - // breathing_interrupt_disable(); - } - - setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -#endif // BACKLIGHT_BREATHING -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h index 1232f90c28be..d761e6037975 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h @@ -18,8 +18,7 @@ along with this program. If not, see . #include "config_common.h" -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D @@ -38,8 +37,9 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 -// #define BACKLIGHT_BREATHING // works, but BL_TOGG might not work +#define BACKLIGHT_BREATHING #define TAPPING_TOGGLE 3 @@ -55,5 +55,3 @@ along with this program. If not, see . /*#define RGBLIGHT_VAL_STEP 20 #define NO_UART 1*/ - -#endif diff --git a/keyboards/ymd96/rules.mk b/keyboards/ymd96/rules.mk index 3c892daabb61..b7571649bdd6 100644 --- a/keyboards/ymd96/rules.mk +++ b/keyboards/ymd96/rules.mk @@ -19,7 +19,6 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes -BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c @@ -30,5 +29,3 @@ KEY_LOCK_ENABLE = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC = backlight.c diff --git a/keyboards/ymd96/ymd96.c b/keyboards/ymd96/ymd96.c index eae84ade1948..c81435e45af0 100644 --- a/keyboards/ymd96/ymd96.c +++ b/keyboards/ymd96/ymd96.c @@ -18,20 +18,22 @@ along with this program. If not, see . #include "ymd96.h" -#include "backlight.h" -#include "backlight_custom.h" - -#ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` -void backlight_init_ports(void) { - b_led_init_ports(); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_task(void) { - b_led_task(); +void led_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + writePinHigh(D0); + writePinHigh(D1); } -void backlight_set(uint8_t level) { - b_led_set(level); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + writePin(D1, !led_state.caps_lock); + } + return true; } -#endif diff --git a/keyboards/ymdk/bface/bface.c b/keyboards/ymdk/bface/bface.c index 8622fd5238c7..e2810409a8da 100644 --- a/keyboards/ymdk/bface/bface.c +++ b/keyboards/ymdk/bface/bface.c @@ -16,26 +16,19 @@ */ #include "quantum.h" +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} -void keyboard_pre_init_kb(void){ - //init the CAPS LOCK LED pin as an output +void led_init_ports(void) { setPinOutput(D1); - //init the Backlight Pin as an output - setPinOutput(D4); - //call any user initialization code - keyboard_pre_init_user(); + writePinHigh(D1); } -void led_set_kb(uint8_t usb_led){ - //control the caps lock LED - if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){ - //set led pin to high - writePinHigh(D1); - } else { - //set to low - writePinLow(D1); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, !led_state.caps_lock); } - //call any user LED functions - led_set_user(usb_led); + return true; } - diff --git a/keyboards/ymdk/bface/config.h b/keyboards/ymdk/bface/config.h index 2273b7e84e62..a8c8a21493f9 100644 --- a/keyboards/ymdk/bface/config.h +++ b/keyboards/ymdk/bface/config.h @@ -40,5 +40,3 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 6 - - diff --git a/keyboards/ymdk/bface/rules.mk b/keyboards/ymdk/bface/rules.mk index f6f026cf3002..6320071ab8ae 100644 --- a/keyboards/ymdk/bface/rules.mk +++ b/keyboards/ymdk/bface/rules.mk @@ -18,9 +18,6 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes -BACKLIGHT_CUSTOM_DRIVER = no -BACKLIGHT_BREATHING = no RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = no OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/ymdk_np21/backlight.c b/keyboards/ymdk_np21/backlight.c deleted file mode 100644 index fbd241fa9dee..000000000000 --- a/keyboards/ymdk_np21/backlight.c +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#include "backlight.h" -#include "quantum.h" - -#include -#include - -#include "backlight_custom.h" -#include "breathing_custom.h" - -// DEBUG -#include -#include - -// Port D: digital pins of the AVR chipset -#define NUMLOCK_PORT (1 << 0) // D0 -#define CAPSLOCK_PORT (1 << 1) // D1 -#define BACKLIGHT_PORT (1 << 4) // D4 -#define SCROLLLOCK_PORT (1 << 6) // D6 - -#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 -#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default - -#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask - -#define PWM_MAX 0xFF -#define TIMER_TOP 255 // 8 bit PWM - -extern backlight_config_t backlight_config; - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - } -} - -#ifdef BACKLIGHT_ENABLE - -// sets up Timer 1 for 8-bit PWM -void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE - // default 8 bit mode - TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH - TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW - - // clear output compare value A - // outb(OCR1AH, 0); - // outb(OCR1AL, 0); - - // clear output comparator registers for B - OCR1BH = 0; // outb(OCR1BH, 0); - OCR1BL = 0; // outb(OCR1BL, 0); -} - -bool is_init = false; -void timer1Init(void) { - // timer1SetPrescaler(TIMER1PRESCALE) - // set to DIV/64 - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; - - // reset TCNT1 - TCNT1H = 0; // outb(TCNT1H, 0); - TCNT1L = 0; // outb(TCNT1L, 0); - - // TOIE1: Timer Overflow Interrupt Enable (Timer 1); - TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); - - is_init = true; -} - -void timer1UnInit(void) { - // set prescaler back to NONE - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP - - // disable timer overflow interrupt - TIMSK &= ~_BV(TOIE1); // overflow bit? - - setPWM(0); - - is_init = false; -} - - -// handle TCNT1 overflow -//! Interrupt handler for tcnt1 overflow interrupt -ISR(TIMER1_OVF_vect, ISR_NOBLOCK) -{ - // sei(); - // handle breathing here - #ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - custom_breathing_handler(); - } - #endif - - // TODO call user defined function -} - -// enable timer 1 PWM -// timer1PWMBOn() -void timer1PWMBEnable(void) { - // turn on channel B (OC1B) PWM output - // set OC1B as non-inverted PWM - TCCR1A |= _BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -// disable timer 1 PWM -// timer1PWMBOff() -void timer1PWMBDisable(void) { - TCCR1A &= ~_BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -void enableBacklight(void) { - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high -} - -void disableBacklight(void) { - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low -} - -void startPWM(void) { - timer1Init(); - timer1PWMBEnable(); - enableBacklight(); -} - -void stopPWM(void) { - timer1UnInit(); - disableBacklight(); - timer1PWMBDisable(); -} - -void b_led_init_ports(void) { - /* turn backlight on/off depending on user preference */ - #if BACKLIGHT_ON_STATE == 0 - // DDRx register: sets the direction of Port D - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low - #else - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high - #endif - - timer1PWMSetup(); - startPWM(); - - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif -} - -void b_led_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) { - level = BACKLIGHT_LEVELS; - } - - setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); -} - -// called every matrix scan -void b_led_task(void) { - // do nothing for now -} - -void setPWM(uint16_t xValue) { - if (xValue > TIMER_TOP) { - xValue = TIMER_TOP; - } - OCR1B = xValue; // timer1PWMBSet(xValue); -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/ymdk_np21/backlight_custom.h b/keyboards/ymdk_np21/backlight_custom.h deleted file mode 100644 index 7210be840e09..000000000000 --- a/keyboards/ymdk_np21/backlight_custom.h +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifndef BACKLIGHT_CUSTOM_H -#define BACKLIGHT_CUSTOM_H - -#include -void b_led_init_ports(void); -void b_led_set(uint8_t level); -void b_led_task(void); -void setPWM(uint16_t xValue); - -#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/ymdk_np21/breathing_custom.h b/keyboards/ymdk_np21/breathing_custom.h deleted file mode 100644 index 71416b1b45da..000000000000 --- a/keyboards/ymdk_np21/breathing_custom.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Breathing effect code for PS2AVRGB boards (ATMEGA32A) - * Works in conjunction with `backlight.c`. - * - * Code adapted from `quantum.c` to register with the existing TIMER1 overflow - * handler in `backlight.c` instead of setting up its own timer. - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifdef BACKLIGHT_ENABLE -#ifdef BACKLIGHT_BREATHING - -#include "backlight_custom.h" - -#ifndef BREATHING_PERIOD -#define BREATHING_PERIOD 6 -#endif - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) - -// TODO make this share code with quantum.c - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -static bool breathing = false; - -bool is_breathing(void) { - return breathing; -} - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - -void breathing_enable(void) { - breathing = true; - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - // interrupt already registered -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - // breathing_interrupt_enable(); - breathing = true; -} - -void breathing_disable(void) { - breathing = false; - // backlight_set(get_backlight_level()); - b_led_set(get_backlight_level()); // custom implementation of backlight_set() -} - -void breathing_self_disable(void) -{ - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * get_backlight_level(); -} - -void custom_breathing_handler(void) { - uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - // breathing_interrupt_disable(); - } - - setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -#endif // BACKLIGHT_BREATHING -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 60c5277761c6..91478d903575 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -15,10 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "config_common.h" +#pragma once -#ifndef CONFIG_H -#define CONFIG_H +#include "config_common.h" #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D @@ -37,8 +36,9 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 -// #define BACKLIGHT_BREATHING // works, but BL_TOGG might not work +#define BACKLIGHT_BREATHING #define TAPPING_TOGGLE 3 @@ -52,5 +52,3 @@ along with this program. If not, see . #define RGBLED_NUM 5 #define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS - -#endif diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index 772bee92855d..237386bcea96 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -19,7 +19,6 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes -BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c @@ -30,5 +29,3 @@ KEY_LOCK_ENABLE = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC = backlight.c diff --git a/keyboards/ymdk_np21/ymdk_np21.c b/keyboards/ymdk_np21/ymdk_np21.c index f2b3d46dabd6..5bf15975814c 100644 --- a/keyboards/ymdk_np21/ymdk_np21.c +++ b/keyboards/ymdk_np21/ymdk_np21.c @@ -18,20 +18,19 @@ along with this program. If not, see . #include "ymdk_np21.h" -#include "backlight.h" -#include "backlight_custom.h" - -#ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` -void backlight_init_ports(void) { - b_led_init_ports(); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_task(void) { - b_led_task(); +void led_init_ports(void) { + setPinOutput(D0); + writePinHigh(D0); } -void backlight_set(uint8_t level) { - b_led_set(level); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, !led_state.num_lock); + } + return true; } -#endif From 667045b4928badaedb38f535d885a46ff8a454fb Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 19 Jan 2020 16:30:34 +0000 Subject: [PATCH 077/331] Run clang-format manually to fix recently changed files (#7934) * Run clang-format manually to fix recently changed files * Run clang-format manually to fix recently changed files - revert template files * Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut --- drivers/issi/is31fl3733.c | 2 +- quantum/color.c | 6 +- quantum/dynamic_keymap.c | 20 +-- quantum/encoder.c | 8 +- quantum/process_keycode/process_rgb.c | 10 +- quantum/quantum.c | 8 +- quantum/quantum.h | 4 +- quantum/quantum_keycodes.h | 6 +- quantum/rgb_matrix.c | 8 +- quantum/rgblight.c | 6 +- quantum/via.c | 247 +++++++++++--------------- quantum/via.h | 61 +++---- tmk_core/common/action.c | 2 +- 13 files changed, 170 insertions(+), 218 deletions(-) diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c index b913922b07f3..dddf0cb73480 100644 --- a/drivers/issi/is31fl3733.c +++ b/drivers/issi/is31fl3733.c @@ -217,7 +217,7 @@ void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index) { // If any of the transactions fail we risk writing dirty PG0, // refresh page 0 just in case. - if (!IS31FL3733_write_pwm_buffer(addr, g_pwm_buffer[index])){ + if (!IS31FL3733_write_pwm_buffer(addr, g_pwm_buffer[index])) { g_led_control_registers_update_required[index] = true; } } diff --git a/quantum/color.c b/quantum/color.c index 8bd52444faa4..c050300627ba 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -87,9 +87,9 @@ RGB hsv_to_rgb(HSV hsv) { } #ifdef RGBW -#ifndef MIN -# define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif +# ifndef MIN +# define MIN(a, b) ((a) < (b) ? (a) : (b)) +# endif void convert_rgb_to_rgbw(LED_TYPE *led) { // Determine lowest value in all three colors, put that into // the white channel and then shift all colors by that amount diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 11d28592d603..0d8ea56b74d5 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -20,36 +20,36 @@ #include "progmem.h" // to read default from flash #include "quantum.h" // for send_string() #include "dynamic_keymap.h" -#include "via.h" // for default VIA_EEPROM_ADDR_END +#include "via.h" // for default VIA_EEPROM_ADDR_END #ifndef DYNAMIC_KEYMAP_LAYER_COUNT -# define DYNAMIC_KEYMAP_LAYER_COUNT 4 +# define DYNAMIC_KEYMAP_LAYER_COUNT 4 #endif #ifndef DYNAMIC_KEYMAP_MACRO_COUNT -# define DYNAMIC_KEYMAP_MACRO_COUNT 16 +# define DYNAMIC_KEYMAP_MACRO_COUNT 16 #endif // If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h, // default it start after VIA_EEPROM_CUSTOM_ADDR+VIA_EEPROM_CUSTOM_SIZE #ifndef DYNAMIC_KEYMAP_EEPROM_ADDR -# ifdef VIA_EEPROM_CUSTOM_CONFIG_ADDR -# define DYNAMIC_KEYMAP_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR+VIA_EEPROM_CUSTOM_CONFIG_SIZE) -# else -# error DYNAMIC_KEYMAP_EEPROM_ADDR not defined -# endif +# ifdef VIA_EEPROM_CUSTOM_CONFIG_ADDR +# define DYNAMIC_KEYMAP_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR + VIA_EEPROM_CUSTOM_CONFIG_SIZE) +# else +# error DYNAMIC_KEYMAP_EEPROM_ADDR not defined +# endif #endif // Dynamic macro starts after dynamic keymaps #ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -# define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR+(DYNAMIC_KEYMAP_LAYER_COUNT*MATRIX_ROWS*MATRIX_COLS*2)) +# define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)) #endif // Dynamic macro uses up all remaining memory // Assumes 1K EEPROM on ATMega32U4 // Override for anything different #ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE -# define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR) +# define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR) #endif uint8_t dynamic_keymap_get_layer_count(void) { return DYNAMIC_KEYMAP_LAYER_COUNT; } diff --git a/quantum/encoder.c b/quantum/encoder.c index c41b89f49517..8e11562eb720 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -37,8 +37,8 @@ static pin_t encoders_pad_b[] = ENCODERS_PAD_B; static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; -static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; -static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0}; +static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; +static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0}; #ifdef SPLIT_KEYBOARD // right half encoders come over as second set of encoders @@ -88,7 +88,7 @@ static void encoder_update(int8_t index, uint8_t state) { encoder_value[index]++; encoder_update_kb(index, true); } - if (encoder_pulses[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + if (encoder_pulses[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise encoder_value[index]--; encoder_update_kb(index, false); } @@ -109,7 +109,7 @@ void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, &encoder_valu void encoder_update_raw(uint8_t* slave_state) { for (uint8_t i = 0; i < NUMBER_OF_ENCODERS; i++) { uint8_t index = i + thatHand; - int8_t delta = slave_state[i] - encoder_value[index]; + int8_t delta = slave_state[i] - encoder_value[index]; while (delta > 0) { delta--; encoder_value[index]++; diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c index c76166342f19..627e5986fbaf 100644 --- a/quantum/process_keycode/process_rgb.c +++ b/quantum/process_keycode/process_rgb.c @@ -20,8 +20,8 @@ typedef void (*rgb_func_pointer)(void); /** * Wrapper for inc/dec rgb keycode - * - * noinline to optimise for firmware size not speed (not in hot path) + * + * noinline to optimise for firmware size not speed (not in hot path) */ static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) { if (is_shifted) { @@ -35,10 +35,10 @@ static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, * Wrapper for animation mode * - if not in animation family -> jump to that animation * - otherwise -> wrap round animation speed - * - * noinline to optimise for firmware size not speed (not in hot path) + * + * noinline to optimise for firmware size not speed (not in hot path) */ -static void __attribute__((noinline,unused)) handleKeycodeRGBMode(const uint8_t start, const uint8_t end) { +static void __attribute__((noinline, unused)) handleKeycodeRGBMode(const uint8_t start, const uint8_t end) { if ((start <= rgblight_get_mode()) && (rgblight_get_mode() < end)) { rgblight_step(); } else { diff --git a/quantum/quantum.c b/quantum/quantum.c index 9cd50b11d8a4..36062866e721 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -320,8 +320,8 @@ bool process_record_quantum(keyrecord_t *record) { switch (keycode) { case GRAVE_ESC: { /* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise. - * Used to ensure that the correct keycode is released if the key is released. - */ + * Used to ensure that the correct keycode is released if the key is released. + */ static bool grave_esc_was_shifted = false; uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))); @@ -379,6 +379,7 @@ __attribute__((weak)) const bool ascii_to_altgr_lut[128] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +// clang-format off __attribute__((weak)) const uint8_t ascii_to_keycode_lut[128] PROGMEM = {// NUL SOH STX ETX EOT ENQ ACK BEL XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // BS TAB LF VT FF CR SO SI @@ -412,6 +413,7 @@ __attribute__((weak)) const uint8_t ascii_to_keycode_lut[128] PROGMEM = {// NUL KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, // x y z { | } ~ DEL KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL}; +// clang-format on void send_string(const char *str) { send_string_with_delay(str, 0); } @@ -477,7 +479,7 @@ void send_string_with_delay_P(const char *str, uint8_t interval) { void send_char(char ascii_code) { #if defined(AUDIO_ENABLE) && defined(SENDSTRING_BELL) - if (ascii_code == '\a') { // BEL + if (ascii_code == '\a') { // BEL PLAY_SONG(bell_song); return; } diff --git a/quantum/quantum.h b/quantum/quantum.h index 09550fec301f..48887026d2c2 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -163,11 +163,11 @@ extern layer_state_t layer_state; #endif #ifdef DYNAMIC_KEYMAP_ENABLE -# include "dynamic_keymap.h" +# include "dynamic_keymap.h" #endif #ifdef VIA_ENABLE -# include "via.h" +# include "via.h" #endif // Function substitutions to ease GPIO manipulation diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index c8d0e354b080..54428fe1f24d 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -677,7 +677,7 @@ enum quantum_keycodes { #define AG_TOGG MAGIC_TOGGLE_ALT_GUI #define GUI_OFF MAGIC_NO_GUI -#define GUI_ON MAGIC_UNNO_GUI +#define GUI_ON MAGIC_UNNO_GUI #define GE_SWAP MAGIC_SWAP_GRAVE_ESC #define GE_NORM MAGIC_UNSWAP_GRAVE_ESC @@ -685,8 +685,8 @@ enum quantum_keycodes { #define BS_SWAP MAGIC_SWAP_BACKSLASH_BACKSPACE #define BS_NORM MAGIC_UNSWAP_BACKSLASH_BACKSPACE -#define NK_ON MAGIC_HOST_NKRO -#define NK_OFF MAGIC_UNHOST_NKRO +#define NK_ON MAGIC_HOST_NKRO +#define NK_OFF MAGIC_UNHOST_NKRO #define NK_TOGG MAGIC_TOGGLE_NKRO #define EH_LEFT MAGIC_EE_HANDS_LEFT diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 25ca44054dfd..1a9cf82e5fcf 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -434,11 +434,11 @@ void rgb_matrix_init(void) { eeconfig_debug_rgb_matrix(); // display current eeprom values } -void rgb_matrix_set_suspend_state(bool state) { - if (RGB_DISABLE_WHEN_USB_SUSPENDED && state) { - rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending +void rgb_matrix_set_suspend_state(bool state) { + if (RGB_DISABLE_WHEN_USB_SUSPENDED && state) { + rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending } - g_suspend_state = state; + g_suspend_state = state; } void rgb_matrix_toggle(void) { diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 141dc2e7bce1..26887f057e84 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -622,12 +622,12 @@ void rgblight_set(void) { start_led = led + clipping_start_pos; # endif -#ifdef RGBW +# ifdef RGBW for (uint8_t i = 0; i < num_leds; i++) { convert_rgb_to_rgbw(&start_led[i]); } -#endif - ws2812_setleds(start_led, num_leds); +# endif + ws2812_setleds(start_led, num_leds); } #endif diff --git a/quantum/via.c b/quantum/via.c index 64b05324a1c1..b3934d9f0011 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -28,41 +28,36 @@ #include "raw_hid.h" #include "dynamic_keymap.h" #include "tmk_core/common/eeprom.h" -#include "version.h" // for QMK_BUILDDATE used in EEPROM magic +#include "version.h" // for QMK_BUILDDATE used in EEPROM magic // Can be called in an overriding via_init_kb() to test if keyboard level code usage of // EEPROM is invalid and use/save defaults. -bool via_eeprom_is_valid(void) -{ - char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" - uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); - uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); - uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); +bool via_eeprom_is_valid(void) { + char * p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" + uint8_t magic0 = ((p[2] & 0x0F) << 4) | (p[3] & 0x0F); + uint8_t magic1 = ((p[5] & 0x0F) << 4) | (p[6] & 0x0F); + uint8_t magic2 = ((p[8] & 0x0F) << 4) | (p[9] & 0x0F); - return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 && - eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 && - eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 ); + return (eeprom_read_byte((void *)VIA_EEPROM_MAGIC_ADDR + 0) == magic0 && eeprom_read_byte((void *)VIA_EEPROM_MAGIC_ADDR + 1) == magic1 && eeprom_read_byte((void *)VIA_EEPROM_MAGIC_ADDR + 2) == magic2); } // Sets VIA/keyboard level usage of EEPROM to valid/invalid // Keyboard level code (eg. via_init_kb()) should not call this -void via_eeprom_set_valid(bool valid) -{ - char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" - uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); - uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); - uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); +void via_eeprom_set_valid(bool valid) { + char * p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" + uint8_t magic0 = ((p[2] & 0x0F) << 4) | (p[3] & 0x0F); + uint8_t magic1 = ((p[5] & 0x0F) << 4) | (p[6] & 0x0F); + uint8_t magic2 = ((p[8] & 0x0F) << 4) | (p[9] & 0x0F); - eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF); - eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF); - eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF); + eeprom_update_byte((void *)VIA_EEPROM_MAGIC_ADDR + 0, valid ? magic0 : 0xFF); + eeprom_update_byte((void *)VIA_EEPROM_MAGIC_ADDR + 1, valid ? magic1 : 0xFF); + eeprom_update_byte((void *)VIA_EEPROM_MAGIC_ADDR + 2, valid ? magic2 : 0xFF); } // Flag QMK and VIA/keyboard level EEPROM as invalid. // Used in bootmagic_lite() and VIA command handler. // Keyboard level code should not need to call this. -void via_eeprom_reset(void) -{ +void via_eeprom_reset(void) { // Set the VIA specific EEPROM state as invalid. via_eeprom_set_valid(false); // Set the TMK/QMK EEPROM state as invalid. @@ -72,8 +67,7 @@ void via_eeprom_reset(void) // Override bootmagic_lite() so it can flag EEPROM as invalid // as well as jump to bootloader, thus performing a "factory reset" // of dynamic keymaps and optionally backlight/other settings. -void bootmagic_lite(void) -{ +void bootmagic_lite(void) { // The lite version of TMK's bootmagic based on Wilba. // 100% less potential for accidentally making the // keyboard do stupid things. @@ -106,12 +100,10 @@ void bootmagic_lite(void) // for backlight, rotary encoders, etc. // The override should not set via_eeprom_set_valid(true) as // the caller also needs to check the valid state. -__attribute__((weak)) void via_init_kb(void) { -} +__attribute__((weak)) void via_init_kb(void) {} // Called by QMK core to initialize dynamic keymaps etc. -void via_init(void) -{ +void via_init(void) { // Let keyboard level test EEPROM valid state, // but not set it valid, it is done here. via_init_kb(); @@ -119,7 +111,7 @@ void via_init(void) // If the EEPROM has the magic, the data is good. // OK to load from EEPROM. if (via_eeprom_is_valid()) { - } else { + } else { // This resets the layout options via_set_layout_options(0); // This resets the keymaps in EEPROM to what is in flash. @@ -133,12 +125,11 @@ void via_init(void) // This is generalized so the layout options EEPROM usage can be // variable, between 1 and 4 bytes. -uint32_t via_get_layout_options(void) -{ +uint32_t via_get_layout_options(void) { uint32_t value = 0; // Start at the most significant byte - void * source = (void *)(VIA_EEPROM_LAYOUT_OPTIONS_ADDR); - for ( uint8_t i = 0; i < VIA_EEPROM_LAYOUT_OPTIONS_SIZE; i++ ) { + void *source = (void *)(VIA_EEPROM_LAYOUT_OPTIONS_ADDR); + for (uint8_t i = 0; i < VIA_EEPROM_LAYOUT_OPTIONS_SIZE; i++) { value = value << 8; value |= eeprom_read_byte(source); source++; @@ -146,24 +137,21 @@ uint32_t via_get_layout_options(void) return value; } -void via_set_layout_options(uint32_t value) -{ +void via_set_layout_options(uint32_t value) { // Start at the least significant byte - void * target = (void *)(VIA_EEPROM_LAYOUT_OPTIONS_ADDR+VIA_EEPROM_LAYOUT_OPTIONS_SIZE-1); - for ( uint8_t i = 0; i < VIA_EEPROM_LAYOUT_OPTIONS_SIZE; i++ ) { - eeprom_update_byte(target, value & 0xFF ); + void *target = (void *)(VIA_EEPROM_LAYOUT_OPTIONS_ADDR + VIA_EEPROM_LAYOUT_OPTIONS_SIZE - 1); + for (uint8_t i = 0; i < VIA_EEPROM_LAYOUT_OPTIONS_SIZE; i++) { + eeprom_update_byte(target, value & 0xFF); value = value >> 8; target--; } } // Called by QMK core to process VIA-specific keycodes. -bool process_record_via(uint16_t keycode, keyrecord_t *record) -{ +bool process_record_via(uint16_t keycode, keyrecord_t *record) { // Handle macros if (record->event.pressed) { - if ( keycode >= MACRO00 && keycode <= MACRO15 ) - { + if (keycode >= MACRO00 && keycode <= MACRO15) { uint8_t id = keycode - MACRO00; dynamic_keymap_macro_send(id); return false; @@ -173,7 +161,7 @@ bool process_record_via(uint16_t keycode, keyrecord_t *record) // TODO: ideally this would be generalized and refactored into // QMK core as advanced keycodes, until then, the simple case // can be available here to keyboards using VIA - switch(keycode) { + switch (keycode) { case FN_MO13: if (record->event.pressed) { layer_on(1); @@ -203,7 +191,7 @@ bool process_record_via(uint16_t keycode, keyrecord_t *record) // DO NOT call raw_hid_send() in the overide function. __attribute__((weak)) void raw_hid_receive_kb(uint8_t *data, uint8_t length) { uint8_t *command_id = &(data[0]); - *command_id = id_unhandled; + *command_id = id_unhandled; } // VIA handles received HID messages first, and will route to @@ -211,182 +199,151 @@ __attribute__((weak)) void raw_hid_receive_kb(uint8_t *data, uint8_t length) { // This gives the keyboard code level the ability to handle the command // specifically. // -// raw_hid_send() is called at the end, with the same buffer, which was +// raw_hid_send() is called at the end, with the same buffer, which was // possibly modified with returned values. -void raw_hid_receive( uint8_t *data, uint8_t length ) -{ - uint8_t *command_id = &(data[0]); +void raw_hid_receive(uint8_t *data, uint8_t length) { + uint8_t *command_id = &(data[0]); uint8_t *command_data = &(data[1]); - switch ( *command_id ) - { - case id_get_protocol_version: - { + switch (*command_id) { + case id_get_protocol_version: { command_data[0] = VIA_PROTOCOL_VERSION >> 8; command_data[1] = VIA_PROTOCOL_VERSION & 0xFF; break; } - case id_get_keyboard_value: - { - switch ( command_data[0] ) - { - case id_uptime: - { - uint32_t value = timer_read32(); - command_data[1] = (value >> 24 ) & 0xFF; - command_data[2] = (value >> 16 ) & 0xFF; - command_data[3] = (value >> 8 ) & 0xFF; + case id_get_keyboard_value: { + switch (command_data[0]) { + case id_uptime: { + uint32_t value = timer_read32(); + command_data[1] = (value >> 24) & 0xFF; + command_data[2] = (value >> 16) & 0xFF; + command_data[3] = (value >> 8) & 0xFF; command_data[4] = value & 0xFF; break; } - case id_layout_options: - { - uint32_t value = via_get_layout_options(); - command_data[1] = (value >> 24 ) & 0xFF; - command_data[2] = (value >> 16 ) & 0xFF; - command_data[3] = (value >> 8 ) & 0xFF; + case id_layout_options: { + uint32_t value = via_get_layout_options(); + command_data[1] = (value >> 24) & 0xFF; + command_data[2] = (value >> 16) & 0xFF; + command_data[3] = (value >> 8) & 0xFF; command_data[4] = value & 0xFF; break; } - case id_switch_matrix_state: - { -#if ( (MATRIX_COLS/8+1)*MATRIX_ROWS <= 28 ) + case id_switch_matrix_state: { +#if ((MATRIX_COLS / 8 + 1) * MATRIX_ROWS <= 28) uint8_t i = 1; - for ( uint8_t row=0; row 24) - command_data[i++] = (value >> 24 ) & 0xFF; -#endif -#if (MATRIX_COLS > 16) - command_data[i++] = (value >> 16 ) & 0xFF; -#endif -#if (MATRIX_COLS > 8) - command_data[i++] = (value >> 8 ) & 0xFF; -#endif +# if (MATRIX_COLS > 24) + command_data[i++] = (value >> 24) & 0xFF; +# endif +# if (MATRIX_COLS > 16) + command_data[i++] = (value >> 16) & 0xFF; +# endif +# if (MATRIX_COLS > 8) + command_data[i++] = (value >> 8) & 0xFF; +# endif command_data[i++] = value & 0xFF; } #endif break; } - default: - { - raw_hid_receive_kb(data,length); + default: { + raw_hid_receive_kb(data, length); break; } } break; } - case id_set_keyboard_value: - { - switch ( command_data[0] ) - { - case id_layout_options: - { - uint32_t value = ( (uint32_t)command_data[1] << 24 ) | - ( (uint32_t)command_data[2] << 16 ) | - ( (uint32_t)command_data[3] << 8 ) | - (uint32_t)command_data[4]; + case id_set_keyboard_value: { + switch (command_data[0]) { + case id_layout_options: { + uint32_t value = ((uint32_t)command_data[1] << 24) | ((uint32_t)command_data[2] << 16) | ((uint32_t)command_data[3] << 8) | (uint32_t)command_data[4]; via_set_layout_options(value); break; } - default: - { - raw_hid_receive_kb(data,length); + default: { + raw_hid_receive_kb(data, length); break; } } break; } - case id_dynamic_keymap_get_keycode: - { - uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); - command_data[3] = keycode >> 8; - command_data[4] = keycode & 0xFF; + case id_dynamic_keymap_get_keycode: { + uint16_t keycode = dynamic_keymap_get_keycode(command_data[0], command_data[1], command_data[2]); + command_data[3] = keycode >> 8; + command_data[4] = keycode & 0xFF; break; } - case id_dynamic_keymap_set_keycode: - { - dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); + case id_dynamic_keymap_set_keycode: { + dynamic_keymap_set_keycode(command_data[0], command_data[1], command_data[2], (command_data[3] << 8) | command_data[4]); break; } - case id_dynamic_keymap_reset: - { + case id_dynamic_keymap_reset: { dynamic_keymap_reset(); break; } case id_backlight_config_set_value: case id_backlight_config_get_value: - case id_backlight_config_save: - { + case id_backlight_config_save: { raw_hid_receive_kb(data, length); break; } - case id_dynamic_keymap_macro_get_count: - { + case id_dynamic_keymap_macro_get_count: { command_data[0] = dynamic_keymap_macro_get_count(); break; } - case id_dynamic_keymap_macro_get_buffer_size: - { - uint16_t size = dynamic_keymap_macro_get_buffer_size(); + case id_dynamic_keymap_macro_get_buffer_size: { + uint16_t size = dynamic_keymap_macro_get_buffer_size(); command_data[0] = size >> 8; command_data[1] = size & 0xFF; break; } - case id_dynamic_keymap_macro_get_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); + case id_dynamic_keymap_macro_get_buffer: { + uint16_t offset = (command_data[0] << 8) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_get_buffer(offset, size, &command_data[3]); break; } - case id_dynamic_keymap_macro_set_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); + case id_dynamic_keymap_macro_set_buffer: { + uint16_t offset = (command_data[0] << 8) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_set_buffer(offset, size, &command_data[3]); break; } - case id_dynamic_keymap_macro_reset: - { + case id_dynamic_keymap_macro_reset: { dynamic_keymap_macro_reset(); break; } - case id_dynamic_keymap_get_layer_count: - { + case id_dynamic_keymap_get_layer_count: { command_data[0] = dynamic_keymap_get_layer_count(); break; } - case id_dynamic_keymap_get_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_get_buffer( offset, size, &command_data[3] ); + case id_dynamic_keymap_get_buffer: { + uint16_t offset = (command_data[0] << 8) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_get_buffer(offset, size, &command_data[3]); break; } - case id_dynamic_keymap_set_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_set_buffer( offset, size, &command_data[3] ); + case id_dynamic_keymap_set_buffer: { + uint16_t offset = (command_data[0] << 8) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_set_buffer(offset, size, &command_data[3]); break; } - case id_eeprom_reset: - { + case id_eeprom_reset: { via_eeprom_reset(); break; } - case id_bootloader_jump: - { + case id_bootloader_jump: { // Need to send data back before the jump // Informs host that the command is handled - raw_hid_send( data, length ); + raw_hid_send(data, length); // Give host time to read it wait_ms(100); bootloader_jump(); break; } - default: - { + default: { // The command ID is not known // Return the unhandled state *command_id = id_unhandled; @@ -396,5 +353,5 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) // Return the same buffer, optionally with values changed // (i.e. returning state to the host, or the unhandled state). - raw_hid_send( data, length ); + raw_hid_send(data, length); } diff --git a/quantum/via.h b/quantum/via.h index f9a8017b2462..98f8dea8c3ea 100644 --- a/quantum/via.h +++ b/quantum/via.h @@ -16,7 +16,7 @@ #pragma once -#include // for EECONFIG_SIZE +#include // for EECONFIG_SIZE // Keyboard level code can change where VIA stores the magic. // The magic is the build date YYMMDD encoded as BCD in 3 bytes, @@ -25,34 +25,33 @@ // The only reason this is important is in case EEPROM usage changes // and the EEPROM was not explicitly reset by bootmagic lite. #ifndef VIA_EEPROM_MAGIC_ADDR -# define VIA_EEPROM_MAGIC_ADDR (EECONFIG_SIZE) +# define VIA_EEPROM_MAGIC_ADDR (EECONFIG_SIZE) #endif -#define VIA_EEPROM_LAYOUT_OPTIONS_ADDR (VIA_EEPROM_MAGIC_ADDR+3) +#define VIA_EEPROM_LAYOUT_OPTIONS_ADDR (VIA_EEPROM_MAGIC_ADDR + 3) // Changing the layout options size after release will invalidate EEPROM, // but this is something that should be set correctly on initial implementation. // 1 byte is enough for most uses (i.e. 8 binary states, or 6 binary + 1 ternary/quaternary ) #ifndef VIA_EEPROM_LAYOUT_OPTIONS_SIZE -# define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 1 +# define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 1 #endif // The end of the EEPROM memory used by VIA // By default, dynamic keymaps will start at this if there is no // custom config -#define VIA_EEPROM_CUSTOM_CONFIG_ADDR (VIA_EEPROM_LAYOUT_OPTIONS_ADDR+VIA_EEPROM_LAYOUT_OPTIONS_SIZE) +#define VIA_EEPROM_CUSTOM_CONFIG_ADDR (VIA_EEPROM_LAYOUT_OPTIONS_ADDR + VIA_EEPROM_LAYOUT_OPTIONS_SIZE) #ifndef VIA_EEPROM_CUSTOM_CONFIG_SIZE -# define VIA_EEPROM_CUSTOM_CONFIG_SIZE 0 +# define VIA_EEPROM_CUSTOM_CONFIG_SIZE 0 #endif // This is changed only when the command IDs change, -// so VIA Configurator can detect compatible firmware. +// so VIA Configurator can detect compatible firmware. #define VIA_PROTOCOL_VERSION 0x0009 -enum via_command_id -{ - id_get_protocol_version = 0x01, // always 0x01 +enum via_command_id { + id_get_protocol_version = 0x01, // always 0x01 id_get_keyboard_value, id_set_keyboard_value, id_dynamic_keymap_get_keycode, @@ -74,12 +73,7 @@ enum via_command_id id_unhandled = 0xFF, }; -enum via_keyboard_value_id -{ - id_uptime = 0x01, - id_layout_options, - id_switch_matrix_state -}; +enum via_keyboard_value_id { id_uptime = 0x01, id_layout_options, id_switch_matrix_state }; // Can't use SAFE_RANGE here, it might change if someone adds // new values to enum quantum_keycodes. @@ -108,22 +102,22 @@ enum via_keycodes { }; enum user_keycodes { - USER00 = 0x5F80, - USER01, - USER02, - USER03, - USER04, - USER05, - USER06, - USER07, - USER08, - USER09, - USER10, - USER11, - USER12, - USER13, - USER14, - USER15, + USER00 = 0x5F80, + USER01, + USER02, + USER03, + USER04, + USER05, + USER06, + USER07, + USER08, + USER09, + USER10, + USER11, + USER12, + USER13, + USER14, + USER15, }; // Can be called in an overriding via_init_kb() to test if keyboard level code usage of @@ -144,8 +138,7 @@ void via_init(void); // Used by VIA to store and retrieve the layout options. uint32_t via_get_layout_options(void); -void via_set_layout_options(uint32_t value); +void via_set_layout_options(uint32_t value); // Called by QMK core to process VIA-specific keycodes. bool process_record_via(uint16_t keycode, keyrecord_t *record); - diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index d6062703ee68..5dadba4fb7f3 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -48,7 +48,7 @@ int retro_tapping_counter = 0; #endif #ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY -__attribute__ ((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode) { return false; } +__attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode) { return false; } #endif #ifndef TAP_CODE_DELAY From 2bddfb986dfaa3cf6a3689d993f88bb2e693d725 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 19 Jan 2020 22:21:03 +1100 Subject: [PATCH 078/331] Remove tmk_core gitignore and gitmodules --- tmk_core/.gitignore | 13 ------------- tmk_core/.gitmodules | 0 2 files changed, 13 deletions(-) delete mode 100644 tmk_core/.gitignore delete mode 100644 tmk_core/.gitmodules diff --git a/tmk_core/.gitignore b/tmk_core/.gitignore deleted file mode 100644 index f3f46872a07e..000000000000 --- a/tmk_core/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.dep -*.o -*.eep -*.elf -*.hex -*.lss -*.lst -*.map -*.sym -tags -*~ -build/ -*.bak diff --git a/tmk_core/.gitmodules b/tmk_core/.gitmodules deleted file mode 100644 index e69de29bb2d1..000000000000 From ef33befa06f13384c06405174eb370d11a31491f Mon Sep 17 00:00:00 2001 From: Takuya Urakawa Date: Mon, 20 Jan 2020 03:54:04 +0900 Subject: [PATCH 079/331] [Keyboard] Add Tartan keyboard (#7917) * first commit * update keymap and key layout * Update for release * Update keyboards/tartan/config.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/keymaps/default/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/keymaps/default/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/keymaps/default/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/keymaps/test/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/keymaps/test/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Delete tartan/keymaps/test * Update keyboards/tartan/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Delete tartan/keymaps/default/config.h * Update keyboards/tartan/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/tartan/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Delete unneccesary settings * Fix tartan/rules.mk * Delete unnecessary code from tartan.c * Rearrange layout order in tartan.h * Update keyboards/tartan/usbconfig.h Co-Authored-By: fauxpark * Update keyboards/tartan/usbconfig.h Co-Authored-By: fauxpark * Update usb config * Update keyboards/tartan/usbconfig.h Co-Authored-By: fauxpark * Delete unused defines * Update keyboards/tartan/usbconfig.h Co-Authored-By: fauxpark * Update keyboards/tartan/usbconfig.h Co-Authored-By: fauxpark * Update keyboards/tartan/usbconfig.h Co-Authored-By: fauxpark Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: fauxpark --- keyboards/tartan/config.h | 248 +++++++++++++ keyboards/tartan/info.json | 34 ++ keyboards/tartan/keymaps/default/keymap.c | 34 ++ keyboards/tartan/keymaps/default/readme.md | 1 + keyboards/tartan/readme.md | 25 ++ keyboards/tartan/rules.mk | 41 +++ keyboards/tartan/tartan.c | 16 + keyboards/tartan/tartan.h | 111 ++++++ keyboards/tartan/usbconfig.h | 383 +++++++++++++++++++++ 9 files changed, 893 insertions(+) create mode 100644 keyboards/tartan/config.h create mode 100644 keyboards/tartan/info.json create mode 100644 keyboards/tartan/keymaps/default/keymap.c create mode 100644 keyboards/tartan/keymaps/default/readme.md create mode 100644 keyboards/tartan/readme.md create mode 100644 keyboards/tartan/rules.mk create mode 100644 keyboards/tartan/tartan.c create mode 100644 keyboards/tartan/tartan.h create mode 100644 keyboards/tartan/usbconfig.h diff --git a/keyboards/tartan/config.h b/keyboards/tartan/config.h new file mode 100644 index 000000000000..4c49b7e09be0 --- /dev/null +++ b/keyboards/tartan/config.h @@ -0,0 +1,248 @@ +/* +Copyright 2019 Takuya Urakawa (dm9records.com) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ +#define VENDOR_ID 0x16c0 +#define PRODUCT_ID 0x27db +#define DEVICE_VER 0x0001 +#define MANUFACTURER dm9records +#define PRODUCT Tartan +#define DESCRIPTION 60% keyboard with through hole components + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B4, B5, B3, B0, C0 } +#define MATRIX_COL_PINS { D7, D6, D5, D4, B1, B2, C1, C2, C3, C5, D1, D0, C4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define NO_UART 1 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tartan/info.json b/keyboards/tartan/info.json new file mode 100644 index 000000000000..72da8bd9d42d --- /dev/null +++ b/keyboards/tartan/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "Tartan # Through Hole", + "keyboard_folder": "tartan", + "url": "https://github.com/hsgw/tartan", + "maintainer": "hsgw(Takuya Urakawa)", + "width": 13, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "key_count": 61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi_split_bs": { + "key_count": 62, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":1}, {"label":"", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count": 63, + "layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"BS", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso": { + "key_count": 62, + "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso_split_bs": { + "key_count": 63, + "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "key_count": 64, + "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/tartan/keymaps/default/keymap.c b/keyboards/tartan/keymaps/default/keymap.c new file mode 100644 index 000000000000..6224b4e615bf --- /dev/null +++ b/keyboards/tartan/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/tartan/keymaps/default/readme.md b/keyboards/tartan/keymaps/default/readme.md new file mode 100644 index 000000000000..c829d5310368 --- /dev/null +++ b/keyboards/tartan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Tartan diff --git a/keyboards/tartan/readme.md b/keyboards/tartan/readme.md new file mode 100644 index 000000000000..83a3aebaeae4 --- /dev/null +++ b/keyboards/tartan/readme.md @@ -0,0 +1,25 @@ +# Tartan # Through Hole + +![tartan](https://i.imgur.com/1qSrVcs.jpg) + +A 60% keyboard with only through hole components. + +* Keyboard Maintainer: [hsgw](https://github.com/hsgw) +* Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/tartan) +* Hardware Availability: https://5z6p.com/products/tartan/ + +Make example for this keyboard (after setting up your build environment): + + make tartan:default + +Flash firmware: + + // In bootloader mode + make tartan:default:flash + +## Bootloader +use usbasploader in my repository. +https://github.com/hsgw/USBaspLoader/tree/plaid + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tartan/rules.mk b/keyboards/tartan/rules.mk new file mode 100644 index 000000000000..92658e2d051e --- /dev/null +++ b/keyboards/tartan/rules.mk @@ -0,0 +1,41 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + + +# disable debug code +OPT_DEFS = -DDEBUG_LEVEL=0 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift +LAYOUTS_HAS_RGB = no diff --git a/keyboards/tartan/tartan.c b/keyboards/tartan/tartan.c new file mode 100644 index 000000000000..b702633cc9ed --- /dev/null +++ b/keyboards/tartan/tartan.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "tartan.h" diff --git a/keyboards/tartan/tartan.h b/keyboards/tartan/tartan.h new file mode 100644 index 000000000000..e990088894c2 --- /dev/null +++ b/keyboards/tartan/tartan.h @@ -0,0 +1,111 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, KC_NO, k4b, KC_NO } \ +} + +#define LAYOUT_60_ansi_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, KC_NO } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k4c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, k4c } \ +} + +#define LAYOUT_60_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, KC_NO, k4b, KC_NO } \ +} + +#define LAYOUT_60_iso_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, KC_NO } \ +} + +#define LAYOUT_60_iso_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k4c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, k4c } \ +} + +#define LAYOUT_all LAYOUT_60_iso_split_bs_rshift diff --git a/keyboards/tartan/usbconfig.h b/keyboards/tartan/usbconfig.h new file mode 100644 index 000000000000..df896cfa915d --- /dev/null +++ b/keyboards/tartan/usbconfig.h @@ -0,0 +1,383 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'd','m','9','r','e','c','o','r','d','s' +#define USB_CFG_VENDOR_NAME_LEN 10 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'T', 'a', 'r', 't', 'a', 'n' +#define USB_CFG_DEVICE_NAME_LEN 6 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +#define USB_CFG_SERIAL_NUMBER 'd','m','9','r','e','c','o','r','d','s','.','c','o','m',':','t','1' +#define USB_CFG_SERIAL_NUMBER_LEN 17 +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +// /* #define USB_INTR_CFG_CLR 0 */ +// /* #define USB_INTR_ENABLE EIMSK */ +// #define USB_INTR_ENABLE_BIT INT1 +// /* #define USB_INTR_PENDING EIFR */ +// #define USB_INTR_PENDING_BIT INTF1 +// #define USB_INTR_VECTOR INT1_vect From dd2b793c0c288509de7ca9d2e16c2cb4e3f8d267 Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Sun, 19 Jan 2020 16:07:35 -0500 Subject: [PATCH 080/331] [Keyboard] Rebound keyboard add (#7886) * create Rebound keyboard * proofread * update decade * layer enums * revert enum layer changes * line spacing and such * product ID and punctuation * terminating terminating slashes * layer enums * remove slashes * rules change, rgb and spacing * plural layouts rgb rulez --- keyboards/montsinger/rebound/config.h | 62 +++++++ .../rebound/keymaps/default/keymap.c | 163 ++++++++++++++++++ keyboards/montsinger/rebound/readme.md | 15 ++ keyboards/montsinger/rebound/rebound.c | 1 + keyboards/montsinger/rebound/rebound.h | 39 +++++ keyboards/montsinger/rebound/rules.mk | 32 ++++ 6 files changed, 312 insertions(+) create mode 100644 keyboards/montsinger/rebound/config.h create mode 100644 keyboards/montsinger/rebound/keymaps/default/keymap.c create mode 100755 keyboards/montsinger/rebound/readme.md create mode 100644 keyboards/montsinger/rebound/rebound.c create mode 100644 keyboards/montsinger/rebound/rebound.h create mode 100644 keyboards/montsinger/rebound/rules.mk diff --git a/keyboards/montsinger/rebound/config.h b/keyboards/montsinger/rebound/config.h new file mode 100644 index 000000000000..271664d96f1e --- /dev/null +++ b/keyboards/montsinger/rebound/config.h @@ -0,0 +1,62 @@ +/* +Copyright 2020 Ross Montsinger +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x552F +#define DEVICE_VER 0x0002 +#define MANUFACTURER Montsinger +#define PRODUCT Rebound +#define DESCRIPTION "A conjoined Let's Split" + +/* key matrix size */ + +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on +diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + +#define MATRIX_ROW_PINS { D1, B5, B2, B6 } +#define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS { D2, D3 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/montsinger/rebound/keymaps/default/keymap.c b/keyboards/montsinger/rebound/keymaps/default/keymap.c new file mode 100644 index 000000000000..94d9ef91dcf0 --- /dev/null +++ b/keyboards/montsinger/rebound/keymaps/default/keymap.c @@ -0,0 +1,163 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layer_names +{ + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + } + return true; +} diff --git a/keyboards/montsinger/rebound/readme.md b/keyboards/montsinger/rebound/readme.md new file mode 100755 index 000000000000..d634408cc9a9 --- /dev/null +++ b/keyboards/montsinger/rebound/readme.md @@ -0,0 +1,15 @@ +# Rebound + +![Rebound](https://imgur.com/zMPhNmm.jpg) + +A conjoined-split 40% 4x12 ortholinear keyboard made and sold by Montsinger. [More info on Montsinger.net](https://montsinger.net). + +* Keyboard Maintainer: [Rossman360](https://github.com/rossman360) +* Hardware Supported: Pro Micro, Elite-C +* Hardware Availability: [Montsinger.net](https://montsinger.net) + +Make example for this keyboard (after setting up your build environment): + + make montsinger/rebound:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) \ No newline at end of file diff --git a/keyboards/montsinger/rebound/rebound.c b/keyboards/montsinger/rebound/rebound.c new file mode 100644 index 000000000000..fbb10be7136d --- /dev/null +++ b/keyboards/montsinger/rebound/rebound.c @@ -0,0 +1 @@ +#include "rebound.h" diff --git a/keyboards/montsinger/rebound/rebound.h b/keyboards/montsinger/rebound/rebound.h new file mode 100644 index 000000000000..0ba4c51cebb9 --- /dev/null +++ b/keyboards/montsinger/rebound/rebound.h @@ -0,0 +1,39 @@ +/* Copyright 2020 Ross Montsinger + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * The first section contains all of the arguments representing the + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B\ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \ +} diff --git a/keyboards/montsinger/rebound/rules.mk b/keyboards/montsinger/rebound/rules.mk new file mode 100644 index 000000000000..efa31330399f --- /dev/null +++ b/keyboards/montsinger/rebound/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = ortho_4x12 +LAYOUTS_HAS_RGB=no From 4da241968cb9374f680e0133e5a1c828643df52b Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Sun, 19 Jan 2020 16:08:09 -0500 Subject: [PATCH 081/331] [Keyboard] Rebound keyboard add (#7886) * create Rebound keyboard * proofread * update decade * layer enums * revert enum layer changes * line spacing and such * product ID and punctuation * terminating terminating slashes * layer enums * remove slashes * rules change, rgb and spacing * plural layouts rgb rulez From 65f7bfcc8dbd47557846047457191d871faffff4 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 19 Jan 2020 21:59:57 +0000 Subject: [PATCH 082/331] Fix unknown key 'IndentPPDirectives' on CI (#7933) --- .travis.yml | 19 ++++++++++++------- util/travis_compiled_push.sh | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index bfac998c11ed..d137a4209607 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,18 @@ env: - MAKEFLAGS="-j3 --output-sync" services: - docker +addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty-7 + packages: + - pandoc + - diffutils + - dos2unix + - doxygen + - clang-format-7 + - libstdc++-7-dev install: - npm install -g moxygen script: @@ -20,13 +32,6 @@ script: - bash util/travis_test.sh - bash util/travis_build.sh - bash util/travis_docs.sh -addons: - apt: - packages: - - pandoc - - diffutils - - dos2unix - - doxygen after_script: bash util/travis_compiled_push.sh notifications: diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index c18e42a29327..68f6d5c1149f 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -13,7 +13,7 @@ if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; the # fix formatting git checkout master git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix -git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} '*.c' '*.h' '*.cpp' | grep -z -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | grep -zv -e 'quantum/template' -e 'tmk_core/protocol/usb_hid' | xargs -0 clang-format -i +git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} '*.c' '*.h' '*.cpp' | grep -z -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | grep -zv -e 'quantum/template' -e 'tmk_core/protocol/usb_hid' | xargs -0 clang-format-7 -i git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 git add git commit -m "format code according to conventions [skip ci]" && git push git@github.com:qmk/qmk_firmware.git master From 31c0fe69f6f0b9e3a88e7f4cc6388727aecbeb08 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 20 Jan 2020 09:05:54 +1100 Subject: [PATCH 083/331] [Docs] Misc cleanups for OLED documentation (#7864) --- docs/feature_oled_driver.md | 227 ++++++++++++++++++------------------ 1 file changed, 115 insertions(+), 112 deletions(-) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index b124ba5a8f5d..29548cb8204d 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -1,139 +1,142 @@ # OLED Driver -## OLED Supported Hardware +## Supported Hardware OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C. Tested combinations: -| IC driver | Size | Keyboard Platform | Notes | -|-----------|--------|-------------------|--------------------------| -| SSD1306 | 128x32 | AVR | Primary support | -| SSD1306 | 128x64 | AVR | Verified working | -| SSD1306 | 128x32 | ARM | | -| SH1106 | 128x64 | AVR | No rotation or scrolling | +|IC |Size |Platform|Notes | +|---------|------|--------|------------------------| +|SSD1306 |128x32|AVR |Primary support | +|SSD1306 |128x64|AVR |Verified working | +|SSD1306 |128x32|Arm | | +|SH1106 |128x64|AVR |No rotation or scrolling| -Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested. +Hardware configurations using Arm-based microcontrollers or different sizes of OLED modules may be compatible, but are untested. -!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses split common to detect keypresses, so you will need to implement custom timeout logic for non-split common keyboards. +!> Warning: This OLED driver currently uses the new i2c_master driver from Split Common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest Split Common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses Split Common to detect keypresses, so you will need to implement custom timeout logic for non-Split Common keyboards. ## Usage -To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to set `OLED_DRIVER_ENABLE=yes` in `rules.mk`, e.g.: +To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`: -``` +```make OLED_DRIVER_ENABLE = yes ``` -This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keymap.c` file, you will need to implement the user task call, e.g: +Then in your `keymap.c` file, implement the OLED task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`: -```C++ +```c #ifdef OLED_DRIVER_ENABLE void oled_task_user(void) { - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case _QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case _FN: - oled_write_P(PSTR("FN\n"), false); - break; - case _ADJ: - oled_write_P(PSTR("ADJ\n"), false); - break; - default: - // Or use the write_ln shortcut over adding '\n' to the end of your string - oled_write_ln_P(PSTR("Undefined"), false); - } - - // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(led_usb_state & (1<Useful for 128x64 displays centered on a 132x64 SH1106 IC. | +## Basic Configuration + +|Define |Default |Description | +|---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------| +|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | +|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | +|`OLED_FONT_START` |`0` |The starting characer index for custom fonts | +|`OLED_FONT_END` |`224` |The ending characer index for custom fonts | +|`OLED_FONT_WIDTH` |`6` |The font width | +|`OLED_FONT_HEIGHT` |`8` |The font height (untested) | +|`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | +|`OLED_SCROLL_TIMEOUT` |`0` |Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | +|`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. | +|`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. | +|`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.
Useful for 128x64 displays centered on a 132x64 SH1106 IC.| ## 128x64 & Custom sized OLED Displays The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind. We have added a define, `OLED_DISPLAY_128X64`, to switch all the values to be used in a 128x64 display, as well as added a custom define, `OLED_DISPLAY_CUSTOM`, that allows you to provide the necessary values to the driver. -|Define |Default |Description | -|-----------------------|---------------|-----------------------------------------------------------------| -|`OLED_DISPLAY_128X64` |*Not defined* |Changes the display defines for use with 128x64 displays. | -|`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.
Requires user to implement the below defines. | -|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. | -|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. | -|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. | -|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. | -|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(OLED_BLOCK_TYPE) * 8)`. | -|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. | -|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.
Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`. | -|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. | -|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. | +|Define |Default |Description | +|---------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------| +|`OLED_DISPLAY_128X64`|*Not defined* |Changes the display defines for use with 128x64 displays. | +|`OLED_DISPLAY_CUSTOM`|*Not defined* |Changes the display defines for use with custom displays.
Requires user to implement the below defines. | +|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. | +|`OLED_DISPLAY_HEIGHT`|`32` |The height of the OLED display. | +|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. | +|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. | +|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(OLED_BLOCK_TYPE) * 8)`. | +|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. | +|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.
Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`.| +|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. | +|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. | -### 90 Degree Rotation - Technical Mumbo Jumbo +### 90 Degree Rotation - Technical Mumbo Jumbo !> Rotation is unsupported on the SH1106. -```C +```c // OLED Rotation enum values are flags typedef enum { OLED_ROTATION_0 = 0, @@ -143,9 +146,9 @@ typedef enum { } oled_rotation_t; ``` - OLED displays driven by SSD1306 drivers only natively support in hard ware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an `atmega32u4` board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms. - - 90 Degree Rotated Rendering is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the OLED Height, Width, and Block Size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g: +OLED displays driven by SSD1306 drivers only natively support in hardware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an ATmega32U4 board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms. + +90 degree rotation is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the display height, width, and block size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g: | | | | | | | |---|---|---|---|---|---| @@ -167,8 +170,8 @@ So those precalculated arrays just index the memory offsets in the order in whic ## OLED API -```C++ -// OLED Rotation enum values are flags +```c +// OLED rotation enum values are flags typedef enum { OLED_ROTATION_0 = 0, OLED_ROTATION_90 = 1, @@ -272,26 +275,26 @@ uint8_t oled_max_lines(void); !> Scrolling and rotation are unsupported on the SH1106. -## SSD1306.h driver conversion guide - -|Old API |Recommended New API | -|---------------------------|-----------------------------------| -|`struct CharacterMatrix` |*removed - delete all references* | -|`iota_gfx_init` |`oled_init` | -|`iota_gfx_on` |`oled_on` | -|`iota_gfx_off` |`oled_off` | -|`iota_gfx_flush` |`oled_render` | -|`iota_gfx_write_char` |`oled_write_char` | -|`iota_gfx_write` |`oled_write` | -|`iota_gfx_write_P` |`oled_write_P` | -|`iota_gfx_clear_screen` |`oled_clear` | -|`matrix_clear` |*removed - delete all references* | -|`matrix_write_char_inner` |`oled_write_char` | -|`matrix_write_char` |`oled_write_char` | -|`matrix_write` |`oled_write` | -|`matrix_write_ln` |`oled_write_ln` | -|`matrix_write_P` |`oled_write_P` | -|`matrix_write_ln_P` |`oled_write_ln_P` | -|`matrix_render` |`oled_render` | -|`iota_gfx_task` |`oled_task` | -|`iota_gfx_task_user` |`oled_task_user` | +## SSD1306.h Driver Conversion Guide + +|Old API |Recommended New API | +|-------------------------|---------------------------------| +|`struct CharacterMatrix` |*removed - delete all references*| +|`iota_gfx_init` |`oled_init` | +|`iota_gfx_on` |`oled_on` | +|`iota_gfx_off` |`oled_off` | +|`iota_gfx_flush` |`oled_render` | +|`iota_gfx_write_char` |`oled_write_char` | +|`iota_gfx_write` |`oled_write` | +|`iota_gfx_write_P` |`oled_write_P` | +|`iota_gfx_clear_screen` |`oled_clear` | +|`matrix_clear` |*removed - delete all references*| +|`matrix_write_char_inner`|`oled_write_char` | +|`matrix_write_char` |`oled_write_char` | +|`matrix_write` |`oled_write` | +|`matrix_write_ln` |`oled_write_ln` | +|`matrix_write_P` |`oled_write_P` | +|`matrix_write_ln_P` |`oled_write_ln_P` | +|`matrix_render` |`oled_render` | +|`iota_gfx_task` |`oled_task` | +|`iota_gfx_task_user` |`oled_task_user` | From 251a69ea3d63ac8783e30b6e03e3866b9579af72 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Mon, 20 Jan 2020 01:23:03 +0100 Subject: [PATCH 084/331] [Keyboard] Add mx5160 keyboard (#7142) * Add mx5160 keyboard * Make necessary changes for merging rules.mk cleanup, QMK's built in alias for KC_TRNS and change readme blurb * Add info.json as well * Update readme, info.json * Change layout name, update led function * Fix info.json * Update rules.mk --- keyboards/maartenwut/mx5160/config.h | 252 ++++++++++++++++++ keyboards/maartenwut/mx5160/info.json | 12 + .../mx5160/keymaps/default/keymap.c | 41 +++ .../mx5160/keymaps/default/readme.md | 1 + keyboards/maartenwut/mx5160/mx5160.c | 58 ++++ keyboards/maartenwut/mx5160/mx5160.h | 47 ++++ keyboards/maartenwut/mx5160/readme.md | 15 ++ keyboards/maartenwut/mx5160/rules.mk | 33 +++ 8 files changed, 459 insertions(+) create mode 100644 keyboards/maartenwut/mx5160/config.h create mode 100644 keyboards/maartenwut/mx5160/info.json create mode 100644 keyboards/maartenwut/mx5160/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/mx5160/keymaps/default/readme.md create mode 100644 keyboards/maartenwut/mx5160/mx5160.c create mode 100644 keyboards/maartenwut/mx5160/mx5160.h create mode 100644 keyboards/maartenwut/mx5160/readme.md create mode 100644 keyboards/maartenwut/mx5160/rules.mk diff --git a/keyboards/maartenwut/mx5160/config.h b/keyboards/maartenwut/mx5160/config.h new file mode 100644 index 000000000000..7d3be79386f8 --- /dev/null +++ b/keyboards/maartenwut/mx5160/config.h @@ -0,0 +1,252 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x5160 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT MX-5160 +#define DESCRIPTION Replacement PCB for the Chicony 5160c + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS {C6,C7,B5,B6,D7,B4,D4,D6,D5,D3} +#define MATRIX_COL_PINS {D0,D1,D2,F7,F6,F5,F4,F1,F0,E6} +#define UNUSED_PINS {B7,B0} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +// For QMK DFU +#define QMK_ESC_OUTPUT C6 +#define QMK_ESC_INPUT D1 +#define QMK_LED B1 +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/maartenwut/mx5160/info.json b/keyboards/maartenwut/mx5160/info.json new file mode 100644 index 000000000000..8962522ba4e4 --- /dev/null +++ b/keyboards/maartenwut/mx5160/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "mx5160", + "url": "https://github.com/Maartenwut/mx-5160", + "maintainer": "qmk", + "width": 22, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":18, "y":0}, {"x":19, "y":0}, {"x":20, "y":0}, {"x":21, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.5, "y":1, "w":1.5}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1, "w":1.5}, {"x":18, "y":1}, {"x":19, "y":1}, {"x":20, "y":1}, {"x":21, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "y":2, "w":1.75}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2}, {"x":15.25, "y":2}, {"x":16.25, "y":2, "w":1.25}, {"x":18, "y":2}, {"x":19, "y":2}, {"x":20, "y":2}, {"x":21, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3}, {"x":14.75, "y":3, "w":1.75}, {"x":16.5, "y":3}, {"x":18, "y":3}, {"x":19, "y":3}, {"x":20, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":1.5}, {"x":6.5, "y":4, "w":7}, {"x":13.5, "y":4, "w":1.5}, {"x":16, "y":4, "w":1.5}, {"x":18, "y":4}, {"x":19, "y":4}, {"x":20, "y":4}, {"x":21, "y":3, "h":2}] + } + } +} \ No newline at end of file diff --git a/keyboards/maartenwut/mx5160/keymaps/default/keymap.c b/keyboards/maartenwut/mx5160/keymaps/default/keymap.c new file mode 100644 index 000000000000..be6cc89f6820 --- /dev/null +++ b/keyboards/maartenwut/mx5160/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _MA 0 //Main layer +#define _FN 1 //Main layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_MA] = LAYOUT_all( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, _______, \ + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_F7, KC_F8, KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _______, KC_P1, KC_P2, KC_P3, \ + KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_P0, _______, KC_PDOT, KC_PENT), \ + +[_FN] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_PSCR, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ + +}; diff --git a/keyboards/maartenwut/mx5160/keymaps/default/readme.md b/keyboards/maartenwut/mx5160/keymaps/default/readme.md new file mode 100644 index 000000000000..c93867735245 --- /dev/null +++ b/keyboards/maartenwut/mx5160/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the mx-5160 PCB. \ No newline at end of file diff --git a/keyboards/maartenwut/mx5160/mx5160.c b/keyboards/maartenwut/mx5160/mx5160.c new file mode 100644 index 000000000000..96859693c25a --- /dev/null +++ b/keyboards/maartenwut/mx5160/mx5160.c @@ -0,0 +1,58 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mx5160.h" + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +void led_init_ports(void) { + //Set led pin as output, then high (off) + + //Caps lock + setPinOutput(B1); + writePinHigh(B1); + + //Num lock + setPinOutput(B2); + writePinHigh(B2); + + //Scroll lock + setPinOutput(B3); + writePinHigh(B3); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(B2, !led_state.num_lock); + writePin(B1, !led_state.caps_lock); + writePin(B3, !led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/maartenwut/mx5160/mx5160.h b/keyboards/maartenwut/mx5160/mx5160.h new file mode 100644 index 000000000000..89179a7f8282 --- /dev/null +++ b/keyboards/maartenwut/mx5160/mx5160.h @@ -0,0 +1,47 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k87, k17, k08, k18, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k38, k29, k39, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k48, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k78, k69, \ + k80, k90, k81, k82, k94, k96, k97, k88, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, XXX }, \ + { k80, k81, k82, XXX, XXX, XXX, XXX, k87, k88, k89 }, \ + { k90, XXX, XXX, XXX, k94, XXX, k96, k97, k98, k99 } \ +} diff --git a/keyboards/maartenwut/mx5160/readme.md b/keyboards/maartenwut/mx5160/readme.md new file mode 100644 index 000000000000..40753a8f55a8 --- /dev/null +++ b/keyboards/maartenwut/mx5160/readme.md @@ -0,0 +1,15 @@ +# mx5160 + +![mx5160](https://i.imgur.com/XZ9xUeq.jpg) + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: mx-5160 (Chicony 5160c case) +* Hardware Availability: [Github](https://github.com/Maartenwut/mx-5160) + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/mx5160:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/maartenwut/mx5160/rules.mk b/keyboards/maartenwut/mx5160/rules.mk new file mode 100644 index 000000000000..eb1e55955bce --- /dev/null +++ b/keyboards/maartenwut/mx5160/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 80d329bb554f69630cda0376a51314698ad0ccdd Mon Sep 17 00:00:00 2001 From: Spaceman Date: Sun, 19 Jan 2020 21:07:30 -0500 Subject: [PATCH 085/331] [Keyboard] Addition Eagle II keyboard (#7927) * add EagleII Keyboard * Update eagleii.c * Update eagleii.h * Update keymap.c * Update eagleii.h * Update keymap.c * Update keyboards/handwired/eagleii/config.h * Update keyboards/handwired/eagleii/config.h * Update keyboards/handwired/eagleii/rules.mk * Update config.h * Update rules.mk * Update eagleii.h * Update eagleii.h * Update keymap.c * Update info.json * Update keyboards/handwired/eagleii/rules.mk * Update keyboards/handwired/eagleii/rules.mk * Create readme.md * Update keyboards/handwired/eagleii/readme.md * Update keyboards/handwired/eagleii/config.h * Update keyboards/handwired/eagleii/readme.md * Update keyboards/handwired/eagleii/readme.md --- keyboards/handwired/eagleii/config.h | 19 ++++ keyboards/handwired/eagleii/eagleii.c | 1 + keyboards/handwired/eagleii/eagleii.h | 24 +++++ keyboards/handwired/eagleii/info.json | 88 +++++++++++++++++++ .../eagleii/keymaps/default/keymap.c | 12 +++ keyboards/handwired/eagleii/readme.md | 15 ++++ keyboards/handwired/eagleii/rules.mk | 26 ++++++ 7 files changed, 185 insertions(+) create mode 100644 keyboards/handwired/eagleii/config.h create mode 100644 keyboards/handwired/eagleii/eagleii.c create mode 100644 keyboards/handwired/eagleii/eagleii.h create mode 100644 keyboards/handwired/eagleii/info.json create mode 100644 keyboards/handwired/eagleii/keymaps/default/keymap.c create mode 100644 keyboards/handwired/eagleii/readme.md create mode 100644 keyboards/handwired/eagleii/rules.mk diff --git a/keyboards/handwired/eagleii/config.h b/keyboards/handwired/eagleii/config.h new file mode 100644 index 000000000000..c66cb18134b9 --- /dev/null +++ b/keyboards/handwired/eagleii/config.h @@ -0,0 +1,19 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9789 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Eagle +#define PRODUCT II +#define DESCRIPTION Eagle II Keyboard + +#define MATRIX_ROWS 12 +#define MATRIX_COLS 12 +#define MATRIX_ROW_PINS { D0, B5, F1, B2, F7, F6, D4, D7, B4, B7, F5, B0 } +#define MATRIX_COL_PINS { D2, C6, E6, D5, B3, D3, D1, C7, F0, B6, B1, F4 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 diff --git a/keyboards/handwired/eagleii/eagleii.c b/keyboards/handwired/eagleii/eagleii.c new file mode 100644 index 000000000000..5abd5b92f905 --- /dev/null +++ b/keyboards/handwired/eagleii/eagleii.c @@ -0,0 +1 @@ +#include "eagleii.h" diff --git a/keyboards/handwired/eagleii/eagleii.h b/keyboards/handwired/eagleii/eagleii.h new file mode 100644 index 000000000000..5f3acac79842 --- /dev/null +++ b/keyboards/handwired/eagleii/eagleii.h @@ -0,0 +1,24 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K47, K27, K37, K38, K28, K39, K29, K34, K24, K31, K21, K32, K22, K33, K23, K0A, K0B, K46, K44, \ + K17, K97, K18, K98, K19, K99, K14, K94, K11, K91, K12, K92, K13, K83, K8A, K8B, K43, K4A, \ + KA0, K77, K88, K78, K89, K79, K84, K74, K81, K71, K82, K72, K93, K1A, K1B, K42, K6B, \ + K50, K87, K08, K68, K09, K69, K04, K61, K01, K62, K02, K70, K6A, K41, \ + KB5, K66, K07, K64, K76, K03 \ +) { \ + { KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K07, K08, K09, K0A, K0B }, \ + { KC_NO, K11, K12, K13, K14, KC_NO, KC_NO, K17, K18, K19, K1A, K1B }, \ + { KC_NO, K21, K22, K23, K24, KC_NO, KC_NO, K27, K28, K29, KC_NO, KC_NO }, \ + { KC_NO, K31, K32, K33, K34, KC_NO, KC_NO, K37, K38, K39, KC_NO, KC_NO }, \ + { KC_NO, K41, K42, K43, K44, KC_NO, K46, K47, KC_NO, KC_NO, K4A, KC_NO }, \ + { K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, K62, KC_NO, K64, KC_NO, K66, KC_NO, K68, K69, K6A, K6B }, \ + { K70, K71, K72, KC_NO, K74, KC_NO, K76, K77, K78, K79, KC_NO, KC_NO }, \ + { KC_NO, K81, K82, K83, K84, KC_NO, KC_NO, K87, K88, K89, K8A, K8B }, \ + { KC_NO, K91, K92, K93, K94, KC_NO, KC_NO, K97, K98, K99, KC_NO, KC_NO }, \ + { KA0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/handwired/eagleii/info.json b/keyboards/handwired/eagleii/info.json new file mode 100644 index 000000000000..4c2edde6e78e --- /dev/null +++ b/keyboards/handwired/eagleii/info.json @@ -0,0 +1,88 @@ +{ + "keyboard_name": "EagleII", + "url": "", + "maintainer": "Spaceman", + "width": 21.5, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 74, + "layout": [ + {"label":"K47 (F7,C7)", "x":0, "y":0, "w":1.5}, + {"label":"K27 (F1,C7)", "x":1.5, "y":0}, + {"label":"K37 (B2,C7)", "x":2.5, "y":0}, + {"label":"K38 (B2,F0)", "x":3.5, "y":0}, + {"label":"K28 (F1,F0)", "x":4.5, "y":0}, + {"label":"K39 (B2,B6)", "x":5.5, "y":0}, + {"label":"K29 (F1,B6)", "x":6.5, "y":0}, + {"label":"K34 (B2,B3)", "x":7.5, "y":0}, + {"label":"K24 (F1,B3)", "x":8.5, "y":0}, + {"label":"K31 (B2,C6)", "x":9.5, "y":0}, + {"label":"K21 (F1,C6)", "x":10.5, "y":0}, + {"label":"K32 (B2,E6)", "x":11.5, "y":0}, + {"label":"K22 (F1,E6)", "x":12.5, "y":0}, + {"label":"K33 (B2,D5)", "x":13.5, "y":0}, + {"label":"K23 (F1,D5)", "x":14.5, "y":0}, + {"label":"K0A (D0,B1)", "x":16.5, "y":0}, + {"label":"K0B (D0,F4)", "x":17.5, "y":0}, + {"label":"K46 (F7,D1)", "x":18.5, "y":0}, + {"label":"K44 (F7,B3)", "x":20.5, "y":0}, + {"label":"K17 (B5,C7)", "x":0, "y":1, "w":2}, + {"label":"K97 (B7,C7)", "x":2, "y":1}, + {"label":"K18 (B5,F0)", "x":3, "y":1}, + {"label":"K98 (B7,F0)", "x":4, "y":1}, + {"label":"K19 (B5,B6)", "x":5, "y":1}, + {"label":"K99 (B7,B6)", "x":6, "y":1}, + {"label":"K14 (B5,B3)", "x":7, "y":1}, + {"label":"K94 (B7,B3)", "x":8, "y":1}, + {"label":"K11 (B5,C6)", "x":9, "y":1}, + {"label":"K91 (B7,C6)", "x":10, "y":1}, + {"label":"K12 (B5,E6)", "x":11, "y":1}, + {"label":"K92 (B7,E6)", "x":12, "y":1}, + {"label":"K13 (B5,D5)", "x":13, "y":1}, + {"label":"K83 (B4,D5)", "x":14, "y":1, "w":1.5}, + {"label":"K8A (B4,B1)", "x":16.5, "y":1}, + {"label":"K8B (B4,F4)", "x":17.5, "y":1}, + {"label":"K43 (F7,D5)", "x":18.5, "y":1}, + {"label":"K4A (F7,B1)", "x":20.5, "y":1}, + {"label":"KA0 (F5,D2)", "x":0.25, "y":2, "w":2}, + {"label":"K77 (D7,C7)", "x":2.25, "y":2}, + {"label":"K88 (B4,F0)", "x":3.25, "y":2}, + {"label":"K78 (D7,F0)", "x":4.25, "y":2}, + {"label":"K89 (B4,B6)", "x":5.25, "y":2}, + {"label":"K79 (D7,B6)", "x":6.25, "y":2}, + {"label":"K84 (B4,B3)", "x":7.25, "y":2}, + {"label":"K74 (D7,B3)", "x":8.25, "y":2}, + {"label":"K81 (B4,C6)", "x":9.25, "y":2}, + {"label":"K71 (D7,C6)", "x":10.25, "y":2}, + {"label":"K82 (B4,E6)", "x":11.25, "y":2}, + {"label":"K72 (D7,E6)", "x":12.25, "y":2}, + {"label":"K93 (B7,D5)", "x":13.25, "y":2, "w":2}, + {"label":"K1A (B5,B1)", "x":16.5, "y":2}, + {"label":"K1B (B5,F4)", "x":17.5, "y":2}, + {"label":"K42 (F7,E6)", "x":18.5, "y":2}, + {"label":"K6B (D4,F4)", "x":20.5, "y":2, "h":2}, + {"label":"K50 (F6,D2)", "x":0.75, "y":3, "w":2}, + {"label":"K87 (B4,C7)", "x":2.75, "y":3}, + {"label":"K08 (D0,F0)", "x":3.75, "y":3}, + {"label":"K68 (D4,F0)", "x":4.75, "y":3}, + {"label":"K09 (D0,B6)", "x":5.75, "y":3}, + {"label":"K69 (D4,B6)", "x":6.75, "y":3}, + {"label":"K04 (D0,B3)", "x":7.75, "y":3}, + {"label":"K61 (D4,C6)", "x":8.75, "y":3}, + {"label":"K01 (D0,C6)", "x":9.75, "y":3}, + {"label":"K62 (D4,E6)", "x":10.75, "y":3}, + {"label":"K02 (D0,E6)", "x":11.75, "y":3}, + {"label":"K70 (D7,D2)", "x":12.75, "y":3, "w":2}, + {"label":"K6A (D4,B1)", "x":16.5, "y":3, "w":2}, + {"label":"K41 (F7,C6)", "x":18.5, "y":3}, + {"label":"KB5 (B0,D3)", "x":0.75, "y":4}, + {"label":"K66 (D4,D1)", "x":1.75, "y":4}, + {"label":"K07 (D0,C7)", "x":2.75, "y":4}, + {"label":"K64 (D4,B3)", "x":3.75, "y":4, "w":8}, + {"label":"K76 (D7,D1)", "x":11.75, "y":4}, + {"label":"K03 (D0,D5)", "x":12.75, "y":4, "w":2} + ] + } + } +} diff --git a/keyboards/handwired/eagleii/keymaps/default/keymap.c b/keyboards/handwired/eagleii/keymaps/default/keymap.c new file mode 100644 index 000000000000..dc26b8049ab0 --- /dev/null +++ b/keyboards/handwired/eagleii/keymaps/default/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_LABK, KC_BSLS, KC_7, KC_8, KC_9, KC_F1, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_INS, KC_DEL, KC_SPC, KC_4, KC_5, KC_6, KC_F2, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_1, KC_2, KC_3, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_0, KC_DOT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_MENU, KC_RABK + ), + +}; diff --git a/keyboards/handwired/eagleii/readme.md b/keyboards/handwired/eagleii/readme.md new file mode 100644 index 000000000000..d23e2702837d --- /dev/null +++ b/keyboards/handwired/eagleii/readme.md @@ -0,0 +1,15 @@ +# Eagle II Keyboard + +![Eagle II](https://upload.wikimedia.org/wikipedia/en/a/ae/Eagleiicomp.jpg) + +A handwired conversion of an Eagle II computer. + +* Keyboard Maintainer: [Spaceman](https://github.com/rionlion100) +* Hardware Supported: Eagle II Keyboard +* Hardware Availability: Not available + +Make example for this keyboard (after setting up your build environment): + + make handwired/eagleii:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/eagleii/rules.mk b/keyboards/handwired/eagleii/rules.mk new file mode 100644 index 000000000000..e45af67e51bf --- /dev/null +++ b/keyboards/handwired/eagleii/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = no +NKRO_ENABLE = no +BACKLIGHT_ENABLE = no +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no From 20290a1cffc074ae41a550fa6468cb2ed1dd3027 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 24 Nov 2019 20:24:47 +0100 Subject: [PATCH 086/331] MILC: Fix/complete attribute heritance If an undefined attribute of a submodule is accessed, fall back to same attribute of the submodule's parent. --- lib/python/milc.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/python/milc.py b/lib/python/milc.py index 4392c8376ae2..92b1278f4cc7 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -178,8 +178,9 @@ def __init__(self, parent, *args, **kwargs): def __getitem__(self, key): """Returns a config value, pulling from the `user` section as a fallback. + This is called when the attribute is accessed either via the get method or through [ ] index. """ - if key in self._config: + if key in self._config and self._config[key]: return self._config[key] elif key in self.parent.user: @@ -187,6 +188,15 @@ def __getitem__(self, key): return None + def __getattr__(self, key): + """Returns the config value from the `user` section. + This is called when the attribute is accessed via dot notation but does not exists. + """ + if key in self.parent.user: + return self.parent.user[key] + + return None + def handle_store_boolean(self, *args, **kwargs): """Does the add_argument for action='store_boolean'. @@ -519,7 +529,10 @@ def merge_args_into_config(self): self.config[section][argument] = arg_value else: if argument not in self.config[section]: - self.config[section][argument] = getattr(self.args, argument) + # Check if the argument exist for this section + arg = getattr(self.args, argument) + if arg: + self.config[section][argument] = arg self.release_lock() From e7f6e90a22306903fd38a39c95639776a9e07b5b Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 12 Jan 2020 11:21:49 +0100 Subject: [PATCH 087/331] Fix commandline arg merging, small improvements Commandline args should be merged with the submodule's config. Compare config values to None instead of False, so empty lines and False can be used as values. --- lib/python/milc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/milc.py b/lib/python/milc.py index 92b1278f4cc7..bc08a87b6db8 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -180,7 +180,7 @@ def __getitem__(self, key): """Returns a config value, pulling from the `user` section as a fallback. This is called when the attribute is accessed either via the get method or through [ ] index. """ - if key in self._config and self._config[key]: + if key in self._config and self._config.get(key) is not None: return self._config[key] elif key in self.parent.user: @@ -523,7 +523,7 @@ def merge_args_into_config(self): exit(1) # Merge this argument into self.config - if argument in self.default_arguments: + if argument in self.default_arguments[section]: arg_value = getattr(self.args, argument) if arg_value: self.config[section][argument] = arg_value @@ -531,7 +531,7 @@ def merge_args_into_config(self): if argument not in self.config[section]: # Check if the argument exist for this section arg = getattr(self.args, argument) - if arg: + if arg is not None: self.config[section][argument] = arg self.release_lock() From 1f86e8ae9ac5035c7dd359880b4534f5145a215f Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 12 Jan 2020 14:56:11 +0100 Subject: [PATCH 088/331] Fix attribute heritance for long commands. This is needed for inheritance to work with commands that have dashes in their names. --- lib/python/milc.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/python/milc.py b/lib/python/milc.py index bc08a87b6db8..36072ca76415 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -511,7 +511,10 @@ def merge_args_into_config(self): if argument not in self.arg_only: # Find the argument's section - if self._entrypoint.__name__ in self.default_arguments and argument in self.default_arguments[self._entrypoint.__name__]: + # Underscores in command's names are converted to dashes during initialization. + # TODO(Erovia) Find a better solution + entrypoint_name = self._entrypoint.__name__.replace("_", "-") + if entrypoint_name in self.default_arguments and argument in self.default_arguments[entrypoint_name]: argument_found = True section = self._entrypoint.__name__ if argument in self.default_arguments['general']: @@ -523,12 +526,12 @@ def merge_args_into_config(self): exit(1) # Merge this argument into self.config - if argument in self.default_arguments[section]: + if argument in self.default_arguments['general'] or argument in self.default_arguments[entrypoint_name]: arg_value = getattr(self.args, argument) - if arg_value: + if arg_value is not None: self.config[section][argument] = arg_value else: - if argument not in self.config[section]: + if argument not in self.config[entrypoint_name]: # Check if the argument exist for this section arg = getattr(self.args, argument) if arg is not None: From ef8a4e5aaf27fa21556a75c58ae4d033d6329cf7 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 20 Jan 2020 18:05:51 +1100 Subject: [PATCH 089/331] Remove all references to "CUSTOM_MATRIX" as a diode direction (#7937) --- keyboards/40percentclub/nano/config.h | 3 --- keyboards/abstract/ellipse/rev1/config.h | 2 +- keyboards/ai03/orbit/config.h | 2 +- keyboards/boardwalk/config.h | 2 +- keyboards/ckeys/thedora/config.h | 2 +- keyboards/converter/palm_usb/config.h | 2 -- keyboards/converter/sun_usb/config.h | 2 -- keyboards/converter/usb_usb/config.h | 9 --------- keyboards/coseyfannitutti/mullet/config.h | 2 +- keyboards/coseyfannitutti/mulletpad/config.h | 2 +- keyboards/dozen0/config.h | 2 +- keyboards/ep/comsn/hs68/config.h | 2 +- keyboards/ep/comsn/mollydooker/config.h | 2 +- keyboards/fluorite/config.h | 2 +- keyboards/halberd/config.h | 2 +- keyboards/handwired/42/config.h | 2 +- keyboards/handwired/co60/rev1/config.h | 2 +- keyboards/handwired/co60/rev6/config.h | 2 +- keyboards/handwired/co60/rev7/config.h | 2 +- keyboards/handwired/daishi/config.h | 2 +- keyboards/handwired/steamvan/rev1/config.h | 2 +- keyboards/handwired/tennie/config.h | 2 +- keyboards/hecomi/alpha/config.h | 2 +- keyboards/kagamidget/config.h | 2 +- keyboards/peiorisboards/ixora/config.h | 2 +- keyboards/primekb/prime_e/config.h | 2 +- keyboards/scythe/config.h | 2 +- keyboards/sirius/unigo66/config.h | 5 ----- keyboards/snampad/config.h | 2 +- keyboards/standaside/config.h | 2 +- keyboards/treadstone32/config.h | 2 +- keyboards/westfoxtrot/cypher/config.h | 2 +- quantum/config_common.h | 1 - 33 files changed, 27 insertions(+), 49 deletions(-) diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h index 5eb65c74ad81..8ee6963e49ce 100644 --- a/keyboards/40percentclub/nano/config.h +++ b/keyboards/40percentclub/nano/config.h @@ -50,9 +50,6 @@ along with this program. If not, see . } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -//#define DIODE_DIRECTION CUSTOM_MATRIX - /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h index 36a4fc40f2aa..15606f3d44ce 100644 --- a/keyboards/abstract/ellipse/rev1/config.h +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, B6, B5 } #define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN C6 diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h index 00945ac79696..051b924b8777 100644 --- a/keyboards/ai03/orbit/config.h +++ b/keyboards/ai03/orbit/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/boardwalk/config.h b/keyboards/boardwalk/config.h index 7747502083c3..fa80673d80c0 100644 --- a/keyboards/boardwalk/config.h +++ b/keyboards/boardwalk/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN F5 diff --git a/keyboards/ckeys/thedora/config.h b/keyboards/ckeys/thedora/config.h index f2b93ee70e49..a3d30c304334 100755 --- a/keyboards/ckeys/thedora/config.h +++ b/keyboards/ckeys/thedora/config.h @@ -39,7 +39,7 @@ // #define UNUSED_PINS { B14 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW //#define BACKLIGHT_PIN B7 diff --git a/keyboards/converter/palm_usb/config.h b/keyboards/converter/palm_usb/config.h index 4233a53ef030..8414c47a770b 100644 --- a/keyboards/converter/palm_usb/config.h +++ b/keyboards/converter/palm_usb/config.h @@ -23,8 +23,6 @@ along with this program. If not, see . #pragma once -#define CUSTOM_MATRIX 2 - #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0001 #define DEVICE_VER 0x0100 diff --git a/keyboards/converter/sun_usb/config.h b/keyboards/converter/sun_usb/config.h index 7713e0a915b2..455d6423b5da 100644 --- a/keyboards/converter/sun_usb/config.h +++ b/keyboards/converter/sun_usb/config.h @@ -18,8 +18,6 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H -#define CUSTOM_MATRIX 2 - #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3333 #define DEVICE_VER 0x0100 diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h index fdaf42eda49d..7af8950275c0 100644 --- a/keyboards/converter/usb_usb/config.h +++ b/keyboards/converter/usb_usb/config.h @@ -18,12 +18,6 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H -// do not #include "config_common.h" because the pin names conflict with the USB HID code. -// CUSTOM_MATRIX is defined it that file, though, and we need it, so we define it ourselves. -// It's a hack, yeah... - -#define CUSTOM_MATRIX 2 - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x005B @@ -36,9 +30,6 @@ along with this program. If not, see . #define MATRIX_ROWS 16 #define MATRIX_COLS 16 -/* matrix scanning is done in custom_matrix.cpp */ -//#define DIODE_DIRECTION - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/coseyfannitutti/mullet/config.h b/keyboards/coseyfannitutti/mullet/config.h index 2025cb433309..f9aef2911c05 100644 --- a/keyboards/coseyfannitutti/mullet/config.h +++ b/keyboards/coseyfannitutti/mullet/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h index 2174d64925ab..4e25ec033748 100644 --- a/keyboards/coseyfannitutti/mulletpad/config.h +++ b/keyboards/coseyfannitutti/mulletpad/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, C7, C6, B6, } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/dozen0/config.h b/keyboards/dozen0/config.h index af6972e27b88..3fdd50f50486 100644 --- a/keyboards/dozen0/config.h +++ b/keyboards/dozen0/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/ep/comsn/hs68/config.h b/keyboards/ep/comsn/hs68/config.h index db633a25095e..cf15a90bb47a 100644 --- a/keyboards/ep/comsn/hs68/config.h +++ b/keyboards/ep/comsn/hs68/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . { B0, B1, B3, B2, B7, D3, F1, D5, D6, D7, F4, F5, C7, C6, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/ep/comsn/mollydooker/config.h b/keyboards/ep/comsn/mollydooker/config.h index 3ba661525a57..2a96b5341431 100644 --- a/keyboards/ep/comsn/mollydooker/config.h +++ b/keyboards/ep/comsn/mollydooker/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . { B1, B2, B3, E6, B7, F1, F0, D0, D1, D7, D5, D4, D6, B4, B5, D3, B6, C6, C7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW // #endif diff --git a/keyboards/fluorite/config.h b/keyboards/fluorite/config.h index 59af3eb26588..7bae8a013cdb 100644 --- a/keyboards/fluorite/config.h +++ b/keyboards/fluorite/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D3, D1, D0, D4, C6, D7, E6, B4, B5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h index cf3460b61820..57e29e858e5a 100644 --- a/keyboards/halberd/config.h +++ b/keyboards/halberd/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, B4, C7, C6, B6, B5, F7, F6, F5, F4, F1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/42/config.h b/keyboards/handwired/42/config.h index 3f5060989b3a..c88013f46094 100644 --- a/keyboards/handwired/42/config.h +++ b/keyboards/handwired/42/config.h @@ -28,7 +28,7 @@ #define MATRIX_ROW_PINS { D2, D3, D0, D1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/co60/rev1/config.h b/keyboards/handwired/co60/rev1/config.h index 4d5140dafd2f..2168516d2d61 100644 --- a/keyboards/handwired/co60/rev1/config.h +++ b/keyboards/handwired/co60/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B2, B5, B4, D7, D6, B3, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW #ifdef __AVR__ diff --git a/keyboards/handwired/co60/rev6/config.h b/keyboards/handwired/co60/rev6/config.h index a2c73853ca2a..0a7227fb8e5f 100644 --- a/keyboards/handwired/co60/rev6/config.h +++ b/keyboards/handwired/co60/rev6/config.h @@ -41,7 +41,7 @@ #define MATRIX_ROW_PINS { B0, B1, B2, A15, A10 } #define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C14, C15, C13, B5, B6 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/co60/rev7/config.h b/keyboards/handwired/co60/rev7/config.h index e13d28f5074a..98b36b99cc65 100644 --- a/keyboards/handwired/co60/rev7/config.h +++ b/keyboards/handwired/co60/rev7/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A10, A9, A3, A4, A5, A6, B0, B1, A15, B3, B4, B5, C13, C14, C15 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/daishi/config.h b/keyboards/handwired/daishi/config.h index b4665bece474..16ca49ba1706 100644 --- a/keyboards/handwired/daishi/config.h +++ b/keyboards/handwired/daishi/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { E6, E7, E3, B0, B1, B2, A6, A5, A4, A3, A2, A1, A0, F7, F6, F5, F4, F3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/steamvan/rev1/config.h b/keyboards/handwired/steamvan/rev1/config.h index f47dc90c1912..78e46b343773 100644 --- a/keyboards/handwired/steamvan/rev1/config.h +++ b/keyboards/handwired/steamvan/rev1/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A9, A8, B15, B14, B13, A10, B9, B6, B5, B4, B3, A15 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h index 20795b048cfb..d26cb4c616fe 100644 --- a/keyboards/handwired/tennie/config.h +++ b/keyboards/handwired/tennie/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, E6, B4, B5 } #define UNUSED_PINS { B1, B2, B3, B6, F4, F5, F6, F7 D1} -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/hecomi/alpha/config.h b/keyboards/hecomi/alpha/config.h index dbc94454f9b7..3600eb717df0 100644 --- a/keyboards/hecomi/alpha/config.h +++ b/keyboards/hecomi/alpha/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . #define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6 //#define USE_I2C -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/kagamidget/config.h b/keyboards/kagamidget/config.h index 7fe67ffd3379..c88730215885 100644 --- a/keyboards/kagamidget/config.h +++ b/keyboards/kagamidget/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/peiorisboards/ixora/config.h b/keyboards/peiorisboards/ixora/config.h index bf74b13cc1cd..77ba89c292e4 100644 --- a/keyboards/peiorisboards/ixora/config.h +++ b/keyboards/peiorisboards/ixora/config.h @@ -17,7 +17,7 @@ #define MATRIX_ROW_PINS { A0 } #define MATRIX_COL_PINS { B4, A15, B3, A1, B6, B5 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/primekb/prime_e/config.h b/keyboards/primekb/prime_e/config.h index bf5061b1aee0..c5647520381e 100644 --- a/keyboards/primekb/prime_e/config.h +++ b/keyboards/primekb/prime_e/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D6, D4, D5, D3, D2, D1, D0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/scythe/config.h b/keyboards/scythe/config.h index d577192db3fa..c4d12bb030cf 100644 --- a/keyboards/scythe/config.h +++ b/keyboards/scythe/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define SOFT_SERIAL_PIN D0 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/sirius/unigo66/config.h b/keyboards/sirius/unigo66/config.h index 66f7f9542f77..3eed36bc0c9c 100644 --- a/keyboards/sirius/unigo66/config.h +++ b/keyboards/sirius/unigo66/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#define CUSTOM_MATRIX 2 - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1001 @@ -31,9 +29,6 @@ along with this program. If not, see . #define MATRIX_ROWS 16 #define MATRIX_COLS 16 -/* matrix scanning is done in custom_matrix.cpp */ -//#define DIODE_DIRECTION - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/snampad/config.h b/keyboards/snampad/config.h index a2dc3c6dd5d8..86dd3ce2fc81 100644 --- a/keyboards/snampad/config.h +++ b/keyboards/snampad/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, D1, D2, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL /* diff --git a/keyboards/standaside/config.h b/keyboards/standaside/config.h index 80c9f8d21b22..92c6b28b9794 100644 --- a/keyboards/standaside/config.h +++ b/keyboards/standaside/config.h @@ -31,7 +31,7 @@ #define UNUSED_PINS {} -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN C7 diff --git a/keyboards/treadstone32/config.h b/keyboards/treadstone32/config.h index a7f9914536b0..b9cd94d4b61b 100644 --- a/keyboards/treadstone32/config.h +++ b/keyboards/treadstone32/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, C7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/westfoxtrot/cypher/config.h b/keyboards/westfoxtrot/cypher/config.h index 13788370377e..33bdaa20425d 100644 --- a/keyboards/westfoxtrot/cypher/config.h +++ b/keyboards/westfoxtrot/cypher/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, E6, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B5 diff --git a/quantum/config_common.h b/quantum/config_common.h index c1c1d4bd423b..8de3f070c592 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -19,7 +19,6 @@ /* diode directions */ #define COL2ROW 0 #define ROW2COL 1 -#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ // useful for direct pin mapping #define NO_PIN (~0) From ce81c4f89b61560ee35436b351b27fd23568c32f Mon Sep 17 00:00:00 2001 From: Akaash Suresh Date: Mon, 20 Jan 2020 10:59:55 -0600 Subject: [PATCH 090/331] curry layout (#7943) --- .../montsinger/rebound/keymaps/curry/keymap.c | 63 +++++++++++++++++++ .../montsinger/rebound/keymaps/curry/rules.mk | 1 + 2 files changed, 64 insertions(+) create mode 100644 keyboards/montsinger/rebound/keymaps/curry/keymap.c create mode 100644 keyboards/montsinger/rebound/keymaps/curry/rules.mk diff --git a/keyboards/montsinger/rebound/keymaps/curry/keymap.c b/keyboards/montsinger/rebound/keymaps/curry/keymap.c new file mode 100644 index 000000000000..1b8f4f4ac90b --- /dev/null +++ b/keyboards/montsinger/rebound/keymaps/curry/keymap.c @@ -0,0 +1,63 @@ +#include "curry.h" + +#define LAYOUT_rebound_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_ortho_4x12_wrapper( \ + KC_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ + KC_ESC, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + KC_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_ENT, \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ) +#define LAYOUT_rebound_base_wrapper(...) LAYOUT_rebound_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_rebound_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_rebound_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_rebound_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_rebound_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_LOWER] = LAYOUT_ortho_4x12_wrapper( + KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F12, + KC_GRV, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______ + ), + + [_RAISE] = LAYOUT_ortho_4x12_wrapper( + _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_DEL, + KC_TILD, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______ + ), + + [_ADJUST] = LAYOUT_ortho_4x12_wrapper( + KC_MAKE, ___________________BLANK___________________, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + MG_NKRO, ___________________BLANK___________________, _________________ADJUST_R3_________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______ + ) + + +}; diff --git a/keyboards/montsinger/rebound/keymaps/curry/rules.mk b/keyboards/montsinger/rebound/keymaps/curry/rules.mk new file mode 100644 index 000000000000..36225f7ba6d0 --- /dev/null +++ b/keyboards/montsinger/rebound/keymaps/curry/rules.mk @@ -0,0 +1 @@ +CTPC = yes From 484a9b12bc3961fc0dd9481d3cb734959db42191 Mon Sep 17 00:00:00 2001 From: Wilba Date: Tue, 21 Jan 2020 05:18:25 +1100 Subject: [PATCH 091/331] Add VIA support for QMK backlight, QMK RGBLight (#7911) * Add VIA support for QMK backlight, QMK RGBLight * clang-format changes --- keyboards/cannonkeys/an_c/config.h | 6 + keyboards/cannonkeys/instant60/config.h | 6 + keyboards/cannonkeys/iron165/config.h | 3 + keyboards/cannonkeys/satisfaction75/config.h | 3 + .../cannonkeys/satisfaction75/led_custom.h | 2 + .../satisfaction75/satisfaction75.c | 63 ++++++ keyboards/cannonkeys/savage65/config.h | 6 + keyboards/cannonkeys/stm32f072/keyboard.c | 78 ++++++++ keyboards/cannonkeys/stm32f072/led_custom.h | 2 + keyboards/cannonkeys/tmov2/config.h | 6 + keyboards/hs60/v2/config.h | 2 + keyboards/nk65/config.h | 3 + keyboards/projectkb/alice/config.h | 6 + keyboards/wilba_tech/rama_works_koyu/config.h | 5 +- .../wilba_tech/rama_works_m60_a/config.h | 3 + keyboards/wilba_tech/rama_works_m6_a/config.h | 3 + keyboards/wilba_tech/rama_works_m6_b/config.h | 3 + .../wilba_tech/rama_works_u80_a/config.h | 3 + keyboards/wilba_tech/wt60_a/config.h | 2 + keyboards/wilba_tech/wt65_a/config.h | 2 + keyboards/wilba_tech/wt65_b/config.h | 2 + keyboards/wilba_tech/wt75_a/config.h | 2 + keyboards/wilba_tech/wt75_b/config.h | 2 + keyboards/wilba_tech/wt75_c/config.h | 2 + keyboards/wilba_tech/wt80_a/config.h | 3 + keyboards/wilba_tech/wt_main.c | 6 +- keyboards/wilba_tech/wt_mono_backlight.c | 6 +- keyboards/wilba_tech/wt_rgb_backlight.c | 6 +- keyboards/wilba_tech/zeal60/config.h | 5 +- keyboards/wilba_tech/zeal65/config.h | 3 + keyboards/xelus/dawn60/config.h | 3 + quantum/backlight/backlight.c | 20 +- quantum/backlight/backlight.h | 2 + quantum/rgblight.c | 20 ++ quantum/rgblight.h | 6 + quantum/via.c | 182 +++++++++++++++++- quantum/via.h | 58 ++++-- 37 files changed, 500 insertions(+), 35 deletions(-) diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h index 55414ba50951..6390e078971c 100644 --- a/keyboards/cannonkeys/an_c/config.h +++ b/keyboards/cannonkeys/an_c/config.h @@ -62,6 +62,12 @@ along with this program. If not, see . // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE + +// Let VIA handle the QMK RGBLIGHT +#define VIA_QMK_RGBLIGHT_ENABLE + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h index 2d23d5f83c5d..4fa76cb88370 100644 --- a/keyboards/cannonkeys/instant60/config.h +++ b/keyboards/cannonkeys/instant60/config.h @@ -62,6 +62,12 @@ along with this program. If not, see . // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE + +// Let VIA handle the QMK RGBLIGHT +#define VIA_QMK_RGBLIGHT_ENABLE + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/cannonkeys/iron165/config.h b/keyboards/cannonkeys/iron165/config.h index 640f6fb6599a..6350514d75cd 100644 --- a/keyboards/cannonkeys/iron165/config.h +++ b/keyboards/cannonkeys/iron165/config.h @@ -54,6 +54,9 @@ along with this program. If not, see . // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 7a4354c8a7a6..69d02806e20d 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -73,6 +73,9 @@ along with this program. If not, see . // 6 for 3x custom encoder settings, left, right, and press (18 bytes) #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/cannonkeys/satisfaction75/led_custom.h b/keyboards/cannonkeys/satisfaction75/led_custom.h index fe5c9e5dcfae..d818b48ce984 100644 --- a/keyboards/cannonkeys/satisfaction75/led_custom.h +++ b/keyboards/cannonkeys/satisfaction75/led_custom.h @@ -3,3 +3,5 @@ void backlight_task(void); void breathing_interrupt_disable(void); void breathing_interrupt_enable(void); +void breathing_enable(void); +void breathing_disable(void); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 0fe09c384fb6..f92067c98f74 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -55,6 +55,54 @@ backlight_config_t kb_backlight_config = { }; #ifdef VIA_ENABLE + +void backlight_get_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) + { + case id_qmk_backlight_brightness: + { + // level / BACKLIGHT_LEVELS * 255 + value_data[0] = ((uint16_t)kb_backlight_config.level) * 255 / BACKLIGHT_LEVELS; + break; + } + case id_qmk_backlight_effect: + { + value_data[0] = kb_backlight_config.breathing ? 1 : 0; + break; + } + } +} + +void backlight_set_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) + { + case id_qmk_backlight_brightness: + { + // level / 255 * BACKLIGHT_LEVELS + kb_backlight_config.level = ((uint16_t)value_data[0]) * BACKLIGHT_LEVELS / 255; + backlight_set(kb_backlight_config.level); + break; + } + case id_qmk_backlight_effect: + { + if ( value_data[0] == 0 ) { + kb_backlight_config.breathing = false; + breathing_disable(); + } else { + kb_backlight_config.breathing = true; + breathing_enable(); + } + break; + } + } +} + void raw_hid_receive_kb( uint8_t *data, uint8_t length ) { uint8_t *command_id = &(data[0]); @@ -139,6 +187,21 @@ void raw_hid_receive_kb( uint8_t *data, uint8_t length ) } break; } + case id_lighting_set_value: + { + backlight_set_value(command_data); + break; + } + case id_lighting_get_value: + { + backlight_get_value(command_data); + break; + } + case id_lighting_save: + { + backlight_config_save(); + break; + } default: { // Unhandled message. diff --git a/keyboards/cannonkeys/savage65/config.h b/keyboards/cannonkeys/savage65/config.h index b69aba39eb5d..98ec1067a8d1 100644 --- a/keyboards/cannonkeys/savage65/config.h +++ b/keyboards/cannonkeys/savage65/config.h @@ -62,6 +62,12 @@ along with this program. If not, see . // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE + +// Let VIA handle the QMK RGBLIGHT +#define VIA_QMK_RGBLIGHT_ENABLE + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c index bf35a76c18d1..fdda018fc4ec 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.c +++ b/keyboards/cannonkeys/stm32f072/keyboard.c @@ -126,8 +126,86 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record);; } +#ifdef VIA_ENABLE +void backlight_get_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) + { + case id_qmk_backlight_brightness: + { + // level / BACKLIGHT_LEVELS * 255 + value_data[0] = ((uint16_t)kb_backlight_config.level) * 255 / BACKLIGHT_LEVELS; + break; + } + case id_qmk_backlight_effect: + { + value_data[0] = kb_backlight_config.breathing ? 1 : 0; + break; + } + } +} +void backlight_set_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) + { + case id_qmk_backlight_brightness: + { + // level / 255 * BACKLIGHT_LEVELS + kb_backlight_config.level = ((uint16_t)value_data[0]) * BACKLIGHT_LEVELS / 255; + backlight_set(kb_backlight_config.level); + break; + } + case id_qmk_backlight_effect: + { + if ( value_data[0] == 0 ) { + kb_backlight_config.breathing = false; + breathing_disable(); + } else { + kb_backlight_config.breathing = true; + breathing_enable(); + } + break; + } + } +} + +void raw_hid_receive_kb( uint8_t *data, uint8_t length ) +{ + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch ( *command_id ) + { + case id_lighting_set_value: + { + backlight_set_value(command_data); + break; + } + case id_lighting_get_value: + { + backlight_get_value(command_data); + break; + } + case id_lighting_save: + { + backlight_config_save(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + // DO NOT call raw_hid_send(data,length) here, let caller do this +} +#endif // // In the case of VIA being disabled, we still need to check if diff --git a/keyboards/cannonkeys/stm32f072/led_custom.h b/keyboards/cannonkeys/stm32f072/led_custom.h index 28e0f02ed34b..550d5b84ccb8 100644 --- a/keyboards/cannonkeys/stm32f072/led_custom.h +++ b/keyboards/cannonkeys/stm32f072/led_custom.h @@ -4,3 +4,5 @@ void backlight_task(void); void breathing_interrupt_disable(void); void breathing_interrupt_enable(void); void breathing_toggle(void); +void breathing_enable(void); +void breathing_disable(void); diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h index d5f1d0788462..159382fbcb65 100644 --- a/keyboards/cannonkeys/tmov2/config.h +++ b/keyboards/cannonkeys/tmov2/config.h @@ -62,6 +62,12 @@ along with this program. If not, see . // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE + +// Let VIA handle the QMK RGBLIGHT +#define VIA_QMK_RGBLIGHT_ENABLE + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 91fdf6080920..42d10bdb5297 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -138,3 +138,5 @@ along with this program. If not, see . // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 767959b62676..46450a14c8c5 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -141,3 +141,6 @@ along with this program. If not, see . // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h index 4a068a8893c0..94c1fd16d6a7 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/config.h @@ -62,6 +62,12 @@ along with this program. If not, see . // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE + +// Let VIA handle the QMK RGBLIGHT +#define VIA_QMK_RGBLIGHT_ENABLE + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h index 9cbbd6620b27..7f945b4a4a19 100644 --- a/keyboards/wilba_tech/rama_works_koyu/config.h +++ b/keyboards/wilba_tech/rama_works_koyu/config.h @@ -121,4 +121,7 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. -#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 \ No newline at end of file +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h index 8381a4db00b6..849d1a461523 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/config.h +++ b/keyboards/wilba_tech/rama_works_m60_a/config.h @@ -119,3 +119,6 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/rama_works_m6_a/config.h b/keyboards/wilba_tech/rama_works_m6_a/config.h index 1a61604bb437..cbb75e289c83 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/config.h +++ b/keyboards/wilba_tech/rama_works_m6_a/config.h @@ -109,3 +109,6 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h index 3ebfd80dabdd..1af1cf694b50 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/config.h +++ b/keyboards/wilba_tech/rama_works_m6_b/config.h @@ -152,3 +152,6 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index 748b2cb2919b..2523b962e731 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h @@ -235,3 +235,6 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 269afbcb8bb1..e07b91166175 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -204,3 +204,5 @@ // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index ad4c120f4d19..bf19fe38cca7 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -201,3 +201,5 @@ // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index f98fa4e729bb..d74275a287e0 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -201,3 +201,5 @@ // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index 0c0a2ff0827c..9b058eec41fd 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -204,3 +204,5 @@ // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index 0c7b3dbfaddc..d22ac97e02e4 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -204,3 +204,5 @@ // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h index b84f2444d880..08b3c2ec4944 100644 --- a/keyboards/wilba_tech/wt75_c/config.h +++ b/keyboards/wilba_tech/wt75_c/config.h @@ -204,3 +204,5 @@ // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index b706956ef915..59169701596b 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -200,3 +200,6 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index 1ad12ee4a580..32721b654e85 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c @@ -123,17 +123,17 @@ void raw_hid_receive_kb(uint8_t *data, uint8_t length) { switch ( *command_id ) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - case id_backlight_config_set_value: + case id_lighting_set_value: { backlight_config_set_value(command_data); break; } - case id_backlight_config_get_value: + case id_lighting_get_value: { backlight_config_get_value(command_data); break; } - case id_backlight_config_save: + case id_lighting_save: { backlight_config_save(); break; diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index daf738da2e1b..fbc3102e8c4a 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -26,9 +26,13 @@ #include "quantum/color.h" #include "tmk_core/common/eeprom.h" -#include "via.h" // uses only the EEPROM address +#include "via.h" // uses EEPROM address, lighting value IDs #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) +#if VIA_EEPROM_CUSTOM_CONFIG_SIZE == 0 +#error VIA_EEPROM_CUSTOM_CONFIG_SIZE was not defined to store backlight_config struct +#endif + #include "drivers/issi/is31fl3736.h" #define ISSI_ADDR_DEFAULT 0x50 diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index babb844d26f6..4af8e15e3a9e 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -50,9 +50,13 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #include "quantum/color.h" #include "tmk_core/common/eeprom.h" -#include "via.h" // uses only the EEPROM address +#include "via.h" // uses EEPROM address, lighting value IDs #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) +#if VIA_EEPROM_CUSTOM_CONFIG_SIZE == 0 +#error VIA_EEPROM_CUSTOM_CONFIG_SIZE was not defined to store backlight_config struct +#endif + #if defined(RGB_BACKLIGHT_M6_B) #include "drivers/issi/is31fl3218.h" #define BACKLIGHT_LED_COUNT 6 diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h index cb2f6a96bdd3..9e2badd2ad1c 100644 --- a/keyboards/wilba_tech/zeal60/config.h +++ b/keyboards/wilba_tech/zeal60/config.h @@ -117,4 +117,7 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. -#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 \ No newline at end of file +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h index 01649d76fe7c..df32aff77ca4 100644 --- a/keyboards/wilba_tech/zeal65/config.h +++ b/keyboards/wilba_tech/zeal65/config.h @@ -118,3 +118,6 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE \ No newline at end of file diff --git a/keyboards/xelus/dawn60/config.h b/keyboards/xelus/dawn60/config.h index 7691bb301f44..59eb828fa6c7 100644 --- a/keyboards/xelus/dawn60/config.h +++ b/keyboards/xelus/dawn60/config.h @@ -140,3 +140,6 @@ // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c index e57b31d103b2..4aa74667d9ca 100644 --- a/quantum/backlight/backlight.c +++ b/quantum/backlight/backlight.c @@ -130,18 +130,30 @@ void backlight_step(void) { backlight_set(backlight_config.level); } -/** \brief Backlight set level +/** \brief Backlight set level without EEPROM update * - * FIXME: needs doc */ -void backlight_level(uint8_t level) { +void backlight_level_noeeprom(uint8_t level) { if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; backlight_config.level = level; backlight_config.enable = !!backlight_config.level; - eeconfig_update_backlight(backlight_config.raw); backlight_set(backlight_config.level); } +/** \brief Backlight set level + * + * FIXME: needs doc + */ +void backlight_level(uint8_t level) { + backlight_level_noeeprom(level); + eeconfig_update_backlight(backlight_config.raw); +} + +/** \brief Update current backlight state to EEPROM + * + */ +void eeconfig_update_backlight_current(void) { eeconfig_update_backlight(backlight_config.raw); } + /** \brief Get backlight level * * FIXME: needs doc diff --git a/quantum/backlight/backlight.h b/quantum/backlight/backlight.h index 9f0a5e81d771..08acf942ffb5 100644 --- a/quantum/backlight/backlight.h +++ b/quantum/backlight/backlight.h @@ -48,8 +48,10 @@ bool is_backlight_enabled(void); void backlight_step(void); void backlight_increase(void); void backlight_decrease(void); +void backlight_level_noeeprom(uint8_t level); void backlight_level(uint8_t level); uint8_t get_backlight_level(void); +void eeconfig_update_backlight_current(void); // implementation specific void backlight_init_ports(void); diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 26887f057e84..85b319110562 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -160,6 +160,10 @@ void eeconfig_update_rgblight(uint32_t val) { #endif } +void eeconfig_update_rgblight_current(void) { + eeconfig_update_rgblight(rgblight_config.raw); +} + void eeconfig_update_rgblight_default(void) { rgblight_config.enable = 1; rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; @@ -501,6 +505,22 @@ void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_ee void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); } +uint8_t rgblight_get_speed(void) { return rgblight_config.speed; } + +void rgblight_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { + rgblight_config.speed = speed; + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + dprintf("rgblight set speed [EEPROM]: %u\n", rgblight_config.speed); + } else { + dprintf("rgblight set speed [NOEEPROM]: %u\n", rgblight_config.speed); + } +} + +void rgblight_set_speed(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, true); } + +void rgblight_set_speed_noeeprom(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, false); } + uint8_t rgblight_get_hue(void) { return rgblight_config.hue; } uint8_t rgblight_get_sat(void) { return rgblight_config.sat; } diff --git a/quantum/rgblight.h b/quantum/rgblight.h index e3aa098e4db1..f6746e50ffb9 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -233,6 +233,11 @@ void rgblight_decrease_speed(void); void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); +/* effect speed */ +uint8_t rgblight_get_speed(void); +void rgblight_set_speed(uint8_t speed); +void rgblight_set_speed_noeeprom(uint8_t speed); + /* query */ uint8_t rgblight_get_mode(void); uint8_t rgblight_get_hue(void); @@ -245,6 +250,7 @@ uint32_t rgblight_read_dword(void); void rgblight_update_dword(uint32_t dword); uint32_t eeconfig_read_rgblight(void); void eeconfig_update_rgblight(uint32_t val); +void eeconfig_update_rgblight_current(void); void eeconfig_update_rgblight_default(void); void eeconfig_debug_rgblight(void); diff --git a/quantum/via.c b/quantum/via.c index b3934d9f0011..f85af8d9e18d 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -22,14 +22,42 @@ # error "DYNAMIC_KEYMAP_ENABLE is not enabled" #endif +// If VIA_CUSTOM_LIGHTING_ENABLE is not defined, then VIA_QMK_BACKLIGHT_ENABLE is set +// if BACKLIGHT_ENABLE is set, so handling of QMK Backlight values happens here by default. +// if VIA_CUSTOM_LIGHTING_ENABLE is defined, then VIA_QMK_BACKLIGHT_ENABLE must be explicitly +// set in keyboard-level config.h, so handling of QMK Backlight values happens here +#if defined(BACKLIGHT_ENABLE) && !defined(VIA_CUSTOM_LIGHTING_ENABLE) +# define VIA_QMK_BACKLIGHT_ENABLE +#endif + +// If VIA_CUSTOM_LIGHTING_ENABLE is not defined, then VIA_QMK_RGBLIGHT_ENABLE is set +// if RGBLIGHT_ENABLE is set, so handling of QMK RGBLIGHT values happens here by default. +// If VIA_CUSTOM_LIGHTING_ENABLE is defined, then VIA_QMK_RGBLIGHT_ENABLE must be explicitly +// set in keyboard-level config.h, so handling of QMK RGBLIGHT values happens here +#if defined(RGBLIGHT_ENABLE) && !defined(VIA_CUSTOM_LIGHTING_ENABLE) +# define VIA_QMK_RGBLIGHT_ENABLE +#endif + #include "quantum.h" #include "via.h" + #include "raw_hid.h" #include "dynamic_keymap.h" #include "tmk_core/common/eeprom.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic +// Forward declare some helpers. +#if defined(VIA_QMK_BACKLIGHT_ENABLE) +void via_qmk_backlight_set_value(uint8_t *data); +void via_qmk_backlight_get_value(uint8_t *data); +#endif + +#if defined(VIA_QMK_RGBLIGHT_ENABLE) +void via_qmk_rgblight_set_value(uint8_t *data); +void via_qmk_rgblight_get_value(uint8_t *data); +#endif + // Can be called in an overriding via_init_kb() to test if keyboard level code usage of // EEPROM is invalid and use/save defaults. bool via_eeprom_is_valid(void) { @@ -282,10 +310,52 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { dynamic_keymap_reset(); break; } - case id_backlight_config_set_value: - case id_backlight_config_get_value: - case id_backlight_config_save: { + case id_lighting_set_value: { +#if defined(VIA_QMK_BACKLIGHT_ENABLE) + via_qmk_backlight_set_value(command_data); +#endif +#if defined(VIA_QMK_RGBLIGHT_ENABLE) + via_qmk_rgblight_set_value(command_data); +#endif +#if defined(VIA_CUSTOM_LIGHTING_ENABLE) raw_hid_receive_kb(data, length); +#endif +#if !defined(VIA_QMK_BACKLIGHT_ENABLE) && !defined(VIA_QMK_RGBLIGHT_ENABLE) && !defined(VIA_CUSTOM_LIGHTING_ENABLE) + // Return the unhandled state + *command_id = id_unhandled; +#endif + break; + } + case id_lighting_get_value: { +#if defined(VIA_QMK_BACKLIGHT_ENABLE) + via_qmk_backlight_get_value(command_data); +#endif +#if defined(VIA_QMK_RGBLIGHT_ENABLE) + via_qmk_rgblight_get_value(command_data); +#endif +#if defined(VIA_CUSTOM_LIGHTING_ENABLE) + raw_hid_receive_kb(data, length); +#endif +#if !defined(VIA_QMK_BACKLIGHT_ENABLE) && !defined(VIA_QMK_RGBLIGHT_ENABLE) && !defined(VIA_CUSTOM_LIGHTING_ENABLE) + // Return the unhandled state + *command_id = id_unhandled; +#endif + break; + } + case id_lighting_save: { +#if defined(VIA_QMK_BACKLIGHT_ENABLE) + eeconfig_update_backlight_current(); +#endif +#if defined(VIA_QMK_RGBLIGHT_ENABLE) + eeconfig_update_rgblight_current(); +#endif +#if defined(VIA_CUSTOM_LIGHTING_ENABLE) + raw_hid_receive_kb(data, length); +#endif +#if !defined(VIA_QMK_BACKLIGHT_ENABLE) && !defined(VIA_QMK_RGBLIGHT_ENABLE) && !defined(VIA_CUSTOM_LIGHTING_ENABLE) + // Return the unhandled state + *command_id = id_unhandled; +#endif break; } case id_dynamic_keymap_macro_get_count: { @@ -355,3 +425,109 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { // (i.e. returning state to the host, or the unhandled state). raw_hid_send(data, length); } + +#if defined(VIA_QMK_BACKLIGHT_ENABLE) + +# if BACKLIGHT_LEVELS == 0 +# error BACKLIGHT_LEVELS == 0 +# endif + +void via_qmk_backlight_get_value(uint8_t *data) { + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) { + case id_qmk_backlight_brightness: { + // level / BACKLIGHT_LEVELS * 255 + value_data[0] = ((uint16_t)get_backlight_level()) * 255 / BACKLIGHT_LEVELS; + break; + } + case id_qmk_backlight_effect: { +# ifdef BACKLIGHT_BREATHING + value_data[0] = is_backlight_breathing() ? 1 : 0; +# else + value_data[0] = 0; +# endif + break; + } + } +} + +void via_qmk_backlight_set_value(uint8_t *data) { + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) { + case id_qmk_backlight_brightness: { + // level / 255 * BACKLIGHT_LEVELS + backlight_level_noeeprom(((uint16_t)value_data[0]) * BACKLIGHT_LEVELS / 255); + break; + } + case id_qmk_backlight_effect: { +# ifdef BACKLIGHT_BREATHING + if (value_data[0] == 0) { + backlight_disable_breathing(); + } else { + backlight_enable_breathing(); + } +# endif + break; + } + } +} + +#endif // #if defined(VIA_QMK_BACKLIGHT_ENABLE) + +#if defined(VIA_QMK_RGBLIGHT_ENABLE) + +void via_qmk_rgblight_get_value(uint8_t *data) { + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) { + case id_qmk_rgblight_brightness: { + value_data[0] = rgblight_get_val(); + break; + } + case id_qmk_rgblight_effect: { + value_data[0] = rgblight_get_mode(); + break; + } + case id_qmk_rgblight_effect_speed: { + value_data[0] = rgblight_get_speed(); + break; + } + case id_qmk_rgblight_color: { + value_data[0] = rgblight_get_hue(); + value_data[1] = rgblight_get_sat(); + break; + } + } +} + +void via_qmk_rgblight_set_value(uint8_t *data) { + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) { + case id_qmk_rgblight_brightness: { + rgblight_sethsv_noeeprom(rgblight_get_hue(), rgblight_get_sat(), value_data[0]); + break; + } + case id_qmk_rgblight_effect: { + rgblight_mode_noeeprom(value_data[0]); + if (value_data[0] == 0) { + rgblight_disable_noeeprom(); + } else { + rgblight_enable_noeeprom(); + } + break; + } + case id_qmk_rgblight_effect_speed: { + rgblight_set_speed_noeeprom(value_data[0]); + break; + } + case id_qmk_rgblight_color: { + rgblight_sethsv_noeeprom(value_data[0], value_data[1], rgblight_get_val()); + break; + } + } +} + +#endif // #if defined(VIA_QMK_RGBLIGHT_ENABLE) diff --git a/quantum/via.h b/quantum/via.h index 98f8dea8c3ea..012547e055b6 100644 --- a/quantum/via.h +++ b/quantum/via.h @@ -51,29 +51,45 @@ #define VIA_PROTOCOL_VERSION 0x0009 enum via_command_id { - id_get_protocol_version = 0x01, // always 0x01 - id_get_keyboard_value, - id_set_keyboard_value, - id_dynamic_keymap_get_keycode, - id_dynamic_keymap_set_keycode, - id_dynamic_keymap_reset, - id_backlight_config_set_value, - id_backlight_config_get_value, - id_backlight_config_save, - id_eeprom_reset, - id_bootloader_jump, - id_dynamic_keymap_macro_get_count, - id_dynamic_keymap_macro_get_buffer_size, - id_dynamic_keymap_macro_get_buffer, - id_dynamic_keymap_macro_set_buffer, - id_dynamic_keymap_macro_reset, - id_dynamic_keymap_get_layer_count, - id_dynamic_keymap_get_buffer, - id_dynamic_keymap_set_buffer, - id_unhandled = 0xFF, + id_get_protocol_version = 0x01, // always 0x01 + id_get_keyboard_value = 0x02, + id_set_keyboard_value = 0x03, + id_dynamic_keymap_get_keycode = 0x04, + id_dynamic_keymap_set_keycode = 0x05, + id_dynamic_keymap_reset = 0x06, + id_lighting_set_value = 0x07, + id_lighting_get_value = 0x08, + id_lighting_save = 0x09, + id_eeprom_reset = 0x0A, + id_bootloader_jump = 0x0B, + id_dynamic_keymap_macro_get_count = 0x0C, + id_dynamic_keymap_macro_get_buffer_size = 0x0D, + id_dynamic_keymap_macro_get_buffer = 0x0E, + id_dynamic_keymap_macro_set_buffer = 0x0F, + id_dynamic_keymap_macro_reset = 0x10, + id_dynamic_keymap_get_layer_count = 0x11, + id_dynamic_keymap_get_buffer = 0x12, + id_dynamic_keymap_set_buffer = 0x13, + id_unhandled = 0xFF, }; -enum via_keyboard_value_id { id_uptime = 0x01, id_layout_options, id_switch_matrix_state }; +enum via_keyboard_value_id { + id_uptime = 0x01, // + id_layout_options = 0x02, + id_switch_matrix_state = 0x03 +}; + +enum via_lighting_value { + // QMK BACKLIGHT + id_qmk_backlight_brightness = 0x09, + id_qmk_backlight_effect = 0x0A, + + // QMK RGBLIGHT + id_qmk_rgblight_brightness = 0x80, + id_qmk_rgblight_effect = 0x81, + id_qmk_rgblight_effect_speed = 0x82, + id_qmk_rgblight_color = 0x83, +}; // Can't use SAFE_RANGE here, it might change if someone adds // new values to enum quantum_keycodes. From e3d59a72f9c5a462066439bb5396484bd39ab739 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Mon, 20 Jan 2020 18:48:28 +0000 Subject: [PATCH 092/331] format code according to conventions [skip ci] --- quantum/rgblight.c | 6 ++---- quantum/rgblight.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 85b319110562..40de19eac31d 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -160,9 +160,7 @@ void eeconfig_update_rgblight(uint32_t val) { #endif } -void eeconfig_update_rgblight_current(void) { - eeconfig_update_rgblight(rgblight_config.raw); -} +void eeconfig_update_rgblight_current(void) { eeconfig_update_rgblight(rgblight_config.raw); } void eeconfig_update_rgblight_default(void) { rgblight_config.enable = 1; @@ -510,7 +508,7 @@ uint8_t rgblight_get_speed(void) { return rgblight_config.speed; } void rgblight_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { rgblight_config.speed = speed; if (write_to_eeprom) { - eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this dprintf("rgblight set speed [EEPROM]: %u\n", rgblight_config.speed); } else { dprintf("rgblight set speed [NOEEPROM]: %u\n", rgblight_config.speed); diff --git a/quantum/rgblight.h b/quantum/rgblight.h index f6746e50ffb9..c0fc0f3c636c 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -235,8 +235,8 @@ void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); /* effect speed */ uint8_t rgblight_get_speed(void); -void rgblight_set_speed(uint8_t speed); -void rgblight_set_speed_noeeprom(uint8_t speed); +void rgblight_set_speed(uint8_t speed); +void rgblight_set_speed_noeeprom(uint8_t speed); /* query */ uint8_t rgblight_get_mode(void); From 61dbb9267936f5b3dc6a4c804dc773ab79d9c309 Mon Sep 17 00:00:00 2001 From: clovervidia Date: Mon, 20 Jan 2020 13:49:15 -0500 Subject: [PATCH 093/331] Invert Num Lock LED state (#7945) --- keyboards/ymdk_np21/ymdk_np21.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ymdk_np21/ymdk_np21.c b/keyboards/ymdk_np21/ymdk_np21.c index 5bf15975814c..b7c2001a417c 100644 --- a/keyboards/ymdk_np21/ymdk_np21.c +++ b/keyboards/ymdk_np21/ymdk_np21.c @@ -30,7 +30,7 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); + writePin(D0, led_state.num_lock); } return true; } From c23b73530f6683b52775ad6415fa201597f15f4f Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Tue, 21 Jan 2020 07:40:33 +0900 Subject: [PATCH 094/331] [Keyboard] Add keyboard Getta25 (#7497) * [Keyboard] Add keyboard Getta25 Add Getta25 keyboard. A 25 keys Tenkey. Salicylic-acid3 * Update keyboards/getta25/info.json * Update keyboards/getta25/readme.md * Update keyboards/getta25/readme.md * Update keyboards/getta25/readme.md * Update keyboards/getta25/info.json * Update keyboards/getta25/info.json * Update keyboards/getta25/info.json * Update keyboards/getta25/info.json * Update keyboards/getta25/keymaps/oled/glcdfont.c * Update keyboards/getta25/keymaps/oled/glcdfont.c * Keymap Update Remove unnecessary code blocks * Update keyboards/getta25/keymaps/oled/keymap.c * Update keyboards/getta25/keymaps/oled/keymap.c * Update keyboards/getta25/keymaps/oled/keymap.c --- keyboards/getta25/config.h | 21 ++ keyboards/getta25/getta25.c | 1 + keyboards/getta25/getta25.h | 7 + keyboards/getta25/info.json | 38 ++++ keyboards/getta25/keymaps/default/config.h | 24 +++ keyboards/getta25/keymaps/default/keymap.c | 61 ++++++ keyboards/getta25/keymaps/oled/config.h | 25 +++ keyboards/getta25/keymaps/oled/glcdfont.c | 231 +++++++++++++++++++++ keyboards/getta25/keymaps/oled/keymap.c | 204 ++++++++++++++++++ keyboards/getta25/readme.md | 17 ++ keyboards/getta25/rev1/config.h | 73 +++++++ keyboards/getta25/rev1/rev1.c | 1 + keyboards/getta25/rev1/rev1.h | 35 ++++ keyboards/getta25/rules.mk | 33 +++ 14 files changed, 771 insertions(+) create mode 100644 keyboards/getta25/config.h create mode 100644 keyboards/getta25/getta25.c create mode 100644 keyboards/getta25/getta25.h create mode 100644 keyboards/getta25/info.json create mode 100644 keyboards/getta25/keymaps/default/config.h create mode 100644 keyboards/getta25/keymaps/default/keymap.c create mode 100644 keyboards/getta25/keymaps/oled/config.h create mode 100644 keyboards/getta25/keymaps/oled/glcdfont.c create mode 100644 keyboards/getta25/keymaps/oled/keymap.c create mode 100644 keyboards/getta25/readme.md create mode 100644 keyboards/getta25/rev1/config.h create mode 100644 keyboards/getta25/rev1/rev1.c create mode 100644 keyboards/getta25/rev1/rev1.h create mode 100644 keyboards/getta25/rules.mk diff --git a/keyboards/getta25/config.h b/keyboards/getta25/config.h new file mode 100644 index 000000000000..cfb6bf4ffccd --- /dev/null +++ b/keyboards/getta25/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/getta25/getta25.c b/keyboards/getta25/getta25.c new file mode 100644 index 000000000000..4f8cc63b4227 --- /dev/null +++ b/keyboards/getta25/getta25.c @@ -0,0 +1 @@ +#include "getta25.h" diff --git a/keyboards/getta25/getta25.h b/keyboards/getta25/getta25.h new file mode 100644 index 000000000000..ff448201738b --- /dev/null +++ b/keyboards/getta25/getta25.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_getta25_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/getta25/info.json b/keyboards/getta25/info.json new file mode 100644 index 000000000000..d3a02f29854e --- /dev/null +++ b/keyboards/getta25/info.json @@ -0,0 +1,38 @@ +{ + "keyboard_name": "Getta25", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 5.25, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"ESC", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"=", "x":2, "y":0}, + {"label":"DEL", "x":3, "y":0}, + {"label":"Num Lock", "x":0, "y":1.25}, + {"label":"/", "x":1, "y":1.25}, + {"label":"*", "x":2, "y":1.25}, + {"label":"-", "x":3, "y":1.25}, + {"label":"7", "x":0, "y":2.25}, + {"label":"8", "x":1, "y":2.25}, + {"label":"9", "x":2, "y":2.25}, + {"label":"ESC", "x":4.25, "y":2.25}, + {"label":"4", "x":0, "y":3.25}, + {"label":"5", "x":1, "y":3.25}, + {"label":"6", "x":2, "y":3.25}, + {"label":"+", "x":3, "y":2.25, "h":2}, + {"label":"F2", "x":4.25, "y":3.25}, + {"label":"1", "x":0, "y":4.25}, + {"label":"2", "x":1, "y":4.25}, + {"label":"3", "x":2, "y":4.25}, + {"label":"DEL", "x":4.25, "y":4.25}, + {"label":"0", "x":0, "y":5.25, "w":2}, + {"label":".", "x":2, "y":5.25}, + {"label":"Enter", "x":3, "y":4.25, "h":2}, + {"label":"BSPC", "x":4.25, "y":5.25} + ] + } + } +} diff --git a/keyboards/getta25/keymaps/default/config.h b/keyboards/getta25/keymaps/default/config.h new file mode 100644 index 000000000000..8c4e1f512999 --- /dev/null +++ b/keyboards/getta25/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Salicylic_acid3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + + diff --git a/keyboards/getta25/keymaps/default/keymap.c b/keyboards/getta25/keymaps/default/keymap.c new file mode 100644 index 000000000000..a70df01c180e --- /dev/null +++ b/keyboards/getta25/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE, + _ARROW, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-----------------------------------| +LT(_ADJUST,KC_ESC), KC_F2, KC_EQL, KC_DEL, + //|--------+--------+--------+--------| + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + //|--------+--------+--------+--------+--------| + KC_P7, KC_P8, KC_P9, KC_ESC, + //|--------+--------+--------+--------+--------| + KC_P4, KC_P5, KC_P6, KC_PPLS, KC_F2, + //|--------+--------+--------+--------+--------| + KC_P1, KC_P2, KC_P3, KC_DEL, + //|--------+--------+--------+--------+--------| +LT(_ARROW, KC_P0), KC_PDOT, KC_PENT, KC_BSPC + //`--------------------------------------------' + ), + + [_ARROW] = LAYOUT( + //,-----------------------------------| + _______, _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, _______, _______, _______, + //|--------+--------+--------+--------+--------| + XXXXXXX, KC_UP, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______, + //|--------+--------+--------+--------+--------| + XXXXXXX, KC_DOWN, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + MO(_ARROW), _______, _______, _______ + //`--------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------| + MO(_ADJUST), _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + RGB_SAD, RGB_SAI, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, _______, + //|--------+--------+--------+--------+--------| + RGB_VAD, RGB_VAI, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + _______, _______, RGB_MOD, _______ + //`--------------------------------------------' + ) +}; diff --git a/keyboards/getta25/keymaps/oled/config.h b/keyboards/getta25/keymaps/oled/config.h new file mode 100644 index 000000000000..be988915c21a --- /dev/null +++ b/keyboards/getta25/keymaps/oled/config.h @@ -0,0 +1,25 @@ +/* Copyright 2018 Salicylic_acid3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#define OLED_FONT_H "keyboards/getta25/keymaps/oled/glcdfont.c" + diff --git a/keyboards/getta25/keymaps/oled/glcdfont.c b/keyboards/getta25/keymaps/oled/glcdfont.c new file mode 100644 index 000000000000..939db32ca650 --- /dev/null +++ b/keyboards/getta25/keymaps/oled/glcdfont.c @@ -0,0 +1,231 @@ +// 'loveLain', 128x32px + +#include "progmem.h" + +static const unsigned char font[] PROGMEM = { +0x00,0x00,0x00,0x00,0x00,0x00, // 00 +0x3E,0x5B,0x4F,0x5B,0x3E,0x00, // 01 +0x3E,0x6B,0x4F,0x6B,0x3E,0x00, // 02 +0x1C,0x3E,0x7C,0x3E,0x1C,0x00, // 03 +0x18,0x3C,0x7E,0x3C,0x18,0x00, // 04 +0x1C,0x57,0x7D,0x57,0x1C,0x00, // 05 +0x1C,0x5E,0x7F,0x5E,0x1C,0x00, // 06 +0x00,0x18,0x3C,0x18,0x00,0x00, // 07 +0xFF,0xE7,0xC3,0xE7,0xFF,0x00, // 08 +0x00,0x18,0x24,0x18,0x00,0x00, // 09 +0xFF,0xE7,0xDB,0xE7,0xFF,0x00, // 0A +0x30,0x48,0x3A,0x06,0x0E,0x00, // 0B +0x26,0x29,0x79,0x29,0x26,0x00, // 0C +0x40,0x7F,0x05,0x05,0x07,0x00, // 0D +0x40,0x7F,0x05,0x25,0x3F,0x00, // 0E +0x5A,0x3C,0xE7,0x3C,0x5A,0x00, // 0F +0x7F,0x3E,0x1C,0x1C,0x08,0x00, // 10 +0x08,0x1C,0x1C,0x3E,0x7F,0x00, // 11 +0x14,0x22,0x7F,0x22,0x14,0x00, // 12 +0x5F,0x5F,0x00,0x5F,0x5F,0x00, // 13 +0x06,0x09,0x7F,0x01,0x7F,0x00, // 14 +0x00,0x66,0x89,0x95,0x6A,0x00, // 15 +0x60,0x60,0x60,0x60,0x60,0x00, // 16 +0x94,0xA2,0xFF,0xA2,0x94,0x00, // 17 +0x08,0x04,0x7E,0x04,0x08,0x00, // 18 +0x10,0x20,0x7E,0x20,0x10,0x00, // 19 +0x08,0x08,0x2A,0x1C,0x08,0x00, // 1A +0x08,0x1C,0x2A,0x08,0x08,0x00, // 1B +0x1E,0x10,0x10,0x10,0x10,0x00, // 1C +0x0C,0x1E,0x0C,0x1E,0x0C,0x00, // 1D +0x30,0x38,0x3E,0x38,0x30,0x00, // 1E +0x06,0x0E,0x3E,0x0E,0x06,0x00, // 1F +0x00,0x00,0x00,0x00,0x00,0x00, // 20 +0x00,0x00,0x5F,0x00,0x00,0x00, // 21 ! +0x00,0x07,0x00,0x07,0x00,0x00, // 22 " +0x14,0x7F,0x14,0x7F,0x14,0x00, // 23 # +0x24,0x2A,0x7F,0x2A,0x12,0x00, // 24 $ +0x23,0x13,0x08,0x64,0x62,0x00, // 25 % +0x36,0x49,0x56,0x20,0x50,0x00, // 26 & +0x00,0x08,0x07,0x03,0x00,0x00, // 27 ' +0x00,0x1C,0x22,0x41,0x00,0x00, // 28 ( +0x00,0x41,0x22,0x1C,0x00,0x00, // 29 ) +0x2A,0x1C,0x7F,0x1C,0x2A,0x00, // 2A * +0x08,0x08,0x3E,0x08,0x08,0x00, // 2B + +0x00,0x80,0x70,0x30,0x00,0x00, // 2C , +0x08,0x08,0x08,0x08,0x08,0x00, // 2D - +0x00,0x00,0x60,0x60,0x00,0x00, // 2E . +0x20,0x10,0x08,0x04,0x02,0x00, // 2F / +0x3E,0x51,0x49,0x45,0x3E,0x00, // 30 0 +0x00,0x42,0x7F,0x40,0x00,0x00, // 31 1 +0x72,0x49,0x49,0x49,0x46,0x00, // 32 2 +0x21,0x41,0x49,0x4D,0x33,0x00, // 33 3 +0x18,0x14,0x12,0x7F,0x10,0x00, // 34 4 +0x27,0x45,0x45,0x45,0x39,0x00, // 35 5 +0x3C,0x4A,0x49,0x49,0x31,0x00, // 36 6 +0x41,0x21,0x11,0x09,0x07,0x00, // 37 7 +0x36,0x49,0x49,0x49,0x36,0x00, // 38 8 +0x46,0x49,0x49,0x29,0x1E,0x00, // 39 9 +0x00,0x00,0x14,0x00,0x00,0x00, // 3A : +0x00,0x40,0x34,0x00,0x00,0x00, // 3B ; +0x00,0x08,0x14,0x22,0x41,0x00, // 3C < +0x14,0x14,0x14,0x14,0x14,0x00, // 3D = +0x00,0x41,0x22,0x14,0x08,0x00, // 3E > +0x02,0x01,0x59,0x09,0x06,0x00, // 3F ? +0x3E,0x41,0x5D,0x59,0x4E,0x00, // 40 @ +0x7C,0x12,0x11,0x12,0x7C,0x00, // 41 A +0x7F,0x49,0x49,0x49,0x36,0x00, // 42 B +0x3E,0x41,0x41,0x41,0x22,0x00, // 43 C +0x7F,0x41,0x41,0x41,0x3E,0x00, // 44 D +0x7F,0x49,0x49,0x49,0x41,0x00, // 45 E +0x7F,0x09,0x09,0x09,0x01,0x00, // 46 F +0x3E,0x41,0x41,0x51,0x73,0x00, // 47 G +0x7F,0x08,0x08,0x08,0x7F,0x00, // 48 H +0x00,0x41,0x7F,0x41,0x00,0x00, // 49 I +0x20,0x40,0x41,0x3F,0x01,0x00, // 4A J +0x7F,0x08,0x14,0x22,0x41,0x00, // 4B K +0x7F,0x40,0x40,0x40,0x40,0x00, // 4C L +0x7F,0x02,0x1C,0x02,0x7F,0x00, // 4D M +0x7F,0x04,0x08,0x10,0x7F,0x00, // 4E N +0x3E,0x41,0x41,0x41,0x3E,0x00, // 4F O +0x7F,0x09,0x09,0x09,0x06,0x00, // 50 P +0x3E,0x41,0x51,0x21,0x5E,0x00, // 51 Q +0x7F,0x09,0x19,0x29,0x46,0x00, // 52 R +0x26,0x49,0x49,0x49,0x32,0x00, // 53 S +0x03,0x01,0x7F,0x01,0x03,0x00, // 54 T +0x3F,0x40,0x40,0x40,0x3F,0x00, // 55 U +0x1F,0x20,0x40,0x20,0x1F,0x00, // 56 V +0x3F,0x40,0x38,0x40,0x3F,0x00, // 57 W +0x63,0x14,0x08,0x14,0x63,0x00, // 58 X +0x03,0x04,0x78,0x04,0x03,0x00, // 59 Y +0x61,0x59,0x49,0x4D,0x43,0x00, // 5A Z +0x00,0x7F,0x41,0x41,0x41,0x00, // 5B [ +0x02,0x04,0x08,0x10,0x20,0x00, // 5C \ . +0x00,0x41,0x41,0x41,0x7F,0x00, // 5D ] +0x04,0x02,0x01,0x02,0x04,0x00, // 5E ^ +0x40,0x40,0x40,0x40,0x40,0x00, // 5F _ +0x00,0x03,0x07,0x08,0x00,0x00, // 60 ` +0x20,0x54,0x54,0x78,0x40,0x00, // 61 a +0x7F,0x28,0x44,0x44,0x38,0x00, // 62 b +0x38,0x44,0x44,0x44,0x28,0x00, // 63 c +0x38,0x44,0x44,0x28,0x7F,0x00, // 64 d +0x38,0x54,0x54,0x54,0x18,0x00, // 65 e +0x00,0x08,0x7E,0x09,0x02,0x00, // 66 f +0x18,0xA4,0xA4,0x9C,0x78,0x00, // 67 g +0x7F,0x08,0x04,0x04,0x78,0x00, // 68 h +0x00,0x44,0x7D,0x40,0x00,0x00, // 69 i +0x20,0x40,0x40,0x3D,0x00,0x00, // 6A j +0x7F,0x10,0x28,0x44,0x00,0x00, // 6B k +0x00,0x41,0x7F,0x40,0x00,0x00, // 6C l +0x7C,0x04,0x78,0x04,0x78,0x00, // 6D m +0x7C,0x08,0x04,0x04,0x78,0x00, // 6E n +0x38,0x44,0x44,0x44,0x38,0x00, // 6F o +0xFC,0x18,0x24,0x24,0x18,0x00, // 70 p +0x18,0x24,0x24,0x18,0xFC,0x00, // 71 q +0x7C,0x08,0x04,0x04,0x08,0x00, // 72 r +0x48,0x54,0x54,0x54,0x24,0x00, // 73 s +0x04,0x04,0x3F,0x44,0x24,0x00, // 74 t +0x3C,0x40,0x40,0x20,0x7C,0x00, // 75 u +0x1C,0x20,0x40,0x20,0x1C,0x00, // 76 v +0x3C,0x40,0x30,0x40,0x3C,0x00, // 77 w +0x44,0x28,0x10,0x28,0x44,0x00, // 78 x +0x4C,0x90,0x90,0x90,0x7C,0x00, // 79 y +0x44,0x64,0x54,0x4C,0x44,0x00, // 7A z +0x00,0x08,0x36,0x41,0x00,0x00, // 7B { +0x00,0x00,0x77,0x00,0x00,0x00, // 7C | +0x00,0x41,0x36,0x08,0x00,0x00, // 7D } +0x02,0x01,0x02,0x04,0x02,0x00, // 7E ~ +0x3C,0x26,0x23,0x26,0x3C,0x00, // 7F +0xC7,0xC7,0xC7,0x00,0x00,0x00, // 80 +0x00,0x20,0x60,0x60,0x60,0x60, // 81 +0x60,0xE0,0x20,0x20,0x20,0x20, // 82 +0x20,0x60,0x60,0x00,0x00,0x00, // 83 +0x00,0x00,0x00,0xC7,0xC7,0xC7, // 84 +0xC7,0xC7,0xC7,0x00,0x00,0x00, // 85 +0x00,0xE0,0x70,0x50,0xFE,0x7A, // 86 +0x02,0x00,0x20,0x60,0xE0,0xF3, // 87 +0x3E,0x30,0x10,0x10,0x00,0x00, // 88 +0x00,0x00,0x00,0xC7,0xC7,0xC7, // 89 +0xC7,0xC7,0xC7,0x00,0x00,0x80, // 8A +0xC0,0xC3,0xA1,0x90,0x98,0x84, // 8B +0x83,0x00,0x00,0x1E,0x09,0x0C, // 8C +0x04,0xC4,0x7C,0x18,0x00,0x00, // 8D +0x00,0x00,0x00,0xC7,0xC7,0xC7, // 8E +0x00,0x00,0x00,0x00,0x00,0x00, // 8F +0x00,0x00,0x00,0x00,0x00,0x00, // 90 +0x00,0x00,0x00,0x00,0x00,0x00, // 91 +0x00,0x00,0x00,0x00,0x00,0x00, // 92 +0x00,0x00,0x00,0x00,0x00,0x00, // 93 +0x00,0x00,0x00,0x00,0x00,0xE0, // 94 +0xF0,0xF0,0xF0,0xE0,0xEC,0xEE, // 95 +0xF7,0xF3,0x70,0x20,0x00,0x7C, // 96 +0x7C,0x7C,0x7E,0x00,0x7E,0x7E, // 97 +0x7E,0x7F,0x7F,0x7F,0x00,0x00, // 98 +0x80,0xC0,0xE0,0x7E,0x5B,0x4F, // 99 +0x5B,0xFE,0xC0,0x00,0x00,0xC0, // 9A +0x00,0xDC,0xD7,0xDE,0xDE,0xDE, // 9B +0xD7,0xDC,0x00,0xC0,0x00,0x00, // 9C +0x00,0x00,0x00,0x00,0x00,0x00, // 9D +0x00,0x00,0x00,0x00,0x00,0x00, // 9E +0x00,0x00,0x00,0x00,0x00,0xFF, // 9F +0x71,0x71,0x71,0x00,0x00,0x00, // A0 +0x00,0x00,0x00,0x00,0x00,0x00, // A1 ? +0xC0,0xFF,0x00,0x08,0x0E,0x0E, // A2 ? +0x0C,0x00,0x00,0x00,0x00,0x00, // A3 ? +0x00,0x00,0x00,0x71,0x71,0x71, // A4 ? +0x71,0x71,0x71,0x00,0x00,0x08, // A5 ? +0x08,0x09,0x18,0x25,0x61,0x31, // A6 ? +0x1F,0x06,0x04,0x06,0x13,0x32, // A7 § +0x32,0x62,0x02,0x06,0x0C,0x08, // A8 ¨ +0x00,0x00,0x00,0x71,0x71,0x71, // A9 ? +0x71,0x71,0x71,0x00,0x00,0x00, // AA ? +0x00,0x00,0x00,0x00,0x00,0x00, // AB ? +0x09,0x11,0x18,0x08,0x0C,0x06, // AC ? +0x03,0x00,0x00,0x00,0x00,0x00, // AD ? +0x00,0x00,0x00,0x71,0x71,0x71, // AE ? +0x00,0x00,0x00,0x00,0x00,0x00, // AF ? +0x00,0x00,0x00,0x00,0x00,0x00, // B0 ° +0x00,0x00,0x00,0x00,0x00,0x00, // B1 ± +0x00,0x00,0x00,0x00,0x00,0x00, // B2 ? +0x00,0x00,0x00,0x00,0x00,0x00, // B3 ? +0x00,0x00,0x00,0x00,0x00,0x0F, // B4 ´ +0x1F,0x3F,0x7F,0x7F,0x7F,0x7F, // B5 ? +0x7F,0x3F,0x1E,0x0C,0x00,0x1F, // B6 ¶ +0x1F,0x1F,0x3F,0x00,0x3F,0x3F, // B7 ? +0x3F,0x7F,0x7F,0x7F,0x00,0x30, // B8 ? +0x7B,0x7F,0x78,0x30,0x20,0x20, // B9 ? +0x30,0x78,0x7F,0x3B,0x00,0x03, // BA ? +0x00,0x0F,0x7F,0x0F,0x0F,0x0F, // BB ? +0x7F,0x0F,0x00,0x03,0x00,0x00, // BC ? +0x00,0x00,0x00,0x00,0x00,0x00, // BD ? +0x00,0x00,0x00,0x00,0x00,0x00, // BE ? +0x00,0x00,0x00,0x00,0x00,0xFF, // BF ? +0x1C,0x1C,0x1C,0x00,0x00,0x00, // C0 ? +0x00,0x00,0x00,0x00,0x00,0x00, // C1 ? +0x07,0x0F,0x00,0x00,0x00,0x00, // C2 ? +0x00,0x00,0x00,0x00,0x00,0x00, // C3 ? +0x00,0x00,0x00,0x1C,0x1C,0x1C, // C4 ? +0x1C,0x1C,0x1C,0x00,0x00,0x00, // C5 ? +0x00,0x00,0x80,0x80,0xC0,0x40, // C6 ? +0x80,0x00,0x00,0x00,0xC0,0x40, // C7 ? +0x40,0xC0,0xC0,0xC0,0x00,0x00, // C8 ? +0x00,0x00,0x00,0x1C,0x1C,0x1C, // C9 ? +0x1C,0x1C,0x1C,0x00,0x00,0x00, // CA ? +0x00,0x00,0x00,0x00,0x00,0x00, // CB ? +0x00,0x00,0x00,0x00,0x00,0x00, // CC ? +0x00,0x00,0x00,0x00,0x00,0x00, // CD ? +0x00,0x00,0x00,0x1C,0x1C,0x1C, // CE ? +0x00,0x00,0x00,0x00,0x00,0x00, // CF ? +0x00,0x00,0x00,0x00,0x00,0x00, // D0 ? +0x00,0x00,0x00,0x00,0x00,0x00, // D1 ? +0x00,0x00,0x00,0x00,0x00,0x00, // D2 ? +0x00,0x00,0x00,0x00,0x00,0x00, // D3 ? +0x00,0x00,0x00,0x00,0x00,0x00, // D4 ? +0x00,0x00,0x00,0x00,0x00,0x00, // D5 ? +0x00,0x00,0x00,0x00,0x00,0x00, // D6 ? +0x00,0x00,0x00,0x00,0x00,0x00, // D7 × +0x00,0x00,0x00,0x00,0x00,0x00, // D8 ? +0x00,0x00,0x00,0x00,0x00,0x00, // D9 ? +0x00,0x00,0x00,0x00,0x00,0x00, // DA ? +0x00,0x00,0x00,0x00,0x00,0x00, // DB ? +0x00,0x00,0x00,0x00,0x00,0x00, // DC ? +0x00,0x00,0x00,0x00,0x00,0x00, // DD ? +0x00,0x00,0x00,0x00,0x00,0x00, // DE ? +0x00,0x00,0x00,0x00,0x00,0xFF, // DF ? +}; +static const unsigned int fontLen = 512; diff --git a/keyboards/getta25/keymaps/oled/keymap.c b/keyboards/getta25/keymaps/oled/keymap.c new file mode 100644 index 000000000000..44833857d31a --- /dev/null +++ b/keyboards/getta25/keymaps/oled/keymap.c @@ -0,0 +1,204 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +#ifdef OLED_DRIVER_ENABLE +static uint32_t oled_timer = 0; +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE, + _ARROW, + _MACRO, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE, + SEND_SUM, + SEND_AVE, + SEND_CIF, + SEND_MAX, + SEND_MIN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-----------------------------------| + KC_ESC, KC_F2, JP_EQL, KC_DEL, + //|--------+--------+--------+--------| + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + //|--------+--------+--------+--------+--------| + KC_P7, KC_P8, KC_P9, LCTL(JP_LBRC), + //|--------+--------+--------+--------+--------| + KC_P4, KC_P5, KC_P6, KC_PPLS, JP_EQL, + //|--------+--------+--------+--------+--------| + KC_P1, KC_P2, KC_P3, KC_DEL, + //|--------+--------+--------+--------+--------| +LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC + //`--------------------------------------------' + ), + + [_ARROW] = LAYOUT( + //,-----------------------------------| + _______, _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, _______, _______, _______, + //|--------+--------+--------+--------+--------| + XXXXXXX, KC_UP, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______, + //|--------+--------+--------+--------+--------| + XXXXXXX, KC_DOWN, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + MO(_ARROW), MO(_MACRO), _______, _______ + //`--------------------------------------------' + ), + + [_MACRO] = LAYOUT( + //,-----------------------------------| + _______, _______, _______, _______, + //|--------+--------+--------+--------| + SEND_MIN,SEND_MAX,SEND_CIF,SEND_AVE, + //|--------+--------+--------+--------+--------| + KC_F7, KC_F8, KC_F9, _______, + //|--------+--------+--------+--------+--------| + KC_F4, KC_F5, KC_F6,SEND_SUM, _______, + //|--------+--------+--------+--------+--------| + KC_F11, KC_F12, KC_F3, _______, + //|--------+--------+--------+--------+--------| + _______, _______, JP_RPRN, _______ + //`--------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------| + _______, _______, _______, _______, + //|--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + RGB_SAD, RGB_SAI, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, _______, + //|--------+--------+--------+--------+--------| + RGB_VAD, RGB_VAI, XXXXXXX, _______, + //|--------+--------+--------+--------+--------| + _______, _______, RGB_MOD, _______ + //`--------------------------------------------' + ) +}; + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _ARROW, _MACRO, _ADJUST); +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _ARROW: + rgblight_sethsv_at(HSV_BLUE, 0); + break; + case _MACRO: + rgblight_sethsv_at(HSV_RED, 0); + break; + case _ADJUST: + rgblight_sethsv_at(HSV_PURPLE, 0); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_range( 0, 0, 0, 0, 1); + break; + } + rgblight_set_effect_range( 1, 8); +#endif +return state; +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool result = false; + if (record->event.pressed) { + #ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + #endif + } + switch (keycode) { + case SEND_SUM: + if (record->event.pressed) { + SEND_STRING("_SUM*"); + } + break; + case SEND_AVE: + if (record->event.pressed) { + SEND_STRING("_AVERAGE*"); + } + break; + case SEND_CIF: + if (record->event.pressed) { + SEND_STRING("_COUNTIF*"); + } + break; + case SEND_MAX: + if (record->event.pressed) { + SEND_STRING("_MAX*"); + } + break; + case SEND_MIN: + if (record->event.pressed) { + SEND_STRING("_MIN*"); + } + break; + default: + result = true; + break; + } + + return result; +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } + +void render_layer_state(void) { + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("LAYER"), false); + oled_write_P(PSTR("Arrow"), layer_state_is(_ARROW)); + oled_write_P(PSTR("Macro"), layer_state_is(_MACRO)); + oled_write_P(PSTR("Adjus"), layer_state_is(_ADJUST)); + oled_write_P(PSTR(" "), false); +} + +void render_keylock_status(led_t led_state) { + oled_write_P(PSTR("NumL "), led_state.num_lock); +} + +void render_layer_messages(void) { + oled_write_P(PSTR("GETtA 25 For Your Good Job. "), false); +} + +void render_status(void) { + /* Show Keyboard Layout */ + render_layer_state(); + render_keylock_status(host_keyboard_led_state()); +} + +void oled_task_user(void) { + static const char PROGMEM font_logo[] = { + 0x80,0x81,0x82,0x83,0x84, + 0xa0,0xa1,0xa2,0xa3,0xa4, + 0xc0,0xc1,0xc2,0xc3,0xc4, + + 0x85,0x86,0x87,0x88,0x89, + 0xa5,0xa6,0xa7,0xa8,0xa9, + 0xc5,0xc6,0xc7,0xc8,0xc9, + + 0x8a,0x8b,0x8c,0x8d,0x8e, + 0xaa,0xab,0xac,0xad,0xae, + 0xca,0xcb,0xcc,0xcd,0xce,0 + }; + oled_write_P(font_logo, false); + + render_status(); // Renders the current keyboard state (layer, lock) +} + +#endif diff --git a/keyboards/getta25/readme.md b/keyboards/getta25/readme.md new file mode 100644 index 000000000000..886e52a2ea11 --- /dev/null +++ b/keyboards/getta25/readme.md @@ -0,0 +1,17 @@ +# getta25 + +![getta25](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20191127/20191127005608.png) + +This is 25 keys tenkeypad. + +* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +* Hardware Supported: Getta25 PCB, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1700006) + +Make example for this keyboard (after setting up your build environment): + + make getta25:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/getta25-rev2-build-guide) diff --git a/keyboards/getta25/rev1/config.h b/keyboards/getta25/rev1/config.h new file mode 100644 index 000000000000..e7b198c573ed --- /dev/null +++ b/keyboards/getta25/rev1/config.h @@ -0,0 +1,73 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0013 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT getta25 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B2 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 9 // Number of LEDs +#define RGBLIGHT_ANIMATIONS + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/getta25/rev1/rev1.c b/keyboards/getta25/rev1/rev1.c new file mode 100644 index 000000000000..520a869e57ba --- /dev/null +++ b/keyboards/getta25/rev1/rev1.c @@ -0,0 +1 @@ +#include "rev1.h" diff --git a/keyboards/getta25/rev1/rev1.h b/keyboards/getta25/rev1/rev1.h new file mode 100644 index 000000000000..98f4318a6af2 --- /dev/null +++ b/keyboards/getta25/rev1/rev1.h @@ -0,0 +1,35 @@ +#pragma once + +#include "getta25.h" + +/* + * ,-----------------------. + * | L05 | L15 | L25 | L35 | + * |-----------------------+ + * | L04 | L14 | L24 | L34 | + * |-----------------------------+ + * | L03 | L13 | L23 | | L43 | + * |-----------------------------+ + * | L02 | L12 | L22 | L32 | L42 | + * |-----------------------------+ + * | L01 | L11 | L21 | | L41 | + * |-----------------------------+ + * | L00 | | L20 | L30 | L40 | + * ,-----------------------------' + */ + +#define LAYOUT( \ + L05, L15, L25, L35, \ + L04, L14, L24, L34, \ + L03, L13, L23, L43, \ + L02, L12, L22, L32, L42, \ + L01, L11, L21, L41, \ + L00, L20, L30, L40 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + {KC_NO, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30,KC_NO, L32,KC_NO, L34, L35 }, \ + { L40, L41, L42, L43,KC_NO,KC_NO } \ + } diff --git a/keyboards/getta25/rules.mk b/keyboards/getta25/rules.mk new file mode 100644 index 000000000000..65aca76133c7 --- /dev/null +++ b/keyboards/getta25/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_DRIVER_ENABLE = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +DEFAULT_FOLDER = getta25/rev1 From 5f35203d1bc89b3d6dd7e94cada3c4e4c23f61ab Mon Sep 17 00:00:00 2001 From: Alfred Maler Date: Tue, 21 Jan 2020 02:01:09 -0500 Subject: [PATCH 095/331] [Keymap] Feature/preonic/rev3/alfrdmalr (#7870) * WIP do not merge * first pass at custom preonic layout * add auto shift and reset via leader key * Update readme * update copyright notice * formatting changes * fix: use MO instead of process_record_user * added backslash and moved grave position * remove extraneous 'j' characer in NUMPAD template * update template formatting * remove process_record_user * swap "!" with "@" * fix readme formatting * update readme layout image --- keyboards/preonic/keymaps/alfrdmalr/config.h | 40 ++++ keyboards/preonic/keymaps/alfrdmalr/keymap.c | 192 ++++++++++++++++++ keyboards/preonic/keymaps/alfrdmalr/readme.md | 80 ++++++++ keyboards/preonic/keymaps/alfrdmalr/rules.mk | 3 + 4 files changed, 315 insertions(+) create mode 100644 keyboards/preonic/keymaps/alfrdmalr/config.h create mode 100644 keyboards/preonic/keymaps/alfrdmalr/keymap.c create mode 100644 keyboards/preonic/keymaps/alfrdmalr/readme.md create mode 100644 keyboards/preonic/keymaps/alfrdmalr/rules.mk diff --git a/keyboards/preonic/keymaps/alfrdmalr/config.h b/keyboards/preonic/keymaps/alfrdmalr/config.h new file mode 100644 index 000000000000..d906664c95a6 --- /dev/null +++ b/keyboards/preonic/keymaps/alfrdmalr/config.h @@ -0,0 +1,40 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#define LEADER_TIMEOUT 400 +#define LEADER_PER_KEY_TIMING diff --git a/keyboards/preonic/keymaps/alfrdmalr/keymap.c b/keyboards/preonic/keymaps/alfrdmalr/keymap.c new file mode 100644 index 000000000000..c2a682d4a301 --- /dev/null +++ b/keyboards/preonic/keymaps/alfrdmalr/keymap.c @@ -0,0 +1,192 @@ +/* Copyright 2015-2017 Jack Humbert 2019-2020 Alfred Maler + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _SETTINGS, + _SYMBOLS, + _NAVIGATION, + _NUMPAD, +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + SYMBOLS, + NAVIGATION, + NUMPAD, + SETTINGS +}; + +#define NUMSPACE LT(_NUMPAD, KC_SPC) +#define NAVLAYER MO(_NAVIGATION) +#define SYMLAYER MO(_SYMBOLS) +#define CTRLSHFT C(KC_LSFT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | DEL | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NAV | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | C/S | LGUI | LALT | SYMB | SPACE/NUM | SYMB | RALT | SETT | MUTG | LEAD | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + NAVLAYER, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, CTRLSHFT, KC_LGUI, KC_LALT, SYMLAYER, NUMSPACE, NUMSPACE, SYMLAYER, KC_RALT, SETTINGS, MU_TOG, KC_LEAD +), + +/* SYMBOLS + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | # | $ | { | } | | | ^ | * | | | ~ | DEL | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | < | > | ( | ) | | | - | + | & | \ | ` | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | SHFT | ! | @ | [ | ] | | | _ | = | % | / | SHFT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | + * `-----------------------------------------------------------------------------------' + */ +[_SYMBOLS] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_HASH, KC_DOLLAR, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_CIRC, KC_ASTR, KC_PIPE, KC_TILD, KC_DEL, + KC_NO, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_MINS, KC_PLUS, KC_AMPR, KC_BSLS, KC_GRV, + KC_LSFT, KC_EXCLAIM, KC_AT, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_UNDS, KC_EQL, KC_PERC, KC_SLSH, KC_RSFT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* NAVIGATION + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | | DEL | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NAV | SHFT | CTRl | ALT | GUI | | LEFT | DOWN | UP | RGHT | | ENTR | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | SHFT | UNDO | CUT | COPY | PSTE | | SPC | PGDO | PGUP | | | SHFT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS | + * `-----------------------------------------------------------------------------------' + */ +[_NAVIGATION] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TRNS, KC_NO, KC_NO, KC_SPC, KC_F5, KC_NO, KC_INS, KC_HOME, KC_END, KC_TAB, KC_NO, KC_DEL, + KC_TRNS, KC_LSFT, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_ENT, + KC_TRNS, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), KC_NO, KC_SPC, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ESC, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* NUMPAD + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | F9 | F10 | F11 | F12 | | | 7 | 8 | 9 | - | DEL | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_MINS, KC_DEL, + KC_ESC, KC_F5, KC_F6, KC_F7, KC_F8, KC_SPC, KC_SPC, KC_4, KC_5, KC_6, KC_PLUS, KC_ENT, + KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_LALT, KC_CAPS, KC_1, KC_2, KC_3, KC_SLSH, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_ASTR, KC_TRNS +), + +/* SETTINGS + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SETTINGS] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + KC_ASTG, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif + + LEADER_DICTIONARY() { + leading = false; + SEQ_FIVE_KEYS(KC_R, KC_E, KC_S, KC_E, KC_T) { + reset_keyboard(); + } + leader_end(); + } +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + default: + return true; + } +} \ No newline at end of file diff --git a/keyboards/preonic/keymaps/alfrdmalr/readme.md b/keyboards/preonic/keymaps/alfrdmalr/readme.md new file mode 100644 index 000000000000..13c5d711cdfe --- /dev/null +++ b/keyboards/preonic/keymaps/alfrdmalr/readme.md @@ -0,0 +1,80 @@ +# alfrdmalr's preonic layout +## Overview +The alphanumeric characters and symbols are spread between three main 'typing' layers: QWERTY, NUMPAD, and SYMBOLS. The NUMPAD layer also holds the first twelve function keys. + +A fourth layer, NAVIGATION, contains useful modifiers, shortcuts, and navigation functions like the arrow keys and page up/down. This layer also provides access to the ENTER and ESC keys. + +Finally, a SETTINGS layer can be used to adjust certain keyboard-related options. Right now, this is pretty similar to the default settings layer (the planck's ADJUST layer). Primary differences are the inclusion of an autoshift toggle and the removal of the reset button. The bootloader functionality has been moved to a leader key sequence: LEAD - R - E - S - E - T. + +``` +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NAV | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | C/S | LGUI | LALT | SYMB | SPACE/NUM | SYMB | RALT | SETT |mu tog| LEAD | + * `-----------------------------------------------------------------------------------' + */ + + /* SYMBOLS + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | # | $ | { | } | | | ^ | * | | | ~ | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | < | > | ( | ) | | | - | + | & | ` | ENTR | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | SHFT | ! | @ | [ | ] | | | _ | = | % | / | SHFT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | + * `-----------------------------------------------------------------------------------' + */ + + /* NUMPAD + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | F9 | F10 | F11 | F12 | | | 7 | 8 | 9 | - | DEL | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS | + * `-----------------------------------------------------------------------------------' + */ + + /* NAVIGATION + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NAV | SHIFT| CTRl | ALT | GUI | | LEFT | DOWN | UP | RIGHT| | ENTR | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | SHFT | UNDO | CUT | COPY | PASTE| | SPC | PGDO | PGUP | | | SHFT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS | + * `-----------------------------------------------------------------------------------' + */ + + /* SETTINGS + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + ``` + ASTG = autoshift toggle diff --git a/keyboards/preonic/keymaps/alfrdmalr/rules.mk b/keyboards/preonic/keymaps/alfrdmalr/rules.mk new file mode 100644 index 000000000000..291bb16fabee --- /dev/null +++ b/keyboards/preonic/keymaps/alfrdmalr/rules.mk @@ -0,0 +1,3 @@ +SRC += muse.c +AUTO_SHIFT_ENABLE = yes +LEADER_ENABLE = yes From 2566992c9af58ad25c909cd454531df94714dfdf Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 22 Jan 2020 01:07:53 +1100 Subject: [PATCH 096/331] Add DIODE_DIRECTION to Getta25 (#7951) --- keyboards/getta25/rev1/config.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboards/getta25/rev1/config.h b/keyboards/getta25/rev1/config.h index e7b198c573ed..3ad74695ccc3 100644 --- a/keyboards/getta25/rev1/config.h +++ b/keyboards/getta25/rev1/config.h @@ -34,6 +34,9 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D4, C6, D7, E6, B2 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 From 123ae73efc9e59e91f8e73c0c5e8f4df687daeef Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 22 Jan 2020 01:17:33 +1100 Subject: [PATCH 097/331] Fix lock LEDs for ChibiOS when using shared endpoints (#7877) * Fix lock LEDs for ChibiOS when using shared endpoints * Tweak comments * Doesn't need to be uint16 anymore --- tmk_core/protocol/chibios/usb_main.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 8fbe877dbf38..d71e7ce44d71 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -62,7 +62,7 @@ extern keymap_config_t keymap_config; uint8_t keyboard_idle __attribute__((aligned(2))) = 0; uint8_t keyboard_protocol __attribute__((aligned(2))) = 1; -uint16_t keyboard_led_stats __attribute__((aligned(2))) = 0; +uint8_t keyboard_led_stats = 0; volatile uint16_t keyboard_idle_count = 0; static virtual_timer_t keyboard_idle_timer; static void keyboard_idle_timer_cb(void *arg); @@ -381,14 +381,17 @@ static uint16_t get_hword(uint8_t *p) { * Other Device Required Optional Optional Optional Optional Optional */ -#if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP) static uint8_t set_report_buf[2] __attribute__((aligned(2))); static void set_led_transfer_cb(USBDriver *usbp) { - if ((set_report_buf[0] == REPORT_ID_KEYBOARD) || (set_report_buf[0] == REPORT_ID_NKRO)) { - keyboard_led_stats = set_report_buf[1]; + if (usbp->setup[6] == 2) { /* LSB(wLength) */ + uint8_t report_id = set_report_buf[0]; + if ((report_id == REPORT_ID_KEYBOARD) || (report_id == REPORT_ID_NKRO)) { + keyboard_led_stats = set_report_buf[1]; + } + } else { + keyboard_led_stats = set_report_buf[0]; } } -#endif /* Callback for SETUP request on the endpoint 0 (control) */ static bool usb_request_hook_cb(USBDriver *usbp) { @@ -444,18 +447,12 @@ static bool usb_request_hook_cb(USBDriver *usbp) { case USB_RTYPE_DIR_HOST2DEV: switch (usbp->setup[1]) { /* bRequest */ case HID_SET_REPORT: - switch (usbp->setup[4]) { /* LSB(wIndex) (check MSB==0 and wLength==1?) */ + switch (usbp->setup[4]) { /* LSB(wIndex) (check MSB==0?) */ + case KEYBOARD_INTERFACE: #if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP) case SHARED_INTERFACE: - usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb); - return TRUE; - break; #endif - - case KEYBOARD_INTERFACE: - /* keyboard_led_stats = - * keyboard_led_stats needs be word (or dword), otherwise we get an exception on F0 */ - usbSetupTransfer(usbp, (uint8_t *)&keyboard_led_stats, 1, NULL); + usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb); return TRUE; break; } @@ -613,7 +610,7 @@ static void keyboard_idle_timer_cb(void *arg) { } /* LED status */ -uint8_t keyboard_leds(void) { return (uint8_t)(keyboard_led_stats & 0xFF); } +uint8_t keyboard_leds(void) { return keyboard_led_stats; } /* prepare and start sending a report IN * not callable from ISR or locked state */ From dee1d68dde08dfcf792639e78e11629a7fbf8f9d Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Tue, 21 Jan 2020 14:48:06 +0000 Subject: [PATCH 098/331] format code according to conventions [skip ci] --- tmk_core/protocol/chibios/usb_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index d71e7ce44d71..9981477a5808 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -60,10 +60,10 @@ extern keymap_config_t keymap_config; # define usb_lld_disconnect_bus(usbp) #endif -uint8_t keyboard_idle __attribute__((aligned(2))) = 0; -uint8_t keyboard_protocol __attribute__((aligned(2))) = 1; -uint8_t keyboard_led_stats = 0; -volatile uint16_t keyboard_idle_count = 0; +uint8_t keyboard_idle __attribute__((aligned(2))) = 0; +uint8_t keyboard_protocol __attribute__((aligned(2))) = 1; +uint8_t keyboard_led_stats = 0; +volatile uint16_t keyboard_idle_count = 0; static virtual_timer_t keyboard_idle_timer; static void keyboard_idle_timer_cb(void *arg); From 6f176dfc7c23eda3ecba79fd90456a6b987b4d39 Mon Sep 17 00:00:00 2001 From: Dmitrijs Minajevs Date: Tue, 21 Jan 2020 07:48:13 -0800 Subject: [PATCH 099/331] Add VIA support to DZ60 (#7814) * Add DZ60 to VIA * Changed vendor id from 'KF' to 'DZ' * Capitalize hex * Fix Via_layout_options size setting * Update keyboards/dz60/keymaps/via/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/dz60/config.h | 7 +++++-- keyboards/dz60/keymaps/via/keymap.c | 29 +++++++++++++++++++++++++++++ keyboards/dz60/keymaps/via/rules.mk | 2 ++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 keyboards/dz60/keymaps/via/keymap.c create mode 100644 keyboards/dz60/keymaps/via/rules.mk diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index 63794d0270bc..e0c2254d0a6b 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -4,7 +4,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x445A // "DZ" #define PRODUCT_ID 0x2260 #define DEVICE_VER 0x0001 #define MANUFACTURER KBDFans @@ -45,4 +45,7 @@ #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_SLEEP #endif -#endif \ No newline at end of file +#endif + +/* VIA related config */ +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 \ No newline at end of file diff --git a/keyboards/dz60/keymaps/via/keymap.c b/keyboards/dz60/keymaps/via/keymap.c new file mode 100644 index 000000000000..34c6e131f937 --- /dev/null +++ b/keyboards/dz60/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_NO, MO(1), KC_RCTL), + LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; \ No newline at end of file diff --git a/keyboards/dz60/keymaps/via/rules.mk b/keyboards/dz60/keymaps/via/rules.mk new file mode 100644 index 000000000000..ea9a831e1743 --- /dev/null +++ b/keyboards/dz60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +LINK_TIME_OPTIMIZATION_ENABLE = yes +VIA_ENABLE = yes From 37db6012a7f6828c23b42587ca9d0a4f5d73ff35 Mon Sep 17 00:00:00 2001 From: dsanchezseco Date: Tue, 21 Jan 2020 18:12:07 +0100 Subject: [PATCH 100/331] keymap, fixed rgb effect name and deactivate oled (#7953) * added rgblight controls to planck keymap * fixed knight ridder offset to face me * no oled for crkbd 'till fixed * fixed RGB effect name --- keyboards/crkbd/keymaps/dsanchezseco/config.h | 2 +- keyboards/crkbd/keymaps/dsanchezseco/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/crkbd/keymaps/dsanchezseco/config.h b/keyboards/crkbd/keymaps/dsanchezseco/config.h index 033173defb6a..f10c474057c7 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/config.h +++ b/keyboards/crkbd/keymaps/dsanchezseco/config.h @@ -31,7 +31,7 @@ along with this program. If not, see . // lower maximum brightness to lower power usage and prevent unresponsiveness #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT //disable effects #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue diff --git a/keyboards/crkbd/keymaps/dsanchezseco/rules.mk b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk index 44f60368b885..93a21f7bf300 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/rules.mk +++ b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk @@ -3,7 +3,7 @@ SRC += ./logo_reader.c # enable OLED displays -OLED_DRIVER_ENABLE = yes +OLED_DRIVER_ENABLE = no # enable media keys EXTRAKEY_ENABLE = yes From 9b6b54cdaae43e976ea4a5e5d01ec25309c7496b Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 21 Jan 2020 13:26:01 -0800 Subject: [PATCH 101/331] [Keyboard] Think 6.5 Soldered Matrix Fix (#7952) * both backspace and left shift matrix positions off by one * update the led_update routine * update readme * Update keyboards/gray_studio/think65/solder/solder.c --- .../gray_studio/think65/solder/readme.md | 2 -- keyboards/gray_studio/think65/solder/solder.c | 22 ++++--------------- keyboards/gray_studio/think65/solder/solder.h | 8 +++---- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/keyboards/gray_studio/think65/solder/readme.md b/keyboards/gray_studio/think65/solder/readme.md index e8636bf8ae3d..1d7e4450ad22 100644 --- a/keyboards/gray_studio/think65/solder/readme.md +++ b/keyboards/gray_studio/think65/solder/readme.md @@ -6,8 +6,6 @@ Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Hardware Supported: Think6.5 Compatible PCB Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=100166.0) -**Note:** The `LAYOUT_65_ansi_blocker` LAYOUT macro utilizes the same pins and switch matrix as the hotswap version. Any firmware made with this LAYOUT macro can be flashed on both the Solder (Compatible) version and the Hotswap version of the Think6.5. - **Indicator LEDs:** The solder PCB ONLY supports Caps Lock LEDs unlike the Hotswap version that supports Num Lock, Caps Lock, and Scroll Lock. Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/gray_studio/think65/solder/solder.c b/keyboards/gray_studio/think65/solder/solder.c index 4f40fb4a9289..48ed25b19b67 100644 --- a/keyboards/gray_studio/think65/solder/solder.c +++ b/keyboards/gray_studio/think65/solder/solder.c @@ -25,17 +25,9 @@ void matrix_init_kb(void) { // runs once when the firmware starts up setPinOutput(C7); - matrix_init_user(); } -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { // put your per-action keyboard code here // runs for every action, just before processing by the firmware @@ -43,15 +35,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); } -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(C7); - } else { - writePinHigh(C7); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(C7, !led_state.caps_lock); } - - led_set_user(usb_led); + return true; } - diff --git a/keyboards/gray_studio/think65/solder/solder.h b/keyboards/gray_studio/think65/solder/solder.h index 19ee551258ef..f38306b2b724 100644 --- a/keyboards/gray_studio/think65/solder/solder.h +++ b/keyboards/gray_studio/think65/solder/solder.h @@ -32,16 +32,16 @@ } #define LAYOUT_65_ansi_blocker( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F }, \ { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ - { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ } From b70500806ab047907b161ed6fa0dc32ba8a91784 Mon Sep 17 00:00:00 2001 From: Wilba Date: Wed, 22 Jan 2020 08:28:12 +1100 Subject: [PATCH 102/331] [Keyboard] Added WT60-B, WT60-BX (wilba.tech THERMAL) (#7948) * Added WT60-B, WT60-BX * Review changes --- .../wilba_tech/rama_works_koyu/info.json | 1 - .../wilba_tech/rama_works_m60_a/info.json | 1 - .../wilba_tech/rama_works_u80_a/info.json | 1 - keyboards/wilba_tech/wt60_a/info.json | 1 - keyboards/wilba_tech/wt60_b/config.h | 118 ++++++++++++++++++ keyboards/wilba_tech/wt60_b/info.json | 12 ++ .../wt60_b/keymaps/default/keymap.c | 38 ++++++ .../wilba_tech/wt60_b/keymaps/via/keymap.c | 38 ++++++ .../wilba_tech/wt60_b/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/wt60_b/readme.md | 18 +++ keyboards/wilba_tech/wt60_b/rules.mk | 46 +++++++ keyboards/wilba_tech/wt60_b/wt60_b.c | 1 + keyboards/wilba_tech/wt60_b/wt60_b.h | 37 ++++++ keyboards/wilba_tech/wt60_bx/config.h | 118 ++++++++++++++++++ keyboards/wilba_tech/wt60_bx/info.json | 12 ++ .../wt60_bx/keymaps/default/keymap.c | 38 ++++++ .../wilba_tech/wt60_bx/keymaps/via/keymap.c | 38 ++++++ .../wilba_tech/wt60_bx/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/wt60_bx/readme.md | 18 +++ keyboards/wilba_tech/wt60_bx/rules.mk | 46 +++++++ keyboards/wilba_tech/wt60_bx/wt60_bx.c | 1 + keyboards/wilba_tech/wt60_bx/wt60_bx.h | 37 ++++++ keyboards/wilba_tech/wt60_d/info.json | 1 - keyboards/wilba_tech/wt65_a/info.json | 1 - keyboards/wilba_tech/wt65_b/info.json | 1 - keyboards/wilba_tech/wt69_a/info.json | 1 - keyboards/wilba_tech/wt75_a/info.json | 1 - keyboards/wilba_tech/wt75_b/info.json | 1 - keyboards/wilba_tech/wt80_a/info.json | 1 - keyboards/wilba_tech/wt8_a/info.json | 1 - keyboards/wilba_tech/wt_rgb_backlight.c | 66 +++++++++- keyboards/wilba_tech/zeal60/info.json | 1 - keyboards/wilba_tech/zeal65/info.json | 1 - 33 files changed, 682 insertions(+), 16 deletions(-) create mode 100644 keyboards/wilba_tech/wt60_b/config.h create mode 100644 keyboards/wilba_tech/wt60_b/info.json create mode 100644 keyboards/wilba_tech/wt60_b/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt60_b/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt60_b/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt60_b/readme.md create mode 100644 keyboards/wilba_tech/wt60_b/rules.mk create mode 100644 keyboards/wilba_tech/wt60_b/wt60_b.c create mode 100644 keyboards/wilba_tech/wt60_b/wt60_b.h create mode 100644 keyboards/wilba_tech/wt60_bx/config.h create mode 100644 keyboards/wilba_tech/wt60_bx/info.json create mode 100644 keyboards/wilba_tech/wt60_bx/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt60_bx/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt60_bx/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt60_bx/readme.md create mode 100644 keyboards/wilba_tech/wt60_bx/rules.mk create mode 100644 keyboards/wilba_tech/wt60_bx/wt60_bx.c create mode 100644 keyboards/wilba_tech/wt60_bx/wt60_bx.h diff --git a/keyboards/wilba_tech/rama_works_koyu/info.json b/keyboards/wilba_tech/rama_works_koyu/info.json index 430bc6fed8e6..377ee0333ef0 100644 --- a/keyboards/wilba_tech/rama_works_koyu/info.json +++ b/keyboards/wilba_tech/rama_works_koyu/info.json @@ -2,7 +2,6 @@ "keyboard_name": "RAMA WORKS KOYU", "url": "http://rama.works", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 16, "height": 5, "layouts": { diff --git a/keyboards/wilba_tech/rama_works_m60_a/info.json b/keyboards/wilba_tech/rama_works_m60_a/info.json index e2061b73f6bd..cc8918556ed5 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/info.json +++ b/keyboards/wilba_tech/rama_works_m60_a/info.json @@ -2,7 +2,6 @@ "keyboard_name": "RAMA WORKS M60-A", "url": "http://rama.works", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 15, "height": 5, "layouts": { diff --git a/keyboards/wilba_tech/rama_works_u80_a/info.json b/keyboards/wilba_tech/rama_works_u80_a/info.json index 7febde5c5b77..3652b4e51206 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/info.json +++ b/keyboards/wilba_tech/rama_works_u80_a/info.json @@ -2,7 +2,6 @@ "keyboard_name": "RAMA WORKS U80-A", "url": "http://rama.works", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 18.25, "height": 6.5, "layouts": { diff --git a/keyboards/wilba_tech/wt60_a/info.json b/keyboards/wilba_tech/wt60_a/info.json index 3b3614a8bf9d..09bdcaf05fda 100644 --- a/keyboards/wilba_tech/wt60_a/info.json +++ b/keyboards/wilba_tech/wt60_a/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT60-A", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 15, "height": 5, "layouts": { diff --git a/keyboards/wilba_tech/wt60_b/config.h b/keyboards/wilba_tech/wt60_b/config.h new file mode 100644 index 000000000000..e80a6715de41 --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/config.h @@ -0,0 +1,118 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x60B0 // 60-B +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT60-B +#define DESCRIPTION wilba.tech WT60-B + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for wT60-B specifics +#define RGB_BACKLIGHT_WT60_B + +// enable/disable LEDs based on layout +// they aren't really used if RGB_BACKLIGHT_WT60_B defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt60_b/info.json b/keyboards/wilba_tech/wt60_b/info.json new file mode 100644 index 000000000000..5d01aaa53a3b --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT60-B", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_b/keymaps/default/keymap.c b/keyboards/wilba_tech/wt60_b/keymaps/default/keymap.c new file mode 100644 index 000000000000..710fa4da1660 --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-B +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_MO13, + KC_NO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO23, KC_NO), + +// Fn1 Layer +[1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_all( + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt60_b/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_b/keymaps/via/keymap.c new file mode 100644 index 000000000000..710fa4da1660 --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-B +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_MO13, + KC_NO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO23, KC_NO), + +// Fn1 Layer +[1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_all( + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt60_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_b/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_b/readme.md b/keyboards/wilba_tech/wt60_b/readme.md new file mode 100644 index 000000000000..f365bf325883 --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/readme.md @@ -0,0 +1,18 @@ +# wilba.tech WT60-B + +WT60-B is a keyboard PCB supporting 60% layout. [More info at wilba.tech](https://wilba.tech/) + +First produced as WT60-B THERMAL for wilba.tech Thermal. + +WT60-B is the hotswap variant PCB. +WT60-BX is the solderable variant PCB with split backspace and stepped Caps Lock support. + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT60-B +* Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt60_b:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_b/rules.mk b/keyboards/wilba_tech/wt60_b/rules.mk new file mode 100644 index 000000000000..50faab968ca1 --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/rules.mk @@ -0,0 +1,46 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/wt60_b/wt60_b.c b/keyboards/wilba_tech/wt60_b/wt60_b.c new file mode 100644 index 000000000000..051cbc6d43d5 --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/wt60_b.c @@ -0,0 +1 @@ +#include "wt60_b.h" diff --git a/keyboards/wilba_tech/wt60_b/wt60_b.h b/keyboards/wilba_tech/wt60_b/wt60_b.h new file mode 100644 index 000000000000..2b5fe7fe11dc --- /dev/null +++ b/keyboards/wilba_tech/wt60_b/wt60_b.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" +#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" +#include "via.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K407, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413 } \ +} diff --git a/keyboards/wilba_tech/wt60_bx/config.h b/keyboards/wilba_tech/wt60_bx/config.h new file mode 100644 index 000000000000..0fba586d8fd9 --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/config.h @@ -0,0 +1,118 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x60B1 // 60-BX +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT60-BX +#define DESCRIPTION wilba.tech WT60-BX + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for wT60-BX specifics +#define RGB_BACKLIGHT_WT60_BX + +// enable/disable LEDs based on layout +// they aren't really used if RGB_BACKLIGHT_WT60_BX defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/wt60_bx/info.json b/keyboards/wilba_tech/wt60_bx/info.json new file mode 100644 index 000000000000..3d85f0d57c77 --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT60-BX", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_bx/keymaps/default/keymap.c b/keyboards/wilba_tech/wt60_bx/keymaps/default/keymap.c new file mode 100644 index 000000000000..3e08d4eda15f --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-BX +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_MO13, + KC_NO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO23, KC_NO), + +// Fn1 Layer +[1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_all( + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt60_bx/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_bx/keymaps/via/keymap.c new file mode 100644 index 000000000000..3e08d4eda15f --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-BX +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_MO13, + KC_NO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO23, KC_NO), + +// Fn1 Layer +[1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_all( + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt60_bx/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_bx/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_bx/readme.md b/keyboards/wilba_tech/wt60_bx/readme.md new file mode 100644 index 000000000000..19a5a54bb693 --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/readme.md @@ -0,0 +1,18 @@ +# wilba.tech WT60-BX + +WT60-BX is a keyboard PCB supporting 60% layout. [More info at wilba.tech](https://wilba.tech/) + +First produced as WT60-BX THERMAL for wilba.tech Thermal. + +WT60-B is the hotswap variant PCB. +WT60-BX is the solderable variant PCB with split backspace and stepped Caps Lock support. + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT60-BX +* Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt60_bx:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_bx/rules.mk b/keyboards/wilba_tech/wt60_bx/rules.mk new file mode 100644 index 000000000000..50faab968ca1 --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/rules.mk @@ -0,0 +1,46 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c diff --git a/keyboards/wilba_tech/wt60_bx/wt60_bx.c b/keyboards/wilba_tech/wt60_bx/wt60_bx.c new file mode 100644 index 000000000000..2a52888ca032 --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/wt60_bx.c @@ -0,0 +1 @@ +#include "wt60_bx.h" diff --git a/keyboards/wilba_tech/wt60_bx/wt60_bx.h b/keyboards/wilba_tech/wt60_bx/wt60_bx.h new file mode 100644 index 000000000000..2b5fe7fe11dc --- /dev/null +++ b/keyboards/wilba_tech/wt60_bx/wt60_bx.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" +#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" +#include "via.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K407, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413 } \ +} diff --git a/keyboards/wilba_tech/wt60_d/info.json b/keyboards/wilba_tech/wt60_d/info.json index adb19a15b711..bdd9c60a779d 100644 --- a/keyboards/wilba_tech/wt60_d/info.json +++ b/keyboards/wilba_tech/wt60_d/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT60-D", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 15, "height": 5, "layouts": { diff --git a/keyboards/wilba_tech/wt65_a/info.json b/keyboards/wilba_tech/wt65_a/info.json index f2b18dadd1b1..dc474f9d4e80 100644 --- a/keyboards/wilba_tech/wt65_a/info.json +++ b/keyboards/wilba_tech/wt65_a/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT65-A", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 16, "height": 5, "layouts": { diff --git a/keyboards/wilba_tech/wt65_b/info.json b/keyboards/wilba_tech/wt65_b/info.json index dd6fe1af39c4..618210ad1c15 100644 --- a/keyboards/wilba_tech/wt65_b/info.json +++ b/keyboards/wilba_tech/wt65_b/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT65-B", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 16, "height": 5, "layouts": { diff --git a/keyboards/wilba_tech/wt69_a/info.json b/keyboards/wilba_tech/wt69_a/info.json index df7af63c2946..8bf5acfc2418 100644 --- a/keyboards/wilba_tech/wt69_a/info.json +++ b/keyboards/wilba_tech/wt69_a/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT69-A", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 18.25, "height": 5, "layouts": { diff --git a/keyboards/wilba_tech/wt75_a/info.json b/keyboards/wilba_tech/wt75_a/info.json index b52d96852ac5..a7386a830634 100644 --- a/keyboards/wilba_tech/wt75_a/info.json +++ b/keyboards/wilba_tech/wt75_a/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT75-A", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 16, "height": 6, "layouts": { diff --git a/keyboards/wilba_tech/wt75_b/info.json b/keyboards/wilba_tech/wt75_b/info.json index e35518aa0290..3aa604b34186 100644 --- a/keyboards/wilba_tech/wt75_b/info.json +++ b/keyboards/wilba_tech/wt75_b/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT75-B", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 16, "height": 6, "layouts": { diff --git a/keyboards/wilba_tech/wt80_a/info.json b/keyboards/wilba_tech/wt80_a/info.json index a43acb2f5a3e..6c3ec9e31395 100644 --- a/keyboards/wilba_tech/wt80_a/info.json +++ b/keyboards/wilba_tech/wt80_a/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT80-A", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 18.25, "height": 6.5, "layouts": { diff --git a/keyboards/wilba_tech/wt8_a/info.json b/keyboards/wilba_tech/wt8_a/info.json index c40d44db727f..d33663c71532 100644 --- a/keyboards/wilba_tech/wt8_a/info.json +++ b/keyboards/wilba_tech/wt8_a/info.json @@ -2,7 +2,6 @@ "keyboard_name": "wilba.tech WT8-A", "url": "https://wilba.tech", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 4, "height": 2, "layouts": { diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 4af8e15e3a9e..9db4478efbd5 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -14,9 +14,20 @@ * along with this program. If not, see . */ -#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) || defined(RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_U80_A) || defined(RGB_BACKLIGHT_DAWN60) +#if defined(RGB_BACKLIGHT_ZEAL60) || \ + defined(RGB_BACKLIGHT_ZEAL65) || \ + defined(RGB_BACKLIGHT_M60_A) || \ + defined(RGB_BACKLIGHT_M6_B) || \ + defined(RGB_BACKLIGHT_KOYU) || \ + defined(RGB_BACKLIGHT_HS60) || \ + defined(RGB_BACKLIGHT_NK65) || \ + defined(RGB_BACKLIGHT_U80_A) || \ + defined(RGB_BACKLIGHT_DAWN60) || \ + defined(RGB_BACKLIGHT_WT60_B) || \ + defined(RGB_BACKLIGHT_WT60_BX) || \ + defined(RGB_BACKLIGHT_WT60_C) #else -#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU, RGB_BACKLIGHT_HS60, RGB_BACKLIGHT_NK65, RGB_BACKLIGHT_U80_A, RGB_BACKLIGHT_DAWN60 +#error wt_rgb_backlight.c compiled without setting configuration symbol #endif #ifndef MAX @@ -743,6 +754,35 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} }; +#elif defined(RGB_BACKLIGHT_WT60_B) || defined(RGB_BACKLIGHT_WT60_BX) || defined(RGB_BACKLIGHT_WT60_C) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {216,0}, {255,255}, {255,255}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,64}, {24,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {200,64}, {220,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, + {58,255}, {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, + // LB0..LB17 + {53,255}, {48,255}, {43,255}, {39,255}, {35,255}, {32,255}, {34,255}, {255,255}, {255,255}, + {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {192,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {173,248}, {170,255}, {165,255}, + {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {255,255}, {148,255}, {161,255}, + // LD0..LD17 + {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {0,233}, {228,201}, {235,242}, {237,255}, + {195,128}, {206,136}, {215,152}, {222,175}, {255,255}, {211,248}, {214,255}, {219,255}, {223,255} +}; #elif defined(RGB_BACKLIGHT_U80_A) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // Thse are scaled by 14.5 per U @@ -1080,6 +1120,14 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } }; +#elif defined(RGB_BACKLIGHT_WT60_B) || defined(RGB_BACKLIGHT_WT60_BX) || defined(RGB_BACKLIGHT_WT60_C) +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, + { 36+16, 255, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 54+17 } +}; #elif defined(RGB_BACKLIGHT_U80_A) // Note: Left spacebar stab is at 5,3 (LC6) // Right spacebar stab is at 5,10 (LD14) @@ -2325,6 +2373,20 @@ void backlight_init_drivers(void) ( index == 54+17 ) || // LD17 ( index == 36+15 ) || // LC15 ( index == 54+13 ) ); // LD13 +#elif defined(RGB_BACKLIGHT_WT60_B) || defined(RGB_BACKLIGHT_WT60_BX) || defined(RGB_BACKLIGHT_WT60_C) + bool enabled = !( + // LB6 not present on WT60-B +#if defined(RGB_BACKLIGHT_WT60_B) + ( index == 18+6 ) || // LB6 +#endif + // LB7 LB8 LB15 LB16 LB17 LC15 LD13 not present on WT60-B, WT60-BX, WT60-C + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) || // LB17 + ( index == 36+15 ) || // LC15 + ( index == 54+13 ) ); // LD13 #elif defined(RGB_BACKLIGHT_ZEAL60) // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 diff --git a/keyboards/wilba_tech/zeal60/info.json b/keyboards/wilba_tech/zeal60/info.json index 802f1f0cba25..dac59e64ff47 100644 --- a/keyboards/wilba_tech/zeal60/info.json +++ b/keyboards/wilba_tech/zeal60/info.json @@ -2,7 +2,6 @@ "keyboard_name": "Zeal60", "url": "https://zealpc.net", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 15, "height": 5, "layouts": { diff --git a/keyboards/wilba_tech/zeal65/info.json b/keyboards/wilba_tech/zeal65/info.json index 709f7cefe1b4..7d037598f758 100644 --- a/keyboards/wilba_tech/zeal65/info.json +++ b/keyboards/wilba_tech/zeal65/info.json @@ -2,7 +2,6 @@ "keyboard_name": "Zeal65", "url": "https://zealpc.net", "maintainer": "Wilba", - "bootloader": "atmel-dfu", "width": 16, "height": 5, "layouts": { From f7730567509619e31742ce0a2aa5ae7cfe21d23e Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 21 Jan 2020 23:09:50 +0000 Subject: [PATCH 103/331] [Keyboard] HS60 Refactor (Keymap restructure to be more standardized) (#7847) * Keymap restructure to be more standardized * made bootmagic lite default * Dividing keymaps * Update keyboards/hs60/v2/v2.c --- keyboards/hs60/v2/ansi/ansi.h | 38 + keyboards/hs60/v2/ansi/config.h | 146 ++ keyboards/hs60/v2/ansi/info.json | 333 ++++ .../ansi => ansi/keymaps/default}/config.h | 0 .../ansi => ansi/keymaps/default}/keymap.c | 0 .../ansi => ansi/keymaps/default}/readme.md | 0 .../v2/{ => ansi}/keymaps/stanrc85/config.h | 5 - .../v2/{ => ansi}/keymaps/stanrc85/keymap.c | 0 .../v2/{ => ansi}/keymaps/stanrc85/readme.md | 0 .../keymaps/stanrc85}/rules.mk | 0 .../ansi_via => ansi/keymaps/via}/config.h | 0 .../ansi_via => ansi/keymaps/via}/keymap.c | 0 .../ansi_via => ansi/keymaps/via}/readme.md | 0 .../default_via => ansi/keymaps/via}/rules.mk | 0 keyboards/hs60/v2/{ => ansi}/rules.mk | 4 +- keyboards/hs60/v2/hhkb/config.h | 146 ++ keyboards/hs60/v2/{v2.h => hhkb/hhkb.h} | 28 - keyboards/hs60/v2/hhkb/info.json | 12 + .../hhkb => hhkb/keymaps/default}/keymap.c | 0 .../hhkb => hhkb/keymaps/default}/readme.md | 0 .../v2/{ => hhkb}/keymaps/goatmaster/config.h | 15 - .../v2/{ => hhkb}/keymaps/goatmaster/keymap.c | 0 .../{ => hhkb}/keymaps/goatmaster/readme.md | 0 .../v2/{ => hhkb}/keymaps/goatmaster/rules.mk | 0 .../hhkb_via => hhkb/keymaps/via}/keymap.c | 0 .../hhkb_via => hhkb/keymaps/via}/readme.md | 0 .../hhkb_via => hhkb/keymaps/via}/rules.mk | 0 keyboards/hs60/v2/hhkb/rules.mk | 31 + keyboards/hs60/v2/info.json | 1650 ----------------- keyboards/hs60/v2/{ => iso}/config.h | 4 + keyboards/hs60/v2/iso/info.json | 338 ++++ keyboards/hs60/v2/iso/iso.h | 38 + .../v2/{ => iso}/keymaps/default/keymap.c | 0 .../v2/{ => iso}/keymaps/default/readme.md | 0 .../v2/{ => iso}/keymaps/iso_andys8/keymap.c | 0 .../v2/{ => iso}/keymaps/iso_andys8/readme.md | 0 .../v2/{ => iso}/keymaps/iso_andys8/rules.mk | 0 .../default_via => iso/keymaps/via}/keymap.c | 0 .../default_via => iso/keymaps/via}/readme.md | 0 .../stanrc85 => iso/keymaps/via}/rules.mk | 0 .../{ => iso}/keymaps/win_osx_dual/keymap.c | 0 .../{ => iso}/keymaps/win_osx_dual/readme.md | 0 .../{ => iso}/keymaps/win_osx_dual/rules.mk | 0 keyboards/hs60/v2/iso/rules.mk | 33 + keyboards/hs60/v2/keymaps/hhkb/config.h | 34 - keyboards/hs60/v2/keymaps/hhkb_via/config.h | 34 - keyboards/hs60/v2/readme.md | 4 +- keyboards/hs60/v2/v2.c | 3 +- 48 files changed, 1125 insertions(+), 1771 deletions(-) create mode 100644 keyboards/hs60/v2/ansi/ansi.h create mode 100644 keyboards/hs60/v2/ansi/config.h create mode 100644 keyboards/hs60/v2/ansi/info.json rename keyboards/hs60/v2/{keymaps/ansi => ansi/keymaps/default}/config.h (100%) rename keyboards/hs60/v2/{keymaps/ansi => ansi/keymaps/default}/keymap.c (100%) rename keyboards/hs60/v2/{keymaps/ansi => ansi/keymaps/default}/readme.md (100%) rename keyboards/hs60/v2/{ => ansi}/keymaps/stanrc85/config.h (93%) rename keyboards/hs60/v2/{ => ansi}/keymaps/stanrc85/keymap.c (100%) rename keyboards/hs60/v2/{ => ansi}/keymaps/stanrc85/readme.md (100%) rename keyboards/hs60/v2/{keymaps/ansi_via => ansi/keymaps/stanrc85}/rules.mk (100%) rename keyboards/hs60/v2/{keymaps/ansi_via => ansi/keymaps/via}/config.h (100%) rename keyboards/hs60/v2/{keymaps/ansi_via => ansi/keymaps/via}/keymap.c (100%) rename keyboards/hs60/v2/{keymaps/ansi_via => ansi/keymaps/via}/readme.md (100%) rename keyboards/hs60/v2/{keymaps/default_via => ansi/keymaps/via}/rules.mk (100%) rename keyboards/hs60/v2/{ => ansi}/rules.mk (92%) create mode 100644 keyboards/hs60/v2/hhkb/config.h rename keyboards/hs60/v2/{v2.h => hhkb/hhkb.h} (51%) create mode 100644 keyboards/hs60/v2/hhkb/info.json rename keyboards/hs60/v2/{keymaps/hhkb => hhkb/keymaps/default}/keymap.c (100%) rename keyboards/hs60/v2/{keymaps/hhkb => hhkb/keymaps/default}/readme.md (100%) rename keyboards/hs60/v2/{ => hhkb}/keymaps/goatmaster/config.h (59%) rename keyboards/hs60/v2/{ => hhkb}/keymaps/goatmaster/keymap.c (100%) rename keyboards/hs60/v2/{ => hhkb}/keymaps/goatmaster/readme.md (100%) rename keyboards/hs60/v2/{ => hhkb}/keymaps/goatmaster/rules.mk (100%) rename keyboards/hs60/v2/{keymaps/hhkb_via => hhkb/keymaps/via}/keymap.c (100%) rename keyboards/hs60/v2/{keymaps/hhkb_via => hhkb/keymaps/via}/readme.md (100%) rename keyboards/hs60/v2/{keymaps/hhkb_via => hhkb/keymaps/via}/rules.mk (100%) create mode 100644 keyboards/hs60/v2/hhkb/rules.mk delete mode 100644 keyboards/hs60/v2/info.json rename keyboards/hs60/v2/{ => iso}/config.h (97%) create mode 100644 keyboards/hs60/v2/iso/info.json create mode 100644 keyboards/hs60/v2/iso/iso.h rename keyboards/hs60/v2/{ => iso}/keymaps/default/keymap.c (100%) rename keyboards/hs60/v2/{ => iso}/keymaps/default/readme.md (100%) rename keyboards/hs60/v2/{ => iso}/keymaps/iso_andys8/keymap.c (100%) rename keyboards/hs60/v2/{ => iso}/keymaps/iso_andys8/readme.md (100%) rename keyboards/hs60/v2/{ => iso}/keymaps/iso_andys8/rules.mk (100%) rename keyboards/hs60/v2/{keymaps/default_via => iso/keymaps/via}/keymap.c (100%) rename keyboards/hs60/v2/{keymaps/default_via => iso/keymaps/via}/readme.md (100%) rename keyboards/hs60/v2/{keymaps/stanrc85 => iso/keymaps/via}/rules.mk (100%) rename keyboards/hs60/v2/{ => iso}/keymaps/win_osx_dual/keymap.c (100%) rename keyboards/hs60/v2/{ => iso}/keymaps/win_osx_dual/readme.md (100%) rename keyboards/hs60/v2/{ => iso}/keymaps/win_osx_dual/rules.mk (100%) create mode 100644 keyboards/hs60/v2/iso/rules.mk delete mode 100644 keyboards/hs60/v2/keymaps/hhkb/config.h delete mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/config.h diff --git a/keyboards/hs60/v2/ansi/ansi.h b/keyboards/hs60/v2/ansi/ansi.h new file mode 100644 index 000000000000..e29cc65c0e7c --- /dev/null +++ b/keyboards/hs60/v2/ansi/ansi.h @@ -0,0 +1,38 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define XXX KC_NO + +#include "quantum.h" +#include "../../wilba_tech/wt_rgb_backlight_keycodes.h" +#include "via.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ +} diff --git a/keyboards/hs60/v2/ansi/config.h b/keyboards/hs60/v2/ansi/config.h new file mode 100644 index 000000000000..a02c362c96e7 --- /dev/null +++ b/keyboards/hs60/v2/ansi/config.h @@ -0,0 +1,146 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4854 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT HS60 V2 +#define DESCRIPTION GH60 compatible, tool free RGB keyboard + +#define HS60_ANSI + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 } +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3 } +// To enable debugger set A13 A14 -> A5 A6 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_HS60 + +// they aren't really used if RGB_BACKLIGHT_HS60 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 6 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 64 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + diff --git a/keyboards/hs60/v2/ansi/info.json b/keyboards/hs60/v2/ansi/info.json new file mode 100644 index 000000000000..a977f9be0c6f --- /dev/null +++ b/keyboards/hs60/v2/ansi/info.json @@ -0,0 +1,333 @@ +{ + "keyboard_name": "HS60v2", + "maintainer": "yiancar", + "url": "", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "key_count": 61, + "layout": [ + { + "label": "~", + "x": 0, + "y": 0 + }, + { + "label": "!", + "x": 1, + "y": 0 + }, + { + "label": "@", + "x": 2, + "y": 0 + }, + { + "label": "#", + "x": 3, + "y": 0 + }, + { + "label": "$", + "x": 4, + "y": 0 + }, + { + "label": "%", + "x": 5, + "y": 0 + }, + { + "label": "^", + "x": 6, + "y": 0 + }, + { + "label": "&", + "x": 7, + "y": 0 + }, + { + "label": "*", + "x": 8, + "y": 0 + }, + { + "label": "(", + "x": 9, + "y": 0 + }, + { + "label": ")", + "x": 10, + "y": 0 + }, + { + "label": "_", + "x": 11, + "y": 0 + }, + { + "label": "+", + "x": 12, + "y": 0 + }, + { + "label": "Backspace", + "x": 13, + "y": 0, + "w": 2 + }, + { + "label": "Tab", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "label": "|", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "L", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "\"", + "x": 11.75, + "y": 2 + }, + { + "label": "Enter", + "x": 12.75, + "y": 2, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 2.75 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "Alt", + "x": 10, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Menu", + "x": 12.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Ctrl", + "x": 13.75, + "y": 4, + "w": 1.25 + } + ] + } + } +} diff --git a/keyboards/hs60/v2/keymaps/ansi/config.h b/keyboards/hs60/v2/ansi/keymaps/default/config.h similarity index 100% rename from keyboards/hs60/v2/keymaps/ansi/config.h rename to keyboards/hs60/v2/ansi/keymaps/default/config.h diff --git a/keyboards/hs60/v2/keymaps/ansi/keymap.c b/keyboards/hs60/v2/ansi/keymaps/default/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/ansi/keymap.c rename to keyboards/hs60/v2/ansi/keymaps/default/keymap.c diff --git a/keyboards/hs60/v2/keymaps/ansi/readme.md b/keyboards/hs60/v2/ansi/keymaps/default/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/ansi/readme.md rename to keyboards/hs60/v2/ansi/keymaps/default/readme.md diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/ansi/keymaps/stanrc85/config.h similarity index 93% rename from keyboards/hs60/v2/keymaps/stanrc85/config.h rename to keyboards/hs60/v2/ansi/keymaps/stanrc85/config.h index d61e6bde4f11..bf39aae3a240 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/config.h +++ b/keyboards/hs60/v2/ansi/keymaps/stanrc85/config.h @@ -1,10 +1,5 @@ #pragma once -// Include overwrites for specific keymap -#define HS60_ANSI -#undef PRODUCT_ID -#define PRODUCT_ID 0x4854 - // disable backlight after timeout in minutes, 0 = no timeout #undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 20 diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/stanrc85/keymap.c rename to keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c diff --git a/keyboards/hs60/v2/keymaps/stanrc85/readme.md b/keyboards/hs60/v2/ansi/keymaps/stanrc85/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/stanrc85/readme.md rename to keyboards/hs60/v2/ansi/keymaps/stanrc85/readme.md diff --git a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk b/keyboards/hs60/v2/ansi/keymaps/stanrc85/rules.mk similarity index 100% rename from keyboards/hs60/v2/keymaps/ansi_via/rules.mk rename to keyboards/hs60/v2/ansi/keymaps/stanrc85/rules.mk diff --git a/keyboards/hs60/v2/keymaps/ansi_via/config.h b/keyboards/hs60/v2/ansi/keymaps/via/config.h similarity index 100% rename from keyboards/hs60/v2/keymaps/ansi_via/config.h rename to keyboards/hs60/v2/ansi/keymaps/via/config.h diff --git a/keyboards/hs60/v2/keymaps/ansi_via/keymap.c b/keyboards/hs60/v2/ansi/keymaps/via/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/ansi_via/keymap.c rename to keyboards/hs60/v2/ansi/keymaps/via/keymap.c diff --git a/keyboards/hs60/v2/keymaps/ansi_via/readme.md b/keyboards/hs60/v2/ansi/keymaps/via/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/ansi_via/readme.md rename to keyboards/hs60/v2/ansi/keymaps/via/readme.md diff --git a/keyboards/hs60/v2/keymaps/default_via/rules.mk b/keyboards/hs60/v2/ansi/keymaps/via/rules.mk similarity index 100% rename from keyboards/hs60/v2/keymaps/default_via/rules.mk rename to keyboards/hs60/v2/ansi/keymaps/via/rules.mk diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/ansi/rules.mk similarity index 92% rename from keyboards/hs60/v2/rules.mk rename to keyboards/hs60/v2/ansi/rules.mk index 37deb63be7db..d013775c11e4 100644 --- a/keyboards/hs60/v2/rules.mk +++ b/keyboards/hs60/v2/ansi/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,7 +23,7 @@ NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plu CIE1931_CURVE = yes -LAYOUTS = 60_ansi 60_iso +LAYOUTS = 60_ansi # project specific files SRC = keyboards/wilba_tech/wt_main.c \ diff --git a/keyboards/hs60/v2/hhkb/config.h b/keyboards/hs60/v2/hhkb/config.h new file mode 100644 index 000000000000..45cfe57168a3 --- /dev/null +++ b/keyboards/hs60/v2/hhkb/config.h @@ -0,0 +1,146 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4855 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT HS60 V2 +#define DESCRIPTION GH60 compatible, tool free RGB keyboard + +#define HS60_HHKB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 } +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3 } +// To enable debugger set A13 A14 -> A5 A6 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_HS60 + +// they aren't really used if RGB_BACKLIGHT_HS60 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 6 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 64 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 + diff --git a/keyboards/hs60/v2/v2.h b/keyboards/hs60/v2/hhkb/hhkb.h similarity index 51% rename from keyboards/hs60/v2/v2.h rename to keyboards/hs60/v2/hhkb/hhkb.h index e7707648627a..94248f01e0b4 100644 --- a/keyboards/hs60/v2/v2.h +++ b/keyboards/hs60/v2/hhkb/hhkb.h @@ -23,34 +23,6 @@ // This a shortcut to help you visually see your layout. -#define LAYOUT_60_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ -} - -#define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ -} - #define LAYOUT_60_hhkb( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ diff --git a/keyboards/hs60/v2/hhkb/info.json b/keyboards/hs60/v2/hhkb/info.json new file mode 100644 index 000000000000..cf95351d308d --- /dev/null +++ b/keyboards/hs60/v2/hhkb/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "HS60v2", + "maintainer": "yiancar", + "url": "", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/hs60/v2/keymaps/hhkb/keymap.c b/keyboards/hs60/v2/hhkb/keymaps/default/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/hhkb/keymap.c rename to keyboards/hs60/v2/hhkb/keymaps/default/keymap.c diff --git a/keyboards/hs60/v2/keymaps/hhkb/readme.md b/keyboards/hs60/v2/hhkb/keymaps/default/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/hhkb/readme.md rename to keyboards/hs60/v2/hhkb/keymaps/default/readme.md diff --git a/keyboards/hs60/v2/keymaps/goatmaster/config.h b/keyboards/hs60/v2/hhkb/keymaps/goatmaster/config.h similarity index 59% rename from keyboards/hs60/v2/keymaps/goatmaster/config.h rename to keyboards/hs60/v2/hhkb/keymaps/goatmaster/config.h index f63c9035567d..50c76489e656 100644 --- a/keyboards/hs60/v2/keymaps/goatmaster/config.h +++ b/keyboards/hs60/v2/hhkb/keymaps/goatmaster/config.h @@ -18,20 +18,5 @@ along with this program. If not, see . /* Include overwrites for specific keymap */ -#define HS60_HHKB -#undef PRODUCT_ID -#define PRODUCT_ID 0x4855 - -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 - #undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR #define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 255 }, .index = 3-1 } //red diff --git a/keyboards/hs60/v2/keymaps/goatmaster/keymap.c b/keyboards/hs60/v2/hhkb/keymaps/goatmaster/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/goatmaster/keymap.c rename to keyboards/hs60/v2/hhkb/keymaps/goatmaster/keymap.c diff --git a/keyboards/hs60/v2/keymaps/goatmaster/readme.md b/keyboards/hs60/v2/hhkb/keymaps/goatmaster/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/goatmaster/readme.md rename to keyboards/hs60/v2/hhkb/keymaps/goatmaster/readme.md diff --git a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/hhkb/keymaps/goatmaster/rules.mk similarity index 100% rename from keyboards/hs60/v2/keymaps/goatmaster/rules.mk rename to keyboards/hs60/v2/hhkb/keymaps/goatmaster/rules.mk diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/keymap.c b/keyboards/hs60/v2/hhkb/keymaps/via/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/hhkb_via/keymap.c rename to keyboards/hs60/v2/hhkb/keymaps/via/keymap.c diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/readme.md b/keyboards/hs60/v2/hhkb/keymaps/via/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/hhkb_via/readme.md rename to keyboards/hs60/v2/hhkb/keymaps/via/readme.md diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk b/keyboards/hs60/v2/hhkb/keymaps/via/rules.mk similarity index 100% rename from keyboards/hs60/v2/keymaps/hhkb_via/rules.mk rename to keyboards/hs60/v2/hhkb/keymaps/via/rules.mk diff --git a/keyboards/hs60/v2/hhkb/rules.mk b/keyboards/hs60/v2/hhkb/rules.mk new file mode 100644 index 000000000000..44399851f036 --- /dev/null +++ b/keyboards/hs60/v2/hhkb/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = STM32F303 + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/info.json b/keyboards/hs60/v2/info.json deleted file mode 100644 index c42e9e9418f4..000000000000 --- a/keyboards/hs60/v2/info.json +++ /dev/null @@ -1,1650 +0,0 @@ -{ - "keyboard_name": "HS60v2", - "maintainer": "yiancar", - "url": "", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_60_ansi": { - "key_count": 61, - "layout": [ - { - "label": "~", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "@", - "x": 2, - "y": 0 - }, - { - "label": "#", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "label": "Backspace", - "x": 13, - "y": 0, - "w": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "|", - "x": 13.5, - "y": 1, - "w": 1.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "\"", - "x": 11.75, - "y": 2 - }, - { - "label": "Enter", - "x": 12.75, - "y": 2, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 2.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 2.75 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 4, - "w": 1.25 - }, - { - "x": 3.75, - "y": 4, - "w": 6.25 - }, - { - "label": "Alt", - "x": 10, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 11.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Menu", - "x": 12.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.75, - "y": 4, - "w": 1.25 - } - ] - }, - "LAYOUT_60_iso": { - "key_count": 62, - "layout": [ - { - "label": "\\u00ac", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "\"", - "x": 2, - "y": 0 - }, - { - "label": "\\u00a3", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "label": "Backspace", - "x": 13, - "y": 0, - "w": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "Enter", - "x": 13.75, - "y": 1, - "w": 1.25, - "h": 2 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "@", - "x": 11.75, - "y": 2 - }, - { - "label": "~", - "x": 12.75, - "y": 2 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 1.25 - }, - { - "label": "|", - "x": 1.25, - "y": 3 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 2.75 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 4, - "w": 1.25 - }, - { - "x": 3.75, - "y": 4, - "w": 6.25 - }, - { - "label": "AltGr", - "x": 10, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 11.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Menu", - "x": 12.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.75, - "y": 4, - "w": 1.25 - } - ] - }, - "KEYMAP_AEK": { - "key_count": 60, - "layout": [ - { - "label": "~", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "@", - "x": 2, - "y": 0 - }, - { - "label": "#", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "label": "Backspace", - "x": 13, - "y": 0, - "w": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "|", - "x": 13.5, - "y": 1, - "w": 1.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "\"", - "x": 11.75, - "y": 2 - }, - { - "label": "Enter", - "x": 12.75, - "y": 2, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 2.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 2.75 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.5 - }, - { - "label": "Win", - "x": 1.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.75, - "y": 4, - "w": 1.5 - }, - { - "x": 4.25, - "y": 4, - "w": 6.5 - }, - { - "label": "AltGr", - "x": 10.75, - "y": 4, - "w": 1.5 - }, - { - "label": "Win", - "x": 12.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.5, - "y": 4, - "w": 1.5 - } - ] - }, - "KEYMAP": { - "key_count": 65, - "layout": [ - { - "label": "~", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "@", - "x": 2, - "y": 0 - }, - { - "label": "#", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "x": 13, - "y": 0 - }, - { - "label": "Back", - "x": 14, - "y": 0 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "|", - "x": 13.5, - "y": 1, - "w": 1.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "\"", - "x": 11.75, - "y": 2 - }, - { - "x": 12.75, - "y": 2 - }, - { - "label": "Enter", - "x": 13.75, - "y": 2, - "w": 1.25 - }, - { - "x": 0, - "y": 3 - }, - { - "label": "Shift", - "x": 1, - "y": 3, - "w": 1.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 1.75 - }, - { - "x": 14, - "y": 3 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 4, - "w": 1.25 - }, - { - "x": 3.75, - "y": 4, - "w": 6.25 - }, - { - "label": "Alt", - "x": 10, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 11.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Menu", - "x": 12.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.75, - "y": 4, - "w": 1.25 - } - ] - }, - "LAYOUT_60_ansi_split_bs_rshift": { - "key_count": 63, - "layout": [ - { - "label": "~", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "@", - "x": 2, - "y": 0 - }, - { - "label": "#", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "x": 13, - "y": 0 - }, - { - "label": "Back", - "x": 14, - "y": 0 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "|", - "x": 13.5, - "y": 1, - "w": 1.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "\"", - "x": 11.75, - "y": 2 - }, - { - "label": "Enter", - "x": 12.75, - "y": 2, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 2.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 1.75 - }, - { - "x": 14, - "y": 3 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 4, - "w": 1.25 - }, - { - "x": 3.75, - "y": 4, - "w": 6.25 - }, - { - "label": "Alt", - "x": 10, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 11.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Menu", - "x": 12.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.75, - "y": 4, - "w": 1.25 - } - ] - } - } -} diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/iso/config.h similarity index 97% rename from keyboards/hs60/v2/config.h rename to keyboards/hs60/v2/iso/config.h index 42d10bdb5297..e252b1982c72 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/iso/config.h @@ -82,6 +82,10 @@ along with this program. If not, see . * */ +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + /* Backlight options */ #define RGB_BACKLIGHT_ENABLED 1 diff --git a/keyboards/hs60/v2/iso/info.json b/keyboards/hs60/v2/iso/info.json new file mode 100644 index 000000000000..1bd1201f8021 --- /dev/null +++ b/keyboards/hs60/v2/iso/info.json @@ -0,0 +1,338 @@ +{ + "keyboard_name": "HS60v2", + "maintainer": "yiancar", + "url": "", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_iso": { + "key_count": 62, + "layout": [ + { + "label": "\\u00ac", + "x": 0, + "y": 0 + }, + { + "label": "!", + "x": 1, + "y": 0 + }, + { + "label": "\"", + "x": 2, + "y": 0 + }, + { + "label": "\\u00a3", + "x": 3, + "y": 0 + }, + { + "label": "$", + "x": 4, + "y": 0 + }, + { + "label": "%", + "x": 5, + "y": 0 + }, + { + "label": "^", + "x": 6, + "y": 0 + }, + { + "label": "&", + "x": 7, + "y": 0 + }, + { + "label": "*", + "x": 8, + "y": 0 + }, + { + "label": "(", + "x": 9, + "y": 0 + }, + { + "label": ")", + "x": 10, + "y": 0 + }, + { + "label": "_", + "x": 11, + "y": 0 + }, + { + "label": "+", + "x": 12, + "y": 0 + }, + { + "label": "Backspace", + "x": 13, + "y": 0, + "w": 2 + }, + { + "label": "Tab", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "label": "Enter", + "x": 13.75, + "y": 1, + "w": 1.25, + "h": 2 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "L", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "@", + "x": 11.75, + "y": 2 + }, + { + "label": "~", + "x": 12.75, + "y": 2 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 1.25 + }, + { + "label": "|", + "x": 1.25, + "y": 3 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 2.75 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "AltGr", + "x": 10, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Menu", + "x": 12.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Ctrl", + "x": 13.75, + "y": 4, + "w": 1.25 + } + ] + } + } +} diff --git a/keyboards/hs60/v2/iso/iso.h b/keyboards/hs60/v2/iso/iso.h new file mode 100644 index 000000000000..6a51b7556abf --- /dev/null +++ b/keyboards/hs60/v2/iso/iso.h @@ -0,0 +1,38 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define XXX KC_NO + +#include "quantum.h" +#include "../../wilba_tech/wt_rgb_backlight_keycodes.h" +#include "via.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_60_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ +} diff --git a/keyboards/hs60/v2/keymaps/default/keymap.c b/keyboards/hs60/v2/iso/keymaps/default/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/default/keymap.c rename to keyboards/hs60/v2/iso/keymaps/default/keymap.c diff --git a/keyboards/hs60/v2/keymaps/default/readme.md b/keyboards/hs60/v2/iso/keymaps/default/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/default/readme.md rename to keyboards/hs60/v2/iso/keymaps/default/readme.md diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/keymap.c b/keyboards/hs60/v2/iso/keymaps/iso_andys8/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/iso_andys8/keymap.c rename to keyboards/hs60/v2/iso/keymaps/iso_andys8/keymap.c diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/readme.md b/keyboards/hs60/v2/iso/keymaps/iso_andys8/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/iso_andys8/readme.md rename to keyboards/hs60/v2/iso/keymaps/iso_andys8/readme.md diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk b/keyboards/hs60/v2/iso/keymaps/iso_andys8/rules.mk similarity index 100% rename from keyboards/hs60/v2/keymaps/iso_andys8/rules.mk rename to keyboards/hs60/v2/iso/keymaps/iso_andys8/rules.mk diff --git a/keyboards/hs60/v2/keymaps/default_via/keymap.c b/keyboards/hs60/v2/iso/keymaps/via/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/default_via/keymap.c rename to keyboards/hs60/v2/iso/keymaps/via/keymap.c diff --git a/keyboards/hs60/v2/keymaps/default_via/readme.md b/keyboards/hs60/v2/iso/keymaps/via/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/default_via/readme.md rename to keyboards/hs60/v2/iso/keymaps/via/readme.md diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/iso/keymaps/via/rules.mk similarity index 100% rename from keyboards/hs60/v2/keymaps/stanrc85/rules.mk rename to keyboards/hs60/v2/iso/keymaps/via/rules.mk diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c b/keyboards/hs60/v2/iso/keymaps/win_osx_dual/keymap.c similarity index 100% rename from keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c rename to keyboards/hs60/v2/iso/keymaps/win_osx_dual/keymap.c diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/readme.md b/keyboards/hs60/v2/iso/keymaps/win_osx_dual/readme.md similarity index 100% rename from keyboards/hs60/v2/keymaps/win_osx_dual/readme.md rename to keyboards/hs60/v2/iso/keymaps/win_osx_dual/readme.md diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk b/keyboards/hs60/v2/iso/keymaps/win_osx_dual/rules.mk similarity index 100% rename from keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk rename to keyboards/hs60/v2/iso/keymaps/win_osx_dual/rules.mk diff --git a/keyboards/hs60/v2/iso/rules.mk b/keyboards/hs60/v2/iso/rules.mk new file mode 100644 index 000000000000..582ed4e81735 --- /dev/null +++ b/keyboards/hs60/v2/iso/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = STM32F303 + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +CIE1931_CURVE = yes + +LAYOUTS = 60_iso + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c diff --git a/keyboards/hs60/v2/keymaps/hhkb/config.h b/keyboards/hs60/v2/keymaps/hhkb/config.h deleted file mode 100644 index fc1b6d8f47bb..000000000000 --- a/keyboards/hs60/v2/keymaps/hhkb/config.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2018 Yiancar - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#pragma once - -/* Include overwrites for specific keymap */ - -#define HS60_HHKB -#undef PRODUCT_ID -#define PRODUCT_ID 0x4855 - -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/config.h b/keyboards/hs60/v2/keymaps/hhkb_via/config.h deleted file mode 100644 index fc1b6d8f47bb..000000000000 --- a/keyboards/hs60/v2/keymaps/hhkb_via/config.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2018 Yiancar - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#pragma once - -/* Include overwrites for specific keymap */ - -#define HS60_HHKB -#undef PRODUCT_ID -#define PRODUCT_ID 0x4855 - -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 -#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 -#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 diff --git a/keyboards/hs60/v2/readme.md b/keyboards/hs60/v2/readme.md index e838426a2d97..bd747b1f3cc7 100644 --- a/keyboards/hs60/v2/readme.md +++ b/keyboards/hs60/v2/readme.md @@ -17,7 +17,7 @@ Due to the RGB implementation, the HS60 is currently not compatible with communi Make example for this keyboard (after setting up your build environment): - make hs60/v2:default + make hs60/v2/:default See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. @@ -34,4 +34,4 @@ See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) - Unplug - Hold Escape - Plug In -- Flash using QMK Toolbox or dfu-util (`make hs60/v2::dfu-util`) +- Flash using QMK Toolbox or dfu-util (`make hs60/v2/::dfu-util`) diff --git a/keyboards/hs60/v2/v2.c b/keyboards/hs60/v2/v2.c index 2e12538e9bb8..f817ef19e799 100644 --- a/keyboards/hs60/v2/v2.c +++ b/keyboards/hs60/v2/v2.c @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #ifndef RGB_BACKLIGHT_HS60 -#error RGB_BACKLIGHT_M60_A not defined, recheck config.h +#error RGB_BACKLIGHT_HS60 not defined, recheck config.h #endif From bf4611c7b7ef681e4fd35aab2b9a7ac4f5c36e5a Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Tue, 21 Jan 2020 21:18:18 -0500 Subject: [PATCH 104/331] [Keymap] adding personal rebound keymap (#7956) --- .../rebound/keymaps/rossman360/keymap.c | 55 +++++++++++++++++++ users/rossman360/rossman360.h | 7 +++ 2 files changed, 62 insertions(+) create mode 100644 keyboards/montsinger/rebound/keymaps/rossman360/keymap.c diff --git a/keyboards/montsinger/rebound/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/keymaps/rossman360/keymap.c new file mode 100644 index 000000000000..8391ec8e1475 --- /dev/null +++ b/keyboards/montsinger/rebound/keymaps/rossman360/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H +#include "rossman360.h" + +#define PGMOD LT(_NUM, KC_PGDN) +#define TABMOD LT(_FN1, KC_TAB) +#define SPCMOD LT(_FN1, KC_SPACE) +#define ENTMOD LT(_FN2, KC_ENTER) +#define ESCMOD LT(_NUM, KC_ESC) +#define RSMOD LT(_FN1, KC_RSHIFT) + +enum layer_names { + _BASE, + _DEL, + _FN1, + _FN2, + _NUM, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT_ortho_4x12( + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , NTAB , + JUMPBACK, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, + CMDBSP , ALTDEL , KC_NO , CTRLSP , TABMOD , PGMOD , ENTMOD , SPCMOD , MO(_DEL),KC_NO , KC_BSPC, KC_DEL + ), + +[_FN1] = LAYOUT_ortho_4x12( + _______, TAB1 , TAB2 , TAB3 , TAB4 , _______, _______, UNDO , _______, _______, _______, CTAB , + KC_CAPS, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP , KC_RIGHT,KC_END , KC_NO , + _______, _______, XPANDR , _______, _______, _______, _______, PMERGE , KC_DOWN, _______, _______, _______, + WREFRESH,_______, _______, _______, LWORD , RWORD , RVOLD , RVOLU , _______, _______, _______, _______ + ), + +[_FN2] = LAYOUT_ortho_4x12( + _______, SPEAK1 , SPEAK2 , SPEAK3 , SPEAK4 , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, PARADOWN, CSPEAK, _______, _______, _______, _______, _______, _______ + ), + +[_DEL] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, UNDO , _______, _______, _______, CTAB , + REMCAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP ,KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, + _______, _______, _______, KC_DEL , KC_BSPC, BWORD , _______, _______, _______, _______, _______, _______ + ), + +[_NUM] = LAYOUT_ortho_4x12( + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_MINS, KC_EQL, + KC_CAPS, _______, _______, _______, _______, _______, KC_MINS, KC_4 , KC_5 , KC_6 , KC_COLN, _______, + _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_1 , KC_2 , KC_3 , KC_BSLS, _______, + _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_0 , _______, _______, _______ + ) +}; diff --git a/users/rossman360/rossman360.h b/users/rossman360/rossman360.h index 9d6ee5981b1e..57f6234fa400 100644 --- a/users/rossman360/rossman360.h +++ b/users/rossman360/rossman360.h @@ -12,6 +12,13 @@ #define XPANDR LCTL(LSFT(KC_X)) #define CMDBSP MT(MOD_LGUI, KC_BSPC) #define ALTDEL MT(MOD_LALT, KC_DEL) +#define TAB1 LCTL(KC_1) +#define TAB2 LCTL(KC_2) +#define TAB3 LCTL(KC_3) +#define TAB4 LCTL(KC_4) +#define CTRLSP MT(MOD_LCTL, KC_SPACE) +#define RVOLU LCTL(KC_RBRC) +#define RVOLD LCTL(KC_LBRC) // Define all of enum custom_keycodes { From 8e500c36709d6b3c1d1906db22d635ea55f74e70 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 22 Jan 2020 02:21:14 +0000 Subject: [PATCH 105/331] Align cformat rules with current CI implementation (#7936) * Align cformat rules with current CI implementation * Optimise file walking --- lib/python/qmk/cli/cformat.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index 17ca91b3b508..fe1edef60b83 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -24,13 +24,14 @@ def cformat(cli): if cli.args.files: cli.args.files = [os.path.join(os.environ['ORIG_CWD'], file) for file in cli.args.files] else: + ignores = ['tmk_core/protocol/usb_hid', 'quantum/template'] for dir in ['drivers', 'quantum', 'tests', 'tmk_core']: for dirpath, dirnames, filenames in os.walk(dir): - if 'tmk_core/protocol/usb_hid' in dirpath: - continue + if any(i in dirpath for i in ignores): + dirnames.clear() for name in filenames: - if name.endswith('.c') or name.endswith('.h') or name.endswith('.cpp'): + if name.endswith(('.c', '.h', '.cpp')): cli.args.files.append(os.path.join(dirpath, name)) # Run clang-format on the files we've found From ba264c69c28dd36ab8bd7eda1ba19ecf51eae6a9 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 22 Jan 2020 13:21:47 +1100 Subject: [PATCH 106/331] [Keyboard] Cospad refactor (#7957) * Cospad refactor * Add num lock indicator code * Add led_init_ports() * Revert change to matrix position blanks * Define BACKLIGHT_ON_STATE explicitly, in anticipation of PR6749 --- keyboards/cospad/config.h | 192 ++++++++++++++++++++-- keyboards/cospad/cospad.c | 23 ++- keyboards/cospad/cospad.h | 163 +++++++++--------- keyboards/cospad/info.json | 192 ++++++++++++---------- keyboards/cospad/keymaps/default/keymap.c | 103 ++++++------ keyboards/cospad/readme.md | 17 +- keyboards/cospad/rules.mk | 24 +-- 7 files changed, 441 insertions(+), 273 deletions(-) diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 9844f2724a83..cfc2d59f60c1 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -1,5 +1,5 @@ /* -Copyright 2012 Jun Wako +Copyright 2020 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,11 +21,11 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define PRODUCT_ID 0xB1E5 #define DEVICE_VER 0x0001 -#define MANUFACTURER KPREPUBLIC -#define PRODUCT COSPAD -#define DESCRIPTION QMK keyboard firmware for COSPAD +#define MANUFACTURER KPrepublic +#define PRODUCT Cospad +#define DESCRIPTION 6x4 numpad with underglow and backlighting /* key matrix size */ #define MATRIX_ROWS 6 @@ -40,22 +40,51 @@ along with this program. If not, see . * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * -*/ + */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Backlight configuration */ +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + #define BACKLIGHT_PIN F7 -#define BACKLIGHT_LEVELS 1 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_ON_STATE 0 -/* Underlight configuration */ #define RGB_DI_PIN F6 -#define RGBLED_NUM 4 -#define RGBLIGHT_ANIMATIONS +#ifdef RGB_DI_PIN + #define RGBLED_NUM 4 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -64,10 +93,89 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE +#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + /* * Feature disable options * These options are also useful to firmware size reduction. @@ -83,8 +191,62 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/cospad/cospad.c b/keyboards/cospad/cospad.c index e7ef71f874b2..c1f3a70479d3 100644 --- a/keyboards/cospad/cospad.c +++ b/keyboards/cospad/cospad.c @@ -1,5 +1,4 @@ - -/* Copyright 2019 +/* Copyright 2020 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,18 +15,18 @@ */ #include "cospad.h" -#ifdef BACKLIGHT_ENABLE - -void backlight_init_ports(void) { - setPinOutput(F7); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_set(uint8_t level) { - writePin(F7, !!level); +void led_init_ports(void) { + setPinOutput(B2); } -void backlight_task(void) { - // do nothing - as default implementation of software PWM does not work +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(B2, !led_state.num_lock); + } + return true; } - -#endif //BACKLIGHT_ENABLE diff --git a/keyboards/cospad/cospad.h b/keyboards/cospad/cospad.h index ad3ca0d6bc33..fc52204edaf9 100644 --- a/keyboards/cospad/cospad.h +++ b/keyboards/cospad/cospad.h @@ -1,5 +1,4 @@ - -/* Copyright 2019 +/* Copyright 2020 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,12 +13,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once #include "quantum.h" + #define ___ KC_NO -/* This a shortcut to help you visually see your layout. +/* This is a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical * layout of the board and position of the keys. @@ -28,100 +29,100 @@ * represents the switch matrix. */ -/* COSPAD ortho matrix layout - * ,-------------------. - * | 00 | 01 | 02 | 03 | - * |----|----|----|----| - * | 10 | 11 | 12 | 13 | - * |----|----|----|----| - * | 20 | 21 | 22 | 23 | - * |----|----|----|----| - * | 30 | 31 | 32 | 33 | - * |----|----|----|----| - * | 40 | 41 | 42 | 43 | - * |----|----|----|----| - * | 50 | 51 | 52 | 53 | - * `-------------------' +/* 6x4 ortholinear layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | 23 | + * |----|----|----|----| + * | 30 | 31 | 32 | 33 | + * |----|----|----|----| + * | 40 | 41 | 42 | 43 | + * |----|----|----|----| + * | 50 | 51 | 52 | 53 | + * `-------------------' */ #define LAYOUT_ortho_6x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33, \ - k40, k41, k42, k43, \ - k50, k51, k52, k53 \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ ) \ { \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, k33}, \ - {k40, k41, k42, k43}, \ - {k50, k51, k52, k53} \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ } -/* COSPAD gamepad matrix layout - * ,-------------------. - * | 00 | 01 | 02 | 03 | - * |----|----|----|----| - * | 10 | 11 | 12 | 13 | - * |----|----|----|----| - * | 20 | 21 | 22 | | - * |----|----|----| 23 | - * | 30 | 31 | 32 | | - * |----|----|----|----| - * | 40 | 41 | 42 | 43 | - * |----|----|----|----| - * | 50 | 51 | 52 | 53 | - * `-------------------' +/* 6x4 gamepad layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | | + * |----|----|----| 23 | + * | 30 | 31 | 32 | | + * |----|----|----|----| + * | 40 | 41 | 42 | 43 | + * |----|----|----|----| + * | 50 | 51 | 52 | 53 | + * `-------------------' */ #define LAYOUT_gamepad_6x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, k23, \ - k40, k41, k42, k43, \ - k50, k51, k52, k53 \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ ) \ { \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, ___}, \ - {k40, k41, k42, k43}, \ - {k50, k51, k52, k53} \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, ___ }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ } -/* COSPAD numpad matrix layout - * ,-------------------. - * | 00 | 01 | 02 | 03 | - * |----|----|----|----| - * | 10 | 11 | 12 | 13 | - * |----|----|----|----| - * | 20 | 21 | 22 | | - * |----|----|----| 23 | - * | 30 | 31 | 32 | | - * |----|----|----|----| - * | 40 | 41 | 42 | | - * |----|----|----| 43 | - * | 50 | 52 | | - * `-------------------' +/* 6x4 numpad layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | | + * |----|----|----| 23 | + * | 30 | 31 | 32 | | + * |----|----|----|----| + * | 40 | 41 | 42 | | + * |----|----|----| 43 | + * | 50 | 52 | | + * `-------------------' */ #define LAYOUT_numpad_6x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, k23, \ - k40, k41, k42, \ - k50, k52, k43 \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, \ + k50, k52, k43 \ ) \ { \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, ___}, \ - {k40, k41, k42, k43}, \ - {k50, ___, k52, ___} \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, ___ }, \ + { k40, k41, k42, k43 }, \ + { k50, ___, k52, ___ } \ } // Add backwards compatibility for existing keymaps diff --git a/keyboards/cospad/info.json b/keyboards/cospad/info.json index c17f44f52591..83bf81c14df2 100644 --- a/keyboards/cospad/info.json +++ b/keyboards/cospad/info.json @@ -1,95 +1,107 @@ { - "keyboard_name": "Cospad", - "keyboard_folder": "cospad", - "url": "", - "maintainer": "qmk", - "width": 4, - "height": 6, - "layouts": { - "LAYOUT_numpad_6x4": { - "key_count": 21, - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"Tab", "x":1, "y":0}, - {"label":"Fn", "x":2, "y":0}, - {"label":"Back", "x":3, "y":0}, - {"label":"Num Lock", "x":0, "y":1}, - {"label":"/", "x":1, "y":1}, - {"label":"*", "x":2, "y":1}, - {"label":"-", "x":3, "y":1}, - {"label":"7", "x":0, "y":2}, - {"label":"8", "x":1, "y":2}, - {"label":"9", "x":2, "y":2}, - {"label":"4", "x":0, "y":3}, - {"label":"5", "x":1, "y":3}, - {"label":"6", "x":2, "y":3}, - {"label":"+", "x":3, "y":2, "h":2}, - {"label":"1", "x":0, "y":4}, - {"label":"2", "x":1, "y":4}, - {"label":"3", "x":2, "y":4}, - {"label":"0", "x":0, "y":5, "w":2}, - {"label":".", "x":2, "y":5}, - {"label":"Enter", "x":3, "y":4, "h":2} - ] - }, + "keyboard_name": "Cospad", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_numpad_6x4": { + "key_count": 21, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, - "LAYOUT_gamepad_6x4": { - "key_count": 23, - "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k10", "x":0, "y":1}, - {"label":"k11", "x":1, "y":1}, - {"label":"k12", "x":2, "y":1}, - {"label":"k13", "x":3, "y":1}, - {"label":"k20", "x":0, "y":2}, - {"label":"k21", "x":1, "y":2}, - {"label":"k22", "x":2, "y":2}, - {"label":"k30", "x":0, "y":3}, - {"label":"k31", "x":1, "y":3}, - {"label":"k32", "x":2, "y":3}, - {"label":"k23", "x":3, "y":2, "h":2}, - {"label":"k40", "x":0, "y":4}, - {"label":"k41", "x":1, "y":4}, - {"label":"k42", "x":2, "y":4}, - {"label":"k43", "x":3, "y":4}, - {"label":"k50", "x":0, "y":5}, - {"label":"k51", "x":1, "y":5}, - {"label":"k52", "x":2, "y":5}, - {"label":"k53", "x":3, "y":5} - ] - }, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, - "LAYOUT_ortho_6x4": { - "key_count": 24, - "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k10", "x":0, "y":1}, - {"label":"k11", "x":1, "y":1}, - {"label":"k12", "x":2, "y":1}, - {"label":"k13", "x":3, "y":1}, - {"label":"k20", "x":0, "y":2}, - {"label":"k21", "x":1, "y":2}, - {"label":"k22", "x":2, "y":2}, - {"label":"k23", "x":3, "y":2}, - {"label":"k30", "x":0, "y":3}, - {"label":"k31", "x":1, "y":3}, - {"label":"k32", "x":2, "y":3}, - {"label":"k33", "x":3, "y":3}, - {"label":"k40", "x":0, "y":4}, - {"label":"k41", "x":1, "y":4}, - {"label":"k42", "x":2, "y":4}, - {"label":"k43", "x":3, "y":4}, - {"label":"k50", "x":0, "y":5}, - {"label":"k51", "x":1, "y":5}, - {"label":"k52", "x":2, "y":5}, - {"label":"k53", "x":3, "y":5} - ] + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":2, "h":2}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + + {"x":0, "y":5, "w":2}, + {"x":2, "y":5}, + {"x":3, "y":4, "h":2} + ] + }, + "LAYOUT_gamepad_6x4": { + "key_count": 23, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":2, "h":2}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + + {"x":0, "y":5}, + {"x":1, "y":5}, + {"x":2, "y":5}, + {"x":3, "y":5} + ] + }, + "LAYOUT_ortho_6x4": { + "key_count": 24, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + + {"x":0, "y":5}, + {"x":1, "y":5}, + {"x":2, "y":5}, + {"x":3, "y":5} + ] + } } - } } diff --git a/keyboards/cospad/keymaps/default/keymap.c b/keyboards/cospad/keymaps/default/keymap.c index adcca112d233..06b06d41f929 100644 --- a/keyboards/cospad/keymaps/default/keymap.c +++ b/keyboards/cospad/keymaps/default/keymap.c @@ -1,60 +1,57 @@ #include QMK_KEYBOARD_H -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -enum layers { - _BL = 0, - _FL +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BL, + _FL }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap _BL: (Base Layer) Default Layer - * ,-------------------. - * |Esc |TAB | FN | BS | - * |----|----|----|----| - * | NL | / | * | - | - * |----|----|----|----| - * | 7 | 8 | 9 | | - * |----|----|----| + | - * | 4 | 5 | 6 | | - * |----|----|----|----| - * | 1 | 2 | 3 | | - * |----|----|----| En | - * | 0 | . | | - * `-------------------' - */ - [_BL] = LAYOUT_numpad_6x4( - KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, \ - KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_P1, KC_P2, KC_P3, \ - KC_P0, KC_PDOT, KC_PENT - ), + /* Keymap _BL: (Base Layer) Default Layer + * ,-------------------. + * |Esc |TAB | FN | BS | + * |----|----|----|----| + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 | . | | + * `-------------------' + */ + [_BL] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, MO(_FL), KC_BSPC, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), -/* Keymap _FL: Function Layer - * ,-------------------. - * |RGBT| | | | - * |----|----|----|----| - * |RGBM|RGBP|BTOG| | - * |----|----|----|----| - * |HUD |HUI |BON | | - * |----|----|----| | - * |SAD |SAI |BOFF| | - * |----|----|----|----| - * |VAD |VAS |BSTP| | - * |----|----|----| | - * | |RST | | - * `-------------------' - */ - [_FL] = LAYOUT_numpad_6x4( - RGB_TOG, _______, _______, _______, \ - RGB_MOD, RGB_M_P, BL_TOGG, _______, \ - RGB_HUD, RGB_HUI, BL_ON, \ - RGB_SAD, RGB_SAI, BL_OFF, _______, \ - RGB_VAD, RGB_VAI, BL_STEP, \ - _______, RESET, _______ - ), + /* Keymap _FL: Function Layer + * ,-------------------. + * |RGBT| | | | + * |----|----|----|----| + * |RGBM|RGBP|BTOG| | + * |----|----|----|----| + * |HUD |HUI |BON | | + * |----|----|----| | + * |SAD |SAI |BOFF| | + * |----|----|----|----| + * |VAD |VAS |BSTP| | + * |----|----|----| | + * | |RST | | + * `-------------------' + */ + [_FL] = LAYOUT_numpad_6x4( + RGB_TOG, _______, _______, _______, + RGB_MOD, RGB_M_P, BL_TOGG, _______, + RGB_HUD, RGB_HUI, BL_ON, + RGB_SAD, RGB_SAI, BL_OFF, _______, + RGB_VAD, RGB_VAI, BL_STEP, + _______, RESET, _______ + ) }; diff --git a/keyboards/cospad/readme.md b/keyboards/cospad/readme.md index 2e9add691f11..9bb3dfdc0ee2 100644 --- a/keyboards/cospad/readme.md +++ b/keyboards/cospad/readme.md @@ -1,18 +1,15 @@ -COSPAD -=== +# Cospad -A DIY Keypad Kit sold by KPRepublic, runs TKG natively. +A DIY keypad kit sold by KPRepublic, runs TKG natively. -Keyboard Maintainer: QMK Community -Hardware Supported: COSPAD -Hardware Availability: [KPrepublic on Aliexpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) - -Only supports on and off for the backlight leds, as they are not connected to a PWM pin. +* Keyboard Maintainer: QMK Community +* Hardware Supported: Cospad PCB +* Hardware Availability: [KPrepublic on Aliexpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) Supported Layouts: -![Numpad Layout of COSPAD](https://i.imgur.com/t03lXJ4.png) -![Ortholinear Layout of COSPAD](https://i.imgur.com/mliUcCc.png) +![Numpad layouts](https://i.imgur.com/t03lXJ4.png) +![Ortholinear layouts](https://i.imgur.com/mliUcCc.png) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/cospad/rules.mk b/keyboards/cospad/rules.mk index 075320a22fbf..61243fd378bc 100644 --- a/keyboards/cospad/rules.mk +++ b/keyboards/cospad/rules.mk @@ -12,23 +12,23 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -BACKLIGHT_CUSTOM_DRIVER = yes -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = numpad_6x4 ortho_6x4 From 49c3a1cda5c84eb4e2fa358328d9d9a603103ba3 Mon Sep 17 00:00:00 2001 From: Brett Inman Date: Tue, 21 Jan 2020 19:58:17 -0800 Subject: [PATCH 107/331] Swap two columns to fix Skog Lite (#7940) * Swap two cols to fix skog lite * Fix readme * Suggested formatting Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/percent/skog_lite/config.h | 2 +- .../percent/skog_lite/keymaps/binman/keymap.c | 20 +++++++++++++++++++ .../skog_lite/keymaps/binman/readme.md | 3 +++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 keyboards/percent/skog_lite/keymaps/binman/keymap.c create mode 100755 keyboards/percent/skog_lite/keymaps/binman/readme.md diff --git a/keyboards/percent/skog_lite/config.h b/keyboards/percent/skog_lite/config.h index ec3928b72e3b..a3d4a225f1a1 100644 --- a/keyboards/percent/skog_lite/config.h +++ b/keyboards/percent/skog_lite/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B5 } -#define MATRIX_COL_PINS { C4, C2, D7, C7, C6, A0, A1, A2, A3, A7, A6, A5, A4, C5, C3} +#define MATRIX_COL_PINS { C4, C2, D7, C7, C6, A0, A1, A2, A3, A7, A6, A4, A5, C5, C3} #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/percent/skog_lite/keymaps/binman/keymap.c b/keyboards/percent/skog_lite/keymaps/binman/keymap.c new file mode 100755 index 000000000000..40308e1a6ecb --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/binman/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, RGB_TOG, MO(1), + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, KC_VOLU, KC_MPLY, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_MRWD, KC_VOLD, KC_MFFD, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_NO, KC_LGUI, KC_SPC, KC_RGUI, KC_NO, KC_RALT, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, RGB_RMOD, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAI, RGB_HUI, RGB_SAI, + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, RGB_HUD, RGB_SAD, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPI, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPD, KC_NO + ) +}; diff --git a/keyboards/percent/skog_lite/keymaps/binman/readme.md b/keyboards/percent/skog_lite/keymaps/binman/readme.md new file mode 100755 index 000000000000..d4bf1929d670 --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/binman/readme.md @@ -0,0 +1,3 @@ +# binman Skog Lite layout + +This mostly just changes the "TKL" section of the board to be media and lighting controls. Bottom row has also been modified a bit. \ No newline at end of file From e0a0430c31bd9fabab93e8933e9988e0d3f66434 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 21 Jan 2020 20:14:14 -0800 Subject: [PATCH 108/331] Clueboard Rev4 Updates aka Volcano 660 (#7942) * fix audio enable repetition * remove RGB LED support as this board has no RGB LB LEDs * use pragma once * this board has no backlight support * enable COMMAND_ENABLE * comment cleanups * setting bootmagic to lite as the first board thathat has this PCB has a solid bottom. If someone forgets to put in a RESET key on their keymap, they are not going to have fun resetting the board * Update keyboards/clueboard/66/rev4/rules.mk Co-Authored-By: fauxpark * Update keyboards/clueboard/66/rev4/rules.mk Co-Authored-By: fauxpark * Update keyboards/clueboard/66/rev4/rules.mk Co-Authored-By: fauxpark * Update keyboards/clueboard/66/rev4/rules.mk Co-Authored-By: fauxpark * convert the palset and palclear routines to setpinoutput and writepinlow * remove scankb * restore original guards instead of pragma once Co-authored-by: fauxpark --- keyboards/clueboard/66/rev4/config.h | 22 ------------- keyboards/clueboard/66/rev4/rev4.c | 49 +++++----------------------- keyboards/clueboard/66/rev4/rules.mk | 15 ++++----- 3 files changed, 16 insertions(+), 70 deletions(-) diff --git a/keyboards/clueboard/66/rev4/config.h b/keyboards/clueboard/66/rev4/config.h index 8ed14047837e..f81ae61cf8ef 100644 --- a/keyboards/clueboard/66/rev4/config.h +++ b/keyboards/clueboard/66/rev4/config.h @@ -54,25 +54,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - - /* Backlight configuration - */ -#define BACKLIGHT_LEVELS 1 - -/* Underlight configuration - */ -#define RGB_DI_PIN D7 -#define RGBLED_NUM 18 // Number of LEDs -#define RGBLIGHT_HUE_STEP 32 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_BREATHE_MAX 200 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // How many LEDs wide to light up -#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 // The led to start at -#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 5 // How many LEDs to travel -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up diff --git a/keyboards/clueboard/66/rev4/rev4.c b/keyboards/clueboard/66/rev4/rev4.c index 041c31cd3229..99a7cb9452c7 100644 --- a/keyboards/clueboard/66/rev4/rev4.c +++ b/keyboards/clueboard/66/rev4/rev4.c @@ -1,5 +1,4 @@ #include "rev4.h" -//#include "backlight.h" void matrix_init_kb(void) { // put your keyboard start-up code here @@ -8,49 +7,19 @@ void matrix_init_kb(void) { led_init_ports(); } -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -void backlight_init_ports(void) { - print("init_backlight_pin()\n"); +void led_init_ports() { // Set our LED pins as output - //DDRD |= (1<<6); // Esc - //DDRB |= (1<<7); // Page Up - //DDRD |= (1<<4); // Arrows + setPinOutput(B13); // LED1 + writePinLow(B13); - // Set our LED pins low - //PORTD &= ~(1<<6); // Esc - //PORTB &= ~(1<<7); // Page Up - //PORTD &= ~(1<<4); // Arrows -} + setPinOutput(B14); // LED2 + writePinLow(B14); -void backlight_set(uint8_t level) { -/* - if ( level == 0 ) { - // Turn off light - PORTD |= (1<<6); // Esc - PORTB |= (1<<7); // Page Up - PORTD |= (1<<4); // Arrows - } else { - // Turn on light - PORTD &= ~(1<<6); // Esc - PORTB &= ~(1<<7); // Page Up - PORTD &= ~(1<<4); // Arrows - } -*/ -} + setPinOutput(B8); // LED3 + writePinLow(B8); -void led_init_ports() { - // Set our LED pins as output - palSetPadMode(GPIOB, 13, PAL_MODE_OUTPUT_PUSHPULL); // LED1 - palClearPad(GPIOB, 13); - palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); // LED2 - palClearPad(GPIOB, 14); - palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); // LED3 - palClearPad(GPIOA, 8); - palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL); // Capslock LED - palClearPad(GPIOA, 0); + setPinOutput(B0); // Capslock LED + writePinLow(B0); } void led_set_kb(uint8_t usb_led) { diff --git a/keyboards/clueboard/66/rev4/rules.mk b/keyboards/clueboard/66/rev4/rules.mk index ef7989aa0bc1..70a63941b0da 100644 --- a/keyboards/clueboard/66/rev4/rules.mk +++ b/keyboards/clueboard/66/rev4/rules.mk @@ -4,18 +4,17 @@ MCU = STM32F303 # Build Options # comment out to disable the options. # -BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -AUDIO_ENABLE = no +AUDIO_ENABLE = yes RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = no MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = yes LAYOUTS = 66_ansi 66_iso From a561443fcacc75ce6b389bd0831af85a2d104f11 Mon Sep 17 00:00:00 2001 From: Cable Car Designs <17062872+westfoxtrot@users.noreply.github.com> Date: Wed, 22 Jan 2020 17:45:32 +0000 Subject: [PATCH 109/331] [Keyboard] added support for new rev of cypher PCB (#7636) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cleanup of existing branches to resync with upstream. removed old cyp… …her files, added new cypher files. --- keyboards/westfoxtrot/cypher/cypher.c | 56 --------- .../westfoxtrot/cypher/{ => rev1}/config.h | 0 .../westfoxtrot/cypher/{ => rev1}/info.json | 0 .../{ => rev1}/keymaps/default/keymap.c | 28 ++--- .../{ => rev1}/keymaps/default/readme.md | 0 .../keymaps/default_iso}/keymap.c | 28 ++--- .../keymaps/default_iso}/readme.md | 0 .../cypher/{ => rev1}/keymaps/kwer/config.h | 0 .../cypher/{ => rev1}/keymaps/kwer/keymap.c | 0 .../cypher/{ => rev1}/keymaps/kwer/readme.md | 0 .../cypher/{ => rev1}/keymaps/kwer/rules.mk | 0 .../westfoxtrot/cypher/{ => rev1}/readme.md | 10 +- .../default-iso/config.h => rev1/rev1.c} | 18 ++- .../cypher/{cypher.h => rev1/rev1.h} | 0 .../westfoxtrot/cypher/{ => rev1}/rules.mk | 0 keyboards/westfoxtrot/cypher/rev5/config.h | 81 +++++++++++++ keyboards/westfoxtrot/cypher/rev5/info.json | 110 ++++++++++++++++++ .../cypher/rev5/keymaps/default/keymap.c | 37 ++++++ .../cypher/rev5/keymaps/default/readme.md | 1 + .../cypher/rev5/keymaps/default_iso/keymap.c | 37 ++++++ .../cypher/rev5/keymaps/default_iso/readme.md | 1 + .../cypher/rev5/keymaps/max/keymap.c | 49 ++++++++ .../cypher/rev5/keymaps/max/readme.md | 1 + keyboards/westfoxtrot/cypher/rev5/readme.md | 13 +++ .../{keymaps/default/config.h => rev5/rev5.c} | 18 ++- keyboards/westfoxtrot/cypher/rev5/rev5.h | 48 ++++++++ keyboards/westfoxtrot/cypher/rev5/rules.mk | 33 ++++++ 27 files changed, 461 insertions(+), 108 deletions(-) delete mode 100644 keyboards/westfoxtrot/cypher/cypher.c rename keyboards/westfoxtrot/cypher/{ => rev1}/config.h (100%) rename keyboards/westfoxtrot/cypher/{ => rev1}/info.json (100%) rename keyboards/westfoxtrot/cypher/{ => rev1}/keymaps/default/keymap.c (82%) rename keyboards/westfoxtrot/cypher/{ => rev1}/keymaps/default/readme.md (100%) rename keyboards/westfoxtrot/cypher/{keymaps/default-iso => rev1/keymaps/default_iso}/keymap.c (82%) rename keyboards/westfoxtrot/cypher/{keymaps/default-iso => rev1/keymaps/default_iso}/readme.md (100%) rename keyboards/westfoxtrot/cypher/{ => rev1}/keymaps/kwer/config.h (100%) rename keyboards/westfoxtrot/cypher/{ => rev1}/keymaps/kwer/keymap.c (100%) rename keyboards/westfoxtrot/cypher/{ => rev1}/keymaps/kwer/readme.md (100%) rename keyboards/westfoxtrot/cypher/{ => rev1}/keymaps/kwer/rules.mk (100%) rename keyboards/westfoxtrot/cypher/{ => rev1}/readme.md (56%) rename keyboards/westfoxtrot/cypher/{keymaps/default-iso/config.h => rev1/rev1.c} (55%) rename keyboards/westfoxtrot/cypher/{cypher.h => rev1/rev1.h} (100%) rename keyboards/westfoxtrot/cypher/{ => rev1}/rules.mk (100%) create mode 100644 keyboards/westfoxtrot/cypher/rev5/config.h create mode 100644 keyboards/westfoxtrot/cypher/rev5/info.json create mode 100644 keyboards/westfoxtrot/cypher/rev5/keymaps/default/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/rev5/keymaps/default/readme.md create mode 100644 keyboards/westfoxtrot/cypher/rev5/keymaps/default_iso/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/rev5/keymaps/default_iso/readme.md create mode 100644 keyboards/westfoxtrot/cypher/rev5/keymaps/max/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/rev5/keymaps/max/readme.md create mode 100644 keyboards/westfoxtrot/cypher/rev5/readme.md rename keyboards/westfoxtrot/cypher/{keymaps/default/config.h => rev5/rev5.c} (55%) create mode 100644 keyboards/westfoxtrot/cypher/rev5/rev5.h create mode 100644 keyboards/westfoxtrot/cypher/rev5/rules.mk diff --git a/keyboards/westfoxtrot/cypher/cypher.c b/keyboards/westfoxtrot/cypher/cypher.c deleted file mode 100644 index d2407525ea5e..000000000000 --- a/keyboards/westfoxtrot/cypher/cypher.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright 2019 westfoxtrot - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "cypher.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinHigh(F4); - } else { - writePinLow(F4); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(F1); - } else { - writePinLow(F1); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinHigh(F5); - } else { - writePinLow(F5); - } - led_set_user(usb_led); -} diff --git a/keyboards/westfoxtrot/cypher/config.h b/keyboards/westfoxtrot/cypher/rev1/config.h similarity index 100% rename from keyboards/westfoxtrot/cypher/config.h rename to keyboards/westfoxtrot/cypher/rev1/config.h diff --git a/keyboards/westfoxtrot/cypher/info.json b/keyboards/westfoxtrot/cypher/rev1/info.json similarity index 100% rename from keyboards/westfoxtrot/cypher/info.json rename to keyboards/westfoxtrot/cypher/rev1/info.json diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c b/keyboards/westfoxtrot/cypher/rev1/keymaps/default/keymap.c similarity index 82% rename from keyboards/westfoxtrot/cypher/keymaps/default/keymap.c rename to keyboards/westfoxtrot/cypher/rev1/keymaps/default/keymap.c index 1906f939694e..54eae8e38eae 100644 --- a/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c +++ b/keyboards/westfoxtrot/cypher/rev1/keymaps/default/keymap.c @@ -21,29 +21,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MA] = LAYOUT_ansi( /* Base */ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,\ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL,\ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,\ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTRL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), [_F1] = LAYOUT_ansi( /* Function Layer */ - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______,\ - _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______,\ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______,\ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,\ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______,_______,_______, _______,_______,_______, _______, _______, _______), }; - -void matrix_init_user(void) { - //user initialization -} - -void matrix_scan_user(void) { - //user matrix -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/readme.md b/keyboards/westfoxtrot/cypher/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/westfoxtrot/cypher/keymaps/default/readme.md rename to keyboards/westfoxtrot/cypher/rev1/keymaps/default/readme.md diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c b/keyboards/westfoxtrot/cypher/rev1/keymaps/default_iso/keymap.c similarity index 82% rename from keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c rename to keyboards/westfoxtrot/cypher/rev1/keymaps/default_iso/keymap.c index 2a08ae853b57..df93c5399649 100644 --- a/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c +++ b/keyboards/westfoxtrot/cypher/rev1/keymaps/default_iso/keymap.c @@ -21,29 +21,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MA] = LAYOUT_iso( /* Base */ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, KC_PPLS,\ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL,\ - KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,\ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTRL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), [_F1] = LAYOUT_iso( /* Function Layer */ - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______,\ - _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______,\ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______, _______, _______,\ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,\ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______, _______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______,_______,_______, _______,_______,_______, _______, _______, _______), }; - -void matrix_init_user(void) { - //user initialization -} - -void matrix_scan_user(void) { - //user matrix -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md b/keyboards/westfoxtrot/cypher/rev1/keymaps/default_iso/readme.md similarity index 100% rename from keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md rename to keyboards/westfoxtrot/cypher/rev1/keymaps/default_iso/readme.md diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/config.h similarity index 100% rename from keyboards/westfoxtrot/cypher/keymaps/kwer/config.h rename to keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/config.h diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c similarity index 100% rename from keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c rename to keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/readme.md similarity index 100% rename from keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md rename to keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/readme.md diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/rules.mk similarity index 100% rename from keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk rename to keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/rules.mk diff --git a/keyboards/westfoxtrot/cypher/readme.md b/keyboards/westfoxtrot/cypher/rev1/readme.md similarity index 56% rename from keyboards/westfoxtrot/cypher/readme.md rename to keyboards/westfoxtrot/cypher/rev1/readme.md index 6db417fae887..5e57fd8a4edf 100644 --- a/keyboards/westfoxtrot/cypher/readme.md +++ b/keyboards/westfoxtrot/cypher/rev1/readme.md @@ -1,15 +1,13 @@ # cypher -![cypher](https://github.com/westfoxtrot/Cypher_PCB) - PCB for the cypher keyboard -Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) -Hardware Supported: Cypher PCB -Hardware Availability: with group buy + Files released here (https://github.com/westfoxtrot/Cypher_PCB) +* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) +* Hardware Supported: Cypher PCB revisions 1-4 (Rev # is printed on PCB) +* Hardware Availability: with group buy + [Files released here](https://github.com/westfoxtrot/Cypher_PCB) Make example for this keyboard (after setting up your build environment): - make westfoxtrot/cypher:default + make westfoxtrot/cypher/rev1:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h b/keyboards/westfoxtrot/cypher/rev1/rev1.c similarity index 55% rename from keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h rename to keyboards/westfoxtrot/cypher/rev1/rev1.c index 41d70907ebd8..78b4b6b46e02 100644 --- a/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h +++ b/keyboards/westfoxtrot/cypher/rev1/rev1.c @@ -13,7 +13,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#include "rev1.h" -#pragma once - -// place overrides here +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(F4, led_state.num_lock); + writePin(F1, led_state.caps_lock); + writePin(F5, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/westfoxtrot/cypher/cypher.h b/keyboards/westfoxtrot/cypher/rev1/rev1.h similarity index 100% rename from keyboards/westfoxtrot/cypher/cypher.h rename to keyboards/westfoxtrot/cypher/rev1/rev1.h diff --git a/keyboards/westfoxtrot/cypher/rules.mk b/keyboards/westfoxtrot/cypher/rev1/rules.mk similarity index 100% rename from keyboards/westfoxtrot/cypher/rules.mk rename to keyboards/westfoxtrot/cypher/rev1/rules.mk diff --git a/keyboards/westfoxtrot/cypher/rev5/config.h b/keyboards/westfoxtrot/cypher/rev5/config.h new file mode 100644 index 000000000000..111771ae86c0 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/config.h @@ -0,0 +1,81 @@ +/* +Copyright 2019 westfoxtrot + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x21FF +#define PRODUCT_ID 0xAA97 +#define DEVICE_VER 0x0002 +#define MANUFACTURER westfoxtrot +#define PRODUCT cypher +#define DESCRIPTION Cypher + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, F1, F5, F6, F7, D1, F4, D4, C6, C7 } +#define MATRIX_COL_PINS { D6, D7, B4, B5, B6, B7, B3, B2, B1, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +#define GRAVE_ESC_CTRL_OVERRIDE + + + + +#define BACKLIGHT_PIN D0 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #define RGBLIGHT_HUE_STEP 12 + #define RGBLIGHT_SAT_STEP 25 + #define RGBLIGHT_VAL_STEP 12 + #define RGBLIGHT_LIMIT_VAL 255 + #define RGBLIGHT_SLEEP + #define RGBLIGHT_ANIMATIONS +#endif diff --git a/keyboards/westfoxtrot/cypher/rev5/info.json b/keyboards/westfoxtrot/cypher/rev5/info.json new file mode 100644 index 000000000000..50f51651cd6d --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/info.json @@ -0,0 +1,110 @@ +{ + "keyboard_name": "Cypher", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"~","x":0,"y":0}, + {"label":"!","x":1,"y":0}, + {"label":"@","x":2,"y":0}, + {"label":"#","x":3,"y":0}, + {"label":"$","x":4,"y":0}, + {"label":"%","x":5,"y":0}, + {"label":"^","x":6,"y":0}, + {"label":"&","x":7,"y":0}, + {"label":"*","x":8,"y":0}, + {"label":"(","x":9,"y":0}, + {"label":")","x":10,"y":0}, + {"label":"_","x":11,"y":0}, + {"label":"+","x":12,"y":0}, + {"label":"Backspace","x":13,"y":0}, + {"label":"~","x":14,"y":0}, + + {"label":"Num Lock","x":15.5,"y":0}, + {"label":"/","x":16.5,"y":0}, + {"label":"*","x":17.5,"y":0}, + {"label":"-","x":18.5,"y":0}, + + {"label":"Tab","x":0,"y":1,"w":1.5}, + {"label":"Q","x":1.5,"y":1}, + {"label":"W","x":2.5,"y":1}, + {"label":"E","x":3.5,"y":1}, + {"label":"R","x":4.5,"y":1}, + {"label":"T","x":5.5,"y":1}, + {"label":"Y","x":6.5,"y":1}, + {"label":"U","x":7.5,"y":1}, + {"label":"I","x":8.5,"y":1}, + {"label":"O","x":9.5,"y":1}, + {"label":"P","x":10.5,"y":1}, + {"label":"{","x":11.5,"y":1}, + {"label":"}","x":12.5,"y":1}, + {"label":"|","x":13.5,"y":1,"w":1.5}, + + {"label":"7","x":15.5,"y":1}, + {"label":"8","x":16.5,"y":1}, + {"label":"9","x":17.5,"y":1}, + {"label":"+","x":18.5,"y":1}, + + {"label":"Caps Lock","x":0,"y":2,"w":1.75}, + {"label":"A","x":1.75,"y":2}, + {"label":"S","x":2.75,"y":2}, + {"label":"D","x":3.75,"y":2}, + {"label":"F","x":4.75,"y":2}, + {"label":"G","x":5.75,"y":2}, + {"label":"H","x":6.75,"y":2}, + {"label":"J","x":7.75,"y":2}, + {"label":"K","x":8.75,"y":2}, + {"label":"L","x":9.75,"y":2}, + {"label":":","x":10.75,"y":2}, + {"label":"\"","x":11.75,"y":2}, + {"label":"NUHS","x":12.75,"y":2}, + {"label":"Enter","x":13.75,"y":2,"w":1.25}, + + {"label":"4","x":15.5,"y":2}, + {"label":"5","x":16.5,"y":2}, + {"label":"6","x":17.5,"y":2}, + {"label":"=","x":18.5,"y":2}, + + {"label":"Shift","x":0,"y":3,"w":1.25}, + {"label":"Shift","x":1.25,"y":3}, + {"label":"Z","x":2.25,"y":3}, + {"label":"X","x":3.25,"y":3}, + {"label":"C","x":4.25,"y":3}, + {"label":"V","x":5.25,"y":3}, + {"label":"B","x":6.25,"y":3}, + {"label":"N","x":7.25,"y":3}, + {"label":"M","x":8.25,"y":3}, + {"label":"<","x":9.25,"y":3}, + {"label":">","x":10.25,"y":3}, + {"label":"?","x":11.25,"y":3}, + {"label":"Shift","x":12.25,"y":3,"w":1.75}, + + {"label":"Up","x":14.25,"y":3.25}, + + {"label":"1","x":15.5,"y":3}, + {"label":"2","x":16.5,"y":3}, + {"label":"3","x":17.5,"y":3}, + {"label":"Enter","x":18.5,"y":3}, + + {"label":"Ctrl","x":0,"y":4,"w":1.25}, + {"label":"Win","x":1.25,"y":4}, + {"label":"Alt","x":2.25,"y":4,"w":1.25}, + {"label":"Space","x":3.5,"y":4,"w":1.5}, + {"label":"Space","x":5,"y":4,"w":3}, + {"label":"Space","x":8,"y":4,"w":1.5}, + {"label":"Alt","x":9.5,"y":4,"w":1.25}, + {"label":"Win","x":10.75,"y":4}, + {"label":"Ctrl","x":11.75,"y":4,"w":1.25}, + + {"label":"Left","x":13.25,"y":4.25}, + {"label":"Down","x":14.25,"y":4.25}, + {"label":"Right","x":15.25,"y":4.25}, + + {"label":"0","x":16.5,"y":4}, + {"label":".","x":17.5,"y":4}, + {"label":"Backspace","x":18.5,"y":4} + ] + } + } + } diff --git a/keyboards/westfoxtrot/cypher/rev5/keymaps/default/keymap.c b/keyboards/westfoxtrot/cypher/rev5/keymaps/default/keymap.c new file mode 100644 index 000000000000..f9d6bc8e5689 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 westfoxtrot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_all( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_NO, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_LSFT,KC_NO ,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC,KC_SPC,KC_SPC, KC_RALT,KC_RALT,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), + +[_F1] = LAYOUT_all( /* Function Layer */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL , _______, _______, _______, _______, _______, + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, _______, _______, _______, _______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______,_______, _______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______, _______), + +}; diff --git a/keyboards/westfoxtrot/cypher/rev5/keymaps/default/readme.md b/keyboards/westfoxtrot/cypher/rev5/keymaps/default/readme.md new file mode 100644 index 000000000000..05c370026669 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for cypher \ No newline at end of file diff --git a/keyboards/westfoxtrot/cypher/rev5/keymaps/default_iso/keymap.c b/keyboards/westfoxtrot/cypher/rev5/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..e3bda0c0056d --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/keymaps/default_iso/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 westfoxtrot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_all( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTRL, KC_LGUI,KC_LALT, KC_NO,KC_SPC,KC_NO, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), + +[_F1] = LAYOUT_all( /* Function Layer */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______,_______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______, _______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______,_______, _______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______, _______), + +}; diff --git a/keyboards/westfoxtrot/cypher/rev5/keymaps/default_iso/readme.md b/keyboards/westfoxtrot/cypher/rev5/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..81a4a677fd70 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/keymaps/default_iso/readme.md @@ -0,0 +1 @@ +# The default iso keymap for cypher diff --git a/keyboards/westfoxtrot/cypher/rev5/keymaps/max/keymap.c b/keyboards/westfoxtrot/cypher/rev5/keymaps/max/keymap.c new file mode 100644 index 000000000000..e23b83e1420d --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/keymaps/max/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 westfoxtrot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_all( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_NO, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_CAPS, KC_LGUI,KC_LALT, KC_NO,KC_SPC,KC_NO, KC_RALT,KC_RALT,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), + +[_F1] = LAYOUT_all( /* Function Layer */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, _______, _______, _______, _______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______,_______, _______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______, _______), + +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/westfoxtrot/cypher/rev5/keymaps/max/readme.md b/keyboards/westfoxtrot/cypher/rev5/keymaps/max/readme.md new file mode 100644 index 000000000000..05c370026669 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/keymaps/max/readme.md @@ -0,0 +1 @@ +# The default keymap for cypher \ No newline at end of file diff --git a/keyboards/westfoxtrot/cypher/rev5/readme.md b/keyboards/westfoxtrot/cypher/rev5/readme.md new file mode 100644 index 000000000000..d7b78d594295 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/readme.md @@ -0,0 +1,13 @@ +# cypher + +PCB for the cypher keyboard + +* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) +* Hardware Supported: Cypher PCB revisions 5 (Rev # is printed on PCB) +* Hardware Availability: with group buy + [Files released here](https://github.com/westfoxtrot/Cypher_PCB) + +Make example for this keyboard (after setting up your build environment): + + make westfoxtrot/cypher/rev5:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/config.h b/keyboards/westfoxtrot/cypher/rev5/rev5.c similarity index 55% rename from keyboards/westfoxtrot/cypher/keymaps/default/config.h rename to keyboards/westfoxtrot/cypher/rev5/rev5.c index 41d70907ebd8..b75fd650e0ab 100644 --- a/keyboards/westfoxtrot/cypher/keymaps/default/config.h +++ b/keyboards/westfoxtrot/cypher/rev5/rev5.c @@ -13,7 +13,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#include "rev5.h" -#pragma once - -// place overrides here +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(D3, led_state.num_lock); + writePin(D5, led_state.caps_lock); + writePin(D2, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/westfoxtrot/cypher/rev5/rev5.h b/keyboards/westfoxtrot/cypher/rev5/rev5.h new file mode 100644 index 000000000000..d005ebc97550 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/rev5.h @@ -0,0 +1,48 @@ +/* Copyright 2019 westfoxtrot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define ___ KC_NO + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, K51, K52, K53, K54, K55, K56, K57, K58,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K60, K61, K62, K63, K65, K66, K67, K68, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K70, K71, K72, K73, K75, K76, K77, K78, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K80, K81, K82, K83, K85, K86, K87, K88, \ + K40, K41, K42, K44, K46, K47, K49, K90, K91, K92, K93, K95, K96, K97, K98 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39 }, \ + { K40, K41, K42, ___, K44, ___, K46, K47, ___, K49 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, ___, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, ___, K75, K76, K77, K78 }, \ + { K80, K81, K82, K83, ___, K85, K86, K87, K88 }, \ + { K90, K91, K92, K93, ___, K95, K96, K97, K98 } \ +} diff --git a/keyboards/westfoxtrot/cypher/rev5/rules.mk b/keyboards/westfoxtrot/cypher/rev5/rules.mk new file mode 100644 index 000000000000..a41c12af591f --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rev5/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 9e6e01cabb5045dcc61ff82aa0a2820f2aacdd69 Mon Sep 17 00:00:00 2001 From: yiancar Date: Wed, 22 Jan 2020 20:44:12 +0000 Subject: [PATCH 110/331] eeprom size fix (#7969) --- keyboards/nk65/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 46450a14c8c5..826e54180c25 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -140,7 +140,7 @@ along with this program. If not, see . // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. -#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32 // VIA lighting is handled by the keyboard-level code #define VIA_CUSTOM_LIGHTING_ENABLE From 1a40af74dacf6719c00baf252ffe1318358ab829 Mon Sep 17 00:00:00 2001 From: yiancar Date: Wed, 22 Jan 2020 21:28:42 +0000 Subject: [PATCH 111/331] HS60 EEPROM size fix (#7968) --- keyboards/hs60/v2/ansi/config.h | 4 +++- .../hs60/v2/ansi/keymaps/default/config.h | 23 ------------------- keyboards/hs60/v2/ansi/keymaps/via/config.h | 23 ------------------- keyboards/hs60/v2/hhkb/config.h | 4 +++- keyboards/hs60/v2/iso/config.h | 2 +- 5 files changed, 7 insertions(+), 49 deletions(-) delete mode 100644 keyboards/hs60/v2/ansi/keymaps/default/config.h delete mode 100644 keyboards/hs60/v2/ansi/keymaps/via/config.h diff --git a/keyboards/hs60/v2/ansi/config.h b/keyboards/hs60/v2/ansi/config.h index a02c362c96e7..4d0c03a9c34a 100644 --- a/keyboards/hs60/v2/ansi/config.h +++ b/keyboards/hs60/v2/ansi/config.h @@ -142,5 +142,7 @@ along with this program. If not, see . // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. -#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/hs60/v2/ansi/keymaps/default/config.h b/keyboards/hs60/v2/ansi/keymaps/default/config.h deleted file mode 100644 index 96adaf56884e..000000000000 --- a/keyboards/hs60/v2/ansi/keymaps/default/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2018 Yiancar - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#pragma once - -/* Include overwrites for specific keymap */ - -#define HS60_ANSI -#undef PRODUCT_ID -#define PRODUCT_ID 0x4854 diff --git a/keyboards/hs60/v2/ansi/keymaps/via/config.h b/keyboards/hs60/v2/ansi/keymaps/via/config.h deleted file mode 100644 index 96adaf56884e..000000000000 --- a/keyboards/hs60/v2/ansi/keymaps/via/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2018 Yiancar - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#pragma once - -/* Include overwrites for specific keymap */ - -#define HS60_ANSI -#undef PRODUCT_ID -#define PRODUCT_ID 0x4854 diff --git a/keyboards/hs60/v2/hhkb/config.h b/keyboards/hs60/v2/hhkb/config.h index 45cfe57168a3..69c0a3fe0304 100644 --- a/keyboards/hs60/v2/hhkb/config.h +++ b/keyboards/hs60/v2/hhkb/config.h @@ -142,5 +142,7 @@ along with this program. If not, see . // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. -#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32 +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/hs60/v2/iso/config.h b/keyboards/hs60/v2/iso/config.h index e252b1982c72..5c2488c7844c 100644 --- a/keyboards/hs60/v2/iso/config.h +++ b/keyboards/hs60/v2/iso/config.h @@ -140,7 +140,7 @@ along with this program. If not, see . // Backlight config starts after VIA's EEPROM usage, // dynamic keymaps start after this. -#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32 // VIA lighting is handled by the keyboard-level code #define VIA_CUSTOM_LIGHTING_ENABLE From c3835262d84687f655a77c6479900a7b432e404d Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Wed, 22 Jan 2020 23:46:00 +0100 Subject: [PATCH 112/331] [Keymap] Phoebe keymap improvements (#7963) * [Phoebe] Allow to input pipe characters with only one modifier * [Phoebe] Update RGB animations --- keyboards/maxr1998/phoebe/config.h | 7 ++++++- keyboards/maxr1998/phoebe/keymaps/default/keymap.c | 12 +++++++++++- keyboards/maxr1998/phoebe/phoebe.c | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/keyboards/maxr1998/phoebe/config.h b/keyboards/maxr1998/phoebe/config.h index 2e912b096519..2be26c6fdb15 100644 --- a/keyboards/maxr1998/phoebe/config.h +++ b/keyboards/maxr1998/phoebe/config.h @@ -49,9 +49,14 @@ along with this program. If not, see . /* RGB LED Setup */ #define RGB_DI_PIN F0 // pin the DI on the WS2812B is hooked-up to -#define RGBLIGHT_ANIMATIONS // run RGB animations #define RGBLED_NUM 8 // number of LEDs +/* Selectively enable animation effects */ +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c index da179c8f2721..1b6052a9d640 100644 --- a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c +++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, DE_UE, KC_F9, DE_OE, _______, KC_DEL, - KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______, + KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_SW,RGB_M_SN,_______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END ), @@ -115,6 +115,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; } break; + case KC_Z: + if (get_mods() & MODS_ALGR_MASK) { + if (record->event.pressed) { + register_code(DE_LESS); + } else { + unregister_code(DE_LESS); + } + return false; + } + break; } return true; }; diff --git a/keyboards/maxr1998/phoebe/phoebe.c b/keyboards/maxr1998/phoebe/phoebe.c index d8629f7f55d5..28d3afea5087 100644 --- a/keyboards/maxr1998/phoebe/phoebe.c +++ b/keyboards/maxr1998/phoebe/phoebe.c @@ -1 +1,3 @@ #include "phoebe.h" + +const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {50, 50, 50}; From 6ff093efbee21d3f64f5b4bfdbc66d4648490523 Mon Sep 17 00:00:00 2001 From: Akaash Suresh Date: Mon, 20 Jan 2020 23:17:04 -0600 Subject: [PATCH 113/331] Local Changes --- keyboards/crkbd/keymaps/curry/keymap.c | 4 ++-- users/curry/process_records.h | 2 +- users/curry/wrappers.h | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/crkbd/keymaps/curry/keymap.c b/keyboards/crkbd/keymaps/curry/keymap.c index 1ad628c920fb..e56f77ebeb40 100644 --- a/keyboards/crkbd/keymaps/curry/keymap.c +++ b/keyboards/crkbd/keymaps/curry/keymap.c @@ -6,8 +6,8 @@ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ ) \ LAYOUT_wrapper( \ - KC_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - MT_ESC, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + MT_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ KC_LEAD,OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, KC_RGUI \ ) diff --git a/users/curry/process_records.h b/users/curry/process_records.h index 49e7240c6786..0aa873648b4a 100644 --- a/users/curry/process_records.h +++ b/users/curry/process_records.h @@ -70,7 +70,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define OS_MEH OSM(MOD_MEH) #define OS_HYPR OSM(MOD_HYPR) -#define MT_ESC MT(MOD_LCTL, KC_ESC) +#define MT_TAB MT(MOD_LCTL, KC_TAB) #define ALT_APP ALT_T(KC_APP) diff --git a/users/curry/wrappers.h b/users/curry/wrappers.h index 62e89a71755f..dbc7368739f1 100644 --- a/users/curry/wrappers.h +++ b/users/curry/wrappers.h @@ -39,13 +39,13 @@ expanded before being used as arguments to the LAYOUT_xxx macro. #define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z -#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G -#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V +#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B +#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G +#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V -#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I -#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH +#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN +#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I +#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 From d13ada11622977bcc0b530212b4405229805016d Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 6 Nov 2019 08:04:50 +1100 Subject: [PATCH 114/331] Add customisable EEPROM driver selection (#7274) - uprintf -> dprintf - Fix atsam "vendor" eeprom. - Bump Kinetis K20x to 64 bytes, too. - Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value. - Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage. - Add 24LC128 by request. --- common_features.mk | 51 ++++++++++ docs/_summary.md | 1 + docs/eeprom_driver.md | 50 ++++++++++ docs/hardware_drivers.md | 4 + drivers/eeprom/eeprom_custom.c-template | 46 +++++++++ drivers/eeprom/eeprom_driver.c | 73 ++++++++++++++ drivers/eeprom/eeprom_driver.h | 22 +++++ drivers/eeprom/eeprom_i2c.c | 120 ++++++++++++++++++++++++ drivers/eeprom/eeprom_i2c.h | 115 +++++++++++++++++++++++ drivers/eeprom/eeprom_transient.c | 52 ++++++++++ drivers/eeprom/eeprom_transient.h | 25 +++++ quantum/audio/audio_arm.c | 2 +- quantum/rgblight.c | 8 +- tmk_core/common.mk | 30 +----- tmk_core/common/arm_atsam/eeprom.c | 13 ++- tmk_core/common/chibios/eeprom_stm32.c | 6 +- tmk_core/common/chibios/eeprom_teensy.c | 25 +++-- tmk_core/common/eeconfig.c | 10 ++ tmk_core/common/eeprom.h | 9 +- tmk_core/common/test/eeprom.c | 6 +- 20 files changed, 616 insertions(+), 52 deletions(-) create mode 100644 docs/eeprom_driver.md create mode 100644 drivers/eeprom/eeprom_custom.c-template create mode 100644 drivers/eeprom/eeprom_driver.c create mode 100644 drivers/eeprom/eeprom_driver.h create mode 100644 drivers/eeprom/eeprom_i2c.c create mode 100644 drivers/eeprom/eeprom_i2c.h create mode 100644 drivers/eeprom/eeprom_transient.c create mode 100644 drivers/eeprom/eeprom_transient.h diff --git a/common_features.mk b/common_features.mk index 6c3646db94f1..900b27c46cf2 100644 --- a/common_features.mk +++ b/common_features.mk @@ -102,6 +102,57 @@ ifeq ($(strip $(UNICODE_COMMON)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c endif +VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c +EEPROM_DRIVER ?= vendor +ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) + $(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) +else + OPT_DEFS += -DEEPROM_ENABLE + ifeq ($(strip $(EEPROM_DRIVER)), custom) + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c + else ifeq ($(strip $(EEPROM_DRIVER)), i2c) + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C + COMMON_VPATH += $(DRIVER_PATH)/eeprom + QUANTUM_LIB_SRC += i2c_master.c + SRC += eeprom_driver.c eeprom_i2c.c + else ifeq ($(strip $(EEPROM_DRIVER)), transient) + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c eeprom_transient.c + else ifeq ($(strip $(EEPROM_DRIVER)), vendor) + OPT_DEFS += -DEEPROM_VENDOR + ifeq ($(PLATFORM),AVR) + # Automatically provided by avr-libc, nothing required + else ifeq ($(PLATFORM),CHIBIOS) + ifeq ($(MCU_SERIES), STM32F3xx) + SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c + SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + OPT_DEFS += -DEEPROM_EMU_STM32F303xC + OPT_DEFS += -DSTM32_EEPROM_ENABLE + else ifeq ($(MCU_SERIES), STM32F1xx) + SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c + SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + OPT_DEFS += -DEEPROM_EMU_STM32F103xB + OPT_DEFS += -DSTM32_EEPROM_ENABLE + else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB) + SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c + SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + OPT_DEFS += -DEEPROM_EMU_STM32F072xB + OPT_DEFS += -DSTM32_EEPROM_ENABLE + else + # This will effectively work the same as "transient" if not supported by the chip + SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c + endif + else ifeq ($(PLATFORM),ARM_ATSAM) + SRC += $(PLATFORM_COMMON_DIR)/eeprom.c + else ifeq ($(PLATFORM),TEST) + SRC += $(PLATFORM_COMMON_DIR)/eeprom.c + endif + endif +endif + ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h OPT_DEFS += -DRGBLIGHT_ENABLE diff --git a/docs/_summary.md b/docs/_summary.md index de81481382a5..08ccdca22055 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -104,6 +104,7 @@ * [ADC Driver](adc_driver.md) * [I2C Driver](i2c_driver.md) * [WS2812 Driver](ws2812_driver.md) + * [EEPROM Driver](eeprom_driver.md) * [GPIO Controls](internals_gpio_control.md) * [Custom Matrix](custom_matrix.md) * [Proton C Conversion](proton_c_conversion.md) diff --git a/docs/eeprom_driver.md b/docs/eeprom_driver.md new file mode 100644 index 000000000000..dd12d8ec7b08 --- /dev/null +++ b/docs/eeprom_driver.md @@ -0,0 +1,50 @@ +# EEPROM Driver Configuration + +The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present. + +Driver | Description +--------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +`EEPROM_DRIVER = vendor` | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. Other chips will generally act as "transient" below. +`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below. +`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost. + +## Vendor Driver Configuration + +No configurable options are available. + +## I2C Driver Configuration + +Currently QMK supports 24xx-series chips over I2C. As such, requires a working i2c_master driver configuration. You can override the driver configuration via your config.h: + +`config.h` override | Description | Default Value +------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------ +`#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS` | Base I2C address for the EEPROM -- shifted left by 1 as per i2c_master requirements | 0b10100000 +`#define EXTERNAL_EEPROM_I2C_ADDRESS(addr)` | Calculated I2C address for the EEPROM | `(EXTERNAL_EEPROM_I2C_BASE_ADDRESS)` +`#define EXTERNAL_EEPROM_BYTE_COUNT` | Total size of the EEPROM in bytes | 8192 +`#define EXTERNAL_EEPROM_PAGE_SIZE` | Page size of the EEPROM in bytes, as specified in the datasheet | 32 +`#define EXTERNAL_EEPROM_ADDRESS_SIZE` | The number of bytes to transmit for the memory location within the EEPROM | 2 +`#define EXTERNAL_EEPROM_WRITE_TIME` | Write cycle time of the EEPROM, as specified in the datasheet | 5 + +Default values and extended descriptions can be found in `drivers/eeprom/eeprom_i2c.h`. + +Alternatively, there are pre-defined hardware configurations for available chips/modules: + +Module | Equivalent `#define` | Source +-----------------|---------------------------------|------------------------------------------ +CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | +RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | +24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | +24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | +MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | + +?> If you find that the EEPROM is not cooperating, ensure you've correctly shifted up your EEPROM address by 1. For example, the datasheet might state the address as `0b01010000` -- the correct value of `EXTERNAL_EEPROM_I2C_BASE_ADDRESS` needs to be `0b10100000`. + +## Transient Driver configuration + +The only configurable item for the transient EEPROM driver is its size: + +`config.h` override | Description | Default Value +------------------------------- | ----------------------------------------- | ------------- +`#define TRANSIENT_EEPROM_SIZE` | Total size of the EEPROM storage in bytes | 64 + +Default values and extended descriptions can be found in `drivers/eeprom/eeprom_transient.h`. diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 16518779570a..7e89c0d2b9a0 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -33,3 +33,7 @@ Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to in ## IS31FL3733 Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page. + +## 24xx series external I2C EEPROM + +Support for an external I2C-based EEPROM instead of using the on-chip EEPROM. For more information on how to setup the driver see the [EEPROM Driver](eeprom_driver.md) page. diff --git a/drivers/eeprom/eeprom_custom.c-template b/drivers/eeprom/eeprom_custom.c-template new file mode 100644 index 000000000000..5f915f7fab55 --- /dev/null +++ b/drivers/eeprom/eeprom_custom.c-template @@ -0,0 +1,46 @@ +/* Copyright 2019 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "eeprom_driver.h" + +void eeprom_driver_init(void) { + /* Any initialisation code */ + } + +void eeprom_driver_erase(void) { + /* Wipe out the EEPROM, setting values to zero */ +} + +void eeprom_read_block(void *buf, const void *addr, size_t len) { + /* + Read a block of data: + buf: target buffer + addr: 0-based offset within the EEPROM + len: length to read + */ +} + +void eeprom_write_block(const void *buf, void *addr, size_t len) { + /* + Write a block of data: + buf: target buffer + addr: 0-based offset within the EEPROM + len: length to write + */ +} diff --git a/drivers/eeprom/eeprom_driver.c b/drivers/eeprom/eeprom_driver.c new file mode 100644 index 000000000000..3835e5e9d055 --- /dev/null +++ b/drivers/eeprom/eeprom_driver.c @@ -0,0 +1,73 @@ +/* Copyright 2019 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "eeprom_driver.h" + +uint8_t eeprom_read_byte(const uint8_t *addr) { + uint8_t ret; + eeprom_read_block(&ret, addr, 1); + return ret; +} + +uint16_t eeprom_read_word(const uint16_t *addr) { + uint16_t ret; + eeprom_read_block(&ret, addr, 2); + return ret; +} + +uint32_t eeprom_read_dword(const uint32_t *addr) { + uint32_t ret; + eeprom_read_block(&ret, addr, 4); + return ret; +} + +void eeprom_write_byte(uint8_t *addr, uint8_t value) { eeprom_write_block(&value, addr, 1); } + +void eeprom_write_word(uint16_t *addr, uint16_t value) { eeprom_write_block(&value, addr, 2); } + +void eeprom_write_dword(uint32_t *addr, uint32_t value) { eeprom_write_block(&value, addr, 4); } + +void eeprom_update_block(const void *buf, void *addr, size_t len) { + uint8_t read_buf[len]; + eeprom_read_block(read_buf, addr, len); + if (memcmp(buf, read_buf, len) != 0) { + eeprom_write_block(buf, addr, len); + } +} + +void eeprom_update_byte(uint8_t *addr, uint8_t value) { + uint8_t orig = eeprom_read_byte(addr); + if (orig != value) { + eeprom_write_byte(addr, value); + } +} + +void eeprom_update_word(uint16_t *addr, uint16_t value) { + uint16_t orig = eeprom_read_word(addr); + if (orig != value) { + eeprom_write_word(addr, value); + } +} + +void eeprom_update_dword(uint32_t *addr, uint32_t value) { + uint32_t orig = eeprom_read_dword(addr); + if (orig != value) { + eeprom_write_dword(addr, value); + } +} diff --git a/drivers/eeprom/eeprom_driver.h b/drivers/eeprom/eeprom_driver.h new file mode 100644 index 000000000000..74592bc8f05c --- /dev/null +++ b/drivers/eeprom/eeprom_driver.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "eeprom.h" + +void eeprom_driver_init(void); +void eeprom_driver_erase(void); diff --git a/drivers/eeprom/eeprom_i2c.c b/drivers/eeprom/eeprom_i2c.c new file mode 100644 index 000000000000..03dbc5e51668 --- /dev/null +++ b/drivers/eeprom/eeprom_i2c.c @@ -0,0 +1,120 @@ +/* Copyright 2019 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +/* + Note that the implementations of eeprom_XXXX_YYYY on AVR are normally + provided by avr-libc. The same functions are reimplemented below and are + rerouted to the external i2c equivalent. + + Seemingly, as this is compiled from within QMK, the object file generated + during the build overrides the avr-libc implementation during the linking + stage. + + On other platforms such as ARM, there are no provided implementations, so + there is nothing to override during linkage. +*/ + +#include "wait.h" +#include "i2c_master.h" +#include "eeprom.h" +#include "eeprom_i2c.h" + +// #define DEBUG_EEPROM_OUTPUT + +#ifdef DEBUG_EEPROM_OUTPUT +# include "print.h" +#endif // DEBUG_EEPROM_OUTPUT + +static inline void init_i2c_if_required(void) { + static int done = 0; + if (!done) { + i2c_init(); + done = 1; + } +} + +static inline void fill_target_address(uint8_t *buffer, const void *addr) { + intptr_t p = (intptr_t)addr; + for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) { + buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = p & 0xFF; + p >>= 8; + } +} + +void eeprom_driver_init(void) {} + +void eeprom_driver_erase(void) { + uint8_t buf[EXTERNAL_EEPROM_PAGE_SIZE]; + memset(buf, 0x00, EXTERNAL_EEPROM_PAGE_SIZE); + for (intptr_t addr = 0; addr < EXTERNAL_EEPROM_BYTE_COUNT; addr += EXTERNAL_EEPROM_PAGE_SIZE) { + eeprom_write_block(buf, (void *)addr, EXTERNAL_EEPROM_PAGE_SIZE); + } +} + +void eeprom_read_block(void *buf, const void *addr, size_t len) { + uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE]; + fill_target_address(complete_packet, addr); + + init_i2c_if_required(); + i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100); + i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), buf, len, 100); + +#ifdef DEBUG_EEPROM_OUTPUT + dprintf("[EEPROM R] 0x%04X: ", ((int)addr)); + for (size_t i = 0; i < len; ++i) { + dprintf(" %02X", (int)(((uint8_t *)buf)[i])); + } + dprintf("\n"); +#endif // DEBUG_EEPROM_OUTPUT +} + +void eeprom_write_block(const void *buf, void *addr, size_t len) { + uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + EXTERNAL_EEPROM_PAGE_SIZE]; + uint8_t *read_buf = (uint8_t *)buf; + intptr_t target_addr = (intptr_t)addr; + + init_i2c_if_required(); + while (len > 0) { + intptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE; + int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset; + if (write_length > len) { + write_length = len; + } + + fill_target_address(complete_packet, (const void *)target_addr); + for (uint8_t i = 0; i < write_length; i++) { + complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + i] = read_buf[i]; + } + +#ifdef DEBUG_EEPROM_OUTPUT + dprintf("[EEPROM W] 0x%04X: ", ((int)target_addr)); + for (uint8_t i = 0; i < write_length; i++) { + dprintf(" %02X", (int)(read_buf[i])); + } + dprintf("\n"); +#endif // DEBUG_EEPROM_OUTPUT + + i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE + write_length, 100); + wait_ms(EXTERNAL_EEPROM_WRITE_TIME); + + read_buf += write_length; + target_addr += write_length; + len -= write_length; + } +} diff --git a/drivers/eeprom/eeprom_i2c.h b/drivers/eeprom/eeprom_i2c.h new file mode 100644 index 000000000000..51bce825b080 --- /dev/null +++ b/drivers/eeprom/eeprom_i2c.h @@ -0,0 +1,115 @@ +/* Copyright 2019 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* + Default device configurations: + + For the Sparkfun Qwiic I2C EEPROM module: https://www.sparkfun.com/products/14764 + #define EEPROM_I2C_CAT24C512 // (part number 24512A) + #define EEPROM_I2C_RM24C512C // (part number 24512C) + + For the Sparkfun I2C EEPROM chip: https://www.sparkfun.com/products/525 + #define EEPROM_I2C_24LC256 + + For the Adafruit I2C FRAM chip: https://www.adafruit.com/product/1895 + #define EEPROM_I2C_MB85RC256V +*/ +#if defined(EEPROM_I2C_CAT24C512) +# define EXTERNAL_EEPROM_BYTE_COUNT 65536 +# define EXTERNAL_EEPROM_PAGE_SIZE 128 +# define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +# define EXTERNAL_EEPROM_WRITE_TIME 5 +#elif defined(EEPROM_I2C_RM24C512C) +# define EXTERNAL_EEPROM_BYTE_COUNT 65536 +# define EXTERNAL_EEPROM_PAGE_SIZE 128 +# define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +# define EXTERNAL_EEPROM_WRITE_TIME 3 +#elif defined(EEPROM_I2C_24LC256) +# define EXTERNAL_EEPROM_BYTE_COUNT 32768 +# define EXTERNAL_EEPROM_PAGE_SIZE 64 +# define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +# define EXTERNAL_EEPROM_WRITE_TIME 5 +#elif defined(EEPROM_I2C_24LC128) +# define EXTERNAL_EEPROM_BYTE_COUNT 16384 +# define EXTERNAL_EEPROM_PAGE_SIZE 64 +# define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +# define EXTERNAL_EEPROM_WRITE_TIME 5 +#elif defined(EEPROM_I2C_MB85RC256V) +# define EXTERNAL_EEPROM_BYTE_COUNT 32768 +# define EXTERNAL_EEPROM_PAGE_SIZE 128 +# define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +# define EXTERNAL_EEPROM_WRITE_TIME 0 +#endif + +/* + The base I2C address of the EEPROM. + This needs to be shifted up by 1, to match i2c_master requirements. +*/ +#ifndef EXTERNAL_EEPROM_I2C_BASE_ADDRESS +# define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#endif + +/* + The calculated I2C address based on the input memory location. + + For EEPROM chips that embed part of the memory location in the I2C address + such as AT24M02 you can use something similar to the following (ensuring the + result is shifted by left by 1): + + #define EXTERNAL_EEPROM_I2C_ADDRESS(loc) \ + (EXTERNAL_EEPROM_I2C_BASE_ADDRESS | ((((loc) >> 16) & 0x07) << 1)) + +*/ +#ifndef EXTERNAL_EEPROM_I2C_ADDRESS +# define EXTERNAL_EEPROM_I2C_ADDRESS(loc) (EXTERNAL_EEPROM_I2C_BASE_ADDRESS) +#endif + +/* + The total size of the EEPROM, in bytes. The EEPROM datasheet will usually + specify this value in kbits, and will require conversion to bytes. +*/ +#ifndef EXTERNAL_EEPROM_BYTE_COUNT +# define EXTERNAL_EEPROM_BYTE_COUNT 8192 +#endif + +/* + The page size in bytes of the EEPROM, as specified in the datasheet. +*/ +#ifndef EXTERNAL_EEPROM_PAGE_SIZE +# define EXTERNAL_EEPROM_PAGE_SIZE 32 +#endif + +/* + The address size in bytes of the EEPROM. For EEPROMs with <=256 bytes, this + will likely be 1. For EEPROMs >256 and <=65536, this will be 2. For EEPROMs + >65536, this will likely need to be 2 with the modified variant of + EXTERNAL_EEPROM_I2C_ADDRESS above. + + As expected, consult the datasheet for specifics of your EEPROM. +*/ +#ifndef EXTERNAL_EEPROM_ADDRESS_SIZE +# define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +#endif + +/* + The write cycle time of the EEPROM in milliseconds, as specified in the + datasheet. +*/ +#ifndef EXTERNAL_EEPROM_WRITE_TIME +# define EXTERNAL_EEPROM_WRITE_TIME 5 +#endif diff --git a/drivers/eeprom/eeprom_transient.c b/drivers/eeprom/eeprom_transient.c new file mode 100644 index 000000000000..b4c78c6f400a --- /dev/null +++ b/drivers/eeprom/eeprom_transient.c @@ -0,0 +1,52 @@ +/* Copyright 2019 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "eeprom_driver.h" +#include "eeprom_transient.h" + +__attribute__((aligned(4))) static uint8_t transientBuffer[TRANSIENT_EEPROM_SIZE] = {0}; + +size_t clamp_length(intptr_t offset, size_t len) { + if (offset + len > TRANSIENT_EEPROM_SIZE) { + len = TRANSIENT_EEPROM_SIZE - offset; + } + + return len; +} + +void eeprom_driver_init(void) { eeprom_driver_erase(); } + +void eeprom_driver_erase(void) { memset(transientBuffer, 0x00, TRANSIENT_EEPROM_SIZE); } + +void eeprom_read_block(void *buf, const void *addr, size_t len) { + intptr_t offset = (intptr_t)addr; + memset(buf, 0x00, len); + len = clamp_length(offset, len); + if (len > 0) { + memcpy(buf, &transientBuffer[offset], len); + } +} + +void eeprom_write_block(const void *buf, void *addr, size_t len) { + intptr_t offset = (intptr_t)addr; + len = clamp_length(offset, len); + if (len > 0) { + memcpy(&transientBuffer[offset], buf, len); + } +} diff --git a/drivers/eeprom/eeprom_transient.h b/drivers/eeprom/eeprom_transient.h new file mode 100644 index 000000000000..ca9d634f06e6 --- /dev/null +++ b/drivers/eeprom/eeprom_transient.h @@ -0,0 +1,25 @@ +/* Copyright 2019 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* + The size of the transient EEPROM buffer size. +*/ +#ifndef TRANSIENT_EEPROM_SIZE +# include "eeconfig.h" +# define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO +#endif diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index 87d625301fbf..e4483c302895 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c @@ -258,7 +258,7 @@ void audio_init() { } // Check EEPROM -#if defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) +#ifdef EEPROM_ENABLE if (!eeconfig_is_enabled()) { eeconfig_init(); } diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 40de19eac31d..67d601af7f14 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -19,9 +19,11 @@ # include # include #endif +#ifdef EEPROM_ENABLE +# include "eeprom.h" +#endif #ifdef STM32_EEPROM_ENABLE # include "hal.h" -# include "eeprom.h" # include "eeprom_stm32.h" #endif #include "wait.h" @@ -146,7 +148,7 @@ void rgblight_check_config(void) { } uint32_t eeconfig_read_rgblight(void) { -#if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) +#ifdef EEPROM_ENABLE return eeprom_read_dword(EECONFIG_RGBLIGHT); #else return 0; @@ -154,7 +156,7 @@ uint32_t eeconfig_read_rgblight(void) { } void eeconfig_update_rgblight(uint32_t val) { -#if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) +#ifdef EEPROM_ENABLE rgblight_check_config(); eeprom_update_dword(EECONFIG_RGBLIGHT, val); #endif diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 8f355da1233a..5f149d8f4dc7 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -26,29 +26,11 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \ $(PLATFORM_COMMON_DIR)/bootloader.c \ ifeq ($(PLATFORM),AVR) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S endif ifeq ($(PLATFORM),CHIBIOS) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c - ifeq ($(MCU_SERIES), STM32F3xx) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c - TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F303xC - TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE - else ifeq ($(MCU_SERIES), STM32F1xx) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c - TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F103xB - TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE - else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c - TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F072xB - TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE - else - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c - endif + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) TMK_COMMON_SRC += $(CHIBIOS)/os/various/syscalls.c else ifeq ($(strip $(TERMINAL_ENABLE)), yes) @@ -57,15 +39,9 @@ ifeq ($(PLATFORM),CHIBIOS) endif ifeq ($(PLATFORM),ARM_ATSAM) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom.c + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c endif -ifeq ($(PLATFORM),TEST) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom.c -endif - - # Option modules BOOTMAGIC_ENABLE ?= no diff --git a/tmk_core/common/arm_atsam/eeprom.c b/tmk_core/common/arm_atsam/eeprom.c index 44a0bf4d763b..a69f38282391 100644 --- a/tmk_core/common/arm_atsam/eeprom.c +++ b/tmk_core/common/arm_atsam/eeprom.c @@ -16,9 +16,12 @@ #include "eeprom.h" -#define EEPROM_SIZE 32 +#ifndef EEPROM_SIZE +# include "eeconfig.h" +# define EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO +#endif -static uint8_t buffer[EEPROM_SIZE]; +__attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; uint8_t eeprom_read_byte(const uint8_t *addr) { uintptr_t offset = (uintptr_t)addr; @@ -40,7 +43,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) { return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); } -void eeprom_read_block(void *buf, const void *addr, uint32_t len) { +void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *p = (const uint8_t *)addr; uint8_t * dest = (uint8_t *)buf; while (len--) { @@ -62,7 +65,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) { eeprom_write_byte(p, value >> 24); } -void eeprom_write_block(const void *buf, void *addr, uint32_t len) { +void eeprom_write_block(const void *buf, void *addr, size_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { @@ -86,7 +89,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) { eeprom_write_byte(p, value >> 24); } -void eeprom_update_block(const void *buf, void *addr, uint32_t len) { +void eeprom_update_block(const void *buf, void *addr, size_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/tmk_core/common/chibios/eeprom_stm32.c index 926b581c6bf3..ea519897280d 100644 --- a/tmk_core/common/chibios/eeprom_stm32.c +++ b/tmk_core/common/chibios/eeprom_stm32.c @@ -173,7 +173,7 @@ void eeprom_update_dword(uint32_t *Address, uint32_t Value) { } } -void eeprom_read_block(void *buf, const void *addr, uint32_t len) { +void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *p = (const uint8_t *)addr; uint8_t * dest = (uint8_t *)buf; while (len--) { @@ -181,7 +181,7 @@ void eeprom_read_block(void *buf, const void *addr, uint32_t len) { } } -void eeprom_write_block(const void *buf, void *addr, uint32_t len) { +void eeprom_write_block(const void *buf, void *addr, size_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { @@ -189,7 +189,7 @@ void eeprom_write_block(const void *buf, void *addr, uint32_t len) { } } -void eeprom_update_block(const void *buf, void *addr, uint32_t len) { +void eeprom_update_block(const void *buf, void *addr, size_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { diff --git a/tmk_core/common/chibios/eeprom_teensy.c b/tmk_core/common/chibios/eeprom_teensy.c index a4093fb3bac1..0fab9f73d6bf 100644 --- a/tmk_core/common/chibios/eeprom_teensy.c +++ b/tmk_core/common/chibios/eeprom_teensy.c @@ -50,7 +50,17 @@ // (aligned to 2 or 4 byte boundaries) has twice the endurance // compared to writing 8 bit bytes. // -# define EEPROM_SIZE 32 +# ifndef EEPROM_SIZE +# define EEPROM_SIZE 32 +# endif + +/* + ^^^ Here be dragons: + NXP AppNote AN4282 section 3.1 states that partitioning must only be done once. + Once EEPROM partitioning is done, the size is locked to this initial configuration. + Attempts to modify the EEPROM_SIZE setting may brick your board. +*/ + // Writing unaligned 16 or 32 bit data is handled automatically when // this is defined, but at a cost of extra code size. Without this, @@ -517,8 +527,11 @@ void eeprom_write_block(const void *buf, void *addr, uint32_t len) { #else // No EEPROM supported, so emulate it -# define EEPROM_SIZE 32 -static uint8_t buffer[EEPROM_SIZE]; +# ifndef EEPROM_SIZE +# include "eeconfig.h" +# define EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO +# endif +__attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; uint8_t eeprom_read_byte(const uint8_t *addr) { uint32_t offset = (uint32_t)addr; @@ -540,7 +553,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) { return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); } -void eeprom_read_block(void *buf, const void *addr, uint32_t len) { +void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *p = (const uint8_t *)addr; uint8_t * dest = (uint8_t *)buf; while (len--) { @@ -562,7 +575,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) { eeprom_write_byte(p, value >> 24); } -void eeprom_write_block(const void *buf, void *addr, uint32_t len) { +void eeprom_write_block(const void *buf, void *addr, size_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { @@ -589,7 +602,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) { eeprom_write_byte(p, value >> 24); } -void eeprom_update_block(const void *buf, void *addr, uint32_t len) { +void eeprom_update_block(const void *buf, void *addr, size_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 7cec4bd7df4c..fe56c57d1177 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -9,6 +9,10 @@ # include "eeprom_stm32.h" #endif +#if defined(EEPROM_DRIVER) +# include "eeprom_driver.h" +#endif + /** \brief eeconfig enable * * FIXME: needs doc @@ -31,6 +35,9 @@ __attribute__((weak)) void eeconfig_init_kb(void) { void eeconfig_init_quantum(void) { #ifdef STM32_EEPROM_ENABLE EEPROM_Erase(); +#endif +#if defined(EEPROM_DRIVER) + eeprom_driver_erase(); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); eeprom_update_byte(EECONFIG_DEBUG, 0); @@ -80,6 +87,9 @@ void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_N void eeconfig_disable(void) { #ifdef STM32_EEPROM_ENABLE EEPROM_Erase(); +#endif +#if defined(EEPROM_DRIVER) + eeprom_driver_erase(); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF); } diff --git a/tmk_core/common/eeprom.h b/tmk_core/common/eeprom.h index fcd1667c0646..8a81e7066895 100644 --- a/tmk_core/common/eeprom.h +++ b/tmk_core/common/eeprom.h @@ -1,23 +1,24 @@ #ifndef TMK_CORE_COMMON_EEPROM_H_ #define TMK_CORE_COMMON_EEPROM_H_ -#if defined(__AVR__) +#if defined(__AVR__) && !defined(EEPROM_DRIVER) # include #else # include +# include uint8_t eeprom_read_byte(const uint8_t *__p); uint16_t eeprom_read_word(const uint16_t *__p); uint32_t eeprom_read_dword(const uint32_t *__p); -void eeprom_read_block(void *__dst, const void *__src, uint32_t __n); +void eeprom_read_block(void *__dst, const void *__src, size_t __n); void eeprom_write_byte(uint8_t *__p, uint8_t __value); void eeprom_write_word(uint16_t *__p, uint16_t __value); void eeprom_write_dword(uint32_t *__p, uint32_t __value); -void eeprom_write_block(const void *__src, void *__dst, uint32_t __n); +void eeprom_write_block(const void *__src, void *__dst, size_t __n); void eeprom_update_byte(uint8_t *__p, uint8_t __value); void eeprom_update_word(uint16_t *__p, uint16_t __value); void eeprom_update_dword(uint32_t *__p, uint32_t __value); -void eeprom_update_block(const void *__src, void *__dst, uint32_t __n); +void eeprom_update_block(const void *__src, void *__dst, size_t __n); #endif #endif /* TMK_CORE_COMMON_EEPROM_H_ */ diff --git a/tmk_core/common/test/eeprom.c b/tmk_core/common/test/eeprom.c index 44a0bf4d763b..5c8e69dae330 100644 --- a/tmk_core/common/test/eeprom.c +++ b/tmk_core/common/test/eeprom.c @@ -40,7 +40,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) { return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); } -void eeprom_read_block(void *buf, const void *addr, uint32_t len) { +void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *p = (const uint8_t *)addr; uint8_t * dest = (uint8_t *)buf; while (len--) { @@ -62,7 +62,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) { eeprom_write_byte(p, value >> 24); } -void eeprom_write_block(const void *buf, void *addr, uint32_t len) { +void eeprom_write_block(const void *buf, void *addr, size_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { @@ -86,7 +86,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) { eeprom_write_byte(p, value >> 24); } -void eeprom_update_block(const void *buf, void *addr, uint32_t len) { +void eeprom_update_block(const void *buf, void *addr, size_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { From fe50883c1568b1914fcadbe0c7f029c3f9fd99f4 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Fri, 24 Jan 2020 02:15:29 +0000 Subject: [PATCH 115/331] format code according to conventions [skip ci] --- drivers/eeprom/eeprom_transient.h | 2 +- tmk_core/common/arm_atsam/eeprom.c | 2 +- tmk_core/common/chibios/eeprom_teensy.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/eeprom/eeprom_transient.h b/drivers/eeprom/eeprom_transient.h index ca9d634f06e6..d06189b246df 100644 --- a/drivers/eeprom/eeprom_transient.h +++ b/drivers/eeprom/eeprom_transient.h @@ -21,5 +21,5 @@ */ #ifndef TRANSIENT_EEPROM_SIZE # include "eeconfig.h" -# define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO +# define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO #endif diff --git a/tmk_core/common/arm_atsam/eeprom.c b/tmk_core/common/arm_atsam/eeprom.c index a69f38282391..ccd5d15a5478 100644 --- a/tmk_core/common/arm_atsam/eeprom.c +++ b/tmk_core/common/arm_atsam/eeprom.c @@ -18,7 +18,7 @@ #ifndef EEPROM_SIZE # include "eeconfig.h" -# define EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO +# define EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO #endif __attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; diff --git a/tmk_core/common/chibios/eeprom_teensy.c b/tmk_core/common/chibios/eeprom_teensy.c index 0fab9f73d6bf..d436d0cb9548 100644 --- a/tmk_core/common/chibios/eeprom_teensy.c +++ b/tmk_core/common/chibios/eeprom_teensy.c @@ -61,7 +61,6 @@ Attempts to modify the EEPROM_SIZE setting may brick your board. */ - // Writing unaligned 16 or 32 bit data is handled automatically when // this is defined, but at a cost of extra code size. Without this, // any unaligned write will cause a hard fault exception! If you're @@ -529,7 +528,7 @@ void eeprom_write_block(const void *buf, void *addr, uint32_t len) { # ifndef EEPROM_SIZE # include "eeconfig.h" -# define EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO +# define EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO # endif __attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; From b56899976924043a9563c12987218abd78baf13d Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 24 Jan 2020 14:24:10 +1100 Subject: [PATCH 116/331] Fix LED configuration for PS2AVRGB boards (#7989) * Fix LED configuration for PS2AVRGB boards * Undo backlight on state changes --- keyboards/ares/ares.c | 3 +-- keyboards/ares/config.h | 1 + keyboards/bfake/bfake.c | 3 +-- keyboards/bfake/config.h | 1 + keyboards/db/db63/config.h | 1 - keyboards/donutcables/budget96/budget96.c | 6 ++---- keyboards/donutcables/budget96/config.h | 1 + keyboards/eve/meteor/meteor.c | 3 +-- keyboards/exclusive/e6v2/le_bmc/le_bmc.c | 3 +-- keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c | 3 +-- keyboards/exent/config.h | 1 + keyboards/exent/exent.c | 9 +++------ keyboards/facew/config.h | 1 + keyboards/facew/facew.c | 5 ++--- keyboards/ft/mars80/config.h | 1 + keyboards/ft/mars80/mars80.c | 6 ++---- keyboards/gray_studio/hb85/config.h | 3 +++ keyboards/gray_studio/hb85/hb85.c | 9 +++------ keyboards/j80/j80.c | 13 ++++++++++++- keyboards/jc65/v32a/v32a.c | 3 +-- keyboards/kbdfans/kbdpad/mk1/mk1.c | 3 +-- keyboards/mehkee96/mehkee96.c | 6 ++---- keyboards/panc60/panc60.c | 3 +-- keyboards/pearl/pearl.c | 9 +++------ keyboards/percent/canoe/canoe.c | 3 +-- keyboards/percent/skog/skog.c | 6 ++---- keyboards/percent/skog_lite/skog_lite.c | 6 ++---- keyboards/singa/singa.c | 3 +-- keyboards/tgr/alice/alice.c | 9 +++------ keyboards/tgr/jane/jane.c | 6 ++---- keyboards/unikorn/unikorn.c | 3 +-- keyboards/winkeyless/bface/bface.c | 9 +++------ keyboards/winkeyless/bmini/bmini.c | 9 +++------ keyboards/winkeyless/bminiex/bminiex.c | 9 +++------ keyboards/ymd75/ymd75.c | 3 +-- keyboards/ymd96/ymd96.c | 6 ++---- keyboards/ymdk/bface/bface.c | 3 +-- keyboards/ymdk_np21/ymdk_np21.c | 1 - 38 files changed, 71 insertions(+), 102 deletions(-) diff --git a/keyboards/ares/ares.c b/keyboards/ares/ares.c index e6379cb18da6..95d4b878f10f 100644 --- a/keyboards/ares/ares.c +++ b/keyboards/ares/ares.c @@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h index c50587db9c49..e298dfc959d0 100644 --- a/keyboards/ares/config.h +++ b/keyboards/ares/config.h @@ -39,6 +39,7 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index eb328ba8336c..6d0c927462bc 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c @@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index 7c814ccc9328..ef7a866d3db9 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -39,6 +39,7 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/db/db63/config.h b/keyboards/db/db63/config.h index 488409e3a606..3183201c1fe6 100644 --- a/keyboards/db/db63/config.h +++ b/keyboards/db/db63/config.h @@ -41,4 +41,3 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 - diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c index 7317e24e2607..5f3436dc6103 100644 --- a/keyboards/donutcables/budget96/budget96.c +++ b/keyboards/donutcables/budget96/budget96.c @@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); - writePinHigh(D0); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h index dddc8075b19e..0e05bb76f490 100644 --- a/keyboards/donutcables/budget96/config.h +++ b/keyboards/donutcables/budget96/config.h @@ -39,4 +39,5 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/eve/meteor/meteor.c b/keyboards/eve/meteor/meteor.c index ac1ca5d6434b..1d080b389cc2 100644 --- a/keyboards/eve/meteor/meteor.c +++ b/keyboards/eve/meteor/meteor.c @@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c index b09e588795cd..df79cc5dcf8e 100644 --- a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c +++ b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c @@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c index a0a6c579bdd3..ea74d87cb1df 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c @@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/exent/config.h b/keyboards/exent/config.h index 4921746c1c59..48aee2206f34 100644 --- a/keyboards/exent/config.h +++ b/keyboards/exent/config.h @@ -41,6 +41,7 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/exent/exent.c b/keyboards/exent/exent.c index c6870f2c7917..a935e9e67fa0 100644 --- a/keyboards/exent/exent.c +++ b/keyboards/exent/exent.c @@ -25,16 +25,13 @@ void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); setPinOutput(D6); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index 0dc35e625889..be442548d04c 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h @@ -39,4 +39,5 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c index fc176466fe39..2f091ae6bdde 100644 --- a/keyboards/facew/facew.c +++ b/keyboards/facew/facew.c @@ -25,13 +25,12 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); - writePinHigh(D0); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h index 38c3e851a83d..8c1ebe4bafee 100644 --- a/keyboards/ft/mars80/config.h +++ b/keyboards/ft/mars80/config.h @@ -40,6 +40,7 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 + #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/ft/mars80/mars80.c b/keyboards/ft/mars80/mars80.c index ca1950353be4..2c628a6a2367 100644 --- a/keyboards/ft/mars80/mars80.c +++ b/keyboards/ft/mars80/mars80.c @@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); setPinOutput(D6); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/gray_studio/hb85/config.h b/keyboards/gray_studio/hb85/config.h index dff360ec6a05..f3fb20ec6b39 100644 --- a/keyboards/gray_studio/hb85/config.h +++ b/keyboards/gray_studio/hb85/config.h @@ -33,3 +33,6 @@ along with this program. If not, see . #define RGBLED_NUM 5 #define RGBLIGHT_ANIMATIONS + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c index 57f5e6031456..4b3ff64f1e0e 100644 --- a/keyboards/gray_studio/hb85/hb85.c +++ b/keyboards/gray_studio/hb85/hb85.c @@ -27,16 +27,13 @@ void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); setPinOutput(D6); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/j80/j80.c b/keyboards/j80/j80.c index 4ac0200a28ac..bed30cdecc48 100644 --- a/keyboards/j80/j80.c +++ b/keyboards/j80/j80.c @@ -16,10 +16,21 @@ #include "j80.h" +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D6); +} + bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, led_state.caps_lock); writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); writePin(D6, led_state.scroll_lock); } return true; diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index 627661a57ca1..f195e8f61e91 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c @@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.c b/keyboards/kbdfans/kbdpad/mk1/mk1.c index f5fe47741b08..540ba358925f 100644 --- a/keyboards/kbdfans/kbdpad/mk1/mk1.c +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.c @@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D0); - writePinHigh(D0); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); + writePin(D0, led_state.num_lock); } return true; } diff --git a/keyboards/mehkee96/mehkee96.c b/keyboards/mehkee96/mehkee96.c index 2da25b6b845f..ae83a1bb50d7 100644 --- a/keyboards/mehkee96/mehkee96.c +++ b/keyboards/mehkee96/mehkee96.c @@ -25,14 +25,12 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); - writePinHigh(D0); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/panc60/panc60.c b/keyboards/panc60/panc60.c index a200b2587848..d7ff52963cc9 100644 --- a/keyboards/panc60/panc60.c +++ b/keyboards/panc60/panc60.c @@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index cebbc9fcbacf..b08ee6f88807 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c @@ -26,16 +26,13 @@ void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); setPinOutput(D6); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/percent/canoe/canoe.c b/keyboards/percent/canoe/canoe.c index d3c66dbf1395..dd31640e6d9b 100644 --- a/keyboards/percent/canoe/canoe.c +++ b/keyboards/percent/canoe/canoe.c @@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/percent/skog/skog.c b/keyboards/percent/skog/skog.c index 241833937bb8..152fc5684500 100644 --- a/keyboards/percent/skog/skog.c +++ b/keyboards/percent/skog/skog.c @@ -27,14 +27,12 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); setPinOutput(D6); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/percent/skog_lite/skog_lite.c b/keyboards/percent/skog_lite/skog_lite.c index e611885a6103..95d39821130b 100644 --- a/keyboards/percent/skog_lite/skog_lite.c +++ b/keyboards/percent/skog_lite/skog_lite.c @@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); setPinOutput(D6); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c index 7b60e3c29d80..360b214a31df 100644 --- a/keyboards/singa/singa.c +++ b/keyboards/singa/singa.c @@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/tgr/alice/alice.c b/keyboards/tgr/alice/alice.c index 9fb4957ac895..a4a5c787c617 100644 --- a/keyboards/tgr/alice/alice.c +++ b/keyboards/tgr/alice/alice.c @@ -26,16 +26,13 @@ void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); setPinOutput(D6); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/tgr/jane/jane.c b/keyboards/tgr/jane/jane.c index 24183a0f7b91..fabdc0e90c2d 100644 --- a/keyboards/tgr/jane/jane.c +++ b/keyboards/tgr/jane/jane.c @@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); setPinOutput(D6); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/unikorn/unikorn.c b/keyboards/unikorn/unikorn.c index 26a5092a59cd..c2c85eb984af 100644 --- a/keyboards/unikorn/unikorn.c +++ b/keyboards/unikorn/unikorn.c @@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/winkeyless/bface/bface.c b/keyboards/winkeyless/bface/bface.c index 49e8bbcd2d42..7d27096bad1d 100644 --- a/keyboards/winkeyless/bface/bface.c +++ b/keyboards/winkeyless/bface/bface.c @@ -25,16 +25,13 @@ void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); setPinOutput(D6); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/winkeyless/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c index fe3b74be133f..6529d440333e 100644 --- a/keyboards/winkeyless/bmini/bmini.c +++ b/keyboards/winkeyless/bmini/bmini.c @@ -26,16 +26,13 @@ void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); setPinOutput(D6); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/winkeyless/bminiex/bminiex.c b/keyboards/winkeyless/bminiex/bminiex.c index 365aeee2b24f..676f88ebf539 100644 --- a/keyboards/winkeyless/bminiex/bminiex.c +++ b/keyboards/winkeyless/bminiex/bminiex.c @@ -26,16 +26,13 @@ void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); setPinOutput(D6); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D6); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); - writePin(D6, !led_state.scroll_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); + writePin(D6, led_state.scroll_lock); } return true; } diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c index 1c5c38039024..0870a6cc0270 100644 --- a/keyboards/ymd75/ymd75.c +++ b/keyboards/ymd75/ymd75.c @@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/ymd96/ymd96.c b/keyboards/ymd96/ymd96.c index c81435e45af0..5841decdab31 100644 --- a/keyboards/ymd96/ymd96.c +++ b/keyboards/ymd96/ymd96.c @@ -26,14 +26,12 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D0); setPinOutput(D1); - writePinHigh(D0); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D0, !led_state.num_lock); - writePin(D1, !led_state.caps_lock); + writePin(D0, led_state.num_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/ymdk/bface/bface.c b/keyboards/ymdk/bface/bface.c index e2810409a8da..b35b33376399 100644 --- a/keyboards/ymdk/bface/bface.c +++ b/keyboards/ymdk/bface/bface.c @@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D1); - writePinHigh(D1); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(D1, !led_state.caps_lock); + writePin(D1, led_state.caps_lock); } return true; } diff --git a/keyboards/ymdk_np21/ymdk_np21.c b/keyboards/ymdk_np21/ymdk_np21.c index b7c2001a417c..63812c9360e2 100644 --- a/keyboards/ymdk_np21/ymdk_np21.c +++ b/keyboards/ymdk_np21/ymdk_np21.c @@ -25,7 +25,6 @@ void keyboard_pre_init_kb(void) { void led_init_ports(void) { setPinOutput(D0); - writePinHigh(D0); } bool led_update_kb(led_t led_state) { From 339e29d5af943ddcfaf4aa335c3d1489dfb0017b Mon Sep 17 00:00:00 2001 From: Xelus22 Date: Fri, 24 Jan 2020 13:28:25 +1000 Subject: [PATCH 117/331] Add VIA support to TMO50 (#7986) * via compatible * disable mousekey * remove unnecessary space --- keyboards/tmo50/config.h | 4 +-- keyboards/tmo50/keymaps/via/keymap.c | 52 +++++++++++++++++++++++++++ keyboards/tmo50/keymaps/via/readme.md | 1 + keyboards/tmo50/keymaps/via/rules.mk | 1 + keyboards/tmo50/rules.mk | 12 +++---- 5 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 keyboards/tmo50/keymaps/via/keymap.c create mode 100644 keyboards/tmo50/keymaps/via/readme.md create mode 100644 keyboards/tmo50/keymaps/via/rules.mk diff --git a/keyboards/tmo50/config.h b/keyboards/tmo50/config.h index ee7f0e34aaa2..cebd08bcea80 100644 --- a/keyboards/tmo50/config.h +++ b/keyboards/tmo50/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0xFBFB +#define PRODUCT_ID 0x0050 #define DEVICE_VER 0x0001 #define MANUFACTURER funderburker #define PRODUCT TMO50 diff --git a/keyboards/tmo50/keymaps/via/keymap.c b/keyboards/tmo50/keymaps/via/keymap.c new file mode 100644 index 000000000000..a1d896b61be2 --- /dev/null +++ b/keyboards/tmo50/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2019 funderburker + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define LT1_SPC LT(1, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer + [0] = LAYOUT_all( + KC_TRNS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_TRNS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), + KC_TRNS, KC_LALT, KC_LGUI, LT1_SPC, LT1_SPC, KC_RALT, MO(3) + ), + + // Fn1 layer + [1] = LAYOUT_all( + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn3 layer + [3] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/tmo50/keymaps/via/readme.md b/keyboards/tmo50/keymaps/via/readme.md new file mode 100644 index 000000000000..27cb965eba9e --- /dev/null +++ b/keyboards/tmo50/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default layout diff --git a/keyboards/tmo50/keymaps/via/rules.mk b/keyboards/tmo50/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/tmo50/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/tmo50/rules.mk b/keyboards/tmo50/rules.mk index 84abd20e6e9a..954dd22460dd 100644 --- a/keyboards/tmo50/rules.mk +++ b/keyboards/tmo50/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 9a9eaa8100b1ec5f11c383b8251093d5ddaccc9b Mon Sep 17 00:00:00 2001 From: Wilba Date: Fri, 24 Jan 2020 16:03:04 +1100 Subject: [PATCH 118/331] Added VIA support to Noxary 280 (#7960) * Added VIA support to Noxary 280 * Added VIA support to Noxary 280 * Review changes --- keyboards/noxary/280/keymaps/via/keymap.c | 118 +++++++++++++++++++++ keyboards/noxary/280/keymaps/via/readme.md | 1 + keyboards/noxary/280/keymaps/via/rules.mk | 2 + 3 files changed, 121 insertions(+) create mode 100644 keyboards/noxary/280/keymaps/via/keymap.c create mode 100644 keyboards/noxary/280/keymaps/via/readme.md create mode 100644 keyboards/noxary/280/keymaps/via/rules.mk diff --git a/keyboards/noxary/280/keymaps/via/keymap.c b/keyboards/noxary/280/keymaps/via/keymap.c new file mode 100644 index 000000000000..d7fe69170245 --- /dev/null +++ b/keyboards/noxary/280/keymaps/via/keymap.c @@ -0,0 +1,118 @@ +/* Copyright 2019 Rozakin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 +#define _FL3 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI enter + * ,------------------------------------------------------------. ,--------------. + * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11| f12| |Prnt|ScLk|Paus| + * |------------------------------------------------------------| |--------------| + * | ~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| | Ins|Home|PgUp| + * |------------------------------------------------------------| |--------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | Del| End|PgDn| + * |------------------------------------------------------------| `--------------' + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| + * |------------------------------------------------------------| ,----. + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift|Mo(1)| | Up | + * |------------------------------------------------------------| ,--------------. + * |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |Ctrl | |Left| Dn |Rght| + * `------------------------------------------------------------' `--------------' + */ + [_BL] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), + /* _FL1: Function Layer 1 - For ISO enter use ANSI enter + * ,------------------------------------------------------------. ,--------------. + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | |RST| | | | | | | | | | | | | | + * |------------------------------------------------------------| `--------------' + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------| ,----. + * | | | | | | | | | |Bl-|Bl+| | Mute| | |Vol+| + * |------------------------------------------------------------| ,--------------. + * | | | | BL_Toggle | | | | | | |Vol-| | + * `------------------------------------------------------------' `--------------' + */ + [_FL1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______), + /* _FL2: Function Layer 2 - For ISO enter use ANSI enter + * ,------------------------------------------------------------. ,--------------. + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| `--------------' + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------| ,----. + * | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| ,--------------. + * | | | | | | | | | | | | | + * `------------------------------------------------------------' `--------------' + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + /* _FL3: Function Layer 3 - For ISO enter use ANSI enter + * ,------------------------------------------------------------. ,--------------. + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| `--------------' + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------| ,----. + * | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| ,--------------. + * | | | | | | | | | | | | | + * `------------------------------------------------------------' `--------------' + */ + [_FL3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + }; + diff --git a/keyboards/noxary/280/keymaps/via/readme.md b/keyboards/noxary/280/keymaps/via/readme.md new file mode 100644 index 000000000000..71535a3bd701 --- /dev/null +++ b/keyboards/noxary/280/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA keymap for Noxary 280 \ No newline at end of file diff --git a/keyboards/noxary/280/keymaps/via/rules.mk b/keyboards/noxary/280/keymaps/via/rules.mk new file mode 100644 index 000000000000..96d2d189b2e6 --- /dev/null +++ b/keyboards/noxary/280/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no From 4867a9b1e6ba4ae2e4ba6f6049c75646d251d5a3 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 24 Jan 2020 01:09:55 -0800 Subject: [PATCH 119/331] [Keyboard] HS60 v2 ISO: fix Configurator key ordering (#7958) * white-space formatting * reorder the objects --- keyboards/hs60/v2/iso/info.json | 386 +++++--------------------------- 1 file changed, 62 insertions(+), 324 deletions(-) diff --git a/keyboards/hs60/v2/iso/info.json b/keyboards/hs60/v2/iso/info.json index 1bd1201f8021..11f6f52a2eec 100644 --- a/keyboards/hs60/v2/iso/info.json +++ b/keyboards/hs60/v2/iso/info.json @@ -8,330 +8,68 @@ "LAYOUT_60_iso": { "key_count": 62, "layout": [ - { - "label": "\\u00ac", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "\"", - "x": 2, - "y": 0 - }, - { - "label": "\\u00a3", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "label": "Backspace", - "x": 13, - "y": 0, - "w": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "Enter", - "x": 13.75, - "y": 1, - "w": 1.25, - "h": 2 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "@", - "x": 11.75, - "y": 2 - }, - { - "label": "~", - "x": 12.75, - "y": 2 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 1.25 - }, - { - "label": "|", - "x": 1.25, - "y": 3 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 2.75 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 4, - "w": 1.25 - }, - { - "x": 3.75, - "y": 4, - "w": 6.25 - }, - { - "label": "AltGr", - "x": 10, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 11.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Menu", - "x": 12.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.75, - "y": 4, - "w": 1.25 - } + {"label":"\\u00ac", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"\"", "x":2, "y":0}, + {"label":"\\u00a3", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"@", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"AltGr", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} ] } } From e4a0f841e19b4ddf86711cf79dc521d2f6f5e4ae Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 24 Jan 2020 13:50:51 +0000 Subject: [PATCH 120/331] Update split serial code to use driver pattern (#7990) * Move avr serial code to drivers * Update src+= serial.c to driver pattern --- common_features.mk | 10 ++++++++-- {quantum/split_common => drivers/avr}/serial.c | 0 {quantum/split_common => drivers/avr}/serial.h | 0 3 files changed, 8 insertions(+), 2 deletions(-) rename {quantum/split_common => drivers/avr}/serial.c (100%) rename {quantum/split_common => drivers/avr}/serial.h (100%) diff --git a/common_features.mk b/common_features.mk index 900b27c46cf2..a431923bcfd9 100644 --- a/common_features.mk +++ b/common_features.mk @@ -469,9 +469,15 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. - QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \ - i2c_master.c \ + QUANTUM_LIB_SRC += i2c_master.c \ i2c_slave.c + + SERIAL_DRIVER ?= bitbang + ifeq ($(strip $(SERIAL_DRIVER)), bitbang) + QUANTUM_LIB_SRC += serial.c + else + QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c + endif endif COMMON_VPATH += $(QUANTUM_PATH)/split_common endif diff --git a/quantum/split_common/serial.c b/drivers/avr/serial.c similarity index 100% rename from quantum/split_common/serial.c rename to drivers/avr/serial.c diff --git a/quantum/split_common/serial.h b/drivers/avr/serial.h similarity index 100% rename from quantum/split_common/serial.h rename to drivers/avr/serial.h From 6efcfaa264e7df8ccfcf5ba6e33e4e648de664ae Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 24 Jan 2020 14:11:01 +0000 Subject: [PATCH 121/331] Remove compilation of i2c for arm split --- common_features.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common_features.mk b/common_features.mk index a431923bcfd9..c32a1b449682 100644 --- a/common_features.mk +++ b/common_features.mk @@ -469,8 +469,10 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. - QUANTUM_LIB_SRC += i2c_master.c \ - i2c_slave.c + ifeq ($(PLATFORM),AVR) + QUANTUM_LIB_SRC += i2c_master.c \ + i2c_slave.c + endif SERIAL_DRIVER ?= bitbang ifeq ($(strip $(SERIAL_DRIVER)), bitbang) From 5e65af3a76252bea6556d26add3061dea4918cc2 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Fri, 24 Jan 2020 11:31:16 -0800 Subject: [PATCH 122/331] Beef up how `qmk doctor` works. (#7375) * Beef up how `qmk doctor` works. * improve the `git submodule status` parsing. h/t @erovia * Fix whitespace and imports * yapf * Add documentation for the new doctor functionality * Replace type_unchanged() with str() * remove unused modules * Update lib/python/qmk/cli/doctor.py Co-Authored-By: Erovia Co-authored-by: Erovia --- docs/cli.md | 18 ++- lib/python/qmk/cli/doctor.py | 239 ++++++++++++++++++++++++++--------- lib/python/qmk/questions.py | 97 ++++++++++++++ lib/python/qmk/submodules.py | 71 +++++++++++ 4 files changed, 360 insertions(+), 65 deletions(-) create mode 100644 lib/python/qmk/questions.py create mode 100644 lib/python/qmk/submodules.py diff --git a/docs/cli.md b/docs/cli.md index 1c095272212c..4f328a75a2d4 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -141,14 +141,28 @@ qmk docs [-p PORT] ## `qmk doctor` -This command examines your environment and alerts you to potential build or flash problems. +This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to. **Usage**: ``` -qmk doctor +qmk doctor [-y] [-n] ``` +**Examples**: + +Check your environment for problems and prompt to fix them: + + qmk doctor + +Check your environment and automatically fix any problems found: + + qmk doctor -y + +Check your environment and report problems only: + + qmk doctor -n + ## `qmk json-keymap` Creates a keymap.c from a QMK Configurator export. diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 6ddc5571b442..013bf7943c94 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -1,14 +1,18 @@ -"""QMK Python Doctor +"""QMK Doctor -Check up for QMK environment. +Check out the user's QMK environment and make sure it's ready to compile. """ -import os import platform import shutil import subprocess -import glob +from pathlib import Path from milc import cli +from qmk import submodules +from qmk.questions import yesno + +ESSENTIAL_BINARIES = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc', 'bin/qmk'] +ESSENTIAL_SUBMODULES = ['lib/chibios', 'lib/lufa'] def _udev_rule(vid, pid=None): @@ -20,6 +24,137 @@ def _udev_rule(vid, pid=None): return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid +def check_binaries(): + """Iterates through ESSENTIAL_BINARIES and tests them. + """ + ok = True + + for binary in ESSENTIAL_BINARIES: + if not is_executable(binary): + ok = False + + return ok + + +def check_submodules(): + """Iterates through all submodules to make sure they're cloned and up to date. + """ + ok = True + + for submodule in submodules.status().values(): + if submodule['status'] is None: + if submodule['name'] in ESSENTIAL_SUBMODULES: + cli.log.error('Submodule %s has not yet been cloned!', submodule['name']) + ok = False + else: + cli.log.warn('Submodule %s is not available.', submodule['name']) + elif not submodule['status']: + if submodule['name'] in ESSENTIAL_SUBMODULES: + cli.log.warn('Submodule %s is not up to date!') + + return ok + + +def check_udev_rules(): + """Make sure the udev rules look good. + """ + ok = True + udev_dir = Path("/etc/udev/rules.d/") + desired_rules = { + 'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")}, + 'tmk': {_udev_rule("feed")}, + 'input_club': {_udev_rule("1c11")}, + 'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")}, + 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}, + } + + if udev_dir.exists(): + udev_rules = [str(rule_file) for rule_file in udev_dir.glob('*.rules')] + current_rules = set() + + # Collect all rules from the config files + for rule_file in udev_rules: + with open(rule_file, "r") as fd: + for line in fd.readlines(): + line = line.strip() + if not line.startswith("#") and len(line): + current_rules.add(line) + + # Check if the desired rules are among the currently present rules + for bootloader, rules in desired_rules.items(): + if not rules.issubset(current_rules): + # If the rules for catalina are not present, check if ModemManager is running + if bootloader == "caterina": + if check_modem_manager(): + ok = False + cli.log.warn("{bg_yellow}Detected ModemManager without udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") + else: + cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader) + + return ok + + +def check_modem_manager(): + """Returns True if ModemManager is running. + """ + if shutil.which("systemctl"): + mm_check = subprocess.run(["systemctl", "--quiet", "is-active", "ModemManager.service"], timeout=10) + if mm_check.returncode == 0: + return True + + else: + cli.log.warn("Can't find systemctl to check for ModemManager.") + + +def is_executable(command): + """Returns True if command exists and can be executed. + """ + # Make sure the command is in the path. + res = shutil.which(command) + if res is None: + cli.log.error("{fg_red}Can't find %s in your path.", command) + return False + + # Make sure the command can be executed + check = subprocess.run([command, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5) + if check.returncode in [0, 1]: # Older versions of dfu-programmer exit 1 + cli.log.debug('Found {fg_cyan}%s', command) + return True + + cli.log.error("{fg_red}Can't run `%s --version`", command) + return False + + +def os_test_linux(): + """Run the Linux specific tests. + """ + cli.log.info("Detected {fg_cyan}Linux.") + ok = True + + if not check_udev_rules(): + ok = False + + return ok + + +def os_test_macos(): + """Run the Mac specific tests. + """ + cli.log.info("Detected {fg_cyan}macOS.") + + return True + + +def os_test_windows(): + """Run the Windows specific tests. + """ + cli.log.info("Detected {fg_cyan}Windows.") + + return True + + +@cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.') +@cli.argument('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.') @cli.subcommand('Basic QMK environment checks') def doctor(cli): """Basic QMK environment checks. @@ -30,75 +165,53 @@ def doctor(cli): * [ ] Compile a trivial program with each compiler """ cli.log.info('QMK Doctor is checking your environment.') - - # Make sure the basic CLI tools we need are available and can be executed. - binaries = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc', 'bin/qmk'] ok = True - for binary in binaries: - res = shutil.which(binary) - if res is None: - cli.log.error("{fg_red}QMK can't find %s in your path.", binary) - ok = False - else: - check = subprocess.run([binary, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5) - if check.returncode in [0, 1]: - cli.log.info('Found {fg_cyan}%s', binary) - else: - cli.log.error("{fg_red}Can't run `%s --version`", binary) - ok = False - # Determine our OS and run platform specific tests OS = platform.system() # noqa (N806), uppercase name is ok in this instance - if OS == "Darwin": - cli.log.info("Detected {fg_cyan}macOS.") - - elif OS == "Linux": - cli.log.info("Detected {fg_cyan}Linux.") - # Checking for udev rules - udev_dir = "/etc/udev/rules.d/" - # These are the recommended udev rules - desired_rules = { - 'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")}, - 'tmk': {_udev_rule("feed")}, - 'input_club': {_udev_rule("1c11")}, - 'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")}, - 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}, - } - - if os.path.exists(udev_dir): - udev_rules = [rule for rule in glob.iglob(os.path.join(udev_dir, "*.rules")) if os.path.isfile(rule)] - # Collect all rules from the config files - current_rules = set() - for rule in udev_rules: - with open(rule, "r") as fd: - for line in fd.readlines(): - line = line.strip() - if not line.startswith("#") and len(line): - current_rules.add(line) - - # Check if the desired rules are among the currently present rules - for bootloader, rules in desired_rules.items(): - if not rules.issubset(current_rules): - # If the rules for catalina are not present, check if ModemManager is running - if bootloader == "caterina": - if shutil.which("systemctl"): - mm_check = subprocess.run(["systemctl", "--quiet", "is-active", "ModemManager.service"], timeout=10) - if mm_check.returncode == 0: - ok = False - cli.log.warn("{bg_yellow}Detected ModemManager without udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") - else: - cli.log.warn("Can't find systemctl to check for ModemManager.") - else: - cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader) + if OS == 'Darwin': + if not os_test_macos(): + ok = False + elif OS == 'Linux': + if not os_test_linux(): + ok = False + elif OS == 'Windows': + if not os_test_windows(): + ok = False + else: + cli.log.error('Unsupported OS detected: %s', OS) + ok = False + # Make sure the basic CLI tools we need are available and can be executed. + bin_ok = check_binaries() + + if not bin_ok: + if yesno('Would you like to install dependencies?', default=True): + subprocess.run(['util/qmk_install.sh']) + bin_ok = check_binaries() + + if bin_ok: + cli.log.info('All dependencies are installed.') else: - cli.log.info("Assuming {fg_cyan}Windows.") + ok = False + + # Check out the QMK submodules + sub_ok = check_submodules() + + if sub_ok: + cli.log.info('Submodules are up to date.') + else: + if yesno('Would you like to clone the submodules?', default=True): + submodules.update() + sub_ok = check_submodules() + + if not sub_ok: + ok = False # Report a summary of our findings to the user if ok: cli.log.info('{fg_green}QMK is ready to go') else: cli.log.info('{fg_yellow}Problems detected, please fix these problems before proceeding.') - # FIXME(skullydazed): Link to a document about troubleshooting, or discord or something + # FIXME(skullydazed/unclaimed): Link to a document about troubleshooting, or discord or something diff --git a/lib/python/qmk/questions.py b/lib/python/qmk/questions.py new file mode 100644 index 000000000000..34b0b43bc898 --- /dev/null +++ b/lib/python/qmk/questions.py @@ -0,0 +1,97 @@ +"""Functions to collect user input. +""" + +from milc import cli, format_ansi + + +def yesno(prompt, *args, default=None, **kwargs): + """Displays prompt to the user and gets a yes or no response. + + Returns True for a yes and False for a no. + + If you add `--yes` and `--no` arguments to your program the user can answer questions by passing command line flags. + + @add_argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.') + @add_argument('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.') + + Arguments: + prompt + The prompt to present to the user. Can include ANSI and format strings like milc's `cli.print()`. + + default + Whether to default to a Yes or No when the user presses enter. + + None- force the user to enter Y or N + + True- Default to yes + + False- Default to no + """ + if not args and kwargs: + args = kwargs + + if 'no' in cli.args and cli.args.no: + return False + + if 'yes' in cli.args and cli.args.yes: + return True + + if default is not None: + if default: + prompt = prompt + ' [Y/n] ' + else: + prompt = prompt + ' [y/N] ' + + while True: + print() + answer = input(format_ansi(prompt % args)) + print() + + if not answer and prompt is not None: + return default + + elif answer.lower() in ['y', 'yes']: + return True + + elif answer.lower() in ['n', 'no']: + return False + + +def question(prompt, *args, default=None, confirm=False, answer_type=str, **kwargs): + """Prompt the user to answer a question with a free-form input. + + prompt + The prompt to present to the user. Can include ANSI and format strings like milc's `cli.print()`. + + default + The value to return when the user doesn't enter any value. Use None to prompt until they enter a value. + + answer_type + Specify a type function for the answer. Will re-prompt the user if the function raises any errors. Common choices here include int, float, and decimal.Decimal. + """ + if not args and kwargs: + args = kwargs + + if default is not None: + prompt = '%s [%s] ' % (prompt, default) + + while True: + print() + answer = input(format_ansi(prompt % args)) + print() + + if answer: + if confirm: + if yesno('Is the answer "%s" correct?', answer, default=True): + try: + return answer_type(answer) + except Exception as e: + cli.log.error('Could not convert answer (%s) to type %s: %s', answer, answer_type.__name__, str(e)) + else: + try: + return answer_type(answer) + except Exception as e: + cli.log.error('Could not convert answer (%s) to type %s: %s', answer, answer_type.__name__, str(e)) + + elif default is not None: + return default diff --git a/lib/python/qmk/submodules.py b/lib/python/qmk/submodules.py new file mode 100644 index 000000000000..be51a6804312 --- /dev/null +++ b/lib/python/qmk/submodules.py @@ -0,0 +1,71 @@ +"""Functions for working with QMK's submodules. +""" + +import subprocess + + +def status(): + """Returns a dictionary of submodules. + + Each entry is a dict of the form: + + { + 'name': 'submodule_name', + 'status': None/False/True, + 'githash': ' + } + + status is None when the submodule doesn't exist, False when it's out of date, and True when it's current + """ + submodules = {} + git_cmd = subprocess.run(['git', 'submodule', 'status'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=30, universal_newlines=True) + + for line in git_cmd.stdout.split('\n'): + if not line: + continue + + status = line[0] + githash, submodule = line[1:].split()[:2] + submodules[submodule] = {'name': submodule, 'githash': githash} + + if status == '-': + submodules[submodule]['status'] = None + elif status == '+': + submodules[submodule]['status'] = False + elif status == ' ': + submodules[submodule]['status'] = True + else: + raise ValueError('Unknown `git submodule status` sha-1 prefix character: "%s"' % status) + + return submodules + + +def update(submodules=None): + """Update the submodules. + + submodules + A string containing a single submodule or a list of submodules. + """ + git_sync_cmd = ['git', 'submodule', 'sync'] + git_update_cmd = ['git', 'submodule', 'update', '--init'] + + if submodules is None: + # Update everything + git_sync_cmd.append('--recursive') + git_update_cmd.append('--recursive') + subprocess.run(git_sync_cmd, check=True) + subprocess.run(git_update_cmd, check=True) + + else: + if isinstance(submodules, str): + # Update only a single submodule + git_sync_cmd.append(submodules) + git_update_cmd.append(submodules) + subprocess.run(git_sync_cmd, check=True) + subprocess.run(git_update_cmd, check=True) + + else: + # Update submodules in a list + for submodule in submodules: + subprocess.run(git_sync_cmd + [submodule], check=True) + subprocess.run(git_update_cmd + [submodule], check=True) From d4ccb2e0e6bd7ab976533ec2c0d62a8042bb5bc6 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 25 Jan 2020 02:57:30 +0000 Subject: [PATCH 123/331] Fix printf buffer overflow when cols>16 (#7998) --- tmk_core/common/chibios/printf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tmk_core/common/chibios/printf.c b/tmk_core/common/chibios/printf.c index dcf33f35f8ab..3a81acd3126c 100644 --- a/tmk_core/common/chibios/printf.c +++ b/tmk_core/common/chibios/printf.c @@ -120,7 +120,8 @@ static void putchw(void* putp, putcf putf, int n, char z, char* bf) { } void tfp_format(void* putp, putcf putf, char* fmt, va_list va) { - char bf[12]; + // This used to handle max of 12, but binary support jumps this to at least 32 + char bf[36]; char ch; From 154336ee2747eafee23a13073203cd984dc999b5 Mon Sep 17 00:00:00 2001 From: yohewi Date: Sat, 25 Jan 2020 12:33:04 +0900 Subject: [PATCH 124/331] [Keyboard] numatreus (#7929) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add files via upload * Delete NumAtreus * 20190405 * 20190405 * Delete keymap.c * Delete config.h * Delete keymap.c * Delete rules.mk * Delete rules_default.mk * Delete readme.md * Delete NumAtreus.c * Delete NumAtreus.h * Delete config.h * Delete info.json * 20190404 * Add files via upload * Add files via upload * 20190405 * Delete NumAtreus * 20190406 * 20190407 * 20190408 * 20190408 * 20190410 * Update readme.md * Update readme.md * Add files via upload 大文字小文字の修正をしました。 * Update readme.md * Update readme.md * Update readme.md * Delete NumAtreus.c * Delete NumAtreus.h * Add files via upload * 20200118 * 20200118_default * update * readme * Delete rules.mk * Delete readme.md * Delete numatreus.h * Delete config.h * Delete info.json * Delete info.json_txt * Delete numatreus.c * Delete config.h * Delete keymap.c * Delete rules.mk * Delete keymap.c * Delete keymap.c * del * update * update * Update keyboards/numatreus/config.h * Update keyboards/numatreus/config.h * Update keyboards/numatreus/config.h * Update keyboards/numatreus/keymaps/hdbx/keymap.c * Update keyboards/numatreus/rules.mk * Update keyboards/numatreus/rules.mk * Update keyboards/numatreus/rules.mk * Update keyboards/numatreus/rules.mk * Update keyboards/numatreus/keymaps/hdbx/keymap.c * Update keyboards/numatreus/keymaps/like_jis/config.h * Update keyboards/numatreus/keymaps/like_jis/keymap.c * Update keyboards/numatreus/readme.md * Update keyboards/numatreus/readme.md * Update keyboards/numatreus/readme.md * Update keyboards/numatreus/readme.md * Update keyboards/numatreus/readme.md * Update keyboards/numatreus/readme.md * 20190119_Modified * 20200119_Modified * 20200119_uranuma * Update keyboards/numatreus/keymaps/hdbx/keymap.c * Update keyboards/numatreus/keymaps/default/keymap.c * Update keyboards/numatreus/keymaps/default/keymap.c * Update keyboards/numatreus/rules.mk * Update keyboards/numatreus/rules.mk * Update keyboards/numatreus/rules.mk * Delete info.json_txt * 20200121_Modified * 20200121_Modified * 20200121_Modified * 20200121_Modified * 20200122 * Update keyboards/numatreus/config.h * 20200122_Modified * Update keyboards/uranuma/rules.mk * Update keyboards/numatreus/keymaps/like_jis/keymap.c * Update keyboards/uranuma/rules.mk * Update keyboards/uranuma/rules.mk * Update keyboards/uranuma/rules.mk * Update keyboards/uranuma/rules.mk * Update keyboards/numatreus/keymaps/like_jis/keymap.c * Update keyboards/numatreus/keymaps/like_jis/keymap.c * Update keyboards/numatreus/keymaps/like_jis/keymap.c * Update keyboards/numatreus/keymaps/like_jis/keymap.c * Update keyboards/numatreus/keymaps/like_jis/keymap.c * Update keyboards/numatreus/keymaps/like_jis/keymap.c * Update keyboards/uranuma/config.h * Update keyboards/uranuma/readme.md * Update keyboards/uranuma/readme.md * Update keyboards/uranuma/readme.md * 20200122 * Delete config.h * Delete uranuma.h * Delete uranuma.c * Delete rules.mk * Delete readme.md * Delete keymap.c * Delete info.json * Update keyboards/numatreus/rules.mk --- keyboards/numatreus/config.h | 100 ++++++++ keyboards/numatreus/info.json | 12 + keyboards/numatreus/keymaps/default/keymap.c | 60 +++++ keyboards/numatreus/keymaps/hdbx/keymap.c | 230 ++++++++++++++++++ keyboards/numatreus/keymaps/hdbx/rules.mk | 3 + keyboards/numatreus/keymaps/like_jis/config.h | 59 +++++ keyboards/numatreus/keymaps/like_jis/keymap.c | 196 +++++++++++++++ keyboards/numatreus/keymaps/like_jis/rules.mk | 8 + keyboards/numatreus/keymaps/yohewi/keymap.c | 61 +++++ keyboards/numatreus/numatreus.c | 1 + keyboards/numatreus/numatreus.h | 20 ++ keyboards/numatreus/readme.md | 13 + keyboards/numatreus/rules.mk | 36 +++ 13 files changed, 799 insertions(+) create mode 100644 keyboards/numatreus/config.h create mode 100644 keyboards/numatreus/info.json create mode 100644 keyboards/numatreus/keymaps/default/keymap.c create mode 100644 keyboards/numatreus/keymaps/hdbx/keymap.c create mode 100644 keyboards/numatreus/keymaps/hdbx/rules.mk create mode 100644 keyboards/numatreus/keymaps/like_jis/config.h create mode 100644 keyboards/numatreus/keymaps/like_jis/keymap.c create mode 100644 keyboards/numatreus/keymaps/like_jis/rules.mk create mode 100644 keyboards/numatreus/keymaps/yohewi/keymap.c create mode 100644 keyboards/numatreus/numatreus.c create mode 100644 keyboards/numatreus/numatreus.h create mode 100644 keyboards/numatreus/readme.md create mode 100644 keyboards/numatreus/rules.mk diff --git a/keyboards/numatreus/config.h b/keyboards/numatreus/config.h new file mode 100644 index 000000000000..5b16ef34d8f4 --- /dev/null +++ b/keyboards/numatreus/config.h @@ -0,0 +1,100 @@ +/* +Copyright 2019 yohei +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xE80A +#define DEVICE_VER 0x0001 +#define MANUFACTURER yohewi +#define PRODUCT NumAtreus +#define DESCRIPTION QMK keyboard firmware for NumAtreus + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + + +// wiring of each half +#define MATRIX_ROW_PINS { C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D2, D1, D0, D4 } + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +// keyboard RGB LED support +//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no +// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes +#define RGBLED_NUM 6 + +#define RGBLIGHT_LIMIT_VAL 200 +#define RGBLIGHT_VAL_STEP 17 + +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for stonehenge30 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/numatreus/info.json b/keyboards/numatreus/info.json new file mode 100644 index 000000000000..452d2a91508f --- /dev/null +++ b/keyboards/numatreus/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "numatreus", + "url": "", + "maintainer": "qmk", + "width": 13, + "height": 4.7, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.35}, {"x":2, "y":0}, {"x":3, "y":0.35}, {"x":4, "y":0.7}, {"x":8, "y":0.7}, {"x":9, "y":0.35}, {"x":10, "y":0}, {"x":11, "y":0.35}, {"x":12, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.35}, {"x":2, "y":1}, {"x":3, "y":1.35}, {"x":4, "y":1.7}, {"x":8, "y":1.7}, {"x":9, "y":1.35}, {"x":10, "y":1}, {"x":11, "y":1.35}, {"x":12, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.35}, {"x":2, "y":2}, {"x":3, "y":2.35}, {"x":4, "y":2.7}, {"x":8, "y":2.7}, {"x":9, "y":2.35}, {"x":10, "y":2}, {"x":11, "y":2.35}, {"x":12, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.35}, {"x":2, "y":3}, {"x":3, "y":3.35}, {"x":4, "y":3.7}, {"x":5, "y":2.95, "h":1.5}, {"x":7, "y":2.95, "h":1.5}, {"x":8, "y":3.7}, {"x":9, "y":3.35}, {"x":10, "y":3}, {"x":11, "y":3.35}, {"x":12, "y":3.6}] + } + } +} diff --git a/keyboards/numatreus/keymaps/default/keymap.c b/keyboards/numatreus/keymaps/default/keymap.c new file mode 100644 index 000000000000..99053002fb94 --- /dev/null +++ b/keyboards/numatreus/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layer_number { + _QWERTY, + _LOWER, + _RAISE, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( /* Qwerty */ + /* + * Q W E R T || Y U I O P + * A S D F G || H J K L ; + * Z X C V B || N M , . / + * SFT TAB CTL LW space bksp||ALT Ent RS - ' = + */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , + KC_LSFT, KC_TAB, KC_LCTL, MO(_LOWER), KC_SPC, KC_BSPC, KC_LALT, KC_ENT, MO(_RAISE), KC_MINS, KC_QUOT, KC_PEQL + ), + + /* + * 1 2 3 4 5 || 6 7 8 9 0 + * F1 F2 F3 F4 F5 || F6 F7 F8 F9 F10 + * F11 F12 ( ) & || ` [ ] + \ + * lower insert super shift space bksp|| alt Ent fn . - = + */ + [_RAISE] = LAYOUT( /* [> RAISE <] */ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 , + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_F11, KC_F12, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_LBRC, KC_RBRC, KC_PSLS, KC_BSLS , + KC_NO, KC_INS, KC_LGUI, KC_LSFT, KC_SPC, KC_BSPC, KC_LALT, KC_ENT, KC_TRNS, KC_DOT, KC_PMNS, KC_EQL ), + + + /* + * ! @ # $ % || ^ & * ( ) + * DEL ESC || PGDN PGUP PSCR + * CAPS volup ENT reset || UP + * voldn super shift space bspc|| alt ent LEFT DOWN RGHT + */ + [_LOWER] = LAYOUT( /* [> LOWER <] */ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN , + KC_DELT, KC_ESC, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_PGUP, KC_PSCR, KC_NO, KC_NO, + KC_CAPS, KC_VOLU, KC_NO, KC_ENT, RESET, KC_NO, KC_NO, KC_NO, KC_UP, KC_NO , + KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_SPC, KC_BSPC, KC_LALT, KC_ENT, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT ) + +}; diff --git a/keyboards/numatreus/keymaps/hdbx/keymap.c b/keyboards/numatreus/keymaps/hdbx/keymap.c new file mode 100644 index 000000000000..98fe4d67d8c2 --- /dev/null +++ b/keyboards/numatreus/keymaps/hdbx/keymap.c @@ -0,0 +1,230 @@ +// WindowsでJIS配列として認識しているときに、オシャレなUS配列用キーキャップを使うためのキーマップです。 +// Google日本語入力の場合、以下のキー設定を行うとLower,Raiseのタップでそれぞれ半角入力と全角入力を切り替えできるようになります。 +// ・Henkan(入力文字なし/直接入力)に「IMEを有効化」を割り当て +// ・Muhenkan(入力文字なし/直接入力)に「IMEを無効化」を割り当て + +#include QMK_KEYBOARD_H +#include "keymap_jp.h" // qmk_firmware-master/quantum/keymap_extras/keymap_jp.h 日本語キーボード設定用 +#include // macro sendstring for jis keyboard マクロ文字列送信時に日本語キーボード設定での文字化け回避 + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY, + _HDBX, + _LOWER, + _RAISE, + _GAME, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + HDBX, + MCR1, // マクロ1 + MCR2, // マクロ2 + MCR3, // マクロ3 + MCR4, // マクロ4 + MCR5, // マクロ5 + WN_SCLN, // タップでJISの「:」 シフトでJISの「;」 (Windows) + DM_PLY1, + DM_PLY2, + DM_REC1, + DM_REC2, + DM_RSTP, +}; + +// Use Dynamic macro + +// Fillers to make layering more clear +#define LOWER LT(_LOWER, KC_MHEN) // タップで無変換 ホールドでLower +#define RAISE LT(_RAISE, KC_HENK) // タップで変換 ホールドでRaise +#define GUI_ESC GUI_T(KC_ESC) // タップでESC ホールドでGUI +#define SFT_BS SFT_T(KC_BSPC) // タップでBackSpace ホールドでSHIFT +#define CTL_ENT CTL_T(KC_ENT) // タップでEnter ホールドでCTRL +#define CTL_TAB CTL_T(KC_TAB) // タップでTAB ホールドでCTRL +#define SFT_DEL SFT_T(KC_DEL) // タップでDELETE ホールドでSHIFT +#define ALT_LBR ALT_T(JP_LBRC) // タップで[ ホールドでALT +#define SFT_RBR SFT_T(JP_RBRC) // タップで] ホールドでSHIFT +#define SFT_SPC S(KC_SPC) // Shift + Space +#define WN_CAPS S(KC_CAPS) // Caps Lock (Windows) +#define GAME TO(_GAME) // _GAMEレイヤーへ移動 +#define ADJUST TO(_ADJUST) // _ADJUSTレイヤーへ移動 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty配列 + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | Z | X | C | V | B | | N | M | , | . | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Alt/[ |WINESC| ~ |Sft/Bs|Lower |CtlEnt|Space |Raise |CtrlTb| - | ' |Sft/] | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, WN_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + ALT_LBR, GUI_ESC, JP_TILD, SFT_BS, LOWER, CTL_ENT, KC_SPC, RAISE, CTL_TAB, KC_MINS, JP_QUOT, SFT_RBR + ), + + /* HDBX配列 デフォルトレイヤーをこの配列にしたい場合は、AdjustレイヤーでK (Lower + Raise + K) + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | , | . | | Y | D | P | F | : | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | I | O | U | G | | M | N | T | R | S | + * |------+------+------+------+------| |------+------+------+------+------| + * | Z | X | C | V | B | | H | J | K | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Alt/[ |WINESC| ~ |Sft/Bs|Lower |CtlEnt|Space |Raise |CtrlTb| - | ' |Sft/] | + * `-----------------------------------------------------------------------------------' + */ + [_HDBX] = LAYOUT( + KC_Q, KC_W, KC_E, KC_COMM, KC_DOT, KC_Y, KC_D, KC_P, KC_F, WN_SCLN, + KC_A, KC_I, KC_O, KC_U, KC_G, KC_M, KC_N, KC_T, KC_R, KC_S, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_H, KC_J, KC_K, KC_L, KC_SLSH, + ALT_LBR, GUI_ESC, JP_TILD, SFT_BS, LOWER, CTL_ENT, KC_SPC, RAISE, CTL_TAB, KC_MINS, JP_QUOT, SFT_RBR + ), + + /* Lower + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | 7 | 8 | 9 | . | Bspc | + * |------+------+------+------+------| |------+------+------+------+------| + * | F6 | F7 | F8 | F9 | F10 | | 4 | 5 | 6 | + | * | + * |------+------+------+------+------| |------+------+------+------+------| + * |Zen/Ha|ScLock|Pause | F11 | F12 | | 1 | 2 | 3 | - | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Alt | WIN | ` |SftDel|Lower | Ctrl |SftSpc|Raise | 0 | , | = |Enter | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_7, KC_8, KC_9, KC_DOT, KC_BSPC, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_4, KC_5, KC_6, KC_PPLS, KC_PAST, + KC_ZKHK, KC_SLCK, KC_PAUS, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_PMNS, KC_PSLS, + KC_LALT, KC_LGUI, JP_GRV, SFT_DEL, _______, KC_LCTL, SFT_SPC, _______, KC_0, KC_COMM, JP_EQL, KC_ENT + ), + + /* Raise + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | Home | App | Ins | Calc |PrtScr| + * |------+------+------+------+------| |------+------+------+------+------| + * | ^ | & | * | \ | | | | Left | Down | Up |Right | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | ` | { | } | < | > | | End | Mute | ( | ) | ? | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Alt | WIN | ` | Del |Lower | Ctrl | Caps |Raise | Ctrl | _ | " |Shift | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( + KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, KC_HOME, KC_APP, KC_INS, KC_CALC, KC_PSCR, + JP_CIRC, JP_AMPR, JP_ASTR, JP_YEN, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, + JP_GRV, JP_LCBR, JP_RCBR, KC_LT, KC_GT, KC_END, KC_MUTE, JP_LPRN, JP_RPRN, KC_QUES, + KC_LALT, KC_LGUI, JP_GRV, KC_DEL, _______, KC_LCTL, WN_CAPS, _______, KC_RCTL, JP_UNDS, JP_DQT, KC_RSFT + ), + + /* GAME ゲームやテンキー固定で使用するレイヤーです。AdjustレイヤーでGを押下して遷移。戻るときはtoBaseから。 + * ,----------------------------------. ,----------------------------------. + * | Q | Up | E | R | T | | 7 | 8 | 9 | . | Bspc | + * |------+------+------+------+------| |------+------+------+------+------| + * | Left | Down |Right | F | G | | 4 | 5 | 6 | + | * | + * |------+------+------+------+------| |------+------+------+------+------| + * | Z | X | C | V | B | | 1 | 2 | 3 | - | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Alt | Esc | Tab |Shift |Space | Ctrl |toBase| \ | 0 | , | = |Enter | + * `-----------------------------------------------------------------------------------' + */ + [_GAME] = LAYOUT( + KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_7, KC_8, KC_9, KC_DOT, KC_BSPC, + KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_4, KC_5, KC_6, KC_PPLS, KC_PAST, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_1, KC_2, KC_3, KC_PMNS, KC_PSLS, + KC_LALT, KC_ESC, KC_TAB, KC_LSFT, KC_SPC, KC_LCTL, ADJUST, JP_YEN, KC_0, KC_COMM, JP_EQL, KC_ENT + ), + + /* Adjust (Lower + Raise) + * ,----------------------------------. ,----------------------------------. + * | MCR1 | MCR2 | MCR3 | MCR4 | MCR5 | |DyMcr1|DyMcr2|RcMcr1|RcMcr2|StpRec| + * |------+------+------+------+------| |------+------+------+------+------| + * | | | | |ToGAME| | |Qwerty| HDBX | | | + * |------+------+------+------+------| |------+------+------+------+------| + * | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |RESET | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + MCR1, MCR2, MCR3, MCR4, MCR5, DM_PLY1, DM_PLY2, DM_REC1, DM_REC2, DM_RSTP, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GAME, XXXXXXX, QWERTY, HDBX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RESET, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case HDBX: + if (record->event.pressed) { + set_single_persistent_default_layer(_HDBX); + } + return false; + break; + static bool lshift = false; + case WN_SCLN: // コロン「;:」 + if (record->event.pressed) { + lshift = get_mods() & MOD_BIT(KC_LSFT); + if (lshift) { + unregister_code(KC_LSFT); + tap_code(JP_SCLN); + } else { + tap_code(JP_SCLN); + } + } + return false; + break; + case MCR1: + if (record->event.pressed) { + SEND_STRING("0123456789"); // 送信文字列 + } + return false; + break; + case MCR2: + if (record->event.pressed) { + SEND_STRING("hogehoge\n"); // 送信文字列 + } + return false; + break; + case MCR3: + if (record->event.pressed) { + SEND_STRING("hoge@hoge.hoge"); // 送信文字列 + } + return false; + break; + case MCR4: + if (record->event.pressed) { + SEND_STRING("\"\""SS_TAP(X_LEFT)); // 送信文字列 + } + return false; + break; + case MCR5: + if (record->event.pressed) { + SEND_STRING("<>"SS_TAP(X_LEFT)); // 送信文字列 + } + return false; + break; + } + return true; +} diff --git a/keyboards/numatreus/keymaps/hdbx/rules.mk b/keyboards/numatreus/keymaps/hdbx/rules.mk new file mode 100644 index 000000000000..d4e78b385c2a --- /dev/null +++ b/keyboards/numatreus/keymaps/hdbx/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/numatreus/keymaps/like_jis/config.h b/keyboards/numatreus/keymaps/like_jis/config.h new file mode 100644 index 000000000000..961de83e42c6 --- /dev/null +++ b/keyboards/numatreus/keymaps/like_jis/config.h @@ -0,0 +1,59 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +// place overrides here + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 225 +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/numatreus/keymaps/like_jis/keymap.c b/keyboards/numatreus/keymaps/like_jis/keymap.c new file mode 100644 index 000000000000..eb9e9230d738 --- /dev/null +++ b/keyboards/numatreus/keymaps/like_jis/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _BASE = 0, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + NUMPAD, + KANJI, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +enum tapdances{ + TD_CODO = 0, + // TD_MNUB, +}; + +// Layer Mode aliases +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_ADJST ADJUST +#define KC_DLNP NUMPAD //DF(_NUMPAD) +#define KC_DLBS BASE //DF(_BASE) + +#define KC_ZSFT LSFT_T(KC_Z) +#define KC_MNSF LSFT_T(KC_MINS) +#define KC_ESCT LCTL_T(KC_ESC) +#define KC_TBAL LALT_T(KC_TAB) +#define KC_11SF LSFT_T(KC_F11) +#define KC_ALAP LALT_T(KC_APP) +#define KC_JEQL LSFT(KC_MINS) +#define KC_WLCK LALT(KC_L) +#define KC_SFEQ LSFT(KC_MINS) +#define KC_SFPL LSFT(KC_SCLN) +#define KC_SFAS LSFT(KC_QUOT) + +#define KC_CODO TD(TD_CODO) +// #define KC_MNUB TD(TD_MNUB) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), + // [TD_MNUB] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, LSFT(KC_RO)), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,----------------------------------. ,----------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|------+------+------+------+------| |------+------+------+------+------| + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + //|------+------+------+------+------| |------+------+------+------+------| + KC_ZSFT, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_CODO, KC_UP, KC_MNSF, + //|------+------+------+------+------|------+------+------+------+------+------+------| + KC_ESCT, KC_TBAL, KC_LGUI, KC_LOWER, KC_BSPC, KC_BSPC, KC_SPC, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_RGHT + //|------+------+------+------+-------------+------+------+------+------+------+------| + ), + + [_NUMPAD] = LAYOUT( + //,----------------------------------. ,----------------------------------. + KC_P7, KC_P8, KC_P9, KC_PAST, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PAST, KC_NLCK, + //|------+------+------+------+------| |------+------+------+------+------| + KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, + //|------+------+------+------+------| |------+------+------+------+------| + KC_P1, KC_P2, KC_P3, KC_PPLS, KC_QUOT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_QUOT, + //|------+------+------+------+------|------+------+------+------+------+------+------| + KC_DLBS, KC_P0, KC_PDOT, KC_SFEQ, KC_SPC, KC_DEL, KC_SPC, KC_DLBS, KC_P0, KC_PDOT, KC_SFEQ, KC_BSPC + //|------+------+------+------+-------------+------+------+------+------+------+------| + ), + + [_LOWER] = LAYOUT( + //,----------------------------------. ,----------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|------+------+------+------+------| |------+------+------+------+------| + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSLS, + //|------+------+------+------+------| |------+------+------+------+------| + KC_11SF, KC_F12, KC_DLNP, KANJI, KC_ENT, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, + //|------+------+------+------+------|------+------+------+------+------+------+------| + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + //|------+------+------+------+-------------+------+------+------+------+------+------| + ), + + [_RAISE] = LAYOUT( + //,----------------------------------. ,----------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|------+------+------+------+------| |------+------+------+------+------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_QUOT, KC_4, KC_5, KC_6, KC_MINS, + //|------+------+------+------+------| |------+------+------+------+------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PPLS, + //|------+------+------+------+------|------+------+------+------+------+------+------| + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WLCK, KC_TRNS, KC_0, KC_DOT, KC_JEQL + //|------+------+------+------+-------------+------+------+------+------+------+------| + ), + + [_ADJUST] = LAYOUT( + //,----------------------------------. ,----------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, KC_CAPS, XXXXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, + //|------+------+------+------+------| |------+------+------+------+------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_SLCK, XXXXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, + //|------+------+------+------+------| |------+------+------+------+------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NLCK, XXXXXXX, KC_BTN1, KC_BTN2, KC_MS_U, XXXXXXX, + //|------+------+------+------+------|------+------+------+------+------+------+------| + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R + //|------+------+------+------+-------------+------+------+------+------+------+------| + ) +}; + +#define L_BASE _BASE +#define L_NUMPAD (1<<_NUMPAD) + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case BASE: + if (record->event.pressed) { + default_layer_set(L_BASE); + } + break; + case NUMPAD: + if (record->event.pressed) { + default_layer_set(L_NUMPAD); + } + break; + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + tap_code16(A(KC_GRV)); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/numatreus/keymaps/like_jis/rules.mk b/keyboards/numatreus/keymaps/like_jis/rules.mk new file mode 100644 index 000000000000..959653f3f814 --- /dev/null +++ b/keyboards/numatreus/keymaps/like_jis/rules.mk @@ -0,0 +1,8 @@ +MOUSEKEY_ENABLE = yes +TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = yes +LED_ANIMATIONS = yes + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif diff --git a/keyboards/numatreus/keymaps/yohewi/keymap.c b/keyboards/numatreus/keymaps/yohewi/keymap.c new file mode 100644 index 000000000000..8027a972e4c9 --- /dev/null +++ b/keyboards/numatreus/keymaps/yohewi/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layer_number { + _QWERTY, + _LOWER, + _RAISE, +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + LOWER, + RAISE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * q w e r t || y u i o p + * a s d f g || h j k l ; + * z x c v b || n m , . \ + * esc tab ctl lw spc bspc|| GRV ent RS / alt - + */ + + [_QWERTY] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , + SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_BSLS) , + KC_ESC, KC_TAB, KC_LCTL, MO(_LOWER), KC_SPC, KC_BSPC, LALT(KC_GRV), KC_ENT, MO(_RAISE), KC_DOT, KC_RALT, KC_MINS ), + + + /* + * 1 2 3 4 5 || 6 7 8 9 0 + * # < > = - || _ + ENT + * [ ] ( ) & || ` . UP \ + * TRANS TRANS TRANS TRANS TRANS TRANS|| TRANS TRANS RS LEFT DPWM RGHT + */ + [_RAISE] = LAYOUT( /* [> RAISE <] */ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 , + KC_HASH, KC_LABK, KC_RABK, KC_EQL, KC_MINS, KC_UNDS, KC_PLUS, KC_TRNS, KC_TRNS, KC_ENT , + KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_TRNS, KC_DOT, KC_UP, KC_BSLS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT ), + + /* + * ! @ # $ % || ^ & * ( ) + * F1 F2 F3 F4 F5 || F6 F7 F8 F9 F10 + * F11 F12 reset || , UP \ + * TRNS TRNS TRNS TRNS TRNS TRNS||TRNS TRNS TRNS LEFT DPWM RGHT + */ + + [_LOWER] = LAYOUT( /* [> LOWER <] */ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN , + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_F11, KC_F12, KC_NO, KC_NO, RESET, KC_TRNS, KC_TRNS, KC_QUOT, KC_UP, KC_BSLS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, TO(_QWERTY), KC_LEFT, KC_DOWN, KC_RGHT ) +}; diff --git a/keyboards/numatreus/numatreus.c b/keyboards/numatreus/numatreus.c new file mode 100644 index 000000000000..0338210e86bd --- /dev/null +++ b/keyboards/numatreus/numatreus.c @@ -0,0 +1 @@ +#include "numatreus.h" \ No newline at end of file diff --git a/keyboards/numatreus/numatreus.h b/keyboards/numatreus/numatreus.h new file mode 100644 index 000000000000..6ec56504ab74 --- /dev/null +++ b/keyboards/numatreus/numatreus.h @@ -0,0 +1,20 @@ +#pragma once + +#include "quantum.h" + + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \ +} diff --git a/keyboards/numatreus/readme.md b/keyboards/numatreus/readme.md new file mode 100644 index 000000000000..e945c31467fe --- /dev/null +++ b/keyboards/numatreus/readme.md @@ -0,0 +1,13 @@ +# NumAtreus + +A small mechanical keyboard that is based around the shape of the human hand. + +* Keyboard Maintainer: yohewi(yohewi@gmail.com) +* Hardware Supported: NumAtreus, PCB +* Hardware Availability: [Case Data](https://github.com/yohewi/NumAtreuscase) + +Make example for this keyboard (after setting up your build environment): + + make numatreus:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/numatreus/rules.mk b/keyboards/numatreus/rules.mk new file mode 100644 index 000000000000..f1efe4cc5eb3 --- /dev/null +++ b/keyboards/numatreus/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +#BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +#MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = yes # Unicode +#BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +#TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = no +LED_ANIMATIONS = no + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From 480a391929de9e66d36c84df900c49297c7dfec0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 26 Jan 2020 07:43:43 +1100 Subject: [PATCH 125/331] [Keyboard] Daisy refactor (#7985) --- keyboards/daisy/config.h | 129 ++++++++++++++---- keyboards/daisy/daisy.c | 46 +++++-- keyboards/daisy/daisy.h | 58 ++++++-- keyboards/daisy/info.json | 117 ++++++++++++++-- keyboards/daisy/keymaps/default/keymap.c | 159 ++++++++++------------ keyboards/daisy/keymaps/default/readme.md | 6 +- keyboards/daisy/readme.md | 28 +--- keyboards/daisy/rules.mk | 28 ++-- 8 files changed, 385 insertions(+), 186 deletions(-) diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index 567a215a6c79..4ee4d242fc04 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h @@ -1,13 +1,29 @@ -#ifndef CONFIG_H -#define CONFIG_H +/* +Copyright 2020 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x1209 -#define PRODUCT_ID 0x2328 -#define DEVICE_VER 0x501 -#define MANUFACTURER K.T.E.C. +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x7169 +#define DEVICE_VER 0x0501 +#define MANUFACTURER KTEC #define PRODUCT Daisy #define DESCRIPTION qmk port for Daisy @@ -32,22 +48,59 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + #define BACKLIGHT_PIN D0 +// #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 6 +#define RGB_DI_PIN C7 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 8 +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 25 +# define RGBLIGHT_VAL_STEP 12 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +# define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + /* * Force NKRO * @@ -81,6 +134,10 @@ * */ +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -90,8 +147,8 @@ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH //#define MAGIC_KEY_DEBUG D //#define MAGIC_KEY_DEBUG_MATRIX X //#define MAGIC_KEY_DEBUG_KBD K @@ -99,9 +156,8 @@ //#define MAGIC_KEY_VERSION V //#define MAGIC_KEY_STATUS S //#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE //#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE //#define MAGIC_KEY_LAYER1 1 //#define MAGIC_KEY_LAYER2 2 //#define MAGIC_KEY_LAYER3 3 @@ -111,9 +167,11 @@ //#define MAGIC_KEY_LAYER7 7 //#define MAGIC_KEY_LAYER8 8 //#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC //#define MAGIC_KEY_LOCK CAPS //#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE //#define MAGIC_KEY_NKRO N //#define MAGIC_KEY_SLEEP_LED Z @@ -132,17 +190,12 @@ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -// ws2812 options -#define RGB_DI_PIN C7 // pin the DI on the ws2812 is hooked-up to -#define RGBLIGHT_ANIMATIONS // run RGB animations -#define RGBLED_NUM 8 // number of LEDs -#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue -#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation -#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif /* * MIDI options */ @@ -166,4 +219,34 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line #endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/daisy/daisy.c b/keyboards/daisy/daisy.c index f8ca24ff0b9a..4e365ed46213 100644 --- a/keyboards/daisy/daisy.c +++ b/keyboards/daisy/daisy.c @@ -1,15 +1,35 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "daisy.h" -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (usb_led & (1<. + */ + +#pragma once #include "quantum.h" +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ - K30, K31, K32, K34, K35, K37, K38, K39 \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \ - { K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K30, K31, K32, K34, K35, K37, K38, K39 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \ + { K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \ } -#endif +#define LAYOUT_625_space( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K30, K31, K32, K35, K38, K39 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \ + { K30, K31, K32, KC_NO, KC_NO, K35, KC_NO, KC_NO, K38, K39, K3A } \ +} diff --git a/keyboards/daisy/info.json b/keyboards/daisy/info.json index 40057579322f..fcc7cd9faf46 100644 --- a/keyboards/daisy/info.json +++ b/keyboards/daisy/info.json @@ -1,18 +1,107 @@ { - "keyboard_name": "Daisy", - "url": "", - "maintainer": "qmk", - "width": 12, - "height": 4, - "layouts": { - "LAYOUT": { - "key_count": 42, - "layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3, "w": 1.25}, {"label": "K34", "x": 3.5, "y": 3, "w": 2.25}, {"label": "K35", "x": 5.75, "y": 3, "w": 2.75}, {"label": "K37", "x": 8.5, "y": 3, "w": 1.25}, {"label": "K38", "x": 9.75, "y": 3}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}] - }, + "keyboard_name": "Daisy", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 42, + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, - "LAYOUT_625_space": { - "key_count": 40, - "layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3}, {"x": 3.25, "y": 3, "w": 6.25}, {"label": "K38", "x": 9.5, "y": 3, "w": 1.25}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}] + {"x": 0, "y": 1, "w": 1.25}, + {"x": 1.25, "y": 1}, + {"x": 2.25, "y": 1}, + {"x": 3.25, "y": 1}, + {"x": 4.25, "y": 1}, + {"x": 5.25, "y": 1}, + {"x": 6.25, "y": 1}, + {"x": 7.25, "y": 1}, + {"x": 8.25, "y": 1}, + {"x": 9.25, "y": 1}, + {"x": 10.25, "y": 1, "w": 1.75}, + + {"x": 0, "y": 2, "w": 1.75}, + {"x": 1.75, "y": 2}, + {"x": 2.75, "y": 2}, + {"x": 3.75, "y": 2}, + {"x": 4.75, "y": 2}, + {"x": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2, "w": 1.25}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3, "w": 1.25}, + {"x": 3.5, "y": 3, "w": 2.25}, + {"x": 5.75, "y": 3, "w": 2.75}, + {"x": 8.5, "y": 3, "w": 1.25}, + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3, "w": 1.25} + ] + }, + "LAYOUT_625_space": { + "key_count": 40, + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + + {"x": 0, "y": 1, "w": 1.25}, + {"x": 1.25, "y": 1}, + {"x": 2.25, "y": 1}, + {"x": 3.25, "y": 1}, + {"x": 4.25, "y": 1}, + {"x": 5.25, "y": 1}, + {"x": 6.25, "y": 1}, + {"x": 7.25, "y": 1}, + {"x": 8.25, "y": 1}, + {"x": 9.25, "y": 1}, + {"x": 10.25, "y": 1, "w": 1.75}, + + {"x": 0, "y": 2, "w": 1.75}, + {"x": 1.75, "y": 2}, + {"x": 2.75, "y": 2}, + {"x": 3.75, "y": 2}, + {"x": 4.75, "y": 2}, + {"x": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2, "w": 1.25}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3, "w": 6.25}, + {"x": 9.5, "y": 3, "w": 1.25}, + {"x": 10.75, "y": 3, "w": 1.25} + ] + } } - } } diff --git a/keyboards/daisy/keymaps/default/keymap.c b/keyboards/daisy/keymaps/default/keymap.c index adc3298d0604..f07680376643 100644 --- a/keyboards/daisy/keymaps/default/keymap.c +++ b/keyboards/daisy/keymaps/default/keymap.c @@ -1,92 +1,83 @@ -#include QMK_KEYBOARD_H - +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ -// Layer shorthand -#define _BL 0 -#define _LW 1 -#define _RS 2 +#include QMK_KEYBOARD_H -enum layer_keycodes { - QWERTY = SAFE_RANGE, LOWER, RAISE +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BL, + _LW, + _RS }; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Base Layer - * .-----------------------------------------------------------------------. - * | ESC | Q | W | E | R | T | Y | U | I | O | P | \| | - * |-----------------------------------------------------------------------| - * | TAB | A | S | D | F | G | H | J | K | L | ENTER | - * |-----------------------------------------------------------------------| - * | LSHIFT | Z | X | C | V | B | N | M | ,< | .> | /? | - * |-----------------------------------------------------------------------| - * | LCTRL | LGUI | LALT | SPACE | BACKSPACE | LW | RS | RALT | - * '-----------------------------------------------------------------------' - */ - [_BL] = LAYOUT( - GRAVE_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT - ), +#define LOWER MO(_LW) +#define RAISE MO(_RS) - /* Function Layer - * .-----------------------------------------------------------------------. - * | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -_ | - * |-----------------------------------------------------------------------| - * | | =+ | UP | | | | [{ | ]} | ;: | '" | | - * |-----------------------------------------------------------------------| - * | | LEFT| DOWN |RIGHT| | | | | | | | - * |-----------------------------------------------------------------------| - * | | | | | DELETE | | | | - * '-----------------------------------------------------------------------' - */ - - [_LW] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TRNS, KC_EQL, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS - ), - - /* Second Function Layer - * .-----------------------------------------------------------------------. - * | RST | F1 | F2 | F3 | F4 | F5 | F6 | | HOME| PGUP| | | - * |-----------------------------------------------------------------------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | END | PGDN| | - * |-----------------------------------------------------------------------| - * | |RGBtog|RGBmod|RGBhud|RGBhui|RGBvad|RGBvai|RGBsad|RGBsai|BL| | - * |-----------------------------------------------------------------------| - * | | | | | | | | | - * '-----------------------------------------------------------------------' - */ - [_RS] = LAYOUT( - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, - KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_END, KC_PGDN, KC_TRNS, - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │  / │ + * ├────┬─┴─┬─┴──┬┴───┴───┼───┴───┴──┬┴───┼───┼────┤ + * │Ctrl│GUI│Alt │        │ Backspace│Lowr│Rse│ Alt│ + * └────┴───┴────┴────────┴──────────┴────┴───┴────┘ + */ + [_BL] = LAYOUT( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT + ), -}; + /* Function Layer 1 (Lower) + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ + * └───┴┬──┴┬──┴┬──┴───┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴───┘ + * │    │ = │ ▴ │   │   │   │ [ │ ] │ ; │ ' │      │ + * ├────└─┬─┴─┬─┴─┬───┐─┴─┬─└───┴───┴───┴───┘─┬────┤ + * │      │ ◂ │ ▾ │ ▸ │   │   │   │   │   │   │    │ + * ├────┬─└───┴───┴───┘───┌──────────┐┴───┼───┼────┤ + * │    │   │    │        │   Delete │    │   │    │ + * └────┴───┴────┴────────└──────────┘────┴───┴────┘ + */ + [_LW] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + _______, KC_EQL, KC_UP, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______ + ), -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LOWER: - if(record->event.pressed){ - layer_on(_LW); - } else { - layer_off(_LW); - } - return false; - break; - case RAISE: - if(record->event.pressed){ - layer_on(_RS); - } else { - layer_off(_RS); - } - return false; - break; - } - return true; + /* Function Layer 2 (Raise) + * ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐ + * │Rst│F1 │F2 │F3 │F4 │F5 │F6 │   │Hom│PgU│   │   │ + * └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤ + * │    │F7 │F8 │F9 │F10│F11│F12│   │ ; │ ' │      │ + * ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤ + * │      │RGB│Mod│HuD│HuI│VaD│VaI│SaD│SaI│BLS│    │ + * ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤ + * │    │   │    │        │          │    │   │    │ + * └────┴───┴────┴────────┴──────────┴────┴───┴────┘ + */ + [_RS] = LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) }; diff --git a/keyboards/daisy/keymaps/default/readme.md b/keyboards/daisy/keymaps/default/readme.md index dff0dcbdeefb..b8c7d17f2855 100644 --- a/keyboards/daisy/keymaps/default/readme.md +++ b/keyboards/daisy/keymaps/default/readme.md @@ -1,5 +1 @@ -![Daisy Layout Image](https://imgur.com/9mSF0yf) - -# Default Daisy Layout - -This is the default layout as offered by KPRepublic's TMK firmware for the Daisy with a few minor tweaks for usability made by me. +# The default keymap for Daisy diff --git a/keyboards/daisy/readme.md b/keyboards/daisy/readme.md index c8175c28303b..a8a93bf79127 100644 --- a/keyboards/daisy/readme.md +++ b/keyboards/daisy/readme.md @@ -1,29 +1,15 @@ # Daisy -A 40% keyboard kit sold by KPRepublic. +![Daisy PCB](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1Pj1UggMPMeJjy1Xcq6xpppXa7_1024x1024.jpg) -Keyboard Maintainer: westfoxtrot (https://github.com/westfoxtrot) -Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2 -Hardware Availability: http://tinyurl.com/yc26lq22 +A 40% keyboard kit sold by KPrepublic. + +* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) +* Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2 +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/daisy-40-custom-keyboard-pcb) Make example for this keyboard (after setting up your build environment): make daisy:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. - - -# Other Keymaps - -The "default" keymap included is the layout I personally use on the Daisy and the one I have found the most comfortable. - -A printable picture showing this layout is available here: https://imgur.com/9mSF0yf - - -``` -$ make daisy:[default|] -``` - -# Bootloader - -I personally had issues with the bootloader on my Daisy PCB and was unable to flash a firmware to the board after the first time. I replaced the bootloader with the one available in the repository at ../../util/bootloader_atmega32u4_1_0_0.hex +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/daisy/rules.mk b/keyboards/daisy/rules.mk index d2b0d7d16728..c82fa9bc6781 100644 --- a/keyboards/daisy/rules.mk +++ b/keyboards/daisy/rules.mk @@ -11,20 +11,22 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# Build Options +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From e9ffc5347690ad2212d7217e406fb6018ed17079 Mon Sep 17 00:00:00 2001 From: George Harris Date: Sat, 25 Jan 2020 22:35:39 +0100 Subject: [PATCH 126/331] Fix unaligned access with LTO (#7801) Forces 4 byte alignment for USB input & output buffers to prevent unaligned accesses by chibios with LTO enabled --- tmk_core/protocol/chibios/usb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 9981477a5808..2617c73c19f7 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -227,8 +227,8 @@ typedef struct { .in_size = stream##_EPSIZE, \ .out_size = stream##_EPSIZE, \ .fixed_size = fixedsize, \ - .ib = (uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \ - .ob = (uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \ + .ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \ + .ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \ } \ } From 09370a95dbc95334fe7335478b108e1a844a2578 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 25 Jan 2020 22:04:42 +0000 Subject: [PATCH 127/331] format code according to conventions [skip ci] --- tmk_core/protocol/chibios/usb_main.c | 106 +++++++++++++-------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 2617c73c19f7..dd701f661e90 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -175,61 +175,61 @@ typedef struct { } usb_driver_config_t; /* Reusable initialization structure - see USBEndpointConfig comment at top of file */ -#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \ - { \ - .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \ - .in_ep_config = \ - { \ - stream##_IN_MODE, /* Interrupt EP */ \ - NULL, /* SETUP packet notification callback */ \ - qmkusbDataTransmitted, /* IN notification callback */ \ - NULL, /* OUT notification callback */ \ - stream##_EPSIZE, /* IN maximum packet size */ \ - 0, /* OUT maximum packet size */ \ - NULL, /* IN Endpoint state */ \ - NULL, /* OUT endpoint state */ \ - 2, /* IN multiplier */ \ - NULL /* SETUP buffer (not a SETUP endpoint) */ \ - }, \ - .out_ep_config = \ - { \ - stream##_OUT_MODE, /* Interrupt EP */ \ - NULL, /* SETUP packet notification callback */ \ - NULL, /* IN notification callback */ \ - qmkusbDataReceived, /* OUT notification callback */ \ - 0, /* IN maximum packet size */ \ - stream##_EPSIZE, /* OUT maximum packet size */ \ - NULL, /* IN Endpoint state */ \ - NULL, /* OUT endpoint state */ \ - 2, /* IN multiplier */ \ - NULL, /* SETUP buffer (not a SETUP endpoint) */ \ - }, \ - .int_ep_config = \ - { \ - USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \ - NULL, /* SETUP packet notification callback */ \ - qmkusbInterruptTransmitted, /* IN notification callback */ \ - NULL, /* OUT notification callback */ \ - CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \ - 0, /* OUT maximum packet size */ \ - NULL, /* IN Endpoint state */ \ - NULL, /* OUT endpoint state */ \ - 2, /* IN multiplier */ \ - NULL, /* SETUP buffer (not a SETUP endpoint) */ \ - }, \ - .config = { \ - .usbp = &USB_DRIVER, \ - .bulk_in = stream##_IN_EPNUM, \ - .bulk_out = stream##_OUT_EPNUM, \ - .int_in = notification, \ - .in_buffers = stream##_IN_CAPACITY, \ - .out_buffers = stream##_OUT_CAPACITY, \ - .in_size = stream##_EPSIZE, \ - .out_size = stream##_EPSIZE, \ - .fixed_size = fixedsize, \ +#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \ + { \ + .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \ + .in_ep_config = \ + { \ + stream##_IN_MODE, /* Interrupt EP */ \ + NULL, /* SETUP packet notification callback */ \ + qmkusbDataTransmitted, /* IN notification callback */ \ + NULL, /* OUT notification callback */ \ + stream##_EPSIZE, /* IN maximum packet size */ \ + 0, /* OUT maximum packet size */ \ + NULL, /* IN Endpoint state */ \ + NULL, /* OUT endpoint state */ \ + 2, /* IN multiplier */ \ + NULL /* SETUP buffer (not a SETUP endpoint) */ \ + }, \ + .out_ep_config = \ + { \ + stream##_OUT_MODE, /* Interrupt EP */ \ + NULL, /* SETUP packet notification callback */ \ + NULL, /* IN notification callback */ \ + qmkusbDataReceived, /* OUT notification callback */ \ + 0, /* IN maximum packet size */ \ + stream##_EPSIZE, /* OUT maximum packet size */ \ + NULL, /* IN Endpoint state */ \ + NULL, /* OUT endpoint state */ \ + 2, /* IN multiplier */ \ + NULL, /* SETUP buffer (not a SETUP endpoint) */ \ + }, \ + .int_ep_config = \ + { \ + USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \ + NULL, /* SETUP packet notification callback */ \ + qmkusbInterruptTransmitted, /* IN notification callback */ \ + NULL, /* OUT notification callback */ \ + CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \ + 0, /* OUT maximum packet size */ \ + NULL, /* IN Endpoint state */ \ + NULL, /* OUT endpoint state */ \ + 2, /* IN multiplier */ \ + NULL, /* SETUP buffer (not a SETUP endpoint) */ \ + }, \ + .config = { \ + .usbp = &USB_DRIVER, \ + .bulk_in = stream##_IN_EPNUM, \ + .bulk_out = stream##_OUT_EPNUM, \ + .int_in = notification, \ + .in_buffers = stream##_IN_CAPACITY, \ + .out_buffers = stream##_OUT_CAPACITY, \ + .in_size = stream##_EPSIZE, \ + .out_size = stream##_EPSIZE, \ + .fixed_size = fixedsize, \ .ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \ .ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \ - } \ + } \ } typedef struct { From 9ff61601e31585b924a3b3ff3738a30c520acc65 Mon Sep 17 00:00:00 2001 From: Lucas Moreira Date: Sat, 25 Jan 2020 17:43:57 -0500 Subject: [PATCH 128/331] [Keymap] crkbd/kidbrazil adding layer dependent RGB & better idle timeout. (#7901) * Added KidBrazil custom keymap for CRKBD -Custom Font -Custom OLED output * Added missing readme * Oled Timeout Update for KidBrazil Keymap (#1) * Setup Oled timeout based on simple timer * Cleaned up comments and added timeout for LEDs * Fixed some small errors * Updated oled timout with matrix scan * Updated oled timout with matrix scan * Update withou eeprom * Update timer code * Use process user instead of keymap * Added ifdef to protect oledtimer * Updated with half timeout state for logo * Removed middle tier timer * Final cleanup of unused files * Updated code as per suggestions & requests * Second round of revisions * Updated keymap to better handle LED timeout - Added boolean to hold LED state - Added init function to set rgb to known state - Modified RGB_TOG to work with noeeprom commands * Finished adding the timeout for OLED and testing on CRKBD * Updated documentation * fixed the timeout logic so it works as intended * Added initial limits to color settings * Added layer reset as part of the iddle timeout process * Split Keymap into more manageable files * Finalizing RGB Layer status on CRKBD - Refactored OLED timeout to deal only with oled - If user remains iddle on game layer for too long it will switch to default - LED / OLED iddle working - Minor changes to _SYM layer - Removed some rgb controls from keyboard due to layer dependent RGB colors * Update keyboards/crkbd/keymaps/kidbrazil/keymap.c Used suggestion from Drashna to replace EEPROM_RESET with shorter version. Co-Authored-By: Drashna Jaelre * Update keyboards/crkbd/keymaps/kidbrazil/keymap.c Co-Authored-By: Drashna Jaelre * Implemented drashna's comment Co-authored-by: Drashna Jaelre --- keyboards/crkbd/keymaps/kidbrazil/config.h | 99 ++++++++------ keyboards/crkbd/keymaps/kidbrazil/enums.h | 10 ++ keyboards/crkbd/keymaps/kidbrazil/keymap.c | 149 ++++++++------------- keyboards/crkbd/keymaps/kidbrazil/layer.c | 69 ++++++++++ keyboards/crkbd/keymaps/kidbrazil/layer.h | 9 ++ keyboards/crkbd/keymaps/kidbrazil/rules.mk | 9 +- 6 files changed, 204 insertions(+), 141 deletions(-) create mode 100644 keyboards/crkbd/keymaps/kidbrazil/enums.h create mode 100644 keyboards/crkbd/keymaps/kidbrazil/layer.c create mode 100644 keyboards/crkbd/keymaps/kidbrazil/layer.h diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h index dd3f1a0307c4..6dc468c590a6 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/config.h +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -52,49 +52,64 @@ along with this program. If not, see . #endif #ifdef RGB_MATRIX_ENABLE -//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) -// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. -# define RGB_MATRIX_HUE_STEP 8 -# define RGB_MATRIX_SAT_STEP 8 -# define RGB_MATRIX_VAL_STEP 8 -# define RGB_MATRIX_SPD_STEP 10 + //# define RGB_MATRIX_KEYPRESSES // reacts to keypresses + // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) + // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects + #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) + // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. + #define RGB_MATRIX_HUE_STEP 4 + #define RGB_MATRIX_SAT_STEP 4 + #define RGB_MATRIX_VAL_STEP 4 + #define RGB_MATRIX_SPD_STEP 10 -/* Disable the animations you don't want/need. You will need to disable a good number of these * - * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// # define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + /* Disable the animations you don't want/need. You will need to disable a good number of these * + * because they take up a lot of space. Disable until you can successfully compile your firmware. */ + #define DISABLE_RGB_MATRIX_ALPHAS_MODS + #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define DISABLE_RGB_MATRIX_BREATHING + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define DISABLE_RGB_MATRIX_BAND_SAT + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define DISABLE_RGB_MATRIX_BAND_VAL + #define DISABLE_RGB_MATRIX_CYCLE_ALL + #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL + #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define DISABLE_RGB_MATRIX_DUAL_BEACON + #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH + #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH #endif +// Custom Font path #define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c" #define OLED_DISABLE_TIMEOUT diff --git a/keyboards/crkbd/keymaps/kidbrazil/enums.h b/keyboards/crkbd/keymaps/kidbrazil/enums.h new file mode 100644 index 000000000000..ec1a67925f42 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/enums.h @@ -0,0 +1,10 @@ +// [CRKBD layers Init] -------------------------------------------------------// +typedef enum { + _QWERTY, + _NUM, + _SYM, + _GAME, + _WEAPON +}CRKBD_LAYERS; + +extern enum CRKBD_LAYERS crkbd_layers; diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c index 44142d4f2fe9..9c950e537349 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/keymap.c +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -1,4 +1,6 @@ #include QMK_KEYBOARD_H +#include "enums.h" +#include "layer.h" // [Init Variables] ----------------------------------------------------------// extern uint8_t is_master; @@ -9,15 +11,6 @@ bool user_led_enabled = true; // Boolean to store the master LED clear so it only runs once. bool master_oled_cleared = false; -// [CRKBD layers Init] -------------------------------------------------------// -enum crkbd_layers { - _QWERTY, - _NUM, - _SYM, - _GAME, - _WEAPON -}; - // [Keymaps] -----------------------------------------------------------------// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( @@ -36,8 +29,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SYM] = LAYOUT( KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - LSFT_T(KC_TAB), RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, - KC_LCTL, RGB_VAD, RGB_RMOD, RGB_HUD, RGB_SAD, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, + LSFT_T(KC_TAB), RGB_TOG, KC_MPLY, KC_MUTE, KC_VOLU, KC_VOLD, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, + KC_LCTL, KC_CALC, KC_MYCM, KC_MPRV, KC_MNXT, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN) ), @@ -51,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_WEAPON] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_TRNS, KC_TAB, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS ) }; @@ -61,23 +54,24 @@ void keyboard_post_init_user(void) { // Set RGB to known state rgb_matrix_enable_noeeprom(); rgb_matrix_set_color_all(RGB_GREEN); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); user_led_enabled = true; - } // [Process User Input] ------------------------------------------------------// bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { + // Handle RGB Changes sans eeprom - necessary due to the layer dependent RGB color + // changes in marrix_scan_user case RGB_TOG: - if (record->event.pressed) { - // Toggle matrix on key press - user_led_enabled ? rgb_matrix_disable_noeeprom() : rgb_matrix_enable_noeeprom(); - } else { - // Flip User_led_enabled variable on key release - user_led_enabled = !user_led_enabled; - } - return false; // Skip all further processing of this key + if (record->event.pressed) { + // Toggle matrix on key press + user_led_enabled ? rgb_matrix_disable_noeeprom() : rgb_matrix_enable_noeeprom(); + // Toggle boolean flag + user_led_enabled = !user_led_enabled; + } + return false; default: - // Use process_record_keymap to reset timer on all other keypresses + // Use process_record_keymap to reset timer on all other keypresses to awaken from idle. if (record->event.pressed) { #ifdef OLED_DRIVER_ENABLE oled_timer = timer_read32(); @@ -91,9 +85,47 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } +// [Matrix Scan] ------------------------------------------------------------// +void matrix_scan_user(void) { + // Iddle timer to return to default layer if left on game layer + if (timer_elapsed32(oled_timer) > 380000 && timer_elapsed32(oled_timer) < 479999) { + // Reset layer in case it got left on _GAME + // This prevents the issue where the master side sometimes wont switch off as expected + // in the next step. + if (get_highest_layer(layer_state) == _GAME) { + layer_off(_GAME); + layer_on(_QWERTY); + } + return; + } + // Timeout to turn off LEDs + else if (timer_elapsed32(oled_timer) > 480000) { + rgb_matrix_disable_noeeprom(); + return; + } + // Set RGB Matrix color based on layers + if (user_led_enabled) { + switch (get_highest_layer(layer_state)){ + case _GAME: + rgb_matrix_set_color_all(RGB_PURPLE); + break; + case _NUM: + case _SYM: + case _QWERTY: + rgb_matrix_set_color_all(RGB_GREEN); + break; + default: + rgb_matrix_set_color_all(RGB_GREEN); + break; + + } + } else { + rgb_matrix_disable_noeeprom(); + return; + } +} // [OLED Configuration] ------------------------------------------------------// #ifdef OLED_DRIVER_ENABLE - // Init Oled and Rotate.... oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!has_usb()) @@ -105,74 +137,6 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { const char *read_logo(void); // {OLED helpers} -----------------------------------------------// - -// Render Blank Space -void render_space(void) { - oled_write_ln_P(PSTR(" "), false); -} - -// Render separator lines for oled display -void render_separator(void) { - switch (get_highest_layer(layer_state)){ - case _GAME: - case _WEAPON: - oled_write_ln_P(PSTR("===================="), false); - break; - default: - oled_write_ln_P(PSTR("++++++++++++++++++++"), false); - } -} - -// Render current layer state -void render_layer_state(void){ - // If you want to change the display of OLED, you need to change here - switch (get_highest_layer(layer_state)){ - case _QWERTY: - oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false); - break; - case _NUM: - oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false); - break; - case _SYM: - oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false); - break; - case _GAME: - oled_write_ln_P(PSTR("| G A M E ]"), false); - break; - case _WEAPON: - oled_write_ln_P(PSTR("| W E A P O N ]"), false); - break; - default: - oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false); - } -} - -// Render USB State -void render_usb_state(void) { - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - oled_write_ln_P(PSTR("| USB | FREE ]"), false); - break; - case DEVICE_STATE_Suspended: - oled_write_ln_P(PSTR("| USB | SLEEP ]"), false); - break; - case DEVICE_STATE_Configured: - oled_write_ln_P(PSTR("| USB | READY ]"), false); - break; - case DEVICE_STATE_Powered: - oled_write_ln_P(PSTR("| USB | PWRD ]"), false); - break; - case DEVICE_STATE_Default: - oled_write_ln_P(PSTR("| USB | DFLT ]"), false); - break; - case DEVICE_STATE_Addressed: - oled_write_ln_P(PSTR("| USB | ADDRS ]"), false); - break; - default: - oled_write_ln_P(PSTR("| USB | INVALID ]"), false); - } -} - // Render Logo void render_logo(void) { oled_write(read_logo(), false); @@ -209,7 +173,8 @@ void render_slave_oled(void) { // {OLED Task} -----------------------------------------------// void oled_task_user(void) { - if (timer_elapsed32(oled_timer) > 80000 && timer_elapsed32(oled_timer) < 479999) { + // First time out switches to logo as first indication of iddle. + if (timer_elapsed32(oled_timer) > 100000 && timer_elapsed32(oled_timer) < 479999) { // Render logo on both halves before full timeout if (is_master && !master_oled_cleared) { // Clear master OLED once so the logo renders properly diff --git a/keyboards/crkbd/keymaps/kidbrazil/layer.c b/keyboards/crkbd/keymaps/kidbrazil/layer.c new file mode 100644 index 000000000000..bd04f3b88322 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/layer.c @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H +#include "enums.h" + +// Render Blank Space +void render_space(void) { + oled_write_ln_P(PSTR(" "), false); +} + +// Render separator lines for oled display +void render_separator(void) { + switch (get_highest_layer(layer_state)){ + case _GAME: + case _WEAPON: + oled_write_ln_P(PSTR("===================="), false); + break; + default: + oled_write_ln_P(PSTR("++++++++++++++++++++"), false); + } +} + +// Render current layer state +void render_layer_state(void){ + // If you want to change the display of OLED, you need to change here + switch (get_highest_layer(layer_state)){ + case _QWERTY: + oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false); + break; + case _NUM: + oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false); + break; + case _SYM: + oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false); + break; + case _GAME: + oled_write_ln_P(PSTR("| G A M E ]"), false); + break; + case _WEAPON: + oled_write_ln_P(PSTR("| W E A P O N ]"), false); + break; + default: + oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false); + } +} + +// Render USB State +void render_usb_state(void) { + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + oled_write_ln_P(PSTR("| USB | FREE ]"), false); + break; + case DEVICE_STATE_Suspended: + oled_write_ln_P(PSTR("| USB | SLEEP ]"), false); + break; + case DEVICE_STATE_Configured: + oled_write_ln_P(PSTR("| USB | READY ]"), false); + break; + case DEVICE_STATE_Powered: + oled_write_ln_P(PSTR("| USB | PWRD ]"), false); + break; + case DEVICE_STATE_Default: + oled_write_ln_P(PSTR("| USB | DFLT ]"), false); + break; + case DEVICE_STATE_Addressed: + oled_write_ln_P(PSTR("| USB | ADDRS ]"), false); + break; + default: + oled_write_ln_P(PSTR("| USB | INVALID ]"), false); + } +} diff --git a/keyboards/crkbd/keymaps/kidbrazil/layer.h b/keyboards/crkbd/keymaps/kidbrazil/layer.h new file mode 100644 index 000000000000..2134e6ddab0d --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/layer.h @@ -0,0 +1,9 @@ +// [OLED Helpers] ----------------------------------------------------// +// Render empty space on OLED +void render_space(void); +// Render separator characters for rows +void render_separator(void); +// Render layer state +void render_layer_state(void); +// Render USB State +void render_usb_state(void); diff --git a/keyboards/crkbd/keymaps/kidbrazil/rules.mk b/keyboards/crkbd/keymaps/kidbrazil/rules.mk index ad03b86bfcfa..244712cd0386 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/rules.mk +++ b/keyboards/crkbd/keymaps/kidbrazil/rules.mk @@ -8,10 +8,5 @@ RGB_MATRIX_ENABLE = WS2812 OLED_DRIVER_ENABLE = yes # If you want to change the display of OLED, you need to change here -SRC += ./keyboards/crkbd/keymaps/kidbrazil/logo_reader.c \ - #./lib/rgb_state_reader.c \ - #./lib/logo_reader.c \ - #./lib/keylogger.c \ - # ./lib/mode_icon_reader.c \ - # ./lib/host_led_state_reader.c \ - # ./lib/timelogger.c \ +SRC += logo_reader.c \ + layer.c From d603e94f6814bdd8fc0d4e87dce9abec0a9cef37 Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 25 Jan 2020 13:53:24 -0800 Subject: [PATCH 129/331] add Breaking Change PR Instructions doc --- docs/_summary.md | 1 + docs/breaking_changes_instructions.md | 36 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 docs/breaking_changes_instructions.md diff --git a/docs/_summary.md b/docs/_summary.md index 08ccdca22055..254409dd3ea1 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -18,6 +18,7 @@ * [Getting Help](getting_started_getting_help.md) * [Breaking Changes](breaking_changes.md) + * [Breaking Changes Instructions](breaking_changes_instructions.md) * [2019 Aug 30](ChangeLog/20190830.md) * [FAQ](faq.md) diff --git a/docs/breaking_changes_instructions.md b/docs/breaking_changes_instructions.md new file mode 100644 index 000000000000..d264884c05cf --- /dev/null +++ b/docs/breaking_changes_instructions.md @@ -0,0 +1,36 @@ +# Breaking Changes: My Pull Request Was Flagged + +A QMK member may have replied to your pull request stating that your submission is a breaking change. In their judgment, the changes you have proposed have greater implications for either QMK, or its users. + +Some things that may cause a pull request to be flagged are: + +- **Edits to User Keymaps** + A user may submit their keymap to QMK, then some time later open a pull request with further updates, only to find it can't be merged because it was edited in the `qmk/qmk_firmware` repository. As not all users are proficient at using Git or GitHub, the user may find themself unable to fix the issue on their own. +- **Changes to Expected Behavior** + Changes to QMK behavior may cause users to believe their hardware or QMK is broken if they flash new firmware that incorporates changes to existing QMK features, and find themselves without a means to restore the desired behavior. +- **Changes Requiring User Action** + Changes may also require action to be taken by users, such as updating a toolchain or taking some action in Git. +- **Changes Necessitating Increased Scrutiny** + On occasion, a submission may have implications for QMK as a project. This could be copyright/licensing issues, coding conventions, large feature overhauls, "high-risk" changes that need wider testing by our community, or something else entirely. + +## What Do I Do? + +If it is determined that your submission is a breaking change, there are a few things you can do to smooth the process: + +### Contribute a ChangeLog Entry + +We require submissions that go through the Breaking Change process to include a changelog entry. The entry should be a short summary of the changes your pull request makes – [each section here started as a changelog](ChangeLog/20190830.md "n.b. This should link to the 2019 Aug 30 Breaking Changes doc - @noroadsleft"). + +Your changelog should be located at `docs/ChangeLog/YYYYMMDD/PR####.md`, where `YYYYMMDD` is the date on which QMK's breaking change branch – usually named `future` – will be merged into the `master` branch, and `####` is the number of your pull request. + +If your submission requires action on the part of users, your changelog should instruct users what action(s) must be taken, or link to a location that does so. + +### Document Your Changes + +Understanding the purpose for your submission, and possible implications or actions it will require can make the review process more straightforward. A changelog may suffice for this purpose, but more extensive changes may require a level of detail that is ill-suited for a changelog. + +Commenting on your pull request and being responsive to questions, comments, and change requests is much appreciated. + +### Ask for Help + +Having your submission flagged may have caught you off guard. If you find yourself intimidated or overwhelmed, let us know. Comment on your pull request, or [reach out to the QMK team on Discord](https://discord.gg/Uq7gcHh). From d0d106cef75b4121374020fca633e8fc2628cef0 Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 25 Jan 2020 14:03:26 -0800 Subject: [PATCH 130/331] change Instructions listing in Docs summary --- docs/_summary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_summary.md b/docs/_summary.md index 254409dd3ea1..a429138b8fbe 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -18,7 +18,7 @@ * [Getting Help](getting_started_getting_help.md) * [Breaking Changes](breaking_changes.md) - * [Breaking Changes Instructions](breaking_changes_instructions.md) + * [My Pull Request Was Flagged](breaking_changes_instructions.md) * [2019 Aug 30](ChangeLog/20190830.md) * [FAQ](faq.md) From 72d7661b30d139077087dac723efb3582dc1011e Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 25 Jan 2020 16:07:08 -0800 Subject: [PATCH 131/331] suggestions by skullydazed --- docs/breaking_changes_instructions.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/breaking_changes_instructions.md b/docs/breaking_changes_instructions.md index d264884c05cf..3f2f93834f6c 100644 --- a/docs/breaking_changes_instructions.md +++ b/docs/breaking_changes_instructions.md @@ -12,11 +12,17 @@ Some things that may cause a pull request to be flagged are: Changes may also require action to be taken by users, such as updating a toolchain or taking some action in Git. - **Changes Necessitating Increased Scrutiny** On occasion, a submission may have implications for QMK as a project. This could be copyright/licensing issues, coding conventions, large feature overhauls, "high-risk" changes that need wider testing by our community, or something else entirely. +- **Changes Requiring Communication to End Users** + This includes warnings about future deprecations, outdated practices, and anything else that needs to be communicated but doesn't fit into one of the above categories. ## What Do I Do? If it is determined that your submission is a breaking change, there are a few things you can do to smooth the process: +### Consider Splitting Up Your PR + +If you are contributing core code, and the only reason it needs to go through breaking changes is that you are updating keymaps to match your change, consider whether you can submit your feature in a way that the old keymaps continue to work. Then submit a separate PR that goes through the breaking changes process to remove the old code. + ### Contribute a ChangeLog Entry We require submissions that go through the Breaking Change process to include a changelog entry. The entry should be a short summary of the changes your pull request makes – [each section here started as a changelog](ChangeLog/20190830.md "n.b. This should link to the 2019 Aug 30 Breaking Changes doc - @noroadsleft"). From 7f7b6b08e8afdd09f83b180e4c03b04f9a531035 Mon Sep 17 00:00:00 2001 From: yiancar Date: Sun, 26 Jan 2020 07:05:22 +0000 Subject: [PATCH 132/331] [Keyboard] Initial commit for mc76k (#8000) * Initial commit for mc76k * Update config.h --- keyboards/mc_76k/config.h | 104 +++++++++++++++++++++ keyboards/mc_76k/info.json | 12 +++ keyboards/mc_76k/keymaps/default/keymap.c | 50 ++++++++++ keyboards/mc_76k/keymaps/default/readme.md | 5 + keyboards/mc_76k/keymaps/via/keymap.c | 50 ++++++++++ keyboards/mc_76k/keymaps/via/readme.md | 1 + keyboards/mc_76k/keymaps/via/rules.mk | 1 + keyboards/mc_76k/mc_76k.c | 34 +++++++ keyboards/mc_76k/mc_76k.h | 46 +++++++++ keyboards/mc_76k/readme.md | 15 +++ keyboards/mc_76k/rules.mk | 32 +++++++ 11 files changed, 350 insertions(+) create mode 100644 keyboards/mc_76k/config.h create mode 100644 keyboards/mc_76k/info.json create mode 100644 keyboards/mc_76k/keymaps/default/keymap.c create mode 100644 keyboards/mc_76k/keymaps/default/readme.md create mode 100644 keyboards/mc_76k/keymaps/via/keymap.c create mode 100644 keyboards/mc_76k/keymaps/via/readme.md create mode 100644 keyboards/mc_76k/keymaps/via/rules.mk create mode 100644 keyboards/mc_76k/mc_76k.c create mode 100644 keyboards/mc_76k/mc_76k.h create mode 100644 keyboards/mc_76k/readme.md create mode 100644 keyboards/mc_76k/rules.mk diff --git a/keyboards/mc_76k/config.h b/keyboards/mc_76k/config.h new file mode 100644 index 000000000000..cccd6a8e933f --- /dev/null +++ b/keyboards/mc_76k/config.h @@ -0,0 +1,104 @@ +/* +Copyright 2020 Yiancar-Designs + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4D43 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT MC-76K +#define DESCRIPTION O-Ring suspended 60% with F-row keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { C7, C6, B6, B0, D1, D0 } +#define MATRIX_COL_PINS { D5, D3, D4, B1, D6, D7, B4, B5, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif diff --git a/keyboards/mc_76k/info.json b/keyboards/mc_76k/info.json new file mode 100644 index 000000000000..482caa1c4855 --- /dev/null +++ b/keyboards/mc_76k/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "mc_76k", + "url": "www.yiancar-designs.com", + "maintainer": "Yiancar", + "width": 15, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"F13", "x":14, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5}, {"label":"Delete", "x":14, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Backspace", "x":13.5, "y":2.5, "w":1.5}, {"label":"Ctrl", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"Fn", "x":14, "y":4.5}, {"label":"Caps Lock", "x":0, "y":5.5, "w":1.5}, {"label":"Win", "x":1.5, "y":5.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Win", "x":12.5, "y":5.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/mc_76k/keymaps/default/keymap.c b/keyboards/mc_76k/keymaps/default/keymap.c new file mode 100644 index 000000000000..bf572d3c6ed4 --- /dev/null +++ b/keyboards/mc_76k/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Yiancar-Designs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL), + + [1] = LAYOUT_all( /* FN1 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/mc_76k/keymaps/default/readme.md b/keyboards/mc_76k/keymaps/default/readme.md new file mode 100644 index 000000000000..cfca7e7ec623 --- /dev/null +++ b/keyboards/mc_76k/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The default keymap for MC-76K + +![DEFAULT](https://i.imgur.com/GzUITtG.png) + +![FN1](https://i.imgur.com/ytnKmxg.png) \ No newline at end of file diff --git a/keyboards/mc_76k/keymaps/via/keymap.c b/keyboards/mc_76k/keymaps/via/keymap.c new file mode 100644 index 000000000000..bf572d3c6ed4 --- /dev/null +++ b/keyboards/mc_76k/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Yiancar-Designs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL), + + [1] = LAYOUT_all( /* FN1 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/mc_76k/keymaps/via/readme.md b/keyboards/mc_76k/keymaps/via/readme.md new file mode 100644 index 000000000000..b82bc8e79f9c --- /dev/null +++ b/keyboards/mc_76k/keymaps/via/readme.md @@ -0,0 +1 @@ +# Compile with this keymap to use VIA diff --git a/keyboards/mc_76k/keymaps/via/rules.mk b/keyboards/mc_76k/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mc_76k/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mc_76k/mc_76k.c b/keyboards/mc_76k/mc_76k.c new file mode 100644 index 000000000000..0ca4c80ba4a3 --- /dev/null +++ b/keyboards/mc_76k/mc_76k.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Yiancar-Designs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "mc_76k.h" + +void keyboard_pre_init_kb (void) { + setPinOutput(D2); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(D2, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/mc_76k/mc_76k.h b/keyboards/mc_76k/mc_76k.h new file mode 100644 index 000000000000..6b9a5e961719 --- /dev/null +++ b/keyboards/mc_76k/mc_76k.h @@ -0,0 +1,46 @@ +/* Copyright 2020 Yiancar-Designs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define XXX KC_NO + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K3C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, \ + K50, K52, K53, K57, K5B, K5C, K5D \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \ + { K50, XXX, K52, K53, XXX, XXX, XXX, K57, XXX, XXX, XXX, K5B, K5C, K5D } \ +} diff --git a/keyboards/mc_76k/readme.md b/keyboards/mc_76k/readme.md new file mode 100644 index 000000000000..be9b5c5ec69c --- /dev/null +++ b/keyboards/mc_76k/readme.md @@ -0,0 +1,15 @@ +# MC-76K + +![mc_76k](https://geekhack.org/index.php?action=dlattach;topic=101040.0;attach=220476;image) + +O-Ring suspended 60% with F-row keyboard + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +* Hardware Supported: ATmega32U4 +* Hardware Availability: GB run by [mustcode](https://www.reddit.com/user/mustcode). More info on [geekhack](https://geekhack.org/index.php?topic=101040.50) + +Make example for this keyboard (after setting up your build environment): + + make mc_76k:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mc_76k/rules.mk b/keyboards/mc_76k/rules.mk new file mode 100644 index 000000000000..5f109c654b70 --- /dev/null +++ b/keyboards/mc_76k/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 645c5fabf24411fe65d2172a3509c26e053651a2 Mon Sep 17 00:00:00 2001 From: Jumail Mundekkat Date: Mon, 27 Jan 2020 09:06:56 +1100 Subject: [PATCH 133/331] Add VIA support to MxSS, plus minor tweaks (#7809) * Add VIA support to mxss and general cleanup * Add support for RGB test for FLEDs * Add LAYOUT_all to allow for more configuration * Remove blank layers * Updated readme * Improve use of EEPROM * Credit where its due * Use the latest iteration of rgblight code * Keep the RGB timer running if the front LED is in RGB mode * Fix RGB breathing animation * Better supported RGB animation Only thing not working is alternating, but that's not too important * Abstract front LED handlers from main kb code * Add support for indicator LED color changing * Remove debug statement * Persist indicator LED colors * Mark custom sections in rgblight.c * Light commenting * Fix up keymaps * Add/update comments * Remove bloat from default hex * Tidy a stray tab * Out with the old, in with the new * Out with the old, in with the new * Add LAYER_STATE_8BIT for VIA keymap --- keyboards/mxss/config.h | 13 +- keyboards/mxss/keymaps/default/keymap.c | 19 +- keyboards/mxss/keymaps/via/config.h | 19 + keyboards/mxss/keymaps/via/keymap.c | 33 + keyboards/mxss/keymaps/via/rules.mk | 1 + keyboards/mxss/mxss.c | 205 +-- keyboards/mxss/mxss.h | 19 +- keyboards/mxss/mxss_frontled.c | 264 ++++ keyboards/mxss/mxss_frontled.h | 57 +- keyboards/mxss/readme.md | 7 +- keyboards/mxss/rgblight.c | 1628 ++++++++++++++--------- keyboards/mxss/rgblight.h | 362 +++-- keyboards/mxss/rules.mk | 6 +- keyboards/mxss/templates/keymap.c | 19 +- 14 files changed, 1687 insertions(+), 965 deletions(-) create mode 100644 keyboards/mxss/keymaps/via/config.h create mode 100644 keyboards/mxss/keymaps/via/keymap.c create mode 100644 keyboards/mxss/keymaps/via/rules.mk create mode 100644 keyboards/mxss/mxss_frontled.c diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h index 812f301d6fe4..264caec970a5 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -21,12 +21,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4D78 // "Mx" -> MxBlue +#define PRODUCT_ID 0x5353 // "SS" -> MxSS #define DEVICE_VER 0x0001 #define MANUFACTURER MxBlue #define PRODUCT MxSS -#define DESCRIPTION Custom Polycarb Keyboard +#define DESCRIPTION MxSS Polycarb Keyboard /* key matrix size */ #define MATRIX_ROWS 5 @@ -56,6 +56,13 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +// Just for posterity, define bootlite matrix pos +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +// FLED config takes up 1 byte, stored color count takes 1, stored colors take up to 8 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 10 + /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. * This is userful for the Windows task manager shortcut (ctrl+shift+esc). */ diff --git a/keyboards/mxss/keymaps/default/keymap.c b/keyboards/mxss/keymaps/default/keymap.c index 17cebe0c8f9a..b69d91df9d0c 100644 --- a/keyboards/mxss/keymaps/default/keymap.c +++ b/keyboards/mxss/keymaps/default/keymap.c @@ -15,31 +15,32 @@ */ #include QMK_KEYBOARD_H +hs_set caps_color = { .hue = 0, .sat = 255 }; + // Colors for layers // Format: {hue, saturation} // {0, 0} to turn off the LED // Add additional rows to handle more layers -const hs_set layer_colors[] = { - [0] = {0, 0}, // Color for Layer 0 - [1] = {86, 255}, // Color for Layer 1 - [2] = {36, 255}, // Color for Layer 2 - [3] = {185, 255}, // Color for Layer 3 +hs_set layer_colors[4] = { + [0] = {.hue = 0, .sat = 0}, // Color for Layer 0 + [1] = {.hue = 86, .sat = 255}, // Color for Layer 1 + [2] = {.hue = 36, .sat = 255}, // Color for Layer 2 + [3] = {.hue = 185, .sat = 255}, // Color for Layer 3 }; -const size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t); +size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t); // Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control enum custom_keycodes { - MY_KEYCODE = NEW_SAFE_RANGE, + MY_KEYCODE = NEW_SAFE_RANGE, }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( /* Base */ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), LAYOUT( /* L1 */ diff --git a/keyboards/mxss/keymaps/via/config.h b/keyboards/mxss/keymaps/via/config.h new file mode 100644 index 000000000000..7451a7be4f3c --- /dev/null +++ b/keyboards/mxss/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Jumail Mundekkat / MxBlue + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define LAYER_STATE_8BIT diff --git a/keyboards/mxss/keymaps/via/keymap.c b/keyboards/mxss/keymaps/via/keymap.c new file mode 100644 index 000000000000..34e40592a67a --- /dev/null +++ b/keyboards/mxss/keymaps/via/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2018 Jumail Mundekkat / MxBlue + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_all( /* L0 */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, KC_PGUP, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + LAYOUT_all( /* L1 */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PSCR, FLED_VAD, FLED_VAI, FLED_MOD, RGB_VAI, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_MOD, RGB_SAI, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI + ) +}; diff --git a/keyboards/mxss/keymaps/via/rules.mk b/keyboards/mxss/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mxss/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mxss/mxss.c b/keyboards/mxss/mxss.c index 42ecdbc4693b..48ea46641944 100644 --- a/keyboards/mxss/mxss.c +++ b/keyboards/mxss/mxss.c @@ -1,4 +1,4 @@ -/* Copyright 2018 Jumail Mundekkat / MxBlue +/* Copyright 2020 Jumail Mundekkat / MxBlue * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,63 +12,29 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . + * + * EEPROM management code from ../cannonkeys/stm32f072/keyboard.c */ - + #include QMK_KEYBOARD_H #include "tmk_core/common/eeprom.h" #include "tmk_core/common/action_layer.h" #include "rgblight.h" +#include "via.h" +#include "version.h" // for QMK_BUILDDATE used in EEPROM magic -// Variables for controlling front LED application -uint8_t fled_mode; // Mode for front LEDs -uint8_t fled_val; // Brightness for front leds (0 - 255) -LED_TYPE fleds[2]; // Front LED rgb values for indicator mode use - -// Predefined colors for layers -// Format: {hue, saturation} -// {0, 0} to turn off the LED -// Add additional rows to handle more layers -__attribute__ ((weak)) -const hs_set layer_colors[] = { - [0] = {0, 0}, // Color for Layer 0 - [1] = {86, 255}, // Color for Layer 1 - [2] = {36, 255}, // Color for Layer 2 - [3] = {185, 255}, // Color for Layer 3 -}; - -__attribute__ ((weak)) -const size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t); +void via_init_kb(void) { + fled_init(); +} void matrix_init_kb(void) { - // If EEPROM config exists, load it - if (eeprom_is_valid()) { - fled_config fled_conf; - fled_conf.raw = eeprom_read_byte(EEPROM_FRONTLED_ADDR); - fled_mode = fled_conf.mode; - fled_val = fled_conf.val * FLED_VAL_STEP; - // Else, default config - } else { - fled_mode = FLED_RGB; - fled_val = 10 * FLED_VAL_STEP; - eeprom_update_conf(); // Store default config to EEPROM - } - - // Set default values for leds - setrgb(0, 0, 0, &fleds[0]); - setrgb(0, 0, 0, &fleds[1]); - - // Handle lighting for indicator mode - if (fled_mode == FLED_INDI) { - // Enable capslock led if enabled on host - if (host_keyboard_leds() & (1<event.pressed) - fled_mode_cycle(); - break; - - case FLED_VAI: // Increase the brightness of the front LEDs by FLED_VAL_STEP - if (record->event.pressed) - fled_val_increase(); - break; - - case FLED_VAD: // Decrease the brightness of the front LEDs by FLED_VAL_STEP - if (record->event.pressed) - fled_val_decrease(); - break; - - default: - break; // Process all other keycodes normally - } - + process_record_fled(keycode, record); return process_record_user(keycode, record); } -void led_set_kb(uint8_t usb_led) { - // Set indicator LED appropriately, whether it is used or not - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - sethsv(FLED_CAPS_H, FLED_CAPS_S, fled_val, &fleds[0]); - } else { - setrgb(0, 0, 0, &fleds[0]); - } - - rgblight_set(); - led_set_user(usb_led); -} - -uint32_t layer_state_set_kb(uint32_t state) { - // Determine and set colour of layer LED according to current layer - // if hue = sat = 0, leave LED off - uint8_t layer = biton32(state); - - if (layer < lc_size && !(layer_colors[layer].hue == 0 && layer_colors[layer].hue == 0)) - sethsv(layer_colors[layer].hue, layer_colors[layer].sat, fled_val, &fleds[1]); - else - setrgb(0, 0, 0, &fleds[1]); - - return state; -} - -// EEPROM Management - -// Test if magic value is present at expected location -bool eeprom_is_valid(void) -{ - return (eeprom_read_word(EEPROM_MAGIC_ADDR) == EEPROM_MAGIC); -} - -// Set magic value at expected location -void eeprom_set_valid(bool valid) -{ - eeprom_update_word(EEPROM_MAGIC_ADDR, valid ? EEPROM_MAGIC : 0xFFFF); +bool led_update_kb(led_t led_state) { + fled_lock_update(led_state); + return led_update_user(led_state); } -// Store current front led config in EEPROM -void eeprom_update_conf(void) -{ - // Create storage struct and set values - fled_config conf; - conf.mode = fled_mode; - - // Small hack to ensure max value is stored correctly - if (fled_val == 255) - conf.val = 256 / FLED_VAL_STEP; - else - conf.val = fled_val / FLED_VAL_STEP; - - // Set magic value and store config - eeprom_set_valid(true); - eeprom_update_byte(EEPROM_FRONTLED_ADDR, conf.raw); +layer_state_t layer_state_set_kb(layer_state_t state) { + fled_layer_update(state); + return layer_state_set_user(state); } -// Custom keycode functions +// Fallback eeprom functions if VIA is not enabled +#ifndef VIA_ENABLE -void fled_mode_cycle(void) +// Sets VIA/keyboard level usage of EEPROM to valid/invalid +// Keyboard level code (eg. via_init_kb()) should not call this +void via_eeprom_set_valid(bool valid) { - // FLED -> FLED_RGB -> FLED_INDI - switch (fled_mode) { - case FLED_OFF: - fled_mode = FLED_RGB; - break; - - case FLED_RGB: - fled_mode = FLED_INDI; - break; - - case FLED_INDI: - fled_mode = FLED_OFF; - break; - } - - // Update stored config - eeprom_update_conf(); - rgblight_set(); + char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" + uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); + uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); + uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); + + eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF); + eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF); + eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF); } -void fled_val_increase(void) -{ - // Increase val by FLED_VAL_STEP, handling the upper edge case - if (fled_val + FLED_VAL_STEP > 255) - fled_val = 255; - else - fled_val += FLED_VAL_STEP; - - // Update stored config - eeprom_update_conf(); - rgblight_set(); -} - -void fled_val_decrease(void) -{ - // Decrease val by FLED_VAL_STEP, handling the lower edge case - if (fled_val - FLED_VAL_STEP > 255) - fled_val = 255; - else - fled_val -= FLED_VAL_STEP; - - // Update stored config - eeprom_update_conf(); - rgblight_set(); -} +#endif diff --git a/keyboards/mxss/mxss.h b/keyboards/mxss/mxss.h index 3572a19cdb57..4074d411cce5 100644 --- a/keyboards/mxss/mxss.h +++ b/keyboards/mxss/mxss.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef MXSS_H -#define MXSS_H +#pragma once #include "quantum.h" #include "mxss_frontled.h" @@ -204,4 +203,18 @@ { k40, k41, k42, k43, KC_NO, KC_NO, k46, KC_NO, k48, KC_NO, k4A, k4B, k4C, k4D, k4E }, \ } -#endif +// All the gubs +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k46, k48, k4A, k4B, k4C, k4D, k4E \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, KC_NO, KC_NO, k46, KC_NO, k48, KC_NO, k4A, k4B, k4C, k4D, k4E }, \ +} diff --git a/keyboards/mxss/mxss_frontled.c b/keyboards/mxss/mxss_frontled.c new file mode 100644 index 000000000000..3f19747d283f --- /dev/null +++ b/keyboards/mxss/mxss_frontled.c @@ -0,0 +1,264 @@ +/* Copyright 2020 Jumail Mundekkat / MxBlue + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Extended from the work done by fcoury: https://github.com/qmk/qmk_firmware/pull/4915 + */ + +#include "mxss_frontled.h" +#include "tmk_core/common/eeprom.h" +#include "rgblight.h" +#include "via.h" +#include "version.h" // for QMK_BUILDDATE used in EEPROM magic + +// Variables for controlling front LED application +uint8_t fled_mode; // Mode for front LEDs +uint8_t fled_val; // Brightness for front leds (0 - 255) +LED_TYPE fleds[2]; // Front LED rgb values for indicator mode use + +// Layer indicator colors +__attribute__ ((weak)) +hs_set layer_colors[FRONTLED_COLOR_MAXCNT]; + +// Caps lock indicator color +__attribute__ ((weak)) +hs_set caps_color; + +__attribute__ ((weak)) +size_t lc_size = sizeof(layer_colors) / sizeof(hs_set); + +void fled_init(void) { + // If EEPROM config exists, load it + // If VIA EEPROM exists, FLED config should too + if (via_eeprom_is_valid()) { + fled_load_conf(); + // Else, default config + } else { + // Default mode/brightness + fled_mode = FLED_RGB; + fled_val = 10 * FLED_VAL_STEP; + + // Default colors + caps_color.hue = 0; + caps_color.sat = 255; + layer_colors[0].hue = 0; + layer_colors[0].sat = 0; + layer_colors[1].hue = 86; + layer_colors[1].sat = 255; + layer_colors[2].hue = 36; + layer_colors[2].sat = 255; + layer_colors[3].hue = 185; + layer_colors[3].sat = 255; + + fled_update_conf(); // Store default config to EEPROM + } + + // Set default values for leds + setrgb(0, 0, 0, &fleds[0]); + setrgb(0, 0, 0, &fleds[1]); + + // Handle lighting for indicator mode + if (fled_mode == FLED_INDI) { + fled_lock_update(host_keyboard_led_state()); + fled_layer_update(layer_state); + } +} + +void process_record_fled(uint16_t keycode, keyrecord_t *record) { + // Handle custom keycodes for front LED operation + switch (keycode) { + case FLED_MOD: // Change between front LED operation modes (off, indicator, RGB) + if (record->event.pressed) + fled_mode_cycle(); + break; + + case FLED_VAI: // Increase the brightness of the front LEDs by FLED_VAL_STEP + if (record->event.pressed) + fled_val_increase(); + break; + + case FLED_VAD: // Decrease the brightness of the front LEDs by FLED_VAL_STEP + if (record->event.pressed) + fled_val_decrease(); + break; + + default: + break; // Process all other keycodes normally + } + + return; +} + +void fled_load_conf(void) { + // Load config + fled_config fled_conf; + fled_conf.raw = eeprom_read_byte(FRONTLED_CONF_ADDR); + fled_mode = fled_conf.mode; + fled_val = fled_conf.val * FLED_VAL_STEP; + + // Load color data + uint8_t stored_cnt = eeprom_read_byte(FRONTLED_COLOR_CNT_ADDR); + uint16_t *color_ptr = FRONTLED_COLOR_ADDR; + caps_color.raw = eeprom_read_word(color_ptr); // Should always store at least 1 color + for (uint8_t i = 1; i < stored_cnt; i++) { + if (i == lc_size) // Can't load more layers than we have available + break; + layer_colors[i].raw = eeprom_read_word(&color_ptr[i]); + } + layer_colors[0].raw = 0; // hue = sat = 0 for layer 0 +} + +// Store current front led config in EEPROM +void fled_update_conf(void) +{ + // Create storage struct and set values + fled_config conf; + conf.mode = fled_mode; + + // Small hack to ensure max value is stored correctly + if (fled_val == 255) + conf.val = 256 / FLED_VAL_STEP; + else + conf.val = fled_val / FLED_VAL_STEP; + + // Store config + eeprom_update_byte(FRONTLED_CONF_ADDR, conf.raw); + + // Store color data + uint16_t *color_ptr = FRONTLED_COLOR_ADDR; + eeprom_update_word(color_ptr, caps_color.raw); + // Start from 1, layer 0 is not modifiable and therefore not persisted + uint8_t i = 1; + for (; i < lc_size; i++) { + if (i == FRONTLED_COLOR_MAXCNT) // Can't store more than the EEPROM we have available + break; + eeprom_update_word(&color_ptr[i], layer_colors[i].raw); + } + eeprom_update_byte(FRONTLED_COLOR_CNT_ADDR, i); // For safety, store the count of colors stored +} + +// Custom keycode functions + +void fled_mode_cycle(void) +{ + // FLED -> FLED_RGB -> FLED_INDI + switch (fled_mode) { + case FLED_OFF: + fled_mode = FLED_RGB; + rgblight_timer_enable(); + break; + + case FLED_RGB: + fled_mode = FLED_INDI; + break; + + case FLED_INDI: + fled_mode = FLED_OFF; + break; + } + + // Update stored config + fled_update_conf(); + rgblight_set(); +} + +void fled_val_increase(void) +{ + // Increase val by FLED_VAL_STEP, handling the upper edge case + if (fled_val + FLED_VAL_STEP > 255) + fled_val = 255; + else + fled_val += FLED_VAL_STEP; + + // Update stored config + fled_update_conf(); + rgblight_set(); +} + +void fled_val_decrease(void) +{ + // Decrease val by FLED_VAL_STEP, handling the lower edge case + if (fled_val - FLED_VAL_STEP > 255) + fled_val = 255; + else + fled_val -= FLED_VAL_STEP; + + // Update stored config + fled_update_conf(); + rgblight_set(); +} + +void fled_layer_update(layer_state_t state) { + // Determine and set colour of layer LED according to current layer + // if hue = sat = 0, leave LED off + uint8_t layer = get_highest_layer(state); + + if (layer < lc_size && !(layer_colors[layer].hue == 0 && layer_colors[layer].sat == 0)) { + sethsv(layer_colors[layer].hue, layer_colors[layer].sat, fled_val, &fleds[1]); + } else { + setrgb(0, 0, 0, &fleds[1]); + } +} + +void fled_lock_update(led_t led_state) { + // Set indicator LED appropriately, whether it is used or not + if (led_state.caps_lock) { + sethsv(caps_color.hue, caps_color.sat, fled_val, &fleds[0]); + } else { + setrgb(0, 0, 0, &fleds[0]); + } + + rgblight_set(); +} + +void set_fled_layer_color(uint8_t layer, hs_set hs) { + // Update layer colors and refresh LEDs + layer_colors[layer] = hs; + fled_layer_update(layer_state); + fled_update_conf(); +} + +hs_set get_fled_layer_color(uint8_t layer) { + return layer_colors[layer]; +} + +void set_fled_caps_color(hs_set hs) { + // Update caplock color and refresh LEDs + caps_color = hs; + fled_lock_update(host_keyboard_led_state()); + fled_update_conf(); +} + +hs_set get_fled_caps_color(void) { + return caps_color; +} + +// Fallback eeprom functions if VIA is not enabled +#ifndef VIA_ENABLE + +// Can be called in an overriding via_init_kb() to test if keyboard level code usage of +// EEPROM is invalid and use/save defaults. +bool via_eeprom_is_valid(void) +{ + char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" + uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); + uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); + uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); + + return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 && + eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 && + eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 ); +} + +#endif diff --git a/keyboards/mxss/mxss_frontled.h b/keyboards/mxss/mxss_frontled.h index 1350266ba987..366066865592 100644 --- a/keyboards/mxss/mxss_frontled.h +++ b/keyboards/mxss/mxss_frontled.h @@ -1,4 +1,4 @@ -/* Copyright 2018 Jumail Mundekkat / MxBlue +/* Copyright 2020 Jumail Mundekkat / MxBlue * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,11 +16,12 @@ // EEPROM management code taken from Wilba6582 // https://github.com/Wilba6582/qmk_firmware/blob/zeal60/keyboards/zeal60/zeal_eeprom.h - -#ifndef MXSS_FRONTLED_H -#define MXSS_FRONTLED_H +#pragma once + +#include "quantum.h" #include "quantum_keycodes.h" +#include "via.h" // RGBLED index for front LEDs #define RGBLIGHT_FLED1 14 @@ -29,13 +30,13 @@ // Brightness increase step for front LEDs #define FLED_VAL_STEP 8 -// QMK never uses more then 32bytes of EEPROM, so our region starts there -// Magic value to verify the state of the EEPROM -#define EEPROM_MAGIC 0xC3E7 -#define EEPROM_MAGIC_ADDR ((void*)32) - // Front LED settings -#define EEPROM_FRONTLED_ADDR ((void*)34) +#define FRONTLED_CONF_ADDR ((uint8_t*) VIA_EEPROM_CUSTOM_CONFIG_ADDR) +#define FRONTLED_COLOR_CNT_ADDR (FRONTLED_CONF_ADDR + 1) +#define FRONTLED_COLOR_ADDR ((uint16_t*)(FRONTLED_COLOR_CNT_ADDR + 1)) + +// No point persisting more 4, VIA only allows editing of 3 + 1 for caps +#define FRONTLED_COLOR_MAXCNT 4 // Modes for front LEDs #define FLED_OFF 0b00 @@ -43,10 +44,6 @@ #define FLED_RGB 0b10 #define FLED_UNDEF 0b11 -// Hard-coded color for capslock indicator in FLED_INDI mode, H:0% S:100% = Red -#define FLED_CAPS_H 0 -#define FLED_CAPS_S 255 - // Config storage format for EEPROM typedef union { uint8_t raw; @@ -57,25 +54,35 @@ typedef union { } fled_config; // Structure to store hue and saturation values -typedef struct _hs_set { - uint16_t hue; - uint8_t sat; +typedef union { + uint16_t raw; + struct { + uint8_t hue; + uint8_t sat; + }; } hs_set; // Custom keycodes for front LED control enum fled_keycodes { - FLED_MOD = SAFE_RANGE, - FLED_VAI, - FLED_VAD, - NEW_SAFE_RANGE // define a new safe range + FLED_MOD = USER00, // USER00 = VIA custom keycode start + FLED_VAI, + FLED_VAD, + NEW_SAFE_RANGE // define a new safe range }; -bool eeprom_is_valid(void); // Check if EEPROM has been set up -void eeprom_set_valid(bool valid); // Change validity state of EEPROM -void eeprom_update_conf(void); // Store current front LED config to EEPROM +void fled_init(void); // Run init functions for front LEDs +void process_record_fled(uint16_t keycode, keyrecord_t* record); // Process keycodes for front LEDs +void fled_load_conf(void); // Load front LED config from EEPROM +void fled_update_conf(void); // Store current front LED config to EEPROM void fled_mode_cycle(void); // Cycle between the 3 modes for the front LEDs void fled_val_increase(void); // Increase the brightness of the front LEDs void fled_val_decrease(void); // Decrease the brightness of the front LEDs -#endif //MXSS_FRONTLED_H \ No newline at end of file +void fled_layer_update(layer_state_t state); // Process layer update for front LEDs +void fled_lock_update(led_t led_state); // Process lock update for front LEDs + +void set_fled_layer_color(uint8_t layer, hs_set hs); // Set color for a given layer +void set_fled_caps_color(hs_set hs); // Set color for the capslock indicator +hs_set get_fled_caps_color(void); // Get color for the capslock indicator +hs_set get_fled_layer_color(uint8_t layer); // Get color for a given layer diff --git a/keyboards/mxss/readme.md b/keyboards/mxss/readme.md index 181b6366a096..f35709adee7e 100644 --- a/keyboards/mxss/readme.md +++ b/keyboards/mxss/readme.md @@ -2,6 +2,11 @@ ![MxSS - Polycarb 65% Kit for MX/SMK](https://i.imgur.com/WDTWcmU.jpg) +### Important Note: +**This PCB supports the VIA configurator, and this is the recommended way to configure the keymap on this keyboard. Building the firmware should only be necessary if you would like to change the colours of the front LEDs in indicator mode.** + +**For more information about the VIA configurator, [see here](https://caniusevia.com/).** + ### Information: - Case: Frosted Polycarbonate, CNC milled @@ -51,4 +56,4 @@ Colors for FLED_INDI mode are hardcoded as hue/saturation values, the caps lock # Further Notes - As SAFE_RANGE is used for defining the custom keycodes seen above, please use NEW_SAFE_RANGE as the starting value for any custom keycodes in keymap.c, as per the example. \ No newline at end of file + As SAFE_RANGE is used for defining the custom keycodes seen above, please use NEW_SAFE_RANGE as the starting value for any custom keycodes in keymap.c, as per the example. diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index 73f94f3ab0ad..9e17510b590a 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -14,814 +14,1166 @@ * along with this program. If not, see . */ #include -#include -#include -#include +#include +#ifdef __AVR__ +# include +# include +#endif +#ifdef STM32_EEPROM_ENABLE +# include "hal.h" +# include "eeprom.h" +# include "eeprom_stm32.h" +#endif +#include "wait.h" #include "progmem.h" #include "timer.h" #include "rgblight.h" +#include "color.h" #include "debug.h" #include "led_tables.h" +#include "lib/lib8tion/lib8tion.h" +#ifdef VELOCIKEY_ENABLE +# include "velocikey.h" +#endif +// MxSS custom #include "mxss_frontled.h" -#ifndef RGBLIGHT_LIMIT_VAL -#define RGBLIGHT_LIMIT_VAL 255 +#ifdef RGBLIGHT_SPLIT +/* for split keyboard */ +# define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE +# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_HSVS +# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS rgblight_status.change_flags |= (RGBLIGHT_STATUS_CHANGE_MODE | RGBLIGHT_STATUS_CHANGE_HSVS) +# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_TIMER +# define RGBLIGHT_SPLIT_ANIMATION_TICK rgblight_status.change_flags |= RGBLIGHT_STATUS_ANIMATION_TICK +#else +# define RGBLIGHT_SPLIT_SET_CHANGE_MODE +# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS +# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS +# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE +# define RGBLIGHT_SPLIT_ANIMATION_TICK #endif -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) - -#define LED_PTRTOIND(ptr) ((uint32_t) (ptr - led)/sizeof(LED_TYPE)) - -void copyrgb(LED_TYPE *src, LED_TYPE *dst); +#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_SINGLE_DYNAMIC(sym) +#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_DYNAMIC(sym) +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym, +#define _RGBM_TMP_DYNAMIC(sym, msym) +static uint8_t static_effect_table[] = { +#include "rgblight_modes.h" +}; + +#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##msym, +#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##msym, +static uint8_t mode_base_table[] = { + 0, // RGBLIGHT_MODE_zero +#include "rgblight_modes.h" +}; + +static inline int is_static_effect(uint8_t mode) { return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL; } + +#ifdef RGBLIGHT_LED_MAP +const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP; +#endif -__attribute__ ((weak)) -const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; -__attribute__ ((weak)) -const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; -__attribute__ ((weak)) -const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; -__attribute__ ((weak)) -const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; -__attribute__ ((weak)) -const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; -__attribute__ ((weak)) -const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; -__attribute__ ((weak)) -const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024}; +#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT +__attribute__((weak)) const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64}; +#endif rgblight_config_t rgblight_config; +rgblight_status_t rgblight_status = {.timer_enabled = false}; +bool is_rgblight_initialized = false; + +#ifdef RGBLIGHT_USE_TIMER +animation_status_t animation_status = {}; +#endif +#ifndef LED_ARRAY LED_TYPE led[RGBLED_NUM]; +# define LED_ARRAY led +#endif -bool rgblight_timer_enabled = false; +static uint8_t clipping_start_pos = 0; +static uint8_t clipping_num_leds = RGBLED_NUM; +static uint8_t effect_start_pos = 0; +static uint8_t effect_end_pos = RGBLED_NUM; +static uint8_t effect_num_leds = RGBLED_NUM; +// MxSS custom extern uint8_t fled_mode; extern uint8_t fled_val; extern LED_TYPE fleds[2]; hs_set fled_hs[2]; -void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { - uint8_t r = 0, g = 0, b = 0, base, color; - - // if led is front leds, cache the hue and sat values - if (led1 == &led[RGBLIGHT_FLED1]) { - fled_hs[0].hue = hue; - fled_hs[0].sat = sat; - } else if (led1 == &led[RGBLIGHT_FLED2]) { - fled_hs[1].hue = hue; - fled_hs[1].sat = sat; - } +void copyrgb(LED_TYPE *src, LED_TYPE *dst) { + (*dst).r = (*src).r; + (*dst).g = (*src).g; + (*dst).b = (*src).b; +} - if (val > RGBLIGHT_LIMIT_VAL) { - val=RGBLIGHT_LIMIT_VAL; // limit the val - } +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { + clipping_start_pos = start_pos; + clipping_num_leds = num_leds; +} - if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. - r = val; - g = val; - b = val; - } else { - base = ((255 - sat) * val) >> 8; - color = (val - base) * (hue % 60) / 60; - - switch (hue / 60) { - case 0: - r = val; - g = base + color; - b = base; - break; - case 1: - r = val - color; - g = val; - b = base; - break; - case 2: - r = base; - g = val; - b = base + color; - break; - case 3: - r = base; - g = val - color; - b = val; - break; - case 4: - r = base + color; - g = base; - b = val; - break; - case 5: - r = val; - g = base; - b = val - color; - break; - } - } - r = pgm_read_byte(&CIE1931_CURVE[r]); - g = pgm_read_byte(&CIE1931_CURVE[g]); - b = pgm_read_byte(&CIE1931_CURVE[b]); +void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) { + if (start_pos >= RGBLED_NUM) return; + if (start_pos + num_leds > RGBLED_NUM) return; + effect_start_pos = start_pos; + effect_end_pos = start_pos + num_leds; + effect_num_leds = num_leds; +} - setrgb(r, g, b, led1); +void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { + HSV hsv = {hue, sat, val}; + // MxSS custom + // if led is front leds, cache the hue and sat values + if (led1 == &led[RGBLIGHT_FLED1]) { + fled_hs[0].hue = hue; + fled_hs[0].sat = sat; + } else if (led1 == &led[RGBLIGHT_FLED2]) { + fled_hs[1].hue = hue; + fled_hs[1].sat = sat; + } RGB rgb = hsv_to_rgb(hsv); + setrgb(rgb.r, rgb.g, rgb.b, led1); } +void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } + void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { - (*led1).r = r; - (*led1).g = g; - (*led1).b = b; + (*led1).r = r; + (*led1).g = g; + (*led1).b = b; +#ifdef RGBW + (*led1).w = 0; +#endif } -void copyrgb(LED_TYPE *src, LED_TYPE *dst) { - (*dst).r = (*src).r; - (*dst).g = (*src).g; - (*dst).b = (*src).b; +void rgblight_check_config(void) { + /* Add some out of bound checks for RGB light config */ + + if (rgblight_config.mode < RGBLIGHT_MODE_STATIC_LIGHT) { + rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; + } else if (rgblight_config.mode > RGBLIGHT_MODES) { + rgblight_config.mode = RGBLIGHT_MODES; + } + + if (rgblight_config.val > RGBLIGHT_LIMIT_VAL) { + rgblight_config.val = RGBLIGHT_LIMIT_VAL; + } } uint32_t eeconfig_read_rgblight(void) { - return eeprom_read_dword(EECONFIG_RGBLIGHT); +#if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) + return eeprom_read_dword(EECONFIG_RGBLIGHT); +#else + return 0; +#endif } + void eeconfig_update_rgblight(uint32_t val) { - eeprom_update_dword(EECONFIG_RGBLIGHT, val); +#if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) + rgblight_check_config(); + eeprom_update_dword(EECONFIG_RGBLIGHT, val); +#endif } + void eeconfig_update_rgblight_default(void) { - dprintf("eeconfig_update_rgblight_default\n"); - rgblight_config.enable = 1; - rgblight_config.mode = 1; - rgblight_config.hue = 0; - rgblight_config.sat = 255; - rgblight_config.val = RGBLIGHT_LIMIT_VAL; - rgblight_config.speed = 0; - eeconfig_update_rgblight(rgblight_config.raw); + rgblight_config.enable = 1; + rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; + rgblight_config.hue = 0; + rgblight_config.sat = UINT8_MAX; + rgblight_config.val = RGBLIGHT_LIMIT_VAL; + rgblight_config.speed = 0; + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; + eeconfig_update_rgblight(rgblight_config.raw); } + void eeconfig_debug_rgblight(void) { - dprintf("rgblight_config eprom\n"); - dprintf("rgblight_config.enable = %d\n", rgblight_config.enable); - dprintf("rghlight_config.mode = %d\n", rgblight_config.mode); - dprintf("rgblight_config.hue = %d\n", rgblight_config.hue); - dprintf("rgblight_config.sat = %d\n", rgblight_config.sat); - dprintf("rgblight_config.val = %d\n", rgblight_config.val); - dprintf("rgblight_config.speed = %d\n", rgblight_config.speed); + dprintf("rgblight_config EEPROM:\n"); + dprintf("rgblight_config.enable = %d\n", rgblight_config.enable); + dprintf("rghlight_config.mode = %d\n", rgblight_config.mode); + dprintf("rgblight_config.hue = %d\n", rgblight_config.hue); + dprintf("rgblight_config.sat = %d\n", rgblight_config.sat); + dprintf("rgblight_config.val = %d\n", rgblight_config.val); + dprintf("rgblight_config.speed = %d\n", rgblight_config.speed); } void rgblight_init(void) { - debug_enable = 1; // Debug ON! - dprintf("rgblight_init called.\n"); - dprintf("rgblight_init start!\n"); - if (!eeconfig_is_enabled()) { - dprintf("rgblight_init eeconfig is not enabled.\n"); - eeconfig_init(); - eeconfig_update_rgblight_default(); - } - rgblight_config.raw = eeconfig_read_rgblight(); - if (!rgblight_config.mode) { - dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); - eeconfig_update_rgblight_default(); + /* if already initialized, don't do it again. + If you must do it again, extern this and set to false, first. + This is a dirty, dirty hack until proper hooks can be added for keyboard startup. */ + if (is_rgblight_initialized) { + return; + } + + dprintf("rgblight_init called.\n"); + dprintf("rgblight_init start!\n"); + if (!eeconfig_is_enabled()) { + dprintf("rgblight_init eeconfig is not enabled.\n"); + eeconfig_init(); + eeconfig_update_rgblight_default(); + } rgblight_config.raw = eeconfig_read_rgblight(); - } - eeconfig_debug_rgblight(); // display current eeprom values + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; + if (!rgblight_config.mode) { + dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); + eeconfig_update_rgblight_default(); + rgblight_config.raw = eeconfig_read_rgblight(); + } + rgblight_check_config(); - #ifdef RGBLIGHT_ANIMATIONS - rgblight_timer_init(); // setup the timer - #endif + eeconfig_debug_rgblight(); // display current eeprom values - if (rgblight_config.enable) { - rgblight_mode_noeeprom(rgblight_config.mode); - } +#ifdef RGBLIGHT_USE_TIMER + rgblight_timer_init(); // setup the timer +#endif + + if (rgblight_config.enable) { + rgblight_mode_noeeprom(rgblight_config.mode); + } + + is_rgblight_initialized = true; } +uint32_t rgblight_read_dword(void) { return rgblight_config.raw; } + void rgblight_update_dword(uint32_t dword) { - rgblight_config.raw = dword; - eeconfig_update_rgblight(rgblight_config.raw); - if (rgblight_config.enable) - rgblight_mode(rgblight_config.mode); - else { - #ifdef RGBLIGHT_ANIMATIONS - rgblight_timer_disable(); - #endif - rgblight_set(); - } + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; + rgblight_config.raw = dword; + if (rgblight_config.enable) + rgblight_mode_noeeprom(rgblight_config.mode); + else { +#ifdef RGBLIGHT_USE_TIMER + rgblight_timer_disable(); +#endif + rgblight_set(); + } } void rgblight_increase(void) { - uint8_t mode = 0; - if (rgblight_config.mode < RGBLIGHT_MODES) { - mode = rgblight_config.mode + 1; - } - rgblight_mode(mode); + uint8_t mode = 0; + if (rgblight_config.mode < RGBLIGHT_MODES) { + mode = rgblight_config.mode + 1; + } + rgblight_mode(mode); } void rgblight_decrease(void) { - uint8_t mode = 0; - // Mode will never be < 1. If it ever is, eeprom needs to be initialized. - if (rgblight_config.mode > 1) { - mode = rgblight_config.mode - 1; - } - rgblight_mode(mode); + uint8_t mode = 0; + // Mode will never be < 1. If it ever is, eeprom needs to be initialized. + if (rgblight_config.mode > RGBLIGHT_MODE_STATIC_LIGHT) { + mode = rgblight_config.mode - 1; + } + rgblight_mode(mode); } -void rgblight_step(void) { - uint8_t mode = 0; - mode = rgblight_config.mode + 1; - if (mode > RGBLIGHT_MODES) { - mode = 1; - } - rgblight_mode(mode); +void rgblight_step_helper(bool write_to_eeprom) { + uint8_t mode = 0; + mode = rgblight_config.mode + 1; + if (mode > RGBLIGHT_MODES) { + mode = 1; + } + rgblight_mode_eeprom_helper(mode, write_to_eeprom); } -void rgblight_step_reverse(void) { - uint8_t mode = 0; - mode = rgblight_config.mode - 1; - if (mode < 1) { - mode = RGBLIGHT_MODES; - } - rgblight_mode(mode); +void rgblight_step_noeeprom(void) { rgblight_step_helper(false); } +void rgblight_step(void) { rgblight_step_helper(true); } +void rgblight_step_reverse_helper(bool write_to_eeprom) { + uint8_t mode = 0; + mode = rgblight_config.mode - 1; + if (mode < 1) { + mode = RGBLIGHT_MODES; + } + rgblight_mode_eeprom_helper(mode, write_to_eeprom); } +void rgblight_step_reverse_noeeprom(void) { rgblight_step_reverse_helper(false); } +void rgblight_step_reverse(void) { rgblight_step_reverse_helper(true); } uint8_t rgblight_get_mode(void) { - if (!rgblight_config.enable) { - return false; - } + if (!rgblight_config.enable) { + return false; + } - return rgblight_config.mode; + return rgblight_config.mode; } void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { - if (!rgblight_config.enable) { - return; - } - if (mode < 1) { - rgblight_config.mode = 1; - } else if (mode > RGBLIGHT_MODES) { - rgblight_config.mode = RGBLIGHT_MODES; - } else { - rgblight_config.mode = mode; - } - if (write_to_eeprom) { - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode); - } else { - xprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode); - } - if (rgblight_config.mode == 1) { - #ifdef RGBLIGHT_ANIMATIONS - rgblight_timer_disable(); - #endif - } else if ((rgblight_config.mode >= 2 && rgblight_config.mode <= 24) || - rgblight_config.mode == 35 ) { - // MODE 2-5, breathing - // MODE 6-8, rainbow mood - // MODE 9-14, rainbow swirl - // MODE 15-20, snake - // MODE 21-23, knight - // MODE 24, xmas - // MODE 35 RGB test - - #ifdef RGBLIGHT_ANIMATIONS - rgblight_timer_enable(); - #endif - } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { - // MODE 25-34, static gradient - - #ifdef RGBLIGHT_ANIMATIONS - rgblight_timer_disable(); - #endif - } - rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); -} - -void rgblight_mode(uint8_t mode) { - rgblight_mode_eeprom_helper(mode, true); + if (!rgblight_config.enable) { + return; + } + if (mode < RGBLIGHT_MODE_STATIC_LIGHT) { + rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; + } else if (mode > RGBLIGHT_MODES) { + rgblight_config.mode = RGBLIGHT_MODES; + } else { + rgblight_config.mode = mode; + } + RGBLIGHT_SPLIT_SET_CHANGE_MODE; + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); + dprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode); + } else { + dprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode); + } + if (is_static_effect(rgblight_config.mode)) { +#ifdef RGBLIGHT_USE_TIMER + rgblight_timer_disable(); +#endif + } else { +#ifdef RGBLIGHT_USE_TIMER + rgblight_timer_enable(); +#endif + } +#ifdef RGBLIGHT_USE_TIMER + animation_status.restart = true; +#endif + rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } -void rgblight_mode_noeeprom(uint8_t mode) { - rgblight_mode_eeprom_helper(mode, false); -} +void rgblight_mode(uint8_t mode) { rgblight_mode_eeprom_helper(mode, true); } +void rgblight_mode_noeeprom(uint8_t mode) { rgblight_mode_eeprom_helper(mode, false); } void rgblight_toggle(void) { - xprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); - if (rgblight_config.enable) { - rgblight_disable(); - } - else { - rgblight_enable(); - } + dprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); + if (rgblight_config.enable) { + rgblight_disable(); + } else { + rgblight_enable(); + } } void rgblight_toggle_noeeprom(void) { - xprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); - if (rgblight_config.enable) { - rgblight_disable_noeeprom(); - } - else { - rgblight_enable_noeeprom(); - } + dprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); + if (rgblight_config.enable) { + rgblight_disable_noeeprom(); + } else { + rgblight_enable_noeeprom(); + } } void rgblight_enable(void) { - rgblight_config.enable = 1; - // No need to update EEPROM here. rgblight_mode() will do that, actually - //eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); - rgblight_mode(rgblight_config.mode); + rgblight_config.enable = 1; + // No need to update EEPROM here. rgblight_mode() will do that, actually + // eeconfig_update_rgblight(rgblight_config.raw); + dprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_mode(rgblight_config.mode); } void rgblight_enable_noeeprom(void) { - rgblight_config.enable = 1; - xprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); - rgblight_mode_noeeprom(rgblight_config.mode); + rgblight_config.enable = 1; + dprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_mode_noeeprom(rgblight_config.mode); } void rgblight_disable(void) { - rgblight_config.enable = 0; - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); - #ifdef RGBLIGHT_ANIMATIONS - //rgblight_timer_disable(); - #endif - _delay_ms(50); - rgblight_set(); + rgblight_config.enable = 0; + eeconfig_update_rgblight(rgblight_config.raw); + dprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); +#ifdef RGBLIGHT_USE_TIMER + rgblight_timer_disable(); +#endif + RGBLIGHT_SPLIT_SET_CHANGE_MODE; + wait_ms(50); + rgblight_set(); } void rgblight_disable_noeeprom(void) { - rgblight_config.enable = 0; - xprintf("rgblight disable [noEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); - #ifdef RGBLIGHT_ANIMATIONS + rgblight_config.enable = 0; + dprintf("rgblight disable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); +#ifdef RGBLIGHT_USE_TIMER rgblight_timer_disable(); - #endif - _delay_ms(50); - rgblight_set(); +#endif + RGBLIGHT_SPLIT_SET_CHANGE_MODE; + wait_ms(50); + rgblight_set(); } - -// Deals with the messy details of incrementing an integer -uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { - int16_t new_value = value; - new_value += step; - return MIN( MAX( new_value, min ), max ); +void rgblight_increase_hue_helper(bool write_to_eeprom) { + uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP; + rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom); } - -uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { - int16_t new_value = value; - new_value -= step; - return MIN( MAX( new_value, min ), max ); +void rgblight_increase_hue_noeeprom(void) { rgblight_increase_hue_helper(false); } +void rgblight_increase_hue(void) { rgblight_increase_hue_helper(true); } +void rgblight_decrease_hue_helper(bool write_to_eeprom) { + uint8_t hue = rgblight_config.hue - RGBLIGHT_HUE_STEP; + rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom); } - -void rgblight_increase_hue(void) { - uint16_t hue; - hue = (rgblight_config.hue+RGBLIGHT_HUE_STEP) % 360; - rgblight_sethsv(hue, rgblight_config.sat, rgblight_config.val); +void rgblight_decrease_hue_noeeprom(void) { rgblight_decrease_hue_helper(false); } +void rgblight_decrease_hue(void) { rgblight_decrease_hue_helper(true); } +void rgblight_increase_sat_helper(bool write_to_eeprom) { + uint8_t sat = qadd8(rgblight_config.sat, RGBLIGHT_SAT_STEP); + rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom); } -void rgblight_decrease_hue(void) { - uint16_t hue; - if (rgblight_config.hue-RGBLIGHT_HUE_STEP < 0) { - hue = (rgblight_config.hue + 360 - RGBLIGHT_HUE_STEP) % 360; - } else { - hue = (rgblight_config.hue - RGBLIGHT_HUE_STEP) % 360; - } - rgblight_sethsv(hue, rgblight_config.sat, rgblight_config.val); -} -void rgblight_increase_sat(void) { - uint8_t sat; - if (rgblight_config.sat + RGBLIGHT_SAT_STEP > 255) { - sat = 255; - } else { - sat = rgblight_config.sat + RGBLIGHT_SAT_STEP; - } - rgblight_sethsv(rgblight_config.hue, sat, rgblight_config.val); -} -void rgblight_decrease_sat(void) { - uint8_t sat; - if (rgblight_config.sat - RGBLIGHT_SAT_STEP < 0) { - sat = 0; - } else { - sat = rgblight_config.sat - RGBLIGHT_SAT_STEP; - } - rgblight_sethsv(rgblight_config.hue, sat, rgblight_config.val); -} -void rgblight_increase_val(void) { - uint8_t val; - if (rgblight_config.val + RGBLIGHT_VAL_STEP > RGBLIGHT_LIMIT_VAL) { - val = RGBLIGHT_LIMIT_VAL; - } else { - val = rgblight_config.val + RGBLIGHT_VAL_STEP; - } - rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, val); -} -void rgblight_decrease_val(void) { - uint8_t val; - if (rgblight_config.val - RGBLIGHT_VAL_STEP < 0) { - val = 0; - } else { - val = rgblight_config.val - RGBLIGHT_VAL_STEP; - } - rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, val); +void rgblight_increase_sat_noeeprom(void) { rgblight_increase_sat_helper(false); } +void rgblight_increase_sat(void) { rgblight_increase_sat_helper(true); } +void rgblight_decrease_sat_helper(bool write_to_eeprom) { + uint8_t sat = qsub8(rgblight_config.sat, RGBLIGHT_SAT_STEP); + rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom); +} +void rgblight_decrease_sat_noeeprom(void) { rgblight_decrease_sat_helper(false); } +void rgblight_decrease_sat(void) { rgblight_decrease_sat_helper(true); } +void rgblight_increase_val_helper(bool write_to_eeprom) { + uint8_t val = qadd8(rgblight_config.val, RGBLIGHT_VAL_STEP); + rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom); +} +void rgblight_increase_val_noeeprom(void) { rgblight_increase_val_helper(false); } +void rgblight_increase_val(void) { rgblight_increase_val_helper(true); } +void rgblight_decrease_val_helper(bool write_to_eeprom) { + uint8_t val = qsub8(rgblight_config.val, RGBLIGHT_VAL_STEP); + rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom); } +void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); } +void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); } void rgblight_increase_speed(void) { - rgblight_config.speed = increment( rgblight_config.speed, 1, 0, 3 ); - eeconfig_update_rgblight(rgblight_config.raw);//EECONFIG needs to be increased to support this + if (rgblight_config.speed < 3) rgblight_config.speed++; + // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED? + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this } void rgblight_decrease_speed(void) { - rgblight_config.speed = decrement( rgblight_config.speed, 1, 0, 3 ); - eeconfig_update_rgblight(rgblight_config.raw);//EECONFIG needs to be increased to support this + if (rgblight_config.speed > 0) rgblight_config.speed--; + // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?? + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this } -void rgblight_sethsv_noeeprom_old(uint16_t hue, uint8_t sat, uint8_t val) { - if (rgblight_config.enable) { - LED_TYPE tmp_led; - sethsv(hue, sat, val, &tmp_led); - fled_hs[0].hue = fled_hs[1].hue = hue; - fled_hs[0].sat = fled_hs[1].sat = sat; - // dprintf("rgblight set hue [MEMORY]: %u,%u,%u\n", inmem_config.hue, inmem_config.sat, inmem_config.val); - rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); - } +void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) { + if (rgblight_config.enable) { + // MxSS custom code + fled_hs[0].hue = fled_hs[1].hue = hue; + fled_hs[0].sat = fled_hs[1].sat = sat; + + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); + } } -void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { - if (rgblight_config.enable) { - if (rgblight_config.mode == 1) { - // same static color - LED_TYPE tmp_led; - sethsv(hue, sat, val, &tmp_led); - - fled_hs[0].hue = fled_hs[1].hue = hue; - fled_hs[0].sat = fled_hs[1].sat = sat; - - rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); - } else { - // all LEDs in same color - if (rgblight_config.mode >= 2 && rgblight_config.mode <= 5) { - // breathing mode, ignore the change of val, use in memory value instead - val = rgblight_config.val; - } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) { - // rainbow mood and rainbow swirl, ignore the change of hue - hue = rgblight_config.hue; - } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { - // static gradient - uint16_t _hue; - int8_t direction = ((rgblight_config.mode - 25) % 2) ? -1 : 1; - uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - 25) / 2]); - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - _hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360; - dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range); - sethsv(_hue, sat, val, (LED_TYPE *)&led[i]); +void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { + if (rgblight_config.enable) { + rgblight_status.base_mode = mode_base_table[rgblight_config.mode]; + if (rgblight_config.mode == RGBLIGHT_MODE_STATIC_LIGHT) { + // same static color + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + + // MxSS custom + // Cache hue/sat for rgb + fled_hs[0].hue = fled_hs[1].hue = hue; + fled_hs[0].sat = fled_hs[1].sat = sat; + + rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); + } else { + // all LEDs in same color + if (1 == 0) { // dummy + } +#ifdef RGBLIGHT_EFFECT_BREATHING + else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) { + // breathing mode, ignore the change of val, use in memory value instead + val = rgblight_config.val; + } +#endif +#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) { + // rainbow mood, ignore the change of hue + hue = rgblight_config.hue; + } +#endif +#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) { + // rainbow swirl, ignore the change of hue + hue = rgblight_config.hue; + } +#endif +#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT + else if (rgblight_status.base_mode == RGBLIGHT_MODE_STATIC_GRADIENT) { + // static gradient + uint8_t delta = rgblight_config.mode - rgblight_status.base_mode; + bool direction = (delta % 2) == 0; +# ifdef __AVR__ + // probably due to how pgm_read_word is defined for ARM, but the ARM compiler really hates this line + uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]); +# else + uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2]; +# endif + for (uint8_t i = 0; i < effect_num_leds; i++) { + uint8_t _hue = ((uint16_t)i * (uint16_t)range) / effect_num_leds; + if (direction) { + _hue = hue + _hue; + } else { + _hue = hue - _hue; + } + dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range); + sethsv(_hue, sat, val, (LED_TYPE *)&led[i + effect_start_pos]); + } + rgblight_set(); + } +#endif + } +#ifdef RGBLIGHT_SPLIT + if (rgblight_config.hue != hue || rgblight_config.sat != sat || rgblight_config.val != val) { + RGBLIGHT_SPLIT_SET_CHANGE_HSVS; + } +#endif + rgblight_config.hue = hue; + rgblight_config.sat = sat; + rgblight_config.val = val; + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); + dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + } else { + dprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } - rgblight_set(); - } - } - rgblight_config.hue = hue; - rgblight_config.sat = sat; - rgblight_config.val = val; - if (write_to_eeprom) { - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); - } else { - xprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } - } } -void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { - rgblight_sethsv_eeprom_helper(hue, sat, val, true); -} +void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, true); } -void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { - rgblight_sethsv_eeprom_helper(hue, sat, val, false); -} +void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); } -uint16_t rgblight_get_hue(void) { - return rgblight_config.hue; +uint8_t rgblight_get_hue(void) { return rgblight_config.hue; } + +uint8_t rgblight_get_sat(void) { return rgblight_config.sat; } + +uint8_t rgblight_get_val(void) { return rgblight_config.val; } + +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { + if (!rgblight_config.enable) { + return; + } + + for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) { + led[i].r = r; + led[i].g = g; + led[i].b = b; +#ifdef RGBW + led[i].w = 0; +#endif + } + rgblight_set(); } -uint8_t rgblight_get_sat(void) { - return rgblight_config.sat; +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) { + if (!rgblight_config.enable || index >= RGBLED_NUM) { + return; + } + + led[index].r = r; + led[index].g = g; + led[index].b = b; +#ifdef RGBW + led[index].w = 0; +#endif + rgblight_set(); } -uint8_t rgblight_get_val(void) { - return rgblight_config.val; +void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) { + if (!rgblight_config.enable) { + return; + } + + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index); } -void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { - if (!rgblight_config.enable) { return; } +#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = r; - led[i].g = g; - led[i].b = b; - } - rgblight_set(); +static uint8_t get_interval_time(const uint8_t *default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) { + return +# ifdef VELOCIKEY_ENABLE + velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) : +# endif + pgm_read_byte(default_interval_address); } -void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) { - if (!rgblight_config.enable || index >= RGBLED_NUM) { return; } +#endif + +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) { + if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) { + return; + } - led[index].r = r; - led[index].g = g; - led[index].b = b; - rgblight_set(); + for (uint8_t i = start; i < end; i++) { + led[i].r = r; + led[i].g = g; + led[i].b = b; +#ifdef RGBW + led[i].w = 0; +#endif + } + rgblight_set(); + wait_ms(1); } -void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) { - if (!rgblight_config.enable) { return; } +void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) { + if (!rgblight_config.enable) { + return; + } - LED_TYPE tmp_led; - sethsv(hue, sat, val, &tmp_led); - rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index); + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end); } +#ifndef RGBLIGHT_SPLIT +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, 0, (uint8_t)RGBLED_NUM / 2); } + +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); } + +void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, 0, (uint8_t)RGBLED_NUM / 2); } + +void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); } +#endif // ifndef RGBLIGHT_SPLIT + +#ifndef RGBLIGHT_CUSTOM_DRIVER void rgblight_set(void) { - if (!rgblight_config.enable) { + LED_TYPE *start_led; + uint16_t num_leds = clipping_num_leds; + + if (!rgblight_config.enable) { + for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) { + if (i == RGBLIGHT_FLED1 && i == RGBLIGHT_FLED2) + continue; + + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; +# ifdef RGBW + led[i].w = 0; +# endif + } + } + +# ifdef RGBLIGHT_LED_MAP + LED_TYPE led0[RGBLED_NUM]; for (uint8_t i = 0; i < RGBLED_NUM; i++) { - if (i == RGBLIGHT_FLED1 && i == RGBLIGHT_FLED2) - continue; - - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; + led0[i] = led[pgm_read_byte(&led_map[i])]; } - } - - switch (fled_mode) { + start_led = led0 + clipping_start_pos; +# else + start_led = led + clipping_start_pos; +# endif + +#ifdef RGBW + for (uint8_t i = 0; i < num_leds; i++) { + convert_rgb_to_rgbw(&start_led[i]); + } +#endif + // MxSS custom + switch (fled_mode) { case FLED_OFF: - setrgb(0, 0, 0, &led[RGBLIGHT_FLED1]); - setrgb(0, 0, 0, &led[RGBLIGHT_FLED2]); + setrgb(0, 0, 0, &led[RGBLIGHT_FLED1]); + setrgb(0, 0, 0, &led[RGBLIGHT_FLED2]); break; - + case FLED_INDI: - copyrgb(&fleds[0], &led[RGBLIGHT_FLED1]); - copyrgb(&fleds[1], &led[RGBLIGHT_FLED2]); + copyrgb(&fleds[0], &led[RGBLIGHT_FLED1]); + copyrgb(&fleds[1], &led[RGBLIGHT_FLED2]); break; - + case FLED_RGB: - if (fled_hs[0].hue == 0 && fled_hs[0].hue == 0 && (rgblight_config.mode >= 15 && rgblight_config.mode <= 23)) - setrgb(0, 0, 0, &led[RGBLIGHT_FLED1]); - else - sethsv(fled_hs[0].hue, fled_hs[0].sat, fled_val, &led[RGBLIGHT_FLED1]); - - if (fled_hs[1].hue == 0 && fled_hs[1].hue == 0 && (rgblight_config.mode >= 15 && rgblight_config.mode <= 23)) - setrgb(0, 0, 0, &led[RGBLIGHT_FLED2]); - else - sethsv(fled_hs[1].hue, fled_hs[1].sat, fled_val, &led[RGBLIGHT_FLED2]); + if (fled_hs[0].hue == 0 && fled_hs[0].hue == 0 && + (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE || + rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT)) + setrgb(0, 0, 0, &led[RGBLIGHT_FLED1]); + else + sethsv(fled_hs[0].hue, fled_hs[0].sat, fled_val, &led[RGBLIGHT_FLED1]); + + if (fled_hs[1].hue == 0 && fled_hs[1].hue == 0 && + (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE || + rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT)) + setrgb(0, 0, 0, &led[RGBLIGHT_FLED2]); + else + sethsv(fled_hs[1].hue, fled_hs[1].sat, fled_val, &led[RGBLIGHT_FLED2]); break; - + default: break; } - ws2812_setleds(led, RGBLED_NUM); + ws2812_setleds(start_led, num_leds); +} +#endif + +#ifdef RGBLIGHT_SPLIT +/* for split keyboard master side */ +uint8_t rgblight_get_change_flags(void) { return rgblight_status.change_flags; } + +void rgblight_clear_change_flags(void) { rgblight_status.change_flags = 0; } + +void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo) { + syncinfo->config = rgblight_config; + syncinfo->status = rgblight_status; +} + +/* for split keyboard slave side */ +void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) { + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_MODE) { + if (syncinfo->config.enable) { + rgblight_config.enable = 1; // == rgblight_enable_noeeprom(); + rgblight_mode_eeprom_helper(syncinfo->config.mode, write_to_eeprom); + } else { + rgblight_disable_noeeprom(); + } + } + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_HSVS) { + rgblight_sethsv_eeprom_helper(syncinfo->config.hue, syncinfo->config.sat, syncinfo->config.val, write_to_eeprom); + // rgblight_config.speed = config->speed; // NEED??? + } +# ifdef RGBLIGHT_USE_TIMER + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_TIMER) { + if (syncinfo->status.timer_enabled) { + rgblight_timer_enable(); + } else { + rgblight_timer_disable(); + } + } +# ifndef RGBLIGHT_SPLIT_NO_ANIMATION_SYNC + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_ANIMATION_TICK) { + animation_status.restart = true; + } +# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */ +# endif /* RGBLIGHT_USE_TIMER */ } +#endif /* RGBLIGHT_SPLIT */ -#ifdef RGBLIGHT_ANIMATIONS +#ifdef RGBLIGHT_USE_TIMER -// Animation timer -- AVR Timer3 +typedef void (*effect_func_t)(animation_status_t *anim); + +// Animation timer -- use system timer (AVR Timer0) void rgblight_timer_init(void) { - // static uint8_t rgblight_timer_is_init = 0; - // if (rgblight_timer_is_init) { - // return; - // } - // rgblight_timer_is_init = 1; - // /* Timer 3 setup */ - // TCCR3B = _BV(WGM32) // CTC mode OCR3A as TOP - // | _BV(CS30); // Clock selelct: clk/1 - // /* Set TOP value */ - // uint8_t sreg = SREG; - // cli(); - // OCR3AH = (RGBLED_TIMER_TOP >> 8) & 0xff; - // OCR3AL = RGBLED_TIMER_TOP & 0xff; - // SREG = sreg; - - rgblight_timer_enabled = true; + // OLD!!!! Animation timer -- AVR Timer3 + // static uint8_t rgblight_timer_is_init = 0; + // if (rgblight_timer_is_init) { + // return; + // } + // rgblight_timer_is_init = 1; + // /* Timer 3 setup */ + // TCCR3B = _BV(WGM32) // CTC mode OCR3A as TOP + // | _BV(CS30); // Clock selelct: clk/1 + // /* Set TOP value */ + // uint8_t sreg = SREG; + // cli(); + // OCR3AH = (RGBLED_TIMER_TOP >> 8) & 0xff; + // OCR3AL = RGBLED_TIMER_TOP & 0xff; + // SREG = sreg; + + rgblight_status.timer_enabled = false; + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; } void rgblight_timer_enable(void) { - rgblight_timer_enabled = true; - dprintf("TIMER3 enabled.\n"); + if (!is_static_effect(rgblight_config.mode)) { + rgblight_status.timer_enabled = true; + } + animation_status.last_timer = timer_read(); + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; + dprintf("rgblight timer enabled.\n"); } void rgblight_timer_disable(void) { - rgblight_timer_enabled = false; - dprintf("TIMER3 disabled.\n"); + // MxSS custom code + if (fled_mode != FLED_RGB) { + rgblight_status.timer_enabled = false; + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; + dprintf("rgblight timer disable.\n"); + } } void rgblight_timer_toggle(void) { - rgblight_timer_enabled ^= rgblight_timer_enabled; - dprintf("TIMER3 toggled.\n"); + dprintf("rgblight timer toggle.\n"); + if (rgblight_status.timer_enabled) { + rgblight_timer_disable(); + } else { + rgblight_timer_enable(); + } } void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) { - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(r, g, b); + rgblight_enable(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_setrgb(r, g, b); +} + +static void rgblight_effect_dummy(animation_status_t *anim) { + // do nothing + /******** + dprintf("rgblight_task() what happened?\n"); + dprintf("is_static_effect %d\n", is_static_effect(rgblight_config.mode)); + dprintf("mode = %d, base_mode = %d, timer_enabled %d, ", + rgblight_config.mode, rgblight_status.base_mode, + rgblight_status.timer_enabled); + dprintf("last_timer = %d\n",anim->last_timer); + **/ } void rgblight_task(void) { - if (rgblight_timer_enabled) { - // mode = 1, static light, do nothing here - if (rgblight_config.mode >= 2 && rgblight_config.mode <= 5) { - // mode = 2 to 5, breathing mode - rgblight_effect_breathing(rgblight_config.mode - 2); - } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 8) { - // mode = 6 to 8, rainbow mood mod - rgblight_effect_rainbow_mood(rgblight_config.mode - 6); - } else if (rgblight_config.mode >= 9 && rgblight_config.mode <= 14) { - // mode = 9 to 14, rainbow swirl mode - rgblight_effect_rainbow_swirl(rgblight_config.mode - 9); - } else if (rgblight_config.mode >= 15 && rgblight_config.mode <= 20) { - // mode = 15 to 20, snake mode - rgblight_effect_snake(rgblight_config.mode - 15); - } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) { - // mode = 21 to 23, knight mode - rgblight_effect_knight(rgblight_config.mode - 21); - } else if (rgblight_config.mode == 24) { - // mode = 24, christmas mode - rgblight_effect_christmas(); - } else if (rgblight_config.mode == 35) { - // mode = 35, RGB test - rgblight_effect_rgbtest(); + if (rgblight_status.timer_enabled) { + effect_func_t effect_func = rgblight_effect_dummy; + uint16_t interval_time = 2000; // dummy interval + uint8_t delta = rgblight_config.mode - rgblight_status.base_mode; + animation_status.delta = delta; + + // static light mode, do nothing here + if (1 == 0) { // dummy + } +# ifdef RGBLIGHT_EFFECT_BREATHING + else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) { + // breathing mode + interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[delta], 1, 100); + effect_func = rgblight_effect_breathing; + } +# endif +# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) { + // rainbow mood mode + interval_time = get_interval_time(&RGBLED_RAINBOW_MOOD_INTERVALS[delta], 5, 100); + effect_func = rgblight_effect_rainbow_mood; + } +# endif +# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) { + // rainbow swirl mode + interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[delta / 2], 1, 100); + effect_func = rgblight_effect_rainbow_swirl; + } +# endif +# ifdef RGBLIGHT_EFFECT_SNAKE + else if (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE) { + // snake mode + interval_time = get_interval_time(&RGBLED_SNAKE_INTERVALS[delta / 2], 1, 200); + effect_func = rgblight_effect_snake; + } +# endif +# ifdef RGBLIGHT_EFFECT_KNIGHT + else if (rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT) { + // knight mode + interval_time = get_interval_time(&RGBLED_KNIGHT_INTERVALS[delta], 5, 100); + effect_func = rgblight_effect_knight; + } +# endif +# ifdef RGBLIGHT_EFFECT_CHRISTMAS + else if (rgblight_status.base_mode == RGBLIGHT_MODE_CHRISTMAS) { + // christmas mode + interval_time = RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL; + effect_func = (effect_func_t)rgblight_effect_christmas; + } +# endif +# ifdef RGBLIGHT_EFFECT_RGB_TEST + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RGB_TEST) { + // RGB test mode + interval_time = pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0]); + effect_func = (effect_func_t)rgblight_effect_rgbtest; + } +# endif +# ifdef RGBLIGHT_EFFECT_ALTERNATING + else if (rgblight_status.base_mode == RGBLIGHT_MODE_ALTERNATING) { + interval_time = 500; + effect_func = (effect_func_t)rgblight_effect_alternating; + } +# endif + if (animation_status.restart) { + animation_status.restart = false; + animation_status.last_timer = timer_read() - interval_time - 1; + animation_status.pos16 = 0; // restart signal to local each effect + } + if (timer_elapsed(animation_status.last_timer) >= interval_time) { +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + static uint16_t report_last_timer = 0; + static bool tick_flag = false; + uint16_t oldpos16; + if (tick_flag) { + tick_flag = false; + if (timer_elapsed(report_last_timer) >= 30000) { + report_last_timer = timer_read(); + dprintf("rgblight animation tick report to slave\n"); + RGBLIGHT_SPLIT_ANIMATION_TICK; + } + } + oldpos16 = animation_status.pos16; +# endif + animation_status.last_timer += interval_time; + effect_func(&animation_status); +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (animation_status.pos16 == 0 && oldpos16 != 0) { + tick_flag = true; + } +# endif + } } - } } -// Effects -void rgblight_effect_breathing(uint8_t interval) { - static uint8_t pos = 0; - static uint16_t last_timer = 0; - float val; +#endif /* RGBLIGHT_USE_TIMER */ - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_BREATHING_INTERVALS[interval])) { - return; - } - last_timer = timer_read(); +// Effects +#ifdef RGBLIGHT_EFFECT_BREATHING + +# ifndef RGBLIGHT_EFFECT_BREATHE_CENTER +# ifndef RGBLIGHT_BREATHE_TABLE_SIZE +# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256 or 128 or 64 +# endif +# include +# endif + +__attribute__((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; + +void rgblight_effect_breathing(animation_status_t *anim) { + float val; + + // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ +# ifdef RGBLIGHT_EFFECT_BREATHE_TABLE + val = pgm_read_byte(&rgblight_effect_breathe_table[anim->pos / table_scale]); +# else + val = (exp(sin((anim->pos / 255.0) * M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER / M_E) * (RGBLIGHT_EFFECT_BREATHE_MAX / (M_E - 1 / M_E)); +# endif + rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val); + anim->pos = (anim->pos + 1); +} +#endif +#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD +__attribute__((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; - // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ - val = (exp(sin((pos/255.0)*M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER/M_E)*(RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E)); - rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val); - pos = (pos + 1) % 256; +void rgblight_effect_rainbow_mood(animation_status_t *anim) { + rgblight_sethsv_noeeprom_old(anim->current_hue, rgblight_config.sat, rgblight_config.val); + anim->current_hue++; } -void rgblight_effect_rainbow_mood(uint8_t interval) { - static uint16_t current_hue = 0; - static uint16_t last_timer = 0; +#endif - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_RAINBOW_MOOD_INTERVALS[interval])) { - return; - } - last_timer = timer_read(); - rgblight_sethsv_noeeprom_old(current_hue, rgblight_config.sat, rgblight_config.val); - current_hue = (current_hue + 1) % 360; -} -void rgblight_effect_rainbow_swirl(uint8_t interval) { - static uint16_t current_hue = 0; - static uint16_t last_timer = 0; - uint16_t hue; - uint8_t i; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_RAINBOW_SWIRL_INTERVALS[interval / 2])) { - return; - } - last_timer = timer_read(); - for (i = 0; i < RGBLED_NUM; i++) { - hue = (360 / RGBLED_NUM * i + current_hue) % 360; - sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); - } - rgblight_set(); +#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL +# ifndef RGBLIGHT_RAINBOW_SWIRL_RANGE +# define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 +# endif + +__attribute__((weak)) const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; + +void rgblight_effect_rainbow_swirl(animation_status_t *anim) { + uint8_t hue; + uint8_t i; + + for (i = 0; i < effect_num_leds; i++) { + hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / effect_num_leds * i + anim->current_hue); + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + effect_start_pos]); + } + rgblight_set(); - if (interval % 2) { - current_hue = (current_hue + 1) % 360; - } else { - if (current_hue - 1 < 0) { - current_hue = 359; + if (anim->delta % 2) { + anim->current_hue++; } else { - current_hue = current_hue - 1; + anim->current_hue--; } - } } -void rgblight_effect_snake(uint8_t interval) { - static uint8_t pos = 0; - static uint16_t last_timer = 0; - uint8_t i, j; - int8_t k; - int8_t increment = 1; - if (interval % 2) { - increment = -1; - } - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_SNAKE_INTERVALS[interval / 2])) { - return; - } - last_timer = timer_read(); - - fled_hs[0].hue = fled_hs[1].hue = 0; - fled_hs[0].sat = fled_hs[1].sat = 0; - - for (i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - - for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { - k = pos + j * increment; - if (k < 0) { - k = k + RGBLED_NUM; - } - if (i == k) { - sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val*(RGBLIGHT_EFFECT_SNAKE_LENGTH-j)/RGBLIGHT_EFFECT_SNAKE_LENGTH), (LED_TYPE *)&led[i]); - } +#endif + +#ifdef RGBLIGHT_EFFECT_SNAKE +__attribute__((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; + +void rgblight_effect_snake(animation_status_t *anim) { + static uint8_t pos = 0; + uint8_t i, j; + int8_t k; + int8_t increment = 1; + + if (anim->delta % 2) { + increment = -1; } - } - rgblight_set(); - if (increment == 1) { - if (pos - 1 < 0) { - pos = RGBLED_NUM - 1; + +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (anim->pos == 0) { // restart signal + if (increment == 1) { + pos = effect_num_leds - 1; + } else { + pos = 0; + } + anim->pos = 1; + } +# endif + + // MxSS custom + fled_hs[0].hue = fled_hs[1].hue = 0; + fled_hs[0].sat = fled_hs[1].sat = 0; + + for (i = 0; i < effect_num_leds; i++) { + LED_TYPE *ledp = led + i + effect_start_pos; + ledp->r = 0; + ledp->g = 0; + ledp->b = 0; +# ifdef RGBW + ledp->w = 0; +# endif + for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { + k = pos + j * increment; + if (k > RGBLED_NUM) { + k = k % RGBLED_NUM; + } + if (k < 0) { + k = k + effect_num_leds; + } + if (i == k) { + sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val * (RGBLIGHT_EFFECT_SNAKE_LENGTH - j) / RGBLIGHT_EFFECT_SNAKE_LENGTH), ledp); + } + } + } + rgblight_set(); + if (increment == 1) { + if (pos - 1 < 0) { + pos = effect_num_leds - 1; +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = 0; +# endif + } else { + pos -= 1; +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = 1; +# endif + } } else { - pos -= 1; + pos = (pos + 1) % effect_num_leds; +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = pos; +# endif } - } else { - pos = (pos + 1) % RGBLED_NUM; - } } -void rgblight_effect_knight(uint8_t interval) { - static uint16_t last_timer = 0; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_KNIGHT_INTERVALS[interval])) { - return; - } - last_timer = timer_read(); - - static int8_t low_bound = 0; - static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; - static int8_t increment = 1; - uint8_t i, cur; - - // Set all the LEDs to 0 - for (i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - // Determine which LEDs should be lit up - for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) { - cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % RGBLED_NUM; +#endif - if (i >= low_bound && i <= high_bound) { - sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]); - } else { - if (i == RGBLIGHT_FLED1 || i == RGBLIGHT_FLED2) { - fled_hs[0].hue = fled_hs[1].hue = 0; - fled_hs[0].sat = fled_hs[1].sat = 0; - } - - led[cur].r = 0; - led[cur].g = 0; - led[cur].b = 0; +#ifdef RGBLIGHT_EFFECT_KNIGHT +__attribute__((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; + +void rgblight_effect_knight(animation_status_t *anim) { + static int8_t low_bound = 0; + static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; + static int8_t increment = 1; + uint8_t i, cur; + +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (anim->pos == 0) { // restart signal + anim->pos = 1; + low_bound = 0; + high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; + increment = 1; + } +# endif + // Set all the LEDs to 0 + for (i = effect_start_pos; i < effect_end_pos; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; +# ifdef RGBW + led[i].w = 0; +# endif + } + // Determine which LEDs should be lit up + for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) { + cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % effect_num_leds + effect_start_pos; + + if (i >= low_bound && i <= high_bound) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]); + } else { + // MxSS custom code + if (cur == RGBLIGHT_FLED1) { + fled_hs[0].hue = fled_hs[0].sat = 0; + } else if (cur == RGBLIGHT_FLED2) { + fled_hs[1].hue = fled_hs[1].sat = 0; + } + + led[cur].r = 0; + led[cur].g = 0; + led[cur].b = 0; +# ifdef RGBW + led[cur].w = 0; +# endif + } + } + rgblight_set(); + + // Move from low_bound to high_bound changing the direction we increment each + // time a boundary is hit. + low_bound += increment; + high_bound += increment; + + if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) { + increment = -increment; +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (increment == 1) { + anim->pos = 0; + } +# endif } - } - rgblight_set(); - - // Move from low_bound to high_bound changing the direction we increment each - // time a boundary is hit. - low_bound += increment; - high_bound += increment; - - if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) { - increment = -increment; - } } +#endif +#ifdef RGBLIGHT_EFFECT_CHRISTMAS +void rgblight_effect_christmas(animation_status_t *anim) { + uint8_t hue; + uint8_t i; -void rgblight_effect_christmas(void) { - static uint16_t current_offset = 0; - static uint16_t last_timer = 0; - uint16_t hue; - uint8_t i; - if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) { - return; - } - last_timer = timer_read(); - current_offset = (current_offset + 1) % 2; - for (i = 0; i < RGBLED_NUM; i++) { - hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120; - sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); - } - rgblight_set(); + anim->current_offset = (anim->current_offset + 1) % 2; + for (i = 0; i < effect_num_leds; i++) { + hue = 0 + ((i / RGBLIGHT_EFFECT_CHRISTMAS_STEP + anim->current_offset) % 2) * 85; + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + effect_start_pos]); + } + rgblight_set(); } +#endif -void rgblight_effect_rgbtest(void) { - static uint8_t pos = 0; - static uint16_t last_timer = 0; - static uint8_t maxval = 0; - uint8_t g; uint8_t r; uint8_t b; +#ifdef RGBLIGHT_EFFECT_RGB_TEST +__attribute__((weak)) const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024}; - if (timer_elapsed(last_timer) < pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0])) { - return; - } +void rgblight_effect_rgbtest(animation_status_t *anim) { + static uint8_t maxval = 0; + uint8_t g; + uint8_t r; + uint8_t b; - if( maxval == 0 ) { - LED_TYPE tmp_led; - sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led); - maxval = tmp_led.r; - } - last_timer = timer_read(); - g = r = b = 0; - switch( pos ) { - case 0: r = maxval; break; - case 1: g = maxval; break; - case 2: b = maxval; break; - } - rgblight_setrgb(r, g, b); - pos = (pos + 1) % 3; + if (maxval == 0) { + LED_TYPE tmp_led; + sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led); + maxval = tmp_led.r; + } + g = r = b = 0; + switch (anim->pos) { + // MxSS custom code + case 0: + r = maxval; + fled_hs[0].hue = 0; + fled_hs[0].sat = 255; + fled_hs[1].hue = 0; + fled_hs[1].sat = 255; + break; + case 1: + g = maxval; + fled_hs[0].hue = 85; + fled_hs[0].sat = 255; + fled_hs[1].hue = 85; + fled_hs[1].sat = 255; + break; + case 2: + b = maxval; + fled_hs[0].hue = 170; + fled_hs[0].sat = 255; + fled_hs[1].hue = 170; + fled_hs[1].sat = 255; + break; + } + rgblight_setrgb(r, g, b); + anim->pos = (anim->pos + 1) % 3; } +#endif -#endif /* RGBLIGHT_ANIMATIONS */ +#ifdef RGBLIGHT_EFFECT_ALTERNATING +void rgblight_effect_alternating(animation_status_t *anim) { + for (int i = 0; i < effect_num_leds; i++) { + LED_TYPE *ledp = led + i + effect_start_pos; + if (i < effect_num_leds / 2 && anim->pos) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); + } else if (i >= effect_num_leds / 2 && !anim->pos) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); + } else { + sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp); + } + } + rgblight_set(); + anim->pos = (anim->pos + 1) % 2; +} +#endif diff --git a/keyboards/mxss/rgblight.h b/keyboards/mxss/rgblight.h index 0013a34386e9..e3aa098e4db1 100644 --- a/keyboards/mxss/rgblight.h +++ b/keyboards/mxss/rgblight.h @@ -16,137 +16,245 @@ #ifndef RGBLIGHT_H #define RGBLIGHT_H -#ifdef RGBLIGHT_ANIMATIONS - #define RGBLIGHT_MODES 35 -#else - #define RGBLIGHT_MODES 1 -#endif - -#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7 -#endif - -#ifndef RGBLIGHT_EFFECT_BREATHE_MAX -#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 -#endif - -#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 -#endif - -#ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 -#endif - -#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET -#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 -#endif - -#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM -#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM -#endif - -#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 -#endif - -#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 -#endif - -#ifndef RGBLIGHT_HUE_STEP -#define RGBLIGHT_HUE_STEP 10 -#endif -#ifndef RGBLIGHT_SAT_STEP -#define RGBLIGHT_SAT_STEP 17 -#endif -#ifndef RGBLIGHT_VAL_STEP -#define RGBLIGHT_VAL_STEP 17 -#endif - -#define RGBLED_TIMER_TOP F_CPU/(256*64) +#include "rgblight_reconfig.h" + +/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) **** + + old mode number (before 0.6.117) to new mode name table + +|-----------------|-----------------------------------| +| old mode number | new mode name | +|-----------------|-----------------------------------| +| 1 | RGBLIGHT_MODE_STATIC_LIGHT | +| 2 | RGBLIGHT_MODE_BREATHING | +| 3 | RGBLIGHT_MODE_BREATHING + 1 | +| 4 | RGBLIGHT_MODE_BREATHING + 2 | +| 5 | RGBLIGHT_MODE_BREATHING + 3 | +| 6 | RGBLIGHT_MODE_RAINBOW_MOOD | +| 7 | RGBLIGHT_MODE_RAINBOW_MOOD + 1 | +| 8 | RGBLIGHT_MODE_RAINBOW_MOOD + 2 | +| 9 | RGBLIGHT_MODE_RAINBOW_SWIRL | +| 10 | RGBLIGHT_MODE_RAINBOW_SWIRL + 1 | +| 11 | RGBLIGHT_MODE_RAINBOW_SWIRL + 2 | +| 12 | RGBLIGHT_MODE_RAINBOW_SWIRL + 3 | +| 13 | RGBLIGHT_MODE_RAINBOW_SWIRL + 4 | +| 14 | RGBLIGHT_MODE_RAINBOW_SWIRL + 5 | +| 15 | RGBLIGHT_MODE_SNAKE | +| 16 | RGBLIGHT_MODE_SNAKE + 1 | +| 17 | RGBLIGHT_MODE_SNAKE + 2 | +| 18 | RGBLIGHT_MODE_SNAKE + 3 | +| 19 | RGBLIGHT_MODE_SNAKE + 4 | +| 20 | RGBLIGHT_MODE_SNAKE + 5 | +| 21 | RGBLIGHT_MODE_KNIGHT | +| 22 | RGBLIGHT_MODE_KNIGHT + 1 | +| 23 | RGBLIGHT_MODE_KNIGHT + 2 | +| 24 | RGBLIGHT_MODE_CHRISTMAS | +| 25 | RGBLIGHT_MODE_STATIC_GRADIENT | +| 26 | RGBLIGHT_MODE_STATIC_GRADIENT + 1 | +| 27 | RGBLIGHT_MODE_STATIC_GRADIENT + 2 | +| 28 | RGBLIGHT_MODE_STATIC_GRADIENT + 3 | +| 29 | RGBLIGHT_MODE_STATIC_GRADIENT + 4 | +| 30 | RGBLIGHT_MODE_STATIC_GRADIENT + 5 | +| 31 | RGBLIGHT_MODE_STATIC_GRADIENT + 6 | +| 32 | RGBLIGHT_MODE_STATIC_GRADIENT + 7 | +| 33 | RGBLIGHT_MODE_STATIC_GRADIENT + 8 | +| 34 | RGBLIGHT_MODE_STATIC_GRADIENT + 9 | +| 35 | RGBLIGHT_MODE_RGB_TEST | +| 36 | RGBLIGHT_MODE_ALTERNATING | +|-----------------|-----------------------------------| + *****/ + +#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym, +#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##sym, +enum RGBLIGHT_EFFECT_MODE { + RGBLIGHT_MODE_zero = 0, +#include "rgblight_modes.h" + RGBLIGHT_MODE_last +}; + +#ifndef RGBLIGHT_H_DUMMY_DEFINE + +# define RGBLIGHT_MODES (RGBLIGHT_MODE_last - 1) + +// sample: #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 + +# ifndef RGBLIGHT_EFFECT_BREATHE_MAX +# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 +# endif + +# ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 +# endif + +# ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 +# endif + +# ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET +# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 +# endif + +# ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM +# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (effect_num_leds) +# endif + +# ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL +# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 +# endif + +# ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP +# define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 +# endif + +# ifndef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 8 +# endif +# ifndef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 17 +# endif +# ifndef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 17 +# endif +# ifndef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 255 +# endif + +# define RGBLED_TIMER_TOP F_CPU / (256 * 64) // #define RGBLED_TIMER_TOP 0xFF10 -#include -#include -#include "eeconfig.h" -#ifndef RGBLIGHT_CUSTOM_DRIVER -#include "ws2812.h" -#endif -#include "color.h" -#include "rgblight_list.h" +# include +# include +# include "eeconfig.h" +# ifndef RGBLIGHT_CUSTOM_DRIVER +# include "ws2812.h" +# endif +# include "color.h" +# include "rgblight_list.h" + +# if defined(__AVR__) +# include +# endif extern LED_TYPE led[RGBLED_NUM]; -extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; -extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; -extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; -extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; -extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; +extern bool is_rgblight_initialized; +// Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now) typedef union { - uint32_t raw; - struct { - bool enable :1; - uint8_t mode :6; - uint16_t hue :9; - uint8_t sat :8; - uint8_t val :8; - uint8_t speed :8;//EECONFIG needs to be increased to support this - }; + uint32_t raw; + struct { + bool enable : 1; + uint8_t mode : 7; + uint8_t hue : 8; + uint8_t sat : 8; + uint8_t val : 8; + uint8_t speed : 8; // EECONFIG needs to be increased to support this + }; } rgblight_config_t; -void rgblight_init(void); +typedef struct _rgblight_status_t { + uint8_t base_mode; + bool timer_enabled; +# ifdef RGBLIGHT_SPLIT + uint8_t change_flags; +# endif +} rgblight_status_t; + +/* === Utility Functions ===*/ +void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); +void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); + +/* === Low level Functions === */ +void rgblight_set(void); +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); + +/* === Effects and Animations Functions === */ +/* effect range setting */ +void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds); + +/* direct operation */ +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); +void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index); +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); +void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); + +# ifndef RGBLIGHT_SPLIT +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); +void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val); +# endif + +/* effect mode change */ +void rgblight_mode(uint8_t mode); +void rgblight_mode_noeeprom(uint8_t mode); void rgblight_increase(void); void rgblight_decrease(void); +void rgblight_step(void); +void rgblight_step_noeeprom(void); +void rgblight_step_reverse(void); +void rgblight_step_reverse_noeeprom(void); + +/* effects mode disable/enable */ void rgblight_toggle(void); +void rgblight_toggle_noeeprom(void); void rgblight_enable(void); +void rgblight_enable_noeeprom(void); void rgblight_disable(void); -void rgblight_step(void); -void rgblight_step_reverse(void); -uint8_t rgblight_get_mode(void); -void rgblight_mode(uint8_t mode); -void rgblight_set(void); -void rgblight_update_dword(uint32_t dword); +void rgblight_disable_noeeprom(void); + +/* hue, sat, val change */ void rgblight_increase_hue(void); +void rgblight_increase_hue_noeeprom(void); void rgblight_decrease_hue(void); +void rgblight_decrease_hue_noeeprom(void); void rgblight_increase_sat(void); +void rgblight_increase_sat_noeeprom(void); void rgblight_decrease_sat(void); +void rgblight_decrease_sat_noeeprom(void); void rgblight_increase_val(void); +void rgblight_increase_val_noeeprom(void); void rgblight_decrease_val(void); +void rgblight_decrease_val_noeeprom(void); void rgblight_increase_speed(void); void rgblight_decrease_speed(void); -void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val); -uint16_t rgblight_get_hue(void); +void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); + +/* query */ +uint8_t rgblight_get_mode(void); +uint8_t rgblight_get_hue(void); uint8_t rgblight_get_sat(void); uint8_t rgblight_get_val(void); -void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); -void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); -void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index); +/* === qmk_firmware (core)internal Functions === */ +void rgblight_init(void); +uint32_t rgblight_read_dword(void); +void rgblight_update_dword(uint32_t dword); uint32_t eeconfig_read_rgblight(void); -void eeconfig_update_rgblight(uint32_t val); -void eeconfig_update_rgblight_default(void); -void eeconfig_debug_rgblight(void); +void eeconfig_update_rgblight(uint32_t val); +void eeconfig_update_rgblight_default(void); +void eeconfig_debug_rgblight(void); void rgb_matrix_increase(void); void rgb_matrix_decrease(void); -void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); -void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); - -void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); -void rgblight_mode_noeeprom(uint8_t mode); -void rgblight_toggle_noeeprom(void); -void rgblight_enable_noeeprom(void); -void rgblight_disable_noeeprom(void); - -void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); +void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); - -#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) +# define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); void rgblight_task(void); @@ -155,12 +263,52 @@ void rgblight_timer_init(void); void rgblight_timer_enable(void); void rgblight_timer_disable(void); void rgblight_timer_toggle(void); -void rgblight_effect_breathing(uint8_t interval); -void rgblight_effect_rainbow_mood(uint8_t interval); -void rgblight_effect_rainbow_swirl(uint8_t interval); -void rgblight_effect_snake(uint8_t interval); -void rgblight_effect_knight(uint8_t interval); -void rgblight_effect_christmas(void); -void rgblight_effect_rgbtest(void); - -#endif + +# ifdef RGBLIGHT_SPLIT +# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0) +# define RGBLIGHT_STATUS_CHANGE_HSVS (1 << 1) +# define RGBLIGHT_STATUS_CHANGE_TIMER (1 << 2) +# define RGBLIGHT_STATUS_ANIMATION_TICK (1 << 3) + +typedef struct _rgblight_syncinfo_t { + rgblight_config_t config; + rgblight_status_t status; +} rgblight_syncinfo_t; + +/* for split keyboard master side */ +uint8_t rgblight_get_change_flags(void); +void rgblight_clear_change_flags(void); +void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo); +/* for split keyboard slave side */ +void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom); +# endif + +# ifdef RGBLIGHT_USE_TIMER + +typedef struct _animation_status_t { + uint16_t last_timer; + uint8_t delta; /* mode - base_mode */ + bool restart; + union { + uint16_t pos16; + uint8_t pos; + int8_t current_hue; + uint16_t current_offset; + }; +} animation_status_t; + +extern animation_status_t animation_status; + +void rgblight_effect_breathing(animation_status_t *anim); +void rgblight_effect_rainbow_mood(animation_status_t *anim); +void rgblight_effect_rainbow_swirl(animation_status_t *anim); +void rgblight_effect_snake(animation_status_t *anim); +void rgblight_effect_knight(animation_status_t *anim); +void rgblight_effect_christmas(animation_status_t *anim); +void rgblight_effect_rgbtest(animation_status_t *anim); +void rgblight_effect_alternating(animation_status_t *anim); + +# endif + +#endif // #ifndef RGBLIGHT_H_DUMMY_DEFINE +#endif // RGBLIGHT_H diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk index f9210319e334..a1ca27ca469e 100644 --- a/keyboards/mxss/rules.mk +++ b/keyboards/mxss/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -30,10 +30,12 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +SRC += mxss_frontled.c + # Remove the common RGB light code and use my iteration instead OPT_DEFS += -DRGBLIGHT_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c SRC += rgblight.c +SRC += color.c SRC += ws2812.c CIE1931_CURVE = yes -LED_BREATHING_TABLE = yes diff --git a/keyboards/mxss/templates/keymap.c b/keyboards/mxss/templates/keymap.c index 13dbb7206c34..a18cff77f0cc 100644 --- a/keyboards/mxss/templates/keymap.c +++ b/keyboards/mxss/templates/keymap.c @@ -14,23 +14,24 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include "mxss_frontled.h" -// Predefined colors for layers +hs_set caps_color = { .hue = 0, .sat = 255 }; + +// Colors for layers // Format: {hue, saturation} // {0, 0} to turn off the LED // Add additional rows to handle more layers -hs_set layer_colors[] = { - [0] = {0, 0}, // Color for Layer 0 - [1] = {86, 255}, // Color for Layer 1 - [2] = {36, 255}, // Color for Layer 2 - [3] = {185, 255}, // Color for Layer 3 +hs_set layer_colors[4] = { + [0] = {.hue = 0, .sat = 0}, // Color for Layer 0 + [1] = {.hue = 86, .sat = 255}, // Color for Layer 1 + [2] = {.hue = 36, .sat = 255}, // Color for Layer 2 + [3] = {.hue = 185, .sat = 255}, // Color for Layer 3 }; -const size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t); +size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t); // Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control enum custom_keycodes { - MY_KEYCODE = NEW_SAFE_RANGE, + MY_KEYCODE = NEW_SAFE_RANGE, }; From d3abebb601e4e45f8c0b44c34d3c80dbf5bb9203 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 24 Dec 2019 00:10:50 +0000 Subject: [PATCH 134/331] Create central board for bluepill --- drivers/boards/STM32_F103_STM32DUINO/board.c | 56 ++++++ drivers/boards/STM32_F103_STM32DUINO/board.h | 166 ++++++++++++++++++ drivers/boards/STM32_F103_STM32DUINO/board.mk | 5 + 3 files changed, 227 insertions(+) create mode 100644 drivers/boards/STM32_F103_STM32DUINO/board.c create mode 100644 drivers/boards/STM32_F103_STM32DUINO/board.h create mode 100644 drivers/boards/STM32_F103_STM32DUINO/board.mk diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.c b/drivers/boards/STM32_F103_STM32DUINO/board.c new file mode 100644 index 000000000000..8c5a87f35f8b --- /dev/null +++ b/drivers/boards/STM32_F103_STM32DUINO/board.c @@ -0,0 +1,56 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +// Value to place in RTC backup register 10 for persistent bootloader mode +#define RTC_BOOTLOADER_FLAG 0x424C + +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { + //JTAG-DP Disabled and SW-DP Enabled + AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + //Set backup register DR10 to enter bootloader on reset + BKP->DR10 = RTC_BOOTLOADER_FLAG; +} diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.h b/drivers/boards/STM32_F103_STM32DUINO/board.h new file mode 100644 index 000000000000..09d182d6cafc --- /dev/null +++ b/drivers/boards/STM32_F103_STM32DUINO/board.h @@ -0,0 +1,166 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for a Generic STM32F103 board. + */ + +/* + * Board identifier. + */ +#define BOARD_STM32_F103_STM32DUINO +#define BOARD_NAME "GENERIC STM32F103C8T6 board - stm32duino bootloader" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + */ +#define STM32F103xB + +/* + * IO pins assignments + */ + +/* on-board */ + +#define GPIOA_LED 8 +#define GPIOD_OSC_IN 0 +#define GPIOD_OSC_OUT 1 + +/* In case your board has a "USB enable" hardware + controlled by a pin, define it here. (It could be just + a 1.5k resistor connected to D+ line.) +*/ +/* +#define GPIOB_USB_DISC 10 +*/ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + * PA2 - Alternate output (USART2 TX). + * PA3 - Normal input (USART2 RX). + * PA9 - Alternate output (USART1 TX). + * PA10 - Normal input (USART1 RX). + */ +#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + * PB10 - Push Pull output (USB switch). + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + * PC13 - Push Pull output (LED). + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +/* The point is that most of the generic STM32F103* boards + have a 1.5k resistor connected on one end to the D+ line + and on the other end to some pin. Or even a slightly more + complicated "USB enable" circuit, controlled by a pin. + That should go here. + + However on some boards (e.g. one that I have), there's no + such hardware. In which case it's better to not do anything. +*/ +/* +#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); + +/* + * USB bus de-activation macro, required by the USB driver. + */ +/* +#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.mk b/drivers/boards/STM32_F103_STM32DUINO/board.mk new file mode 100644 index 000000000000..81141bdfd95b --- /dev/null +++ b/drivers/boards/STM32_F103_STM32DUINO/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/STM32_F103_STM32DUINO/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/STM32_F103_STM32DUINO From 98e55557052f30f4c621568247526cc4d5d41026 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 24 Dec 2019 00:14:48 +0000 Subject: [PATCH 135/331] Remove duplicate board files --- .../ortho48/boards/GENERIC_STM32_F103/board.c | 56 ------ .../ortho48/boards/GENERIC_STM32_F103/board.h | 166 ------------------ .../boards/GENERIC_STM32_F103/board.mk | 5 - .../ortho60/boards/GENERIC_STM32_F103/board.c | 56 ------ .../ortho60/boards/GENERIC_STM32_F103/board.h | 166 ------------------ .../boards/GENERIC_STM32_F103/board.mk | 5 - .../ortho75/boards/GENERIC_STM32_F103/board.c | 56 ------ .../ortho75/boards/GENERIC_STM32_F103/board.h | 166 ------------------ .../boards/GENERIC_STM32_F103/board.mk | 5 - .../boards/GENERIC_STM32_F103/board.c | 56 ------ .../boards/GENERIC_STM32_F103/board.h | 166 ------------------ .../boards/GENERIC_STM32_F103/board.mk | 5 - .../boards/GENERIC_STM32_F103/board.c | 56 ------ .../boards/GENERIC_STM32_F103/board.h | 166 ------------------ .../boards/GENERIC_STM32_F103/board.mk | 5 - .../boards/GENERIC_STM32_F103/board.c | 56 ------ .../boards/GENERIC_STM32_F103/board.h | 166 ------------------ .../boards/GENERIC_STM32_F103/board.mk | 5 - .../boards/GENERIC_STM32_F103/board.c | 56 ------ .../boards/GENERIC_STM32_F103/board.h | 166 ------------------ .../boards/GENERIC_STM32_F103/board.mk | 5 - 21 files changed, 1589 deletions(-) delete mode 100644 keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.c delete mode 100644 keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.h delete mode 100644 keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.mk delete mode 100644 keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.c delete mode 100644 keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.h delete mode 100644 keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.mk delete mode 100644 keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.c delete mode 100644 keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.h delete mode 100644 keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.mk delete mode 100644 keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c delete mode 100644 keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h delete mode 100644 keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk delete mode 100644 keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c delete mode 100644 keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h delete mode 100644 keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk delete mode 100644 keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.c delete mode 100644 keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.h delete mode 100644 keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.mk delete mode 100644 keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.c delete mode 100644 keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.h delete mode 100644 keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.mk diff --git a/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.c deleted file mode 100644 index 8c5a87f35f8b..000000000000 --- a/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -// Value to place in RTC backup register 10 for persistent bootloader mode -#define RTC_BOOTLOADER_FLAG 0x424C - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { - //JTAG-DP Disabled and SW-DP Enabled - AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; - //Set backup register DR10 to enter bootloader on reset - BKP->DR10 = RTC_BOOTLOADER_FLAG; -} diff --git a/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.h deleted file mode 100644 index 9427adabf11d..000000000000 --- a/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOA_LED 8 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.mk deleted file mode 100644 index 6b8b312fd9fd..000000000000 --- a/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.c deleted file mode 100644 index 8c5a87f35f8b..000000000000 --- a/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -// Value to place in RTC backup register 10 for persistent bootloader mode -#define RTC_BOOTLOADER_FLAG 0x424C - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { - //JTAG-DP Disabled and SW-DP Enabled - AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; - //Set backup register DR10 to enter bootloader on reset - BKP->DR10 = RTC_BOOTLOADER_FLAG; -} diff --git a/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.h deleted file mode 100644 index 9427adabf11d..000000000000 --- a/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOA_LED 8 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.mk deleted file mode 100644 index 6b8b312fd9fd..000000000000 --- a/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.c deleted file mode 100644 index 8c5a87f35f8b..000000000000 --- a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -// Value to place in RTC backup register 10 for persistent bootloader mode -#define RTC_BOOTLOADER_FLAG 0x424C - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { - //JTAG-DP Disabled and SW-DP Enabled - AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; - //Set backup register DR10 to enter bootloader on reset - BKP->DR10 = RTC_BOOTLOADER_FLAG; -} diff --git a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.h deleted file mode 100644 index 9427adabf11d..000000000000 --- a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOA_LED 8 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.mk deleted file mode 100644 index 6b8b312fd9fd..000000000000 --- a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c deleted file mode 100644 index 8c5a87f35f8b..000000000000 --- a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -// Value to place in RTC backup register 10 for persistent bootloader mode -#define RTC_BOOTLOADER_FLAG 0x424C - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { - //JTAG-DP Disabled and SW-DP Enabled - AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; - //Set backup register DR10 to enter bootloader on reset - BKP->DR10 = RTC_BOOTLOADER_FLAG; -} diff --git a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h deleted file mode 100644 index 9427adabf11d..000000000000 --- a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOA_LED 8 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk deleted file mode 100644 index 6b8b312fd9fd..000000000000 --- a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c deleted file mode 100644 index 8c5a87f35f8b..000000000000 --- a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -// Value to place in RTC backup register 10 for persistent bootloader mode -#define RTC_BOOTLOADER_FLAG 0x424C - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { - //JTAG-DP Disabled and SW-DP Enabled - AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; - //Set backup register DR10 to enter bootloader on reset - BKP->DR10 = RTC_BOOTLOADER_FLAG; -} diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h deleted file mode 100644 index 9427adabf11d..000000000000 --- a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOA_LED 8 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk deleted file mode 100644 index 6b8b312fd9fd..000000000000 --- a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.c b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.c deleted file mode 100644 index 8c5a87f35f8b..000000000000 --- a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -// Value to place in RTC backup register 10 for persistent bootloader mode -#define RTC_BOOTLOADER_FLAG 0x424C - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { - //JTAG-DP Disabled and SW-DP Enabled - AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; - //Set backup register DR10 to enter bootloader on reset - BKP->DR10 = RTC_BOOTLOADER_FLAG; -} diff --git a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.h b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.h deleted file mode 100644 index 9427adabf11d..000000000000 --- a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOA_LED 8 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.mk b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.mk deleted file mode 100644 index 6b8b312fd9fd..000000000000 --- a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.c b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.c deleted file mode 100644 index 8c5a87f35f8b..000000000000 --- a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -// Value to place in RTC backup register 10 for persistent bootloader mode -#define RTC_BOOTLOADER_FLAG 0x424C - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { - //JTAG-DP Disabled and SW-DP Enabled - AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; - //Set backup register DR10 to enter bootloader on reset - BKP->DR10 = RTC_BOOTLOADER_FLAG; -} diff --git a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.h b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.h deleted file mode 100644 index 9427adabf11d..000000000000 --- a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOA_LED 8 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.mk b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.mk deleted file mode 100644 index 6b8b312fd9fd..000000000000 --- a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 From ee86be9dca3a4f370672562b551cc8af928f0152 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 24 Dec 2019 00:17:46 +0000 Subject: [PATCH 136/331] Refactor to use new central board config files --- keyboards/cannonkeys/ortho48/rules.mk | 2 +- keyboards/cannonkeys/ortho60/rules.mk | 2 +- keyboards/cannonkeys/ortho75/rules.mk | 2 +- keyboards/cannonkeys/practice60/rules.mk | 2 +- keyboards/cannonkeys/practice65/rules.mk | 2 +- keyboards/converter/siemens_tastatur/rules.mk | 2 +- keyboards/handwired/onekey/bluepill/rules.mk | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index 4bca8fde0590..d042d8a82c39 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 +BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index d2fa535f4143..997b6af6ed21 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 +BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index 5b90e87fd7ef..d0512a49b7f6 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 +BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index 7c3fec31e639..81dc1e9dd899 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 +BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index b43e591aeb64..c927a486b7a0 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 +BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 diff --git a/keyboards/converter/siemens_tastatur/rules.mk b/keyboards/converter/siemens_tastatur/rules.mk index d89f7f5f6090..bc0ed5316592 100644 --- a/keyboards/converter/siemens_tastatur/rules.mk +++ b/keyboards/converter/siemens_tastatur/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 +BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 69436650b5e6..063f21f7fd68 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 +BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 From 992656e753263577e70c272ccc068bd619aee43b Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 24 Dec 2019 00:55:19 +0000 Subject: [PATCH 137/331] Fix cannonkeys f103 boards --- keyboards/cannonkeys/bluepill/keyboard.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/keyboards/cannonkeys/bluepill/keyboard.c b/keyboards/cannonkeys/bluepill/keyboard.c index 865628eccdea..7eb30ea132f4 100644 --- a/keyboards/cannonkeys/bluepill/keyboard.c +++ b/keyboards/cannonkeys/bluepill/keyboard.c @@ -4,10 +4,14 @@ #include "util.h" #include "quantum.h" -#ifdef BOARD_GENERIC_STM32_F103 +#ifdef BOARD_STM32_F103_STM32DUINO #define LED_ON() do { palClearPad(GPIOC, 13) ;} while (0) #define LED_OFF() do { palSetPad(GPIOC, 13); } while (0) #define LED_TGL() do { palTogglePad(GPIOC, 13); } while (0) +#else +#define LED_ON() +#define LED_OFF() +#define LED_TGL() #endif void matrix_init_kb(void){ From 05d6e6ca78087969d7a47862341d10b6b555c37e Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Mon, 27 Jan 2020 05:04:39 +0100 Subject: [PATCH 138/331] Ensure setPinInput actually sets input high-Z (#6237) * Ensure setPinInput actually sets input high-z * Fixed _PIN_ADDRESS Macro arguments as recommended by vomindoraan * Fixed instances of setInput to use new behavour * Changed kmac matrix to use input with pullups * Update keyboards/gh60/revc/revc.h Co-Authored-By: fauxpark * Fixed input state for unselect_rows * fixed merge conflict * Updated all instances of older uses of setPinInput() * Fixed naming mistake Co-authored-by: fauxpark --- .../40percentclub/mf68/keymaps/emdarcher/keymap.c | 2 -- keyboards/atreus62/keymaps/xyverz/keymap.c | 3 +-- keyboards/atreus62/keymaps/xyverz/readme.md | 4 ++++ keyboards/eco/keymaps/xyverz/keymap.c | 4 +--- keyboards/gh60/revc/revc.h | 10 +++++----- keyboards/gingham/matrix.c | 2 +- keyboards/handwired/owlet60/matrix.c | 5 +---- keyboards/hineybush/h87a/keymaps/wkl/keymap.c | 2 -- keyboards/hineybush/h88/h88.c | 2 -- keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c | 1 - keyboards/kmac/matrix.c | 2 +- keyboards/minidox/keymaps/xyverz/keymap.c | 4 +--- keyboards/noxary/268_2/268_2.c | 1 - keyboards/orthodox/keymaps/xyverz/keymap.c | 4 +--- keyboards/yd60mq/yd60mq.c | 1 - layouts/community/ortho_4x12/xyverz/keymap.c | 4 +--- layouts/community/ortho_5x12/xyverz/keymap.c | 4 +--- quantum/config_common.h | 2 +- quantum/quantum.h | 3 ++- 19 files changed, 21 insertions(+), 39 deletions(-) diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c index 546f862a6e3c..eb281f5f180c 100644 --- a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c @@ -48,8 +48,6 @@ void led_set_user(uint8_t usb_led){ } else { //set to Hi-Z setPinInput(B0); - writePinLow(B0); setPinInput(D5); - writePinLow(D5); } } diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index 4babed4c11f7..b852d5d7b965 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -30,6 +30,7 @@ 0.6 - Swapped ESC and GRV in all layers. 0.7 - Brought code up to current standards. 0.8 - Added MACLOCK macro. + 0.9 - Updated code to correspond to new setPinInput behaviour TODO: @@ -124,9 +125,7 @@ void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros setPinInput(D5); - writePinLow(D5); setPinInput(B0); - writePinLow(B0); #endif }; diff --git a/keyboards/atreus62/keymaps/xyverz/readme.md b/keyboards/atreus62/keymaps/xyverz/readme.md index f91a87da4fe0..531e3b28d995 100644 --- a/keyboards/atreus62/keymaps/xyverz/readme.md +++ b/keyboards/atreus62/keymaps/xyverz/readme.md @@ -30,6 +30,10 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h ### 0.7 * Brought code up to new standards (as of 27 June 2019). * Updated this readme file. +### 0.8 + * Added MACLOCK macro. +### 0.9 + * Updated code to correspond to new setPinInput behaviour. ### TODO: diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c index 5a1974336a65..06054e9ac8da 100644 --- a/keyboards/eco/keymaps/xyverz/keymap.c +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -132,9 +132,7 @@ void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros setPinInput(D5); - writePinLow(D5); setPinInput(B0); - writePinLow(B0); #endif }; @@ -155,4 +153,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/keyboards/gh60/revc/revc.h b/keyboards/gh60/revc/revc.h index dda7a0db6d3b..e183f776e905 100644 --- a/keyboards/gh60/revc/revc.h +++ b/keyboards/gh60/revc/revc.h @@ -18,11 +18,11 @@ inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } -inline void gh60_caps_led_off(void) { setPinInput(B2); writePinLow(B2); } -inline void gh60_poker_leds_off(void) { setPinInput(F4); writePinLow(F4); } -inline void gh60_fn_led_off(void) { setPinInput(F5); writePinLow(F5); } -inline void gh60_esc_led_off(void) { setPinInput(F6); writePinLow(F6); } -inline void gh60_wasd_leds_off(void) { setPinInput(F7); writePinLow(F7); } +inline void gh60_caps_led_off(void) { setPinInput(B2); } +inline void gh60_poker_leds_off(void) { setPinInput(F4); } +inline void gh60_fn_led_off(void) { setPinInput(F5); } +inline void gh60_esc_led_off(void) { setPinInput(F6); } +inline void gh60_wasd_leds_off(void) { setPinInput(F7); } /* GH60 keymap definition macro * K2C, K31 and K3C are extra keys for ISO diff --git a/keyboards/gingham/matrix.c b/keyboards/gingham/matrix.c index 790ba9c287bb..5ac81e791145 100644 --- a/keyboards/gingham/matrix.c +++ b/keyboards/gingham/matrix.c @@ -150,7 +150,7 @@ static void unselect_row(uint8_t row) static void unselect_rows(void) { for(uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInput(row_pins[x]); + setPinInputHigh(row_pins[x]); } } diff --git a/keyboards/handwired/owlet60/matrix.c b/keyboards/handwired/owlet60/matrix.c index 994f527ec772..dafc19fcc487 100644 --- a/keyboards/handwired/owlet60/matrix.c +++ b/keyboards/handwired/owlet60/matrix.c @@ -215,10 +215,7 @@ void matrix_init(void) { matrix_init_quantum(); setPinInput(D5); - writePinLow(D5); - - setPinInput(B0); - writePinLow(B0); + setPinInput(B0); } // modified for per col read matrix scan diff --git a/keyboards/hineybush/h87a/keymaps/wkl/keymap.c b/keyboards/hineybush/h87a/keymaps/wkl/keymap.c index 72b4d4e44da4..e3e410823348 100644 --- a/keyboards/hineybush/h87a/keymaps/wkl/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/wkl/keymap.c @@ -59,7 +59,6 @@ void led_set_user(uint8_t usb_led) { writePinLow(D5); } else { setPinInput(D5); - writePinLow(D5); } if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { @@ -67,7 +66,6 @@ void led_set_user(uint8_t usb_led) { writePinLow(E6); } else { setPinInput(E6); - writePinLow(E6); } } diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c index 46d6393907f3..1f702e9e9dc5 100644 --- a/keyboards/hineybush/h88/h88.c +++ b/keyboards/hineybush/h88/h88.c @@ -54,7 +54,6 @@ void led_set_user(uint8_t usb_led) { writePinLow(D5); } else { setPinInput(D5); - writePinLow(D5); } if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { @@ -62,7 +61,6 @@ void led_set_user(uint8_t usb_led) { writePinLow(E6); } else { setPinInput(E6); - writePinLow(E6); } } diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c b/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c index ad3b6f6c5cad..1221e753a451 100644 --- a/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c @@ -85,6 +85,5 @@ void led_set_user(uint8_t usb_led) { writePinLow(B2); } else { setPinInput(B2); - writePinLow(B2); } } diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c index 2212ee076b4c..9bc59a078444 100644 --- a/keyboards/kmac/matrix.c +++ b/keyboards/kmac/matrix.c @@ -140,7 +140,7 @@ static void select_col(uint8_t col) { static void init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInput(row_pins[x]); + setPinInputHigh(row_pins[x]); } setPinInputHigh(E2); diff --git a/keyboards/minidox/keymaps/xyverz/keymap.c b/keyboards/minidox/keymaps/xyverz/keymap.c index 994ee4e1b41e..4c7a05227f1f 100644 --- a/keyboards/minidox/keymaps/xyverz/keymap.c +++ b/keyboards/minidox/keymaps/xyverz/keymap.c @@ -169,9 +169,7 @@ void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros setPinInput(D5); - writePinLow(D5); setPinInput(B0); - writePinLow(B0); #endif }; @@ -192,4 +190,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/keyboards/noxary/268_2/268_2.c b/keyboards/noxary/268_2/268_2.c index 9e2d822364c0..5af56a386d67 100644 --- a/keyboards/noxary/268_2/268_2.c +++ b/keyboards/noxary/268_2/268_2.c @@ -21,7 +21,6 @@ void led_set_kb(uint8_t usb_led) { writePinHigh(B0); } else { setPinInput(B0); - writePinLow(B0); } led_set_user(usb_led); diff --git a/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c index cc3c38943b1a..0417c1a4a006 100644 --- a/keyboards/orthodox/keymaps/xyverz/keymap.c +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c @@ -63,9 +63,7 @@ void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros setPinInput(D5); - writePinLow(D5); setPinInput(B0); - writePinLow(B0); #endif }; @@ -86,4 +84,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/keyboards/yd60mq/yd60mq.c b/keyboards/yd60mq/yd60mq.c index 96306d6a6602..6e391046e582 100644 --- a/keyboards/yd60mq/yd60mq.c +++ b/keyboards/yd60mq/yd60mq.c @@ -6,7 +6,6 @@ void led_set_kb(uint8_t usb_led) { writePinLow(F4); } else { setPinInput(F4); - writePinLow(F4); } led_set_user(usb_led); diff --git a/layouts/community/ortho_4x12/xyverz/keymap.c b/layouts/community/ortho_4x12/xyverz/keymap.c index a21c143f008f..c9811ea4b1fd 100644 --- a/layouts/community/ortho_4x12/xyverz/keymap.c +++ b/layouts/community/ortho_4x12/xyverz/keymap.c @@ -132,9 +132,7 @@ void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros setPinInput(D5); - writePinLow(D5); setPinInput(B0); - writePinLow(B0); #endif }; @@ -155,4 +153,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/layouts/community/ortho_5x12/xyverz/keymap.c b/layouts/community/ortho_5x12/xyverz/keymap.c index 2cca237bbe69..00fca1b48e49 100644 --- a/layouts/community/ortho_5x12/xyverz/keymap.c +++ b/layouts/community/ortho_5x12/xyverz/keymap.c @@ -151,9 +151,7 @@ void matrix_init_user(void) { #ifdef BOOTLOADER_CATERINA // This will disable the red LEDs on the ProMicros setPinInput(D5); - writePinLow(D5); setPinInput(B0); - writePinLow(B0); #endif }; @@ -174,4 +172,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/quantum/config_common.h b/quantum/config_common.h index 8de3f070c592..f981f3f8cbd1 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -132,7 +132,7 @@ # endif # ifndef __ASSEMBLER__ -# define _PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset) +# define _PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + ((p) >> PORT_SHIFTER) + (offset)) // Port X Input Pins Address # define PINx_ADDRESS(p) _PIN_ADDRESS(p, 0) // Port X Data Direction Register, 0:input 1:output diff --git a/quantum/quantum.h b/quantum/quantum.h index 48887026d2c2..3b9eeaa6de1b 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -174,7 +174,7 @@ extern layer_state_t layer_state; #if defined(__AVR__) typedef uint8_t pin_t; -# define setPinInput(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF)) +# define setPinInput(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF)) # define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) # define setPinInputLow(pin) _Static_assert(0, "AVR processors cannot implement an input as pull low") # define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF)) @@ -184,6 +184,7 @@ typedef uint8_t pin_t; # define writePin(pin, level) ((level) ? writePinHigh(pin) : writePinLow(pin)) # define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF))) + #elif defined(PROTOCOL_CHIBIOS) typedef ioline_t pin_t; From 5fb95c5f94d6c939dfea2fc716ef818d6242b918 Mon Sep 17 00:00:00 2001 From: "Michael F. Lamb" Date: Sun, 26 Jan 2020 20:26:40 -0800 Subject: [PATCH 139/331] create users/datagrok (#7653) * users/datagrok: add shared functions * users/datagrok: improve base-layer selection feature * users/datagrok: add README.md --- users/datagrok/README.md | 63 +++++++++++++++++ users/datagrok/feature_cdeq.c | 47 +++++++++++++ users/datagrok/feature_cdeq.h | 2 + .../feature_default_layers_selector.c | 46 +++++++++++++ .../feature_default_layers_selector.h | 69 +++++++++++++++++++ 5 files changed, 227 insertions(+) create mode 100644 users/datagrok/README.md create mode 100644 users/datagrok/feature_cdeq.c create mode 100644 users/datagrok/feature_cdeq.h create mode 100644 users/datagrok/feature_default_layers_selector.c create mode 100644 users/datagrok/feature_default_layers_selector.h diff --git a/users/datagrok/README.md b/users/datagrok/README.md new file mode 100644 index 000000000000..0d58c04e745e --- /dev/null +++ b/users/datagrok/README.md @@ -0,0 +1,63 @@ +# datagrok's QMK user-space code + +## cdeq "comma dot exclamation question" + +This is a hack to place `question mark` on `shift-comma` and `exclamation mark` on `shift-period`. + +When using an operating system configured for a US/qwerty layout this replaces the angle brackets `<` `>` with `?` `!`. This helps on small keyboards to keep symbols for prose co-located in one layer, and symbols for programming in another. + +It's a "hack" because the "proper" way to accomplish this would be to edit the operating system's keymap. + +### setup + +in your `keymap.c`: + + #include "feature_cdeq.h" + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return process_record_cdeq(keycode, record); + } + +in your `rules.mk`, + + SRC += feature_cdeq.c + +### examples + +- atreus:datagrok +- bm43a:datagrok +- mitosis:datagrok + +## base layer selector + +Defines a keycode `KF_LAYO` to rotate between available default layers. + +`Shift`+`KF_LAYO` makes the currently selected one persistent across reboots. + +This is useful if you'd like your keyboard to support and toggle between QWERTY, Dvorak, Colemak, Workman, and other layouts while keeping a common arrangement of modifier and function keys. + +Since toggling layouts seems like something one does infrequently, I wanted to be able to operate this feature with a single key, instead of one for each layer like planck:default or bootmagic. + +### setup + +in your `keymap.c`: + + #define KF_LAYO SAFE_RANGE + #include "feature_default_layers_selector.h" + const uint8_t highest_base_layer = 4; + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return \ + process_record_save_default_layer(keycode, record) && \ + process_record_select_default_layer(keycode, record); + } + +in your `rules.mk`, + + SRC += feature_default_layers_selector.c + +### examples + +- atreus:datagrok +- bm43a:datagrok +- mitosis:datagrok diff --git a/users/datagrok/feature_cdeq.c b/users/datagrok/feature_cdeq.c new file mode 100644 index 000000000000..c1796ab227a0 --- /dev/null +++ b/users/datagrok/feature_cdeq.c @@ -0,0 +1,47 @@ +// This is a hack to place on and on , when using an operating system configured for a +// US/qwerty layout. +// +// cdeq = "comma dot exclamation question" + +#include QMK_KEYBOARD_H + +bool comm_shifted = false; +bool ques_shifted = false; + +bool process_record_cdeq(uint16_t keycode, keyrecord_t *record) { + uint8_t shifted; + uint16_t s_keycode; + bool *k_shifted; + + switch (keycode) { + case KC_COMM: + s_keycode = KC_SLSH; + k_shifted = &comm_shifted; + break; + case KC_DOT: + s_keycode = KC_1; + k_shifted = &ques_shifted; + break; + default: + return true; + } + + shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)); + + // Keydown. If shift is currently pressed, register its alternate keycode. + if (record->event.pressed && shifted) { + *k_shifted = true; + register_code(s_keycode); + return false; + // Keyup. If shift was pressed back when the key was pressed, unregister + // its alternate keycode. + } else if (!(record->event.pressed) && *k_shifted) { + *k_shifted = false; + unregister_code(s_keycode); + return false; + // Otherwise, behave as normal. + } else { + return true; + } +} diff --git a/users/datagrok/feature_cdeq.h b/users/datagrok/feature_cdeq.h new file mode 100644 index 000000000000..ff3509b4defa --- /dev/null +++ b/users/datagrok/feature_cdeq.h @@ -0,0 +1,2 @@ +#include QMK_KEYBOARD_H +bool process_record_cdeq(uint16_t keycode, keyrecord_t *record); diff --git a/users/datagrok/feature_default_layers_selector.c b/users/datagrok/feature_default_layers_selector.c new file mode 100644 index 000000000000..c83c773f8356 --- /dev/null +++ b/users/datagrok/feature_default_layers_selector.c @@ -0,0 +1,46 @@ +#include "feature_default_layers_selector.h" + +#ifdef AUDIO_ENABLE +#include "audio.h" +#ifdef DEFAULT_LAYER_SONGS +extern float default_layer_songs[][16][2]; +#endif +#endif + +bool process_record_save_default_layer(uint16_t keycode, keyrecord_t *record) { + +#if defined(AUDIO_ENABLE) + float saved_song[][2] = SONG(COIN_SOUND); +#endif + + if (!(keycode == KF_LAYO + && record->event.pressed + && get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)))) { + return true; + } + + eeconfig_update_default_layer(default_layer_state); +#if defined(AUDIO_ENABLE) + PLAY_SONG(saved_song); +#endif + return false; +} + +bool process_record_select_default_layer(uint16_t keycode, keyrecord_t *record) { + if (!(keycode == KF_LAYO + && record->event.pressed)) { + return true; + } + if (!default_layer_state) { + default_layer_set(2); + } else { + default_layer_set( + (((1U<<(highest_base_layer+1))-1) & (default_layer_state<<1)) + | (default_layer_state>>highest_base_layer)); + } + led_set(host_keyboard_leds()); +#if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) + PLAY_SONG(default_layer_songs[get_highest_layer(default_layer_state)]); +#endif + return false; +} diff --git a/users/datagrok/feature_default_layers_selector.h b/users/datagrok/feature_default_layers_selector.h new file mode 100644 index 000000000000..37d82de82bf2 --- /dev/null +++ b/users/datagrok/feature_default_layers_selector.h @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H + +/* + Define a keycode KF_LAYO to rotate between available default layers. + Shift+KF_LAYO makes the current one persistent. + + To use: + + in your keymap.c, define KF_LAYO so it does not conflict with anything else. + then include this header and set highest_base_layer. + + #define KF_LAYO SAFE_RANGE + #include "feature_default_layers_selector.h" + + const uint8_t highest_base_layer = 4; // the index + + and in your rules.mk, + + SRC += feature_default_layers_selector.c +*/ + +/* + See https://docs.qmk.fm/#/keymap for docs about layers including the concept + of "base" or "default" layers. + + This is broken into two functions so that: + + - If you don't want to store the default layer state in eeprom, don't call + process_record_save_default_layer. + + - If you have your own mechanism for setting the default layer state (to one + or multiple layers), do that instead of process_record_select_default_layer. + + If you call both functions, call process_record_save_default_layer first. + + The QMK docs seem to assume that you will have only one layer as your + default layer at any time, but the source code actually supports an arbitrary + default_layer_state (composition of layers) + + quantum has "set_single_persistent_default_layer" but that writes to eeprom + every time you change your default layer preference. i wanted a behavior + instead which lets you switch default layers all you want, then store the + current configuration once you're happy with it. that way if you get into an + unusable state you can just unplug and replug your keyboard to escape from it. + + this code assumes: + + 1. each default layer state that you would select among consists of a single + layer, which we will call a "base" layer. + + 2. all your "base" layers are stored contiguously at the bottom of your + keymaps[] stack, and there are no non-"base" layers mixed in. + + 3. you have a maximum of 8 "base" layers. that is, the highest base layer is + index 7. + + while 16 and 32 bit platforms might allow default_layer_state to include more + and higher-numbered layers, eeconfig_update_default_layer saves only the first + 8 bits of default_layer_state to eeprom. + +*/ + +#ifndef KF_LAYO +#define KF_LAYO SAFE_RANGE +#endif + +const uint8_t highest_base_layer; +bool process_record_save_default_layer(uint16_t keycode, keyrecord_t *record); +bool process_record_select_default_layer(uint16_t keycode, keyrecord_t *record); From 212aeee202f1031395f56a087441c6da030afdd4 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Sun, 26 Jan 2020 22:32:11 -0800 Subject: [PATCH 140/331] Revert "Clueboard Rev4 Updates aka Volcano 660 (#7942)" This reverts commit e0a0430c31bd9fabab93e8933e9988e0d3f66434. --- keyboards/clueboard/66/rev4/config.h | 22 +++++++++++++ keyboards/clueboard/66/rev4/rev4.c | 49 +++++++++++++++++++++++----- keyboards/clueboard/66/rev4/rules.mk | 15 +++++---- 3 files changed, 70 insertions(+), 16 deletions(-) diff --git a/keyboards/clueboard/66/rev4/config.h b/keyboards/clueboard/66/rev4/config.h index f81ae61cf8ef..8ed14047837e 100644 --- a/keyboards/clueboard/66/rev4/config.h +++ b/keyboards/clueboard/66/rev4/config.h @@ -54,3 +54,25 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + + /* Backlight configuration + */ +#define BACKLIGHT_LEVELS 1 + +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLED_NUM 18 // Number of LEDs +#define RGBLIGHT_HUE_STEP 32 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_BREATHE_MAX 200 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // How many LEDs wide to light up +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 // The led to start at +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 5 // How many LEDs to travel +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up diff --git a/keyboards/clueboard/66/rev4/rev4.c b/keyboards/clueboard/66/rev4/rev4.c index 99a7cb9452c7..041c31cd3229 100644 --- a/keyboards/clueboard/66/rev4/rev4.c +++ b/keyboards/clueboard/66/rev4/rev4.c @@ -1,4 +1,5 @@ #include "rev4.h" +//#include "backlight.h" void matrix_init_kb(void) { // put your keyboard start-up code here @@ -7,19 +8,49 @@ void matrix_init_kb(void) { led_init_ports(); } -void led_init_ports() { +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +void backlight_init_ports(void) { + print("init_backlight_pin()\n"); // Set our LED pins as output - setPinOutput(B13); // LED1 - writePinLow(B13); + //DDRD |= (1<<6); // Esc + //DDRB |= (1<<7); // Page Up + //DDRD |= (1<<4); // Arrows - setPinOutput(B14); // LED2 - writePinLow(B14); + // Set our LED pins low + //PORTD &= ~(1<<6); // Esc + //PORTB &= ~(1<<7); // Page Up + //PORTD &= ~(1<<4); // Arrows +} - setPinOutput(B8); // LED3 - writePinLow(B8); +void backlight_set(uint8_t level) { +/* + if ( level == 0 ) { + // Turn off light + PORTD |= (1<<6); // Esc + PORTB |= (1<<7); // Page Up + PORTD |= (1<<4); // Arrows + } else { + // Turn on light + PORTD &= ~(1<<6); // Esc + PORTB &= ~(1<<7); // Page Up + PORTD &= ~(1<<4); // Arrows + } +*/ +} - setPinOutput(B0); // Capslock LED - writePinLow(B0); +void led_init_ports() { + // Set our LED pins as output + palSetPadMode(GPIOB, 13, PAL_MODE_OUTPUT_PUSHPULL); // LED1 + palClearPad(GPIOB, 13); + palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); // LED2 + palClearPad(GPIOB, 14); + palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); // LED3 + palClearPad(GPIOA, 8); + palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL); // Capslock LED + palClearPad(GPIOA, 0); } void led_set_kb(uint8_t usb_led) { diff --git a/keyboards/clueboard/66/rev4/rules.mk b/keyboards/clueboard/66/rev4/rules.mk index 70a63941b0da..ef7989aa0bc1 100644 --- a/keyboards/clueboard/66/rev4/rules.mk +++ b/keyboards/clueboard/66/rev4/rules.mk @@ -4,17 +4,18 @@ MCU = STM32F303 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +BACKLIGHT_ENABLE = yes +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -AUDIO_ENABLE = yes +AUDIO_ENABLE = no RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality -BACKLIGHT_ENABLE = no MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes LAYOUTS = 66_ansi 66_iso From 43d2a0e167fe01b3bf7c793f421a238dc8109dc6 Mon Sep 17 00:00:00 2001 From: Bryan Arendt Date: Mon, 27 Jan 2020 13:14:50 -0500 Subject: [PATCH 141/331] [Keyboard] Adds ogre ergo split (#8011) * Adds ogre ergo split * remove uneeded line breaks --- keyboards/ogre/ergo_split/config.h | 52 +++++++++++++++++++ keyboards/ogre/ergo_split/ergo_split.c | 17 ++++++ keyboards/ogre/ergo_split/ergo_split.h | 39 ++++++++++++++ .../ogre/ergo_split/keymaps/default/keymap.c | 41 +++++++++++++++ .../ogre/ergo_split/keymaps/default/readme.md | 1 + keyboards/ogre/ergo_split/readme.md | 15 ++++++ keyboards/ogre/ergo_split/rules.mk | 33 ++++++++++++ 7 files changed, 198 insertions(+) create mode 100644 keyboards/ogre/ergo_split/config.h create mode 100644 keyboards/ogre/ergo_split/ergo_split.c create mode 100644 keyboards/ogre/ergo_split/ergo_split.h create mode 100644 keyboards/ogre/ergo_split/keymaps/default/keymap.c create mode 100644 keyboards/ogre/ergo_split/keymaps/default/readme.md create mode 100644 keyboards/ogre/ergo_split/readme.md create mode 100644 keyboards/ogre/ergo_split/rules.mk diff --git a/keyboards/ogre/ergo_split/config.h b/keyboards/ogre/ergo_split/config.h new file mode 100644 index 000000000000..d92c2538bf91 --- /dev/null +++ b/keyboards/ogre/ergo_split/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2020 ctrlshiftba + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0x095E +#define DEVICE_VER 0x0001 +#define MANUFACTURER ctrlshiftba +#define PRODUCT ergo_split +#define DESCRIPTION a keycap friendly ergo. the split version + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D3 +#define SPLIT_HAND_PIN D1 + +#define RGB_DI_PIN B6 +#define RGBLED_SPLIT { 7, 7 } +#define RGBLED_NUM 14 +#define RGBLIGHT_LED_MAP { 6, 5, 4, 3, 2, 1, 0, 13, 12,11, 10, 9, 8, 7} +#define RGBLIGHT_ANIMATIONS +#define DEBOUNCE 5 diff --git a/keyboards/ogre/ergo_split/ergo_split.c b/keyboards/ogre/ergo_split/ergo_split.c new file mode 100644 index 000000000000..0d83a5e8e427 --- /dev/null +++ b/keyboards/ogre/ergo_split/ergo_split.c @@ -0,0 +1,17 @@ +/* Copyright 2020 ctrlshiftba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ergo_split.h" diff --git a/keyboards/ogre/ergo_split/ergo_split.h b/keyboards/ogre/ergo_split/ergo_split.h new file mode 100644 index 000000000000..f8f9ddf65f72 --- /dev/null +++ b/keyboards/ogre/ergo_split/ergo_split.h @@ -0,0 +1,39 @@ +/* Copyright 2020 ctrlshiftba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k63, k00, k10, k20, k30, k40, k50, k60, k65, k55, k45, k35, k25, k15, k05, k68, \ + k01, k11, k21, k31, k41, k51, k61, k66, k56, k46, k36, k26, k16, k06, \ + k02, k12, k22, k32, k42, k52, k62, k67, k57, k47, k37, k27, k17, k07, \ + k03, k13, k23, k33, k43, k53, k58, k48, k38, k28, k18, k08, \ + k04, k14, k24, k34, k44, k54, k64, k69, k59, k49, k39, k29, k19, k09 \ +) \ +{ \ + { k00, k10, k20, k30, k40, k50, k60 }, \ + { k01, k11, k21, k31, k41, k51, k61 }, \ + { k02, k12, k22, k32, k42, k52, k62 }, \ + { k03, k13, k23, k33, k43, k53, k63 }, \ + { k04, k14, k24, k34, k44, k54, k64 }, \ + { k05, k15, k25, k35, k45, k55, k65 }, \ + { k06, k16, k26, k36, k46, k56, k66 }, \ + { k07, k17, k27, k37, k47, k57, k67 }, \ + { k08, k18, k28, k38, k48, k58, k68 }, \ + { k09, k19, k29, k39, k49, k59, k69 }, \ +} diff --git a/keyboards/ogre/ergo_split/keymaps/default/keymap.c b/keyboards/ogre/ergo_split/keymaps/default/keymap.c new file mode 100644 index 000000000000..94e725791e3d --- /dev/null +++ b/keyboards/ogre/ergo_split/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 ctrlshiftba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define TP_Z MT(MOD_LCTL, KC_Z) +#define TP_X MT(MOD_LGUI, KC_X) +#define TP_GR MT(MOD_LCTL, KC_GRV) +#define TP_SPC LT(1, KC_SPC) +#define TP_ENT LT(1, KC_ENT) +#define TP_QUOT MT(MOD_RGUI, KC_QUOT) +#define TP_RCTRL MT(MOD_RCTL, KC_RBRC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGDN, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TP_QUOT, + KC_LSFT, TP_Z, TP_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + TP_GR, KC_LALT, KC_LEFT, KC_RGHT, TP_SPC, KC_SPC, KC_BSPC, KC_RALT, KC_ENT, TP_ENT, KC_DOWN, KC_UP, KC_LBRC, TP_RCTRL + ), + [1] = LAYOUT( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_INS, KC_HOME, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_M_P, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MENU, _______ + ), +}; diff --git a/keyboards/ogre/ergo_split/keymaps/default/readme.md b/keyboards/ogre/ergo_split/keymaps/default/readme.md new file mode 100644 index 000000000000..4e225222b1cc --- /dev/null +++ b/keyboards/ogre/ergo_split/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for ergo_split diff --git a/keyboards/ogre/ergo_split/readme.md b/keyboards/ogre/ergo_split/readme.md new file mode 100644 index 000000000000..e027e6be02d6 --- /dev/null +++ b/keyboards/ogre/ergo_split/readme.md @@ -0,0 +1,15 @@ +# ogre ergo (split) +## a keycap friendly ergo +![ogre_ergo_split](https://i.imgur.com/55luvRi.jpg) + +The ogre ergo is a ergodox inspired keyboard that is a keycap friendly ergo supporting a wide variety of keycap layout possiblities. Its can be built as either a split or single keyboard. + +* Keyboard Maintainer: [ctrlshiftba](https://github.com/ctrlshiftbryan) +* Hardware Supported: the ogre ergo pcb +* Hardware Availability: https://ctrlshiftba.com/ + +Make example for this keyboard (after setting up your build environment): + + make ogre/ergo_split:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ogre/ergo_split/rules.mk b/keyboards/ogre/ergo_split/rules.mk new file mode 100644 index 000000000000..06f53864c1a6 --- /dev/null +++ b/keyboards/ogre/ergo_split/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +SPLIT_KEYBOARD = yes From 9a0245b7784e11b34c5f44bcd2079af2e19ab654 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 27 Jan 2020 22:31:54 +0000 Subject: [PATCH 142/331] Fix boards which were overriding backlight without setting custom (#7970) --- common_features.mk | 12 +++++++----- keyboards/cannonkeys/ortho48/rules.mk | 1 + keyboards/cannonkeys/ortho60/rules.mk | 1 + keyboards/cannonkeys/ortho75/rules.mk | 1 + keyboards/cannonkeys/practice60/rules.mk | 1 + keyboards/cannonkeys/practice65/rules.mk | 1 + keyboards/clueboard/66_hotswap/gen1/led.c | 1 - keyboards/clueboard/66_hotswap/gen1/matrix.c | 1 - keyboards/clueboard/66_hotswap/gen1/rules.mk | 1 - keyboards/ergodox_infinity/rules.mk | 1 + keyboards/whitefox/rules.mk | 1 + 11 files changed, 14 insertions(+), 8 deletions(-) diff --git a/common_features.mk b/common_features.mk index a431923bcfd9..93c34c7d5427 100644 --- a/common_features.mk +++ b/common_features.mk @@ -175,7 +175,9 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no) ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type) else - OPT_DEFS += -DLED_MATRIX_ENABLE -DBACKLIGHT_ENABLE -DBACKLIGHT_CUSTOM_DRIVER + BACKLIGHT_ENABLE = yes + BACKLIGHT_DRIVER = custom + OPT_DEFS += -DLED_MATRIX_ENABLE SRC += $(QUANTUM_DIR)/led_matrix.c SRC += $(QUANTUM_DIR)/led_matrix_drivers.c endif @@ -300,10 +302,6 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) endif - ifeq ($(strip $(VISUALIZER_ENABLE)), yes) - CIE1931_CURVE := yes - endif - COMMON_VPATH += $(QUANTUM_DIR)/backlight SRC += $(QUANTUM_DIR)/backlight/backlight.c OPT_DEFS += -DBACKLIGHT_ENABLE @@ -343,6 +341,10 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) endif endif +ifeq ($(strip $(VISUALIZER_ENABLE)), yes) + CIE1931_CURVE := yes +endif + ifeq ($(strip $(CIE1931_CURVE)), yes) OPT_DEFS += -DUSE_CIE1931_CURVE LED_TABLES := yes diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index 4bca8fde0590..808bcacf2576 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes LAYOUTS = ortho_4x12 diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index d2fa535f4143..bd79bb7ea3d8 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes LAYOUTS = ortho_5x12 diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index 5b90e87fd7ef..e5e832dba0eb 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index 7c3fec31e639..1fae41d66ce7 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes LAYOUTS = 60_ansi diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index b43e591aeb64..122dcf8f2645 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -22,4 +22,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes diff --git a/keyboards/clueboard/66_hotswap/gen1/led.c b/keyboards/clueboard/66_hotswap/gen1/led.c index efbf532022af..f67259d2e470 100644 --- a/keyboards/clueboard/66_hotswap/gen1/led.c +++ b/keyboards/clueboard/66_hotswap/gen1/led.c @@ -16,6 +16,5 @@ */ #include "hal.h" -#include "backlight.h" #include "led.h" #include "printf.h" diff --git a/keyboards/clueboard/66_hotswap/gen1/matrix.c b/keyboards/clueboard/66_hotswap/gen1/matrix.c index c3e59b56460f..05386215edae 100644 --- a/keyboards/clueboard/66_hotswap/gen1/matrix.c +++ b/keyboards/clueboard/66_hotswap/gen1/matrix.c @@ -5,7 +5,6 @@ #include "timer.h" #include "wait.h" #include "printf.h" -#include "backlight.h" #include "matrix.h" #include "action.h" #include "keycode.h" diff --git a/keyboards/clueboard/66_hotswap/gen1/rules.mk b/keyboards/clueboard/66_hotswap/gen1/rules.mk index 50f140defa33..1de003ce5a93 100644 --- a/keyboards/clueboard/66_hotswap/gen1/rules.mk +++ b/keyboards/clueboard/66_hotswap/gen1/rules.mk @@ -7,7 +7,6 @@ LED_MATRIX_ENABLE = IS31FL3731 # Build Options # comment out to disable the options. # -BACKLIGHT_ENABLE = yes BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index b55c9bc8c0ce..4e39ac80818b 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -79,6 +79,7 @@ SERIAL_LINK_ENABLE = yes VISUALIZER_ENABLE = yes LCD_ENABLE = yes BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom LCD_BACKLIGHT_ENABLE = yes MIDI_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 59332d1d5ac3..7b33285004d6 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -72,6 +72,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom VISUALIZER_ENABLE = yes LED_DRIVER = is31fl3731c From 50855593ffcf7b6a780fa5f9c28fe6783264b5e2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 27 Jan 2020 22:38:55 +0000 Subject: [PATCH 143/331] Migrate common ld scripts to common location (#7887) * Migrate common ld scripts to common location * Remove duplicate ld scripts * Update build to look at common ld location --- .../boards}/ld/MK20DX256.ld | 0 .../ortho48 => drivers/boards}/ld/MKL26Z64.ld | 0 .../ld/STM32F103x8_stm32duino_bootloader.ld | 0 keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld | 105 ------------------ .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 --------------- .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 --------------- .../cannonkeys/practice60/ld/MKL26Z64.ld | 105 ------------------ .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 --------------- .../cannonkeys/practice65/ld/MKL26Z64.ld | 105 ------------------ .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 --------------- .../converter/siemens_tastatur/ld/MKL26Z64.ld | 105 ------------------ .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 --------------- .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 --------------- .../handwired/onekey/teensy_lc/ld/MKL26Z64.ld | 105 ------------------ tmk_core/chibios.mk | 2 + 15 files changed, 2 insertions(+), 1053 deletions(-) rename {keyboards/handwired/onekey/teensy_32 => drivers/boards}/ld/MK20DX256.ld (100%) rename {keyboards/cannonkeys/ortho48 => drivers/boards}/ld/MKL26Z64.ld (100%) rename {keyboards/cannonkeys/ortho48 => drivers/boards}/ld/STM32F103x8_stm32duino_bootloader.ld (100%) delete mode 100644 keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld delete mode 100644 keyboards/cannonkeys/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld delete mode 100644 keyboards/cannonkeys/ortho75/ld/STM32F103x8_stm32duino_bootloader.ld delete mode 100644 keyboards/cannonkeys/practice60/ld/MKL26Z64.ld delete mode 100644 keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld delete mode 100644 keyboards/cannonkeys/practice65/ld/MKL26Z64.ld delete mode 100644 keyboards/cannonkeys/practice65/ld/STM32F103x8_stm32duino_bootloader.ld delete mode 100644 keyboards/converter/siemens_tastatur/ld/MKL26Z64.ld delete mode 100644 keyboards/converter/siemens_tastatur/ld/STM32F103x8_stm32duino_bootloader.ld delete mode 100644 keyboards/handwired/onekey/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld delete mode 100644 keyboards/handwired/onekey/teensy_lc/ld/MKL26Z64.ld diff --git a/keyboards/handwired/onekey/teensy_32/ld/MK20DX256.ld b/drivers/boards/ld/MK20DX256.ld similarity index 100% rename from keyboards/handwired/onekey/teensy_32/ld/MK20DX256.ld rename to drivers/boards/ld/MK20DX256.ld diff --git a/keyboards/cannonkeys/ortho48/ld/MKL26Z64.ld b/drivers/boards/ld/MKL26Z64.ld similarity index 100% rename from keyboards/cannonkeys/ortho48/ld/MKL26Z64.ld rename to drivers/boards/ld/MKL26Z64.ld diff --git a/keyboards/cannonkeys/ortho48/ld/STM32F103x8_stm32duino_bootloader.ld b/drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld similarity index 100% rename from keyboards/cannonkeys/ortho48/ld/STM32F103x8_stm32duino_bootloader.ld rename to drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld diff --git a/keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld b/keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld deleted file mode 100644 index c4ca8b874cca..000000000000 --- a/keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com - * (C) 2016 flabbergast - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * KL26Z64 memory setup. - */ -MEMORY -{ - flash0 : org = 0x00000000, len = 0x100 - flash1 : org = 0x00000400, len = 0x10 - flash2 : org = 0x00000410, len = 62k - 0x410 - flash3 : org = 0x0000F800, len = 2k - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x1FFFF800, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* Flash region for the configuration bytes.*/ -SECTIONS -{ - .cfmprotect : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.cfmconfig)) - } > flash1 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash2); -REGION_ALIAS("XTORS_FLASH_LMA", flash2); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash2); -REGION_ALIAS("TEXT_FLASH_LMA", flash2); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash2); -REGION_ALIAS("RODATA_FLASH_LMA", flash2); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash2); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash2); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -__eeprom_workarea_start__ = ORIGIN(flash3); -__eeprom_workarea_size__ = LENGTH(flash3); -__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/cannonkeys/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index d0688ef60164..000000000000 --- a/keyboards/cannonkeys/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null @@ -1,88 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 64k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/cannonkeys/ortho75/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/ortho75/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index d0688ef60164..000000000000 --- a/keyboards/cannonkeys/ortho75/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null @@ -1,88 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 64k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld b/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld deleted file mode 100644 index c4ca8b874cca..000000000000 --- a/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com - * (C) 2016 flabbergast - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * KL26Z64 memory setup. - */ -MEMORY -{ - flash0 : org = 0x00000000, len = 0x100 - flash1 : org = 0x00000400, len = 0x10 - flash2 : org = 0x00000410, len = 62k - 0x410 - flash3 : org = 0x0000F800, len = 2k - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x1FFFF800, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* Flash region for the configuration bytes.*/ -SECTIONS -{ - .cfmprotect : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.cfmconfig)) - } > flash1 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash2); -REGION_ALIAS("XTORS_FLASH_LMA", flash2); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash2); -REGION_ALIAS("TEXT_FLASH_LMA", flash2); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash2); -REGION_ALIAS("RODATA_FLASH_LMA", flash2); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash2); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash2); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -__eeprom_workarea_start__ = ORIGIN(flash3); -__eeprom_workarea_size__ = LENGTH(flash3); -__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index d0688ef60164..000000000000 --- a/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null @@ -1,88 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 64k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice65/ld/MKL26Z64.ld b/keyboards/cannonkeys/practice65/ld/MKL26Z64.ld deleted file mode 100644 index c4ca8b874cca..000000000000 --- a/keyboards/cannonkeys/practice65/ld/MKL26Z64.ld +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com - * (C) 2016 flabbergast - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * KL26Z64 memory setup. - */ -MEMORY -{ - flash0 : org = 0x00000000, len = 0x100 - flash1 : org = 0x00000400, len = 0x10 - flash2 : org = 0x00000410, len = 62k - 0x410 - flash3 : org = 0x0000F800, len = 2k - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x1FFFF800, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* Flash region for the configuration bytes.*/ -SECTIONS -{ - .cfmprotect : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.cfmconfig)) - } > flash1 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash2); -REGION_ALIAS("XTORS_FLASH_LMA", flash2); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash2); -REGION_ALIAS("TEXT_FLASH_LMA", flash2); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash2); -REGION_ALIAS("RODATA_FLASH_LMA", flash2); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash2); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash2); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -__eeprom_workarea_start__ = ORIGIN(flash3); -__eeprom_workarea_size__ = LENGTH(flash3); -__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice65/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/practice65/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index d0688ef60164..000000000000 --- a/keyboards/cannonkeys/practice65/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null @@ -1,88 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 64k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/converter/siemens_tastatur/ld/MKL26Z64.ld b/keyboards/converter/siemens_tastatur/ld/MKL26Z64.ld deleted file mode 100644 index c4ca8b874cca..000000000000 --- a/keyboards/converter/siemens_tastatur/ld/MKL26Z64.ld +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com - * (C) 2016 flabbergast - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * KL26Z64 memory setup. - */ -MEMORY -{ - flash0 : org = 0x00000000, len = 0x100 - flash1 : org = 0x00000400, len = 0x10 - flash2 : org = 0x00000410, len = 62k - 0x410 - flash3 : org = 0x0000F800, len = 2k - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x1FFFF800, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* Flash region for the configuration bytes.*/ -SECTIONS -{ - .cfmprotect : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.cfmconfig)) - } > flash1 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash2); -REGION_ALIAS("XTORS_FLASH_LMA", flash2); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash2); -REGION_ALIAS("TEXT_FLASH_LMA", flash2); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash2); -REGION_ALIAS("RODATA_FLASH_LMA", flash2); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash2); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash2); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -__eeprom_workarea_start__ = ORIGIN(flash3); -__eeprom_workarea_size__ = LENGTH(flash3); -__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/converter/siemens_tastatur/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/converter/siemens_tastatur/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index d0688ef60164..000000000000 --- a/keyboards/converter/siemens_tastatur/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null @@ -1,88 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 64k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/handwired/onekey/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/handwired/onekey/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index d0688ef60164..000000000000 --- a/keyboards/handwired/onekey/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null @@ -1,88 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 64k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/handwired/onekey/teensy_lc/ld/MKL26Z64.ld b/keyboards/handwired/onekey/teensy_lc/ld/MKL26Z64.ld deleted file mode 100644 index c4ca8b874cca..000000000000 --- a/keyboards/handwired/onekey/teensy_lc/ld/MKL26Z64.ld +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com - * (C) 2016 flabbergast - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * KL26Z64 memory setup. - */ -MEMORY -{ - flash0 : org = 0x00000000, len = 0x100 - flash1 : org = 0x00000400, len = 0x10 - flash2 : org = 0x00000410, len = 62k - 0x410 - flash3 : org = 0x0000F800, len = 2k - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x1FFFF800, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* Flash region for the configuration bytes.*/ -SECTIONS -{ - .cfmprotect : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.cfmconfig)) - } > flash1 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash2); -REGION_ALIAS("XTORS_FLASH_LMA", flash2); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash2); -REGION_ALIAS("TEXT_FLASH_LMA", flash2); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash2); -REGION_ALIAS("RODATA_FLASH_LMA", flash2); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash2); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash2); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -__eeprom_workarea_start__ = ORIGIN(flash3); -__eeprom_workarea_size__ = LENGTH(flash3); -__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 62e1561878aa..b2e364f2161f 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -108,6 +108,8 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(TOP_DIR)/drivers/boards/ld/$(MCU_LDSCRIPT).ld else LDSCRIPT = $(STARTUPLD)/$(MCU_LDSCRIPT).ld endif From 1b7a003d842c76cd141af726c13e2af1a4458bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez=20Rivero?= Date: Mon, 27 Jan 2020 23:42:38 +0100 Subject: [PATCH 144/331] [Keymap] update to Danielo515 keymaps (#8004) * feat(build): added script for compiling with docker easily * chore: bring my own build with docker to master * feat: merge ergodox ez into latest maste * chore: remove my build with docker file * chore: remove my changes to process_leader * feat: more modular user danielo515 * Apply suggestions from @ridingqwerty Co-Authored-By: ridingqwerty * chore: more suggestions implemented * chore: add my basic details * Apply suggestions from @drashna Co-Authored-By: Drashna Jaelre * fix: more @drashna fixes * feat: @fauxpark optimization * fix: some more @drashna improvements Co-Authored-By: Drashna Jaelre * chore: small improvement on layout * fix: some more @drashna improvements * chore: remove some F dance Co-authored-by: ridingqwerty Co-authored-by: Drashna Jaelre --- .../ergodox_ez/keymaps/danielo515/config.h | 37 ++ .../ergodox_ez/keymaps/danielo515/keymap.c | 318 +++++++++++++++ .../ergodox_ez/keymaps/danielo515/rules.mk | 9 + users/danielo515/combo.c | 21 + users/danielo515/combo.h | 2 + users/danielo515/config.h | 6 + users/danielo515/danielo515.c | 373 ++++++++++++++++++ users/danielo515/danielo515.h | 105 +++++ users/danielo515/readme.md | 14 + users/danielo515/rules.mk | 9 + users/danielo515/tap_dance.c | 139 +++++++ users/danielo515/tap_dance.h | 80 ++++ 12 files changed, 1113 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/danielo515/config.h create mode 100644 keyboards/ergodox_ez/keymaps/danielo515/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/danielo515/rules.mk create mode 100644 users/danielo515/combo.c create mode 100644 users/danielo515/combo.h create mode 100644 users/danielo515/config.h create mode 100644 users/danielo515/danielo515.c create mode 100644 users/danielo515/danielo515.h create mode 100644 users/danielo515/readme.md create mode 100644 users/danielo515/rules.mk create mode 100644 users/danielo515/tap_dance.c create mode 100644 users/danielo515/tap_dance.h diff --git a/keyboards/ergodox_ez/keymaps/danielo515/config.h b/keyboards/ergodox_ez/keymaps/danielo515/config.h new file mode 100644 index 000000000000..6a3d37f1c61b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/danielo515/config.h @@ -0,0 +1,37 @@ +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#pragma once + +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 200 + +#define ONESHOT_TAP_TOGGLE 3 + +#define RGBLIGHT_SLEEP + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 50 + +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 +// Timeout settings for leader key +#undef LEADER_TIMEOUT +#define LEADER_TIMEOUT 350 +#define LEADER_PER_KEY_TIMING + +#undef DEBOUNCE +#define DEBOUNCE 45 +// Memory saving +#ifdef CONSOLE_ENABLE +# define NO_DEBUG +# define NO_PRINT +#endif + +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + +#undef RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergodox_ez/keymaps/danielo515/keymap.c b/keyboards/ergodox_ez/keymaps/danielo515/keymap.c new file mode 100644 index 000000000000..538eab01634d --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/danielo515/keymap.c @@ -0,0 +1,318 @@ +#include QMK_KEYBOARD_H +#include "version.h" +#include "danielo515.h" + +/* STUPID JS code to split by ergodox rows. Call the format function with the unformatted array +sliceBy = groups => items => groups.reduce(({start, acc},size) => ({ + acc: (acc.push(items.slice(start,start+size)),acc ), + start: start + size +}), {acc:[],start:0}).acc +findMaxLen = items => items.reduce((max,curr) => max < curr.length ? curr.length : max,0) +setLen = len => strings => strings.map(str => str.padEnd(len, " ")); +const format = string => { + const items = string.split(/,\s*(?![^()]*\))/) + const group = sliceBy([7,7,6,7,5,2,1,3]) + const resize = setLen(findMaxLen(items)); + const joinstr = ',\n' + const leftItems = group(items.slice(0,items.length/2)) + const rightItems = group(items.slice(items.length/2)) + const [left,right] = [leftItems.map(resize).join(joinstr),rightItems.map(resize).join(joinstr)] + return `\n${left},\n\n${right}\n` +} +*/ + +#define OSM_SF_CMD OSM(MOD_LGUI | MOD_LSFT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ergodox( + KC_EQL ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,OSM(MOD_HYPR) , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,TD(PASTE_DANCE) , + KC_DELETE ,KC_A ,LT(3,KC_S) ,LT(2,KC_D) ,LT(4,KC_F) ,KC_G , + KC_GRAVE ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,TD(COPY_CUT) , + KC_BSLASH ,OSM(MOD_LCTL) ,OSM(MOD_LALT) ,KC_LEFT ,KC_RIGHT , + OSM_SF_CMD ,KC_PLUS , + KC_INSERT , + OSM(MOD_LSFT) ,LT(2,KC_BSPACE) ,OSM(MOD_LGUI) , + + + TO(1) ,KC_6 ,KC_7 ,KC_8 ,TD_F9 ,LT(3,KC_0) ,KC_DQUO , + KC_UNDS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,RSFT_T(KC_MINUS) , + HYPR_T(KC_H) ,ALT_T(KC_J) ,RCTL_T(KC_K) ,LT(6,KC_L) ,TD_CLN ,GUI_T(KC_QUOTE) , + ALT_TAB ,KC_N ,MEH_T(KC_M) ,KC_COMMA ,KC_DOT ,KC_SLASH ,LT(4,KC_KP_ASTERISK), + LT(4,KC_ENTER) ,KC_DOWN ,KC_LBRACKET ,KC_RBRACKET ,OSL(2) , + KC_AUDIO_MUTE ,KC_ESCAPE , + KC_END , + KC_COLN ,KC_LEAD ,LT(4,KC_SPACE) + ), + + [1] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,AC_E ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + LT(5, KC_DELETE),AC_A ,KC_TRANSPARENT ,KC_TRANSPARENT ,FIND ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + OSM(MOD_LSFT) ,KC_TRANSPARENT ,KC_TRANSPARENT , + TO(8) ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_ENTER ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT), + + [2] = LAYOUT_ergodox( + KC_TRANSPARENT,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_TRANSPARENT, + KC_TRANSPARENT,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,KC_CALCULATOR , + KC_TRANSPARENT,KC_HASH ,KC_DLR ,KC_TRANSPARENT,KC_RPRN ,KC_GRAVE , + KC_TRANSPARENT,KC_PERC ,KC_CIRC ,KC_LBRACKET ,KC_RBRACKET ,KC_TILD ,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + RGB_HUI , + KC_TRANSPARENT,KC_TRANSPARENT,RGB_HUD , + KC_DELETE ,KC_A ,KC_B ,KC_C ,KC_D ,KC_E ,KC_BSPACE , + KC_ENTER ,KC_F ,KC_7 ,KC_8 ,KC_9 ,KC_PERC ,KC_TRANSPARENT, + KC_HASH ,KC_4 ,KC_5 ,KC_6 ,KC_PLUS ,KC_KP_ASTERISK, + KC_KP_ENTER ,KC_COLON ,KC_1 ,KC_2 ,KC_3 ,KC_SLASH ,KC_BSLASH , + KC_0 ,KC_COMMA ,KC_DOT ,KC_EQUAL ,KC_TRANSPARENT, + RGB_TOG ,RGB_SLD , + RGB_VAI , + RGB_VAD ,KC_BSPACE ,KC_SPACE + ), + + [3] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LABK ,KC_RABK ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_AT ,KC_TRANSPARENT ,KC_EQL ,F_ARROW ,KC_GRAVE , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LBRACKET ,KC_RBRACKET ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + // Right hand + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + LALT(LSFT(KC_UP)) ,KC_HASH ,KC_LCBR ,KC_RCBR ,KC_KP_ASTERISK ,KC_PERC ,KC_DLR , + KC_AMPR ,KC_LPRN ,KC_RPRN ,KC_CIRC ,KC_KP_PLUS ,KC_PIPE , + LALT(LSFT(KC_DOWN)),KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH ,KC_BSLASH , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + RESET ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_SPACE +), + + [4] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_TRANSPARENT , + KC_TRANSPARENT ,LCTL(KC_Q) ,LCTL(KC_DOWN) ,LGUI(KC_DOWN) ,WIN_LEFT_HALF ,WIN_RIGHT_HALF ,LALT(LSFT(KC_UP)) , + LCTL(LSFT(KC_P)) ,LCTL(KC_A) ,SAVE ,LCTL(KC_D) ,KC_TRANSPARENT ,RGUI(KC_R) , + LCTL(LSFT(KC_F)) ,UNDO ,CUT ,KC_PSCREEN ,KC_TRANSPARENT ,LGUI(KC_RIGHT) ,LALT(LSFT(KC_DOWN)), + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + + LALT(KC_F4) ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + LALT(KC_UP) ,LSFT(KC_HOME) ,LSFT(KC_LEFT) ,KC_UP ,LSFT(KC_RIGHT) ,LSFT(KC_END) ,KC_F13 , + KC_HOME ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_END ,KC_F12 , + LALT(KC_DOWN) ,LSFT(KC_INSERT) ,LCTL(LSFT(KC_J)) ,LSFT(KC_UP) ,KC_PGUP ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,LSFT(KC_DOWN) ,KC_PGDOWN ,WIN_TO_LEFT ,WIN_TO_RIGHT , + KC_TRANSPARENT ,KC_SYSTEM_SLEEP , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_BSPACE ,KC_TRANSPARENT + ), + + [5] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,LCTL(KC_TAB) ,LCTL(LSFT(KC_TAB)) ,LGUI(KC_D) ,LCTL(KC_F) ,KC_TRANSPARENT , + LGUI(KC_L) ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,LSFT(KC_F9) ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,LCTL(LGUI(KC_LEFT)) ,LCTL(LGUI(KC_RIGHT)),KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,LCTL(KC_T) ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT +), + + [6] = LAYOUT_ergodox( + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_MS_ACCEL2 ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_MS_WH_DOWN ,KC_MS_UP ,KC_MS_WH_UP ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_MS_LEFT ,KC_MS_DOWN ,KC_MS_RIGHT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_MS_BTN3 ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_MS_BTN1 ,KC_MS_BTN2 ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_PGUP ,LCTL(LGUI(KC_RIGHT)),KC_MS_WH_UP ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT , + LGUI(RCTL(KC_LEFT)) ,KC_MS_WH_DOWN ,LCTL(KC_C) ,KC_TRANSPARENT ,KC_MEDIA_STOP ,KC_MEDIA_PLAY_PAUSE , + KC_PGDOWN ,LCTL(LSFT(KC_N)) ,LCTL(LSFT(KC_J)) ,KC_MEDIA_PREV_TRACK ,KC_MEDIA_NEXT_TRACK ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_AUDIO_VOL_UP ,KC_AUDIO_VOL_DOWN ,KC_AUDIO_MUTE ,KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT , + KC_TRANSPARENT , + KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT + ), + + [7] = LAYOUT_ergodox( + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_UP ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT + ), + + [8] = LAYOUT_ergodox( + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_Q ,KC_W ,KC_E ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_ENTER ,KC_A ,KC_S ,KC_D ,KC_F ,KC_TRANSPARENT, + KC_TRANSPARENT,KC_Z ,KC_X ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT, + KC_SPACE ,KC_LSHIFT ,KC_TRANSPARENT, + + TO(0) ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_PGDOWN ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_ENTER ,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT, + KC_TRANSPARENT, + KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT + ), +}; +// Used for blinking leds on layers higher than 7 +uint16_t blink_timer = 0; +uint16_t blink_elapsed = 0; +bool blink_led_1 = false; +bool blink_led_2 = false; +bool blink_led_3 = false; + +void matrix_scan_kb(void){ + // first 7 layers do not need to blink + if(blink_led_1 || blink_led_2 || blink_led_3){ + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + blink_elapsed = timer_elapsed(blink_timer); + if(blink_elapsed > 2000) { blink_timer = timer_read();} + if(blink_elapsed < 1000) { + if(blink_led_1) ergodox_right_led_1_on(); + if(blink_led_2) ergodox_right_led_2_on(); + if(blink_led_3) ergodox_right_led_3_on(); + } + } + matrix_scan_user(); +}; + +layer_state_t layer_state_set_user(layer_state_t state) +{ + + uint8_t layer = get_highest_layer(state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + blink_led_1=false; + blink_led_2=false; + blink_led_3=false; + + switch (layer) + { + case 0: + rgblight_setrgb(0, 200, 200); + break; + case 1: + ergodox_right_led_1_on(); + rgblight_setrgb(0, 200, 0); // green + break; + case 2: + ergodox_right_led_2_on(); + rgblight_setrgb(0, 0, 255); + break; + case 3: + ergodox_right_led_3_on(); + rgblight_setrgb(255, 0, 0); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + rgblight_setrgb(200, 65, 0); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + rgblight_setrgb(0, 80, 33); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + rgblight_setrgb(0, 10, 200); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + rgblight_setrgb(90, 150, 90); + break; + case 8: + blink_led_1=true; + rgblight_setrgb(100, 0, 100); + break; + case 9: + rgblight_setrgb(200, 150, 90); + break; +// default: +// rgblight_setrgb(0, 200, 200); +// break; + } + return state; +}; + +// use leds to indicate when a one shot mod is on +void oneshot_mods_changed_user(uint8_t mods) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + // One shot checks + if (mods & MOD_MASK_SHIFT) { + ergodox_right_led_1_on(); + } + if (mods & MOD_MASK_CTRL) { + ergodox_right_led_2_on(); + } + if (mods & MOD_MASK_ALT) { + ergodox_right_led_3_on(); + } + // if (mods & MOD_MASK_GUI) { + // println("Oneshot mods GUI"); + // } + } + +void oneshot_locked_mods_changed_user(uint8_t mods) { + oneshot_mods_changed_user(mods); +} diff --git a/keyboards/ergodox_ez/keymaps/danielo515/rules.mk b/keyboards/ergodox_ez/keymaps/danielo515/rules.mk new file mode 100644 index 000000000000..99ab4f0e181b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/danielo515/rules.mk @@ -0,0 +1,9 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LTO_ENABLE = yes +AUTO_SHIFT_ENABLE = no +TAP_DANCE_ENABLE = yes # Enable the tap dance feature. +LEADER_ENABLE = yes +CONSOLE_ENABLE = no +RGBLIGHT_ENABLE = yes +COMBO_ENABLE = yes diff --git a/users/danielo515/combo.c b/users/danielo515/combo.c new file mode 100644 index 000000000000..bf7d5f9a8a30 --- /dev/null +++ b/users/danielo515/combo.c @@ -0,0 +1,21 @@ +#include "combo.h" +enum combos { + JK_ESC, + YU_COM, + UI_COM, + IO_COM, + OP_COM, + QW_COM +}; + +const uint16_t PROGMEM ui_combo[] = {KC_U, KC_I, COMBO_END}; +const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; +const uint16_t PROGMEM yu_combo[] = {KC_Y, KC_U, COMBO_END}; +const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [JK_ESC] = COMBO(jk_combo, KC_ESC), + [YU_COM] = COMBO(yu_combo, KC_CIRC), + [UI_COM] = COMBO(ui_combo, KC_ESC), + [IO_COM] = COMBO(io_combo, KC_TILD) +}; diff --git a/users/danielo515/combo.h b/users/danielo515/combo.h new file mode 100644 index 000000000000..010d4b1383a0 --- /dev/null +++ b/users/danielo515/combo.h @@ -0,0 +1,2 @@ +#pragma once +#include "quantum.h" diff --git a/users/danielo515/config.h b/users/danielo515/config.h new file mode 100644 index 000000000000..65654388d280 --- /dev/null +++ b/users/danielo515/config.h @@ -0,0 +1,6 @@ +#pragma once + +#if defined(COMBO_ENABLE) + #define COMBO_COUNT 4 + #define COMBO_TERM 50 +#endif // !COMBO_ENABLE diff --git a/users/danielo515/danielo515.c b/users/danielo515/danielo515.c new file mode 100644 index 000000000000..f37eebb375cd --- /dev/null +++ b/users/danielo515/danielo515.c @@ -0,0 +1,373 @@ +#include "danielo515.h" + +bool onMac = true; +// Send control or GUI depending if we are on windows or mac +bool CMD(uint16_t kc) { + if(onMac){ tap_code16(LGUI(kc)); } else { tap_code16(LCTL(kc)); } + return false; +} + +//**************** Handle keys function *********************// +bool altPressed = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + bool pressed = record->event.pressed; + if(pressed){ + refresh_incremental_macros(keycode); + if(process_incremental_macro(keycode)){ + return false; + } + if(is_macro(keycode)){ + return handle_macro(keycode); + } + switch (keycode) { + case MAC_TGL: + onMac = !onMac; + onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC"); + return false; + } + } + + switch (keycode) + { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + layer_on(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + // == Macros START === + case ARROW: + if (record->event.pressed) SEND_STRING("->"); + return false; + case F_ARROW: + if (record->event.pressed) SEND_STRING("=>"); + return false; + case GREP: + if (record->event.pressed) SEND_STRING(" | grep "); return false; + // == Macros END === + // == Multi Os START === + case KC_HOME:// make the home behave the same on OSX + if (record->event.pressed && onMac) { + SEND_STRING(SS_LCTRL("a")); + return false; + } + case KC_END:// make the end behave the same on OSX + if (record->event.pressed && onMac) { + tap_code16(C(KC_E)); + return false; + } + case AC_A:// Accent á + if (record->event.pressed) SEND_STRING(SS_LALT("e") "a"); return false; + case AC_E:// Accent é + if (record->event.pressed) SEND_STRING(SS_LALT("e") "e"); return false; + case AC_I:// Accent í + if (record->event.pressed) SEND_STRING(SS_LALT("e") "i"); return false; + case AC_O:// Accent ó + if (record->event.pressed) SEND_STRING(SS_LALT("e") "o"); return false; + case CUT: if (record->event.pressed) return CMD(KC_X); + case COPY: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c")); + } + return false; + case PASTE: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v")); + } + return false; + case SAVE: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("s")) : SEND_STRING(SS_LCTRL("s")); + } + return false; + case UNDO: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("z")) : SEND_STRING(SS_LCTRL("z")); + } + return false; + case FIND: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f")); + } + return false; + case CHG_LAYOUT: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f")); + } + return false; + // == Multi Os END === +#ifdef RGBLIGHT_ENABLE + case RGB_SLD: + if (record->event.pressed) { rgblight_mode(1); } + return false; + break; + //First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt +#endif + case ALT_TAB: + if (record->event.pressed) + { + if (altPressed) + { + tap_code(KC_TAB); + } + else + { + altPressed = true; + layer_on(7); // go to movement layer + onMac ? register_code(KC_LGUI) : register_code(KC_LALT); + tap_code(KC_TAB); + } + } + return false; + // avoid alt releasing if the key is of movement + case KC_RIGHT ... KC_UP: + if (altPressed) + { + return true; // yes QMK, do your stuff + } + } + // Reset sticky alt tab + if (altPressed) + { + onMac ? unregister_code(KC_LGUI) : unregister_code(KC_LALT); + altPressed = false; + layer_off(7); + return false; + } + return true; +}; + +//**************** LEADER *********************// +#ifdef LEADER_ENABLE +LEADER_EXTERNS(); +#ifdef RGBLIGHT_ENABLE + +void leader_start() { + rgblight_setrgb_range(5, 100, 199, 10,15); +}; + +void leader_end(){ + rgblight_setrgb_range(200, 200, 255, 10,15); +}; +#endif + +void matrix_scan_user(void) +{ + if (leading && leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT) + { + leading = false; + SEQ_ONE_KEY(KC_T) { + SEND_STRING("``" SS_TAP(X_LEFT)); + } + // Triple ticks + SEQ_TWO_KEYS(KC_T, KC_T) { + SEND_STRING("```" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "```" SS_TAP(X_UP)); + } + // ==== International spanish accent vowels ==== + SEQ_ONE_KEY(KC_A) { + SEND_STRING(SS_LALT("e") "a"); + } + SEQ_ONE_KEY(KC_E) { + SEND_STRING(SS_LALT("e") "e"); + } + SEQ_ONE_KEY(KC_I) { + SEND_STRING(SS_LALT("e") "i"); + } + SEQ_ONE_KEY(KC_O) { + SEND_STRING(SS_LALT("e") "o"); + } + SEQ_ONE_KEY(KC_U) { + SEND_STRING(SS_LALT("e") "u"); + } + SEQ_ONE_KEY(KC_N) { // ñ + SEND_STRING(SS_LALT("n") "n"); + } + // ==== MACROS === + SEQ_ONE_KEY(KC_G) { // grep + SEND_STRING(" | grep "); + } + SEQ_ONE_KEY(KC_K) { + onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f")); + } + SEQ_TWO_KEYS(KC_D, KC_G) { // vim delete all + if(onMac){ + SEND_STRING(SS_LGUI("a") SS_TAP(X_D)); + } else { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_D)); + } + } + SEQ_ONE_KEY(KC_BSPACE) { // tripe delete! + SEND_STRING(SS_TAP(X_BSPACE) SS_TAP(X_BSPACE) SS_TAP(X_BSPACE)); + } + SEQ_TWO_KEYS(KC_P, KC_G) { + SEND_STRING("ps -ef | grep "); + } + SEQ_TWO_KEYS(KC_J, KC_A) { + SEND_STRING("() => {}"SS_TAP(X_LEFT) SS_TAP(X_LEFT)SS_TAP(X_LEFT) SS_TAP(X_LEFT)SS_TAP(X_LEFT) SS_TAP(X_LEFT)SS_TAP(X_LEFT)); + } + SEQ_TWO_KEYS(KC_S, KC_S) { + SEND_STRING("~/.ssh/ "); // this is a pain to type + } + SEQ_TWO_KEYS(KC_F, KC_T) { + SEND_STRING("feat():" SS_TAP(X_LEFT) SS_TAP(X_LEFT)); + } + // ### LAYER CHANGE + SEQ_ONE_KEY(KC_1) { + layer_on(1); + } + SEQ_ONE_KEY(KC_H) { // control enter, because yes + SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_ENTER) SS_UP(X_LCTRL)); + } + // paste all + SEQ_ONE_KEY(KC_P) { + if(onMac){ + SEND_STRING(SS_LGUI("a") SS_LGUI("v")); + } else { + SEND_STRING(SS_LCTRL("a") SS_LCTRL("v")); + } + } + SEQ_THREE_KEYS(KC_M, KC_A, KC_C) { + onMac = true; + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(255, 255, 255); + #endif + } + SEQ_THREE_KEYS(KC_W, KC_I, KC_N) { + onMac = false; + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(255, 255, 0); + #endif + } + /* Copy all */ + SEQ_ONE_KEY(KC_Y) { + if(onMac){ + SEND_STRING(SS_LGUI("a") SS_LGUI("c")); + } else { + SEND_STRING(SS_LCTRL("a") SS_LCTRL("c")); + } + } + //emoji bar + SEQ_TWO_KEYS(KC_E, KC_E) { + SEND_STRING(SS_DOWN(X_LGUI) SS_LCTRL(" ") SS_UP(X_LGUI)); + } + + SEQ_TWO_KEYS(KC_F, KC_F) { + SEND_STRING("ps -ef | grep "); + } + SEQ_TWO_KEYS(KC_H, KC_T) { + SEND_STRING("https://"); + } + + leader_end(); + } +} +#endif // LEADER + +// ======== INCREMENTAL MACROS STUFF ============= + +#define MAX_INCREMENTAL_MACRO 20 +#define TAP_ROTATION_TIMEOUT 400 + +uint16_t latest_kc = 0; +uint16_t latest_rotation = 0; +int key_count = 0; + +const char incremental_macros[][MAX_INCREMENTAL_MACRO] = { "String1"SS_TAP(X_HOME)"X-", "String2"SS_TAP(X_HOME) }; + +bool process_incremental_macro (uint16_t kc) { + + if( kc < INC_MACROS_START || kc > INC_MACROS_END ){ + return false; + } + int macro_idx = (int) (kc - INC_MACROS_START) - 1; + char tempstring[3] = {0}; + tempstring[0] = incremental_macros[macro_idx][key_count]; + // Special cases of SS_TAP SS_UP and SS_DOWN, they require two characters so get both once and skip on next iteration + if( tempstring[0] == '\1' || tempstring[0] == '\2' || tempstring[0] == '\3'){ + tempstring[1] = incremental_macros[macro_idx][++key_count]; + } + if( tempstring[0] == '\0'){ + key_count = 0; + } + send_string(tempstring); + + return true; +}; + +void refresh_incremental_macros (uint16_t kc) { + if (kc == latest_kc) + { + if ( (timer_elapsed(latest_rotation) > TAP_ROTATION_TIMEOUT) || (key_count >= MAX_INCREMENTAL_MACRO) ) key_count = 0; + else key_count++; + } else { + key_count = 0; + latest_kc = kc; + } + + latest_rotation = timer_read(); +} + + +// ======== VISUAL STUDIO CODE SHORTCUTS STUFF + +bool is_macro (uint16_t kc){ + return kc > MACRO_START && kc < MACRO_END; +}; + +bool command_shift_p (bool isMac) { + isMac + ? SEND_STRING(SS_DOWN(X_LSHIFT)SS_LGUI("p")SS_UP(X_LSHIFT)) + : SEND_STRING(SS_DOWN(X_LSHIFT)SS_LCTRL("p")SS_UP(X_LSHIFT)); + return false; +}; + +bool VSCommand(bool isMac, char *cmd) +{ + command_shift_p (isMac); + send_string(cmd); + SEND_STRING(SS_TAP(X_ENTER)); + return false; +}; + +bool handle_macro(uint16_t kc) +{ + switch (kc) + { + case T_TERM: return VSCommand(onMac, "toit"); + case FIX_ALL: return VSCommand(onMac, "faap"); + case BLK_CMNT: return VSCommand(onMac, "tbc"); + case LN_CMNT: return VSCommand(onMac, "tlic"); + case CMD_S_P: return command_shift_p(onMac); + case TRI_TICKS: SEND_STRING("[[[ "); break; + } + return false; +}; diff --git a/users/danielo515/danielo515.h b/users/danielo515/danielo515.h new file mode 100644 index 000000000000..95c01b6e8a4b --- /dev/null +++ b/users/danielo515/danielo515.h @@ -0,0 +1,105 @@ +#pragma once + +#include "quantum.h" + + +bool handle_macro(uint16_t kc); +bool is_macro (uint16_t kc); +bool process_incremental_macro (uint16_t); +void refresh_incremental_macros (uint16_t); +//**************** KEYCODES *********************// + +enum custom_keycodes +{ + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + RGB_SLD, + ALT_TAB, + // Macros + ARROW, + F_ARROW, + QWERTY, + GREP, + // Accented characters + AC_A, + AC_E, + AC_I, + AC_O, + // Custom multi-os key-codes + CUT, + COPY, + PASTE, + SAVE, + UNDO, + CHG_LAYOUT, + FIND, + // OTHER OLD STUFF + LOWER, + RAISE, + ADJUST, + MAC_TGL, + MACRO_START, // START OF VSC DECLARATIONS + T_TERM, + FIX_ALL, + BLK_CMNT, + LN_CMNT, + CMD_S_P, + TRI_TICKS, + MACRO_END, // END OF VSC DECLARATIONS + INC_MACROS_START, + INC_MACROS_END, +}; + + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _F, + _D, + _A, + _S, + _J, + _K, + _MACROS, + _ADJUST, + _SAFE_LAYER +}; + +// Function letters +#define FN_F LT(_F,KC_F) +#define FN_D LT(_D,KC_D) +#define FN_S LT(_S,KC_S) +#define FN_A LT(_A,KC_A) +#define FN_K LT(_K,KC_K) +#define FN_J LT(_J,KC_J) +#define KC_FN_D FN_D +#define KC_FN_S FN_S +#define KC_FN_F FN_F + +#define KC_MACROS OSL(_MACROS) + + +#define KC_E_COLN LSFT(KC_DOT) +#define KC_E_EQL ES_EQL +#define KC_GUI OSM(MOD_RGUI) +#define KC_R_NUB S(KC_NUBS) +#define KC_E_LT KC_NUBS +#define KC_E_GT S(KC_NUBS) +#define KC_E_TILD ES_TILD +#define KC_E_MINS ES_MINS +#define KC_S_SPC SFT_T(KC_SPC) // Tap for Space, hold for Shift +#define KC_E_OVRR ES_OVRR +#define KC_E_APOS ES_APOS +#define KC_E_IEXL ES_IEXL +// Short hand for complex key combinations +# define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) +# define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT)) +# define WIN_TO_LEFT LALT(LSFT( LGUI(KC_LEFT) )) +# define WIN_TO_RIGHT LALT(LSFT( LGUI(KC_RIGHT) )) + +// Ready to use Tap dance definitions, just put them on your layout + +#ifdef TAP_DANCE_ENABLE + #include "tap_dance.h" +#endif diff --git a/users/danielo515/readme.md b/users/danielo515/readme.md new file mode 100644 index 000000000000..1343df978632 --- /dev/null +++ b/users/danielo515/readme.md @@ -0,0 +1,14 @@ +Copyright 2017 Daniel Rodriguez @ danielo515 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/users/danielo515/rules.mk b/users/danielo515/rules.mk new file mode 100644 index 000000000000..091baf20c9d8 --- /dev/null +++ b/users/danielo515/rules.mk @@ -0,0 +1,9 @@ +SRC += danielo515.c + +ifeq ($(strip $(COMBO_ENABLE)), yes) + SRC += combo.c +endif + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dance.c +endif diff --git a/users/danielo515/tap_dance.c b/users/danielo515/tap_dance.c new file mode 100644 index 000000000000..7ddb55c29dda --- /dev/null +++ b/users/danielo515/tap_dance.c @@ -0,0 +1,139 @@ +#include "tap_dance.h" +//**************** Definitions needed for quad function to work *********************// +#ifdef QUAD_DANCE +int cur_dance(qk_tap_dance_state_t *state) +{ + if (state->count == 1) + { + //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP + if (state->interrupted || state->pressed == 0) + return SINGLE_TAP; + else + return SINGLE_HOLD; + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. In example below, that means to send `xx` instead of `Escape`. + else if (state->count == 2) + { + if (state->interrupted) + return DOUBLE_SINGLE_TAP; + else if (state->pressed) + return DOUBLE_HOLD; + else + return DOUBLE_TAP; + } + else + return 6; //magic number. At some point this method will expand to work for more presses +}; + +//**************** Definitions needed for quad function to work *********************// +# endif + +// Slightly better tap dance double: interruption sends double single and any number over double sends the single that number of times +void qk_tap_dance_pair_finished_safe(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; + int count = state->count; + if (state->count == 2) { + if (state->interrupted){ + tap_code16(pair->kc1);register_code16 (pair->kc1); + state->count = 1; // Reset the counter as we are using the first key + } else register_code16 (pair->kc2); + return; + } + register_code16 (pair->kc1); + while(--count){ + unregister_code16(pair->kc1); + register_code16 (pair->kc1); + } +} + +void qk_tap_dance_pair_reset_safe(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; + if (state->count == 2) { + unregister_code16 (pair->kc2); + return; + } + unregister_code16(pair->kc1); +} + +//**************** Tap dance functions *********************// + +qk_tap_dance_action_t tap_dance_actions[] = { + [COPY_CUT] = ACTION_TAP_DANCE_FN(td_copy_cut), + [PASTE_DANCE] = ACTION_TAP_DANCE_FN(td_paste), + [_TD_F1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_F1), + [_TD_F2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_F2), + [_TD_F3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_F3), + [_TD_F4] = ACTION_TAP_DANCE_DOUBLE(KC_4, KC_F4), + [_TD_F5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_F5), + [_TD_F6] = ACTION_TAP_DANCE_DOUBLE(KC_6, KC_F6), + [_TD_F7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_F7), + [_TD_F8] = ACTION_TAP_DANCE_DOUBLE(KC_8, KC_F8), + [_TD_F9] = ACTION_TAP_DANCE_DOUBLE(KC_9, KC_F9), + [_TD_F10] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_F10), + [_TD_F11] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_F11), + [_TD_F12] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_F12), + [_TD_H_ENTER] = ACTION_TAP_DANCE_DOUBLE(KC_H, KC_ENT), + [_TD_CLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON), + [_TD_SLASH] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_BSLASH), + // OLD ONES + [LEFT_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME), + [RGT_HOME] = ACTION_TAP_DANCE_DOUBLE_SAFE(KC_RGHT, KC_END), + [J_ENT] = ACTION_TAP_DANCE_DOUBLE_SAFE(KC_J,KC_ENT), + [H_MINS] = ACTION_TAP_DANCE_DOUBLE_SAFE(KC_H,KC_SLASH), + [_TD_COPY] = ACTION_TAP_DANCE_FN(dance_copy), + [_TD_CUT] = ACTION_TAP_DANCE_FN(dance_cut), + [_TD_PASTE] = ACTION_TAP_DANCE_FN(dance_paste) +}; + +void td_copy_cut(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count == 2) + { + onMac ? SEND_STRING(SS_LGUI("x")) : SEND_STRING(SS_LCTRL("x")); + } + else + { + onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c")); + } + reset_tap_dance(state); +}; + +void td_paste(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count == 2) + { + onMac ? SEND_STRING(SS_DOWN(X_RSHIFT) SS_LGUI("v") SS_UP(X_RSHIFT)) : SEND_STRING(SS_DOWN(X_RSHIFT) SS_LCTRL("v") SS_UP(X_RSHIFT)); + } + else + { + onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v")); + } + reset_tap_dance(state); +}; + +//===== The awesome tap dance for CUT, COPY and PASTE letters +void dance_copy (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { tap_code16(KC_C); } + else + if (state->interrupted) { tap_code16(KC_C);tap_code16(KC_C);} + else CMD(KC_C); + + reset_tap_dance (state); +} + +void dance_cut (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { tap_code16(KC_X); } + else { CMD(KC_X); } + reset_tap_dance (state); +} + +void dance_paste (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + tap_code16(KC_V); + } + else { + CMD(KC_V); + } + reset_tap_dance (state); +} diff --git a/users/danielo515/tap_dance.h b/users/danielo515/tap_dance.h new file mode 100644 index 000000000000..6ec4fe13cf99 --- /dev/null +++ b/users/danielo515/tap_dance.h @@ -0,0 +1,80 @@ +#include "quantum.h" +extern bool CMD(uint16_t kc); +extern bool onMac; + + +#define ACTION_TAP_DANCE_DOUBLE_SAFE(kc1, kc2) { \ + .fn = { NULL, qk_tap_dance_pair_finished_safe, qk_tap_dance_pair_reset_safe }, \ + .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \ + } + +#ifdef QUAD_DANCE +//Enums used to clearly convey the state of the tap dance +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP + // Add more enums here if you want for triple, quadruple, etc. +}; +int cur_dance (qk_tap_dance_state_t *state); +# endif + +enum tap_dance { + COPY_CUT, + PASTE_DANCE, + _TD_F1, + _TD_F2, + _TD_F3, + _TD_F4, + _TD_F5, + _TD_F6, + _TD_F7, + _TD_F8, + _TD_F9, + _TD_F10, + _TD_F11, + _TD_F12, + _TD_H_ENTER, + _TD_CLN, + _TD_SLASH, + // old ones + LEFT_HOME, + J_ENT, + H_MINS, + RGT_HOME, + _TD_COPY, + _TD_CUT, + _TD_PASTE, +}; +void qk_tap_dance_pair_finished_safe(qk_tap_dance_state_t *state, void *user_data); +void qk_tap_dance_pair_reset_safe(qk_tap_dance_state_t *state, void *user_data); +void td_copy_cut (qk_tap_dance_state_t *state, void *user_data); +void td_paste(qk_tap_dance_state_t *state, void *user_data); +int cur_dance (qk_tap_dance_state_t *state); +void dance_cut (qk_tap_dance_state_t *state, void *user_data); +void dance_copy (qk_tap_dance_state_t *state, void *user_data); +void dance_paste (qk_tap_dance_state_t *state, void *user_data); + +#define TD_COPY TD(_TD_COPY) +#define TD_CUT TD(_TD_CUT) +#define KC_TD_COPY TD(_TD_COPY) // Declarations for macros that add KC_ +#define KC_TD_CUT TD(_TD_CUT) +#define KC_TD_PASTE TD(_TD_PASTE) +#define KC_E_GRV ES_GRV +#define TD_F1 TD(_TD_F1) +#define TD_F2 TD(_TD_F2) +#define TD_F3 TD(_TD_F3) +#define TD_F4 TD(_TD_F4) +#define TD_F5 TD(_TD_F5) +#define TD_F6 TD(_TD_F6) +#define TD_F7 TD(_TD_F7) +#define TD_F8 TD(_TD_F8) +#define TD_F9 TD(_TD_F9) +#define TD_F10 TD(_TD_F10) +#define TD_F11 TD(_TD_F11) +#define TD_F12 TD(_TD_F12) +#define H_ENTER TD(_TD_H_ENTER) +#define TD_CLN TD(_TD_CLN) +#define TD_SLASH TD(_TD_SLASH) From a539bd63fead3d35e7d9095a4e5b636e358cbe35 Mon Sep 17 00:00:00 2001 From: dohq Date: Tue, 28 Jan 2020 09:23:24 +0900 Subject: [PATCH 145/331] Fix/remove missing package (#7897) * [fix] yay instead pacman install bootloadhid * [fix] add needed option * [mod] output red color * [fix] overwrite avr-gcc package * [mod] disable install bootloadhid from aur and check already installed * Apply suggestions from code review Co-Authored-By: Joel Challis * Update util/linux_install.sh Co-Authored-By: Joel Challis Co-authored-by: Joel Challis --- util/linux_install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/util/linux_install.sh b/util/linux_install.sh index 922981418276..048b2f3189c5 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -12,12 +12,14 @@ util_dir=$(dirname "$0") # For those distros that do not package bootloadHID install_bootloadhid() { - wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp - cd /tmp/bootloadHID.2012-12-08/commandline/ - if make; then - sudo cp bootloadHID /usr/local/bin + if ! command -v bootloadHID >/dev/null; then + wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp + cd /tmp/bootloadHID.2012-12-08/commandline/ + if make; then + sudo cp bootloadHID /usr/local/bin + fi + cd - fi - cd - } if grep ID /etc/os-release | grep -qE "fedora"; then @@ -73,7 +75,7 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then zip elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then - sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz + sudo pacman --needed -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz sudo pacman -S --needed \ arm-none-eabi-binutils \ arm-none-eabi-gcc \ @@ -81,9 +83,7 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then avrdude \ avr-binutils \ avr-libc \ - avr-gcc \ base-devel \ - bootloadhid \ clang \ dfu-programmer \ dfu-util \ From eb5e513d262921600c7c17cc1e8f34b49bccddfb Mon Sep 17 00:00:00 2001 From: Flexerm <51996324+Flexerm@users.noreply.github.com> Date: Tue, 28 Jan 2020 01:05:29 +0000 Subject: [PATCH 146/331] [Keyboard] FLX Virgo, cleaned up layouts and added VIA keymap (#7997) * Reworked for VIA support Reworked for VIA support and tidying up of older code. * Fixed naming issues, and prepared for VIA compat Via compat added * Improve layouts, tidy code, via keymap Added support for VIA and cleaned up some code and layouts. * Implimented suggestions by MechMerlin * Fix capitalisation Mistake raised by Drashna now fixed. * Tidy comments as requested by noroadsleft * Tidy comments as requested by fauxpark --- keyboards/flx/virgo/info.json | 3 +- keyboards/flx/virgo/keymaps/default/keymap.c | 40 ++++++++++----- keyboards/flx/virgo/keymaps/via/keymap.c | 52 ++++++++++++++++++++ keyboards/flx/virgo/keymaps/via/readme.md | 1 + keyboards/flx/virgo/keymaps/via/rules.mk | 1 + keyboards/flx/virgo/readme.md | 2 +- keyboards/flx/virgo/rules.mk | 7 ++- keyboards/flx/virgo/virgo.c | 3 +- keyboards/flx/virgo/virgo.h | 39 +++++++-------- 9 files changed, 108 insertions(+), 40 deletions(-) create mode 100644 keyboards/flx/virgo/keymaps/via/keymap.c create mode 100644 keyboards/flx/virgo/keymaps/via/readme.md create mode 100644 keyboards/flx/virgo/keymaps/via/rules.mk diff --git a/keyboards/flx/virgo/info.json b/keyboards/flx/virgo/info.json index 91fe3bc3419d..0bd70af63963 100644 --- a/keyboards/flx/virgo/info.json +++ b/keyboards/flx/virgo/info.json @@ -1,12 +1,11 @@ { - "keyboard_name": "flx-virgo-default", + "keyboard_name": "FLX Virgo", "url": "", "maintainer": "qmk", "width": 20.25, "height": 6.25, "layouts": { "LAYOUT": { - "key_count": 91, "layout": [ {"label":"K00 (C6,F0)", "x":0, "y":0}, {"label":"K01 (C6,F1)", "x":1.5, "y":0}, diff --git a/keyboards/flx/virgo/keymaps/default/keymap.c b/keyboards/flx/virgo/keymaps/default/keymap.c index 789c369dbdd9..1384b91db086 100644 --- a/keyboards/flx/virgo/keymaps/default/keymap.c +++ b/keyboards/flx/virgo/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2019 MechMerlin +/* Copyright 2020 Flexerm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,20 +17,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_LALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - BL_TOGG, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_TOG, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_0, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; \ No newline at end of file diff --git a/keyboards/flx/virgo/keymaps/via/keymap.c b/keyboards/flx/virgo/keymaps/via/keymap.c new file mode 100644 index 000000000000..c10f3751ec73 --- /dev/null +++ b/keyboards/flx/virgo/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Flexerm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/flx/virgo/keymaps/via/readme.md b/keyboards/flx/virgo/keymaps/via/readme.md new file mode 100644 index 000000000000..67398c8bd7a4 --- /dev/null +++ b/keyboards/flx/virgo/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for FLX - Virgo diff --git a/keyboards/flx/virgo/keymaps/via/rules.mk b/keyboards/flx/virgo/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/flx/virgo/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/flx/virgo/readme.md b/keyboards/flx/virgo/readme.md index 1edfeaf8302e..2d97574858d4 100644 --- a/keyboards/flx/virgo/readme.md +++ b/keyboards/flx/virgo/readme.md @@ -6,7 +6,7 @@ Custom Split TKL * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) * Hardware Supported: Virgo PCB -* Hardware Availability: GB TBD +* Hardware Availability: GB FEB 15th 2020 - to be held on Geekhack Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/flx/virgo/rules.mk b/keyboards/flx/virgo/rules.mk index b9bb2915f1da..c512b6a02f43 100644 --- a/keyboards/flx/virgo/rules.mk +++ b/keyboards/flx/virgo/rules.mk @@ -1,3 +1,4 @@ +# MCU name MCU = atmega32u4 # Bootloader selection @@ -16,8 +17,8 @@ BOOTLOADER = atmel-dfu BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work @@ -32,5 +33,3 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs LINK_TIME_OPTIMIZATION_ENABLE = yes -# generated by KBFirmware JSON to QMK Parser -# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/flx/virgo/virgo.c b/keyboards/flx/virgo/virgo.c index 102d91a709db..142ddf3ebc05 100644 --- a/keyboards/flx/virgo/virgo.c +++ b/keyboards/flx/virgo/virgo.c @@ -1,4 +1,5 @@ /* Copyright 2019 MechMerlin + * Edits etc 2020 Flexerm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +20,7 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - setPinOutput(E6); + setPinOutput(E6); setPinOutput(B2); matrix_init_user(); } diff --git a/keyboards/flx/virgo/virgo.h b/keyboards/flx/virgo/virgo.h index 015585c4e1da..fcfcac50e4b5 100644 --- a/keyboards/flx/virgo/virgo.h +++ b/keyboards/flx/virgo/virgo.h @@ -1,4 +1,5 @@ /* Copyright 2019 MechMerlin + * Edits etc 2020 Flexerm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,26 +19,24 @@ #include "quantum.h" #define LAYOUT( \ - K00, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, K08, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K66, K27, K37, K28, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, K47, K57, K48, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K76, \ - K80, K90, K81, K91, K82, K92, K83, KA3, K93, K84, K94, K85, K95, K86, K96, K97, \ - KA0, KB0, KA1, KB2, KB4, KB5, KA6, KB6, KA7, KB7, KA8 \ + K00, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, K08, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K66, K27, K37, K28, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, K47, K57, K48, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K76, \ + K80, K90, K81, K91, K82, K92, K83, KA3, K93, K84, K94, K85, K95, K86, K96, K97, \ + KA0, KB0, KA1, KB2, KB4, KB5, KA6, KB6, KA7, KB7, KA8 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ - { KC_NO, K11, K12, K13, K14, K15, K16, K17, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57, KC_NO }, \ - { K60, K61, K62, K63, K64, K65, K66, KC_NO, KC_NO }, \ - { K70, K71, K72, K73, K74, K75, K76, KC_NO, KC_NO }, \ - { K80, K81, K82, K83, K84, K85, K86, KC_NO, KC_NO }, \ - { K90, K91, K92, K93, K94, K95, K96, K97, KC_NO }, \ - { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7, KA8 }, \ - { KB0, KC_NO, KB2, KC_NO, KB4, KB5, KB6, KB7, KC_NO }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { KC_NO, K11, K12, K13, K14, K15, K16, K17, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, KC_NO, KC_NO }, \ + { K70, K71, K72, K73, K74, K75, K76, KC_NO, KC_NO }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO, KC_NO }, \ + { K90, K91, K92, K93, K94, K95, K96, K97, KC_NO }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KA7, KA8 }, \ + { KB0, KC_NO, KB2, KC_NO, KB4, KB5, KB6, KB7, KC_NO }, \ } -// generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file From ee88feb7598e9f4b70a8e9cb839f4dc303ce9604 Mon Sep 17 00:00:00 2001 From: shela Date: Tue, 28 Jan 2020 10:18:12 +0900 Subject: [PATCH 147/331] [Docs] Update Japanese translation (#8015) --- docs/ja/_summary.md | 38 +++++++++++-------- docs/ja/arm_debugging.md | 4 +- docs/ja/config_options.md | 12 +++--- .../newbs_building_firmware_configurator.md | 4 +- docs/ja/newbs_flashing.md | 16 ++++---- docs/ja/newbs_getting_started.md | 2 +- docs/ja/newbs_git_resynchronize_a_branch.md | 2 +- docs/ja/newbs_git_using_your_master_branch.md | 4 +- docs/ja/newbs_learn_more_resources.md | 2 +- docs/ja/newbs_testing_debugging.md | 6 +-- 10 files changed, 49 insertions(+), 41 deletions(-) diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index e5e19ddc80e7..afe962f86237 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -10,32 +10,34 @@ * [学習リソース](ja/newbs_learn_more_resources.md) * [QMKの基本](ja/README.md) - * [QMKの導入](ja/getting_started_introduction.md) + * [QMK の導入](ja/getting_started_introduction.md) * [QMK CLI](ja/cli.md) * [QMK CLI 設定](ja/cli_configuration.md) - * [QMKへの貢献](ja/contributing.md) - * [Githubの使い方](ja/getting_started_github.md) + * [QMK への貢献](ja/contributing.md) + * [Github の使い方](ja/getting_started_github.md) * [ヘルプ](ja/getting_started_getting_help.md) * [破壊的な変更](ja/breaking_changes.md) + * [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md) * [2019年8月30日](ja/ChangeLog/20190830.md) * [FAQ](ja/faq.md) - * [一般的なFAQ](ja/faq_general.md) - * [QMKのビルド/コンパイル](ja/faq_build.md) - * [QMKのデバッグ/トラブルシューティング](ja/faq_debug.md) + * [一般的な FAQ](ja/faq_general.md) + * [QMK のビルド/コンパイル](ja/faq_build.md) + * [QMK のデバッグ/トラブルシューティング](ja/faq_debug.md) * [キーマップ](ja/faq_keymap.md) - * [Zadigを使ったドライバのインストール](ja/driver_installation_zadig.md) + * [Zadig を使ったドライバのインストール](ja/driver_installation_zadig.md) * 詳細なガイド * [ビルドツールのインストール](ja/getting_started_build_tools.md) - * [Vagrantのガイド](ja/getting_started_vagrant.md) + * [Vagrant のガイド](ja/getting_started_vagrant.md) * [ビルド/コンパイルの説明](ja/getting_started_make_guide.md) * [ファームウェアのフラッシュ](ja/flashing.md) * [機能のカスタマイズ](ja/custom_quantum_functions.md) * [キーマップの概要](ja/keymap.md) * [ハードウェア](ja/hardware.md) + * [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md) * [AVR プロセッサ](ja/hardware_avr.md) * [ドライバ](ja/hardware_drivers.md) @@ -66,7 +68,7 @@ * [ブートマジック](ja/feature_bootmagic.md) * [コンボ](ja/feature_combo.md) * [コマンド](ja/feature_command.md) - * [Debounce API](ja/feature_debounce_type.md) + * [デバウンス API](ja/feature_debounce_type.md) * [DIP スイッチ](ja/feature_dip_switch.md) * [動的マクロ](ja/feature_dynamic_macros.md) * [エンコーダ](ja/feature_encoders.md) @@ -90,27 +92,31 @@ * [Stenography](ja/feature_stenography.md) * [Swap Hands](ja/feature_swap_hands.md) * [タップ ダンス](ja/feature_tap_dance.md) - * [Terminal](ja/feature_terminal.md) + * [ターミナル](ja/feature_terminal.md) * [感熱式プリンタ](ja/feature_thermal_printer.md) * [ユニコード](ja/feature_unicode.md) - * [Userspace](ja/feature_userspace.md) + * [ユーザスペース](ja/feature_userspace.md) * [Velocikey](ja/feature_velocikey.md) * メーカーおよびモッダーのために - * [Hand Wiring Guide](ja/hand_wire.md) - * [ISP Flashing Guide](ja/isp_flashing_guide.md) + * [Hand Wiring ガイド](ja/hand_wire.md) + * [ISP 書き込みガイド](ja/isp_flashing_guide.md) * [ARM デバッグ ガイド](ja/arm_debugging.md) + * [ADC ドライバ](ja/adc_driver.md) * [I2C ドライバ](ja/i2c_driver.md) + * [WS2812 ドライバ](ja/ws2812_driver.md) + * [EEPROM ドライバ](ja/eeprom_driver.md) * [GPIO コントロール](ja/internals_gpio_control.md) + * [カスタムマトリックス](ja/custom_matrix.md) * [Proton C 規約](ja/proton_c_conversion.md) * より深く知るために * [キーボードがどのように動作するか](ja/how_keyboards_work.md) - * [QMKの理解](ja/understanding_qmk.md) + * [QMK の理解](ja/understanding_qmk.md) * 他の話題 - * [EclipseでQMKを使用](ja/other_eclipse.md) - * [VSCodeでQMKを使用](ja/other_vscode.md) + * [Eclipse で QMK を使用](ja/other_eclipse.md) + * [VSCode で QMK を使用](ja/other_vscode.md) * [サポート](ja/support.md) * [翻訳を追加する方法](ja/translating.md) diff --git a/docs/ja/arm_debugging.md b/docs/ja/arm_debugging.md index 6267d0f8adae..9a6cd515a029 100644 --- a/docs/ja/arm_debugging.md +++ b/docs/ja/arm_debugging.md @@ -64,13 +64,13 @@ Eclipse に QMK をビルドしようとするデバイスを教える必要が ## ビルド -全て正しくセットアップできていれば、ハンマーボタンを押すとファームウェアがビルドされ、.binファイルが出力されるはずです。 +全て正しくセットアップできていれば、ハンマーボタンを押すとファームウェアがビルドされ、.bin ファイルが出力されるはずです。 ## デバッグ ### デバッガの接続 -ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCUを 完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。 +ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCU を 完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。 注意: SWCLK と SWDIO ピンがキーボードのマトリックスで使われていないことを確認してください。もし使われている場合は、一時的に他のピンに切り替えることができます。 diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 6cdbd2cf1f37..a1d74543818c 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -1,8 +1,8 @@ # QMK の設定 QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。 @@ -154,6 +154,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * タップされた直後に、デュアルロールキーを修飾子として使用できるようにします * [Hold after tap](ja/feature_advanced_keycodes.md#tapping-force-hold)を見てください * タップトグル機能を無効にします (`TT` あるいは One Shot Tap Toggle) +* `#define TAPPING_FORCE_HOLD_PER_KEY` + * キーごとの `TAPPING_FORCE_HOLD` 設定処理を有効にします。 * `#define LEADER_TIMEOUT 300` * リーダーキーがタイムアウトするまでの時間 * タイムアウトする前にシーケンスを終了できない場合は、タイムアウトの設定を増やす必要があるかもしれません。あるいは、`LEADER_PER_KEY_TIMING` オプションを有効にすると良いでしょう。これは各キーがタップされた後でタイムアウトを再設定します。 @@ -187,7 +189,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * `#define RGBLIGHT_SPLIT` * 分割キーボードの左半分の RGB LED の出力を右半分の RGB LED の入力につなげるかわりに、それぞれの側で個別にコントローラの出力ピンが直接 RGB LED の入力に繋がっているときは、この定義が必要です。 * `#define RGBLED_SPLIT { 6, 6 }` - * 分割キーボードの各半分の `RGB_DI_PIN` に直接配線されている接続されているLEDの数 + * 分割キーボードの各半分の `RGB_DI_PIN` に直接配線されている接続されている LED の数 * 最初の値は左半分の LED の数を示し、2番目の値は右半分です。 * RGBLED_SPLIT が定義されている場合、RGBLIGHT_SPLIT は暗黙的に定義されます。 * `#define RGBLIGHT_HUE_STEP 12` @@ -216,7 +218,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 ### 左右の設定 -一つ覚えておかなければならないことは、USB ポートが接続されている側が常にマスター側であるということです。USB に接続されていない側はスレーブです。 +1つ覚えておかなければならないことは、USB ポートが接続されている側が常にマスター側であるということです。USB に接続されていない側はスレーブです。 分割キーボードの左右を設定するには、幾つかの異なる方法があります (優先度の順にリストされています): @@ -260,7 +262,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * `#define SELECT_SOFT_SERIAL_SPEED ` (デフォルトの速度は1です) * serial 通信を使う時のプロトコルの速度を設定します。 * 速度: - * 0: 約189kbps (実験目的のみ) + * 0: 約 189kbps (実験目的のみ) * 1: 約 137kbps (デフォルト) * 2: 約 75kbps * 3: 約 39kbps diff --git a/docs/ja/newbs_building_firmware_configurator.md b/docs/ja/newbs_building_firmware_configurator.md index ae3d3cf286db..89c37a1e6723 100644 --- a/docs/ja/newbs_building_firmware_configurator.md +++ b/docs/ja/newbs_building_firmware_configurator.md @@ -63,7 +63,7 @@ QMK Configurator は Chrome/Firefox で最適に動作します。 2分割の右シフト: 両方とも右シフトで埋めます。 -左シフトとISOサポート用に1つずつ: 両方とも左シフトで埋めます。 +左シフトと ISO サポート用に1つずつ: 両方とも左シフトで埋めます。 5分割だが4キーのみ: 以前やったことがある人を推測して確認するか尋ねてください。 @@ -73,7 +73,7 @@ QMK Configurator は Chrome/Firefox で最適に動作します。 後日、`Import Keymap` ボタンを押すことで、この .json ファイルをロードできます。 -!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .jsonファイルと同じ形式ではありません。これらのツールにこれを使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、キーボードが **爆発** する可能性があります。 +!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .json ファイルと同じ形式ではありません。これらのツールにこれを使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、キーボードが **爆発** する可能性があります。 ## ファームウェアファイルを生成する diff --git a/docs/ja/newbs_flashing.md b/docs/ja/newbs_flashing.md index f2ca914ee41f..a407066a54ca 100644 --- a/docs/ja/newbs_flashing.md +++ b/docs/ja/newbs_flashing.md @@ -13,7 +13,7 @@ キーボードに書き込む最も簡単な方法は [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) を使うことです。 ただし、QMK Toolbox は、現在は Windows と macOS でしか使えません。 -Linuxを使用している場合(および、コマンドラインでファームウェアを書き込みたい場合)は、下の方で概説する[方法](ja/newbs_flashing.md#flash-your-keyboard-from-the-command-line)で行なう必要があります。 +Linux を使用している場合(および、コマンドラインでファームウェアを書き込みたい場合)は、下の方で概説する[方法](ja/newbs_flashing.md#flash-your-keyboard-from-the-command-line)で行なう必要があります。 ### QMK Toolbox にファイルをロードする @@ -65,7 +65,7 @@ planck_rev5_default.hex * 基板(PCB)に付けられている物理的な `RESET` ボタンを押す * PCB 上の `BOOT0` か `RESET` のラベルの付いたヘッダピンを探し、PCB 接続中にそれらを互いにショートする -うまくいけば、QMK Toolboxに次のようなメッセージが表示されます。 +うまくいけば、QMK Toolbox に次のようなメッセージが表示されます。 ``` *** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 @@ -121,7 +121,7 @@ QMK Toolbox の `Flash` ボタンをクリックします。 この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。 ブートローダは主に 5 種類のものが使われています。 -Pro Micro とそのクローンは Caterina を、Teensy は HalfKay を、OLKBの AVR ボードは QMK-DFU を、その他の ATmega32U4 ボードは DFU を、そして多くの ARM ボードは ARM DFU を使います。 +Pro Micro とそのクローンは Caterina を、Teensy は HalfKay を、OLKB の AVR ボードは QMK-DFU を、その他の ATmega32U4 ボードは DFU を、そして多くの ARM ボードは ARM DFU を使います。 より詳しいブートローダの情報は、[Flashing Instructions and Bootloader Information](ja/flashing.md) にあります。 @@ -178,10 +178,10 @@ Checking file size of planck_rev5_xyverz.hex ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 -* `:dfu` - これが通常のオプションで、DFUデバイスが使用可能になるまで待機したのちファームウェアを書き込みます。5秒ごとに、DFUデバイスが存在するかチェックしています。 +* `:dfu` - これが通常のオプションで、DFU デバイスが使用可能になるまで待機したのちファームウェアを書き込みます。5秒ごとに、DFU デバイスが存在するかチェックしています。 * `:dfu-ee` - 通常の hex ファイルの代わりに `eep` ファイルを書き込みます。これを使用するのはまれです。 -* `:dfu-split-left` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ -* `:dfu-split-right` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ +* `:dfu-split-left` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROM ファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ +* `:dfu-split-right` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROM ファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ ### Caterina @@ -259,8 +259,8 @@ avrdude.exe done. Thank you. * `:avrdude` - これが通常のオプションで、Caterina デバイスが(新しい COM ポートを検出して)使用可能になるまで待機し、ファームウェアを書き込みます。 * `:avrdude-loop` - これは `:avrdude` と同じです。ただし書き込みが終了すると再び Caterina デバイスの書き込み待ちに戻ります。これは何台ものデバイスへの書き込みに便利です。_Control+C を押して、手動でこの繰り返しを終了させる必要があります。_ -* `:avrdude-split-left` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ -* `:avrdude-split-right` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ +* `:avrdude-split-left` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」EEPROM ファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ +* `:avrdude-split-right` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROM ファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ ### HalfKay diff --git a/docs/ja/newbs_getting_started.md b/docs/ja/newbs_getting_started.md index 6f5cd92cd7b1..2e283840ca44 100644 --- a/docs/ja/newbs_getting_started.md +++ b/docs/ja/newbs_getting_started.md @@ -12,7 +12,7 @@ QMK は、そのソフトウェアの役割を果たし、ボタンの押下を カスタムキーマップを作るということは、キーボード上で動くプログラムを作るということなのです。 QMK は、簡単なことは簡単に、そして、難しいことを可能なことにすることで、あなたの手にたくさんのパワーをもたらします。 -パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけでOKです。 +パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけで OK です。 # はじめに diff --git a/docs/ja/newbs_git_resynchronize_a_branch.md b/docs/ja/newbs_git_resynchronize_a_branch.md index 80ae794a9261..e81d2da1fb1c 100644 --- a/docs/ja/newbs_git_resynchronize_a_branch.md +++ b/docs/ja/newbs_git_resynchronize_a_branch.md @@ -7,7 +7,7 @@ --> 仮にあなたの `master` ブランチにあなたのコミットを行い、そしてあなたの QMK リポジトリの更新が必要になったとします。 -(フォーク元の) QMKの `master` ブランチをあなたの `master` ブランチに `git pull` することもできますが、GitHub は、あなたのブランチが `qmk:master` より何コミットか先行していると通知します、この状態で QMK にプルリクエストを行う場合、問題が発生する可能性があります。 +(フォーク元の) QMK の `master` ブランチをあなたの `master` ブランチに `git pull` することもできますが、GitHub は、あなたのブランチが `qmk:master` より何コミットか先行していると通知します、この状態で QMK にプルリクエストを行う場合、問題が発生する可能性があります。 (訳注:この通知は、GitHub のあなたのリポジトリの code ペインのブランチ選択メニューの下のあたりで `This branch is 3 commit ahead of qmk:master` という様な文面で表示されています。) ?> このドキュメントは [あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと](ja/newbs_git_using_your_master_branch.md) で詳述されている概念に基づいています。その概念に慣れていない場合は、まずそれを読んでから、ここに戻ってください。 diff --git a/docs/ja/newbs_git_using_your_master_branch.md b/docs/ja/newbs_git_using_your_master_branch.md index 08600503490e..3ee1996c1be4 100644 --- a/docs/ja/newbs_git_using_your_master_branch.md +++ b/docs/ja/newbs_git_using_your_master_branch.md @@ -41,7 +41,7 @@ upstream https://github.com/qmk/qmk_firmware.git (push) このコマンドは `upstream` というニックネームを持つ QMK リポジトリから、ブランチとタグ — "refs" と総称されます — を取得します。 これで、あなたのフォーク `origin` のデータを QMK が保持するデータと比較できます。 -あなたのフォークの `master` を更新するには、次を実行します、各行の後にEnterキーを押してください: +あなたのフォークの `master` を更新するには、次を実行します、各行の後に Enter キーを押してください: ``` git checkout master @@ -98,4 +98,4 @@ git commit -m "My commit message." 最後のステップは、変更をフォークにプッシュすることです。 これを行うには、`git push`と入力します。 -Gitは、 `dev_branch`の現在の状態をフォークに公開します。 +Git は、 `dev_branch`の現在の状態をフォークに公開します。 diff --git a/docs/ja/newbs_learn_more_resources.md b/docs/ja/newbs_learn_more_resources.md index 9adcf536062e..523d91a05a88 100644 --- a/docs/ja/newbs_learn_more_resources.md +++ b/docs/ja/newbs_learn_more_resources.md @@ -6,7 +6,7 @@ git diff ed0575fc8 HEAD -- docs/newbs_learn_more_resources.md | cat --> -これらのリソースは、QMKコミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。 +これらのリソースは、QMK コミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。 ## Git に関するリース: diff --git a/docs/ja/newbs_testing_debugging.md b/docs/ja/newbs_testing_debugging.md index 5ec5811a1e9f..784f872e676a 100644 --- a/docs/ja/newbs_testing_debugging.md +++ b/docs/ja/newbs_testing_debugging.md @@ -12,7 +12,7 @@ 通常、キーボードをテストするのは非常に簡単です。全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。キーを押したことを見逃さないためのプログラムもあります。 -メモ: これらのプログラムはQMKによって提供・承認されたものではありません。 +メモ: これらのプログラムは QMK によって提供・承認されたものではありません。 * [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based) * [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only) @@ -40,7 +40,7 @@ void keyboard_post_init_user(void) { ### hid_listenを使ったデバッグ -ターミナルベースの方法がお好みですか?PJRCが提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルはWindows, Linux, MacOS用が用意されています。 +ターミナルベースの方法がお好みですか?PJRC が提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルは Windows, Linux, MacOS 用が用意されています。 @@ -50,7 +50,7 @@ void keyboard_post_init_user(void) { #include -そのあとは、いくつかの異なったprint関数を使用することが出来ます。 +そのあとは、いくつかの異なった print 関数を使用することが出来ます。 * `print("string")`: シンプルな文字列を出力します * `uprintf("%s string", var)`: フォーマットされた文字列を出力します From 1f0404e3c547613211235b8593a4ee701d644bae Mon Sep 17 00:00:00 2001 From: Rafael Azevedo Date: Mon, 27 Jan 2020 20:42:46 -0500 Subject: [PATCH 148/331] [Keymap] Added gaming layout and read me (#7996) * Added gaming layout and read me * Code format changes and spelling fixes for PR * Moved keymap to different folder --- .../keymaps/rafael-azevedo/keymap.c | 42 +++++++++++++++++++ .../keymaps/rafael-azevedo/readme.md | 9 ++++ 2 files changed, 51 insertions(+) create mode 100755 keyboards/maartenwut/wonderland/keymaps/rafael-azevedo/keymap.c create mode 100644 keyboards/maartenwut/wonderland/keymaps/rafael-azevedo/readme.md diff --git a/keyboards/maartenwut/wonderland/keymaps/rafael-azevedo/keymap.c b/keyboards/maartenwut/wonderland/keymaps/rafael-azevedo/keymap.c new file mode 100755 index 000000000000..5c59d53a7d9e --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/rafael-azevedo/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +#define CAPSTL CTL_T(KC_CAPS) + +enum layers { + _BASE, + _GAME, + _FUNC, + _RGB +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PGUP, KC_PGDN, + KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_END, CAPSTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_DEL, MO(2), + TG(1), KC_LAPO, KC_BSPC, KC_LGUI, KC_SPC, KC_RAPC, MO(3) + ), +[_GAME] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_SPC, _______, _______, _______, _______ + ), +[_FUNC] = LAYOUT( + KC_PSCR, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, KC_VOLU, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, + KC_LSFT, KC_BRIU, KC_BRID, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, + KC_MPLY, KC_LALT, _______, _______, _______, KC_RALT, XXXXXXX + ), +[_RGB] = LAYOUT( + RGB_TOG, VLK_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, RESET, + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +RGB_RMOD, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, + KC_LSFT, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, + _______, KC_LALT, _______, _______, _______, KC_RALT, XXXXXXX + ) +}; diff --git a/keyboards/maartenwut/wonderland/keymaps/rafael-azevedo/readme.md b/keyboards/maartenwut/wonderland/keymaps/rafael-azevedo/readme.md new file mode 100644 index 000000000000..a5381fff3273 --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/rafael-azevedo/readme.md @@ -0,0 +1,9 @@ +## Rafael-Azevedo a layout for everyday use and gaming + +### This layout was designed for everyday work with all necessary keys reachable from the home row, while having a toggle layer moving the space and backspace to a more traditional location. + +* The main layer gives you access to home, end, pgup and pgdn. While keeping control, delete, backspace, and enter reachable when your fingers are in the home row. +* The main layer also includes capslock key while tapped and it becomes control when pressed. +* **Toggle(1)[Game]:** Toggles into a gaming layout that gives you space on your left hand thumb and moves the backspace to the traditional location. That way you can game one handed while using a mouse. +* **MO(2)[_FUNC]:** Is a momentary layer for all special functions including F keys , volume control, and print screen. It also keys character C and V, allowing you to copy and paste while using arrow keys. This is an easy to reach location for all special funtionality that is not normally used. +* **M(3)[_RGB]:** Is a momentary layer that gives you all the RGB control and keyboard Reset. This moves the funtionality not normally used to a place you won't accidently hit and get annoyed at. From 92c62352cf869a4099eb821b9e7d56d303bbec7b Mon Sep 17 00:00:00 2001 From: Samuel Jahnke <118westmaine@gmail.com> Date: Mon, 27 Jan 2020 20:47:36 -0500 Subject: [PATCH 149/331] [Keymap] Finalize Keymap Planck/Samuel (#8005) * indent and layout changes * finalizations * use layout macros here instead of the raw matrix arrays --- keyboards/planck/keymaps/samuel/README.org | 952 +++++++++------------ keyboards/planck/keymaps/samuel/keymap.c | 228 ++--- 2 files changed, 503 insertions(+), 677 deletions(-) diff --git a/keyboards/planck/keymaps/samuel/README.org b/keyboards/planck/keymaps/samuel/README.org index 3c0f08a9d908..d38b8fc3b5ee 100644 --- a/keyboards/planck/keymaps/samuel/README.org +++ b/keyboards/planck/keymaps/samuel/README.org @@ -7,117 +7,162 @@ before, so bear with me. * Layers -#+BEGIN_COMMENT -#+NAME: empty-layer -| <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | -|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -| - | - | - | - | - | - | - | - | - | - | - | - | -| - | - | - | - | - | - | - | - | - | - | - | - | -| - | - | - | - | - | - | - | - | - | - | - | - | -| - | - | - | - | - | - | - | - | - | - | - | - | -|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -#+END_COMMENT - -This is my "pretty" org mode organized table for my main dvorak layer. If you -don't use org mode, it won't be that exciting, but if you enjoy working in org -mode, you can edit this table directly, and this file is tangled to the actual -keymap. No more organizing spaces or converting to and from comments. - -#+NAME: home-layer -|--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------| -| T_LRSE | QUOT | COMM | DOT | P | Y | F | G | C | R | L | T_RRSE | -| T_LSFT | A | O | E | U | I | D | H | T | N | S | T_RSFT | -| T_LCTL | SCLN | Q | J | K | X | B | M | W | V | Z | T_RCTL | -| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | T_RGUI | -|--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------| - -This qwerty layout is just so normal people can try out the board. Tap keys -would need to be customized I think, more on that later. I also put another -dvorak key here because I have nightmares of getting trapped in this forsaken -layout. - -#+NAME: qwerty-layer -|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------| -| T_LRSE | Q | W | E | R | T | Y | U | I | O | P | T_RRSE | -| T_LSFT | A | S | D | F | G | H | J | K | L | SCLN | T_RSFT | -| T_LCTL | Z | X | C | V | B | N | M | COMM | DOT | QUOT | T_RCTL | -| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | DVORAK | -|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------| - -I tried to keep my layout bare bones, just what would be available on a normal -keyboard, minus some keys I never used. This one secondary layer should cover a -majority of the keys not found on the home layer. The bottom left copies a normal -keyboards symbols from shifted numbers, and the rest is placed where convenient, -with some considerations for one handed use, hence the shortcuts in the top -left. - -#+NAME: secondary-layer -|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------| -| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | -- | -- | -| EZSHFT | ESC | CAPS | PGUP | PGDN | HOME | ASTR | 4 | 5 | 6 | 0 | EZSHFT | -| EZCTRL | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | COM | EZCTRL | -| EZGUI | EZALT | EZUP | EZDOWN | SPC | AMPR | PIPE | END | EZLEFT | EZRGHT | EZALT | EZGUI | -|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------| - -Basic command layer for one-shot macros and function keys. - -#+NAME: command-layer -|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----| -| -- | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | -- | -| -- | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | -- | -| -- | F21 | F22 | F23 | F24 | QWERTY | DVORAK | USER | EMAIL | NAME | -- | -- | -| -- | -- | -- | -- | -- | -- | -- | DIR | -- | -- | -- | -- | -|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----| - -But wait, we are missing several important keys? well, yes, but the modifier keys -all do other keys when tapped. More about that in the keymap section. + #+BEGIN_COMMENT + #+NAME: empty-layer + | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | - | - | - | - | - | - | - | - | - | - | - | - | + | - | - | - | - | - | - | - | - | - | - | - | - | + | - | - | - | - | - | - | - | - | - | - | - | - | + | - | - | - | - | - | - | - | - | - | - | - | - | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + #+END_COMMENT + + This is my "pretty" org mode organized table for my main dvorak layer. If you + don't use org mode, it won't be that exciting, but if you enjoy working in org + mode, you can edit this table directly, and this file is tangled to the actual + keymap. No more organizing spaces or converting to and from comments. + + #+NAME: home-layer + |--------+--------+------+------+-----+-----+------+-----+------+-------+--------+--------| + | T_LRSE | QUOT | COMM | DOT | P | Y | F | G | C | R | L | T_RRSE | + | T_LSFT | A | O | E | U | I | D | H | T | N | S | T_RSFT | + | T_LCTL | SCLN | Q | J | K | X | B | M | W | V | Z | T_RCTL | + | T_LGUI | T_LALT | UP | DOWN | SPC | EQL | GRAVE | SPC | LEFT | RIGHT | T_RALT | T_RGUI | + |--------+--------+------+------+-----+-----+------+-----+------+-------+--------+--------| + + Tap keys. Used only with the "T_" keys above. + + #+NAME: tap-layer + |----------+------+---+---+---+---+---+---+---+---+------+----------| + | DEL | - | - | - | - | - | - | - | - | - | - | BSPC | + | TAB | - | - | - | - | - | - | - | - | - | - | ENTER | + | LBRACKET | - | - | - | - | - | - | - | - | - | - | RBRACKET | + | SLASH | LPRN | - | - | - | - | - | - | - | - | RPRN | MINS | + |----------+------+---+---+---+---+---+---+---+---+------+----------| + + #+NAME: hold-layer + |------+------+---+---+---+---+---+---+---+---+------+------| + | RISE | - | - | - | - | - | - | - | - | - | - | RISE | + | LSFT | - | - | - | - | - | - | - | - | - | - | RSFT | + | LCTL | - | - | - | - | - | - | - | - | - | - | RCTL | + | LGUI | LALT | - | - | - | - | - | - | - | - | RALT | RGUI | + |------+------+---+---+---+---+---+---+---+---+------+------| + + I tried to keep my layout bare bones, just what would be available on a normal + keyboard, minus some keys I never used. This one secondary layer should cover a + majority of the keys not found on the home layer. The bottom left copies a normal + keyboards symbols from shifted numbers, and the rest is placed where convenient, + with some considerations for one handed use, hence the shortcuts in the top + left. + + #+NAME: secondary-layer + |--------+--------+--------+--------+--------+------+--------+-----+--------+--------+-------+--------| + | -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | ASTR | 7 | 8 | 9 | -- | -- | + | EZSHFT | ESC | CAPS | PGUP | PGDN | HOME | AMPR | 4 | 5 | 6 | 0 | EZSHFT | + | EZCTRL | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | COM | EZCTRL | + | EZGUI | EZALT | EZUP | EZDOWN | SPC | PIPE | BSLASH | END | EZLEFT | EZRGHT | EZALT | EZGUI | + |--------+--------+--------+--------+--------+------+--------+-----+--------+--------+-------+--------| + + Basic command layer for one-shot macros and function keys. + + #+NAME: command-layer + |----+-----+-----+-----+-----+--------+--------+-----+-----+-----+-----+----| + | -- | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | -- | + | -- | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | -- | + | -- | F21 | F22 | F23 | F24 | QWERTY | DVORAK | -- | -- | -- | -- | -- | + | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | + |----+-----+-----+-----+-----+--------+--------+-----+-----+-----+-----+----| + + This qwerty layout is just so normal people can try out the board. Tap keys + would need to be customized I think, more on that later. I also put another + dvorak key here because I have nightmares of getting trapped in this forsaken + layout. + + #+NAME: qwerty-layer + |--------+--------+----+------+-----+-----+------+-----+------+-------+--------+--------| + | T_LRSE | Q | W | E | R | T | Y | U | I | O | P | T_RRSE | + | T_LSFT | A | S | D | F | G | H | J | K | L | SCLN | T_RSFT | + | T_LCTL | Z | X | C | V | B | N | M | COMM | DOT | QUOT | T_RCTL | + | T_LGUI | T_LALT | UP | DOWN | SPC | EQL | GRAVE | SPC | LEFT | RIGHT | T_RALT | DVORAK | + |--------+--------+----+------+-----+-----+------+-----+------+-------+--------+--------| + * Keymap Conversion in Python -This python can convert that table into the array needed for the keymap file. It -simply prepends every key with "KC_". I used to use a dictionary to convert some -keys from the table into qmk keycodes, but the double convertion was -unneccessary so I just prepended all my macros with KC and moved all the -implementation to the `process-user-input` function. - -#+NAME:layer-to-array -#+BEGIN_SRC python :var keys=secondary-layer :tangle no -results = "{" -row = 0 -while row < len(keys): - results += '{ ' - key = 0 - while key < len(keys[row]): - keyName = str(keys[row][key]) + This python can convert that table into the array needed for the keymap file. It + simply prepends every key with "KC_". I used to use a dictionary to convert some + keys from the table into qmk keycodes, but the double convertion was + unneccessary so I just prepended all my macros with KC and moved all the + implementation to the `process-user-input` function. + + #+NAME:layer-to-array + #+BEGIN_SRC python :var keys=secondary-layer :tangle no + row = 0 + results = '' + while row < len(keys): + key = 0 + while key < len(keys[row]): + keyName = str(keys[row][key]) + if keyName == '--': + keyName = 'TRANSPARENT' + results += 'KC_' + keyName + if key != 11: + results += ', ' + key+=1 + if row != 3: + results += ',' + results += '\n' + row+=1 + return results + #+END_SRC + + Tap keys are technically defined in the mod_lift function. but this is will + implement that function from the org table. + + #+NAME:define-tap-key + #+BEGIN_SRC python :var row=3 :var col=1 :var id=0 :var tapkeys=tap-layer :var holdkeys=hold-layer :tangle no + def getKey(keys, istapkey): + if istapkey == True: + keyName = str(keys[row][col]) + else: + keyName = str(keys[row][col]) if keyName == '--': keyName = 'TRANSPARENT' - results += 'KC_' + keyName - if key != 11: - results += ', ' - key+=1 - results += '}' - if row != 3: - results += ',' - results += '\n' - row+=1 -results += '},\n' -return results -#+END_SRC + if istapkey == False: + return 'KC_T_' + keyName, 'KC_' + keyName + else: + return 'KC_' + keyName + tapKeyName = getKey(tapkeys, True) + holdKeyMacro, holdKeyName = getKey(holdkeys, False) + return """case %s: + if (record->event.pressed) { + mod_press(%s, %s, %i); + } else { + mod_lift(%s, %s, %i); + } + return false; + break;""" % (holdKeyMacro, tapKeyName, holdKeyName, id, tapKeyName, holdKeyName, id) + + #+END_SRC + * keymap.c -Now that we laid out our layout, lets lay out our kemap file. + Now that we laid out our layout, lets lay out our keymap file. + +** Headers -#+BEGIN_SRC C :noweb yes + #+BEGIN_SRC C :noweb yes #include QMK_KEYBOARD_H extern keymap_config_t keymap_config; -#+END_SRC + #+END_SRC ** Keycodes -#+BEGIN_SRC C :noweb yes + #+BEGIN_SRC C :noweb yes // where the 'T_' communicates how the key does something different when tapped. enum planck_keycodes { //DVORAK = SAFE_RANGE, @@ -145,18 +190,14 @@ KC_EZGUI, KC_EZALT, KC_DVORAK, KC_QWERTY, -KC_USER, -KC_EMAIL, -KC_NAME, -KC_DIR, KC_COM }; -#+END_SRC + #+END_SRC ** Import Key table -#+BEGIN_SRC C :noweb yes + #+BEGIN_SRC C :noweb yes enum planck_layers { _DVORAK, _QWERTY, @@ -166,457 +207,286 @@ _COMMAND const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -#+END_SRC - -#+BEGIN_SRC C :noweb yes -[_DVORAK] = - -#+END_SRC + #+END_SRC -#+BEGIN_SRC C :noweb yes + #+BEGIN_SRC C :noweb yes +[_DVORAK] = LAYOUT_planck_grid( <> - -#+END_SRC - -#+BEGIN_SRC C :noweb yes -[_QWERTY] = - -#+END_SRC - -#+BEGIN_SRC C :noweb yes +), +[_QWERTY] = LAYOUT_planck_grid( <> - -#+END_SRC - -#+BEGIN_SRC C :noweb yes -[_RISE] = - -#+END_SRC - -#+BEGIN_SRC C :noweb yes +), +[_RISE] = LAYOUT_planck_grid( <> - -#+END_SRC - -#+BEGIN_SRC C :noweb yes -[_COMMAND] = - -#+END_SRC - -#+BEGIN_SRC C :noweb yes +), +[_COMMAND] = LAYOUT_planck_grid( <> - -#+END_SRC - -#+BEGIN_SRC C :noweb yes +) }; -#+END_SRC + #+END_SRC ** Tap Keys -I don't like tap keys coming out on release. When modified, I often let go of -the modifier too early because the tap button doesn't come out untill release. I -guess you could save the state of the board on press and then apply it after the -timer, but what I really want is the keys to come out on press when they can and -when it is most useful. For me, that is when they are modified a single time. So -I kind "locked" the board into only doing single modifiers, making them faster. -Disadvantages are double modified keys must be done with one shot keys (its -actually not that bad, it feels like emacs!) and triple modified keys are -impossible at the moment. - -#+BEGIN_SRC C :noweb yes - -static uint16_t tap_timer = 0; -char last_mod = 10; - -void mod_press(uint16_t tap_code, uint16_t hold_code, int id) { - // this first if body makes double modified keys impossible, but stops the - // delay when modifying a tap key which would result in the tap key not - // getting modified. - if (last_mod != id && last_mod != 10) { - tap_code16(tap_code); - last_mod = 10; - } else { - tap_timer = timer_read(); - last_mod = id; - register_code(hold_code); - } -} - -void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { - unregister_code(hold_code); - if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) { - tap_code16(tap_code); - last_mod = 10; - } -} - -#+END_SRC - + I don't like tap keys coming out on release. When modified, I often let go of + the modifier too early because the tap button doesn't come out untill release. I + guess you could save the state of the board on press and then apply it after the + timer, but what I really want is the keys to come out on press when they can and + when it is most useful. For me, that is when they are modified a single time. So + I kind of "locked" the board into only doing single modifiers, making them faster. + Disadvantages are double modified keys must be done with one shot keys (its + actually not that bad, it feels like emacs!) and triple modified keys are + impossible at the moment. + + #+BEGIN_SRC C :noweb yes + + static uint16_t tap_timer = 0; + char last_mod = 10; + + void mod_press(uint16_t tap_code, uint16_t hold_code, int id) { + /* this first if body makes double modified keys impossible, but stops the */ + /* delay when modifying a tap key which would result in the tap key not */ + /* getting modified. */ + if (last_mod != id && last_mod != 10) { + tap_code16(tap_code); + last_mod = 10; + } else { + tap_timer = timer_read(); + last_mod = id; + register_code(hold_code); + } + } + + void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { + unregister_code(hold_code); + if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(tap_code); + } + last_mod = 10; + } + + #+END_SRC ** Process User Input -#+BEGIN_SRC C :noweb yes + #+BEGIN_SRC C :noweb yes bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { -#+END_SRC - -** Layouts - -Set Dvorak layout - -#+BEGIN_SRC C :noweb yes -case KC_DVORAK: -if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); -} -return true; -break; - -#+END_SRC - -Set Qwerty layout. - -#+BEGIN_SRC C :noweb yes -case KC_QWERTY: -if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); -} -return true; -break; - -#+END_SRC - -** Alt and () - -Left and right alt are ( and ) when tapped. I put them on alt instead of a more -conveniant key like control because parentheses do not need to be shift modified -ever, unlike some other tap keys seen in the next sections. - -#+BEGIN_SRC C :noweb yes -case KC_T_LALT: -if (record->event.pressed) { - mod_press(S(KC_9), KC_LALT, 0); -} else { - mod_lift(S(KC_9), KC_LALT, 0); -} -return false; -break; -case KC_T_RALT: -if (record->event.pressed) { - mod_press(S(KC_0), KC_RALT, 1); -} else { - mod_lift(S(KC_0), KC_RALT, 1); -} -return false; -break; - -#+END_SRC - -** Gui and `\ - -I place gui in the bottom corner because I believe it is the hardest key to -reach, so gui seemed like a good fit for a dedicated key that I never want to -have to spam. For tap keys, I used equally unused keys that are not apart of the -number pad or shifted number keys. - -#+BEGIN_SRC C :noweb yes -case KC_T_LGUI: -if (record->event.pressed) { - mod_press(KC_GRAVE, KC_LGUI, 2); -} else { - mod_lift(KC_GRAVE, KC_LGUI, 2); -} -return false; -break; -case KC_T_RGUI: -if (record->event.pressed) { - mod_press(KC_BSLASH, KC_RGUI, 3); -} else { - mod_lift(KC_BSLASH, KC_RGUI, 3); -} -return false; -break; - -#+END_SRC - -** Ctrl and [] - -Left and right control are [] respectively when they are tapped, making { and } -also very convenient. - -#+BEGIN_SRC C :noweb yes -case KC_T_LCTL: -if (record->event.pressed) { - mod_press(KC_LBRACKET, KC_LCTL, 4); -} else { - mod_lift(KC_LBRACKET, KC_LCTL, 4); -} -return false; -break; -case KC_T_RCTL: -if (record->event.pressed) { - mod_press(KC_RBRACKET, KC_RCTL, 5); -} else { - mod_lift(KC_RBRACKET, KC_RCTL, 5); -} -return false; -break; - -#+END_SRC - -** Shft and =- - -I place shift on the home row, so having '-' right of my pinkie is standard, and -it only felt natural to put its opposite, '=/+' on the other side. I put an -extra one on the right side in the secondary layer for the num pad. - -#+BEGIN_SRC C :noweb yes -case KC_T_LSFT: -if (record->event.pressed) { - mod_press(KC_EQUAL, KC_LSFT, 6); -} else { - mod_lift(KC_EQUAL, KC_LSFT, 6); -} -return false; -break; -case KC_T_RSFT: -if (record->event.pressed) { - mod_press(KC_MINUS, KC_RSFT, 7); -} else { - mod_lift(KC_MINUS, KC_RSFT, 7); -} -return false; -break; - -#+END_SRC - -** Rise, DEL, and / - -I use the top corners as rise because I decided that I do not like using layers -with my thumbs. It feels uncomfortable to hold keys down with the side of my -thumb, and backspace, tab, enter, and spacebar keep them satisfied. My pinky is -for holding modifiers, so it makes sense to put the layer key with the other -modifiers. Both my left and right layer keys activate the same layer which also -makes sense to me. You wouldn't want left and right shift to do different things - -I used to have escape in the top left, but I use delete a lot more, and putting -escape under a layer has not been a problem at all. I put / in the top right -corner again mimicing a standard dvorak keyboard. - -#+BEGIN_SRC C :noweb yes -case KC_T_LRSE: -if (record->event.pressed) { - tap_timer = timer_read(); - last_mod = 8; - layer_on(_RISE); -} else { - layer_off(_RISE); - if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) { - tap_code16(KC_DELETE); - last_mod = 10; - } -} -return false; -break; -case KC_T_RRSE: -if (record->event.pressed) { - tap_timer = timer_read(); - last_mod = 9; - layer_on(_RISE); -} else { - layer_off(_RISE); - if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) { - tap_code16(KC_SLASH); - last_mod = 10; - } -} -return false; -break; - -#+END_SRC - -** EZ Keys - -EZ or "easy" keys do things that can already be done on the board, but I want an -easier way of doing them. - -*** One Shot Keys - -Since I made modified tap keys occur on press instead of release, I need one -shot keys to press any key with more than one modifier. - -#+BEGIN_SRC C :noweb yes -case KC_EZSHFT: -if (record->event.pressed) { - set_oneshot_mods(MOD_LSFT); - last_mod = 10; -} -return false; -break; -case KC_EZCTRL: -if (record->event.pressed) { - set_oneshot_mods(MOD_LCTL); - last_mod = 10; -} -return false; -break; -case KC_EZALT: -if (record->event.pressed) { - set_oneshot_mods(MOD_LALT); - last_mod = 10; -} -return false; -break; -case KC_EZGUI: -if (record->event.pressed) { - set_oneshot_mods(MOD_LGUI); - last_mod = 10; -} -return false; -break; - -#+END_SRC - -*** Arrows - -I use ctrl+shift+arrows keys a lot, so when the layer key is pressed they became -lazy versions of themselves with control and shift already pressed. - -I also added undo, copy, paste, and cut to be easily available with only the -left hand like on a qwerty or colemek keyboard. - -#+BEGIN_SRC C :noweb yes -case KC_EZRGHT: -if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_RGHT)); - unregister_code(KC_LCTL); - last_mod = 10; -} -return false; -break; -case KC_EZLEFT: -if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_LEFT)); - unregister_code(KC_LCTL); - last_mod = 10; -} -return false; -break; -case KC_EZDOWN: -if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_DOWN)); - unregister_code(KC_LCTL); - last_mod = 10; -} -return false; -break; -case KC_EZUP: -if (record->event.pressed) { - register_code(KC_LCTL); - tap_code16(S(KC_UP)); - unregister_code(KC_LCTL); - last_mod = 10; -} -return false; -break; -#+END_SRC - -*** Undo, Copy, Cut, Paste - -#+BEGIN_SRC C :noweb yes -case KC_EZUNDO: -if (record->event.pressed) { - tap_code16(C(KC_Z)); - last_mod = 10; -} -return false; -break; -case KC_EZCOPY: -if (record->event.pressed) { - tap_code16(C(KC_C)); - last_mod = 10; -} -return false; -break; -case KC_EZCUT: -if (record->event.pressed) { - tap_code16(C(KC_X)); - last_mod = 10; -} -return false; -break; -case KC_EZPSTE: -if (record->event.pressed) { - tap_code16(C(KC_V)); - last_mod = 10; -} -return false; -break; -#+END_SRC - -** Commands - -Start command layer one shot - -#+BEGIN_SRC C :noweb yes -case KC_COM: -if (record->event.pressed) { - layer_on(_COMMAND); - set_oneshot_layer(_COMMAND, ONESHOT_START); - last_mod = 10; -} else { - clear_oneshot_layer_state (ONESHOT_PRESSED); -} -return false; -break; -#+END_SRC - -Just some strings I notice that I type a lot. - -#+BEGIN_SRC C :noweb yes -case KC_USER: -if (record->event.pressed) { - send_string("mhostley"); - last_mod = 10; -} -return true; -break; -case KC_EMAIL: -if (record->event.pressed) { - send_string("mhostley@gmail.com"); - last_mod = 10; -} -return true; -break; -case KC_NAME: -if (record->event.pressed) { - send_string("Samuel Jahnke"); - last_mod = 10; -} -return true; -break; -case KC_DIR: -if (record->event.pressed) { - send_string("home/mhostley/"); - last_mod = 10; -} -return true; -break; - -#+END_SRC - -** Standard inputs interupt tap - -Finally, if just a standard key is tapped, set the interupted flag. -Keep this last. - -#+BEGIN_SRC C :noweb yes -} -last_mod = 10; -return true; -} -#+END_SRC + #+END_SRC + +*** Layouts + + Set Dvorak layout + + #+BEGIN_SRC C :noweb yes + case KC_DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return true; + break; + + #+END_SRC + + Set Qwerty layout. + + #+BEGIN_SRC C :noweb yes + case KC_QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return true; + break; + + #+END_SRC + +*** Custom Keys +**** Command Layer One Shot + + #+BEGIN_SRC C :noweb yes + case KC_COM: + if (record->event.pressed) { + layer_on(_COMMAND); + set_oneshot_layer(_COMMAND, ONESHOT_START); + last_mod = 10; + } else { + clear_oneshot_layer_state (ONESHOT_PRESSED); + } + return false; + break; + #+END_SRC + +**** Tap Keys + + #+BEGIN_SRC C :noweb yes + <> + <> + <> + <> + <> + <> + <> + <> + #+END_SRC + +**** Rise Keys + + #+BEGIN_SRC C :noweb yes + case KC_T_LRSE: + if (record->event.pressed) { + tap_timer = timer_read(); + last_mod = 8; + layer_on(_RISE); + } else { + layer_off(_RISE); + if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_DELETE); + last_mod = 10; + } + } + return false; + break; + case KC_T_RRSE: + if (record->event.pressed) { + tap_timer = timer_read(); + last_mod = 9; + layer_on(_RISE); + } else { + layer_off(_RISE); + if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_BSPACE); + last_mod = 10; + } + } + return false; + break; + + #+END_SRC + +**** One Shot Keys + + Since I made modified tap keys occur on press instead of release, I need one + shot keys to press any key with more than one modifier. + + #+BEGIN_SRC C :noweb yes + case KC_EZSHFT: + if (record->event.pressed) { + set_oneshot_mods(MOD_LSFT); + last_mod = 10; + } + return false; + break; + case KC_EZCTRL: + if (record->event.pressed) { + set_oneshot_mods(MOD_LCTL); + last_mod = 10; + } + return false; + break; + case KC_EZALT: + if (record->event.pressed) { + set_oneshot_mods(MOD_LALT); + last_mod = 10; + } + return false; + break; + case KC_EZGUI: + if (record->event.pressed) { + set_oneshot_mods(MOD_LGUI); + last_mod = 10; + } + return false; + break; + + #+END_SRC + +**** C-S Arrows + + I use ctrl+shift+arrows keys a lot, so when the layer key is pressed they became + lazy versions of themselves with control and shift already pressed. + + I also added undo, copy, paste, and cut to be easily available with only the + left hand like on a qwerty or colemek keyboard. + + #+BEGIN_SRC C :noweb yes + case KC_EZRGHT: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_RGHT)); + unregister_code(KC_LCTL); + last_mod = 10; + } + return false; + break; + case KC_EZLEFT: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_LEFT)); + unregister_code(KC_LCTL); + last_mod = 10; + } + return false; + break; + case KC_EZDOWN: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_DOWN)); + unregister_code(KC_LCTL); + last_mod = 10; + } + return false; + break; + case KC_EZUP: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_UP)); + unregister_code(KC_LCTL); + last_mod = 10; + } + return false; + break; + #+END_SRC + +**** Undo, Copy, Cut, Paste + + #+BEGIN_SRC C :noweb yes + case KC_EZUNDO: + if (record->event.pressed) { + tap_code16(C(KC_Z)); + last_mod = 10; + } + return false; + break; + case KC_EZCOPY: + if (record->event.pressed) { + tap_code16(C(KC_C)); + last_mod = 10; + } + return false; + break; + case KC_EZCUT: + if (record->event.pressed) { + tap_code16(C(KC_X)); + last_mod = 10; + } + return false; + break; + case KC_EZPSTE: + if (record->event.pressed) { + tap_code16(C(KC_V)); + last_mod = 10; + } + return false; + break; + #+END_SRC + +*** Standard inputs interupt tap + + Finally, if just a standard key is tapped, set the interupted flag. + Keep this last. + + #+BEGIN_SRC C :noweb yes + } + last_mod = 10; + return true; + } + #+END_SRC diff --git a/keyboards/planck/keymaps/samuel/keymap.c b/keyboards/planck/keymaps/samuel/keymap.c index ff1424489fc0..20e64a022b2f 100644 --- a/keyboards/planck/keymaps/samuel/keymap.c +++ b/keyboards/planck/keymaps/samuel/keymap.c @@ -29,10 +29,6 @@ KC_EZGUI, KC_EZALT, KC_DVORAK, KC_QWERTY, -KC_USER, -KC_EMAIL, -KC_NAME, -KC_DIR, KC_COM }; @@ -45,47 +41,39 @@ _COMMAND const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_DVORAK] = - -{{ KC_T_LRSE, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_T_RRSE}, -{ KC_T_LSFT, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_T_RSFT}, -{ KC_T_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_T_RCTL}, -{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_T_RGUI} -}, - -[_QWERTY] = - -{{ KC_T_LRSE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_T_RRSE}, -{ KC_T_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_T_RSFT}, -{ KC_T_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_T_RCTL}, -{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_DVORAK} -}, - -[_RISE] = - -{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_TRANSPARENT}, -{ KC_EZSHFT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_HOME, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_EZSHFT}, -{ KC_EZCTRL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_COM, KC_EZCTRL}, -{ KC_EZGUI, KC_EZALT, KC_EZUP, KC_EZDOWN, KC_SPC, KC_AMPR, KC_PIPE, KC_END, KC_EZLEFT, KC_EZRGHT, KC_EZALT, KC_EZGUI} -}, - -[_COMMAND] = - -{{ KC_TRANSPARENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRANSPARENT}, -{ KC_TRANSPARENT, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRANSPARENT}, -{ KC_TRANSPARENT, KC_F21, KC_F22, KC_F23, KC_F24, KC_QWERTY, KC_DVORAK, KC_USER, KC_EMAIL, KC_NAME, KC_TRANSPARENT, KC_TRANSPARENT}, -{ KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_DIR, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT} -}, - +[_DVORAK] = LAYOUT_planck_grid( +KC_T_LRSE, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_T_RRSE, +KC_T_LSFT, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_T_RSFT, +KC_T_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_T_RCTL, +KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_SPC, KC_EQL, KC_GRAVE, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_T_RGUI +), +[_QWERTY] = LAYOUT_planck_grid( +KC_T_LRSE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_T_RRSE, +KC_T_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_T_RSFT, +KC_T_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_T_RCTL, +KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_SPC, KC_EQL, KC_GRAVE, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_DVORAK +), +[_RISE] = LAYOUT_planck_grid( +KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_ASTR, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_TRANSPARENT, +KC_EZSHFT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_HOME, KC_AMPR, KC_4, KC_5, KC_6, KC_0, KC_EZSHFT, +KC_EZCTRL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_COM, KC_EZCTRL, +KC_EZGUI, KC_EZALT, KC_EZUP, KC_EZDOWN, KC_SPC, KC_PIPE, KC_BSLASH, KC_END, KC_EZLEFT, KC_EZRGHT, KC_EZALT, KC_EZGUI +), +[_COMMAND] = LAYOUT_planck_grid( +KC_TRANSPARENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRANSPARENT, +KC_TRANSPARENT, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRANSPARENT, +KC_TRANSPARENT, KC_F21, KC_F22, KC_F23, KC_F24, KC_QWERTY, KC_DVORAK, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, +KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT +) }; static uint16_t tap_timer = 0; char last_mod = 10; void mod_press(uint16_t tap_code, uint16_t hold_code, int id) { - // this first if body makes double modified keys impossible, but stops the - // delay when modifying a tap key which would result in the tap key not - // getting modified. + /* this first if body makes double modified keys impossible, but stops the */ + /* delay when modifying a tap key which would result in the tap key not */ + /* getting modified. */ if (last_mod != id && last_mod != 10) { tap_code16(tap_code); last_mod = 10; @@ -100,8 +88,8 @@ void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { unregister_code(hold_code); if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) { tap_code16(tap_code); - last_mod = 10; } + last_mod = 10; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -121,73 +109,81 @@ if (record->event.pressed) { return true; break; -case KC_T_LALT: -if (record->event.pressed) { - mod_press(S(KC_9), KC_LALT, 0); -} else { - mod_lift(S(KC_9), KC_LALT, 0); -} -return false; -break; -case KC_T_RALT: +case KC_COM: if (record->event.pressed) { - mod_press(S(KC_0), KC_RALT, 1); + layer_on(_COMMAND); + set_oneshot_layer(_COMMAND, ONESHOT_START); + last_mod = 10; } else { - mod_lift(S(KC_0), KC_RALT, 1); + clear_oneshot_layer_state (ONESHOT_PRESSED); } return false; break; +case KC_T_LALT: + if (record->event.pressed) { + mod_press(KC_LPRN, KC_LALT, 0); + } else { + mod_lift(KC_LPRN, KC_LALT, 0); + } + return false; + break; +case KC_T_RALT: + if (record->event.pressed) { + mod_press(KC_RPRN, KC_RALT, 1); + } else { + mod_lift(KC_RPRN, KC_RALT, 1); + } + return false; + break; case KC_T_LGUI: -if (record->event.pressed) { - mod_press(KC_GRAVE, KC_LGUI, 2); -} else { - mod_lift(KC_GRAVE, KC_LGUI, 2); -} -return false; -break; + if (record->event.pressed) { + mod_press(KC_SLASH, KC_LGUI, 2); + } else { + mod_lift(KC_SLASH, KC_LGUI, 2); + } + return false; + break; case KC_T_RGUI: -if (record->event.pressed) { - mod_press(KC_BSLASH, KC_RGUI, 3); -} else { - mod_lift(KC_BSLASH, KC_RGUI, 3); -} -return false; -break; - + if (record->event.pressed) { + mod_press(KC_MINS, KC_RGUI, 3); + } else { + mod_lift(KC_MINS, KC_RGUI, 3); + } + return false; + break; case KC_T_LCTL: -if (record->event.pressed) { - mod_press(KC_LBRACKET, KC_LCTL, 4); -} else { - mod_lift(KC_LBRACKET, KC_LCTL, 4); -} -return false; -break; + if (record->event.pressed) { + mod_press(KC_LBRACKET, KC_LCTL, 4); + } else { + mod_lift(KC_LBRACKET, KC_LCTL, 4); + } + return false; + break; case KC_T_RCTL: -if (record->event.pressed) { - mod_press(KC_RBRACKET, KC_RCTL, 5); -} else { - mod_lift(KC_RBRACKET, KC_RCTL, 5); -} -return false; -break; - + if (record->event.pressed) { + mod_press(KC_RBRACKET, KC_RCTL, 5); + } else { + mod_lift(KC_RBRACKET, KC_RCTL, 5); + } + return false; + break; case KC_T_LSFT: -if (record->event.pressed) { - mod_press(KC_EQUAL, KC_LSFT, 6); -} else { - mod_lift(KC_EQUAL, KC_LSFT, 6); -} -return false; -break; + if (record->event.pressed) { + mod_press(KC_TAB, KC_LSFT, 6); + } else { + mod_lift(KC_TAB, KC_LSFT, 6); + } + return false; + break; case KC_T_RSFT: -if (record->event.pressed) { - mod_press(KC_MINUS, KC_RSFT, 7); -} else { - mod_lift(KC_MINUS, KC_RSFT, 7); -} -return false; -break; + if (record->event.pressed) { + mod_press(KC_ENTER, KC_RSFT, 7); + } else { + mod_lift(KC_ENTER, KC_RSFT, 7); + } + return false; + break; case KC_T_LRSE: if (record->event.pressed) { @@ -211,7 +207,7 @@ if (record->event.pressed) { } else { layer_off(_RISE); if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) { - tap_code16(KC_SLASH); + tap_code16(KC_BSPACE); last_mod = 10; } } @@ -313,46 +309,6 @@ if (record->event.pressed) { return false; break; -case KC_COM: -if (record->event.pressed) { - layer_on(_COMMAND); - set_oneshot_layer(_COMMAND, ONESHOT_START); - last_mod = 10; -} else { - clear_oneshot_layer_state (ONESHOT_PRESSED); -} -return false; -break; - -case KC_USER: -if (record->event.pressed) { - send_string("mhostley"); - last_mod = 10; -} -return true; -break; -case KC_EMAIL: -if (record->event.pressed) { - send_string("mhostley@gmail.com"); - last_mod = 10; -} -return true; -break; -case KC_NAME: -if (record->event.pressed) { - send_string("Samuel Jahnke"); - last_mod = 10; -} -return true; -break; -case KC_DIR: -if (record->event.pressed) { - send_string("home/mhostley/"); - last_mod = 10; -} -return true; -break; - } last_mod = 10; return true; From 4d06d2835c87f3eed694493fb749527032a78ec2 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 3 Jan 2020 09:58:34 +1100 Subject: [PATCH 150/331] Move CORTEX_ENABLE_WFI_IDLE=TRUE to rules.mk files. --- keyboards/at_at/660m/chconf.h | 4 ---- keyboards/at_at/660m/rules.mk | 3 +++ keyboards/candybar/chconf.h | 4 ---- keyboards/candybar/rules.mk | 4 ++++ keyboards/cannonkeys/an_c/chconf.h | 4 ---- keyboards/cannonkeys/an_c/rules.mk | 4 ++++ keyboards/cannonkeys/chimera65/chconf.h | 4 ---- keyboards/cannonkeys/chimera65/rules.mk | 4 ++++ keyboards/cannonkeys/instant60/chconf.h | 4 ---- keyboards/cannonkeys/instant60/rules.mk | 4 ++++ keyboards/cannonkeys/iron165/chconf.h | 4 ---- keyboards/cannonkeys/iron165/rules.mk | 4 ++++ keyboards/cannonkeys/ortho48/chconf.h | 4 ---- keyboards/cannonkeys/ortho48/rules.mk | 4 ++++ keyboards/cannonkeys/ortho60/chconf.h | 4 ---- keyboards/cannonkeys/ortho60/rules.mk | 4 ++++ keyboards/cannonkeys/ortho75/chconf.h | 4 ---- keyboards/cannonkeys/ortho75/rules.mk | 4 ++++ keyboards/cannonkeys/practice60/chconf.h | 4 ---- keyboards/cannonkeys/practice60/rules.mk | 4 ++++ keyboards/cannonkeys/practice65/chconf.h | 4 ---- keyboards/cannonkeys/practice65/rules.mk | 4 ++++ keyboards/cannonkeys/satisfaction75/chconf.h | 4 ---- keyboards/cannonkeys/satisfaction75/rules.mk | 4 ++++ keyboards/cannonkeys/savage65/chconf.h | 4 ---- keyboards/cannonkeys/savage65/rules.mk | 3 +++ keyboards/cannonkeys/tmov2/chconf.h | 4 ---- keyboards/cannonkeys/tmov2/rules.mk | 3 +++ keyboards/converter/siemens_tastatur/chconf.h | 4 ---- keyboards/converter/siemens_tastatur/rules.mk | 3 +++ keyboards/ergodox_stm32/chconf.h | 4 ---- keyboards/ergodox_stm32/rules.mk | 4 ++++ keyboards/handwired/bluepill/bluepill70/chconf.h | 4 ---- keyboards/handwired/bluepill/bluepill70/rules.mk | 6 +++++- keyboards/handwired/ck4x4/chconf.h | 4 ---- keyboards/handwired/ck4x4/rules.mk | 4 ++++ keyboards/handwired/onekey/bluepill/chconf.h | 4 ---- keyboards/handwired/onekey/bluepill/rules.mk | 4 ++++ keyboards/handwired/onekey/stm32f0_disco/chconf.h | 4 ---- keyboards/handwired/onekey/stm32f0_disco/rules.mk | 4 ++++ keyboards/handwired/onekey/teensy_32/chconf.h | 4 ---- keyboards/handwired/onekey/teensy_32/rules.mk | 4 ++++ keyboards/handwired/onekey/teensy_lc/chconf.h | 4 ---- keyboards/handwired/onekey/teensy_lc/rules.mk | 4 ++++ keyboards/infinity60/chconf.h | 4 ---- keyboards/infinity60/rules.mk | 4 ++++ keyboards/jm60/chconf.h | 4 ---- keyboards/jm60/rules.mk | 8 ++++++-- keyboards/k_type/chconf.h | 4 ---- keyboards/k_type/rules.mk | 4 ++++ keyboards/peiorisboards/ixora/chconf.h | 6 +----- keyboards/peiorisboards/ixora/rules.mk | 4 ++++ keyboards/projectkb/alice/chconf.h | 4 ---- keyboards/projectkb/alice/rules.mk | 4 ++++ keyboards/vinta/chconf.h | 6 +----- keyboards/vinta/rules.mk | 6 +++++- keyboards/whitefox/chconf.h | 4 ---- keyboards/whitefox/rules.mk | 4 ++++ 58 files changed, 118 insertions(+), 122 deletions(-) diff --git a/keyboards/at_at/660m/chconf.h b/keyboards/at_at/660m/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/at_at/660m/chconf.h +++ b/keyboards/at_at/660m/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/at_at/660m/rules.mk b/keyboards/at_at/660m/rules.mk index b893d8031bf7..0b3685f09e4e 100644 --- a/keyboards/at_at/660m/rules.mk +++ b/keyboards/at_at/660m/rules.mk @@ -17,3 +17,6 @@ CUSTOM_MATRIX = no # Custom matrix file # RGBLIGHT_ENABLE = yes NO_USB_STARTUP_CHECK = yes # Workaround for issue 6369 + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/candybar/chconf.h b/keyboards/candybar/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/candybar/chconf.h +++ b/keyboards/candybar/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk index 0e1a8517fa64..cb1b832886a0 100644 --- a/keyboards/candybar/rules.mk +++ b/keyboards/candybar/rules.mk @@ -18,3 +18,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover AUDIO_ENABLE = no RGBLIGHT_ENABLE = no SERIAL_LINK_ENABLE = no + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/an_c/chconf.h b/keyboards/cannonkeys/an_c/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/cannonkeys/an_c/chconf.h +++ b/keyboards/cannonkeys/an_c/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk index 151f72fd0fc2..2050ba34c499 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk @@ -22,3 +22,7 @@ CUSTOM_MATRIX = no # Custom matrix file RGBLIGHT_ENABLE = yes LAYOUTS = 60_ansi 60_tsangan_hhkb + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/chimera65/chconf.h b/keyboards/cannonkeys/chimera65/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/cannonkeys/chimera65/chconf.h +++ b/keyboards/cannonkeys/chimera65/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/chimera65/rules.mk b/keyboards/cannonkeys/chimera65/rules.mk index 1e300a99c701..9b1ab589917f 100644 --- a/keyboards/cannonkeys/chimera65/rules.mk +++ b/keyboards/cannonkeys/chimera65/rules.mk @@ -20,3 +20,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = no # Custom matrix file # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason RGBLIGHT_ENABLE = no + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/instant60/chconf.h b/keyboards/cannonkeys/instant60/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/cannonkeys/instant60/chconf.h +++ b/keyboards/cannonkeys/instant60/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index db753884daba..0b4afd8da81e 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -22,3 +22,7 @@ CUSTOM_MATRIX = no # Custom matrix file RGBLIGHT_ENABLE = yes LAYOUTS = 60_ansi 60_tsangan_hhkb + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/iron165/chconf.h b/keyboards/cannonkeys/iron165/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/cannonkeys/iron165/chconf.h +++ b/keyboards/cannonkeys/iron165/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/iron165/rules.mk b/keyboards/cannonkeys/iron165/rules.mk index edc84edd51f6..33529718eb40 100644 --- a/keyboards/cannonkeys/iron165/rules.mk +++ b/keyboards/cannonkeys/iron165/rules.mk @@ -20,3 +20,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = no # Custom matrix file # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason RGBLIGHT_ENABLE = no + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/ortho48/chconf.h b/keyboards/cannonkeys/ortho48/chconf.h index bbd9b2da62d2..9299be587ec6 100644 --- a/keyboards/cannonkeys/ortho48/chconf.h +++ b/keyboards/cannonkeys/ortho48/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index b060afd156e1..59c12681cff9 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -26,3 +26,7 @@ BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes LAYOUTS = ortho_4x12 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/ortho60/chconf.h b/keyboards/cannonkeys/ortho60/chconf.h index bbd9b2da62d2..9299be587ec6 100644 --- a/keyboards/cannonkeys/ortho60/chconf.h +++ b/keyboards/cannonkeys/ortho60/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index 1d3f1afa9c11..2077eea66ff9 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -26,3 +26,7 @@ BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes LAYOUTS = ortho_5x12 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/ortho75/chconf.h b/keyboards/cannonkeys/ortho75/chconf.h index bbd9b2da62d2..9299be587ec6 100644 --- a/keyboards/cannonkeys/ortho75/chconf.h +++ b/keyboards/cannonkeys/ortho75/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index 538ab6aec545..3be309924cfb 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -27,3 +27,7 @@ RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes LAYOUTS = ortho_5x15 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/practice60/chconf.h b/keyboards/cannonkeys/practice60/chconf.h index bbd9b2da62d2..9299be587ec6 100644 --- a/keyboards/cannonkeys/practice60/chconf.h +++ b/keyboards/cannonkeys/practice60/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index a1c34a3adef7..be1584d7295b 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -28,3 +28,7 @@ RGBLIGHT_ENABLE = yes LAYOUTS = 60_ansi DEFAULT_FOLDER = cannonkeys/practice60 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/practice65/chconf.h b/keyboards/cannonkeys/practice65/chconf.h index bbd9b2da62d2..9299be587ec6 100644 --- a/keyboards/cannonkeys/practice65/chconf.h +++ b/keyboards/cannonkeys/practice65/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index 1e8d56bca533..d4a396120aef 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -24,3 +24,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/satisfaction75/chconf.h b/keyboards/cannonkeys/satisfaction75/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/cannonkeys/satisfaction75/chconf.h +++ b/keyboards/cannonkeys/satisfaction75/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk index 7e0b15b92b58..5fd801819403 100644 --- a/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -22,3 +22,7 @@ QWIIC_ENABLE += MICRO_OLED #BACKLIGHT_ENABLE = yes DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/savage65/chconf.h b/keyboards/cannonkeys/savage65/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/cannonkeys/savage65/chconf.h +++ b/keyboards/cannonkeys/savage65/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/savage65/rules.mk b/keyboards/cannonkeys/savage65/rules.mk index 199dd10780c8..1c1c4c2ec417 100644 --- a/keyboards/cannonkeys/savage65/rules.mk +++ b/keyboards/cannonkeys/savage65/rules.mk @@ -21,3 +21,6 @@ CUSTOM_MATRIX = no # Custom matrix file # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason RGBLIGHT_ENABLE = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/tmov2/chconf.h b/keyboards/cannonkeys/tmov2/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/cannonkeys/tmov2/chconf.h +++ b/keyboards/cannonkeys/tmov2/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/cannonkeys/tmov2/rules.mk b/keyboards/cannonkeys/tmov2/rules.mk index e6f0ce30a13b..646288504cee 100644 --- a/keyboards/cannonkeys/tmov2/rules.mk +++ b/keyboards/cannonkeys/tmov2/rules.mk @@ -21,3 +21,6 @@ CUSTOM_MATRIX = no # Custom matrix file # BACKLIGHT_ENABLE = yes # This is broken on 072 right now RGBLIGHT_ENABLE = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/converter/siemens_tastatur/chconf.h b/keyboards/converter/siemens_tastatur/chconf.h index bbd9b2da62d2..9299be587ec6 100644 --- a/keyboards/converter/siemens_tastatur/chconf.h +++ b/keyboards/converter/siemens_tastatur/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/converter/siemens_tastatur/rules.mk b/keyboards/converter/siemens_tastatur/rules.mk index bc0ed5316592..bc5875962bb5 100644 --- a/keyboards/converter/siemens_tastatur/rules.mk +++ b/keyboards/converter/siemens_tastatur/rules.mk @@ -22,3 +22,6 @@ BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no CUSTOM_MATRIX = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/ergodox_stm32/chconf.h b/keyboards/ergodox_stm32/chconf.h index d9114ec858bc..513ae821db07 100644 --- a/keyboards/ergodox_stm32/chconf.h +++ b/keyboards/ergodox_stm32/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/ergodox_stm32/rules.mk b/keyboards/ergodox_stm32/rules.mk index 1bf1a742ab85..ab7b853f5d45 100644 --- a/keyboards/ergodox_stm32/rules.mk +++ b/keyboards/ergodox_stm32/rules.mk @@ -30,3 +30,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work UNICODE_ENABLE = yes # Unicode + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/bluepill/bluepill70/chconf.h b/keyboards/handwired/bluepill/bluepill70/chconf.h index dfb1f9dfb9e6..fdbc4aed0454 100644 --- a/keyboards/handwired/bluepill/bluepill70/chconf.h +++ b/keyboards/handwired/bluepill/bluepill70/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/bluepill/bluepill70/rules.mk b/keyboards/handwired/bluepill/bluepill70/rules.mk index e89abca8ca80..5cf5f3f6ca6d 100644 --- a/keyboards/handwired/bluepill/bluepill70/rules.mk +++ b/keyboards/handwired/bluepill/bluepill70/rules.mk @@ -44,4 +44,8 @@ ARMV = 7 # http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf # This also requires a patch to chibios: # /tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 \ No newline at end of file +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/ck4x4/chconf.h b/keyboards/handwired/ck4x4/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/handwired/ck4x4/chconf.h +++ b/keyboards/handwired/ck4x4/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/ck4x4/rules.mk b/keyboards/handwired/ck4x4/rules.mk index cd4bc260f3fe..0709f341bf70 100644 --- a/keyboards/handwired/ck4x4/rules.mk +++ b/keyboards/handwired/ck4x4/rules.mk @@ -15,3 +15,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = no # Custom matrix file DEFAULT_FOLDER = handwired/ck4x4 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/bluepill/chconf.h b/keyboards/handwired/onekey/bluepill/chconf.h index bbd9b2da62d2..9299be587ec6 100644 --- a/keyboards/handwired/onekey/bluepill/chconf.h +++ b/keyboards/handwired/onekey/bluepill/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 063f21f7fd68..83a81a56b185 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -8,3 +8,7 @@ BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/stm32f0_disco/chconf.h b/keyboards/handwired/onekey/stm32f0_disco/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/chconf.h +++ b/keyboards/handwired/onekey/stm32f0_disco/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/onekey/stm32f0_disco/rules.mk b/keyboards/handwired/onekey/stm32f0_disco/rules.mk index fe5e3f824f31..d8928e9ec869 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/rules.mk +++ b/keyboards/handwired/onekey/stm32f0_disco/rules.mk @@ -1,2 +1,6 @@ # MCU name MCU = STM32F072 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/teensy_32/chconf.h b/keyboards/handwired/onekey/teensy_32/chconf.h index 3294ac7eeef4..1919fcb97cf6 100644 --- a/keyboards/handwired/onekey/teensy_32/chconf.h +++ b/keyboards/handwired/onekey/teensy_32/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/onekey/teensy_32/rules.mk b/keyboards/handwired/onekey/teensy_32/rules.mk index 97171611efaa..2c411c0eb6e4 100644 --- a/keyboards/handwired/onekey/teensy_32/rules.mk +++ b/keyboards/handwired/onekey/teensy_32/rules.mk @@ -39,3 +39,7 @@ MCU = cortex-m4 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 # I.e. 6 for Teensy LC; 7 for Teensy 3.x ARMV = 7 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/teensy_lc/chconf.h b/keyboards/handwired/onekey/teensy_lc/chconf.h index 3294ac7eeef4..1919fcb97cf6 100644 --- a/keyboards/handwired/onekey/teensy_lc/chconf.h +++ b/keyboards/handwired/onekey/teensy_lc/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/onekey/teensy_lc/rules.mk b/keyboards/handwired/onekey/teensy_lc/rules.mk index 7859f6d741ad..32ab07d9c1f2 100644 --- a/keyboards/handwired/onekey/teensy_lc/rules.mk +++ b/keyboards/handwired/onekey/teensy_lc/rules.mk @@ -39,3 +39,7 @@ MCU = cortex-m0plus # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 # I.e. 6 for Teensy LC; 7 for Teensy 3.x ARMV = 6 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/infinity60/chconf.h b/keyboards/infinity60/chconf.h index d9114ec858bc..513ae821db07 100644 --- a/keyboards/infinity60/chconf.h +++ b/keyboards/infinity60/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index 6fb43dc7526b..f93766af97c7 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -73,3 +73,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file LAYOUTS = 60_ansi_split_bs_rshift + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/jm60/chconf.h b/keyboards/jm60/chconf.h index d9114ec858bc..513ae821db07 100644 --- a/keyboards/jm60/chconf.h +++ b/keyboards/jm60/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/jm60/rules.mk b/keyboards/jm60/rules.mk index d11c38ecfdce..ed6431b6538f 100644 --- a/keyboards/jm60/rules.mk +++ b/keyboards/jm60/rules.mk @@ -34,7 +34,7 @@ ARMV = 7 # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB #OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 -OPT_DEFS = +OPT_DEFS = # Build Options # comment out to disable the options. @@ -52,5 +52,9 @@ BACKLIGHT_ENABLE = no VISUALIZER_ENABLE = no #LED_DRIVER = is31fl3731c -#LED_WIDTH = 16 +#LED_WIDTH = 16 #LED_HEIGHT = 5 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/k_type/chconf.h b/keyboards/k_type/chconf.h index d9114ec858bc..513ae821db07 100644 --- a/keyboards/k_type/chconf.h +++ b/keyboards/k_type/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index 43579fcc71bb..e53f316b99a7 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -74,3 +74,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file DEBUG_ENABLE = yes + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/peiorisboards/ixora/chconf.h b/keyboards/peiorisboards/ixora/chconf.h index b836a3b99cdd..e811705ba3d1 100644 --- a/keyboards/peiorisboards/ixora/chconf.h +++ b/keyboards/peiorisboards/ixora/chconf.h @@ -102,10 +102,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ @@ -518,4 +514,4 @@ #endif /* CHCONF_H */ -/** @} */ \ No newline at end of file +/** @} */ diff --git a/keyboards/peiorisboards/ixora/rules.mk b/keyboards/peiorisboards/ixora/rules.mk index 0cea106d0581..1d93c6a30346 100644 --- a/keyboards/peiorisboards/ixora/rules.mk +++ b/keyboards/peiorisboards/ixora/rules.mk @@ -12,3 +12,7 @@ CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/projectkb/alice/chconf.h b/keyboards/projectkb/alice/chconf.h index 99fa8ce39822..89388dd5a3d1 100644 --- a/keyboards/projectkb/alice/chconf.h +++ b/keyboards/projectkb/alice/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index 96904aef3d9b..97fcc754da1b 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk @@ -23,3 +23,7 @@ RGBLIGHT_ENABLE = yes # RAW_ENABLE = yes # DYNAMIC_KEYMAP_ENABLE = yes + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/vinta/chconf.h b/keyboards/vinta/chconf.h index b836a3b99cdd..e811705ba3d1 100644 --- a/keyboards/vinta/chconf.h +++ b/keyboards/vinta/chconf.h @@ -102,10 +102,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ @@ -518,4 +514,4 @@ #endif /* CHCONF_H */ -/** @} */ \ No newline at end of file +/** @} */ diff --git a/keyboards/vinta/rules.mk b/keyboards/vinta/rules.mk index 6d9fc0da1d60..7365096890a9 100644 --- a/keyboards/vinta/rules.mk +++ b/keyboards/vinta/rules.mk @@ -13,4 +13,8 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in -LAYOUTS = 65_ansi_blocker \ No newline at end of file +LAYOUTS = 65_ansi_blocker + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/whitefox/chconf.h b/keyboards/whitefox/chconf.h index d9114ec858bc..513ae821db07 100644 --- a/keyboards/whitefox/chconf.h +++ b/keyboards/whitefox/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 7b33285004d6..27c3c31416bf 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -78,3 +78,7 @@ VISUALIZER_ENABLE = yes LED_DRIVER = is31fl3731c LED_WIDTH = 16 LED_HEIGHT = 5 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 0d80c7bd598c1296d31554fe8c82843415696a18 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Tue, 28 Jan 2020 18:08:39 +0100 Subject: [PATCH 151/331] [Keyboard] Fix Pulse4k info.json LAYOUT name (#7965) * Fix Pulse4k info.json LAYOUT name * Add missing functions to fix configurator Add empty encoder functions to the keyboard code, as the configurator doesn't see the keymap defined functions at first. To be able to override these functions, they are marked as 'weak'. * Rework encoder functions another time Default implementation is now provided as part of the keyboard, but they can still be overriden within the keymap (template is commented out by default) --- keyboards/maxr1998/pulse4k/info.json | 2 +- .../maxr1998/pulse4k/keymaps/default/keymap.c | 13 +++---------- keyboards/maxr1998/pulse4k/pulse4k.c | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/keyboards/maxr1998/pulse4k/info.json b/keyboards/maxr1998/pulse4k/info.json index 0ac4f063c050..a653f8e09a85 100644 --- a/keyboards/maxr1998/pulse4k/info.json +++ b/keyboards/maxr1998/pulse4k/info.json @@ -6,7 +6,7 @@ "width": 3, "height": 2, "layouts": { - "LAYOUT_pulse4k": { + "LAYOUT": { "key_count": 6, "layout": [ { "w": 1, "x": 0, "y": 0 }, diff --git a/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c b/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c index 873c87d1f9e5..67331235baab 100644 --- a/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c +++ b/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c @@ -31,18 +31,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_user(void) { } +// Override if necessary +/* void encoder_one_update(bool clockwise) { - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } } void encoder_two_update(bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } } +//*/ diff --git a/keyboards/maxr1998/pulse4k/pulse4k.c b/keyboards/maxr1998/pulse4k/pulse4k.c index ee3d41ccd1da..2ec9dca73916 100644 --- a/keyboards/maxr1998/pulse4k/pulse4k.c +++ b/keyboards/maxr1998/pulse4k/pulse4k.c @@ -59,3 +59,19 @@ void encoder_update_kb(uint8_t index, bool clockwise) { } else encoder_two_update(clockwise); } } + +__attribute__((weak)) void encoder_one_update(bool clockwise) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } +} + +__attribute__((weak)) void encoder_two_update(bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} From 1e90f5c71cbc0f97cdd01089e394ec0ddc8980c8 Mon Sep 17 00:00:00 2001 From: coseyfannitutti <43188488+coseyfannitutti@users.noreply.github.com> Date: Tue, 28 Jan 2020 15:38:27 -0500 Subject: [PATCH 152/331] Mysterium firmware fix (#8032) * Update config.h * Update rules.mk * Update usbconfig.h * Update config.h * Update rules.mk * Update usbconfig.h --- keyboards/coseyfannitutti/mysterium/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/coseyfannitutti/mysterium/rules.mk b/keyboards/coseyfannitutti/mysterium/rules.mk index 4147cfec9652..9c518e938dce 100644 --- a/keyboards/coseyfannitutti/mysterium/rules.mk +++ b/keyboards/coseyfannitutti/mysterium/rules.mk @@ -2,7 +2,7 @@ MCU = atmega32a # Processor frequency -F_USB = 16000000 +F_CPU = 16000000 # Bootloader selection # Teensy halfkay From 4a208b89516f02f4ff7e17861aabbe1b5af13f81 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 28 Jan 2020 13:04:50 -0800 Subject: [PATCH 153/331] [Keyboard] 1up60hse VIA Support (#7992) * add VIA support for 1up60hse * choose a vendor and product id that is not taken * add mousekey_enable set to no as per Wilba's recommendation * Update keyboards/1upkeyboards/1up60hse/keymaps/via/readme.md * Update keyboards/1upkeyboards/1up60hse/keymaps/via/readme.md * add a fourth layer * might as well remove the config file as we are not including the one thing that was in it --- keyboards/1upkeyboards/1up60hse/config.h | 4 +- .../1up60hse/keymaps/via/keymap.c | 91 +++++++++++++++++++ .../1up60hse/keymaps/via/readme.md | 1 + .../1up60hse/keymaps/via/rules.mk | 3 + 4 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 keyboards/1upkeyboards/1up60hse/keymaps/via/keymap.c create mode 100644 keyboards/1upkeyboards/1up60hse/keymaps/via/readme.md create mode 100644 keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index 9ab969797ea9..e2de955c4557 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x6F75 // OU +#define PRODUCT_ID 0x6873 #define DEVICE_VER 0x0001 #define MANUFACTURER 1upkeyboards #define PRODUCT 1up60hse diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/via/keymap.c b/keyboards/1upkeyboards/1up60hse/keymaps/via/keymap.c new file mode 100644 index 000000000000..cd4ea637aa88 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hse/keymaps/via/keymap.c @@ -0,0 +1,91 @@ +/* Copyright 2018 MechMerlin + * Copyright 2018 Logan Huskins + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | GUI | Alt | Space | Alt | GUI | L1 | Ctrl | + * `-----------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + /* Function + * ,-----------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | + * |-----------------------------------------------------------------------------------------+ + * | | | Up | | | | | | | |PrtSc|ScrLk|Pause| | + * |-----------------------------------------------------------------------------------------+ + * | |Left |Down |Right| | | | | | Ins |Home |PgUp | | + * |-----------------------------------------------------------------------------------------+ + * | |VolUp|VolDn|VolMu| | | | | | End |PgDn | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | L2 | | | + * `-----------------------------------------------------------------------------------------' + */ + [1] = LAYOUT_60_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS + ), + + /* RGB + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | Reset | + * |-----------------------------------------------------------------------------------------+ + * | BL Tog |BLInc|BLDec|BLStp| | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | RGB Tog |Mode |Hue I|Sat I|Val I|Spd I|Plain|Breat|Rnbow|Swirl| | | | + * |-----------------------------------------------------------------------------------------+ + * | |RMode|Hue D|Sat D|Val D|Spd D|Snake|Knigh|Xmas |Gradi| | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + [2] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/via/readme.md b/keyboards/1upkeyboards/1up60hse/keymaps/via/readme.md new file mode 100644 index 000000000000..3eca320761a1 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hse/keymaps/via/readme.md @@ -0,0 +1 @@ +# 1up60hse via keymap diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk b/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk new file mode 100644 index 000000000000..6305f94a3555 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +MOUSEKEY_ENABLE = no \ No newline at end of file From 197a401be6585b0b9aad3ca02ec1829e894e9a62 Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Tue, 28 Jan 2020 22:21:00 +0100 Subject: [PATCH 154/331] Qmk doctor os check to support newer msys2/w10 installations (#8031) * Fixed OS detection on newer MSYS installations * made OS sting lower case --- lib/python/qmk/cli/doctor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 013bf7943c94..0d6c1c5b0655 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -168,15 +168,15 @@ def doctor(cli): ok = True # Determine our OS and run platform specific tests - OS = platform.system() # noqa (N806), uppercase name is ok in this instance + OS = platform.platform().lower() # noqa (N806), uppercase name is ok in this instance - if OS == 'Darwin': + if 'darwin' in OS: if not os_test_macos(): ok = False - elif OS == 'Linux': + elif 'linux' in OS: if not os_test_linux(): ok = False - elif OS == 'Windows': + elif 'windows' in OS: if not os_test_windows(): ok = False else: From 2abc0e17e7142f058b39998e16d0896286bd8e1f Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 28 Jan 2020 17:13:57 -0500 Subject: [PATCH 155/331] [Keyboard] Add Quefrency Rev 2 (#8001) * Add Quefrency Rev. 2 * Add encoder support * Add RGB LED mapping info * Add diode direction * Revert removal of default folder for CI purposes * Remove unneeded lines * Rename ISO layout macros --- .../quefrency/keymaps/default65/keymap.c | 17 ++ .../quefrency/keymaps/default65macro/keymap.c | 17 ++ keyboards/keebio/quefrency/quefrency.h | 3 + keyboards/keebio/quefrency/rev2/config.h | 62 ++++++ keyboards/keebio/quefrency/rev2/rev2.c | 1 + keyboards/keebio/quefrency/rev2/rev2.h | 194 ++++++++++++++++++ keyboards/keebio/quefrency/rev2/rules.mk | 3 + keyboards/keebio/quefrency/rules.mk | 4 +- 8 files changed, 299 insertions(+), 2 deletions(-) create mode 100644 keyboards/keebio/quefrency/rev2/config.h create mode 100644 keyboards/keebio/quefrency/rev2/rev2.c create mode 100644 keyboards/keebio/quefrency/rev2/rev2.h create mode 100644 keyboards/keebio/quefrency/rev2/rules.mk diff --git a/keyboards/keebio/quefrency/keymaps/default65/keymap.c b/keyboards/keebio/quefrency/keymaps/default65/keymap.c index 3e77731671de..4ac622f8edb3 100644 --- a/keyboards/keebio/quefrency/keymaps/default65/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65/keymap.c @@ -30,3 +30,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c index 4503291d28f9..478152006edd 100644 --- a/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c @@ -30,3 +30,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/keebio/quefrency/quefrency.h b/keyboards/keebio/quefrency/quefrency.h index 0c387a6d5def..89db94236f46 100644 --- a/keyboards/keebio/quefrency/quefrency.h +++ b/keyboards/keebio/quefrency/quefrency.h @@ -5,6 +5,9 @@ #ifdef KEYBOARD_keebio_quefrency_rev1 #include "rev1.h" #endif +#ifdef KEYBOARD_keebio_quefrency_rev2 + #include "rev2.h" +#endif // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ diff --git a/keyboards/keebio/quefrency/rev2/config.h b/keyboards/keebio/quefrency/rev2/config.h new file mode 100644 index 000000000000..e50c8142e880 --- /dev/null +++ b/keyboards/keebio/quefrency/rev2/config.h @@ -0,0 +1,62 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1257 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Keebio +#define PRODUCT Quefrency +#define DESCRIPTION Split 60/65 percent staggered keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 9 + +#define DIODE_DIRECTION COL2ROW +// wiring of each half +#define MATRIX_ROW_PINS { B1, B2, C7, B4, D7 } +#define MATRIX_COL_PINS { F4, F1, F0, B7, B3, D2, D3, D5, D4 } +#define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7 } +#define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, C7, D3, B7 } +#define SPLIT_HAND_PIN F7 +#define ENCODERS_PAD_A { F6 } +#define ENCODERS_PAD_B { F5 } +#define ENCODERS_PAD_A_RIGHT { D4 } +#define ENCODERS_PAD_B_RIGHT { D6 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN E6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_SPLIT { 8, 8 } +#define RGBLIGHT_LED_MAP { 1, 2, 3, 12, 13, 14, 15, 0, 7, 6, 5, 4, 11, 10, 9, 8 } diff --git a/keyboards/keebio/quefrency/rev2/rev2.c b/keyboards/keebio/quefrency/rev2/rev2.c new file mode 100644 index 000000000000..d713a0ff3a67 --- /dev/null +++ b/keyboards/keebio/quefrency/rev2/rev2.c @@ -0,0 +1 @@ +#include "quefrency.h" diff --git a/keyboards/keebio/quefrency/rev2/rev2.h b/keyboards/keebio/quefrency/rev2/rev2.h new file mode 100644 index 000000000000..6d3db55842b4 --- /dev/null +++ b/keyboards/keebio/quefrency/rev2/rev2.h @@ -0,0 +1,194 @@ +#pragma once + +#include "quefrency.h" +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT_60( \ + LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, \ + LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, \ + LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \ + LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \ + ) \ + { \ + { KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { KC_NO, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { KC_NO, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { KC_NO, KC_NO, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6, KC_NO, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, KC_NO }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, KC_NO } \ + } + +#define LAYOUT LAYOUT_60 // For backwards compatibility with Rev. 1 + +#define LAYOUT_65( \ + LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \ + LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \ + ) \ + { \ + { KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { KC_NO, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { KC_NO, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { KC_NO, KC_NO, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6, KC_NO, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \ + } + +#define LAYOUT_60_with_macro( \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, \ + LD1, LD2, LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, KC_NO, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, KC_NO }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, KC_NO } \ + } + +#define LAYOUT_65_with_macro( \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \ + LD1, LD2, LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, KC_NO, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \ + } + +#define LAYOUT_60_iso( \ + LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, \ + LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, \ + LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \ + LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \ + ) \ + { \ + { KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { KC_NO, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { KC_NO, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { KC_NO, KC_NO, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6, KC_NO, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, KC_NO }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, KC_NO } \ + } + +#define LAYOUT_65_iso( \ + LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, \ + LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \ + LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \ + ) \ + { \ + { KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { KC_NO, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { KC_NO, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { KC_NO, KC_NO, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6, KC_NO, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \ + } + +#define LAYOUT_60_iso_with_macro( \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, \ + LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, KC_NO, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, KC_NO }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, KC_NO } \ + } + +#define LAYOUT_65_iso_with_macro( \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \ + LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, KC_NO, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \ + } + +#define LAYOUT_all( \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \ + LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8, RE9 } \ + } diff --git a/keyboards/keebio/quefrency/rev2/rules.mk b/keyboards/keebio/quefrency/rev2/rules.mk new file mode 100644 index 000000000000..32e788159916 --- /dev/null +++ b/keyboards/keebio/quefrency/rev2/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk index 284a0def3245..5bca869b8e73 100644 --- a/keyboards/keebio/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -18,8 +18,8 @@ BOOTLOADER = caterina BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls From 7149557bb48a488f86f2f6da79bf4b88a0ed8222 Mon Sep 17 00:00:00 2001 From: moseschmiedel <58808540+moseschmiedel@users.noreply.github.com> Date: Wed, 29 Jan 2020 16:17:45 +0100 Subject: [PATCH 156/331] Add German programming layout for Lets Split (#8014) * Add German programming layout for Lets Split * Update copyright in config.h * Add Hash-Symbol to keymap * Change to fit suggestions in PR * Changes as requested, but broken. * Fix layer switching issue --- .../keymaps/DE_programming/config.h | 28 ++++++ .../keymaps/DE_programming/keymap.c | 97 +++++++++++++++++++ .../keymaps/DE_programming/readme.md | 57 +++++++++++ .../keymaps/DE_programming/rules.mk | 0 4 files changed, 182 insertions(+) create mode 100644 keyboards/lets_split/keymaps/DE_programming/config.h create mode 100644 keyboards/lets_split/keymaps/DE_programming/keymap.c create mode 100644 keyboards/lets_split/keymaps/DE_programming/readme.md create mode 100644 keyboards/lets_split/keymaps/DE_programming/rules.mk diff --git a/keyboards/lets_split/keymaps/DE_programming/config.h b/keyboards/lets_split/keymaps/DE_programming/config.h new file mode 100644 index 000000000000..145be1422669 --- /dev/null +++ b/keyboards/lets_split/keymaps/DE_programming/config.h @@ -0,0 +1,28 @@ +/* +This is the c configuration file for the keymap + +Copyright 2020 Mose Schmiedel + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/lets_split/keymaps/DE_programming/keymap.c b/keyboards/lets_split/keymaps/DE_programming/keymap.c new file mode 100644 index 000000000000..32231f883190 --- /dev/null +++ b/keyboards/lets_split/keymaps/DE_programming/keymap.c @@ -0,0 +1,97 @@ +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layers { + _QWERTZ, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwertz + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Z | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | + |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | AltGr| Alt |Lower |Space | Space| Raise| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTZ] = LAYOUT( + KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, + KC_ESC, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, DE_PLUS, KC_ENT, + KC_LSFT, DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RSFT, + KC_LCTL, KC_LGUI, KC_ALGR, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ° | ! | ? | § | € | ~ | $ | ( | ) | < | > | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | Vol+ | Prev | Next | Play | & | @ | { | } | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Vol- | | | | | | % | / | \ | ' | " |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | | |Lower | | Raise| = | * | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( + DE_CIRC, DE_EXLM, DE_QST, DE_PARA, DE_EURO, DE_TILD, DE_DLR, DE_LPRN, DE_RPRN, DE_LESS, DE_MORE, KC_BSPC, + KC_DEL, KC_VOLU, KC_MPRV, KC_MNXT, KC_MPLY, DE_AMPR, DE_AT, DE_LCBR, DE_RCBR, DE_LBRC, DE_RBRC, KC_ENT, + KC_LSFT, KC_VOLD, _______, _______, _______, DE_PIPE, DE_PERC, DE_SLSH, DE_BSLS, DE_QUOT, DE_DQOT, KC_RSFT, + KC_LCTL, _______, _______, _______, _______, _______, _______, _______, DE_EQL, DE_ASTR, _______, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | / | 7 | 8 | 9 | * | | | | # | Alt | ` | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | 4 | 5 | 6 | - | Pos1 | End | ä | ö | ü | ß |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| 1 | 2 | 3 | + |PageUp|PageDn| | | | |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | . | 0 | = |Lower | | Raise| | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( + DE_SLSH, KC_7, KC_8, KC_9, DE_ASTR, _______, _______, _______, DE_HASH, KC_LALT, DE_ACUT, KC_BSPC, + KC_DEL, KC_4, KC_5, KC_6, DE_MINS, KC_HOME, KC_END, DE_AE, DE_OE, DE_UE, DE_SS, KC_ENT, + KC_LSFT, KC_1, KC_2, KC_3, DE_PLUS, KC_PGUP, KC_PGDN, _______, _______, _______, _______, KC_LSFT, + _______, DE_DOT, KC_0, DE_EQL, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/lets_split/keymaps/DE_programming/readme.md b/keyboards/lets_split/keymaps/DE_programming/readme.md new file mode 100644 index 000000000000..38e54609b0ed --- /dev/null +++ b/keyboards/lets_split/keymaps/DE_programming/readme.md @@ -0,0 +1,57 @@ +De_Programming Keymap +====== + +Features +-------- + +Changed Keymap to resemble German Layout. Optimized for Programming + +Layout +-------- + + Qwertz + ,-----------------------------------------------------------------------------------. + | Tab | Q | W | E | R | T | Z | U | I | O | P | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Esc | A | S | D | F | G | H | J | K | L | + |Enter | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Y | X | C | V | B | N | M | , | . | - |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | AltGr| Alt |Lower |Space |Space |Raise | Left | Down | Up |Right | + `-----------------------------------------------------------------------------------' + + + Lower + ,-----------------------------------------------------------------------------------. + | ° | ! | ? | § | € | ~ | $ | ( | ) | < | > | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Del | F1 | F2 | F3 | F4 | & | @ | { | } | [ | ] |Enter | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| F5 | F6 | F7 | F8 | | | % | / | \ | ' | " |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | F9 | F10 | F11 | F12 | | Prev | Next | Vol- | Vol+ | Play | + `-----------------------------------------------------------------------------------' + + + Raise + ,-----------------------------------------------------------------------------------. + | / | 7 | 8 | 9 | * | | | | # | Alt | ` | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Del | 4 | 5 | 6 | - | Pos1 | End | ä | ö | ü | ß |Enter | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| 1 | 2 | 3 | + |PageUp|PageDn| | | | |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | . | 0 | = | Enter| | Prev | Next | Vol- | Vol+ | Play | + `-----------------------------------------------------------------------------------' + + + Adjust (Lower + Raise) + ,-----------------------------------------------------------------------------------. + | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | |Aud on|Audoff|AGnorm|AGswap|Qwertz| | | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | | + `-----------------------------------------------------------------------------------' diff --git a/keyboards/lets_split/keymaps/DE_programming/rules.mk b/keyboards/lets_split/keymaps/DE_programming/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From 66fe3001e4355d69f5fb8f08ceab9dab793777ef Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Wed, 29 Jan 2020 12:51:25 -0500 Subject: [PATCH 157/331] Trim firmware sizes from default rules.mk, part 1 (#8027) * Removed reference to firmware size in 0-9,a-f board-level and default keymap 'rules.mk' files * Correct some 'rules.mk' in boards buried under vendor folders * PR8027 patch Co-authored-by: GeorgeKoenig <35542036+GeorgeKoenig@users.noreply.github.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/1upkeyboards/1up60hse/rules.mk | 12 ++++++------ keyboards/1upkeyboards/1up60hte/rules.mk | 8 ++++---- keyboards/1upkeyboards/1up60rgb/rules.mk | 8 ++++---- keyboards/1upkeyboards/super16/rules.mk | 12 ++++++------ keyboards/2_milk/rules.mk | 8 ++++---- keyboards/2key2crawl/rules.mk | 8 ++++---- keyboards/30wer/rules.mk | 8 ++++---- keyboards/40percentclub/25/rules.mk | 12 ++++++------ keyboards/40percentclub/4x4/rules.mk | 12 ++++++------ keyboards/40percentclub/5x5/rules.mk | 12 ++++++------ keyboards/40percentclub/6lit/rules.mk | 12 ++++++------ keyboards/40percentclub/foobar/rules.mk | 12 ++++++------ keyboards/40percentclub/gherkin/rules.mk | 8 ++++---- keyboards/40percentclub/half_n_half/rules.mk | 12 ++++++------ keyboards/40percentclub/i75/rules.mk | 12 ++++++------ keyboards/40percentclub/luddite/rules.mk | 8 ++++---- keyboards/40percentclub/mf68/rules.mk | 8 ++++---- keyboards/40percentclub/nano/rules.mk | 8 ++++---- keyboards/40percentclub/nein/rules.mk | 12 ++++++------ keyboards/40percentclub/nori/rules.mk | 12 ++++++------ keyboards/40percentclub/tomato/rules.mk | 8 ++++---- keyboards/40percentclub/ut47/rules.mk | 10 +++++----- keyboards/6ball/rules.mk | 8 ++++---- keyboards/8pack/rules.mk | 8 ++++---- keyboards/9key/rules.mk | 8 ++++---- keyboards/abstract/ellipse/rev1/rules.mk | 12 ++++++------ keyboards/acr60/rules.mk | 8 ++++---- keyboards/adkb96/rules.mk | 8 ++++---- keyboards/aeboards/aegis/rules.mk | 10 +++++----- keyboards/aeboards/ext65/rules.mk | 10 +++++----- keyboards/ai03/lunar/rules.mk | 12 ++++++------ keyboards/ai03/orbit/rules.mk | 12 ++++++------ keyboards/ai03/quasar/rules.mk | 12 ++++++------ keyboards/ai03/soyuz/rules.mk | 12 ++++++------ keyboards/akb/eb46/rules.mk | 12 ++++++------ keyboards/akb/raine/rules.mk | 12 ++++++------ keyboards/al1/rules.mk | 10 +++++----- keyboards/alf/dc60/rules.mk | 12 ++++++------ keyboards/alf/x11/rules.mk | 12 ++++++------ keyboards/alf/x2/rules.mk | 8 ++++---- keyboards/alpha/rules.mk | 8 ++++---- keyboards/alps64/rules.mk | 8 ++++---- keyboards/alu84/rules.mk | 8 ++++---- keyboards/amj40/keymaps/default/rules.mk | 8 ++++---- keyboards/amj40/rules.mk | 12 ++++++------ keyboards/amj60/rules.mk | 12 ++++++------ keyboards/amj96/rules.mk | 10 +++++----- keyboards/amjkeyboard/amj66/rules.mk | 10 +++++----- keyboards/amjpad/rules.mk | 12 ++++++------ keyboards/angel17/alpha/rules.mk | 12 ++++++------ keyboards/angel17/rev1/rules.mk | 12 ++++++------ keyboards/angel17/rules.mk | 12 ++++++------ keyboards/angel64/rules.mk | 12 ++++++------ keyboards/at101_blackheart/rules.mk | 8 ++++---- keyboards/atomic/rules.mk | 8 ++++---- keyboards/atreus/rules.mk | 12 ++++++------ keyboards/atreus62/rules.mk | 8 ++++---- keyboards/baguette/rules.mk | 12 ++++++------ keyboards/bantam44/rules.mk | 8 ++++---- keyboards/bigseries/rules.mk | 8 ++++---- keyboards/bigswitch/rules.mk | 8 ++++---- keyboards/blockey/rules.mk | 10 +++++----- keyboards/bm16a/rules.mk | 12 ++++++------ keyboards/bm43a/rules.mk | 12 ++++++------ keyboards/boardwalk/rules.mk | 10 +++++----- .../bpiphany/frosty_flake/keymaps/default/rules.mk | 8 ++++---- keyboards/bpiphany/frosty_flake/rules.mk | 8 ++++---- keyboards/bpiphany/kitten_paw/rules.mk | 8 ++++---- .../bpiphany/pegasushoof/keymaps/default/rules.mk | 8 ++++---- keyboards/bpiphany/pegasushoof/rules.mk | 8 ++++---- keyboards/bpiphany/sixshooter/rules.mk | 10 +++++----- .../bpiphany/tiger_lily/keymaps/default/rules.mk | 8 ++++---- keyboards/bpiphany/tiger_lily/rules.mk | 8 ++++---- keyboards/bpiphany/unloved_bastard/rules.mk | 10 +++++----- keyboards/bthlabs/geekpad/rules.mk | 12 ++++++------ keyboards/business_card/alpha/rules.mk | 12 ++++++------ keyboards/business_card/beta/rules.mk | 12 ++++++------ keyboards/business_card/rules.mk | 12 ++++++------ keyboards/butterstick/rules.mk | 6 +++--- keyboards/c39/rules.mk | 8 ++++---- keyboards/catch22/rules.mk | 8 ++++---- keyboards/chimera_ergo/rules.mk | 8 ++++---- keyboards/chimera_ls/rules.mk | 8 ++++---- keyboards/chimera_ortho/rules.mk | 8 ++++---- keyboards/choco60/rules.mk | 12 ++++++------ keyboards/christmas_tree/rules.mk | 8 ++++---- keyboards/ckeys/handwire_101/rules.mk | 8 ++++---- keyboards/ckeys/nakey/rules.mk | 10 +++++----- keyboards/ckeys/obelus/rules.mk | 8 ++++---- keyboards/claw44/rev1/rules.mk | 8 ++++---- keyboards/claw44/rules.mk | 8 ++++---- keyboards/clueboard/17/rules.mk | 10 +++++----- keyboards/clueboard/2x1800/rules.mk | 10 +++++----- keyboards/clueboard/66/rev1/rules.mk | 8 ++++---- keyboards/clueboard/66/rev2/rules.mk | 8 ++++---- keyboards/clueboard/66/rev3/rules.mk | 8 ++++---- keyboards/clueboard/66/rev4/rules.mk | 8 ++++---- keyboards/clueboard/card/keymaps/default/rules.mk | 8 ++++---- keyboards/clueboard/card/rules.mk | 10 +++++----- keyboards/cocoa40/rules.mk | 12 ++++++------ keyboards/comet46/rules.mk | 8 ++++---- keyboards/contra/rules.mk | 8 ++++---- keyboards/converter/adb_usb/rules.mk | 6 +++--- keyboards/converter/hp_46010a/rules.mk | 8 ++++---- keyboards/converter/ibm_5291/rules.mk | 8 ++++---- .../converter/ibm_terminal/keymaps/default/rules.mk | 8 ++++---- keyboards/converter/ibm_terminal/rules.mk | 8 ++++---- keyboards/converter/m0110_usb/rules.mk | 6 +++--- keyboards/converter/modelm101/rules.mk | 12 ++++++------ keyboards/converter/numeric_keypad_IIe/rules.mk | 12 ++++++------ keyboards/converter/palm_usb/rules.mk | 8 ++++---- keyboards/converter/sun_usb/rules.mk | 8 ++++---- keyboards/converter/usb_usb/ble/rules.mk | 12 ++++++------ keyboards/converter/usb_usb/rules.mk | 8 ++++---- keyboards/converter/xt_usb/rules.mk | 8 ++++---- keyboards/copenhagen_click/click_pad_v1/rules.mk | 12 ++++++------ keyboards/coseyfannitutti/discipad/rules.mk | 12 ++++++------ keyboards/coseyfannitutti/discipline/rules.mk | 12 ++++++------ keyboards/coseyfannitutti/mullet/rules.mk | 12 ++++++------ keyboards/coseyfannitutti/mulletpad/rules.mk | 12 ++++++------ keyboards/crawlpad/rules.mk | 8 ++++---- keyboards/crkbd/rules.mk | 8 ++++---- keyboards/cu24/rules.mk | 10 +++++----- keyboards/cu75/keymaps/default/rules.mk | 8 ++++---- keyboards/cutie_club/wraith/rules.mk | 12 ++++++------ keyboards/dc01/arrow/rules.mk | 12 ++++++------ keyboards/dc01/left/rules.mk | 12 ++++++------ keyboards/dc01/numpad/rules.mk | 12 ++++++------ keyboards/dc01/right/rules.mk | 12 ++++++------ keyboards/deltasplit75/rules.mk | 8 ++++---- keyboards/dichotomy/rules.mk | 8 ++++---- keyboards/diverge3/rules.mk | 8 ++++---- keyboards/divergetm2/rules.mk | 8 ++++---- keyboards/dk60/rules.mk | 12 ++++++------ keyboards/do60/rules.mk | 8 ++++---- keyboards/donutcables/scrabblepad/rules.mk | 10 +++++----- keyboards/doro67/multi/rules.mk | 12 ++++++------ keyboards/doro67/regular/rules.mk | 12 ++++++------ keyboards/doro67/rgb/rules.mk | 12 ++++++------ keyboards/duck/eagle_viper/v2/rules.mk | 10 +++++----- keyboards/duck/jetfire/rules.mk | 12 ++++++------ keyboards/duck/lightsaver/rules.mk | 10 +++++----- keyboards/duck/octagon/v1/rules.mk | 10 +++++----- keyboards/duck/octagon/v2/rules.mk | 10 +++++----- keyboards/duck/orion/v3/rules.mk | 10 +++++----- keyboards/dumbpad/rules.mk | 12 ++++++------ keyboards/dz60/rules.mk | 8 ++++---- keyboards/eco/keymaps/default/rules.mk | 8 ++++---- keyboards/eco/rules.mk | 8 ++++---- keyboards/emptystring/NQG/rules.mk | 8 ++++---- keyboards/ep/40/rules.mk | 12 ++++++------ keyboards/ep/96/rules.mk | 12 ++++++------ keyboards/ep/comsn/hs68/rules.mk | 12 ++++++------ keyboards/ep/comsn/mollydooker/rules.mk | 12 ++++++------ keyboards/ep/comsn/tf_longeboye/rules.mk | 12 ++++++------ keyboards/ergo42/rules.mk | 8 ++++---- keyboards/ergodash/rules.mk | 8 ++++---- keyboards/ergodone/rules.mk | 8 ++++---- keyboards/ergodox_ez/rules.mk | 8 ++++---- keyboards/ergodox_infinity/rules.mk | 8 ++++---- keyboards/ergoinu/keymaps/default/rules.mk | 8 ++++---- keyboards/ergoinu/rules.mk | 8 ++++---- keyboards/ergotravel/rules.mk | 8 ++++---- keyboards/espectro/rules.mk | 8 ++++---- keyboards/evil80/rules.mk | 8 ++++---- keyboards/exclusive/e65/rules.mk | 8 ++++---- keyboards/exclusive/e6v2/le/rules.mk | 8 ++++---- keyboards/exclusive/e6v2/le_bmc/rules.mk | 12 ++++++------ keyboards/exclusive/e6v2/oe/rules.mk | 8 ++++---- keyboards/exclusive/e6v2/oe_bmc/rules.mk | 12 ++++++------ keyboards/exclusive/e7v1/rules.mk | 8 ++++---- keyboards/fc660c/rules.mk | 8 ++++---- keyboards/fc980c/rules.mk | 8 ++++---- keyboards/felix/rules.mk | 12 ++++++------ keyboards/fleuron/rules.mk | 10 +++++----- keyboards/fortitude60/rules.mk | 8 ++++---- keyboards/four_banger/rules.mk | 8 ++++---- keyboards/foxlab/leaf60/hotswap/rules.mk | 12 ++++++------ keyboards/foxlab/leaf60/universal/rules.mk | 12 ++++++------ keyboards/fractal/rules.mk | 8 ++++---- keyboards/freyr/rules.mk | 12 ++++++------ 181 files changed, 877 insertions(+), 877 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index 09caf0045a43..bce414e25a5c 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs EXTRAFLAGS += -flto LAYOUTS = 60_ansi diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index d2bedea1b65a..d3d35634155d 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk index 98a1e93a1bd9..24f737398e7e 100644 --- a/keyboards/1upkeyboards/1up60rgb/rules.mk +++ b/keyboards/1upkeyboards/1up60rgb/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk index 07a403cc114e..3a3cee8c6b15 100644 --- a/keyboards/1upkeyboards/super16/rules.mk +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x4 numpad_4x4 diff --git a/keyboards/2_milk/rules.mk b/keyboards/2_milk/rules.mk index 57c6d32c81af..4e6c5f7039a5 100644 --- a/keyboards/2_milk/rules.mk +++ b/keyboards/2_milk/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/2key2crawl/rules.mk b/keyboards/2key2crawl/rules.mk index c7bacab796d2..e6ef0a288fe0 100644 --- a/keyboards/2key2crawl/rules.mk +++ b/keyboards/2key2crawl/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/30wer/rules.mk b/keyboards/30wer/rules.mk index 1aeca9a545a1..9a80d5a18af7 100644 --- a/keyboards/30wer/rules.mk +++ b/keyboards/30wer/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/40percentclub/25/rules.mk b/keyboards/40percentclub/25/rules.mk index 3321a84025b9..483619f18926 100644 --- a/keyboards/40percentclub/25/rules.mk +++ b/keyboards/40percentclub/25/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk index c653c6753dea..c4257a070d71 100644 --- a/keyboards/40percentclub/4x4/rules.mk +++ b/keyboards/40percentclub/4x4/rules.mk @@ -14,21 +14,21 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16 diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk index d8b82248c6b7..ec0f656d085c 100644 --- a/keyboards/40percentclub/5x5/rules.mk +++ b/keyboards/40percentclub/5x5/rules.mk @@ -14,21 +14,21 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15 diff --git a/keyboards/40percentclub/6lit/rules.mk b/keyboards/40percentclub/6lit/rules.mk index db09b6c5f682..4faa9610b89a 100644 --- a/keyboards/40percentclub/6lit/rules.mk +++ b/keyboards/40percentclub/6lit/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/foobar/rules.mk b/keyboards/40percentclub/foobar/rules.mk index 4b77d4cdba67..f378e39b6e32 100644 --- a/keyboards/40percentclub/foobar/rules.mk +++ b/keyboards/40percentclub/foobar/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/gherkin/rules.mk b/keyboards/40percentclub/gherkin/rules.mk index 190aea355a4c..d8c4894a85ad 100644 --- a/keyboards/40percentclub/gherkin/rules.mk +++ b/keyboards/40percentclub/gherkin/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk index 62d9e37ada60..98b292470750 100644 --- a/keyboards/40percentclub/half_n_half/rules.mk +++ b/keyboards/40percentclub/half_n_half/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/i75/rules.mk b/keyboards/40percentclub/i75/rules.mk index 6f79143a18b1..e99830b85320 100644 --- a/keyboards/40percentclub/i75/rules.mk +++ b/keyboards/40percentclub/i75/rules.mk @@ -1,10 +1,10 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -12,12 +12,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_5x15 DEFAULT_FOLDER = 40percentclub/i75/promicro diff --git a/keyboards/40percentclub/luddite/rules.mk b/keyboards/40percentclub/luddite/rules.mk index 02e0abe9a626..6da5cd05a6d9 100644 --- a/keyboards/40percentclub/luddite/rules.mk +++ b/keyboards/40percentclub/luddite/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk index 1113d34a23de..65d18703556e 100644 --- a/keyboards/40percentclub/mf68/rules.mk +++ b/keyboards/40percentclub/mf68/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/40percentclub/nano/rules.mk b/keyboards/40percentclub/nano/rules.mk index d55a40889b36..e9658c4b55f3 100644 --- a/keyboards/40percentclub/nano/rules.mk +++ b/keyboards/40percentclub/nano/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/40percentclub/nein/rules.mk b/keyboards/40percentclub/nein/rules.mk index 7805bac17615..47742c4b46e0 100644 --- a/keyboards/40percentclub/nein/rules.mk +++ b/keyboards/40percentclub/nein/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/40percentclub/nori/rules.mk b/keyboards/40percentclub/nori/rules.mk index 75aa26e49628..e9b24fc92ad8 100644 --- a/keyboards/40percentclub/nori/rules.mk +++ b/keyboards/40percentclub/nori/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 diff --git a/keyboards/40percentclub/tomato/rules.mk b/keyboards/40percentclub/tomato/rules.mk index a3e442e09e8e..312134b7c02d 100644 --- a/keyboards/40percentclub/tomato/rules.mk +++ b/keyboards/40percentclub/tomato/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk index 043a62906aed..9d21750b4460 100644 --- a/keyboards/40percentclub/ut47/rules.mk +++ b/keyboards/40percentclub/ut47/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/6ball/rules.mk b/keyboards/6ball/rules.mk index 05a642e6e9fd..e4f7093f7408 100644 --- a/keyboards/6ball/rules.mk +++ b/keyboards/6ball/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/8pack/rules.mk b/keyboards/8pack/rules.mk index 625f8b201f20..4ed443daa59e 100644 --- a/keyboards/8pack/rules.mk +++ b/keyboards/8pack/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk index 5e6e882e9c35..b6c0c73be952 100644 --- a/keyboards/9key/rules.mk +++ b/keyboards/9key/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/abstract/ellipse/rev1/rules.mk b/keyboards/abstract/ellipse/rev1/rules.mk index 6c7f5fea32a2..214b0a39756c 100644 --- a/keyboards/abstract/ellipse/rev1/rules.mk +++ b/keyboards/abstract/ellipse/rev1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes # Enable support for rotary encoders diff --git a/keyboards/acr60/rules.mk b/keyboards/acr60/rules.mk index 1e6d4bb7cdff..c1f1f22ba343 100644 --- a/keyboards/acr60/rules.mk +++ b/keyboards/acr60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/adkb96/rules.mk b/keyboards/adkb96/rules.mk index cb4ce2dd7b0d..95fbc1d48a0c 100644 --- a/keyboards/adkb96/rules.mk +++ b/keyboards/adkb96/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk index 2e39dae173c6..cb9ad1acf19d 100644 --- a/keyboards/aeboards/aegis/rules.mk +++ b/keyboards/aeboards/aegis/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/aeboards/ext65/rules.mk b/keyboards/aeboards/ext65/rules.mk index a5c98a1c60d7..6e5ad12f8dd7 100644 --- a/keyboards/aeboards/ext65/rules.mk +++ b/keyboards/aeboards/ext65/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ai03/lunar/rules.mk b/keyboards/ai03/lunar/rules.mk index dd3d71baa97b..62da535e1f2b 100644 --- a/keyboards/ai03/lunar/rules.mk +++ b/keyboards/ai03/lunar/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk index 758a73cd2af5..706ba9b06510 100644 --- a/keyboards/ai03/orbit/rules.mk +++ b/keyboards/ai03/orbit/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs USE_I2C = no # I2C for split communication CUSTOM_MATRIX = yes # For providing custom matrix.c (in this case, override regular matrix.c with split matrix.c) # SPLIT_KEYBOARD = yes # Split keyboard flag disabled as manual edits had to be done to the split common files diff --git a/keyboards/ai03/quasar/rules.mk b/keyboards/ai03/quasar/rules.mk index 6b6784779109..3cb2d3ab70e0 100644 --- a/keyboards/ai03/quasar/rules.mk +++ b/keyboards/ai03/quasar/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ai03/soyuz/rules.mk b/keyboards/ai03/soyuz/rules.mk index f092cb35beee..bcf4f80bb819 100644 --- a/keyboards/ai03/soyuz/rules.mk +++ b/keyboards/ai03/soyuz/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_5x4 diff --git a/keyboards/akb/eb46/rules.mk b/keyboards/akb/eb46/rules.mk index 5360459cf709..bd3cd09a9fd2 100644 --- a/keyboards/akb/eb46/rules.mk +++ b/keyboards/akb/eb46/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/akb/raine/rules.mk b/keyboards/akb/raine/rules.mk index 5360459cf709..bd3cd09a9fd2 100644 --- a/keyboards/akb/raine/rules.mk +++ b/keyboards/akb/raine/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/al1/rules.mk b/keyboards/al1/rules.mk index 175adfd5d7bd..b4d4f87d9180 100644 --- a/keyboards/al1/rules.mk +++ b/keyboards/al1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/alf/dc60/rules.mk b/keyboards/alf/dc60/rules.mk index 8df6c4c7c5be..7c87642acc64 100644 --- a/keyboards/alf/dc60/rules.mk +++ b/keyboards/alf/dc60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk index 3439ac47f3be..decff4f79143 100644 --- a/keyboards/alf/x11/rules.mk +++ b/keyboards/alf/x11/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs EXTRAFLAGS += -flto diff --git a/keyboards/alf/x2/rules.mk b/keyboards/alf/x2/rules.mk index 1e6d4bb7cdff..c1f1f22ba343 100644 --- a/keyboards/alf/x2/rules.mk +++ b/keyboards/alf/x2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/alpha/rules.mk b/keyboards/alpha/rules.mk index 13a720d8c1a3..773655f2fbc6 100755 --- a/keyboards/alpha/rules.mk +++ b/keyboards/alpha/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk index 79d9cb36076b..7dbe8e7dd0f9 100644 --- a/keyboards/alps64/rules.mk +++ b/keyboards/alps64/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change to no to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/alu84/rules.mk b/keyboards/alu84/rules.mk index 680b13dc07da..b5f249057481 100755 --- a/keyboards/alu84/rules.mk +++ b/keyboards/alu84/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= no # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/amj40/keymaps/default/rules.mk b/keyboards/amj40/keymaps/default/rules.mk index cbfa35e63103..957f209b71ad 100644 --- a/keyboards/amj40/keymaps/default/rules.mk +++ b/keyboards/amj40/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk index 423e66aeef61..5d6cff98916c 100755 --- a/keyboards/amj40/rules.mk +++ b/keyboards/amj40/rules.mk @@ -14,14 +14,14 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= no # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug COMMAND_ENABLE ?= yes # Commands for debug and configuration NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality MIDI_ENABLE ?= no # MIDI controls AUDIO_ENABLE ?= no UNICODE_ENABLE ?= no # Unicode diff --git a/keyboards/amj60/rules.mk b/keyboards/amj60/rules.mk index bccdd668113b..7bc8ffe181b3 100644 --- a/keyboards/amj60/rules.mk +++ b/keyboards/amj60/rules.mk @@ -14,14 +14,14 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/amj96/rules.mk b/keyboards/amj96/rules.mk index 52f610d7d5c1..e6838d71957f 100644 --- a/keyboards/amj96/rules.mk +++ b/keyboards/amj96/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/amjkeyboard/amj66/rules.mk b/keyboards/amjkeyboard/amj66/rules.mk index 4102c0eb2886..b5d3f1ee359a 100644 --- a/keyboards/amjkeyboard/amj66/rules.mk +++ b/keyboards/amjkeyboard/amj66/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/amjpad/rules.mk b/keyboards/amjpad/rules.mk index fe28924852d7..f807eddc2285 100644 --- a/keyboards/amjpad/rules.mk +++ b/keyboards/amjpad/rules.mk @@ -14,14 +14,14 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/angel17/alpha/rules.mk b/keyboards/angel17/alpha/rules.mk index 5a26a2e0bee1..51660ce5fc95 100644 --- a/keyboards/angel17/alpha/rules.mk +++ b/keyboards/angel17/alpha/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = numpad_5x4 diff --git a/keyboards/angel17/rev1/rules.mk b/keyboards/angel17/rev1/rules.mk index c76c0244a85e..7384c23de119 100644 --- a/keyboards/angel17/rev1/rules.mk +++ b/keyboards/angel17/rev1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = numpad_5x4 diff --git a/keyboards/angel17/rules.mk b/keyboards/angel17/rules.mk index ca2563a6e27a..bd5ae48de9f5 100644 --- a/keyboards/angel17/rules.mk +++ b/keyboards/angel17/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = numpad_5x4 diff --git a/keyboards/angel64/rules.mk b/keyboards/angel64/rules.mk index 0f2b29096d40..1c44782e2cd7 100644 --- a/keyboards/angel64/rules.mk +++ b/keyboards/angel64/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs OLED_DRIVER_ENABLE = yes CUSTOM_MATRIX = yes diff --git a/keyboards/at101_blackheart/rules.mk b/keyboards/at101_blackheart/rules.mk index d8cfbd289fd2..1930d9f27f56 100644 --- a/keyboards/at101_blackheart/rules.mk +++ b/keyboards/at101_blackheart/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/atomic/rules.mk b/keyboards/atomic/rules.mk index 8ccbcb11b4ad..5a057f973c86 100644 --- a/keyboards/atomic/rules.mk +++ b/keyboards/atomic/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk index 403b0b0ca2e1..eb16f2f46e29 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -1,10 +1,10 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -12,11 +12,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs DEFAULT_FOLDER = atreus/astar diff --git a/keyboards/atreus62/rules.mk b/keyboards/atreus62/rules.mk index 323976c2c25e..5f9cd6c78d39 100644 --- a/keyboards/atreus62/rules.mk +++ b/keyboards/atreus62/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work #BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/baguette/rules.mk b/keyboards/baguette/rules.mk index 351322b859bf..f911fb5d3763 100644 --- a/keyboards/baguette/rules.mk +++ b/keyboards/baguette/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/bantam44/rules.mk b/keyboards/bantam44/rules.mk index a15b451f31a4..d90f8155e86e 100644 --- a/keyboards/bantam44/rules.mk +++ b/keyboards/bantam44/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend diff --git a/keyboards/bigseries/rules.mk b/keyboards/bigseries/rules.mk index a3dd1ad6c569..2f52d9558623 100755 --- a/keyboards/bigseries/rules.mk +++ b/keyboards/bigseries/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/bigswitch/rules.mk b/keyboards/bigswitch/rules.mk index 14cc0c85b3b9..88844733f063 100755 --- a/keyboards/bigswitch/rules.mk +++ b/keyboards/bigswitch/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/blockey/rules.mk b/keyboards/blockey/rules.mk index 83bc96c11f5e..3233ee2f78c7 100644 --- a/keyboards/blockey/rules.mk +++ b/keyboards/blockey/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bm16a/rules.mk b/keyboards/bm16a/rules.mk index 50f0ff12110b..3e994588f5e3 100644 --- a/keyboards/bm16a/rules.mk +++ b/keyboards/bm16a/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x4 diff --git a/keyboards/bm43a/rules.mk b/keyboards/bm43a/rules.mk index 66a778b6c231..5fa842c8bb10 100644 --- a/keyboards/bm43a/rules.mk +++ b/keyboards/bm43a/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/boardwalk/rules.mk b/keyboards/boardwalk/rules.mk index 215dfe34ee8b..88cce1631392 100644 --- a/keyboards/boardwalk/rules.mk +++ b/keyboards/boardwalk/rules.mk @@ -15,14 +15,14 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/bpiphany/frosty_flake/keymaps/default/rules.mk b/keyboards/bpiphany/frosty_flake/keymaps/default/rules.mk index 5dcea846726e..a5a411e8f234 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/default/rules.mk +++ b/keyboards/bpiphany/frosty_flake/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/bpiphany/frosty_flake/rules.mk b/keyboards/bpiphany/frosty_flake/rules.mk index a890c4a59405..d5f9434300a7 100644 --- a/keyboards/bpiphany/frosty_flake/rules.mk +++ b/keyboards/bpiphany/frosty_flake/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/bpiphany/kitten_paw/rules.mk b/keyboards/bpiphany/kitten_paw/rules.mk index 72a7f14b3fea..23546e4f0a08 100644 --- a/keyboards/bpiphany/kitten_paw/rules.mk +++ b/keyboards/bpiphany/kitten_paw/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk index 8254a83891d1..d6ebcd5d7998 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42 NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/bpiphany/pegasushoof/rules.mk b/keyboards/bpiphany/pegasushoof/rules.mk index 0910feb61b5e..ffb642a9cf9c 100644 --- a/keyboards/bpiphany/pegasushoof/rules.mk +++ b/keyboards/bpiphany/pegasushoof/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/bpiphany/sixshooter/rules.mk b/keyboards/bpiphany/sixshooter/rules.mk index ad76051eb2bc..ed6caaa5d07f 100644 --- a/keyboards/bpiphany/sixshooter/rules.mk +++ b/keyboards/bpiphany/sixshooter/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk b/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk index 7a331cd530cf..46af5cd7b4b7 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk +++ b/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/bpiphany/tiger_lily/rules.mk b/keyboards/bpiphany/tiger_lily/rules.mk index edd3ab6a4a36..f6c3a48941e7 100644 --- a/keyboards/bpiphany/tiger_lily/rules.mk +++ b/keyboards/bpiphany/tiger_lily/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/bpiphany/unloved_bastard/rules.mk b/keyboards/bpiphany/unloved_bastard/rules.mk index 65123020f3c2..7afc2d03960d 100644 --- a/keyboards/bpiphany/unloved_bastard/rules.mk +++ b/keyboards/bpiphany/unloved_bastard/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bthlabs/geekpad/rules.mk b/keyboards/bthlabs/geekpad/rules.mk index e05730c69e66..4b7193da4950 100644 --- a/keyboards/bthlabs/geekpad/rules.mk +++ b/keyboards/bthlabs/geekpad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/business_card/alpha/rules.mk b/keyboards/business_card/alpha/rules.mk index e03f942e9d4e..13cbddc3c8fa 100644 --- a/keyboards/business_card/alpha/rules.mk +++ b/keyboards/business_card/alpha/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs OLED_DRIVER_ENABLE = yes diff --git a/keyboards/business_card/beta/rules.mk b/keyboards/business_card/beta/rules.mk index e03f942e9d4e..13cbddc3c8fa 100644 --- a/keyboards/business_card/beta/rules.mk +++ b/keyboards/business_card/beta/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs OLED_DRIVER_ENABLE = yes diff --git a/keyboards/business_card/rules.mk b/keyboards/business_card/rules.mk index 7e37685de6d6..591261d28686 100644 --- a/keyboards/business_card/rules.mk +++ b/keyboards/business_card/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs DEFAULT_FOLDER = business_card/beta diff --git a/keyboards/butterstick/rules.mk b/keyboards/butterstick/rules.mk index 764e7d6aa284..b73ed405ad60 100644 --- a/keyboards/butterstick/rules.mk +++ b/keyboards/butterstick/rules.mk @@ -11,9 +11,9 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover STENO_ENABLE = yes # Needed for chording diff --git a/keyboards/c39/rules.mk b/keyboards/c39/rules.mk index c7a902045a00..ed3554aac4bb 100755 --- a/keyboards/c39/rules.mk +++ b/keyboards/c39/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/catch22/rules.mk b/keyboards/catch22/rules.mk index 227117b76668..1622b95c5aa5 100644 --- a/keyboards/catch22/rules.mk +++ b/keyboards/catch22/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/chimera_ergo/rules.mk b/keyboards/chimera_ergo/rules.mk index 0e26588e371f..f37d14107b77 100644 --- a/keyboards/chimera_ergo/rules.mk +++ b/keyboards/chimera_ergo/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/chimera_ls/rules.mk b/keyboards/chimera_ls/rules.mk index 5060b9ebfca2..ecab7133a41a 100644 --- a/keyboards/chimera_ls/rules.mk +++ b/keyboards/chimera_ls/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/chimera_ortho/rules.mk b/keyboards/chimera_ortho/rules.mk index 549f311496a7..bf341ab5dd0a 100644 --- a/keyboards/chimera_ortho/rules.mk +++ b/keyboards/chimera_ortho/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/choco60/rules.mk b/keyboards/choco60/rules.mk index 65b98b73b6c1..63b982146139 100644 --- a/keyboards/choco60/rules.mk +++ b/keyboards/choco60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes # Enable split keyboard diff --git a/keyboards/christmas_tree/rules.mk b/keyboards/christmas_tree/rules.mk index 7e5269baf0f8..da85eb37286c 100644 --- a/keyboards/christmas_tree/rules.mk +++ b/keyboards/christmas_tree/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk index 07b0c57b4439..41a29b35373f 100755 --- a/keyboards/ckeys/handwire_101/rules.mk +++ b/keyboards/ckeys/handwire_101/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration TERMINAL_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk index afd508247fd3..95fd5e4621e6 100644 --- a/keyboards/ckeys/nakey/rules.mk +++ b/keyboards/ckeys/nakey/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug COMMAND_ENABLE ?= yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE ?= no # USB Nkey Rollover BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE ?= no # MIDI support UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 diff --git a/keyboards/ckeys/obelus/rules.mk b/keyboards/ckeys/obelus/rules.mk index 0c55043003d2..686511ff8aa4 100644 --- a/keyboards/ckeys/obelus/rules.mk +++ b/keyboards/ckeys/obelus/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/claw44/rev1/rules.mk b/keyboards/claw44/rev1/rules.mk index ae95ec401454..016bc362a1bd 100644 --- a/keyboards/claw44/rev1/rules.mk +++ b/keyboards/claw44/rev1/rules.mk @@ -3,10 +3,10 @@ SRC += rev1/split_util.c SRC += rev1/split_scomm.c # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/claw44/rules.mk b/keyboards/claw44/rules.mk index b2c3b436e959..f872b9ebfaaa 100644 --- a/keyboards/claw44/rules.mk +++ b/keyboards/claw44/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/clueboard/17/rules.mk b/keyboards/clueboard/17/rules.mk index 68274a8b2357..d70fd8f85a9b 100644 --- a/keyboards/clueboard/17/rules.mk +++ b/keyboards/clueboard/17/rules.mk @@ -12,13 +12,13 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode diff --git a/keyboards/clueboard/2x1800/rules.mk b/keyboards/clueboard/2x1800/rules.mk index f5a41ff142aa..34d9c2a24e43 100644 --- a/keyboards/clueboard/2x1800/rules.mk +++ b/keyboards/clueboard/2x1800/rules.mk @@ -12,13 +12,13 @@ MCU = at90usb1286 BOOTLOADER = halfkay # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode RGBLIGHT_ENABLE = yes # RGB on port C6 AUDIO_ENABLE = yes # Audio output on port C4 and B7 diff --git a/keyboards/clueboard/66/rev1/rules.mk b/keyboards/clueboard/66/rev1/rules.mk index 39fd55921f43..84b5dee21e72 100644 --- a/keyboards/clueboard/66/rev1/rules.mk +++ b/keyboards/clueboard/66/rev1/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no diff --git a/keyboards/clueboard/66/rev2/rules.mk b/keyboards/clueboard/66/rev2/rules.mk index ec623ec63fcd..6917c0f06895 100644 --- a/keyboards/clueboard/66/rev2/rules.mk +++ b/keyboards/clueboard/66/rev2/rules.mk @@ -13,10 +13,10 @@ BOOTLOADER = atmel-dfu # Build Options BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no diff --git a/keyboards/clueboard/66/rev3/rules.mk b/keyboards/clueboard/66/rev3/rules.mk index ca7817af1835..28f497ec3af2 100644 --- a/keyboards/clueboard/66/rev3/rules.mk +++ b/keyboards/clueboard/66/rev3/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no diff --git a/keyboards/clueboard/66/rev4/rules.mk b/keyboards/clueboard/66/rev4/rules.mk index ef7989aa0bc1..54264c128d25 100644 --- a/keyboards/clueboard/66/rev4/rules.mk +++ b/keyboards/clueboard/66/rev4/rules.mk @@ -5,10 +5,10 @@ MCU = STM32F303 # comment out to disable the options. # BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk index 3b11f550f957..998bb5e0eb1c 100644 --- a/keyboards/clueboard/card/keymaps/default/rules.mk +++ b/keyboards/clueboard/card/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk index 9e3f19dc0c96..65f2c8fa395d 100644 --- a/keyboards/clueboard/card/rules.mk +++ b/keyboards/clueboard/card/rules.mk @@ -12,13 +12,13 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # USB Nkey Rollover -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality by default MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode diff --git a/keyboards/cocoa40/rules.mk b/keyboards/cocoa40/rules.mk index ad0ffbf0fe20..2fb3031164b8 100644 --- a/keyboards/cocoa40/rules.mk +++ b/keyboards/cocoa40/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE =no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE =no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes diff --git a/keyboards/comet46/rules.mk b/keyboards/comet46/rules.mk index d38f16734f4f..2aaa5483c809 100644 --- a/keyboards/comet46/rules.mk +++ b/keyboards/comet46/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/contra/rules.mk b/keyboards/contra/rules.mk index 0aded0f29af7..de553f57dd49 100755 --- a/keyboards/contra/rules.mk +++ b/keyboards/contra/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 66ca7652660a..70df2561d190 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -14,9 +14,9 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk index b23aaadeca90..b7199d7f9028 100644 --- a/keyboards/converter/hp_46010a/rules.mk +++ b/keyboards/converter/hp_46010a/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = halfkay # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/converter/ibm_5291/rules.mk b/keyboards/converter/ibm_5291/rules.mk index edb456a7d841..0b53753ebc6a 100644 --- a/keyboards/converter/ibm_5291/rules.mk +++ b/keyboards/converter/ibm_5291/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = halfkay # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk index 8ff095047200..749b93312cd1 100644 --- a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index 36913ef331b1..059d7b303e20 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index 36c3dfa3fdc9..a0f0c5ce426d 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -17,9 +17,9 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/converter/modelm101/rules.mk b/keyboards/converter/modelm101/rules.mk index dada3f22d973..03c8bda35797 100644 --- a/keyboards/converter/modelm101/rules.mk +++ b/keyboards/converter/modelm101/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/converter/numeric_keypad_IIe/rules.mk b/keyboards/converter/numeric_keypad_IIe/rules.mk index 03c1bc8f868f..fa18648913d8 100644 --- a/keyboards/converter/numeric_keypad_IIe/rules.mk +++ b/keyboards/converter/numeric_keypad_IIe/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index 2cd2c47e598d..15114192e7de 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 60beb4d9b062..5a1a117c0c89 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = lufa-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk index a882bd145885..cb2910bd96f9 100644 --- a/keyboards/converter/usb_usb/ble/rules.mk +++ b/keyboards/converter/usb_usb/ble/rules.mk @@ -1,10 +1,10 @@ # Processor frequency F_CPU = 8000000 -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -12,12 +12,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs BLUETOOTH = AdafruitBLE ADAFRUIT_BLE_ENABLE = yes diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk index b4f37d3ad8b8..d277853cfd1c 100644 --- a/keyboards/converter/usb_usb/rules.mk +++ b/keyboards/converter/usb_usb/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -#CONSOLE_ENABLE = yes # Console for debug(+400) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +#MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +#CONSOLE_ENABLE = yes # Console for debug #COMMAND_ENABLE = yes # Commands for debug and configuration #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index 444e5f02df99..986cdd4dc6e3 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover XT_ENABLE = yes diff --git a/keyboards/copenhagen_click/click_pad_v1/rules.mk b/keyboards/copenhagen_click/click_pad_v1/rules.mk index dd7a086de83d..0372e3cb29a3 100755 --- a/keyboards/copenhagen_click/click_pad_v1/rules.mk +++ b/keyboards/copenhagen_click/click_pad_v1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/coseyfannitutti/discipad/rules.mk b/keyboards/coseyfannitutti/discipad/rules.mk index 52e06f6e762c..53e16a4e9186 100644 --- a/keyboards/coseyfannitutti/discipad/rules.mk +++ b/keyboards/coseyfannitutti/discipad/rules.mk @@ -17,10 +17,10 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -28,9 +28,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/coseyfannitutti/discipline/rules.mk b/keyboards/coseyfannitutti/discipline/rules.mk index 5666501ef5bf..ce71857a949a 100644 --- a/keyboards/coseyfannitutti/discipline/rules.mk +++ b/keyboards/coseyfannitutti/discipline/rules.mk @@ -20,10 +20,10 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -31,11 +31,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 65_ansi diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk index f390cfbe092e..b42558a30a14 100644 --- a/keyboards/coseyfannitutti/mullet/rules.mk +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/coseyfannitutti/mulletpad/rules.mk b/keyboards/coseyfannitutti/mulletpad/rules.mk index 282a4a36503b..1b9994cd32b7 100644 --- a/keyboards/coseyfannitutti/mulletpad/rules.mk +++ b/keyboards/coseyfannitutti/mulletpad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = numpad_5x4 diff --git a/keyboards/crawlpad/rules.mk b/keyboards/crawlpad/rules.mk index 00931610a1f1..1d4019b7af3b 100755 --- a/keyboards/crawlpad/rules.mk +++ b/keyboards/crawlpad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 67674518d9b7..16d05b589d62 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/cu24/rules.mk b/keyboards/cu24/rules.mk index fdfba55b1351..942bfa656e67 100644 --- a/keyboards/cu24/rules.mk +++ b/keyboards/cu24/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/cu75/keymaps/default/rules.mk b/keyboards/cu75/keymaps/default/rules.mk index fd26d69fb6ee..5eb2a0e80215 100644 --- a/keyboards/cu75/keymaps/default/rules.mk +++ b/keyboards/cu75/keymaps/default/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Disable keyboard backlight functionality diff --git a/keyboards/cutie_club/wraith/rules.mk b/keyboards/cutie_club/wraith/rules.mk index 1737728fc382..18055ba4740a 100644 --- a/keyboards/cutie_club/wraith/rules.mk +++ b/keyboards/cutie_club/wraith/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/dc01/arrow/rules.mk b/keyboards/dc01/arrow/rules.mk index 56a9cfc49c2f..6643ad789e7e 100644 --- a/keyboards/dc01/arrow/rules.mk +++ b/keyboards/dc01/arrow/rules.mk @@ -14,22 +14,22 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in CUSTOM_MATRIX = yes # Use custom matrix SRC += matrix.c \ diff --git a/keyboards/dc01/left/rules.mk b/keyboards/dc01/left/rules.mk index 9e34a0a8084d..aa2467eb6c35 100644 --- a/keyboards/dc01/left/rules.mk +++ b/keyboards/dc01/left/rules.mk @@ -14,22 +14,22 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = yes # Use custom matrix SRC += matrix.c \ i2c_master.c diff --git a/keyboards/dc01/numpad/rules.mk b/keyboards/dc01/numpad/rules.mk index 674ef1d026af..27d73e261834 100644 --- a/keyboards/dc01/numpad/rules.mk +++ b/keyboards/dc01/numpad/rules.mk @@ -14,22 +14,22 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in CUSTOM_MATRIX = yes # Use custom matrix SRC += matrix.c \ diff --git a/keyboards/dc01/right/rules.mk b/keyboards/dc01/right/rules.mk index 56a9cfc49c2f..6643ad789e7e 100644 --- a/keyboards/dc01/right/rules.mk +++ b/keyboards/dc01/right/rules.mk @@ -14,22 +14,22 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in CUSTOM_MATRIX = yes # Use custom matrix SRC += matrix.c \ diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk index a976360bf199..9504f60bf037 100644 --- a/keyboards/deltasplit75/rules.mk +++ b/keyboards/deltasplit75/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/dichotomy/rules.mk b/keyboards/dichotomy/rules.mk index 9ab4d56922ac..14dc4743591d 100755 --- a/keyboards/dichotomy/rules.mk +++ b/keyboards/dichotomy/rules.mk @@ -14,11 +14,11 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +#MOUSEKEY_ENABLE = yes # Mouse keys POINTING_DEVICE_ENABLE = yes # Generic Pointer, not as big as mouse keys hopefully. -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/diverge3/rules.mk b/keyboards/diverge3/rules.mk index 42ab5224af16..0b5ad749adf9 100644 --- a/keyboards/diverge3/rules.mk +++ b/keyboards/diverge3/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/divergetm2/rules.mk b/keyboards/divergetm2/rules.mk index 9a461edec90d..25f872bd05f7 100644 --- a/keyboards/divergetm2/rules.mk +++ b/keyboards/divergetm2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/dk60/rules.mk b/keyboards/dk60/rules.mk index 17ee5d96187c..b7518eee35ff 100644 --- a/keyboards/dk60/rules.mk +++ b/keyboards/dk60/rules.mk @@ -11,15 +11,15 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +# CONSOLE_ENABLE = yes # Console for debug # COMMAND_ENABLE = yes # Commands for debug and configuration KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/do60/rules.mk b/keyboards/do60/rules.mk index bd74db7f8258..73bb4f096b19 100644 --- a/keyboards/do60/rules.mk +++ b/keyboards/do60/rules.mk @@ -15,12 +15,12 @@ BOOTLOADER = atmel-dfu AUDIO_ENABLE = no # Audio output on port C6 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration COMMAND_ENABLE = no # Commands for debug and configuration -CONSOLE_ENABLE = no # Console for debug(+400) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug +EXTRAKEY_ENABLE = yes # Audio control and System control MIDI_ENABLE = no # MIDI controls -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/donutcables/scrabblepad/rules.mk b/keyboards/donutcables/scrabblepad/rules.mk index be6c7d9ac8f5..51717e2e229b 100644 --- a/keyboards/donutcables/scrabblepad/rules.mk +++ b/keyboards/donutcables/scrabblepad/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk index d719b7043fe6..d24fdc3a6ba8 100644 --- a/keyboards/doro67/multi/rules.mk +++ b/keyboards/doro67/multi/rules.mk @@ -13,10 +13,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -24,11 +24,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 65_ansi_blocker diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk index d88f6fcfe630..ca6817ffff5e 100644 --- a/keyboards/doro67/regular/rules.mk +++ b/keyboards/doro67/regular/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 65_ansi_blocker diff --git a/keyboards/doro67/rgb/rules.mk b/keyboards/doro67/rgb/rules.mk index 769edfb45dd8..8540dd61e031 100644 --- a/keyboards/doro67/rgb/rules.mk +++ b/keyboards/doro67/rgb/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs RGB_MATRIX_ENABLE = WS2812 LAYOUTS = 65_ansi_blocker diff --git a/keyboards/duck/eagle_viper/v2/rules.mk b/keyboards/duck/eagle_viper/v2/rules.mk index 9b3ffa8ac52c..71d318946efd 100644 --- a/keyboards/duck/eagle_viper/v2/rules.mk +++ b/keyboards/duck/eagle_viper/v2/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index 04d4f45695ac..b51285bd4f6c 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = yes SRC += indicator_leds.c \ diff --git a/keyboards/duck/lightsaver/rules.mk b/keyboards/duck/lightsaver/rules.mk index b6cb462ebbc3..8f2589139fcc 100644 --- a/keyboards/duck/lightsaver/rules.mk +++ b/keyboards/duck/lightsaver/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk index 7027fb1276ba..a750a8f00692 100644 --- a/keyboards/duck/octagon/v1/rules.mk +++ b/keyboards/duck/octagon/v1/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/octagon/v2/rules.mk b/keyboards/duck/octagon/v2/rules.mk index cd4d2c2fec7a..0b2b1244450e 100644 --- a/keyboards/duck/octagon/v2/rules.mk +++ b/keyboards/duck/octagon/v2/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/orion/v3/rules.mk b/keyboards/duck/orion/v3/rules.mk index c46cb7544836..7463d7da4576 100644 --- a/keyboards/duck/orion/v3/rules.mk +++ b/keyboards/duck/orion/v3/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dumbpad/rules.mk b/keyboards/dumbpad/rules.mk index a5df407da492..34bd05ee16bc 100644 --- a/keyboards/dumbpad/rules.mk +++ b/keyboards/dumbpad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes MOUSEKEY_ENABLE = yes diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index 7ed2571da0d1..e5e9b8465760 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/eco/keymaps/default/rules.mk b/keyboards/eco/keymaps/default/rules.mk index 83d1175db993..3898578a8230 100644 --- a/keyboards/eco/keymaps/default/rules.mk +++ b/keyboards/eco/keymaps/default/rules.mk @@ -4,10 +4,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk index 4fe5ec1b923f..7f7f20ed3b80 100644 --- a/keyboards/eco/rules.mk +++ b/keyboards/eco/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/emptystring/NQG/rules.mk b/keyboards/emptystring/NQG/rules.mk index 8ebed340ad0c..45f2f61551af 100644 --- a/keyboards/emptystring/NQG/rules.mk +++ b/keyboards/emptystring/NQG/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/ep/40/rules.mk b/keyboards/ep/40/rules.mk index 7e69544cf49c..862bcbf8f2f0 100644 --- a/keyboards/ep/40/rules.mk +++ b/keyboards/ep/40/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ep/96/rules.mk b/keyboards/ep/96/rules.mk index 7e69544cf49c..862bcbf8f2f0 100644 --- a/keyboards/ep/96/rules.mk +++ b/keyboards/ep/96/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ep/comsn/hs68/rules.mk b/keyboards/ep/comsn/hs68/rules.mk index 2aa56715575b..80c82b7c98a0 100644 --- a/keyboards/ep/comsn/hs68/rules.mk +++ b/keyboards/ep/comsn/hs68/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ep/comsn/mollydooker/rules.mk b/keyboards/ep/comsn/mollydooker/rules.mk index 4ef5023dfb35..e501469fcaf6 100644 --- a/keyboards/ep/comsn/mollydooker/rules.mk +++ b/keyboards/ep/comsn/mollydooker/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ep/comsn/tf_longeboye/rules.mk b/keyboards/ep/comsn/tf_longeboye/rules.mk index 5360459cf709..bd3cd09a9fd2 100644 --- a/keyboards/ep/comsn/tf_longeboye/rules.mk +++ b/keyboards/ep/comsn/tf_longeboye/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ergo42/rules.mk b/keyboards/ergo42/rules.mk index a02e3ca74e1b..7374ef0374ec 100644 --- a/keyboards/ergo42/rules.mk +++ b/keyboards/ergo42/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/ergodash/rules.mk b/keyboards/ergodash/rules.mk index d57e4ce13a44..de06b3427068 100644 --- a/keyboards/ergodash/rules.mk +++ b/keyboards/ergodash/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/ergodone/rules.mk b/keyboards/ergodone/rules.mk index aaeedb4311e9..f0008e48fd4a 100644 --- a/keyboards/ergodone/rules.mk +++ b/keyboards/ergodone/rules.mk @@ -16,10 +16,10 @@ BOOTLOADER = caterina # CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone UNICODE_ENABLE = yes # Unicode -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index fd8f5722d394..617ffea8579d 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -19,10 +19,10 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 4e39ac80818b..329ea8b9888d 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -63,10 +63,10 @@ BOOTLOADER = dfu DFU_ARGS = -d 1c11:b007 DFU_SUFFIX_ARGS = -p b007 -v 1c11 -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend diff --git a/keyboards/ergoinu/keymaps/default/rules.mk b/keyboards/ergoinu/keymaps/default/rules.mk index 92dde90ff1b5..b2eff12b042b 100644 --- a/keyboards/ergoinu/keymaps/default/rules.mk +++ b/keyboards/ergoinu/keymaps/default/rules.mk @@ -3,10 +3,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/ergoinu/rules.mk b/keyboards/ergoinu/rules.mk index 5c600bcd2e79..6f5debe00c35 100644 --- a/keyboards/ergoinu/rules.mk +++ b/keyboards/ergoinu/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/ergotravel/rules.mk b/keyboards/ergotravel/rules.mk index be7c8d990f8a..43f937981847 100644 --- a/keyboards/ergotravel/rules.mk +++ b/keyboards/ergotravel/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/espectro/rules.mk b/keyboards/espectro/rules.mk index 2d1c1eed098e..065014b97f25 100755 --- a/keyboards/espectro/rules.mk +++ b/keyboards/espectro/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/evil80/rules.mk b/keyboards/evil80/rules.mk index 683f89246090..46b76962b659 100644 --- a/keyboards/evil80/rules.mk +++ b/keyboards/evil80/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/exclusive/e65/rules.mk b/keyboards/exclusive/e65/rules.mk index 0b994a279b23..0f27d19ac7da 100644 --- a/keyboards/exclusive/e65/rules.mk +++ b/keyboards/exclusive/e65/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/exclusive/e6v2/le/rules.mk b/keyboards/exclusive/e6v2/le/rules.mk index e6cad9403399..0b5585663526 100644 --- a/keyboards/exclusive/e6v2/le/rules.mk +++ b/keyboards/exclusive/e6v2/le/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/exclusive/e6v2/le_bmc/rules.mk b/keyboards/exclusive/e6v2/le_bmc/rules.mk index ded651d3d8f7..9fe162b893e4 100644 --- a/keyboards/exclusive/e6v2/le_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/le_bmc/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -26,11 +26,11 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/exclusive/e6v2/oe/rules.mk b/keyboards/exclusive/e6v2/oe/rules.mk index e6cad9403399..0b5585663526 100644 --- a/keyboards/exclusive/e6v2/oe/rules.mk +++ b/keyboards/exclusive/e6v2/oe/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/exclusive/e6v2/oe_bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk index ded651d3d8f7..9fe162b893e4 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/oe_bmc/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -26,11 +26,11 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/exclusive/e7v1/rules.mk b/keyboards/exclusive/e7v1/rules.mk index 335e228bba58..7bd87e2d668b 100644 --- a/keyboards/exclusive/e7v1/rules.mk +++ b/keyboards/exclusive/e7v1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/fc660c/rules.mk b/keyboards/fc660c/rules.mk index b817b404fd80..3a3ac4e5d279 100644 --- a/keyboards/fc660c/rules.mk +++ b/keyboards/fc660c/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -# BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) +# BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug COMMAND_ENABLE ?= yes # Commands for debug and configuration NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/fc980c/rules.mk b/keyboards/fc980c/rules.mk index 596b96f1f451..54fadc826457 100644 --- a/keyboards/fc980c/rules.mk +++ b/keyboards/fc980c/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -# BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +# BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/felix/rules.mk b/keyboards/felix/rules.mk index 7371e3b1a03a..1bcaf0b5e6cb 100644 --- a/keyboards/felix/rules.mk +++ b/keyboards/felix/rules.mk @@ -14,21 +14,21 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_5x4 diff --git a/keyboards/fleuron/rules.mk b/keyboards/fleuron/rules.mk index 5695e68856b5..5724f3b98d48 100644 --- a/keyboards/fleuron/rules.mk +++ b/keyboards/fleuron/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/fortitude60/rules.mk b/keyboards/fortitude60/rules.mk index 1fdbfb016314..43d682cced04 100644 --- a/keyboards/fortitude60/rules.mk +++ b/keyboards/fortitude60/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/four_banger/rules.mk b/keyboards/four_banger/rules.mk index d37439a0f7bb..ae77f0a0e1c6 100644 --- a/keyboards/four_banger/rules.mk +++ b/keyboards/four_banger/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/foxlab/leaf60/hotswap/rules.mk b/keyboards/foxlab/leaf60/hotswap/rules.mk index 6c1ec4525c31..1239cee3fd29 100644 --- a/keyboards/foxlab/leaf60/hotswap/rules.mk +++ b/keyboards/foxlab/leaf60/hotswap/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/foxlab/leaf60/universal/rules.mk b/keyboards/foxlab/leaf60/universal/rules.mk index 1fcd0aa22d7b..9f572eb2e37b 100644 --- a/keyboards/foxlab/leaf60/universal/rules.mk +++ b/keyboards/foxlab/leaf60/universal/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 60_ansi 60_hhkb diff --git a/keyboards/fractal/rules.mk b/keyboards/fractal/rules.mk index 4894f1f4d86d..e5d540e0ad7c 100755 --- a/keyboards/fractal/rules.mk +++ b/keyboards/fractal/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/freyr/rules.mk b/keyboards/freyr/rules.mk index 1a00e299fa03..ee4b122eb496 100644 --- a/keyboards/freyr/rules.mk +++ b/keyboards/freyr/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs # Supported layouts LAYOUTS = tkl_ansi tkl_iso From e04c5edaaef88a94c3a0fca257fcc3d2e8e50bda Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed, 29 Jan 2020 17:23:55 -0500 Subject: [PATCH 158/331] Userspace and keymap updates (#8037) * Add PGUP,PGDN to keymaps * Enable VIA support on userspace for 1up60hse * Enable DZ60 VIA in rules * Enable Romac VIA in rules --- keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c | 4 ++-- keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk | 2 ++ layouts/community/60_ansi/stanrc85-ansi/keymap.c | 4 ++-- users/stanrc85/rules.mk | 9 +++++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c index 2e6a70483991..11d8048f138c 100644 --- a/keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/ansi/keymaps/stanrc85/keymap.c @@ -33,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN1_60] = LAYOUT_60_ansi( KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), diff --git a/keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk b/keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk index 1e3cebb14515..5e60b284ccdb 100644 --- a/keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk +++ b/keyboards/kingly_keys/romac/keymaps/stanrc85/rules.mk @@ -1 +1,3 @@ RGBLIGHT_ENABLE = yes +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index f478398901e3..6d4ceca40f38 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -33,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN1_60] = LAYOUT_60_ansi( KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 4b66f9692db0..c454058bd5b3 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -14,3 +14,12 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) # Include my fancy rgb functions source here SRC += layer_rgb.c endif + +ifeq ($(strip $(KEYBOARD)), 1upkeyboards/1up60hse) + VIA_ENABLE = yes + LTO_ENABLE = yes +endif +ifeq ($(strip $(KEYBOARD)), dz60) + VIA_ENABLE = yes + LTO_ENABLE = yes +endif \ No newline at end of file From 1249594cf0b09a45f28593c75f9d8f413ccf0424 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 29 Jan 2020 22:33:15 +0000 Subject: [PATCH 159/331] Refactor minidox to use split_common (#7924) * Initial refactor of minidox to split_common * post rebase fixes --- keyboards/minidox/config.h | 9 +- keyboards/minidox/eeprom-lefthand.eep | 2 - keyboards/minidox/eeprom-righthand.eep | 2 - keyboards/minidox/i2c.c | 162 ------------- keyboards/minidox/i2c.h | 49 ---- keyboards/minidox/matrix.c | 307 ------------------------- keyboards/minidox/minidox.h | 5 +- keyboards/minidox/readme.md | 66 +----- keyboards/minidox/rev1/config.h | 12 +- keyboards/minidox/rev1/rev1.h | 7 +- keyboards/minidox/rules.mk | 38 ++- keyboards/minidox/serial.c | 228 ------------------ keyboards/minidox/serial.h | 26 --- keyboards/minidox/split_util.c | 84 ------- keyboards/minidox/split_util.h | 20 -- 15 files changed, 32 insertions(+), 985 deletions(-) delete mode 100644 keyboards/minidox/eeprom-lefthand.eep delete mode 100644 keyboards/minidox/eeprom-righthand.eep delete mode 100644 keyboards/minidox/i2c.c delete mode 100644 keyboards/minidox/i2c.h delete mode 100644 keyboards/minidox/matrix.c delete mode 100644 keyboards/minidox/serial.c delete mode 100644 keyboards/minidox/serial.h delete mode 100644 keyboards/minidox/split_util.c delete mode 100644 keyboards/minidox/split_util.h diff --git a/keyboards/minidox/config.h b/keyboards/minidox/config.h index 7502983b6b76..b3d375656ff7 100644 --- a/keyboards/minidox/config.h +++ b/keyboards/minidox/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -61,9 +60,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#ifdef SUBPROJECT_rev1 - #include "rev1/config.h" -#endif - -#endif diff --git a/keyboards/minidox/eeprom-lefthand.eep b/keyboards/minidox/eeprom-lefthand.eep deleted file mode 100644 index e5a7bc1e5726..000000000000 --- a/keyboards/minidox/eeprom-lefthand.eep +++ /dev/null @@ -1,2 +0,0 @@ -:0F000000000000000000000000000000000001F0 -:00000001FF diff --git a/keyboards/minidox/eeprom-righthand.eep b/keyboards/minidox/eeprom-righthand.eep deleted file mode 100644 index 7ea44f52ef74..000000000000 --- a/keyboards/minidox/eeprom-righthand.eep +++ /dev/null @@ -1,2 +0,0 @@ -:0F000000000000000000000000000000000000F1 -:00000001FF diff --git a/keyboards/minidox/i2c.c b/keyboards/minidox/i2c.c deleted file mode 100644 index 084c890c405f..000000000000 --- a/keyboards/minidox/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/minidox/matrix.c b/keyboards/minidox/matrix.c deleted file mode 100644 index 27a38dca0260..000000000000 --- a/keyboards/minidox/matrix.c +++ /dev/null @@ -1,307 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - TX_RX_LED_INIT; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); -} - -uint8_t _matrix_scan(void) -{ - // Right hand is stored after the left in the matirx so, we need to offset it - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); - - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - int ret = _matrix_scan(); - - - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} - -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} diff --git a/keyboards/minidox/minidox.h b/keyboards/minidox/minidox.h index 6e8add206bb2..5d5ca9f5019e 100644 --- a/keyboards/minidox/minidox.h +++ b/keyboards/minidox/minidox.h @@ -1,10 +1,7 @@ -#ifndef MINIDOX_H -#define MINIDOX_H +#pragma once #ifdef KEYBOARD_minidox_rev1 #include "rev1.h" #endif #include "quantum.h" - -#endif \ No newline at end of file diff --git a/keyboards/minidox/readme.md b/keyboards/minidox/readme.md index 74afedc18b63..ec52e1f75793 100644 --- a/keyboards/minidox/readme.md +++ b/keyboards/minidox/readme.md @@ -1,75 +1,27 @@ -MiniDox -===== +# MiniDox ![MiniDox](http://i.imgur.com/iWb3yO0.jpg) A compact version of the ErgoDox -Keyboard Maintainer: That-Canadian -Hardware Supported: MiniDox PCB rev1 Pro Micro +* Keyboard Maintainer: That-Canadian +* Hardware Supported: MiniDox PCB rev1 Pro Micro Make example for this keyboard (after setting up your build environment): make minidox/rev1:default +Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)): + + make minidox/rev1:default:flash + See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Build Guide A build guide for putting together the MiniDox v1 can be found here: [MiniDox Build Log / Guide](http://imgur.com/a/vImo6) -Flashing -------- -Note: Most of this is copied from the Let's Split readme, because it is awesome - -From the root directory run `make PROJECT:KEYMAP:avrdude` for automatic serial port resolution and flashing. -Example: `make minidox/rev1:default:avrdude` - -Choosing which board to plug the USB cable into (choosing Master) --------- -Because the two boards are identical, the firmware has logic to differentiate the left and right board. - -It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. - -The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. - -The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. - -### Setting the left hand as master -If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. - -### Setting the right hand as master -If you always plug the usb cable into the right board, add an extra flag to your `config.h` -``` - #define MASTER_RIGHT -``` - -### Setting EE_hands to use either hands as master -If you define `EE_HANDS` in your `config.h`, you will need to set the -EEPROM for the left and right halves. - -The EEPROM is used to store whether the -half is left handed or right handed. This makes it so that the same firmware -file will run on both hands instead of having to flash left and right handed -versions of the firmware to each half. To flash the EEPROM file for the left -half run: -``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep" -// or the equivalent in dfu-programmer - -``` -and similarly for right half -``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:"./quantum/split_common/eeprom-righthand.eep" -// or the equivalent in dfu-programmer -``` - -NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) -After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. +## Choosing which board to plug the USB cable into (choosing Master) -Note that you need to program both halves, but you have the option of using -different keymaps for each half. You could program the left half with a QWERTY -layout and the right half with a Colemak layout using bootmagic's default layout option. -Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the -right half is connected. +Because the two boards are identical, the firmware has logic to differentiate the left and right board. It uses two strategies to figure things out, [EE_HANDS](https://docs.qmk.fm/#/feature_split_keyboard?id=handedness-by-eeprom) or [by define](https://docs.qmk.fm/#/feature_split_keyboard?id=handedness-by-define). See [setting-handedness](https://docs.qmk.fm/#/config_options?id=setting-handedness) for more information. diff --git a/keyboards/minidox/rev1/config.h b/keyboards/minidox/rev1/config.h index b7272bdb05cb..734ca562fd26 100644 --- a/keyboards/minidox/rev1/config.h +++ b/keyboards/minidox/rev1/config.h @@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H - -#include "../config.h" +#pragma once #define DEVICE_VER 0x0001 @@ -26,11 +23,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B2, B6, B4, B5 } #define MATRIX_COL_PINS { F4, D3, D2, D1, D4 } +#define SOFT_SERIAL_PIN D0 + #define USE_SERIAL //#define EE_HANDS - -#define I2C_MASTER_LEFT -//#define I2C_MASTER_RIGHT - -#endif diff --git a/keyboards/minidox/rev1/rev1.h b/keyboards/minidox/rev1/rev1.h index 5d32b05d41a0..bfa0e5fcc0e3 100644 --- a/keyboards/minidox/rev1/rev1.h +++ b/keyboards/minidox/rev1/rev1.h @@ -1,7 +1,4 @@ -#ifndef REV1_H -#define REV1_H - -#include "../minidox.h" +#pragma once #include "quantum.h" @@ -24,5 +21,3 @@ { k61, k62, k63, k64, k65 }, \ { ___, ___, k73, k74, k75 } \ } - -#endif diff --git a/keyboards/minidox/rules.mk b/keyboards/minidox/rules.mk index dd2affb3f911..1446c5144452 100644 --- a/keyboards/minidox/rules.mk +++ b/keyboards/minidox/rules.mk @@ -12,29 +12,25 @@ MCU = atmega32u4 BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= no # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. -USE_I2C ?= no +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs -CUSTOM_MATRIX = yes -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c +SPLIT_KEYBOARD = yes DEFAULT_FOLDER = minidox/rev1 diff --git a/keyboards/minidox/serial.c b/keyboards/minidox/serial.c deleted file mode 100644 index 74bcbb6bf6e2..000000000000 --- a/keyboards/minidox/serial.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/minidox/serial.h b/keyboards/minidox/serial.h deleted file mode 100644 index 15fe4db7b4c6..000000000000 --- a/keyboards/minidox/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/minidox/split_util.c b/keyboards/minidox/split_util.c deleted file mode 100644 index 39639c3b4bd8..000000000000 --- a/keyboards/minidox/split_util.c +++ /dev/null @@ -1,84 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { -#ifdef USE_I2C - i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { -#ifdef USE_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); -void keyboard_slave_loop(void); - -void matrix_master_OLED_init (void); - -#endif From 6d5812a86c7eaa3e84d8a69126aa04195713be62 Mon Sep 17 00:00:00 2001 From: Cody Bender <50554676+cfbender@users.noreply.github.com> Date: Thu, 30 Jan 2020 02:16:11 -0700 Subject: [PATCH 160/331] [Keyboard] Add Ergosaurus Support (#8013) Initialize config * Update matrix size * Update Keymap * Rename files to remove hyphen * Rename board and folders * Fix ergosaurus.h typo * Fix ergosaurus.h layout matrix * Update column pins * Fixed ergosaurus * Add Reggie layout * Update Ergo keymap * Update with fixes from PR #8013 * Fix KeyHive link * Remove config.h and extra whitespace from README * Update PID, README and rules spacing * Update rules.mk --- keyboards/ergosaurus/config.h | 251 ++++++++++++++++++ keyboards/ergosaurus/ergosaurus.c | 17 ++ keyboards/ergosaurus/ergosaurus.h | 38 +++ keyboards/ergosaurus/info.json | 82 ++++++ keyboards/ergosaurus/keymaps/default/keymap.c | 47 ++++ .../ergosaurus/keymaps/default/readme.md | 3 + keyboards/ergosaurus/readme.md | 15 ++ keyboards/ergosaurus/rules.mk | 33 +++ 8 files changed, 486 insertions(+) create mode 100644 keyboards/ergosaurus/config.h create mode 100644 keyboards/ergosaurus/ergosaurus.c create mode 100644 keyboards/ergosaurus/ergosaurus.h create mode 100644 keyboards/ergosaurus/info.json create mode 100644 keyboards/ergosaurus/keymaps/default/keymap.c create mode 100644 keyboards/ergosaurus/keymaps/default/readme.md create mode 100644 keyboards/ergosaurus/readme.md create mode 100644 keyboards/ergosaurus/rules.mk diff --git a/keyboards/ergosaurus/config.h b/keyboards/ergosaurus/config.h new file mode 100644 index 000000000000..c33972c1b8b8 --- /dev/null +++ b/keyboards/ergosaurus/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 cfbender + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xBEEF +#define PRODUCT_ID 0xFEED +#define DEVICE_VER 0x0001 +#define MANUFACTURER reggalicious +#define PRODUCT ergosaurus +#define DESCRIPTION An ergo Alice clone from Reggalicious + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { B5, B4, E6, D4, F6, D3, D2, F4, F5 } +#define MATRIX_COL_PINS \ + { D7, C6, D0, D1, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ergosaurus/ergosaurus.c b/keyboards/ergosaurus/ergosaurus.c new file mode 100644 index 000000000000..4c31455128d6 --- /dev/null +++ b/keyboards/ergosaurus/ergosaurus.c @@ -0,0 +1,17 @@ + +/* Copyright 2019 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "ergosaurus.h" diff --git a/keyboards/ergosaurus/ergosaurus.h b/keyboards/ergosaurus/ergosaurus.h new file mode 100644 index 000000000000..c78a2db32bec --- /dev/null +++ b/keyboards/ergosaurus/ergosaurus.h @@ -0,0 +1,38 @@ +/* Copyright 2019 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define KNO KC_NO + +#define LAYOUT( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K47, \ + K60, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K67, \ + K80, K81, K82, K83, K84, K85, K87 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, KNO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, KNO, KNO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KNO, K71, K72, K73, K74, K75, K76, KNO }, \ + { K80, K81, K82, K83, K84, K85, KNO, K87 } \ +} diff --git a/keyboards/ergosaurus/info.json b/keyboards/ergosaurus/info.json new file mode 100644 index 000000000000..c43af511b188 --- /dev/null +++ b/keyboards/ergosaurus/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Ergosaurus", + "maintainer": "cfbender", + "width": 19.75, + "height": 5.25, + "layouts": { + "LAYOUT_default": { + "layout": [ + {"label":"`", "x":0.5, "y":0}, + {"label":"Esc", "x":1.75, "y":0.25}, + {"label":"1", "x":2.75, "y":0.25}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0.25}, + {"label":"4", "x":5.75, "y":0.25}, + {"label":"5", "x":6.75, "y":0.25}, + {"label":"6", "x":7.75, "y":0.25}, + {"label":"7", "x":11, "y":0.25}, + {"label":"8", "x":12, "y":0.25}, + {"label":"9", "x":13, "y":0.25}, + {"label":"0", "x":14, "y":0.25}, + {"label":"-", "x":15, "y":0}, + {"label":"=", "x":16, "y":0.25}, + {"label":"|", "x":17, "y":0.25}, + {"label":"Del", "x":18, "y":0.25}, + + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1.25, "w":1.5}, + {"label":"Q", "x":3, "y":1.25}, + {"label":"W", "x":4.25, "y":1.25}, + {"label":"E", "x":5.25, "y":1.25}, + {"label":"R", "x":6.25, "y":1.25}, + {"label":"T", "x":7.25, "y":1.25}, + {"label":"Y", "x":10.5, "y":1.25}, + {"label":"U", "x":11.5, "y":1.25}, + {"label":"I", "x":12.5, "y":1.25}, + {"label":"O", "x":13.5, "y":1.25}, + {"label":"P", "x":14.75, "y":1.25}, + {"label":"{", "x":15.75, "y":1.25}, + {"label":"}", "x":16.75, "y":1.25}, + {"label":"Backspace", "x":17.75, "y":1.25, "w":1.5}, + + {"label":"PgDn", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2.25, "w":1.75}, + {"label":"A", "x":3.25, "y":2.25}, + {"label":"S", "x":4.5, "y":2.25}, + {"label":"D", "x":5.5, "y":2.25}, + {"label":"F", "x":6.5, "y":2.25}, + {"label":"G", "x":7.5, "y":2.25}, + {"label":"H", "x":10.75, "y":2.25}, + {"label":"J", "x":11.75, "y":2.25}, + {"label":"K", "x":12.75, "y":2.25}, + {"label":"L", "x":13.75, "y":2.25}, + {"label":":", "x":15.25, "y":2.25}, + {"label":"\"", "x":16.25, "y":2.25}, + {"label":"Enter", "x":17.25, "y":2.25, "w":2.25}, + + {"label":"Shift", "x":1.5, "y":3.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":3.25}, + {"label":"X", "x":5, "y":3.25}, + {"label":"C", "x":6, "y":3.25}, + {"label":"V", "x":7, "y":3.25}, + {"label":"B", "x":8, "y":3.25}, + {"label":"B", "x":10.25, "y":3.25}, + {"label":"N", "x":11.25, "y":3.25}, + {"label":"M", "x":12.25, "y":3.25}, + {"label":"<", "x":13.25, "y":3.25}, + {"label":">", "x":15, "y":3.25}, + {"label":"?", "x":16, "y":3.25}, + {"label":"Shift", "x":17, "y":3.25, "w":1.75}, + {"label":"Fn", "x":18.75, "y":3.25}, + + {"label":"Os", "x":1.5, "y":4.25, "w":1.5}, + {"label":"Alt", "x":5, "y":4.25, "w":1.5}, + {"label":"Enter", "x":6.5, "y":4.25, "w":2}, + {"label":"Fn", "x":8.5, "y":4.25}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.25}, + {"label":"Alt", "x":12.5, "y":4.25, "w":1.5}, + {"label":"Ctrl", "x":18, "y":4.25, "w":1.5} + ] + } + } +} diff --git a/keyboards/ergosaurus/keymaps/default/keymap.c b/keyboards/ergosaurus/keymaps/default/keymap.c new file mode 100644 index 000000000000..565906e03858 --- /dev/null +++ b/keyboards/ergosaurus/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define LOWER 1 +#define RAISE 2 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + KC_GRV, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(LOWER), + KC_LGUI, KC_LALT, KC_ENT, MO(RAISE), KC_SPC, KC_RALT, KC_RCTL + ), + + [LOWER] = LAYOUT( + _______, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/ergosaurus/keymaps/default/readme.md b/keyboards/ergosaurus/keymaps/default/readme.md new file mode 100644 index 000000000000..acd1216c796a --- /dev/null +++ b/keyboards/ergosaurus/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for ergosaurus + +![ergosaurus_default](https://imgur.com/gsjk8yD.jpg) diff --git a/keyboards/ergosaurus/readme.md b/keyboards/ergosaurus/readme.md new file mode 100644 index 000000000000..cb1a02318ba6 --- /dev/null +++ b/keyboards/ergosaurus/readme.md @@ -0,0 +1,15 @@ +# Ergosaurus + +![ergosaurus](https://i.imgur.com/9yLCcpH.jpg) + +An Arduino Pro Micro driven Alice-clone PCB. Supports all Alice-style cases, given the clearance for the Pro Micro. Ergosaurus specific acrylic case files available [here](https://github.com/cfbender/Lubrigante). + +* Keyboard Maintainer: [cfbender](https://github.com/cfbender) +* Hardware Supported: Ergosaurus PCB, Pro Micro +* Hardware Availability: [KeyHive](https://keyhive.xyz) + +Make example for this keyboard (after setting up your build environment): + + make ergosaurus:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ergosaurus/rules.mk b/keyboards/ergosaurus/rules.mk new file mode 100644 index 000000000000..b70e8d49fc44 --- /dev/null +++ b/keyboards/ergosaurus/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 0f9982c53e9dc9b1f35384842ef93e86378d169b Mon Sep 17 00:00:00 2001 From: Bryan Arendt Date: Thu, 30 Jan 2020 04:18:45 -0500 Subject: [PATCH 161/331] [Keyboard] Adds ogre ergo single (#8012) * Adds ogre ergo single (non-split) version * use generic pids --- keyboards/ogre/ergo_single/config.h | 45 +++++++++++++++++++ keyboards/ogre/ergo_single/ergo_single.c | 17 +++++++ keyboards/ogre/ergo_single/ergo_single.h | 39 ++++++++++++++++ .../ogre/ergo_single/keymaps/default/keymap.c | 41 +++++++++++++++++ .../ergo_single/keymaps/default/readme.md | 1 + keyboards/ogre/ergo_single/readme.md | 15 +++++++ keyboards/ogre/ergo_single/rules.mk | 33 ++++++++++++++ keyboards/ogre/ergo_split/config.h | 6 +-- 8 files changed, 194 insertions(+), 3 deletions(-) create mode 100644 keyboards/ogre/ergo_single/config.h create mode 100644 keyboards/ogre/ergo_single/ergo_single.c create mode 100644 keyboards/ogre/ergo_single/ergo_single.h create mode 100644 keyboards/ogre/ergo_single/keymaps/default/keymap.c create mode 100644 keyboards/ogre/ergo_single/keymaps/default/readme.md create mode 100644 keyboards/ogre/ergo_single/readme.md create mode 100644 keyboards/ogre/ergo_single/rules.mk diff --git a/keyboards/ogre/ergo_single/config.h b/keyboards/ogre/ergo_single/config.h new file mode 100644 index 000000000000..68e94a11a422 --- /dev/null +++ b/keyboards/ogre/ergo_single/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 ctrlshiftba + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ctrlshiftba +#define PRODUCT ergo_single +#define DESCRIPTION a keycap friendly ergo. the non-split version + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B6 +#define RGBLED_NUM 14 +#define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, 6, 13, 12,11, 10, 9, 8, 7} +#define RGBLIGHT_ANIMATIONS +#define DEBOUNCE 5 diff --git a/keyboards/ogre/ergo_single/ergo_single.c b/keyboards/ogre/ergo_single/ergo_single.c new file mode 100644 index 000000000000..b48b0a02e252 --- /dev/null +++ b/keyboards/ogre/ergo_single/ergo_single.c @@ -0,0 +1,17 @@ +/* Copyright 2020 ctrlshiftba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ergo_single.h" diff --git a/keyboards/ogre/ergo_single/ergo_single.h b/keyboards/ogre/ergo_single/ergo_single.h new file mode 100644 index 000000000000..f8f9ddf65f72 --- /dev/null +++ b/keyboards/ogre/ergo_single/ergo_single.h @@ -0,0 +1,39 @@ +/* Copyright 2020 ctrlshiftba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k63, k00, k10, k20, k30, k40, k50, k60, k65, k55, k45, k35, k25, k15, k05, k68, \ + k01, k11, k21, k31, k41, k51, k61, k66, k56, k46, k36, k26, k16, k06, \ + k02, k12, k22, k32, k42, k52, k62, k67, k57, k47, k37, k27, k17, k07, \ + k03, k13, k23, k33, k43, k53, k58, k48, k38, k28, k18, k08, \ + k04, k14, k24, k34, k44, k54, k64, k69, k59, k49, k39, k29, k19, k09 \ +) \ +{ \ + { k00, k10, k20, k30, k40, k50, k60 }, \ + { k01, k11, k21, k31, k41, k51, k61 }, \ + { k02, k12, k22, k32, k42, k52, k62 }, \ + { k03, k13, k23, k33, k43, k53, k63 }, \ + { k04, k14, k24, k34, k44, k54, k64 }, \ + { k05, k15, k25, k35, k45, k55, k65 }, \ + { k06, k16, k26, k36, k46, k56, k66 }, \ + { k07, k17, k27, k37, k47, k57, k67 }, \ + { k08, k18, k28, k38, k48, k58, k68 }, \ + { k09, k19, k29, k39, k49, k59, k69 }, \ +} diff --git a/keyboards/ogre/ergo_single/keymaps/default/keymap.c b/keyboards/ogre/ergo_single/keymaps/default/keymap.c new file mode 100644 index 000000000000..94e725791e3d --- /dev/null +++ b/keyboards/ogre/ergo_single/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 ctrlshiftba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define TP_Z MT(MOD_LCTL, KC_Z) +#define TP_X MT(MOD_LGUI, KC_X) +#define TP_GR MT(MOD_LCTL, KC_GRV) +#define TP_SPC LT(1, KC_SPC) +#define TP_ENT LT(1, KC_ENT) +#define TP_QUOT MT(MOD_RGUI, KC_QUOT) +#define TP_RCTRL MT(MOD_RCTL, KC_RBRC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGDN, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TP_QUOT, + KC_LSFT, TP_Z, TP_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + TP_GR, KC_LALT, KC_LEFT, KC_RGHT, TP_SPC, KC_SPC, KC_BSPC, KC_RALT, KC_ENT, TP_ENT, KC_DOWN, KC_UP, KC_LBRC, TP_RCTRL + ), + [1] = LAYOUT( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_INS, KC_HOME, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_M_P, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MENU, _______ + ), +}; diff --git a/keyboards/ogre/ergo_single/keymaps/default/readme.md b/keyboards/ogre/ergo_single/keymaps/default/readme.md new file mode 100644 index 000000000000..a63ad5baa23b --- /dev/null +++ b/keyboards/ogre/ergo_single/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for ergo_single diff --git a/keyboards/ogre/ergo_single/readme.md b/keyboards/ogre/ergo_single/readme.md new file mode 100644 index 000000000000..d39714a6f632 --- /dev/null +++ b/keyboards/ogre/ergo_single/readme.md @@ -0,0 +1,15 @@ +# ogre ergo +## a keycap friendly ergo +![ogre_ergo](https://i.imgur.com/27rF0jj.jpg) + +The ogre ergo is a ergodox inspired keyboard that is a keycap friendly ergo supporting a wide variety of keycap layout possiblities. Its can be built as either a split or single keyboard. + +* Keyboard Maintainer: [ctrlshiftba](https://github.com/ctrlshiftbryan) +* Hardware Supported: the ogre ergo pcb +* Hardware Availability: https://ctrlshiftba.com/ + +Make example for this keyboard (after setting up your build environment): + + make ogre/ergo_single:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ogre/ergo_single/rules.mk b/keyboards/ogre/ergo_single/rules.mk new file mode 100644 index 000000000000..cd209a9c4e88 --- /dev/null +++ b/keyboards/ogre/ergo_single/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +SPLIT_KEYBOARD = no diff --git a/keyboards/ogre/ergo_split/config.h b/keyboards/ogre/ergo_split/config.h index d92c2538bf91..05aff980951e 100644 --- a/keyboards/ogre/ergo_split/config.h +++ b/keyboards/ogre/ergo_split/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x1209 -#define PRODUCT_ID 0x095E -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 #define MANUFACTURER ctrlshiftba #define PRODUCT ergo_split #define DESCRIPTION a keycap friendly ergo. the split version From 0968cf8b00ee1ee98edcd37b83573a327b2e8e29 Mon Sep 17 00:00:00 2001 From: Addison Cole <36283115+addisoncole@users.noreply.github.com> Date: Thu, 30 Jan 2020 01:45:27 -0800 Subject: [PATCH 162/331] Updates cKeys/theDora README with explicit flashing instructions (#8016) * adds to theDora readme for more explicit directions on flashing, with links and how to enter bootloader mode. * fmt * Corrects language of steps for loading firmware * Update keyboards/ckeys/thedora/readme.md --- keyboards/ckeys/thedora/readme.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/keyboards/ckeys/thedora/readme.md b/keyboards/ckeys/thedora/readme.md index 920162075baf..273811d0fafc 100755 --- a/keyboards/ckeys/thedora/readme.md +++ b/keyboards/ckeys/thedora/readme.md @@ -32,7 +32,15 @@ All cKeys PCBs are open source. However, this one has not been posted yet becaus If you want to reflash the pre-installed firmware, use the `.bin` file for Proton C. Flash with the QMK Toolbox or via the command line. -Building for Proton C: `make ckeys/thedora:default` +**Building for Proton C:** +`make ckeys/thedora:default` + +**Search for Bootloader Device:** +`make ckeys/thedora:default:flash` +You will begin seeing output of the host searching for the bootloader device, `ERROR: Bootloader not found. Trying again in 5s.` + +**Enter DFU-Bootloader Mode:** +Reset the controller. Press [ADMIN](https://ckeys.org/slides/exboard/assets/player/keynotedhtmlplayer#21) + [RESET](https://ckeys.org/slides/exboard/assets/player/keynotedhtmlplayer#25) or, if accessible, press the reset button on the Proton C microcontroller. ## Default Layout From e57af8db0d9088d819f76cddbd6da851ccd1eab4 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 30 Jan 2020 10:48:30 +0000 Subject: [PATCH 163/331] Fix 'Makefile:560: keyboards//rev1/rules.mk: No such file or directory' (#8042) --- keyboards/ergoslab/rev1/rules.mk | 3 +++ keyboards/getta25/rev1/rules.mk | 3 +++ keyboards/treadstone48/rev1/rules.mk | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 keyboards/ergoslab/rev1/rules.mk create mode 100644 keyboards/getta25/rev1/rules.mk create mode 100644 keyboards/treadstone48/rev1/rules.mk diff --git a/keyboards/ergoslab/rev1/rules.mk b/keyboards/ergoslab/rev1/rules.mk new file mode 100644 index 000000000000..fff00a1b5115 --- /dev/null +++ b/keyboards/ergoslab/rev1/rules.mk @@ -0,0 +1,3 @@ +# Revision Specific Build Options +# change yes to no to disable +# diff --git a/keyboards/getta25/rev1/rules.mk b/keyboards/getta25/rev1/rules.mk new file mode 100644 index 000000000000..fff00a1b5115 --- /dev/null +++ b/keyboards/getta25/rev1/rules.mk @@ -0,0 +1,3 @@ +# Revision Specific Build Options +# change yes to no to disable +# diff --git a/keyboards/treadstone48/rev1/rules.mk b/keyboards/treadstone48/rev1/rules.mk new file mode 100644 index 000000000000..fff00a1b5115 --- /dev/null +++ b/keyboards/treadstone48/rev1/rules.mk @@ -0,0 +1,3 @@ +# Revision Specific Build Options +# change yes to no to disable +# From c66a4a983106f6a895088dd02d0e8fe92dfd1559 Mon Sep 17 00:00:00 2001 From: Alberto Grespan Date: Thu, 30 Jan 2020 06:52:35 -0400 Subject: [PATCH 164/331] [Keyboard] WhiteFox vanilla layout (#8043) * Add the Whitefox vanilla layout Initial commit for whitefox vanilla keymap Fix the mapped layout to match vanilla Cleanup vanilla default Rework the info file Remove vanilla keymap as we don't really need this --- keyboards/whitefox/info.json | 74 ++++++++++++++++++++++++++++++++++- keyboards/whitefox/whitefox.h | 32 +++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) diff --git a/keyboards/whitefox/info.json b/keyboards/whitefox/info.json index 5efe2910fc5a..fc2ffea12f37 100644 --- a/keyboards/whitefox/info.json +++ b/keyboards/whitefox/info.json @@ -14,6 +14,78 @@ "LAYOUT_aria": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - } + }, + "LAYOUT_vanilla": { + "layout": [ + {"label": "~","x": 0,"y": 0}, + {"label": "!","x": 1,"y": 0}, + {"label": "@","x": 2,"y": 0}, + {"label": "#","x": 3,"y": 0}, + {"label": "$","x": 4,"y": 0}, + {"label": "%","x": 5,"y": 0}, + {"label": "^","x": 6,"y": 0}, + {"label": "&","x": 7,"y": 0}, + {"label": "*","x": 8,"y": 0}, + {"label": "(","x": 9,"y": 0}, + {"label": ")","x": 10,"y": 0}, + {"label": "_","x": 11,"y": 0}, + {"label": "+","x": 12,"y": 0}, + {"label": "Backspace","x": 13,"y": 0,"w": 2}, + {"x": 15,"y": 0}, + {"label": "Tab","x": 0,"y": 1,"w": 1.5}, + {"label": "Q","x": 1.5,"y": 1}, + {"label": "W","x": 2.5,"y": 1}, + {"label": "E","x": 3.5,"y": 1}, + {"label": "R","x": 4.5,"y": 1}, + {"label": "T","x": 5.5,"y": 1}, + {"label": "Y","x": 6.5,"y": 1}, + {"label": "U","x": 7.5,"y": 1}, + {"label": "I","x": 8.5,"y": 1}, + {"label": "O","x": 9.5,"y": 1}, + {"label": "P","x": 10.5,"y": 1}, + {"label": "{","x": 11.5,"y": 1}, + {"label": "}","x": 12.5,"y": 1}, + {"label": "|","x": 13.5,"y": 1,"w": 1.5}, + {"x": 15,"y": 1}, + {"label": "Caps Lock","x": 0,"y": 2,"w": 1.75}, + {"label": "A","x": 1.75,"y": 2}, + {"label": "S","x": 2.75,"y": 2}, + {"label": "D","x": 3.75,"y": 2}, + {"label": "F","x": 4.75,"y": 2}, + {"label": "G","x": 5.75,"y": 2}, + {"label": "H","x": 6.75,"y": 2}, + {"label": "J","x": 7.75,"y": 2}, + {"label": "K","x": 8.75,"y": 2}, + {"label": "L","x": 9.75,"y": 2}, + {"label": ":","x": 10.75,"y": 2}, + {"label": "\"","x": 11.75,"y": 2}, + {"label": "Enter","x": 12.75,"y": 2,"w": 2.25}, + {"x": 15,"y": 2}, + {"label": "Shift","x": 0,"y": 3,"w": 2.25}, + {"label": "Z","x": 2.25,"y": 3}, + {"label": "X","x": 3.25,"y": 3}, + {"label": "C","x": 4.25,"y": 3}, + {"label": "V","x": 5.25,"y": 3}, + {"label": "B","x": 6.25,"y": 3}, + {"label": "N","x": 7.25,"y": 3}, + {"label": "M","x": 8.25,"y": 3}, + {"label": "<","x": 9.25,"y": 3}, + {"label": ">","x": 10.25,"y": 3}, + {"label": "?","x": 11.25,"y": 3}, + {"label": "Shift","x": 12.25,"y": 3,"w": 1.75}, + {"x": 14,"y": 3}, + {"x": 15,"y": 3}, + {"label": "Ctrl","x": 0,"y": 4,"w": 1.25}, + {"label": "Win","x": 1.25,"y": 4,"w": 1.25}, + {"label": "Alt","x": 2.5,"y": 4,"w": 1.25}, + {"x": 3.75,"y": 4,"w": 6.25}, + {"label": "Alt","x": 10,"y": 4,"w": 1}, + {"label": "Win","x": 11,"y": 4,"w": 1}, + {"label": "Ctrl","x": 12,"y": 4,"w": 1}, + {"x": 13,"y": 4}, + {"x": 14,"y": 4}, + {"x": 15,"y": 4} + ] + } } } diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h index 7791dac67ca6..0c19e2daa4ae 100644 --- a/keyboards/whitefox/whitefox.h +++ b/keyboards/whitefox/whitefox.h @@ -134,4 +134,36 @@ along with this program. If not, see . { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ } +/* Vanilla WhiteFox + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp| `| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| + * |---------------------------------------------------------------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt|GUI|Ctl|Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + +#define LAYOUT_vanilla( \ + K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K51, K61, \ + K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ + K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K84, K05, \ + K15, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ + K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, KC_NO, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ +} + #endif From 0f7d294ac304d6ef8fb6d83c1da80bb4c753a01f Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Thu, 30 Jan 2020 13:47:48 -0500 Subject: [PATCH 165/331] Remove filesize changes from default-ish rules.mk files, sans handwired (#8040) --- keyboards/geekboards/tester/rules.mk | 10 +++++----- keyboards/gergo/keymaps/colemak/rules.mk | 2 +- keyboards/gergo/keymaps/default/rules.mk | 2 +- keyboards/gergo/keymaps/oled/rules.mk | 2 +- keyboards/gh60/revc/rules.mk | 8 ++++---- keyboards/gh60/satan/keymaps/colemak/rules.mk | 8 ++++---- keyboards/gh60/satan/keymaps/default/rules.mk | 8 ++++---- keyboards/gh60/satan/keymaps/isoHHKB/rules.mk | 8 ++++---- .../gh60/satan/keymaps/iso_split_rshift/rules.mk | 12 ++++++------ keyboards/gh60/satan/keymaps/midi/rules.mk | 10 +++++----- keyboards/gh60/satan/rules.mk | 12 ++++++------ keyboards/gh80_3000/rules.mk | 8 ++++---- keyboards/gingham/rules.mk | 12 ++++++------ keyboards/gonnerd/keymaps/default/rules.mk | 8 ++++---- keyboards/gonnerd/keymaps/tkl/rules.mk | 8 ++++---- keyboards/gonnerd/rules.mk | 8 ++++---- keyboards/gray_studio/cod67/rules.mk | 10 +++++----- keyboards/gray_studio/space65/rules.mk | 12 ++++++------ keyboards/grid600/press/rules.mk | 12 ++++++------ keyboards/gskt00/rules.mk | 8 ++++---- keyboards/hadron/ver2/rules.mk | 8 ++++---- keyboards/halberd/rules.mk | 12 ++++++------ keyboards/hecomi/alpha/rules.mk | 12 ++++++------ keyboards/hecomi/rules.mk | 12 ++++++------ keyboards/helix/pico/keymaps/default/rules.mk | 2 +- keyboards/helix/rules.mk | 8 ++++---- keyboards/hhkb/rules.mk | 8 ++++---- keyboards/hid_liber/rules.mk | 10 +++++----- keyboards/hifumi/rules.mk | 8 ++++---- keyboards/hineybush/h87a/rules.mk | 10 +++++----- keyboards/hineybush/hineyg80/rules.mk | 12 ++++++------ keyboards/honeycomb/rules.mk | 8 ++++---- keyboards/hotdox/rules.mk | 8 ++++---- keyboards/hs60/v1/rules.mk | 10 +++++----- keyboards/idobo/rules.mk | 12 ++++++------ keyboards/illuminati/is0/rules.mk | 12 ++++++------ keyboards/ivy/rules.mk | 8 ++++---- keyboards/jc65/v32u4/rules.mk | 8 ++++---- keyboards/jd40/rules.mk | 8 ++++---- keyboards/jd45/rules.mk | 8 ++++---- keyboards/jj40/rules.mk | 12 ++++++------ keyboards/jj4x4/rules.mk | 12 ++++++------ keyboards/jnao/rules.mk | 12 ++++++------ keyboards/kagamidget/rules.mk | 12 ++++++------ keyboards/katana60/rules.mk | 10 +++++----- keyboards/kbdfans/kbd19x/rules.mk | 12 ++++++------ keyboards/kbdfans/kbd4x/rules.mk | 12 ++++++------ keyboards/kbdfans/kbd66/rules.mk | 10 +++++----- keyboards/kbdfans/kbd67/hotswap/rules.mk | 12 ++++++------ keyboards/kbdfans/kbd67/rev1/rules.mk | 12 ++++++------ keyboards/kbdfans/kbd67/rev2/rules.mk | 12 ++++++------ keyboards/kbdfans/kbd6x/rules.mk | 12 ++++++------ keyboards/kbdfans/kbd75/rev1/rules.mk | 8 ++++---- keyboards/kbdfans/kbd75/rev2/rules.mk | 8 ++++---- keyboards/kbdfans/kbd8x/rules.mk | 10 +++++----- keyboards/kbdfans/kbdpad_mk2/rules.mk | 12 ++++++------ keyboards/kc60/keymaps/ws2812/rules.mk | 8 ++++---- keyboards/kc60/rules.mk | 8 ++++---- keyboards/kc60se/rules.mk | 10 +++++----- keyboards/keebio/bdn9/rules.mk | 12 ++++++------ keyboards/keebio/bfo9000/rules.mk | 8 ++++---- keyboards/keebio/chocopad/rules.mk | 8 ++++---- keyboards/keebio/dilly/rules.mk | 8 ++++---- keyboards/keebio/ergodicity/rules.mk | 12 ++++++------ keyboards/keebio/fourier/rules.mk | 8 ++++---- keyboards/keebio/iris/rev1/rules.mk | 8 ++++---- keyboards/keebio/iris/rev1_led/rules.mk | 8 ++++---- keyboards/keebio/iris/rev2/rules.mk | 8 ++++---- keyboards/keebio/iris/rev3/rules.mk | 8 ++++---- keyboards/keebio/iris/rev4/rules.mk | 8 ++++---- keyboards/keebio/laplace/rules.mk | 8 ++++---- keyboards/keebio/levinson/keymaps/steno/rules.mk | 4 ++-- keyboards/keebio/levinson/rules.mk | 8 ++++---- keyboards/keebio/nyquist/rev1/rules.mk | 8 ++++---- keyboards/keebio/nyquist/rev2/rules.mk | 8 ++++---- keyboards/keebio/nyquist/rev3/rules.mk | 8 ++++---- keyboards/keebio/quefrency/rules.mk | 8 ++++---- keyboards/keebio/rorschach/rules.mk | 8 ++++---- keyboards/keebio/tragicforce68/rules.mk | 8 ++++---- keyboards/keebio/tukey/rules.mk | 12 ++++++------ keyboards/keebio/viterbi/rules.mk | 8 ++++---- keyboards/keebio/wavelet/rules.mk | 8 ++++---- keyboards/keycapsss/o4l_5x12/rules.mk | 8 ++++---- keyboards/keyhive/maypad/rules.mk | 12 ++++++------ keyboards/kinesis/keymaps/carpalx/rules.mk | 8 ++++---- keyboards/kinesis/keymaps/default/rules.mk | 8 ++++---- keyboards/kinesis/keymaps/default_pretty/rules.mk | 8 ++++---- keyboards/kinesis/keymaps/dvorak/rules.mk | 8 ++++---- keyboards/kinesis/rules.mk | 8 ++++---- keyboards/kingly_keys/little_foot/rules.mk | 8 ++++---- keyboards/kingly_keys/romac/rules.mk | 8 ++++---- keyboards/kingly_keys/romac_plus/rules.mk | 10 +++++----- keyboards/kingly_keys/ropro/rules.mk | 8 ++++---- keyboards/kingly_keys/smd_milk/rules.mk | 8 ++++---- keyboards/kingly_keys/soap/rules.mk | 8 ++++---- keyboards/kira75/rules.mk | 10 +++++----- keyboards/kmac/rules.mk | 10 +++++----- keyboards/kmini/rules.mk | 10 +++++----- keyboards/knops/mini/rules.mk | 10 +++++----- keyboards/kona_classic/keymaps/ansi/rules.mk | 10 +++++----- keyboards/kona_classic/keymaps/ansi_arrows/rules.mk | 10 +++++----- .../kona_classic/keymaps/ansi_arrows_lcap/rules.mk | 10 +++++----- keyboards/kona_classic/keymaps/ansi_split/rules.mk | 10 +++++----- .../kona_classic/keymaps/ansi_split_arrows/rules.mk | 10 +++++----- keyboards/kona_classic/keymaps/default/rules.mk | 10 +++++----- keyboards/kona_classic/keymaps/iso/rules.mk | 10 +++++----- keyboards/kona_classic/keymaps/iso_arrows/rules.mk | 10 +++++----- keyboards/kona_classic/keymaps/iso_split/rules.mk | 10 +++++----- .../kona_classic/keymaps/iso_split_arrows/rules.mk | 10 +++++----- keyboards/kona_classic/rules.mk | 8 ++++---- keyboards/kudox/rules.mk | 10 +++++----- keyboards/kudox_game/rules.mk | 10 +++++----- keyboards/laptreus/rules.mk | 8 ++++---- keyboards/launchpad/rules.mk | 8 ++++---- keyboards/lazydesigners/dimple/rules.mk | 6 +++--- keyboards/lazydesigners/the50/rules.mk | 8 ++++---- keyboards/lazydesigners/the60/rules.mk | 8 ++++---- keyboards/lets_split/keymaps/OLED_sample/rules.mk | 8 ++++---- keyboards/lets_split/rules.mk | 8 ++++---- keyboards/lets_split_eh/rules.mk | 8 ++++---- keyboards/lfkeyboards/lfk78/keymaps/default/rules.mk | 8 ++++---- keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk | 8 ++++---- .../lfkeyboards/lfk78/keymaps/split_bs_osx/rules.mk | 8 ++++---- keyboards/lfkeyboards/lfk78/rules.mk | 8 ++++---- keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk | 8 ++++---- keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk | 8 ++++---- keyboards/lfkeyboards/lfk87/rules.mk | 8 ++++---- .../lfkeyboards/lfkpad/keymaps/default/rules.mk | 8 ++++---- keyboards/lfkeyboards/lfkpad/rules.mk | 8 ++++---- .../lfkeyboards/mini1800/keymaps/default/rules.mk | 8 ++++---- keyboards/lfkeyboards/smk65/keymaps/default/rules.mk | 8 ++++---- keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk | 8 ++++---- keyboards/lily58/keymaps/default/rules.mk | 8 ++++---- keyboards/lily58/rules.mk | 8 ++++---- keyboards/m0lly/rules.mk | 8 ++++---- keyboards/m10a/rules.mk | 8 ++++---- keyboards/maartenwut/atom47/rev2/rules.mk | 2 +- keyboards/maartenwut/atom47/rev3/rules.mk | 2 +- keyboards/maartenwut/atom47/rules.mk | 10 +++++----- keyboards/maartenwut/ta65/rules.mk | 12 ++++++------ keyboards/maartenwut/wonderland/rules.mk | 12 ++++++------ keyboards/massdrop/alt/rules.mk | 12 ++++++------ keyboards/massdrop/ctrl/rules.mk | 12 ++++++------ keyboards/maxipad/rules.mk | 12 ++++++------ keyboards/maxr1998/phoebe/rules.mk | 8 ++++---- keyboards/maxr1998/pulse4k/rules.mk | 8 ++++---- keyboards/mechkeys/mk60/rules.mk | 12 ++++++------ keyboards/mechmini/v2/rules.mk | 8 ++++---- keyboards/mehkee96/rules.mk | 8 ++++---- keyboards/meira/rules.mk | 10 +++++----- keyboards/meishi/rules.mk | 10 +++++----- keyboards/meishi2/rules.mk | 12 ++++++------ keyboards/melody96/rules.mk | 8 ++++---- keyboards/meme/rules.mk | 10 +++++----- keyboards/meson/rules.mk | 12 ++++++------ keyboards/miniaxe/rules.mk | 12 ++++++------ keyboards/mint60/rules.mk | 12 ++++++------ keyboards/mitosis/rules.mk | 8 ++++---- keyboards/miuni32/rules.mk | 8 ++++---- keyboards/model01/rules.mk | 12 ++++++------ keyboards/moon/rules.mk | 12 ++++++------ keyboards/mt40/rules.mk | 8 ++++---- keyboards/mt980/rules.mk | 8 ++++---- keyboards/mxss/rules.mk | 10 +++++----- 164 files changed, 743 insertions(+), 743 deletions(-) diff --git a/keyboards/geekboards/tester/rules.mk b/keyboards/geekboards/tester/rules.mk index 1ca57f6d09c4..03b4e83992e4 100644 --- a/keyboards/geekboards/tester/rules.mk +++ b/keyboards/geekboards/tester/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gergo/keymaps/colemak/rules.mk b/keyboards/gergo/keymaps/colemak/rules.mk index ddec12d1b148..3b81fdfa1bda 100644 --- a/keyboards/gergo/keymaps/colemak/rules.mk +++ b/keyboards/gergo/keymaps/colemak/rules.mk @@ -6,7 +6,7 @@ BALLER = no # Enable to ball out BALLSTEP = 20 # Multiple in px to move, multiplied by layer number SCROLLSTEP = 1 # Lines to scroll with ball -MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller +MOUSEKEY_ENABLE = yes # Mouse keys, needed for baller #Debug options VERBOSE = no diff --git a/keyboards/gergo/keymaps/default/rules.mk b/keyboards/gergo/keymaps/default/rules.mk index da2d03af2c44..351c5255835d 100644 --- a/keyboards/gergo/keymaps/default/rules.mk +++ b/keyboards/gergo/keymaps/default/rules.mk @@ -6,7 +6,7 @@ BALLER = no # Enable to ball out BALLSTEP = 20 # Multiple in px to move, multiplied by layer number SCROLLSTEP = 1 # Lines to scroll with ball -MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller +MOUSEKEY_ENABLE = yes # Mouse keys, needed for baller #Debug options VERBOSE = yes diff --git a/keyboards/gergo/keymaps/oled/rules.mk b/keyboards/gergo/keymaps/oled/rules.mk index fae936effb3b..1661d43d1fda 100644 --- a/keyboards/gergo/keymaps/oled/rules.mk +++ b/keyboards/gergo/keymaps/oled/rules.mk @@ -6,7 +6,7 @@ BALLER = no # Enable to ball out BALLSTEP = 20 # Multiple in px to move, multiplied by layer number SCROLLSTEP = 1 # Lines to scroll with ball -MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller +MOUSEKEY_ENABLE = yes # Mouse keys, needed for baller OLED_DRIVER_ENABLE = yes LOCAL_GLCDFONT = yes diff --git a/keyboards/gh60/revc/rules.mk b/keyboards/gh60/revc/rules.mk index c9362b334b4a..fb9ca646f076 100644 --- a/keyboards/gh60/revc/rules.mk +++ b/keyboards/gh60/revc/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +# CONSOLE_ENABLE = yes # Console for debug # COMMAND_ENABLE = yes # Commands for debug and configuration KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/gh60/satan/keymaps/colemak/rules.mk b/keyboards/gh60/satan/keymaps/colemak/rules.mk index 53644093d6c4..5cbbc3453683 100644 --- a/keyboards/gh60/satan/keymaps/colemak/rules.mk +++ b/keyboards/gh60/satan/keymaps/colemak/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/gh60/satan/keymaps/default/rules.mk b/keyboards/gh60/satan/keymaps/default/rules.mk index 53644093d6c4..5cbbc3453683 100644 --- a/keyboards/gh60/satan/keymaps/default/rules.mk +++ b/keyboards/gh60/satan/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk b/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk index 08e77f9ebc6f..71b35a819f4e 100644 --- a/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk +++ b/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk b/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk index 15cabfcd85ae..7b395f4ccd04 100644 --- a/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk +++ b/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk @@ -1,11 +1,11 @@ -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/gh60/satan/keymaps/midi/rules.mk b/keyboards/gh60/satan/keymaps/midi/rules.mk index 87025ed6fe40..5977347a12db 100644 --- a/keyboards/gh60/satan/keymaps/midi/rules.mk +++ b/keyboards/gh60/satan/keymaps/midi/rules.mk @@ -2,14 +2,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = yes # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = yes # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/gh60/satan/rules.mk b/keyboards/gh60/satan/rules.mk index 9bd667535d25..204509ebc179 100644 --- a/keyboards/gh60/satan/rules.mk +++ b/keyboards/gh60/satan/rules.mk @@ -14,14 +14,14 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/gh80_3000/rules.mk b/keyboards/gh80_3000/rules.mk index 0da2d6a2fd96..524303ec24e3 100644 --- a/keyboards/gh80_3000/rules.mk +++ b/keyboards/gh80_3000/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= no # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/gingham/rules.mk b/keyboards/gingham/rules.mk index 2ef090bd6837..f8062eb50d57 100644 --- a/keyboards/gingham/rules.mk +++ b/keyboards/gingham/rules.mk @@ -20,10 +20,10 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -31,11 +31,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = yes diff --git a/keyboards/gonnerd/keymaps/default/rules.mk b/keyboards/gonnerd/keymaps/default/rules.mk index 6de64fcf894b..c1019c7f412c 100644 --- a/keyboards/gonnerd/keymaps/default/rules.mk +++ b/keyboards/gonnerd/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/gonnerd/keymaps/tkl/rules.mk b/keyboards/gonnerd/keymaps/tkl/rules.mk index 09b51e5a0935..4026390c4e23 100644 --- a/keyboards/gonnerd/keymaps/tkl/rules.mk +++ b/keyboards/gonnerd/keymaps/tkl/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/gonnerd/rules.mk b/keyboards/gonnerd/rules.mk index d4858ff13097..798f96f4c486 100644 --- a/keyboards/gonnerd/rules.mk +++ b/keyboards/gonnerd/rules.mk @@ -17,10 +17,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/gray_studio/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk index 132db98f45e9..548af8df828f 100644 --- a/keyboards/gray_studio/cod67/rules.mk +++ b/keyboards/gray_studio/cod67/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = lufa-ms # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index e3909d8dd465..887d870a6814 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 65_ansi_blocker 65_iso_blocker diff --git a/keyboards/grid600/press/rules.mk b/keyboards/grid600/press/rules.mk index fb575b3abc18..2d9a649e0f50 100644 --- a/keyboards/grid600/press/rules.mk +++ b/keyboards/grid600/press/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/gskt00/rules.mk b/keyboards/gskt00/rules.mk index 2acbeaa90152..f0bbcad813e1 100755 --- a/keyboards/gskt00/rules.mk +++ b/keyboards/gskt00/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk index 3d48d88e7c5e..7e2ebf56719e 100644 --- a/keyboards/hadron/ver2/rules.mk +++ b/keyboards/hadron/ver2/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = halfkay # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk index 35c693379b9d..145d1f3229d4 100644 --- a/keyboards/halberd/rules.mk +++ b/keyboards/halberd/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk index 83afff3261f7..0f0b632b1d2d 100644 --- a/keyboards/hecomi/alpha/rules.mk +++ b/keyboards/hecomi/alpha/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes diff --git a/keyboards/hecomi/rules.mk b/keyboards/hecomi/rules.mk index 28febe217b44..ad2178e9ebd3 100644 --- a/keyboards/hecomi/rules.mk +++ b/keyboards/hecomi/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes DEFAULT_FOLDER = hecomi/alpha diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index 764b073007be..c08445732103 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control AUDIO_ENABLE = yes # Audio output on port B5 LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option diff --git a/keyboards/helix/rules.mk b/keyboards/helix/rules.mk index 579262fe7c54..54a4d774fd51 100644 --- a/keyboards/helix/rules.mk +++ b/keyboards/helix/rules.mk @@ -17,10 +17,10 @@ BOOTLOADER = caterina # # See TOP/docs/config_options.md for more information. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk index a7a40aa6383e..fb1538d8ac39 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/hid_liber/rules.mk b/keyboards/hid_liber/rules.mk index 3642d80742da..a0f881731a79 100755 --- a/keyboards/hid_liber/rules.mk +++ b/keyboards/hid_liber/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -26,7 +26,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hifumi/rules.mk b/keyboards/hifumi/rules.mk index 33c8d61784ef..539fb7790009 100644 --- a/keyboards/hifumi/rules.mk +++ b/keyboards/hifumi/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/hineybush/h87a/rules.mk b/keyboards/hineybush/h87a/rules.mk index 2c5bc96c6f2a..db167b5ae491 100644 --- a/keyboards/hineybush/h87a/rules.mk +++ b/keyboards/hineybush/h87a/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hineybush/hineyg80/rules.mk b/keyboards/hineybush/hineyg80/rules.mk index 7218e1e1bf18..1aa3379312d2 100644 --- a/keyboards/hineybush/hineyg80/rules.mk +++ b/keyboards/hineybush/hineyg80/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/honeycomb/rules.mk b/keyboards/honeycomb/rules.mk index 05a3cff00d64..19852d7ec3f7 100755 --- a/keyboards/honeycomb/rules.mk +++ b/keyboards/honeycomb/rules.mk @@ -14,11 +14,11 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +#MOUSEKEY_ENABLE = yes # Mouse keys POINTING_DEVICE_ENABLE = yes # Generic Pointer, not as big as mouse keys hopefully. -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk index b5b1483c724b..95f6c7ec6dd3 100644 --- a/keyboards/hotdox/rules.mk +++ b/keyboards/hotdox/rules.mk @@ -16,10 +16,10 @@ BOOTLOADER = atmel-dfu # CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone UNICODE_ENABLE = yes # Unicode -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/hs60/v1/rules.mk b/keyboards/hs60/v1/rules.mk index 13f65b6ee4fe..81c86813cac3 100644 --- a/keyboards/hs60/v1/rules.mk +++ b/keyboards/hs60/v1/rules.mk @@ -19,17 +19,17 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/idobo/rules.mk b/keyboards/idobo/rules.mk index 421a4eaae35a..62fe37fb3bd0 100644 --- a/keyboards/idobo/rules.mk +++ b/keyboards/idobo/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs EXTRAFLAGS += -flto # Use link time optimization LAYOUTS = ortho_5x15 diff --git a/keyboards/illuminati/is0/rules.mk b/keyboards/illuminati/is0/rules.mk index 7baa8f4c3ab4..9c19f7d21571 100644 --- a/keyboards/illuminati/is0/rules.mk +++ b/keyboards/illuminati/is0/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ivy/rules.mk b/keyboards/ivy/rules.mk index ae94bd3fb8eb..97c9aa1364ab 100644 --- a/keyboards/ivy/rules.mk +++ b/keyboards/ivy/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/jc65/v32u4/rules.mk b/keyboards/jc65/v32u4/rules.mk index e1498325cc42..34206244a84b 100644 --- a/keyboards/jc65/v32u4/rules.mk +++ b/keyboards/jc65/v32u4/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/jd40/rules.mk b/keyboards/jd40/rules.mk index 439f885fea2a..73336244e41f 100644 --- a/keyboards/jd40/rules.mk +++ b/keyboards/jd40/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +# CONSOLE_ENABLE = yes # Console for debug # COMMAND_ENABLE = yes # Commands for debug and configuration KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/jd45/rules.mk b/keyboards/jd45/rules.mk index 9ec5048aec52..cc5af4b7a82b 100644 --- a/keyboards/jd45/rules.mk +++ b/keyboards/jd45/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index c53a6804c0cb..767ebb93a35e 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -26,11 +26,11 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow WS2812_DRIVER = i2c -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk index aa74cc7c92f6..82e25e6a7a6f 100644 --- a/keyboards/jj4x4/rules.mk +++ b/keyboards/jj4x4/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -26,11 +26,11 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow WS2812_DRIVER = i2c -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x4 diff --git a/keyboards/jnao/rules.mk b/keyboards/jnao/rules.mk index 913ba4d1eef2..0dcd21146ced 100644 --- a/keyboards/jnao/rules.mk +++ b/keyboards/jnao/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_5x12 ortho_4x12 LAYOUTS_HAS_RGB = no diff --git a/keyboards/kagamidget/rules.mk b/keyboards/kagamidget/rules.mk index 93c64e7357e3..a803d1f79961 100644 --- a/keyboards/kagamidget/rules.mk +++ b/keyboards/kagamidget/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs RGBLIGHT_ENABLE = yes diff --git a/keyboards/katana60/rules.mk b/keyboards/katana60/rules.mk index ef5ef06851bf..62a038091e94 100644 --- a/keyboards/katana60/rules.mk +++ b/keyboards/katana60/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug COMMAND_ENABLE ?= yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE ?= no # USB Nkey Rollover BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE ?= no # MIDI support UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk index eb9b5fe7b256..1c76790f356b 100644 --- a/keyboards/kbdfans/kbd19x/rules.mk +++ b/keyboards/kbdfans/kbd19x/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/kbdfans/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk index eccc6ebbed49..7c7b490f6aae 100644 --- a/keyboards/kbdfans/kbd4x/rules.mk +++ b/keyboards/kbdfans/kbd4x/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/kbdfans/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk index 4a96ef03fea6..5d6c81e7fbd1 100644 --- a/keyboards/kbdfans/kbd66/rules.mk +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd67/hotswap/rules.mk b/keyboards/kbdfans/kbd67/hotswap/rules.mk index 74a62a22bbf8..08dd1f63590c 100644 --- a/keyboards/kbdfans/kbd67/hotswap/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/kbdfans/kbd67/rev1/rules.mk b/keyboards/kbdfans/kbd67/rev1/rules.mk index a29ca53ecfe2..7e305070ba83 100644 --- a/keyboards/kbdfans/kbd67/rev1/rules.mk +++ b/keyboards/kbdfans/kbd67/rev1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/kbdfans/kbd67/rev2/rules.mk b/keyboards/kbdfans/kbd67/rev2/rules.mk index 7f66fc0c849a..d97db91e307c 100644 --- a/keyboards/kbdfans/kbd67/rev2/rules.mk +++ b/keyboards/kbdfans/kbd67/rev2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/kbdfans/kbd6x/rules.mk b/keyboards/kbdfans/kbd6x/rules.mk index ae63197e71ff..ca46832c1b9a 100644 --- a/keyboards/kbdfans/kbd6x/rules.mk +++ b/keyboards/kbdfans/kbd6x/rules.mk @@ -14,20 +14,20 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/kbdfans/kbd75/rev1/rules.mk b/keyboards/kbdfans/kbd75/rev1/rules.mk index de0af62b87c7..ae6507a855a1 100644 --- a/keyboards/kbdfans/kbd75/rev1/rules.mk +++ b/keyboards/kbdfans/kbd75/rev1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/kbdfans/kbd75/rev2/rules.mk b/keyboards/kbdfans/kbd75/rev2/rules.mk index de0af62b87c7..ae6507a855a1 100644 --- a/keyboards/kbdfans/kbd75/rev2/rules.mk +++ b/keyboards/kbdfans/kbd75/rev2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/kbdfans/kbd8x/rules.mk b/keyboards/kbdfans/kbd8x/rules.mk index fcc28884f3c0..e177a255821b 100644 --- a/keyboards/kbdfans/kbd8x/rules.mk +++ b/keyboards/kbdfans/kbd8x/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbdpad_mk2/rules.mk b/keyboards/kbdfans/kbdpad_mk2/rules.mk index cfb65f5edfce..0b86b590493b 100644 --- a/keyboards/kbdfans/kbdpad_mk2/rules.mk +++ b/keyboards/kbdfans/kbdpad_mk2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_6x4 diff --git a/keyboards/kc60/keymaps/ws2812/rules.mk b/keyboards/kc60/keymaps/ws2812/rules.mk index 5d5a6f8abec7..393ff863e0d9 100644 --- a/keyboards/kc60/keymaps/ws2812/rules.mk +++ b/keyboards/kc60/keymaps/ws2812/rules.mk @@ -3,10 +3,10 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index 3e7e4797c603..487b22c38d41 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/kc60se/rules.mk b/keyboards/kc60se/rules.mk index 1685cb742340..0432d8032452 100644 --- a/keyboards/kc60se/rules.mk +++ b/keyboards/kc60se/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/keebio/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk index a548334074c2..176175ca2bd4 100644 --- a/keyboards/keebio/bdn9/rules.mk +++ b/keyboards/keebio/bdn9/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/rules.mk b/keyboards/keebio/bfo9000/rules.mk index c0f4ed42ddd1..af9ca797b509 100644 --- a/keyboards/keebio/bfo9000/rules.mk +++ b/keyboards/keebio/bfo9000/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keebio/chocopad/rules.mk b/keyboards/keebio/chocopad/rules.mk index ac68b66523c0..a21d919d77f9 100644 --- a/keyboards/keebio/chocopad/rules.mk +++ b/keyboards/keebio/chocopad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/keebio/dilly/rules.mk b/keyboards/keebio/dilly/rules.mk index 14f62bd8f795..dbb338e3a5f8 100644 --- a/keyboards/keebio/dilly/rules.mk +++ b/keyboards/keebio/dilly/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/keebio/ergodicity/rules.mk b/keyboards/keebio/ergodicity/rules.mk index 0c794fb7511f..3d318fc7b8a2 100644 --- a/keyboards/keebio/ergodicity/rules.mk +++ b/keyboards/keebio/ergodicity/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/keebio/fourier/rules.mk b/keyboards/keebio/fourier/rules.mk index 9bd9e1dccce5..6ad9ad9ce324 100644 --- a/keyboards/keebio/fourier/rules.mk +++ b/keyboards/keebio/fourier/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keebio/iris/rev1/rules.mk b/keyboards/keebio/iris/rev1/rules.mk index 2d7155bf8fda..53719d7550a5 100644 --- a/keyboards/keebio/iris/rev1/rules.mk +++ b/keyboards/keebio/iris/rev1/rules.mk @@ -16,10 +16,10 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keebio/iris/rev1_led/rules.mk b/keyboards/keebio/iris/rev1_led/rules.mk index 2d7155bf8fda..53719d7550a5 100644 --- a/keyboards/keebio/iris/rev1_led/rules.mk +++ b/keyboards/keebio/iris/rev1_led/rules.mk @@ -16,10 +16,10 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keebio/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk index 317898854322..765fa7f07a3b 100644 --- a/keyboards/keebio/iris/rev2/rules.mk +++ b/keyboards/keebio/iris/rev2/rules.mk @@ -16,10 +16,10 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/keebio/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk index f3c90a078477..ea92bc98f594 100644 --- a/keyboards/keebio/iris/rev3/rules.mk +++ b/keyboards/keebio/iris/rev3/rules.mk @@ -16,10 +16,10 @@ BOOTLOADER = qmk-dfu # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/keebio/iris/rev4/rules.mk b/keyboards/keebio/iris/rev4/rules.mk index f3c90a078477..ea92bc98f594 100644 --- a/keyboards/keebio/iris/rev4/rules.mk +++ b/keyboards/keebio/iris/rev4/rules.mk @@ -16,10 +16,10 @@ BOOTLOADER = qmk-dfu # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/keebio/laplace/rules.mk b/keyboards/keebio/laplace/rules.mk index 01efe96f6582..8d273917c722 100644 --- a/keyboards/keebio/laplace/rules.mk +++ b/keyboards/keebio/laplace/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keebio/levinson/keymaps/steno/rules.mk b/keyboards/keebio/levinson/keymaps/steno/rules.mk index 9c31e590ee64..47cd0563d568 100644 --- a/keyboards/keebio/levinson/keymaps/steno/rules.mk +++ b/keyboards/keebio/levinson/keymaps/steno/rules.mk @@ -1,6 +1,6 @@ EXTRAKEY_ENABLE = no # Disable if you run out of usb endpoints. Media keys need this to work. -MOUSEKEY_ENABLE = no # Mouse keys(+4700) Uses extra usb enpoints. -STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER. +MOUSEKEY_ENABLE = no # Mouse keys Uses extra usb enpoints. +STENO_ENABLE = yes # Additional protocols for Stenography, requires VIRTSER. AUDIO_ENABLE = no # Audio output on port C6 MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = yes diff --git a/keyboards/keebio/levinson/rules.mk b/keyboards/keebio/levinson/rules.mk index c7446445f35d..d80f94a294d4 100644 --- a/keyboards/keebio/levinson/rules.mk +++ b/keyboards/keebio/levinson/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/keebio/nyquist/rev1/rules.mk b/keyboards/keebio/nyquist/rev1/rules.mk index c377644bae0e..a3c3f036b21f 100644 --- a/keyboards/keebio/nyquist/rev1/rules.mk +++ b/keyboards/keebio/nyquist/rev1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keebio/nyquist/rev2/rules.mk b/keyboards/keebio/nyquist/rev2/rules.mk index a6131ae5287b..9735fbebdca2 100644 --- a/keyboards/keebio/nyquist/rev2/rules.mk +++ b/keyboards/keebio/nyquist/rev2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/keebio/nyquist/rev3/rules.mk b/keyboards/keebio/nyquist/rev3/rules.mk index 740ff8002499..d7db1800a060 100644 --- a/keyboards/keebio/nyquist/rev3/rules.mk +++ b/keyboards/keebio/nyquist/rev3/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = qmk-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk index 5bca869b8e73..a13f0478b11f 100644 --- a/keyboards/keebio/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keebio/rorschach/rules.mk b/keyboards/keebio/rorschach/rules.mk index f6007e442256..caf5fdf82420 100644 --- a/keyboards/keebio/rorschach/rules.mk +++ b/keyboards/keebio/rorschach/rules.mk @@ -11,10 +11,10 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/keebio/tragicforce68/rules.mk b/keyboards/keebio/tragicforce68/rules.mk index f9f487a2a6f0..549ffe9fad39 100644 --- a/keyboards/keebio/tragicforce68/rules.mk +++ b/keyboards/keebio/tragicforce68/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/keebio/tukey/rules.mk b/keyboards/keebio/tukey/rules.mk index c74f16996170..af163a0d68ce 100644 --- a/keyboards/keebio/tukey/rules.mk +++ b/keyboards/keebio/tukey/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk index 0759ab925e88..0b746d17207f 100644 --- a/keyboards/keebio/viterbi/rules.mk +++ b/keyboards/keebio/viterbi/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keebio/wavelet/rules.mk b/keyboards/keebio/wavelet/rules.mk index f924db62b8ad..b00535b7b4bb 100644 --- a/keyboards/keebio/wavelet/rules.mk +++ b/keyboards/keebio/wavelet/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/keycapsss/o4l_5x12/rules.mk b/keyboards/keycapsss/o4l_5x12/rules.mk index 0703535375d9..8077dc1e14b5 100644 --- a/keyboards/keycapsss/o4l_5x12/rules.mk +++ b/keyboards/keycapsss/o4l_5x12/rules.mk @@ -11,10 +11,10 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/keyhive/maypad/rules.mk b/keyboards/keyhive/maypad/rules.mk index f76179af65bd..a14772f6a2c3 100644 --- a/keyboards/keyhive/maypad/rules.mk +++ b/keyboards/keyhive/maypad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/kinesis/keymaps/carpalx/rules.mk b/keyboards/kinesis/keymaps/carpalx/rules.mk index 63f52ac18e70..9c6a4673d2cf 100644 --- a/keyboards/kinesis/keymaps/carpalx/rules.mk +++ b/keyboards/kinesis/keymaps/carpalx/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/kinesis/keymaps/default/rules.mk b/keyboards/kinesis/keymaps/default/rules.mk index 7a331cd530cf..46af5cd7b4b7 100644 --- a/keyboards/kinesis/keymaps/default/rules.mk +++ b/keyboards/kinesis/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/kinesis/keymaps/default_pretty/rules.mk b/keyboards/kinesis/keymaps/default_pretty/rules.mk index 7a331cd530cf..46af5cd7b4b7 100644 --- a/keyboards/kinesis/keymaps/default_pretty/rules.mk +++ b/keyboards/kinesis/keymaps/default_pretty/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/kinesis/keymaps/dvorak/rules.mk b/keyboards/kinesis/keymaps/dvorak/rules.mk index 7a331cd530cf..46af5cd7b4b7 100644 --- a/keyboards/kinesis/keymaps/dvorak/rules.mk +++ b/keyboards/kinesis/keymaps/dvorak/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk index faa3e454c9fb..cc0691e98438 100644 --- a/keyboards/kinesis/rules.mk +++ b/keyboards/kinesis/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_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 diff --git a/keyboards/kingly_keys/little_foot/rules.mk b/keyboards/kingly_keys/little_foot/rules.mk index d360340c5604..c314b98ddd93 100644 --- a/keyboards/kingly_keys/little_foot/rules.mk +++ b/keyboards/kingly_keys/little_foot/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/kingly_keys/romac/rules.mk b/keyboards/kingly_keys/romac/rules.mk index a3da8aa83474..9bd22f18b6f2 100644 --- a/keyboards/kingly_keys/romac/rules.mk +++ b/keyboards/kingly_keys/romac/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/kingly_keys/romac_plus/rules.mk b/keyboards/kingly_keys/romac_plus/rules.mk index ce00f6166ca7..24aa01c53923 100644 --- a/keyboards/kingly_keys/romac_plus/rules.mk +++ b/keyboards/kingly_keys/romac_plus/rules.mk @@ -14,20 +14,20 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes # Enable support for EC11 Rotary Encoder OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/keyboards/kingly_keys/ropro/rules.mk b/keyboards/kingly_keys/ropro/rules.mk index 69774ec351f2..d3fad8265870 100644 --- a/keyboards/kingly_keys/ropro/rules.mk +++ b/keyboards/kingly_keys/ropro/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/kingly_keys/smd_milk/rules.mk b/keyboards/kingly_keys/smd_milk/rules.mk index 815f4866cf18..f34f8891b916 100644 --- a/keyboards/kingly_keys/smd_milk/rules.mk +++ b/keyboards/kingly_keys/smd_milk/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/kingly_keys/soap/rules.mk b/keyboards/kingly_keys/soap/rules.mk index 27e315847913..56adb1e55868 100644 --- a/keyboards/kingly_keys/soap/rules.mk +++ b/keyboards/kingly_keys/soap/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/kira75/rules.mk b/keyboards/kira75/rules.mk index 0f29718cc8b4..ad3d1a865c17 100644 --- a/keyboards/kira75/rules.mk +++ b/keyboards/kira75/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk index 8f53f26cd7d3..c36191eb662e 100644 --- a/keyboards/kmac/rules.mk +++ b/keyboards/kmac/rules.mk @@ -17,10 +17,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -28,7 +28,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kmini/rules.mk b/keyboards/kmini/rules.mk index 0406c323268f..740dae2d23f0 100755 --- a/keyboards/kmini/rules.mk +++ b/keyboards/kmini/rules.mk @@ -17,10 +17,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -28,7 +28,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/knops/mini/rules.mk b/keyboards/knops/mini/rules.mk index ef5ef06851bf..312bfb4fdc7d 100644 --- a/keyboards/knops/mini/rules.mk +++ b/keyboards/knops/mini/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug COMMAND_ENABLE ?= yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE ?= no # USB Nkey Rollover BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE ?= no # MIDI support UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 diff --git a/keyboards/kona_classic/keymaps/ansi/rules.mk b/keyboards/kona_classic/keymaps/ansi/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/ansi/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/ansi_split/rules.mk b/keyboards/kona_classic/keymaps/ansi_split/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/default/rules.mk b/keyboards/kona_classic/keymaps/default/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/default/rules.mk +++ b/keyboards/kona_classic/keymaps/default/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/iso/rules.mk b/keyboards/kona_classic/keymaps/iso/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/iso/rules.mk +++ b/keyboards/kona_classic/keymaps/iso/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/iso_split/rules.mk b/keyboards/kona_classic/keymaps/iso_split/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/iso_split/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kona_classic/rules.mk b/keyboards/kona_classic/rules.mk index 0a7df029c49b..2640360f26e5 100644 --- a/keyboards/kona_classic/rules.mk +++ b/keyboards/kona_classic/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug COMMAND_ENABLE ?= yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend diff --git a/keyboards/kudox/rules.mk b/keyboards/kudox/rules.mk index 5d8c2b2bb381..4ae8ea7fbb65 100644 --- a/keyboards/kudox/rules.mk +++ b/keyboards/kudox/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kudox_game/rules.mk b/keyboards/kudox_game/rules.mk index 71d7cf270229..d3fa26ee6ac0 100644 --- a/keyboards/kudox_game/rules.mk +++ b/keyboards/kudox_game/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/laptreus/rules.mk b/keyboards/laptreus/rules.mk index 237a6ac8ba7f..0f192113c2fd 100644 --- a/keyboards/laptreus/rules.mk +++ b/keyboards/laptreus/rules.mk @@ -18,10 +18,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work #BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/launchpad/rules.mk b/keyboards/launchpad/rules.mk index 59b285cf53fa..2b115b1e1e87 100644 --- a/keyboards/launchpad/rules.mk +++ b/keyboards/launchpad/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk index 99e4911afaba..d369613ead8a 100644 --- a/keyboards/lazydesigners/dimple/rules.mk +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -14,9 +14,9 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/lazydesigners/the50/rules.mk b/keyboards/lazydesigners/the50/rules.mk index 561e38a99791..8194d084e0b5 100644 --- a/keyboards/lazydesigners/the50/rules.mk +++ b/keyboards/lazydesigners/the50/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/lazydesigners/the60/rules.mk b/keyboards/lazydesigners/the60/rules.mk index 97ea15d34a57..233dd9967e13 100644 --- a/keyboards/lazydesigners/the60/rules.mk +++ b/keyboards/lazydesigners/the60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/lets_split/keymaps/OLED_sample/rules.mk b/keyboards/lets_split/keymaps/OLED_sample/rules.mk index 89ad61fbe81e..162c7aeb93e2 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/rules.mk +++ b/keyboards/lets_split/keymaps/OLED_sample/rules.mk @@ -4,10 +4,10 @@ SRC += ssd1306.c # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 98736310c626..a7703ce44b55 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/lets_split_eh/rules.mk b/keyboards/lets_split_eh/rules.mk index 2bcd087d8242..fe3face86b6b 100644 --- a/keyboards/lets_split_eh/rules.mk +++ b/keyboards/lets_split_eh/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfk78/keymaps/default/rules.mk b/keyboards/lfkeyboards/lfk78/keymaps/default/rules.mk index 1477c3ac77b3..9b8038dd36f9 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/lfk78/keymaps/default/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk b/keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk index 3cfc994cb8e2..04fa7d81b031 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk +++ b/keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/rules.mk b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/rules.mk index f789b6866b48..e7f035b753fc 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/rules.mk +++ b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk index 3c90998d9836..3af30211e9f5 100644 --- a/keyboards/lfkeyboards/lfk78/rules.mk +++ b/keyboards/lfkeyboards/lfk78/rules.mk @@ -19,10 +19,10 @@ OPT_DEFS += -DLFK_REV_STRING=\"Rev$(LFK_REV)\" # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk index c079c264ed7a..59cfee01cc24 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk index 7823dea7874e..da697e66fec4 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk +++ b/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk index 8e19706150b3..b322bdf56293 100644 --- a/keyboards/lfkeyboards/lfk87/rules.mk +++ b/keyboards/lfkeyboards/lfk87/rules.mk @@ -24,10 +24,10 @@ LAYOUTS = tkl_ansi tkl_iso # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/rules.mk b/keyboards/lfkeyboards/lfkpad/keymaps/default/rules.mk index cc21b32dce33..db54d61e5ba0 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 7ed840ae9fe3..1529f8986345 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk @@ -13,10 +13,10 @@ BOOTLOADER = atmel-dfu LAYOUTS = numpad_6x4 -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/mini1800/keymaps/default/rules.mk b/keyboards/lfkeyboards/mini1800/keymaps/default/rules.mk index 1598173f36b7..2619a2d197fb 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/mini1800/keymaps/default/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk b/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk index b5310da58d30..d8fe33f6c7b5 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality diff --git a/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk b/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk index f1814cf4852f..312dfbc51bed 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk +++ b/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk @@ -3,10 +3,10 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality diff --git a/keyboards/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index 922fac6b69fc..b39305767b82 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index fce62532f533..d413510bac1f 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/m0lly/rules.mk b/keyboards/m0lly/rules.mk index 21e3697dc6a5..60140160c2fb 100644 --- a/keyboards/m0lly/rules.mk +++ b/keyboards/m0lly/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/m10a/rules.mk b/keyboards/m10a/rules.mk index 739e396df30a..71ef0ed649c7 100644 --- a/keyboards/m10a/rules.mk +++ b/keyboards/m10a/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/maartenwut/atom47/rev2/rules.mk b/keyboards/maartenwut/atom47/rev2/rules.mk index 24d1c4199b87..0b6b8799863f 100644 --- a/keyboards/maartenwut/atom47/rev2/rules.mk +++ b/keyboards/maartenwut/atom47/rev2/rules.mk @@ -1,2 +1,2 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality diff --git a/keyboards/maartenwut/atom47/rev3/rules.mk b/keyboards/maartenwut/atom47/rev3/rules.mk index 13e553b56285..2df225e389f2 100644 --- a/keyboards/maartenwut/atom47/rev3/rules.mk +++ b/keyboards/maartenwut/atom47/rev3/rules.mk @@ -1,2 +1,2 @@ NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality diff --git a/keyboards/maartenwut/atom47/rules.mk b/keyboards/maartenwut/atom47/rules.mk index 0728c1a28c51..7fdd5ad48f3b 100644 --- a/keyboards/maartenwut/atom47/rules.mk +++ b/keyboards/maartenwut/atom47/rules.mk @@ -14,12 +14,12 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/maartenwut/ta65/rules.mk b/keyboards/maartenwut/ta65/rules.mk index ecc629698619..db0567bd03db 100644 --- a/keyboards/maartenwut/ta65/rules.mk +++ b/keyboards/maartenwut/ta65/rules.mk @@ -14,14 +14,14 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/maartenwut/wonderland/rules.mk b/keyboards/maartenwut/wonderland/rules.mk index 19c0ea591942..a01e466b891f 100755 --- a/keyboards/maartenwut/wonderland/rules.mk +++ b/keyboards/maartenwut/wonderland/rules.mk @@ -14,14 +14,14 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk index 3da2610f68fd..ff482bb57051 100644 --- a/keyboards/massdrop/alt/rules.mk +++ b/keyboards/massdrop/alt/rules.mk @@ -11,10 +11,10 @@ CUSTOM_MATRIX = yes # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -22,12 +22,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs VIRTSER_ENABLE = no # USB Serial Driver RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift diff --git a/keyboards/massdrop/ctrl/rules.mk b/keyboards/massdrop/ctrl/rules.mk index aa45c68056d8..a382272b4974 100644 --- a/keyboards/massdrop/ctrl/rules.mk +++ b/keyboards/massdrop/ctrl/rules.mk @@ -11,10 +11,10 @@ CUSTOM_MATRIX = yes # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -22,12 +22,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs VIRTSER_ENABLE = no # USB Serial Driver RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift diff --git a/keyboards/maxipad/rules.mk b/keyboards/maxipad/rules.mk index 735c7af26d69..9d907bd24ea9 100644 --- a/keyboards/maxipad/rules.mk +++ b/keyboards/maxipad/rules.mk @@ -1,10 +1,10 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -12,11 +12,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs DEFAULT_FOLDER = maxipad/promicro diff --git a/keyboards/maxr1998/phoebe/rules.mk b/keyboards/maxr1998/phoebe/rules.mk index b73145d7ff27..335e575364d9 100644 --- a/keyboards/maxr1998/phoebe/rules.mk +++ b/keyboards/maxr1998/phoebe/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration COMBO_ENABLE = no # Key combo feature NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/maxr1998/pulse4k/rules.mk b/keyboards/maxr1998/pulse4k/rules.mk index cee105352fd1..71d9b5debff8 100644 --- a/keyboards/maxr1998/pulse4k/rules.mk +++ b/keyboards/maxr1998/pulse4k/rules.mk @@ -15,11 +15,11 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys ENCODER_ENABLE = yes # Rotary encoders -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration COMBO_ENABLE = yes # Key combo feature NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/mechkeys/mk60/rules.mk b/keyboards/mechkeys/mk60/rules.mk index 4f8bd49eff36..e93b6146ec00 100644 --- a/keyboards/mechkeys/mk60/rules.mk +++ b/keyboards/mechkeys/mk60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/mechmini/v2/rules.mk b/keyboards/mechmini/v2/rules.mk index 72d307322cec..a827743192fc 100755 --- a/keyboards/mechmini/v2/rules.mk +++ b/keyboards/mechmini/v2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk index 772706e6cca0..b91a69f83b59 100644 --- a/keyboards/mehkee96/rules.mk +++ b/keyboards/mehkee96/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = bootloadHID # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes diff --git a/keyboards/meira/rules.mk b/keyboards/meira/rules.mk index 8357e780bf09..c9949c169207 100644 --- a/keyboards/meira/rules.mk +++ b/keyboards/meira/rules.mk @@ -14,16 +14,16 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/meishi/rules.mk b/keyboards/meishi/rules.mk index 571a1c48ce63..3b27a9be0b08 100644 --- a/keyboards/meishi/rules.mk +++ b/keyboards/meishi/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/meishi2/rules.mk b/keyboards/meishi2/rules.mk index 7218e1e1bf18..1aa3379312d2 100644 --- a/keyboards/meishi2/rules.mk +++ b/keyboards/meishi2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/melody96/rules.mk b/keyboards/melody96/rules.mk index 1e6d4bb7cdff..c1f1f22ba343 100644 --- a/keyboards/melody96/rules.mk +++ b/keyboards/melody96/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/meme/rules.mk b/keyboards/meme/rules.mk index 621c2dded1c4..a076df944a9f 100644 --- a/keyboards/meme/rules.mk +++ b/keyboards/meme/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/meson/rules.mk b/keyboards/meson/rules.mk index 323ec666a9fe..2fe1d15467f7 100644 --- a/keyboards/meson/rules.mk +++ b/keyboards/meson/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change yes to no to disable # SPLIT_KEYBOARD = yes -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -26,9 +26,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/miniaxe/rules.mk b/keyboards/miniaxe/rules.mk index 204aeed76efa..cf5efab09a7e 100644 --- a/keyboards/miniaxe/rules.mk +++ b/keyboards/miniaxe/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs DEBUG_ENABLE = no CUSTOM_MATRIX = no # Use custom matrix code diff --git a/keyboards/mint60/rules.mk b/keyboards/mint60/rules.mk index 037e81431214..33368caab518 100644 --- a/keyboards/mint60/rules.mk +++ b/keyboards/mint60/rules.mk @@ -14,22 +14,22 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = yes SRC += i2c.c \ diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk index 420c49f9b91e..466987e8c1e6 100644 --- a/keyboards/mitosis/rules.mk +++ b/keyboards/mitosis/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/miuni32/rules.mk b/keyboards/miuni32/rules.mk index 68622e672a87..9f36d744a397 100644 --- a/keyboards/miuni32/rules.mk +++ b/keyboards/miuni32/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/model01/rules.mk b/keyboards/model01/rules.mk index 5e3cbaa33210..29c028ac85b2 100644 --- a/keyboards/model01/rules.mk +++ b/keyboards/model01/rules.mk @@ -14,16 +14,16 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode CUSTOM_MATRIX = yes @@ -32,4 +32,4 @@ SRC += leds.c \ matrix.c # You can set RGB_MATRIX_ENABLE = no in your rules.mk to disable this and save the Flash -RGB_MATRIX_ENABLE = custom # Enable RGB matrix effects (+10000). +RGB_MATRIX_ENABLE = custom # Enable RGB matrix effects. diff --git a/keyboards/moon/rules.mk b/keyboards/moon/rules.mk index 3c67b3c2873d..b0628b37f309 100644 --- a/keyboards/moon/rules.mk +++ b/keyboards/moon/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs # custom matrix setup CUSTOM_MATRIX = yes diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index 338a83cc7474..fa22bf61bd6a 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -12,10 +12,10 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= no # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality diff --git a/keyboards/mt980/rules.mk b/keyboards/mt980/rules.mk index b3655bf723ae..02877c599129 100644 --- a/keyboards/mt980/rules.mk +++ b/keyboards/mt980/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk index a1ca27ca469e..ccdca3fbec34 100644 --- a/keyboards/mxss/rules.mk +++ b/keyboards/mxss/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 From d2e1cc4d48e5c74453f9ab1a344490f895b2e236 Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Thu, 30 Jan 2020 14:13:49 -0500 Subject: [PATCH 166/331] Trim firmware sizes from default rules.mk, part 3 (#8045) --- keyboards/naked48/rules.mk | 8 ++++---- keyboards/naked60/rules.mk | 8 ++++---- keyboards/naked64/rules.mk | 8 ++++---- keyboards/namecard2x4/rules.mk | 12 ++++++------ keyboards/nek_type_a/rules.mk | 12 ++++++------ keyboards/newgame40/rules.mk | 8 ++++---- keyboards/nightmare/rules.mk | 12 ++++++------ keyboards/nomu30/rules.mk | 12 ++++++------ keyboards/novelpad/rules.mk | 8 ++++---- keyboards/noxary/220/rules.mk | 12 ++++++------ keyboards/noxary/260/rules.mk | 12 ++++++------ keyboards/noxary/268/rules.mk | 8 ++++---- keyboards/noxary/268_2/rules.mk | 12 ++++++------ keyboards/noxary/280/rules.mk | 12 ++++++------ keyboards/noxary/x268/rules.mk | 12 ++++++------ keyboards/ok60/rules.mk | 8 ++++---- keyboards/omnikey_blackheart/rules.mk | 8 ++++---- keyboards/orange75/rules.mk | 8 ++++---- keyboards/org60/rules.mk | 8 ++++---- keyboards/orthodox/rules.mk | 8 ++++---- keyboards/otaku_split/rev0/rules.mk | 12 ++++++------ keyboards/otaku_split/rev1/rules.mk | 12 ++++++------ keyboards/paladin64/rules.mk | 8 ++++---- keyboards/pancake/feather/rules.mk | 8 ++++---- keyboards/pancake/promicro/rules.mk | 8 ++++---- keyboards/pdxkbc/rules.mk | 12 ++++++------ keyboards/phantom/keymaps/rgbmod/rules.mk | 10 +++++----- keyboards/phantom/rules.mk | 10 +++++----- keyboards/pinky/rules.mk | 12 ++++++------ keyboards/plaid/rules.mk | 12 ++++++------ keyboards/planck/ez/rules.mk | 8 ++++---- keyboards/planck/light/rules.mk | 8 ++++---- keyboards/planck/rev1/rules.mk | 8 ++++---- keyboards/planck/rev2/rules.mk | 8 ++++---- keyboards/planck/rev3/rules.mk | 8 ++++---- keyboards/planck/rev4/rules.mk | 8 ++++---- keyboards/planck/rev5/rules.mk | 8 ++++---- keyboards/planck/rev6/rules.mk | 8 ++++---- keyboards/playkbtw/ca66/rules.mk | 6 +++--- keyboards/playkbtw/pk60/rules.mk | 8 ++++---- keyboards/preonic/rev1/rules.mk | 8 ++++---- keyboards/preonic/rev2/rules.mk | 8 ++++---- keyboards/preonic/rev3/rules.mk | 8 ++++---- keyboards/primekb/prime_e/rules.mk | 12 ++++++------ keyboards/primekb/prime_l/rules.mk | 12 ++++++------ keyboards/primekb/prime_m/rules.mk | 12 ++++++------ keyboards/primekb/prime_o/rules.mk | 12 ++++++------ keyboards/primekb/prime_r/rules.mk | 8 ++++---- keyboards/puck/rules.mk | 8 ++++---- keyboards/quantrik/kyuu/rules.mk | 12 ++++++------ keyboards/qwertyydox/rules.mk | 8 ++++---- keyboards/rabbit/rabbit68/rules.mk | 12 ++++++------ keyboards/redox/rules.mk | 10 +++++----- keyboards/redox_w/rules.mk | 8 ++++---- keyboards/redscarf_iiplus/verb/rules.mk | 12 ++++++------ keyboards/redscarf_iiplus/verc/rules.mk | 12 ++++++------ keyboards/reviung34/rules.mk | 12 ++++++------ keyboards/reviung39/rules.mk | 12 ++++++------ keyboards/rgbkb/sol/keymaps/default/rules.mk | 2 +- keyboards/rgbkb/sol/rev1/rules.mk | 8 ++++---- keyboards/rgbkb/sol/rev2/rules.mk | 2 +- keyboards/rgbkb/zen/rules.mk | 8 ++++---- keyboards/rgbkb/zygomorph/rules.mk | 12 ++++++------ keyboards/runner3680/rules.mk | 12 ++++++------ keyboards/s7_elephant/rules.mk | 8 ++++---- keyboards/scarletbandana/rules.mk | 10 +++++----- keyboards/sck/neiso/rules.mk | 2 +- keyboards/sck/osa/rules.mk | 12 ++++++------ keyboards/scythe/rules.mk | 12 ++++++------ keyboards/sentraq/number_pad/rules.mk | 12 ++++++------ keyboards/sentraq/s60_x/default/rules.mk | 6 +++--- keyboards/sentraq/s60_x/rgb/rules.mk | 8 ++++---- keyboards/sentraq/s65_plus/rules.mk | 6 +++--- keyboards/sentraq/s65_x/rules.mk | 6 +++--- keyboards/shiro/rules.mk | 12 ++++++------ keyboards/signum/3_0/elitec/rules.mk | 8 ++++---- keyboards/sirius/unigo66/rules.mk | 8 ++++---- keyboards/sixkeyboard/rules.mk | 8 ++++---- keyboards/smk60/rules.mk | 10 +++++----- keyboards/snagpad/rules.mk | 8 ++++---- keyboards/snampad/rules.mk | 12 ++++++------ keyboards/southpole/rules.mk | 8 ++++---- keyboards/spacetime/rules.mk | 12 ++++++------ keyboards/speedo/rules.mk | 10 +++++----- keyboards/standaside/rules.mk | 12 ++++++------ keyboards/staryu/rules.mk | 12 ++++++------ keyboards/stella/rules.mk | 12 ++++++------ keyboards/subatomic/rules.mk | 8 ++++---- keyboards/suihankey/rules.mk | 12 ++++++------ keyboards/sx60/rules.mk | 8 ++++---- 90 files changed, 425 insertions(+), 425 deletions(-) diff --git a/keyboards/naked48/rules.mk b/keyboards/naked48/rules.mk index 75e073df6d17..e4a63a7b225a 100644 --- a/keyboards/naked48/rules.mk +++ b/keyboards/naked48/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/naked60/rules.mk b/keyboards/naked60/rules.mk index f5bce8d50caf..fa1b630d4221 100644 --- a/keyboards/naked60/rules.mk +++ b/keyboards/naked60/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/naked64/rules.mk b/keyboards/naked64/rules.mk index 864baccc8ff4..0d18a5650ba6 100644 --- a/keyboards/naked64/rules.mk +++ b/keyboards/naked64/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rules.mk index 4c4f8c9ee07e..1b9e03d9712b 100644 --- a/keyboards/namecard2x4/rules.mk +++ b/keyboards/namecard2x4/rules.mk @@ -14,22 +14,22 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs #UNICODEMAP_ENABLE = yes # for emoji user #RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk index db5b1642c889..8ee1054bfca9 100644 --- a/keyboards/nek_type_a/rules.mk +++ b/keyboards/nek_type_a/rules.mk @@ -14,10 +14,10 @@ F_CPU = 8000000 # ATmega328P USBasp BOOTLOADER = caterina -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = yes DEBUG_ENABLE = yes BLUETOOTH = AdafruitBLE diff --git a/keyboards/newgame40/rules.mk b/keyboards/newgame40/rules.mk index ab07dd2b6a29..148981354e1f 100644 --- a/keyboards/newgame40/rules.mk +++ b/keyboards/newgame40/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/nightmare/rules.mk b/keyboards/nightmare/rules.mk index 66a778b6c231..5fa842c8bb10 100644 --- a/keyboards/nightmare/rules.mk +++ b/keyboards/nightmare/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/nomu30/rules.mk b/keyboards/nomu30/rules.mk index e05730c69e66..4b7193da4950 100644 --- a/keyboards/nomu30/rules.mk +++ b/keyboards/nomu30/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/novelpad/rules.mk b/keyboards/novelpad/rules.mk index 54e4cea03bbc..ea58b3da060d 100755 --- a/keyboards/novelpad/rules.mk +++ b/keyboards/novelpad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/noxary/220/rules.mk b/keyboards/noxary/220/rules.mk index 785fb488d415..f099fefb5d23 100644 --- a/keyboards/noxary/220/rules.mk +++ b/keyboards/noxary/220/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_6x4 diff --git a/keyboards/noxary/260/rules.mk b/keyboards/noxary/260/rules.mk index 4d9977cd3bd9..f17a6c17dfef 100644 --- a/keyboards/noxary/260/rules.mk +++ b/keyboards/noxary/260/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs EXTRAFLAGS += -flto LAYOUTS = 60_ansi 60_iso 60_hhkb 60_tsangan_hhkb diff --git a/keyboards/noxary/268/rules.mk b/keyboards/noxary/268/rules.mk index 59e6b524cf0f..b57e64fcecdb 100644 --- a/keyboards/noxary/268/rules.mk +++ b/keyboards/noxary/268/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= no # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/noxary/268_2/rules.mk b/keyboards/noxary/268_2/rules.mk index 2f9d087656cf..230ecc453810 100644 --- a/keyboards/noxary/268_2/rules.mk +++ b/keyboards/noxary/268_2/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 65_ansi_blocker diff --git a/keyboards/noxary/280/rules.mk b/keyboards/noxary/280/rules.mk index 7ac7c8f65417..e75034e26ec8 100644 --- a/keyboards/noxary/280/rules.mk +++ b/keyboards/noxary/280/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/noxary/x268/rules.mk b/keyboards/noxary/x268/rules.mk index 8b2d28fcda4f..a8654dc912f4 100644 --- a/keyboards/noxary/x268/rules.mk +++ b/keyboards/noxary/x268/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ok60/rules.mk b/keyboards/ok60/rules.mk index 6a0b6cfb3528..064683816f94 100644 --- a/keyboards/ok60/rules.mk +++ b/keyboards/ok60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +# CONSOLE_ENABLE = yes # Console for debug # COMMAND_ENABLE = yes # Commands for debug and configuration KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/omnikey_blackheart/rules.mk b/keyboards/omnikey_blackheart/rules.mk index 648f84eeed33..59f163e2f4c1 100644 --- a/keyboards/omnikey_blackheart/rules.mk +++ b/keyboards/omnikey_blackheart/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/orange75/rules.mk b/keyboards/orange75/rules.mk index d5b1f1e10afb..ce242bb2a9d5 100644 --- a/keyboards/orange75/rules.mk +++ b/keyboards/orange75/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/org60/rules.mk b/keyboards/org60/rules.mk index 3e00a0493733..a57d68acc575 100644 --- a/keyboards/org60/rules.mk +++ b/keyboards/org60/rules.mk @@ -15,12 +15,12 @@ BOOTLOADER = atmel-dfu AUDIO_ENABLE = no # Audio output on port C6 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration COMMAND_ENABLE = no # Commands for debug and configuration -CONSOLE_ENABLE = no # Console for debug(+400) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug +EXTRAKEY_ENABLE = yes # Audio control and System control MIDI_ENABLE = no # MIDI controls -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index 59f039a76d0b..384938ed0565 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -5,10 +5,10 @@ MCU = atmega32u4 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/otaku_split/rev0/rules.mk b/keyboards/otaku_split/rev0/rules.mk index 8c41bc5a2ed5..15240c6d9338 100644 --- a/keyboards/otaku_split/rev0/rules.mk +++ b/keyboards/otaku_split/rev0/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD=yes diff --git a/keyboards/otaku_split/rev1/rules.mk b/keyboards/otaku_split/rev1/rules.mk index 8c41bc5a2ed5..15240c6d9338 100644 --- a/keyboards/otaku_split/rev1/rules.mk +++ b/keyboards/otaku_split/rev1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD=yes diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk index 558d1855a174..6caa47e90787 100755 --- a/keyboards/paladin64/rules.mk +++ b/keyboards/paladin64/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/pancake/feather/rules.mk b/keyboards/pancake/feather/rules.mk index ed10c5faa771..c54fbf06e0ae 100644 --- a/keyboards/pancake/feather/rules.mk +++ b/keyboards/pancake/feather/rules.mk @@ -18,10 +18,10 @@ BOOTLOADER = caterina # comment out to disable the options. # BLUETOOTH = AdafruitBLE -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/pancake/promicro/rules.mk b/keyboards/pancake/promicro/rules.mk index 3ede4cd34b48..6ed9e88e990c 100644 --- a/keyboards/pancake/promicro/rules.mk +++ b/keyboards/pancake/promicro/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/pdxkbc/rules.mk b/keyboards/pdxkbc/rules.mk index 7218e1e1bf18..1aa3379312d2 100644 --- a/keyboards/pdxkbc/rules.mk +++ b/keyboards/pdxkbc/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/phantom/keymaps/rgbmod/rules.mk b/keyboards/phantom/keymaps/rgbmod/rules.mk index 2892bb424dcd..e4865902cead 100644 --- a/keyboards/phantom/keymaps/rgbmod/rules.mk +++ b/keyboards/phantom/keymaps/rgbmod/rules.mk @@ -18,14 +18,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/phantom/rules.mk b/keyboards/phantom/rules.mk index 1c8d7b916d16..79c64ac7afc3 100644 --- a/keyboards/phantom/rules.mk +++ b/keyboards/phantom/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/pinky/rules.mk b/keyboards/pinky/rules.mk index 395afeff0e6b..2e315382ff26 100644 --- a/keyboards/pinky/rules.mk +++ b/keyboards/pinky/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes diff --git a/keyboards/plaid/rules.mk b/keyboards/plaid/rules.mk index e020114b3340..068ebe4ba9c4 100644 --- a/keyboards/plaid/rules.mk +++ b/keyboards/plaid/rules.mk @@ -17,10 +17,10 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -28,12 +28,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x12 planck_mit LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk index 7fb0dec50fe0..ff4d8daedc66 100644 --- a/keyboards/planck/ez/rules.mk +++ b/keyboards/planck/ez/rules.mk @@ -5,11 +5,11 @@ MCU = STM32F303 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk index 0d86bb8a5580..e64f6e2f18bf 100644 --- a/keyboards/planck/light/rules.mk +++ b/keyboards/planck/light/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk index 3c85e172be1f..98ae26cbed0e 100644 --- a/keyboards/planck/rev1/rules.mk +++ b/keyboards/planck/rev1/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk index 3c85e172be1f..98ae26cbed0e 100644 --- a/keyboards/planck/rev2/rules.mk +++ b/keyboards/planck/rev2/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index 3c85e172be1f..98ae26cbed0e 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index 299ee4aadcd8..8454ea0e7288 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk index 3c95f132c989..49585725455c 100644 --- a/keyboards/planck/rev5/rules.mk +++ b/keyboards/planck/rev5/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = qmk-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 429fc50a2c4a..49f6088c375c 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -5,11 +5,11 @@ MCU = STM32F303 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/playkbtw/ca66/rules.mk b/keyboards/playkbtw/ca66/rules.mk index 28cb37adec5b..c3371db0f9ec 100644 --- a/keyboards/playkbtw/ca66/rules.mk +++ b/keyboards/playkbtw/ca66/rules.mk @@ -15,9 +15,9 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BOOTMAGIC_ENABLE = lite -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/playkbtw/pk60/rules.mk b/keyboards/playkbtw/pk60/rules.mk index 2c812e36589c..23b186842922 100644 --- a/keyboards/playkbtw/pk60/rules.mk +++ b/keyboards/playkbtw/pk60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index 2d74f3823560..9be496ce791b 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index 06315b2c6c25..b98f9b52c8a3 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = qmk-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index ad8a82967920..4c5d2f2ffecd 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -5,11 +5,11 @@ MCU = STM32F303 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk index 752497265cc1..0a08cc2ccda5 100644 --- a/keyboards/primekb/prime_e/rules.mk +++ b/keyboards/primekb/prime_e/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/primekb/prime_l/rules.mk b/keyboards/primekb/prime_l/rules.mk index d7aca43dfc90..f6979a626f53 100644 --- a/keyboards/primekb/prime_l/rules.mk +++ b/keyboards/primekb/prime_l/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk index 615750bfb27a..160ed208859f 100644 --- a/keyboards/primekb/prime_m/rules.mk +++ b/keyboards/primekb/prime_m/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_5x6 numpad_5x6 diff --git a/keyboards/primekb/prime_o/rules.mk b/keyboards/primekb/prime_o/rules.mk index e9b7f1558b0e..8c2353de54f6 100644 --- a/keyboards/primekb/prime_o/rules.mk +++ b/keyboards/primekb/prime_o/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/primekb/prime_r/rules.mk b/keyboards/primekb/prime_r/rules.mk index 505ffe1e639d..fb3fd385e3b0 100644 --- a/keyboards/primekb/prime_r/rules.mk +++ b/keyboards/primekb/prime_r/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/puck/rules.mk b/keyboards/puck/rules.mk index 1bd0b8b1dd2d..90519649efa4 100644 --- a/keyboards/puck/rules.mk +++ b/keyboards/puck/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = halfkay # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk index 4b51619da11c..62b1a397b46a 100644 --- a/keyboards/quantrik/kyuu/rules.mk +++ b/keyboards/quantrik/kyuu/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/qwertyydox/rules.mk b/keyboards/qwertyydox/rules.mk index 4faab2607ba4..bad5a268afe1 100644 --- a/keyboards/qwertyydox/rules.mk +++ b/keyboards/qwertyydox/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/rabbit/rabbit68/rules.mk b/keyboards/rabbit/rabbit68/rules.mk index 1bf19e4e1995..b4d53d2e89a8 100644 --- a/keyboards/rabbit/rabbit68/rules.mk +++ b/keyboards/rabbit/rabbit68/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/redox/rules.mk b/keyboards/redox/rules.mk index 165008f1f047..8ee269a141ab 100644 --- a/keyboards/redox/rules.mk +++ b/keyboards/redox/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/redox_w/rules.mk b/keyboards/redox_w/rules.mk index 22e8cb6b310e..8b171f717b0a 100644 --- a/keyboards/redox_w/rules.mk +++ b/keyboards/redox_w/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/redscarf_iiplus/verb/rules.mk b/keyboards/redscarf_iiplus/verb/rules.mk index 169e69d39f18..395010b6253e 100755 --- a/keyboards/redscarf_iiplus/verb/rules.mk +++ b/keyboards/redscarf_iiplus/verb/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = yes SRC += matrix.c diff --git a/keyboards/redscarf_iiplus/verc/rules.mk b/keyboards/redscarf_iiplus/verc/rules.mk index e62b78dc6510..0157596c0617 100755 --- a/keyboards/redscarf_iiplus/verc/rules.mk +++ b/keyboards/redscarf_iiplus/verc/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = yes SRC += matrix.c diff --git a/keyboards/reviung34/rules.mk b/keyboards/reviung34/rules.mk index 67f2386e0367..036fb0c30942 100755 --- a/keyboards/reviung34/rules.mk +++ b/keyboards/reviung34/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/reviung39/rules.mk b/keyboards/reviung39/rules.mk index 67f2386e0367..036fb0c30942 100644 --- a/keyboards/reviung39/rules.mk +++ b/keyboards/reviung39/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/rgbkb/sol/keymaps/default/rules.mk b/keyboards/rgbkb/sol/keymaps/default/rules.mk index 269cf20273ed..7efa721e3277 100644 --- a/keyboards/rgbkb/sol/keymaps/default/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # Example: # if you wanted to disable EXTRAKEY_ENABLE, you would copy the line from the rev1/rules.mk file # and paste it in to this file, changing the yes to no. Like so: -# EXTRAKEY_ENABLE = no # Audio control and System control(+450) +# EXTRAKEY_ENABLE = no # Audio control and System control # # To keep things clean and tidy, as well as make upgrades easier, only place overrides from the defaults in this file. diff --git a/keyboards/rgbkb/sol/rev1/rules.mk b/keyboards/rgbkb/sol/rev1/rules.mk index dd6d25eb9841..7be64231c31a 100644 --- a/keyboards/rgbkb/sol/rev1/rules.mk +++ b/keyboards/rgbkb/sol/rev1/rules.mk @@ -1,14 +1,14 @@ # RGBKB Sol Rev1 Defaults # Keycode Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control UNICODE_ENABLE = no # Unicode keycodes NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # Debug Options -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # RGB Options diff --git a/keyboards/rgbkb/sol/rev2/rules.mk b/keyboards/rgbkb/sol/rev2/rules.mk index 40f4c4b8cab2..debe8fe6bbd1 100644 --- a/keyboards/rgbkb/sol/rev2/rules.mk +++ b/keyboards/rgbkb/sol/rev2/rules.mk @@ -8,7 +8,7 @@ UNICODE_ENABLE = no # Unicode keycodes NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # Debug Options -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # RGB Options diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk index 4193d23e01ab..dd1399580ec7 100644 --- a/keyboards/rgbkb/zen/rules.mk +++ b/keyboards/rgbkb/zen/rules.mk @@ -30,10 +30,10 @@ endif # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work MIDI_ENABLE = no # MIDI controls diff --git a/keyboards/rgbkb/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk index 955221fdf232..83706cdf2c77 100644 --- a/keyboards/rgbkb/zygomorph/rules.mk +++ b/keyboards/rgbkb/zygomorph/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes LAYOUTS = ortho_4x12 ortho_5x12 diff --git a/keyboards/runner3680/rules.mk b/keyboards/runner3680/rules.mk index 3a0b190aefde..2bf7ea0cb243 100644 --- a/keyboards/runner3680/rules.mk +++ b/keyboards/runner3680/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes # Enables split keyboard support diff --git a/keyboards/s7_elephant/rules.mk b/keyboards/s7_elephant/rules.mk index 6cbcb56aea5f..91fe85c3dfb1 100644 --- a/keyboards/s7_elephant/rules.mk +++ b/keyboards/s7_elephant/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index a3461f314215..ff2b9a258cee 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk @@ -14,16 +14,16 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/sck/neiso/rules.mk b/keyboards/sck/neiso/rules.mk index becaf5e1e097..221054879c6d 100644 --- a/keyboards/sck/neiso/rules.mk +++ b/keyboards/sck/neiso/rules.mk @@ -25,7 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/sck/osa/rules.mk b/keyboards/sck/osa/rules.mk index 2d4a95c9e933..c921304497c2 100644 --- a/keyboards/sck/osa/rules.mk +++ b/keyboards/sck/osa/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/scythe/rules.mk b/keyboards/scythe/rules.mk index 54f2f7a52920..d268951e33c7 100644 --- a/keyboards/scythe/rules.mk +++ b/keyboards/scythe/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes # Use shared split_common RGBLIGHT_SPLIT = yes diff --git a/keyboards/sentraq/number_pad/rules.mk b/keyboards/sentraq/number_pad/rules.mk index 8df6c4c7c5be..7c87642acc64 100644 --- a/keyboards/sentraq/number_pad/rules.mk +++ b/keyboards/sentraq/number_pad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/sentraq/s60_x/default/rules.mk b/keyboards/sentraq/s60_x/default/rules.mk index 8b3674cd81c7..3b0123941221 100644 --- a/keyboards/sentraq/s60_x/default/rules.mk +++ b/keyboards/sentraq/s60_x/default/rules.mk @@ -14,9 +14,9 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/sentraq/s60_x/rgb/rules.mk b/keyboards/sentraq/s60_x/rgb/rules.mk index efd66a1ba1dc..f765aa8bbc25 100644 --- a/keyboards/sentraq/s60_x/rgb/rules.mk +++ b/keyboards/sentraq/s60_x/rgb/rules.mk @@ -14,9 +14,9 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work @@ -24,7 +24,7 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/sentraq/s65_plus/rules.mk b/keyboards/sentraq/s65_plus/rules.mk index f4da10aa1667..8424d60e4a22 100644 --- a/keyboards/sentraq/s65_plus/rules.mk +++ b/keyboards/sentraq/s65_plus/rules.mk @@ -14,9 +14,9 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend MIDI_ENABLE = no # MIDI controls diff --git a/keyboards/sentraq/s65_x/rules.mk b/keyboards/sentraq/s65_x/rules.mk index a6a2319c2373..a9cbd2518d08 100644 --- a/keyboards/sentraq/s65_x/rules.mk +++ b/keyboards/sentraq/s65_x/rules.mk @@ -14,9 +14,9 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend MIDI_ENABLE = no # MIDI controls diff --git a/keyboards/shiro/rules.mk b/keyboards/shiro/rules.mk index 03c1bc8f868f..fa18648913d8 100644 --- a/keyboards/shiro/rules.mk +++ b/keyboards/shiro/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/signum/3_0/elitec/rules.mk b/keyboards/signum/3_0/elitec/rules.mk index 6393e0f93fbd..436c5f0ce218 100644 --- a/keyboards/signum/3_0/elitec/rules.mk +++ b/keyboards/signum/3_0/elitec/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk index 53cf934c4061..3effc08505d7 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +# MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +# CONSOLE_ENABLE = yes # Console for debug # COMMAND_ENABLE = yes # Commands for debug and configuration # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/sixkeyboard/rules.mk b/keyboards/sixkeyboard/rules.mk index 5b89ff4e6251..889ea2fd10ee 100644 --- a/keyboards/sixkeyboard/rules.mk +++ b/keyboards/sixkeyboard/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/smk60/rules.mk b/keyboards/smk60/rules.mk index cbb1c8b74b08..45c73d75be22 100644 --- a/keyboards/smk60/rules.mk +++ b/keyboards/smk60/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/snagpad/rules.mk b/keyboards/snagpad/rules.mk index 9256eaed120c..566a398feb63 100644 --- a/keyboards/snagpad/rules.mk +++ b/keyboards/snagpad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/snampad/rules.mk b/keyboards/snampad/rules.mk index 1a1fbe6bc5e6..91b492ba4af3 100644 --- a/keyboards/snampad/rules.mk +++ b/keyboards/snampad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,11 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = numpad_6x4 diff --git a/keyboards/southpole/rules.mk b/keyboards/southpole/rules.mk index d6b65e96091e..f1bf7c8fd99a 100644 --- a/keyboards/southpole/rules.mk +++ b/keyboards/southpole/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/spacetime/rules.mk b/keyboards/spacetime/rules.mk index aa1a8892597e..7dd7761906a3 100644 --- a/keyboards/spacetime/rules.mk +++ b/keyboards/spacetime/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs OLED_DRIVER_ENABLE = no # Enable generic behavior for split boards diff --git a/keyboards/speedo/rules.mk b/keyboards/speedo/rules.mk index 4295e2ad7ec1..b961b08c06c9 100644 --- a/keyboards/speedo/rules.mk +++ b/keyboards/speedo/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/standaside/rules.mk b/keyboards/standaside/rules.mk index 1d92c731c3aa..296081722343 100644 --- a/keyboards/standaside/rules.mk +++ b/keyboards/standaside/rules.mk @@ -14,20 +14,20 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs RGBLIGHT_ENABLE = yes # Enable RGB underlighting support diff --git a/keyboards/staryu/rules.mk b/keyboards/staryu/rules.mk index 52bb72ca7f19..c970388048ad 100755 --- a/keyboards/staryu/rules.mk +++ b/keyboards/staryu/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = lufa-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/stella/rules.mk b/keyboards/stella/rules.mk index b6b8f884178e..1f4d192283a9 100644 --- a/keyboards/stella/rules.mk +++ b/keyboards/stella/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs # Supported layouts LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk index 4d1c4c1c5570..abff350ea0c7 100644 --- a/keyboards/subatomic/rules.mk +++ b/keyboards/subatomic/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/suihankey/rules.mk b/keyboards/suihankey/rules.mk index d4c2e54b13fa..e3b91d3dacb8 100644 --- a/keyboards/suihankey/rules.mk +++ b/keyboards/suihankey/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs OLED_DRIVER_ENABLE = yes SPLIT_KEYBOARD = no diff --git a/keyboards/sx60/rules.mk b/keyboards/sx60/rules.mk index 4c711dc880ce..64b2f2b2c29a 100755 --- a/keyboards/sx60/rules.mk +++ b/keyboards/sx60/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work From db2f1874935ed71e5897b16ee01b7424ac44fb6e Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 30 Jan 2020 11:37:00 -0800 Subject: [PATCH 167/331] Documentation: KBD75 (#8038) * update kbd75 readme * update bmini readme * update wkl.kr readme * Update keyboards/kbdfans/kbd75/readme.md * Update keyboards/kbdfans/kbd75/readme.md --- keyboards/kbdfans/kbd75/readme.md | 10 ++++++---- keyboards/winkeyless/bmini/readme.md | 8 ++++++-- keyboards/winkeyless/readme.md | 12 +++++++++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/keyboards/kbdfans/kbd75/readme.md b/keyboards/kbdfans/kbd75/readme.md index 89fe2741618c..09f06a6ad593 100644 --- a/keyboards/kbdfans/kbd75/readme.md +++ b/keyboards/kbdfans/kbd75/readme.md @@ -4,10 +4,12 @@ Keyboard Maintainer: QMK Community Hardware Supported: KBD75 PCB rev 1 and 2 Hardware Availability: https://kbdfans.myshopify.com/products/kbd75-keyboard-set?variant=35638534029 -The KBD75 has two revisions. Revision 2 has a USB C port and allows a numpad layout. `.hex` files made -for KBD75 revision 1, will still work for revision 2. `.hex` files made for revision 2 (excluding the numpad) -will also still work on revision 1. Both revisions share the same switch matrix but have switch holes in -different areas. +The KBD75 was sold through various rounds, with various PCB changes between them. + +* **Round 1 (2017)**: Black PCB - Bootmapper Client, atmega32a MCU (Use [Winkeyless.kr B.mini](../../winkeyless/bmini/) firmware) +* **Round 2 (2018)**: White PCB - Bootmapper Client, atmega32a MCU (Use [Winkeyless.kr B.mini](../../winkeyless/bmini/) firmware) +* **Round 3-5 (2018)**: White PCB - QMK Firmware, atmega32u4 MCU (Use KBD75 rev1 or rev2(without numpad support)) +* **Round 6 (2019)**: White PCB with USB C - QMK Firmware, atmega32u4 MCU (Use KBD75 rev1 or rev2(with numpad support)) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/winkeyless/bmini/readme.md b/keyboards/winkeyless/bmini/readme.md index b8cc8549500d..0512ed7bea1d 100644 --- a/keyboards/winkeyless/bmini/readme.md +++ b/keyboards/winkeyless/bmini/readme.md @@ -1,6 +1,8 @@ # B.mini -A 75% keyboard with RGB +A 75% keyboard with RGB underglow. + +QMK Firmware is not the official firmware for the B.mini. * Keyboard Maintainer: QMK Community * Hardware Supported: B.mini PCB @@ -14,6 +16,8 @@ Flashing example for this keyboard ([after setting up the bootloadHID flashing e make winkeyless/bmini:default:flash -**Reset Key**: Hold down the key located at *LOCATION*, commonly programmed as *KEY* while plugging in the keyboard. +This firmware can be flashed onto the KBDFans KBD75 Round 1 and Round 2 Bootmapper Client boards sold during the 2017 and early 2018 timeframe. + +**Reset Key**: Hold down the bottom left most key located at `K00`, commonly programmed as Left Control while plugging in the keyboard. See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/winkeyless/readme.md b/keyboards/winkeyless/readme.md index e6cb45fc4741..91719f6da0ea 100644 --- a/keyboards/winkeyless/readme.md +++ b/keyboards/winkeyless/readme.md @@ -1,7 +1,13 @@ # Winkeyless -[Winkeyless](https://www.winkeyless.kr) is a Korean keyboard company popular for creating the Boot Mapper Client (BMC) firmware. Most Winkeyless boards were low profile and constructed out of acrylic showcasing their RGB underglow capabilities. +[Winkeyless](https://www.winkeyless.kr) is a Korean keyboard company popular for creating the Boot Mapper Client (BMC) firmware. -In late 2018, Winkeyless closed its doors due to the numerous unlicensed implementations of its hardware and software. +Winkeyless used an atmega32a MCU, mini USB B, and utilized the same MCU pins across all their PCBs. Their reset button was always +tied to pins `A0` and `B0` on the atmega32a MCU. -This directory contains official Winkeyless boards that have had QMK ported to work with them. +Most Winkeyless boards were low profile and constructed out of acrylic showcasing their RGB underglow capabilities. + +In late 2018, Winkeyless closed its doors. The numerous unlicensed implementations of its hardware and software were cited as one +of many reasons for shutting down. + +This directory contains official Winkeyless boards that have had QMK firmware ported to work with them. From 17a089d21b261777f4fa48af34b6e012d69d3945 Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Thu, 30 Jan 2020 17:10:23 -0500 Subject: [PATCH 168/331] Trim firmware size changes from default rules.mk, part 4 (#8046) * Trim firmware size changes from default-ish rules.mk files * Trim sizes from westfoxtrot boards --- keyboards/tada68/keymaps/iso-nor/rules.mk | 8 ++++---- keyboards/tada68/keymaps/iso-uk/rules.mk | 8 ++++---- keyboards/tada68/keymaps/rgb/rules.mk | 8 ++++---- keyboards/tanuki/rules.mk | 12 ++++++------ keyboards/telophase/rules.mk | 8 ++++---- keyboards/tetris/rules.mk | 8 ++++---- keyboards/thevankeyboards/bananasplit/rules.mk | 8 ++++---- keyboards/thevankeyboards/caravan/rules.mk | 8 ++++---- keyboards/thevankeyboards/minivan/rules.mk | 8 ++++---- keyboards/thevankeyboards/roadkit/rules.mk | 8 ++++---- keyboards/tkc1800/rules.mk | 8 ++++---- keyboards/toad/rules.mk | 8 ++++---- keyboards/tokyo60/rules.mk | 8 ++++---- keyboards/touchpad/rules.mk | 8 ++++---- keyboards/treadstone32/rules.mk | 8 ++++---- keyboards/treasure/type9/rules.mk | 12 ++++++------ keyboards/uk78/rules.mk | 8 ++++---- keyboards/ut472/rules.mk | 10 +++++----- keyboards/uzu42/rules.mk | 8 ++++---- keyboards/v60_type_r/rules.mk | 10 +++++----- keyboards/vision_division/rules.mk | 8 ++++---- keyboards/vitamins_included/rules.mk | 8 ++++---- keyboards/vn66/rules.mk | 12 ++++++------ keyboards/waldo/rules.mk | 8 ++++---- keyboards/westfoxtrot/aanzee/rules.mk | 12 ++++++------ keyboards/westfoxtrot/cyclops/rules.mk | 12 ++++++------ keyboards/westfoxtrot/cypher/rev1/rules.mk | 12 ++++++------ keyboards/wilba_tech/rama_works_koyu/rules.mk | 8 ++++---- keyboards/wilba_tech/rama_works_m10_b/rules.mk | 10 +++++----- keyboards/wilba_tech/rama_works_m60_a/rules.mk | 8 ++++---- keyboards/wilba_tech/rama_works_m6_a/rules.mk | 8 ++++---- keyboards/wilba_tech/rama_works_m6_b/rules.mk | 8 ++++---- keyboards/wilba_tech/rama_works_u80_a/rules.mk | 10 +++++----- keyboards/wilba_tech/wt60_a/rules.mk | 10 +++++----- keyboards/wilba_tech/wt60_d/rules.mk | 10 +++++----- keyboards/wilba_tech/wt65_a/rules.mk | 10 +++++----- keyboards/wilba_tech/wt65_b/rules.mk | 10 +++++----- keyboards/wilba_tech/wt69_a/rules.mk | 10 +++++----- keyboards/wilba_tech/wt75_a/rules.mk | 10 +++++----- keyboards/wilba_tech/wt75_b/rules.mk | 10 +++++----- keyboards/wilba_tech/wt75_c/rules.mk | 10 +++++----- keyboards/wilba_tech/wt80_a/rules.mk | 10 +++++----- keyboards/wilba_tech/wt8_a/rules.mk | 10 +++++----- keyboards/wilba_tech/zeal60/rules.mk | 8 ++++---- keyboards/wilba_tech/zeal65/rules.mk | 8 ++++---- keyboards/xbows/woody/rules.mk | 2 +- keyboards/xd004/v1/rules.mk | 6 +++--- keyboards/xd60/rev2/rules.mk | 8 ++++---- keyboards/xd60/rev3/rules.mk | 8 ++++---- keyboards/xd75/rules.mk | 10 +++++----- keyboards/xd84/rules.mk | 12 ++++++------ keyboards/xd87/rules.mk | 12 ++++++------ keyboards/xd96/rules.mk | 12 ++++++------ keyboards/xmmx/rules.mk | 8 ++++---- keyboards/xw60/rules.mk | 8 ++++---- keyboards/yd60mq/rules.mk | 8 ++++---- keyboards/yd68/rules.mk | 12 ++++++------ keyboards/yosino58/rules.mk | 8 ++++---- keyboards/z150_blackheart/rules.mk | 8 ++++---- keyboards/zinc/keymaps/default/rules.mk | 8 ++++---- keyboards/zinc/rules.mk | 8 ++++---- keyboards/zj68/rules.mk | 8 ++++---- keyboards/zlant/rules.mk | 8 ++++---- 63 files changed, 283 insertions(+), 283 deletions(-) diff --git a/keyboards/tada68/keymaps/iso-nor/rules.mk b/keyboards/tada68/keymaps/iso-nor/rules.mk index 53644093d6c4..5cbbc3453683 100644 --- a/keyboards/tada68/keymaps/iso-nor/rules.mk +++ b/keyboards/tada68/keymaps/iso-nor/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/tada68/keymaps/iso-uk/rules.mk b/keyboards/tada68/keymaps/iso-uk/rules.mk index 53644093d6c4..5cbbc3453683 100644 --- a/keyboards/tada68/keymaps/iso-uk/rules.mk +++ b/keyboards/tada68/keymaps/iso-uk/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/tada68/keymaps/rgb/rules.mk b/keyboards/tada68/keymaps/rgb/rules.mk index e72478251372..247c9861651c 100644 --- a/keyboards/tada68/keymaps/rgb/rules.mk +++ b/keyboards/tada68/keymaps/rgb/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/tanuki/rules.mk b/keyboards/tanuki/rules.mk index 516c3db5e689..f8a4ecec3f16 100644 --- a/keyboards/tanuki/rules.mk +++ b/keyboards/tanuki/rules.mk @@ -14,14 +14,14 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE =yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE =yes # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/telophase/rules.mk b/keyboards/telophase/rules.mk index 2c8df3295d1e..240a89e85b22 100644 --- a/keyboards/telophase/rules.mk +++ b/keyboards/telophase/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk index 15fcf5cf6d6c..ca5a1133380d 100755 --- a/keyboards/tetris/rules.mk +++ b/keyboards/tetris/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/thevankeyboards/bananasplit/rules.mk b/keyboards/thevankeyboards/bananasplit/rules.mk index 19f0e81f51e4..4530a87f6ea0 100644 --- a/keyboards/thevankeyboards/bananasplit/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA diff --git a/keyboards/thevankeyboards/caravan/rules.mk b/keyboards/thevankeyboards/caravan/rules.mk index f21c31f6fde4..4bdaec4db873 100644 --- a/keyboards/thevankeyboards/caravan/rules.mk +++ b/keyboards/thevankeyboards/caravan/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default diff --git a/keyboards/thevankeyboards/minivan/rules.mk b/keyboards/thevankeyboards/minivan/rules.mk index 3a2b8ae58400..d9a34f38b90e 100644 --- a/keyboards/thevankeyboards/minivan/rules.mk +++ b/keyboards/thevankeyboards/minivan/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/thevankeyboards/roadkit/rules.mk b/keyboards/thevankeyboards/roadkit/rules.mk index 79cbec757fd4..e8ab28cb5a4b 100644 --- a/keyboards/thevankeyboards/roadkit/rules.mk +++ b/keyboards/thevankeyboards/roadkit/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc1800/rules.mk index 21e3697dc6a5..60140160c2fb 100644 --- a/keyboards/tkc1800/rules.mk +++ b/keyboards/tkc1800/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/toad/rules.mk b/keyboards/toad/rules.mk index df45fa5df0e4..731b405c0528 100644 --- a/keyboards/toad/rules.mk +++ b/keyboards/toad/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= no # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/tokyo60/rules.mk b/keyboards/tokyo60/rules.mk index 644e6a5412ec..87714ec6c603 100644 --- a/keyboards/tokyo60/rules.mk +++ b/keyboards/tokyo60/rules.mk @@ -14,9 +14,9 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work @@ -24,7 +24,7 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/touchpad/rules.mk b/keyboards/touchpad/rules.mk index 21642c3d28b7..14aac23d4963 100644 --- a/keyboards/touchpad/rules.mk +++ b/keyboards/touchpad/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/treadstone32/rules.mk b/keyboards/treadstone32/rules.mk index dbc46b403c06..d779e70020b7 100644 --- a/keyboards/treadstone32/rules.mk +++ b/keyboards/treadstone32/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/treasure/type9/rules.mk b/keyboards/treasure/type9/rules.mk index 370c683a544a..d4b1f6f99392 100644 --- a/keyboards/treasure/type9/rules.mk +++ b/keyboards/treasure/type9/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/uk78/rules.mk b/keyboards/uk78/rules.mk index ddd799c08e14..40fc506aa006 100644 --- a/keyboards/uk78/rules.mk +++ b/keyboards/uk78/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/ut472/rules.mk b/keyboards/ut472/rules.mk index 1dd477652b13..ef114faa1f13 100644 --- a/keyboards/ut472/rules.mk +++ b/keyboards/ut472/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/uzu42/rules.mk b/keyboards/uzu42/rules.mk index aea23f3cd0ec..600e0c94c838 100644 --- a/keyboards/uzu42/rules.mk +++ b/keyboards/uzu42/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 37acd03d1a52..94205df11f99 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -26,7 +26,7 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable the RGB Underglow RGBLIGHT_CUSTOM_DRIVER = yes -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/vision_division/rules.mk b/keyboards/vision_division/rules.mk index 960210046d64..5d9d515f7ac2 100644 --- a/keyboards/vision_division/rules.mk +++ b/keyboards/vision_division/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk index d81b4a9146c5..0d615b41f07f 100644 --- a/keyboards/vitamins_included/rules.mk +++ b/keyboards/vitamins_included/rules.mk @@ -8,13 +8,13 @@ MCU = atmega32u4 AUDIO_ENABLE = yes # Audio output on port C6 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration COMMAND_ENABLE = no # Commands for debug and configuration -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug DEBUG_ENABLE = no # Enable more debug info -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control MIDI_ENABLE = no # MIDI controls -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. UNICODE_ENABLE = no # Unicode diff --git a/keyboards/vn66/rules.mk b/keyboards/vn66/rules.mk index 37005c127670..6575b3fd6f1f 100644 --- a/keyboards/vn66/rules.mk +++ b/keyboards/vn66/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,10 +25,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk index c174a9eb96e5..db9db239d395 100644 --- a/keyboards/waldo/rules.mk +++ b/keyboards/waldo/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/westfoxtrot/aanzee/rules.mk b/keyboards/westfoxtrot/aanzee/rules.mk index 5032b0d296be..b1f66767d427 100644 --- a/keyboards/westfoxtrot/aanzee/rules.mk +++ b/keyboards/westfoxtrot/aanzee/rules.mk @@ -14,14 +14,14 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode diff --git a/keyboards/westfoxtrot/cyclops/rules.mk b/keyboards/westfoxtrot/cyclops/rules.mk index 04b2bc82f65c..03b28cbeffca 100644 --- a/keyboards/westfoxtrot/cyclops/rules.mk +++ b/keyboards/westfoxtrot/cyclops/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/westfoxtrot/cypher/rev1/rules.mk b/keyboards/westfoxtrot/cypher/rev1/rules.mk index 4703282ff274..ccf5ec1ea027 100644 --- a/keyboards/westfoxtrot/cypher/rev1/rules.mk +++ b/keyboards/westfoxtrot/cypher/rev1/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index 80a3b32b2b5e..809ab26d0ed3 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rules.mk +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk @@ -20,10 +20,10 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk index e970f6c7a277..5ccb9456adbb 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_b/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index e4e934bdba4e..7e76a962a23d 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk @@ -20,10 +20,10 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk index 26185cb38f54..6a60c5423bc8 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk @@ -19,10 +19,10 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk index 05212a3be239..51d1a0c8053a 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk @@ -19,10 +19,10 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index 443776d4a3cb..5bda0f51a44f 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index c59e94e83c12..53177bf165ae 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index a5c98a1c60d7..6e5ad12f8dd7 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index c59e94e83c12..53177bf165ae 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index c59e94e83c12..53177bf165ae 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index 25f3ecbf19c4..a9ce761ca4dd 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index c59e94e83c12..53177bf165ae 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index c59e94e83c12..53177bf165ae 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk index c59e94e83c12..53177bf165ae 100644 --- a/keyboards/wilba_tech/wt75_c/rules.mk +++ b/keyboards/wilba_tech/wt75_c/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index c59e94e83c12..53177bf165ae 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index 25f3ecbf19c4..a9ce761ca4dd 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index 3067be73d36c..31c960c22ee8 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk @@ -20,10 +20,10 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk index 94d487cbb721..fcf3d0763724 100644 --- a/keyboards/wilba_tech/zeal65/rules.mk +++ b/keyboards/wilba_tech/zeal65/rules.mk @@ -20,10 +20,10 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/xbows/woody/rules.mk b/keyboards/xbows/woody/rules.mk index 2a9fcb7fc344..147acc58cc5a 100644 --- a/keyboards/xbows/woody/rules.mk +++ b/keyboards/xbows/woody/rules.mk @@ -3,7 +3,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration BACKLIGHT_ENABLE = no MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/xd004/v1/rules.mk b/keyboards/xd004/v1/rules.mk index e17ca648e19d..18f7d8041cd0 100644 --- a/keyboards/xd004/v1/rules.mk +++ b/keyboards/xd004/v1/rules.mk @@ -13,9 +13,9 @@ BOOTLOADER = atmel-dfu # Build Options BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/xd60/rev2/rules.mk b/keyboards/xd60/rev2/rules.mk index b6a8c05d2ff0..1c96804e77aa 100644 --- a/keyboards/xd60/rev2/rules.mk +++ b/keyboards/xd60/rev2/rules.mk @@ -12,10 +12,10 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk index 7cff162c9f96..3c7c967124bf 100644 --- a/keyboards/xd60/rev3/rules.mk +++ b/keyboards/xd60/rev3/rules.mk @@ -12,10 +12,10 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/xd75/rules.mk b/keyboards/xd75/rules.mk index 9052c8c12381..e822f37eacf8 100644 --- a/keyboards/xd75/rules.mk +++ b/keyboards/xd75/rules.mk @@ -15,14 +15,14 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index 13e1b4ba37c2..cf4e64361270 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LINK_TIME_OPTIMIZATION_ENABLE = yes # custom matrix setup diff --git a/keyboards/xd87/rules.mk b/keyboards/xd87/rules.mk index 3e8e4e1f512b..5797e535a913 100644 --- a/keyboards/xd87/rules.mk +++ b/keyboards/xd87/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs # Supported layouts LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index 9afd4eec4e4b..0c56a5ac002b 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,12 +25,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LINK_TIME_OPTIMIZATION_ENABLE = yes # custom matrix setup diff --git a/keyboards/xmmx/rules.mk b/keyboards/xmmx/rules.mk index df45fa5df0e4..731b405c0528 100644 --- a/keyboards/xmmx/rules.mk +++ b/keyboards/xmmx/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= no # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk index 913ac3c02424..b8629daeb862 100644 --- a/keyboards/xw60/rules.mk +++ b/keyboards/xw60/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index 1e6d4bb7cdff..c1f1f22ba343 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/yd68/rules.mk b/keyboards/yd68/rules.mk index 420ab38bf5da..48283f11998f 100644 --- a/keyboards/yd68/rules.mk +++ b/keyboards/yd68/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/yosino58/rules.mk b/keyboards/yosino58/rules.mk index 5d3885fb2f4d..57e06ed5f600 100644 --- a/keyboards/yosino58/rules.mk +++ b/keyboards/yosino58/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/z150_blackheart/rules.mk b/keyboards/z150_blackheart/rules.mk index 150af8dabc12..739bea3932e8 100644 --- a/keyboards/z150_blackheart/rules.mk +++ b/keyboards/z150_blackheart/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/zinc/keymaps/default/rules.mk b/keyboards/zinc/keymaps/default/rules.mk index d2bc96e3afe1..c980f7d00bfa 100644 --- a/keyboards/zinc/keymaps/default/rules.mk +++ b/keyboards/zinc/keymaps/default/rules.mk @@ -2,10 +2,10 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/zinc/rules.mk b/keyboards/zinc/rules.mk index d9d840c2d0a8..63a8cc8fc3db 100644 --- a/keyboards/zinc/rules.mk +++ b/keyboards/zinc/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality diff --git a/keyboards/zj68/rules.mk b/keyboards/zj68/rules.mk index 648553cc4141..b4ed641be5c8 100644 --- a/keyboards/zj68/rules.mk +++ b/keyboards/zj68/rules.mk @@ -15,10 +15,10 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no diff --git a/keyboards/zlant/rules.mk b/keyboards/zlant/rules.mk index 82bc13c60ebc..5221b4e33eb2 100755 --- a/keyboards/zlant/rules.mk +++ b/keyboards/zlant/rules.mk @@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work From 31e4583f4a171823cfa639cc6a9795e892c0455f Mon Sep 17 00:00:00 2001 From: Yatara <43754086+yatara-cc@users.noreply.github.com> Date: Thu, 30 Jan 2020 23:37:23 +0100 Subject: [PATCH 169/331] [Keyboard] Add support for Drink Me (#8039) * Add initial configuration and keymaps for Yatara Drink Me. * Apply suggestions from code review * Apply suggestions from code review * Add transparent layers in VIA layout so there are four layers in total. Amend closing bracket indentation in keymap.c files. --- keyboards/yatara/drink_me/config.h | 37 ++++++++++ keyboards/yatara/drink_me/drink_me.c | 17 +++++ keyboards/yatara/drink_me/drink_me.h | 25 +++++++ keyboards/yatara/drink_me/info.json | 34 ++++++++++ .../drink_me/keymaps/caterpillar/keymap.c | 10 +++ .../drink_me/keymaps/caterpillar/readme.md | 9 +++ .../drink_me/keymaps/cheshire_cat/keymap.c | 10 +++ .../drink_me/keymaps/cheshire_cat/readme.md | 13 ++++ .../yatara/drink_me/keymaps/default/keymap.c | 10 +++ .../yatara/drink_me/keymaps/default/readme.md | 11 +++ .../yatara/drink_me/keymaps/dormouse/keymap.c | 10 +++ .../drink_me/keymaps/dormouse/readme.md | 11 +++ .../yatara/drink_me/keymaps/dormouse/rules.mk | 1 + .../yatara/drink_me/keymaps/queen/config.h | 1 + .../yatara/drink_me/keymaps/queen/keymap.c | 67 +++++++++++++++++++ .../yatara/drink_me/keymaps/queen/readme.md | 20 ++++++ .../yatara/drink_me/keymaps/queen/rules.mk | 2 + .../yatara/drink_me/keymaps/via/keymap.c | 28 ++++++++ .../yatara/drink_me/keymaps/via/readme.md | 7 ++ .../yatara/drink_me/keymaps/via/rules.mk | 2 + keyboards/yatara/drink_me/readme.md | 17 +++++ keyboards/yatara/drink_me/rules.mk | 32 +++++++++ 22 files changed, 374 insertions(+) create mode 100644 keyboards/yatara/drink_me/config.h create mode 100644 keyboards/yatara/drink_me/drink_me.c create mode 100644 keyboards/yatara/drink_me/drink_me.h create mode 100644 keyboards/yatara/drink_me/info.json create mode 100644 keyboards/yatara/drink_me/keymaps/caterpillar/keymap.c create mode 100644 keyboards/yatara/drink_me/keymaps/caterpillar/readme.md create mode 100644 keyboards/yatara/drink_me/keymaps/cheshire_cat/keymap.c create mode 100644 keyboards/yatara/drink_me/keymaps/cheshire_cat/readme.md create mode 100644 keyboards/yatara/drink_me/keymaps/default/keymap.c create mode 100644 keyboards/yatara/drink_me/keymaps/default/readme.md create mode 100644 keyboards/yatara/drink_me/keymaps/dormouse/keymap.c create mode 100644 keyboards/yatara/drink_me/keymaps/dormouse/readme.md create mode 100644 keyboards/yatara/drink_me/keymaps/dormouse/rules.mk create mode 100644 keyboards/yatara/drink_me/keymaps/queen/config.h create mode 100644 keyboards/yatara/drink_me/keymaps/queen/keymap.c create mode 100644 keyboards/yatara/drink_me/keymaps/queen/readme.md create mode 100644 keyboards/yatara/drink_me/keymaps/queen/rules.mk create mode 100644 keyboards/yatara/drink_me/keymaps/via/keymap.c create mode 100644 keyboards/yatara/drink_me/keymaps/via/readme.md create mode 100644 keyboards/yatara/drink_me/keymaps/via/rules.mk create mode 100644 keyboards/yatara/drink_me/readme.md create mode 100644 keyboards/yatara/drink_me/rules.mk diff --git a/keyboards/yatara/drink_me/config.h b/keyboards/yatara/drink_me/config.h new file mode 100644 index 000000000000..f2ab371f8579 --- /dev/null +++ b/keyboards/yatara/drink_me/config.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Yatara + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1470 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yatara +#define PRODUCT Drink Me +#define DESCRIPTION 4% Ergo Macropad + +/* Key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* Pinout */ +#define DIRECT_PINS { \ + {B4, B5, B6, B7} \ +} +#define UNUSED_PINS diff --git a/keyboards/yatara/drink_me/drink_me.c b/keyboards/yatara/drink_me/drink_me.c new file mode 100644 index 000000000000..d5cac311aee0 --- /dev/null +++ b/keyboards/yatara/drink_me/drink_me.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Yatara + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "drink_me.h" diff --git a/keyboards/yatara/drink_me/drink_me.h b/keyboards/yatara/drink_me/drink_me.h new file mode 100644 index 000000000000..9ed6dbf2ea43 --- /dev/null +++ b/keyboards/yatara/drink_me/drink_me.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Yatara + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03 \ +) { \ + { K00, K01, K02, K03 } \ +} diff --git a/keyboards/yatara/drink_me/info.json b/keyboards/yatara/drink_me/info.json new file mode 100644 index 000000000000..0e021a70655a --- /dev/null +++ b/keyboards/yatara/drink_me/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "Drink Me", + "url": "https://github.com/yatara-cc", + "maintainer": "yatara-cc", + "width": 4, + "height": 1, + "layouts": { + "LAYOUT": { + "key_count": 4, + "layout": [ + { + "label": "K0", + "x": 0, + "y": 0 + }, + { + "label": "K1", + "x": 1, + "y": 0 + }, + { + "label": "K2", + "x": 2, + "y": 0 + }, + { + "label": "K3", + "x": 3, + "y": 0 + } + ] + } + } +} diff --git a/keyboards/yatara/drink_me/keymaps/caterpillar/keymap.c b/keyboards/yatara/drink_me/keymaps/caterpillar/keymap.c new file mode 100644 index 000000000000..f7bfdf1df530 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/caterpillar/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + LSFT(KC_O), + LSFT(KC_R), + LSFT(KC_U), + LSFT(KC_SLSH) + ) +}; diff --git a/keyboards/yatara/drink_me/keymaps/caterpillar/readme.md b/keyboards/yatara/drink_me/keymaps/caterpillar/readme.md new file mode 100644 index 000000000000..d04a30f238aa --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/caterpillar/readme.md @@ -0,0 +1,9 @@ +# Drink Me - Caterpillar layout + +> ‘Who are you?’ said the Caterpillar. + +![Drink Me - Default layout](https://i.imgur.com/BHWNATB.png) + +``` +O, R, U, ? +``` diff --git a/keyboards/yatara/drink_me/keymaps/cheshire_cat/keymap.c b/keyboards/yatara/drink_me/keymaps/cheshire_cat/keymap.c new file mode 100644 index 000000000000..528c1e408ee9 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/cheshire_cat/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_LEFT, + KC_DOWN, + KC_UP, + KC_RIGHT + ) +}; diff --git a/keyboards/yatara/drink_me/keymaps/cheshire_cat/readme.md b/keyboards/yatara/drink_me/keymaps/cheshire_cat/readme.md new file mode 100644 index 000000000000..1dd0d658a3e9 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/cheshire_cat/readme.md @@ -0,0 +1,13 @@ +# Drink Me - Cheshire Cat layout + +> ‘Would you tell me, please, which way I ought to go from here?’ +> +> ‘That depends a good deal on where you want to get to,’ said the Cat. + +Cursor keys in VI layout. + +![Drink Me - Default layout](https://i.imgur.com/E4cScrK.png) + +``` +Left, Down, Up, Right +``` diff --git a/keyboards/yatara/drink_me/keymaps/default/keymap.c b/keyboards/yatara/drink_me/keymaps/default/keymap.c new file mode 100644 index 000000000000..7864fd0c1ab2 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/default/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + LCTL(KC_Z), + LCTL(KC_X), + LCTL(KC_C), + LCTL(KC_V) + ) +}; diff --git a/keyboards/yatara/drink_me/keymaps/default/readme.md b/keyboards/yatara/drink_me/keymaps/default/readme.md new file mode 100644 index 000000000000..b4bf94831d4b --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# Drink Me - Default layout + +> It was so long since she had been anything near the right size, that it felt quite strange at first; but she got used to it in a few minutes + +Common shortcut keys. + +![Drink Me - Default layout](https://i.imgur.com/JLEEhHk.png) + +``` +Undo, Cut, Copy, Paste +``` diff --git a/keyboards/yatara/drink_me/keymaps/dormouse/keymap.c b/keyboards/yatara/drink_me/keymaps/dormouse/keymap.c new file mode 100644 index 000000000000..e2d29a026ab1 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/dormouse/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_SLEP, + KC_MUTE, + KC_VOLD, + KC_VOLU + ) +}; diff --git a/keyboards/yatara/drink_me/keymaps/dormouse/readme.md b/keyboards/yatara/drink_me/keymaps/dormouse/readme.md new file mode 100644 index 000000000000..1a8c854d44e0 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/dormouse/readme.md @@ -0,0 +1,11 @@ +# Drink Me - Dormouse layout + +> The Dormouse slowly opened his eyes. ‘I wasn’t asleep,’ he said in a hoarse, feeble voice: ‘I heard every word you fellows were saying.’ + +Sleep and volume control. + +![Drink Me - Default layout](https://i.imgur.com/VQXH512.png) + +``` +Sleep, Mute, Volume down, Volume up +``` diff --git a/keyboards/yatara/drink_me/keymaps/dormouse/rules.mk b/keyboards/yatara/drink_me/keymaps/dormouse/rules.mk new file mode 100644 index 000000000000..fcfd2225bcf8 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/dormouse/rules.mk @@ -0,0 +1 @@ +EXTRAKEY_ENABLE = yes diff --git a/keyboards/yatara/drink_me/keymaps/queen/config.h b/keyboards/yatara/drink_me/keymaps/queen/config.h new file mode 100644 index 000000000000..037c4737f6bd --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/queen/config.h @@ -0,0 +1 @@ +#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC diff --git a/keyboards/yatara/drink_me/keymaps/queen/keymap.c b/keyboards/yatara/drink_me/keymaps/queen/keymap.c new file mode 100644 index 000000000000..ee1804d64a55 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/queen/keymap.c @@ -0,0 +1,67 @@ +#include QMK_KEYBOARD_H + + +enum td_keys { + TD_K0, + TD_K1, + TD_K2, + TD_K3 +}; + + +void td_spade_lnx (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("2660"); + } else { + set_unicode_input_mode(UC_LNX); + } + reset_tap_dance(state); +} + + +void td_diamond_osx (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("2666"); + } else { + set_unicode_input_mode(UC_OSX); + } + reset_tap_dance(state); +} + + +void td_club_win (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("2663"); + } else { + set_unicode_input_mode(UC_WIN); + } + reset_tap_dance(state); +} + + +void td_heart_winc (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("2665"); + } else { + set_unicode_input_mode(UC_WINC); + } + reset_tap_dance(state); +} + + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_K0] = ACTION_TAP_DANCE_FN(td_spade_lnx), + [TD_K1] = ACTION_TAP_DANCE_FN(td_diamond_osx), + [TD_K2] = ACTION_TAP_DANCE_FN(td_club_win), + [TD_K3] = ACTION_TAP_DANCE_FN(td_heart_winc) +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + TD(TD_K0), + TD(TD_K1), + TD(TD_K2), + TD(TD_K3) + ) +}; diff --git a/keyboards/yatara/drink_me/keymaps/queen/readme.md b/keyboards/yatara/drink_me/keymaps/queen/readme.md new file mode 100644 index 000000000000..cd89b7b0cb76 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/queen/readme.md @@ -0,0 +1,20 @@ +# Drink Me - Queen layout + +> ‘Off with her head!’ the Queen shouted at the top of her voice. Nobody moved. +> +> ‘Who cares for you?’ said Alice, (she had grown to her full size by this time.) ‘You’re nothing but a pack of cards!’ + +Single tap for unicode symbols for playing card suits: + +![Drink Me - Queen layout single tap](https://i.imgur.com/xwHicLJ.png) + +``` +Spade, Diamond, Club, Heart +``` + +Double tap to change operating system unicode input method: + +![Drink Me - Queen layout double tap](https://i.imgur.com/fBbzq55.png) +``` +Linux, OSX, Windows, Wincompose +``` diff --git a/keyboards/yatara/drink_me/keymaps/queen/rules.mk b/keyboards/yatara/drink_me/keymaps/queen/rules.mk new file mode 100644 index 000000000000..705db8e333fe --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/queen/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/yatara/drink_me/keymaps/via/keymap.c b/keyboards/yatara/drink_me/keymaps/via/keymap.c new file mode 100644 index 000000000000..441103222c21 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/via/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_0, + KC_1, + KC_2, + KC_3 + ), + [1] = LAYOUT( + KC_TRNS, + KC_TRNS, + KC_TRNS, + KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, + KC_TRNS, + KC_TRNS, + KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, + KC_TRNS, + KC_TRNS, + KC_TRNS + ) +}; diff --git a/keyboards/yatara/drink_me/keymaps/via/readme.md b/keyboards/yatara/drink_me/keymaps/via/readme.md new file mode 100644 index 000000000000..b77355f9fcbc --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/via/readme.md @@ -0,0 +1,7 @@ +# Drink Me - VIA layout + +> ‘But what am I to do?’ said Alice. +> +> ‘Anything you like,’ said the Footman, and began whistling. + +Flash with this layout to use [VIA](https://caniusevia.com/) for customising layout. diff --git a/keyboards/yatara/drink_me/keymaps/via/rules.mk b/keyboards/yatara/drink_me/keymaps/via/rules.mk new file mode 100644 index 000000000000..830d3be90299 --- /dev/null +++ b/keyboards/yatara/drink_me/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +EXTRAKEY_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/yatara/drink_me/readme.md b/keyboards/yatara/drink_me/readme.md new file mode 100644 index 000000000000..215f812f10dc --- /dev/null +++ b/keyboards/yatara/drink_me/readme.md @@ -0,0 +1,17 @@ +# Drink Me + +![Drink Me](https://i.imgur.com/iz56Er0.jpg) + +A 4% ergo macropad. + +* Keyboard Maintainer: [Yatara](https://github.com/yatara-cc) +* Hardware Supported: Drink Me PCB (ATmega32U2) +* Hardware Availability: [Interest Check on Reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/evu429/ic_drink_me_4_ergo_interest_check_giveaway/) + +Make example for this keyboard (after setting up your build environment): + +``` +make yatara/drink_me:default +``` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/yatara/drink_me/rules.mk b/keyboards/yatara/drink_me/rules.mk new file mode 100644 index 000000000000..f0edf97b8833 --- /dev/null +++ b/keyboards/yatara/drink_me/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 7514f5124ac81ce1db51eb07a287f82d6a9bf10c Mon Sep 17 00:00:00 2001 From: Jason Dunsmore Date: Thu, 30 Jan 2020 17:25:16 -0600 Subject: [PATCH 170/331] [Keymap] Update keymap for user jasondunsmore (#8047) --- .../iris/keymaps/jasondunsmore/config.h | 8 +- .../iris/keymaps/jasondunsmore/keymap.c | 133 ++++-------------- .../iris/keymaps/jasondunsmore/readme.md | 10 +- .../iris/keymaps/jasondunsmore/rules.mk | 1 - 4 files changed, 32 insertions(+), 120 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/config.h b/keyboards/keebio/iris/keymaps/jasondunsmore/config.h index 8aa4be367f35..195c1d3bb3ed 100644 --- a/keyboards/keebio/iris/keymaps/jasondunsmore/config.h +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/config.h @@ -17,11 +17,7 @@ along with this program. If not, see . #pragma once -/* Use I2C or Serial, not both */ #define USE_SERIAL -// #define USE_I2C - -/* Select hand configuration */ #define MASTER_LEFT - -#define TAPPING_TERM 200 +#define TAPPING_TERM 150 +#define TAPPING_TOGGLE 2 diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c b/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c index 5f930766313d..930c747f0937 100644 --- a/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c @@ -4,144 +4,61 @@ extern keymap_config_t keymap_config; // Layers #define _QWERTY 0 // Base layer -#define _NUMB 1 -#define _NAVI 2 +#define _NAVI 1 // Navigation layer +#define _NUMP 2 // Numpad layer // Keys -#define KC_NUMB MO(_NUMB) -#define KC_NAVI MO(_NAVI) +#define KC_NAVI TT(_NAVI) +#define KC_NUMP TT(_NUMP) #define KC_AGRV LALT_T(KC_GRAVE) +#define KC_AQUO RALT_T(KC_QUOTE) #define KC_GUIE LGUI_T(KC_ESC) -#define KC_REST RESET -#define KC_DBUG DEBUG - -// Tap Dance Declarations -enum { - TD_LALT_GRV_BSLS = 0, - TD_LSFT_LBRC, - TD_RSFT_RBRC, -}; - -void alt_grave_backslash(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - if (!state->pressed) { - register_code(KC_GRAVE); - } else { - register_code(KC_LALT); - } - } else if (state->count == 2) { - register_code(KC_BSLASH); - } -} - -void alt_grave_backslash_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code(KC_GRAVE); - unregister_code(KC_LALT); - } else if (state->count == 2) { - unregister_code(KC_BSLASH); - } -} - -void left_brackets(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - if (!state->pressed) { - register_code(KC_LSFT); - register_code(KC_9); - } else { - register_code(KC_LSFT); - } - } else if (state->count == 2) { - register_code(KC_LBRC); - } -} - -void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code(KC_LSFT); - unregister_code(KC_9); - } else if (state->count == 2) { - unregister_code(KC_LBRC); - } -} - -void right_brackets(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - if (!state->pressed) { - register_code(KC_RSFT); - register_code(KC_0); - } else { - register_code(KC_RSFT); - } - } else if (state->count == 2) { - register_code(KC_RBRC); - } -} - -void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code(KC_RSFT); - unregister_code(KC_0); - } else if (state->count == 2) { - unregister_code(KC_RBRC); - } -} - - -// Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - // Tap once for KC_SLSH, twice for KC_BSLS - [TD_LALT_GRV_BSLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, alt_grave_backslash, alt_grave_backslash_reset), - [TD_LSFT_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset), - [TD_RSFT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset) -}; - -// Tap Dance Keys -#define KC_AGRB TD(TD_LALT_GRV_BSLS) -#define KC_LSBK TD(TD_LSFT_LBRC) -#define KC_RSBK TD(TD_RSFT_RBRC) +#define KC_DSFT RSFT_T(KC_DEL) +#define KC_PSFT LSFT_T(KC_KP_PLUS) +#define KC_MCTL RCTL_T(KC_MINS) +#define KC_ECTL LCTL_T(KC_EQL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - GUIE, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, + GUIE, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSLS, //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| - AGRB, A, S, D, F, G, H, J, K, L, SCLN,QUOT, + AGRV, A, S, D, F, G, H, J, K, L, SCLN,AQUO, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - LSBK, Z, X, C, V, B, MINS, EQL, N, M, COMM,DOT, SLSH,RSBK, + PSFT, Z, X, C, V, B, NAVI, NAVI, N, M, COMM,DOT, SLSH,DSFT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - NUMB,LCTL,SPC, ENT, RCTL,NAVI + NAVI,ECTL, SPC, ENT, MCTL,NAVI // `----+----+----' `----+----+----' ), - [_NUMB] = LAYOUT_kc( + [_NAVI] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. F12, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, //|----+----+----+----+----+----| |----+----+----+----+----+----| - NO, F17, F18, F19, F20, NO, NO, 7, 8, 9, 0, TRNS, + TRNS,TRNS,MUTE,VOLU,TRNS,TRNS, PGUP,HOME, UP, END, TRNS,TRNS, //|----+----+----+----+----+----| |----+----+----+----+----+----| - TRNS,F13, F14, F15, F16, NO, ASTR, 4, 5, 6, PLUS,TRNS, + TRNS,TRNS,BRID,VOLD,BRIU,TRNS, PGDN,LEFT,DOWN,RGHT,TRNS,TRNS, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - TRNS,F21, F22, F23, F24, NO, TRNS, TRNS,SLSH, 1, 2, 3, MINS,TRNS, + TRNS,TRNS,TRNS,NUMP,INS, TRNS,TRNS, TRNS,TRNS,CAPS,LBRC,RBRC,TRNS,TRNS, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - TRNS,TRNS,TRNS, TRNS,DOT, TRNS + TRNS,TRNS,TRNS, TRNS,TRNS,TRNS // `----+----+----' `----+----+----' - ), + ), - [_NAVI] = LAYOUT_kc( + [_NUMP] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - PWR, MUTE,VOLD,VOLU,BRID,BRIU, REST,DBUG, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,NLCK,PSLS,PAST,PMNS,TRNS, //|----+----+----+----+----+----| |----+----+----+----+----+----| - WAKE,HOME,PGUP, UP, PGDN,TRNS, NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, P7, P8, P9, PPLS,TRNS, //|----+----+----+----+----+----| |----+----+----+----+----+----| - TRNS,END, LEFT,DOWN,RGHT,TRNS, PAUS,CAPS,PSCR,SLCK,INS, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, P4, P5, P6, PCMM,TRNS, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, P1, P2, P3, PEQL,TRNS, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - TRNS,TRNS,TRNS, TRNS,TRNS,TRNS + TRNS,TRNS,TRNS, PENT, P0, PDOT // `----+----+----' `----+----+----' ) }; diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md b/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md index 0817b5e9b06a..1f4f57603358 100644 --- a/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md @@ -1,7 +1,7 @@ # jasondunsmore's iris layout -_QWERTY is the default layer, from which all letters, symbols and -numbers can be accessed. The _NUMB layer contains a numberpad, -operators, and function keys. The _NAVI layer contains navigation -keys, some hardware adjustment keys, lock keys, and RESET/DEBUG for -QMK. +_QWERTY is the default layer, from which all letters, numbers, and +symbols (with the exception of the square brackets and curly braces) +can be accessed. The _NAVI layer contains navigation keys, some +hardware adjustment keys, and lock keys. The _NUMP layer contains a +numberpad and operators. diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk b/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk index d58c21f2b915..a6c5cfa18a0c 100644 --- a/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk @@ -1,2 +1 @@ -TAP_DANCE_ENABLE = yes COMMAND_ENABLE = no From 4139de3cc9c56a157d78e1e418893d08e3f23bde Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 30 Jan 2020 23:44:40 +0000 Subject: [PATCH 171/331] =?UTF-8?q?Fix=20AVR=20boards=20which=20were=20ove?= =?UTF-8?q?rriding=20backlight=20without=20setting=E2=80=A6=20(#8044)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add backlight custom driver to all boards not declaring it but overriding backlight * Apply suggestions from code review Co-Authored-By: fauxpark * Apply suggestions from code review Co-Authored-By: fauxpark * Remove old tmk references from show_options.mk Co-authored-by: fauxpark --- keyboards/amj96/config.h | 16 ---------------- keyboards/amj96/rules.mk | 6 +++--- keyboards/clueboard/17/rules.mk | 1 + keyboards/clueboard/66/rev2/rules.mk | 1 + keyboards/clueboard/66/rev3/rules.mk | 1 + .../clueboard/66_hotswap/prototype/rules.mk | 1 + keyboards/clueboard/card/rules.mk | 3 ++- keyboards/cu75/rules.mk | 5 +++++ keyboards/duck/eagle_viper/v2/rules.mk | 3 ++- keyboards/duck/jetfire/rules.mk | 3 ++- keyboards/duck/lightsaver/rules.mk | 3 ++- keyboards/duck/octagon/v1/rules.mk | 3 ++- keyboards/duck/octagon/v2/rules.mk | 3 ++- keyboards/duck/orion/v3/rules.mk | 3 ++- keyboards/kmac/config.h | 2 +- keyboards/kmac/rules.mk | 2 +- keyboards/kmini/config.h | 2 +- keyboards/kmini/rules.mk | 2 +- keyboards/lazydesigners/dimple/rules.mk | 2 +- keyboards/lfkeyboards/lfk78/rules.mk | 1 + keyboards/lfkeyboards/lfk87/rules.mk | 3 ++- keyboards/lfkeyboards/mini1800/rules.mk | 5 +++++ show_options.mk | 2 -- 23 files changed, 39 insertions(+), 34 deletions(-) diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h index 1f1be03ce298..8b56aaf7f87e 100644 --- a/keyboards/amj96/config.h +++ b/keyboards/amj96/config.h @@ -47,22 +47,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -// #define BACKLIGHT_PIN D4 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - -/* number of backlight levels */ -#ifdef BREATHING_LED_ENABLE -#ifdef FADING_LED_ENABLE -#define BACKLIGHT_LEVELS 8 -#else -#define BACKLIGHT_LEVELS 6 -#endif -#else -#define BACKLIGHT_LEVELS 3 -#endif -#define BACKLIGHT_CUSTOM - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/amj96/rules.mk b/keyboards/amj96/rules.mk index e6838d71957f..4fd858509620 100644 --- a/keyboards/amj96/rules.mk +++ b/keyboards/amj96/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,8 +22,8 @@ COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode diff --git a/keyboards/clueboard/17/rules.mk b/keyboards/clueboard/17/rules.mk index d70fd8f85a9b..703bf3d2db40 100644 --- a/keyboards/clueboard/17/rules.mk +++ b/keyboards/clueboard/17/rules.mk @@ -19,6 +19,7 @@ CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode diff --git a/keyboards/clueboard/66/rev2/rules.mk b/keyboards/clueboard/66/rev2/rules.mk index 6917c0f06895..16d9251d6aa7 100644 --- a/keyboards/clueboard/66/rev2/rules.mk +++ b/keyboards/clueboard/66/rev2/rules.mk @@ -13,6 +13,7 @@ BOOTLOADER = atmel-dfu # Build Options BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/clueboard/66/rev3/rules.mk b/keyboards/clueboard/66/rev3/rules.mk index 28f497ec3af2..55f3050e357c 100644 --- a/keyboards/clueboard/66/rev3/rules.mk +++ b/keyboards/clueboard/66/rev3/rules.mk @@ -15,6 +15,7 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/clueboard/66_hotswap/prototype/rules.mk b/keyboards/clueboard/66_hotswap/prototype/rules.mk index 0a2a734cf5bf..7f5afcf73e44 100644 --- a/keyboards/clueboard/66_hotswap/prototype/rules.mk +++ b/keyboards/clueboard/66_hotswap/prototype/rules.mk @@ -15,6 +15,7 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = custom BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/keyboards/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk index 65f2c8fa395d..37d1d866efea 100644 --- a/keyboards/clueboard/card/rules.mk +++ b/keyboards/clueboard/card/rules.mk @@ -19,7 +19,8 @@ CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # USB Nkey Rollover RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/cu75/rules.mk b/keyboards/cu75/rules.mk index 697d8d18f23a..1eb9cf8f76fd 100644 --- a/keyboards/cu75/rules.mk +++ b/keyboards/cu75/rules.mk @@ -11,4 +11,9 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu +# Build Options +# change yes to no to disable +# +BACKLIGHT_DRIVER = custom + SRC = ../lfkeyboards/TWIlib.c ../lfkeyboards/issi.c ../lfkeyboards/lighting.c diff --git a/keyboards/duck/eagle_viper/v2/rules.mk b/keyboards/duck/eagle_viper/v2/rules.mk index 71d318946efd..a8c804e52c42 100644 --- a/keyboards/duck/eagle_viper/v2/rules.mk +++ b/keyboards/duck/eagle_viper/v2/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index b51285bd4f6c..09a5d1eccf9d 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode diff --git a/keyboards/duck/lightsaver/rules.mk b/keyboards/duck/lightsaver/rules.mk index 8f2589139fcc..64e18c9b11dd 100644 --- a/keyboards/duck/lightsaver/rules.mk +++ b/keyboards/duck/lightsaver/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk index a750a8f00692..4a8191fa6140 100644 --- a/keyboards/duck/octagon/v1/rules.mk +++ b/keyboards/duck/octagon/v1/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/duck/octagon/v2/rules.mk b/keyboards/duck/octagon/v2/rules.mk index 0b2b1244450e..49f3f12f52de 100644 --- a/keyboards/duck/octagon/v2/rules.mk +++ b/keyboards/duck/octagon/v2/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/duck/orion/v3/rules.mk b/keyboards/duck/orion/v3/rules.mk index 7463d7da4576..019dd7dd3dfc 100644 --- a/keyboards/duck/orion/v3/rules.mk +++ b/keyboards/duck/orion/v3/rules.mk @@ -23,7 +23,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index 652263d2b76f..b2c7f4d441d4 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . //#define DIODE_DIRECTION /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk index c36191eb662e..beda52398cf1 100644 --- a/keyboards/kmac/rules.mk +++ b/keyboards/kmac/rules.mk @@ -27,7 +27,7 @@ CUSTOM_MATRIX = yes # Custom matrix file SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index b5460c9dea16..6224a739ef72 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -43,7 +43,7 @@ //#define DIODE_DIRECTION /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/kmini/rules.mk b/keyboards/kmini/rules.mk index 740dae2d23f0..076770a0a054 100755 --- a/keyboards/kmini/rules.mk +++ b/keyboards/kmini/rules.mk @@ -27,7 +27,7 @@ CUSTOM_MATRIX = yes # Custom matrix file SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk index d369613ead8a..395cd8e9a6e2 100644 --- a/keyboards/lazydesigners/dimple/rules.mk +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -18,5 +18,5 @@ BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk index 3af30211e9f5..74a1f79897f8 100644 --- a/keyboards/lfkeyboards/lfk78/rules.mk +++ b/keyboards/lfkeyboards/lfk78/rules.mk @@ -26,6 +26,7 @@ CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk index b322bdf56293..dc6fa376aa6c 100644 --- a/keyboards/lfkeyboards/lfk87/rules.mk +++ b/keyboards/lfkeyboards/lfk87/rules.mk @@ -30,7 +30,8 @@ EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = custom MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index d3e6a24023d6..a9c29c4b91e2 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -21,3 +21,8 @@ SRC = TWIlib.c issi.c lighting.c ifeq ($(strip $(ISSI_ENABLE)), yes) # TMK_COMMON_DEFS += -DISSI_ENABLE endif + +# Build Options +# change yes to no to disable +# +BACKLIGHT_DRIVER = custom diff --git a/show_options.mk b/show_options.mk index b79653d5c3ff..63823adc7bdd 100644 --- a/show_options.mk +++ b/show_options.mk @@ -58,10 +58,8 @@ OTHER_OPTION_NAMES = \ HELIX ZINC \ ADAFRUIT_BLE_ENABLE \ AUTOLOG_ENABLE \ - BREATHING_LED_ENABLE \ DEBUG_ENABLE \ ENCODER_ENABLE_CUSTOM \ - FADING_LED_ENABLE \ GERMAN_ENABLE \ HAPTIC_ENABLE \ HHKB_RN42_ENABLE \ From eb309be6f009a9f3923ea49cec3653b75ec47e69 Mon Sep 17 00:00:00 2001 From: xyzz <1065521+xyzz@users.noreply.github.com> Date: Thu, 30 Jan 2020 19:30:41 -0500 Subject: [PATCH 172/331] Improve VIRTSER performance (#7528) --- tmk_core/protocol/lufa/lufa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 7d325a9ba2bc..db66a07222af 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -869,7 +869,7 @@ void virtser_recv(uint8_t c) { void virtser_task(void) { uint16_t count = CDC_Device_BytesReceived(&cdc_device); uint8_t ch; - if (count) { + for (; count; --count) { ch = CDC_Device_ReceiveByte(&cdc_device); virtser_recv(ch); } From 479c6a68cf1bed01380599045a25a37b9847569a Mon Sep 17 00:00:00 2001 From: ai03 Date: Thu, 30 Jan 2020 18:14:19 -0800 Subject: [PATCH 173/331] [Keyboard] Add support for Southpaw Full Size (#8029) * Begin work on spfs, migrating ancient config * QMK breaks if there's a dash in the board name * Update info.json * Make indicator LEDs work * Build a readme * Change title to match official GB thread name * Add an ANSI WKL layout for simplicity * Adjustments as per pullreq recommendations * Remove unused functions from other keymap --- keyboards/switchplate/README.md | 4 + .../switchplate/southpaw_fullsize/config.h | 143 +++++++++++ .../switchplate/southpaw_fullsize/info.json | 242 ++++++++++++++++++ .../keymaps/default/keymap.c | 42 +++ .../keymaps/default/readme.md | 3 + .../keymaps/default_wkl/keymap.c | 43 ++++ .../keymaps/default_wkl/readme.md | 3 + .../switchplate/southpaw_fullsize/readme.md | 15 ++ .../switchplate/southpaw_fullsize/rules.mk | 32 +++ .../southpaw_fullsize/southpaw_fullsize.c | 51 ++++ .../southpaw_fullsize/southpaw_fullsize.h | 70 +++++ 11 files changed, 648 insertions(+) create mode 100644 keyboards/switchplate/README.md create mode 100644 keyboards/switchplate/southpaw_fullsize/config.h create mode 100644 keyboards/switchplate/southpaw_fullsize/info.json create mode 100644 keyboards/switchplate/southpaw_fullsize/keymaps/default/keymap.c create mode 100644 keyboards/switchplate/southpaw_fullsize/keymaps/default/readme.md create mode 100644 keyboards/switchplate/southpaw_fullsize/keymaps/default_wkl/keymap.c create mode 100644 keyboards/switchplate/southpaw_fullsize/keymaps/default_wkl/readme.md create mode 100644 keyboards/switchplate/southpaw_fullsize/readme.md create mode 100644 keyboards/switchplate/southpaw_fullsize/rules.mk create mode 100644 keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c create mode 100644 keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.h diff --git a/keyboards/switchplate/README.md b/keyboards/switchplate/README.md new file mode 100644 index 000000000000..166853f28546 --- /dev/null +++ b/keyboards/switchplate/README.md @@ -0,0 +1,4 @@ +# Switchplate Peripherals +All keyboards under the Switchplate Peripherals brand + +Website: [here](https://switchplate.co/) \ No newline at end of file diff --git a/keyboards/switchplate/southpaw_fullsize/config.h b/keyboards/switchplate/southpaw_fullsize/config.h new file mode 100644 index 000000000000..adbb4f8db43b --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/config.h @@ -0,0 +1,143 @@ +/* +Copyright 2020 Ryota Goto + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0017 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Switchplate Peripherals +#define PRODUCT Southpaw Fullsize +#define DESCRIPTION A large custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 22 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { E1, C0, C1, C2, C3, C4 } +#define MATRIX_COL_PINS { A7, C7, C6, C5, F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, E0, D7, D6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/switchplate/southpaw_fullsize/info.json b/keyboards/switchplate/southpaw_fullsize/info.json new file mode 100644 index 000000000000..d4823f108549 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/info.json @@ -0,0 +1,242 @@ +{ + "keyboard_name": "southpaw_fullsize", + "url": "", + "maintainer": "ai03", + "width": 22.5, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":4.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + {"x":13.75, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + {"x":18.25, "y":0}, + {"x":19.5, "y":0}, + {"x":20.5, "y":0}, + {"x":21.5, "y":0}, + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4.25, "y":1.25}, + {"x":5.25, "y":1.25}, + {"x":6.25, "y":1.25}, + {"x":7.25, "y":1.25}, + {"x":8.25, "y":1.25}, + {"x":9.25, "y":1.25}, + {"x":10.25, "y":1.25}, + {"x":11.25, "y":1.25}, + {"x":12.25, "y":1.25}, + {"x":13.25, "y":1.25}, + {"x":14.25, "y":1.25}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + {"x":18.25, "y":1.25}, + {"x":19.5, "y":1.25}, + {"x":20.5, "y":1.25}, + {"x":21.5, "y":1.25}, + {"x":0, "y":2.25}, + {"x":1, "y":2.25}, + {"x":2, "y":2.25}, + {"x":3, "y":2.25}, + {"x":4.25, "y":2.25, "w":1.5}, + {"x":5.75, "y":2.25}, + {"x":6.75, "y":2.25}, + {"x":7.75, "y":2.25}, + {"x":8.75, "y":2.25}, + {"x":9.75, "y":2.25}, + {"x":10.75, "y":2.25}, + {"x":11.75, "y":2.25}, + {"x":12.75, "y":2.25}, + {"x":13.75, "y":2.25}, + {"x":14.75, "y":2.25}, + {"x":15.75, "y":2.25}, + {"x":16.75, "y":2.25}, + {"x":17.75, "y":2.25, "w":1.5}, + {"x":19.5, "y":2.25}, + {"x":20.5, "y":2.25}, + {"x":21.5, "y":2.25}, + {"x":0, "y":3.25}, + {"x":1, "y":3.25}, + {"x":2, "y":3.25}, + {"x":3, "y":3.25}, + {"x":4.25, "y":3.25, "w":1.75}, + {"x":6, "y":3.25}, + {"x":7, "y":3.25}, + {"x":8, "y":3.25}, + {"x":9, "y":3.25}, + {"x":10, "y":3.25}, + {"x":11, "y":3.25}, + {"x":12, "y":3.25}, + {"x":13, "y":3.25}, + {"x":14, "y":3.25}, + {"x":15, "y":3.25}, + {"x":16, "y":3.25}, + {"x":17, "y":3.25}, + {"x":18, "y":3.25, "w":1.25}, + {"x":0, "y":4.25}, + {"x":1, "y":4.25}, + {"x":2, "y":4.25}, + {"x":3, "y":4.25}, + {"x":4.25, "y":4.25, "w":1.25}, + {"x":5.5, "y":4.25}, + {"x":6.5, "y":4.25}, + {"x":7.5, "y":4.25}, + {"x":8.5, "y":4.25}, + {"x":9.5, "y":4.25}, + {"x":10.5, "y":4.25}, + {"x":11.5, "y":4.25}, + {"x":12.5, "y":4.25}, + {"x":13.5, "y":4.25}, + {"x":14.5, "y":4.25}, + {"x":15.5, "y":4.25}, + {"x":16.5, "y":4.25, "w":1.75}, + {"x":18.25, "y":4.25}, + {"x":20.5, "y":4.25}, + {"x":0, "y":5.25}, + {"x":1, "y":5.25}, + {"x":2, "y":5.25}, + {"x":3, "y":5.25}, + {"x":4.25, "y":5.25, "w":1.25}, + {"x":5.5, "y":5.25, "w":1.25}, + {"x":6.75, "y":5.25, "w":1.25}, + {"x":8, "y":5.25, "w":6.25}, + {"x":14.25, "y":5.25, "w":1.25}, + {"x":15.5, "y":5.25, "w":1.25}, + {"x":16.75, "y":5.25, "w":1.25}, + {"x":18, "y":5.25, "w":1.25}, + {"x":19.5, "y":5.25}, + {"x":20.5, "y":5.25}, + {"x":21.5, "y":5.25} + ] + }, + "LAYOUT_ansi_wkl": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":4.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + {"x":13.75, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + {"x":18.25, "y":0}, + {"x":19.5, "y":0}, + {"x":20.5, "y":0}, + {"x":21.5, "y":0}, + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4.25, "y":1.25}, + {"x":5.25, "y":1.25}, + {"x":6.25, "y":1.25}, + {"x":7.25, "y":1.25}, + {"x":8.25, "y":1.25}, + {"x":9.25, "y":1.25}, + {"x":10.25, "y":1.25}, + {"x":11.25, "y":1.25}, + {"x":12.25, "y":1.25}, + {"x":13.25, "y":1.25}, + {"x":14.25, "y":1.25}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + {"x":18.25, "y":1.25}, + {"x":19.5, "y":1.25}, + {"x":20.5, "y":1.25}, + {"x":21.5, "y":1.25}, + {"x":0, "y":2.25}, + {"x":1, "y":2.25}, + {"x":2, "y":2.25}, + {"x":3, "y":2.25}, + {"x":4.25, "y":2.25, "w":1.5}, + {"x":5.75, "y":2.25}, + {"x":6.75, "y":2.25}, + {"x":7.75, "y":2.25}, + {"x":8.75, "y":2.25}, + {"x":9.75, "y":2.25}, + {"x":10.75, "y":2.25}, + {"x":11.75, "y":2.25}, + {"x":12.75, "y":2.25}, + {"x":13.75, "y":2.25}, + {"x":14.75, "y":2.25}, + {"x":15.75, "y":2.25}, + {"x":16.75, "y":2.25}, + {"x":17.75, "y":2.25, "w":1.5}, + {"x":19.5, "y":2.25}, + {"x":20.5, "y":2.25}, + {"x":21.5, "y":2.25}, + {"x":0, "y":3.25}, + {"x":1, "y":3.25}, + {"x":2, "y":3.25}, + {"x":3, "y":3.25}, + {"x":4.25, "y":3.25, "w":1.75}, + {"x":6, "y":3.25}, + {"x":7, "y":3.25}, + {"x":8, "y":3.25}, + {"x":9, "y":3.25}, + {"x":10, "y":3.25}, + {"x":11, "y":3.25}, + {"x":12, "y":3.25}, + {"x":13, "y":3.25}, + {"x":14, "y":3.25}, + {"x":15, "y":3.25}, + {"x":16, "y":3.25}, + {"x":17, "y":3.25, "w":2.25}, + {"x":0, "y":4.25}, + {"x":1, "y":4.25}, + {"x":2, "y":4.25}, + {"x":3, "y":4.25}, + {"x":4.25, "y":4.25, "w":2.25}, + {"x":6.5, "y":4.25}, + {"x":7.5, "y":4.25}, + {"x":8.5, "y":4.25}, + {"x":9.5, "y":4.25}, + {"x":10.5, "y":4.25}, + {"x":11.5, "y":4.25}, + {"x":12.5, "y":4.25}, + {"x":13.5, "y":4.25}, + {"x":14.5, "y":4.25}, + {"x":15.5, "y":4.25}, + {"x":16.5, "y":4.25, "w":1.75}, + {"x":18.25, "y":4.25}, + {"x":20.5, "y":4.25}, + {"x":0, "y":5.25}, + {"x":1, "y":5.25}, + {"x":2, "y":5.25}, + {"x":3, "y":5.25}, + {"x":4.25, "y":5.25, "w":1.5}, + {"x":5.75, "y":5.25}, + {"x":6.75, "y":5.25, "w":1.5}, + {"x":8.25, "y":5.25, "w":7}, + {"x":15.25, "y":5.25, "w":1.5}, + {"x":16.75, "y":5.25}, + {"x":17.75, "y":5.25, "w":1.5}, + {"x":19.5, "y":5.25}, + {"x":20.5, "y":5.25}, + {"x":21.5, "y":5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/default/keymap.c b/keyboards/switchplate/southpaw_fullsize/keymaps/default/keymap.c new file mode 100644 index 000000000000..185c98516e54 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all ( + BL_STEP, BL_TOGG, MO(1) , KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_P7, KC_P8, KC_P9, KC_PPLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_P4, KC_P5, KC_P6, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = LAYOUT_all ( + _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/default/readme.md b/keyboards/switchplate/southpaw_fullsize/keymaps/default/readme.md new file mode 100644 index 000000000000..aea00fdd6968 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for southpaw fullsize + +Nothing special \ No newline at end of file diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/default_wkl/keymap.c b/keyboards/switchplate/southpaw_fullsize/keymaps/default_wkl/keymap.c new file mode 100644 index 000000000000..e66da9832538 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/default_wkl/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_ansi_wkl ( + BL_STEP, BL_TOGG, MO(1) , KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_P7, KC_P8, KC_P9, KC_PPLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_P4, KC_P5, KC_P6, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = LAYOUT_ansi_wkl ( + _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/default_wkl/readme.md b/keyboards/switchplate/southpaw_fullsize/keymaps/default_wkl/readme.md new file mode 100644 index 000000000000..39dc221a4786 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/default_wkl/readme.md @@ -0,0 +1,3 @@ +# The default WKL keymap for southpaw fullsize + +Nothing special \ No newline at end of file diff --git a/keyboards/switchplate/southpaw_fullsize/readme.md b/keyboards/switchplate/southpaw_fullsize/readme.md new file mode 100644 index 000000000000..f44d4d46ace3 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/readme.md @@ -0,0 +1,15 @@ +# Southpaw Full Size + +![southpaw_fullsize](https://i.imgur.com/Kt8eN8L.jpg) + +A fullsize keyboard with southpaw numpad + +* Keyboard Maintainer: [Switchplate Peripherals](https://switchplate.co/)/[ai03](https://github.com/ai03-2725) +* Hardware Supported: The Southpaw Full Size PCB +* Hardware Availability: GB + +Make example for this keyboard (after setting up your build environment): + + make switchplate/southpaw_fullsize:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/switchplate/southpaw_fullsize/rules.mk b/keyboards/switchplate/southpaw_fullsize/rules.mk new file mode 100644 index 000000000000..46d62bf5dc8c --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c new file mode 100644 index 000000000000..253a4fd6768a --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c @@ -0,0 +1,51 @@ +/* Copyright 2020 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "southpaw_fullsize.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +#define INDICATOR_NUM D3 +#define INDICATOR_CAPS D4 +#define INDICATOR_SCR D5 + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + // D3 Numlock, D4 Capslock, D5 Scrlock + setPinOutput(INDICATOR_NUM); + setPinOutput(INDICATOR_CAPS); + setPinOutput(INDICATOR_SCR); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + bool res = led_update_user(led_state); + if (res) + { + writePin(INDICATOR_NUM, !led_state.num_lock); + writePin(INDICATOR_CAPS, !led_state.caps_lock); + writePin(INDICATOR_SCR, !led_state.scroll_lock); + } + return res; +} + diff --git a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.h b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.h new file mode 100644 index 000000000000..b8667f39fce7 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.h @@ -0,0 +1,70 @@ +/* Copyright 2020 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_all( \ + K000, K001, K002, K004, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K019, K020, K021, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K219, K220, K221, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K418, K420, \ + K500, K501, K502, K503, K504, K505, K506, K510, K513, K514, K515, K516, K519, K520, K521 \ +) \ +{ \ + { K000, K001, K002, KC_NO, K004, KC_NO, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, K019, K020, K021 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, KC_NO, K219, K220, K221 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, KC_NO, K418, KC_NO, K420, KC_NO }, \ + { K500, K501, K502, K503, K504, K505, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, KC_NO, K513, K514, K515, K516, KC_NO, KC_NO, K519, K520, K521 } \ +} + +#define LAYOUT_ansi_wkl( \ + K000, K001, K002, K004, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K019, K020, K021, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K219, K220, K221, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K317, \ + K400, K401, K402, K403, K404, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K418, K420, \ + K500, K501, K502, K503, K504, K505, K506, K510, K514, K515, K516, K519, K520, K521 \ +) \ +{ \ + { K000, K001, K002, KC_NO, K004, KC_NO, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, K019, K020, K021 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, KC_NO, K219, K220, K221 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K400, K401, K402, K403, K404, KC_NO, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, KC_NO, K418, KC_NO, K420, KC_NO }, \ + { K500, K501, K502, K503, K504, K505, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, KC_NO, KC_NO, K514, K515, K516, KC_NO, KC_NO, K519, K520, K521 } \ +} + + + + + + + + From f31411af17655337d30abba1ef1d14a2eb1bbb2b Mon Sep 17 00:00:00 2001 From: takashiski Date: Fri, 31 Jan 2020 13:21:33 +0900 Subject: [PATCH 174/331] [Keymap] add new keymap (xd75 atomic style japanese layout) (#7944)i * init jp * update * update * update * update * Update keyboards/xd75/keymaps/atomic_style_jp/keymap.c Co-Authored-By: Drashna Jaelre * remove config.h * remove ____T___ Co-authored-by: Drashna Jaelre --- .../xd75/keymaps/atomic_style_jp/keymap.c | 81 +++++++++++++++++++ .../xd75/keymaps/atomic_style_jp/readme.md | 4 + 2 files changed, 85 insertions(+) create mode 100644 keyboards/xd75/keymaps/atomic_style_jp/keymap.c create mode 100644 keyboards/xd75/keymaps/atomic_style_jp/readme.md diff --git a/keyboards/xd75/keymaps/atomic_style_jp/keymap.c b/keyboards/xd75/keymaps/atomic_style_jp/keymap.c new file mode 100644 index 000000000000..6084a1cbe6d0 --- /dev/null +++ b/keyboards/xd75/keymaps/atomic_style_jp/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2017 Wunder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + + // 2019/03/04 takashiski + // NORTICE + // This layout is for Japanese Keyboard User. + // So there are logicalparing symbols and special keycode like a KC_RO, KC_HENK, KC_MHEN, KC_JYEN. + // 日本語キーボードとして認識させて使うことが前提なので、記号位置が英語キーボードとは異なります。 + // また、日本語キーボードでないと認識されない特殊なキーコードが含まれています。 + +#include QMK_KEYBOARD_H + + +// Layer shorthand +enum LAYER{ + _QW, + _EASY_QW, + _CURSOR, + _RS, + _LW +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + //qwerty layer(almost use default) + [_QW] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, LT(_LW,KC_TAB), KC_SPC, LT(_CURSOR,KC_ENT), LT(_RS,KC_BSPC), KC_HENK, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + //4th row shifted 1u from regular ortholinear. + [_EASY_QW] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_ENT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, LT(_LW,KC_TAB), KC_SPC, LT(_CURSOR,KC_ENT), LT(_RS,KC_BSPC), KC_HENK, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +//LOWER + [_LW] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_PSCR, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_INS , + KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, _______, _______, _______, + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_SLCK, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + +//RAISE + [_RS] = LAYOUT( + KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR, + KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, _______,KC_WH_U, KC_MS_U, KC_WH_D, + RESET , DF(_QW), DF(_EASY_QW), _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), + [_CURSOR] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, + KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_G, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, LT(_LW,KC_TAB), KC_SPC, KC_ENT, LT(_RS,KC_BSPC), KC_HENK, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +) + +}; diff --git a/keyboards/xd75/keymaps/atomic_style_jp/readme.md b/keyboards/xd75/keymaps/atomic_style_jp/readme.md new file mode 100644 index 000000000000..7164f5c6b765 --- /dev/null +++ b/keyboards/xd75/keymaps/atomic_style_jp/readme.md @@ -0,0 +1,4 @@ +# atomic style jp + +This layout is based Standard Japanese Layout and atomic style layout. + From 6544bd2e65664307f9572cc8110b55df250b0302 Mon Sep 17 00:00:00 2001 From: Jorge Noguera Date: Fri, 31 Jan 2020 01:22:25 -0300 Subject: [PATCH 175/331] [Keymap] Customized layouts for the Keebio/Quefrency65 (#7947) * Created the yoryer layout for the Quefrency 65% * added rgb control layer * Required changes to resolve PR #7947 issues * - Updated the layer list as an enum - Removed .gitignore file from keymap folder * Removed the .gitignore from keymap folder --- .../keebio/quefrency/keymaps/yoryer/config.h | 27 ++++++++++ .../keebio/quefrency/keymaps/yoryer/keymap.c | 50 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 keyboards/keebio/quefrency/keymaps/yoryer/config.h create mode 100644 keyboards/keebio/quefrency/keymaps/yoryer/keymap.c diff --git a/keyboards/keebio/quefrency/keymaps/yoryer/config.h b/keyboards/keebio/quefrency/keymaps/yoryer/config.h new file mode 100644 index 000000000000..f9efe78c5b56 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/yoryer/config.h @@ -0,0 +1,27 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/yoryer/keymap.c b/keyboards/keebio/quefrency/keymaps/yoryer/keymap.c new file mode 100644 index 000000000000..fcfaead5b1cb --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/yoryer/keymap.c @@ -0,0 +1,50 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layer { + _BASE, + _FN1, + _RGB2, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /** + LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \ + LD1, LD3, LD4, LD5, LD6, LD7, RD1, RD2, RD3, RD4, RD6, RD7, RD8, RD9, \ + LE1, LE2, LE3, LE5, LE7, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \ + ) \ + **/ + [_BASE] = LAYOUT_65( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_HOME, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(_FN1), KC_SPC, _______, KC_RALT, KC_RCTL, MO(_FN1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_65( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, KC_BRMU, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, TG(_RGB2), _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [_RGB2] = LAYOUT_65( + KC_GESC, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, _______, _______, _______, _______, _______, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_HUD, RGB_MOD + ) +}; From b28ee6b039841c387685ea54c8206cc6c2a6cb8a Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 4 Jan 2020 12:21:08 +1100 Subject: [PATCH 176/331] Fix misunderstanding of CPPFLAGS and CXXFLAGS. --- message.mk | 2 +- tmk_core/arm_atsam.mk | 4 ++-- tmk_core/avr.mk | 4 ++-- tmk_core/chibios.mk | 4 ++-- tmk_core/native.mk | 20 ++++++++-------- tmk_core/rules.mk | 54 +++++++++++++++++++++---------------------- 6 files changed, 44 insertions(+), 44 deletions(-) diff --git a/message.mk b/message.mk index 53afba20655c..94ab606ec6e7 100644 --- a/message.mk +++ b/message.mk @@ -50,7 +50,7 @@ MSG_EXTENDED_LISTING = Creating Extended Listing: MSG_SYMBOL_TABLE = Creating Symbol Table: MSG_LINKING = Linking: MSG_COMPILING = Compiling: -MSG_COMPILING_CPP = Compiling: +MSG_COMPILING_CXX = Compiling: MSG_ASSEMBLING = Assembling: MSG_CLEANING = Cleaning project: MSG_CREATING_LIBRARY = Creating library: diff --git a/tmk_core/arm_atsam.mk b/tmk_core/arm_atsam.mk index c9b14042f8d6..403ebf3a8943 100644 --- a/tmk_core/arm_atsam.mk +++ b/tmk_core/arm_atsam.mk @@ -29,8 +29,8 @@ COMPILEFLAGS += -mthumb CFLAGS += $(COMPILEFLAGS) -CPPFLAGS += $(COMPILEFLAGS) -CPPFLAGS += -fno-exceptions -std=c++11 +CXXFLAGS += $(COMPILEFLAGS) +CXXFLAGS += -fno-exceptions -std=c++11 LDFLAGS +=-Wl,--gc-sections LDFLAGS += -Wl,-Map="%OUT%%PROJ_NAME%.map" diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index ecd2fd39a484..d5ca3a4dd8e2 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -25,8 +25,8 @@ CFLAGS += $(COMPILEFLAGS) CFLAGS += -fno-inline-small-functions CFLAGS += -fno-strict-aliasing -CPPFLAGS += $(COMPILEFLAGS) -CPPFLAGS += -fno-exceptions -std=c++11 +CXXFLAGS += $(COMPILEFLAGS) +CXXFLAGS += -fno-exceptions -std=c++11 LDFLAGS +=-Wl,--gc-sections diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index b2e364f2161f..f9e52aed23ec 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -167,8 +167,8 @@ CFLAGS += $(COMPILEFLAGS) ASFLAGS += $(THUMBFLAGS) -CPPFLAGS += $(COMPILEFLAGS) -CPPFLAGS += -fno-rtti +CXXFLAGS += $(COMPILEFLAGS) +CXXFLAGS += -fno-rtti LDFLAGS +=-Wl,--gc-sections LDFLAGS +=-Wl,--no-wchar-size-warning diff --git a/tmk_core/native.mk b/tmk_core/native.mk index 530b50b84a7a..3caf64454676 100644 --- a/tmk_core/native.mk +++ b/tmk_core/native.mk @@ -1,13 +1,13 @@ SYSTEM_TYPE := $(shell gcc -dumpmachine) CC = gcc -OBJCOPY = -OBJDUMP = -SIZE = -AR = -NM = -HEX = -EEP = +OBJCOPY = +OBJDUMP = +SIZE = +AR = +NM = +HEX = +EEP = BIN = @@ -24,6 +24,6 @@ CFLAGS += $(COMPILEFLAGS) CFLAGS += -fno-inline-small-functions CFLAGS += -fno-strict-aliasing -CPPFLAGS += $(COMPILEFLAGS) -CPPFLAGS += -fno-exceptions -CPPFLAGS += -std=gnu++11 \ No newline at end of file +CXXFLAGS += $(COMPILEFLAGS) +CXXFLAGS += -fno-exceptions +CXXFLAGS += -std=gnu++11 diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 334ff314becc..c1474a5c24b4 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -65,9 +65,9 @@ CSTANDARD = -std=gnu99 # Place -D or -U options here for C++ sources -#CPPDEFS += -D__STDC_LIMIT_MACROS -#CPPDEFS += -D__STDC_CONSTANT_MACROS -#CPPDEFS += +#CXXDEFS += -D__STDC_LIMIT_MACROS +#CXXDEFS += -D__STDC_CONSTANT_MACROS +#CXXDEFS += @@ -111,24 +111,24 @@ CFLAGS += $(CSTANDARD) # -Wa,...: tell GCC to pass this to the assembler. # -adhlns...: create assembler listing ifndef SKIP_DEBUG_INFO - CPPFLAGS += -g$(DEBUG) + CXXFLAGS += -g$(DEBUG) endif -CPPFLAGS += $(CPPDEFS) -CPPFLAGS += -O$(OPT) +CXXFLAGS += $(CXXDEFS) +CXXFLAGS += -O$(OPT) # to supress "warning: only initialized variables can be placed into program memory area" -CPPFLAGS += -w -CPPFLAGS += -Wall -CPPFLAGS += -Wundef +CXXFLAGS += -w +CXXFLAGS += -Wall +CXXFLAGS += -Wundef ifneq ($(strip $(ALLOW_WARNINGS)), yes) - CPPFLAGS += -Werror + CXXFLAGS += -Werror endif -#CPPFLAGS += -mshort-calls -#CPPFLAGS += -fno-unit-at-a-time -#CPPFLAGS += -Wstrict-prototypes -#CPPFLAGS += -Wunreachable-code -#CPPFLAGS += -Wsign-compare -CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) -#CPPFLAGS += $(CSTANDARD) +#CXXFLAGS += -mshort-calls +#CXXFLAGS += -fno-unit-at-a-time +#CXXFLAGS += -Wstrict-prototypes +#CXXFLAGS += -Wunreachable-code +#CXXFLAGS += -Wsign-compare +CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) +#CXXFLAGS += $(CSTANDARD) #---------------- Assembler Options ---------------- # -Wa,...: tell GCC to pass this to the assembler. @@ -213,7 +213,7 @@ GENDEPFLAGS = -MMD -MP -MF $(patsubst %.o,%.td,$@) # Add target processor to flags. # You can give extra flags at 'make' command line like: make EXTRAFLAGS=-DFOO=bar ALL_CFLAGS = $(MCUFLAGS) $(CFLAGS) $(EXTRAFLAGS) -ALL_CPPFLAGS = $(MCUFLAGS) -x c++ $(CPPFLAGS) $(EXTRAFLAGS) +ALL_CXXFLAGS = $(MCUFLAGS) -x c++ $(CXXFLAGS) $(EXTRAFLAGS) ALL_ASFLAGS = $(MCUFLAGS) -x assembler-with-cpp $(ASFLAGS) $(EXTRAFLAGS) define NO_LTO @@ -306,7 +306,7 @@ ifdef $1_CONFIG $1_CONFIG_FLAGS += $$(patsubst %,-include %,$$($1_CONFIG)) endif $1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) -$1_CPPFLAGS= $$(ALL_CPPFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) +$1_CXXFLAGS= $$(ALL_CXXFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) $1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) # Compile: create object files from C source files. @@ -317,16 +317,16 @@ $1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN) @$$(BUILD_CMD) # Compile: create object files from C++ source files. -$1/%.o : %.cpp $1/%.d $1/cppflags.txt $1/compiler.txt | $(BEGIN) +$1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN) @mkdir -p $$(@D) - @$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD) - $$(eval CMD=$$(CC) -c $$($1_CPPFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) + @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) + $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) @$$(BUILD_CMD) -$1/%.o : %.cc $1/%.d $1/cppflags.txt $1/compiler.txt | $(BEGIN) +$1/%.o : %.cc $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN) @mkdir -p $$(@D) - @$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD) - $$(eval CMD=$$(CC) -c $$($1_CPPFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) + @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) + $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) @$$(BUILD_CMD) # Assemble: create object files from assembler source files. @@ -347,8 +347,8 @@ $1/force: $1/cflags.txt: $1/force echo '$$($1_CFLAGS)' | cmp -s - $$@ || echo '$$($1_CFLAGS)' > $$@ -$1/cppflags.txt: $1/force - echo '$$($1_CPPFLAGS)' | cmp -s - $$@ || echo '$$($1_CPPFLAGS)' > $$@ +$1/cxxflags.txt: $1/force + echo '$$($1_CXXFLAGS)' | cmp -s - $$@ || echo '$$($1_CXXFLAGS)' > $$@ $1/asflags.txt: $1/force echo '$$($1_ASFLAGS)' | cmp -s - $$@ || echo '$$($1_ASFLAGS)' > $$@ From 5c5a05212e5f050587b7ed7070d34a13dd9cc293 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 31 Jan 2020 11:55:11 -0800 Subject: [PATCH 177/331] [Keyboard] VIA Support: 1upkeyboards 1up60hte (#8052) * update the vendor id for 1upkeyboards 1up60hte * add the via keymap and rules file * fix typo * move the LTO to the keyboard's rules.mk * Update keyboards/1upkeyboards/1up60hte/config.h --- keyboards/1upkeyboards/1up60hte/config.h | 4 +- .../1up60hte/keymaps/via/keymap.c | 47 +++++++++++++++++++ .../1up60hte/keymaps/via/rules.mk | 2 + keyboards/1upkeyboards/1up60hte/rules.mk | 1 + 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 keyboards/1upkeyboards/1up60hte/keymaps/via/keymap.c create mode 100644 keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h index bcf6329f7653..8c4d2fc308a5 100644 --- a/keyboards/1upkeyboards/1up60hte/config.h +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -21,8 +21,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x6F75 // OU +#define PRODUCT_ID 0x6874 // HT #define DEVICE_VER 0x0001 #define MANUFACTURER 1upkeyboards #define PRODUCT 1up60hte diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/via/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/via/keymap.c new file mode 100644 index 000000000000..ecd5a9040c40 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* +Copyright 2020 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tsangan( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + + [1] = LAYOUT_tsangan( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_tsangan( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_tsangan( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk b/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk new file mode 100644 index 000000000000..bee21da5283a --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index d3d35634155d..048407bed27f 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -24,5 +24,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes +LTO_ENABLE = yes LAYOUTS = 60_hhkb From e565948ffdb9127c1202a69774931a55a71fa529 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 31 Jan 2020 12:33:08 -0800 Subject: [PATCH 178/331] Noxary 280 Backwards LED Fix (#8057) * fix logic and update to newest led_update_kb routine --- keyboards/noxary/280/280.c | 43 +++++--------------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/keyboards/noxary/280/280.c b/keyboards/noxary/280/280.c index 441f0ad84a7d..1743ebc0d587 100644 --- a/keyboards/noxary/280/280.c +++ b/keyboards/noxary/280/280.c @@ -28,43 +28,10 @@ void matrix_init_kb(void) { matrix_init_user(); } -/* -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -*/ - - -void led_set_kb(uint8_t usb_led) { - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(D5); - } else { - writePinHigh(D5); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(D0); - } else { - writePinHigh(D0); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D5, led_state.caps_lock); + writePin(D0, led_state.scroll_lock); } - - led_set_user(usb_led); + return true; } \ No newline at end of file From fdabf524f2c0047ec920b88ace07096009cdd759 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Sat, 1 Feb 2020 10:02:29 +0700 Subject: [PATCH 179/331] [Keyboard] add Hannah910 V2 PCB and VIA support (#8024) * add Hannah910 V2 and VIA support add rev.2 pcb and via support * Update config.h * update * Create config.h * Update * update * update * Move keymap folder * add more layer and edit readme.md * readme.md update * update * update * Update hannah910.h --- keyboards/mechlovin/hannah910/config.h | 36 ++------ keyboards/mechlovin/hannah910/hannah910.h | 56 ++---------- .../mechlovin/hannah910/keymaps/ansi/config.h | 19 ---- .../hannah910/keymaps/ansi/readme.md | 1 - .../hannah910/keymaps/default/config.h | 19 ---- .../hannah910/keymaps/default/readme.md | 1 - keyboards/mechlovin/hannah910/readme.md | 14 ++- keyboards/mechlovin/hannah910/rev1/config.h | 6 ++ .../mechlovin/hannah910/{ => rev1}/info.json | 0 .../{ => rev1}/keymaps/ansi/keymap.c | 16 +++- .../hannah910/rev1/keymaps/ansi/readme.md | 1 + .../{ => rev1}/keymaps/default/keymap.c | 21 ++++- .../hannah910/rev1/keymaps/default/readme.md | 1 + .../hannah910/rev1/keymaps/via/keymap.c | 48 ++++++++++ .../hannah910/rev1/keymaps/via/readme.md | 1 + .../hannah910/rev1/keymaps/via/rules.mk | 1 + keyboards/mechlovin/hannah910/rev1/readme.md | 15 ++++ keyboards/mechlovin/hannah910/rev1/rev1.h | 48 ++++++++++ keyboards/mechlovin/hannah910/rev1/rules.mk | 33 +++++++ keyboards/mechlovin/hannah910/rev2/config.h | 6 ++ keyboards/mechlovin/hannah910/rev2/info.json | 87 +++++++++++++++++++ .../hannah910/rev2/keymaps/ansi/keymap.c | 47 ++++++++++ .../hannah910/rev2/keymaps/ansi/readme.md | 2 + .../hannah910/rev2/keymaps/default/keymap.c | 48 ++++++++++ .../hannah910/rev2/keymaps/default/readme.md | 2 + .../hannah910/rev2/keymaps/via/keymap.c | 48 ++++++++++ .../hannah910/rev2/keymaps/via/readme.md | 2 + .../hannah910/rev2/keymaps/via/rules.mk | 1 + keyboards/mechlovin/hannah910/rev2/readme.md | 19 ++++ keyboards/mechlovin/hannah910/rev2/rev2.h | 50 +++++++++++ keyboards/mechlovin/hannah910/rev2/rules.mk | 33 +++++++ keyboards/mechlovin/hannah910/rules.mk | 34 +------- 32 files changed, 553 insertions(+), 163 deletions(-) delete mode 100644 keyboards/mechlovin/hannah910/keymaps/ansi/config.h delete mode 100644 keyboards/mechlovin/hannah910/keymaps/ansi/readme.md delete mode 100644 keyboards/mechlovin/hannah910/keymaps/default/config.h delete mode 100644 keyboards/mechlovin/hannah910/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev1/config.h rename keyboards/mechlovin/hannah910/{ => rev1}/info.json (100%) rename keyboards/mechlovin/hannah910/{ => rev1}/keymaps/ansi/keymap.c (59%) create mode 100644 keyboards/mechlovin/hannah910/rev1/keymaps/ansi/readme.md rename keyboards/mechlovin/hannah910/{ => rev1}/keymaps/default/keymap.c (53%) create mode 100644 keyboards/mechlovin/hannah910/rev1/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev1/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/hannah910/rev1/keymaps/via/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev1/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/hannah910/rev1/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev1/rev1.h create mode 100644 keyboards/mechlovin/hannah910/rev1/rules.mk create mode 100644 keyboards/mechlovin/hannah910/rev2/config.h create mode 100644 keyboards/mechlovin/hannah910/rev2/info.json create mode 100644 keyboards/mechlovin/hannah910/rev2/keymaps/ansi/keymap.c create mode 100644 keyboards/mechlovin/hannah910/rev2/keymaps/ansi/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev2/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/hannah910/rev2/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev2/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/hannah910/rev2/keymaps/via/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev2/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/hannah910/rev2/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev2/rev2.h create mode 100644 keyboards/mechlovin/hannah910/rev2/rules.mk diff --git a/keyboards/mechlovin/hannah910/config.h b/keyboards/mechlovin/hannah910/config.h index 1ff7dfd0b297..c61693599d67 100644 --- a/keyboards/mechlovin/hannah910/config.h +++ b/keyboards/mechlovin/hannah910/config.h @@ -20,12 +20,10 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Mechlovin -#define PRODUCT Hannah910 -#define DESCRIPTION A replace PCB for TGR910 keyboard +#define VENDOR_ID 0x4D4C // ML-MechLovin' +#define MANUFACTURER Mechlovin +#define PRODUCT Mechlovin Hannah910 +#define DESCRIPTION Mechlovin Hannah910 /* key matrix size */ #define MATRIX_ROWS 5 @@ -54,32 +52,8 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 #define RGB_DI_PIN E2 -// #ifdef RGB_DI_PIN -#define RGBLED_NUM 9 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ +#define RGBLIGHT_LIMIT_VAL 255 #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// /*== customize breathing effect ==*/ -// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ -// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 -// /*==== use exp() and sin() ====*/ -// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 -// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 -// #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/mechlovin/hannah910/hannah910.h b/keyboards/mechlovin/hannah910/hannah910.h index 554116721c33..de9929bd12ab 100644 --- a/keyboards/mechlovin/hannah910/hannah910.h +++ b/keyboards/mechlovin/hannah910/hannah910.h @@ -17,54 +17,8 @@ #include "quantum.h" -/* This a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ - k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ - k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ - k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ - { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ - { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ - { k61, k62, k63, KC_NO, k64, KC_NO, k65, KC_NO, k66, KC_NO, k67, k68, k69, k70, k71 }, \ -} -#define LAYOUT_iso( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ - k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k29, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ - k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ - k61, k62, k63, k65, k67, k68, k69, k70, k71 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ - { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, KC_NO, k29 }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ - { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ - { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, KC_NO, k67, k68, k69, k70, k71 }, \ -} - -#define LAYOUT_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ - k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k43, k45, \ - k46, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ - k61, k62, k63, k65, k67, k68, k69, k70, k71 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, KC_NO }, \ - { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, KC_NO, k43, k45 }, \ - { k46, KC_NO, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ - { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, KC_NO, k67, k68, k69, k70, k71 }, \ -} +#ifdef KEYBOARD_mechlovin_hannah910_rev1 + #include "rev1.h" +#elif KEYBOARD_mechlovin_hannah910_rev2 + #include "rev2.h" +#endif diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/config.h b/keyboards/mechlovin/hannah910/keymaps/ansi/config.h deleted file mode 100644 index 3d1156ac0651..000000000000 --- a/keyboards/mechlovin/hannah910/keymaps/ansi/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 Mechlovin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md b/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md deleted file mode 100644 index b0dfa055c6c1..000000000000 --- a/keyboards/mechlovin/hannah910/keymaps/ansi/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The ansi keymap for hannah910 diff --git a/keyboards/mechlovin/hannah910/keymaps/default/config.h b/keyboards/mechlovin/hannah910/keymaps/default/config.h deleted file mode 100644 index 3d1156ac0651..000000000000 --- a/keyboards/mechlovin/hannah910/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 Mechlovin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/mechlovin/hannah910/keymaps/default/readme.md b/keyboards/mechlovin/hannah910/keymaps/default/readme.md deleted file mode 100644 index 6abbe27c4b0f..000000000000 --- a/keyboards/mechlovin/hannah910/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for hannah910 diff --git a/keyboards/mechlovin/hannah910/readme.md b/keyboards/mechlovin/hannah910/readme.md index 6cc6b226f169..b16b294a5c1b 100644 --- a/keyboards/mechlovin/hannah910/readme.md +++ b/keyboards/mechlovin/hannah910/readme.md @@ -4,12 +4,18 @@ Replacement PCB and plate for TGR 910 keyboard -Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) -Hardware Supported: TGR910 CE, TGR910 SE -Hardware Availability: [Reddit Group Buy](https://www.reddit.com/r/mechmarket/comments/dhwvbn/gb_1015_update_hannah_910_group_buy_tgr_910/) +* Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: TGR910 CE, TGR910 SE +* Hardware Availability: [Reddit Group Buy](https://www.reddit.com/r/mechmarket/comments/dhwvbn/gb_1015_update_hannah_910_group_buy_tgr_910/) Make example for this keyboard (after setting up your build environment): - make mechlovin/hannah910:default + make mechlovin/hannah910/rev1:default + make mechlovin/hannah910/rev2:default + +Make firmware for keymap with VIA: + + make mechlovin/hannah910/rev1:via + make mechlovin/hannah910/rev2:via See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah910/rev1/config.h b/keyboards/mechlovin/hannah910/rev1/config.h new file mode 100644 index 000000000000..906e0c8846f8 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define PRODUCT_ID 0x9101 +#define DEVICE_VER 0x0001 + +#define RGBLED_NUM 9 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/info.json b/keyboards/mechlovin/hannah910/rev1/info.json similarity index 100% rename from keyboards/mechlovin/hannah910/info.json rename to keyboards/mechlovin/hannah910/rev1/info.json diff --git a/keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c b/keyboards/mechlovin/hannah910/rev1/keymaps/ansi/keymap.c similarity index 59% rename from keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c rename to keyboards/mechlovin/hannah910/rev1/keymaps/ansi/keymap.c index 97dd7a5f0260..c16620a74e9e 100644 --- a/keyboards/mechlovin/hannah910/keymaps/ansi/keymap.c +++ b/keyboards/mechlovin/hannah910/rev1/keymaps/ansi/keymap.c @@ -23,7 +23,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_ansi( /* Base */ + [1] = LAYOUT_ansi( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_ansi( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_ansi( /* Layer2 */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/mechlovin/hannah910/rev1/keymaps/ansi/readme.md b/keyboards/mechlovin/hannah910/rev1/keymaps/ansi/readme.md new file mode 100644 index 000000000000..0b0b0e3fb783 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/keymaps/ansi/readme.md @@ -0,0 +1 @@ +# The ansi keymap for hannah910v1 diff --git a/keyboards/mechlovin/hannah910/keymaps/default/keymap.c b/keyboards/mechlovin/hannah910/rev1/keymaps/default/keymap.c similarity index 53% rename from keyboards/mechlovin/hannah910/keymaps/default/keymap.c rename to keyboards/mechlovin/hannah910/rev1/keymaps/default/keymap.c index 48499a111a7c..ae53cc3f7160 100644 --- a/keyboards/mechlovin/hannah910/keymaps/default/keymap.c +++ b/keyboards/mechlovin/hannah910/rev1/keymaps/default/keymap.c @@ -15,15 +15,30 @@ */ #include QMK_KEYBOARD_H + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( /* Base */ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS, - LT(1,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_HOME, - KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + LT(1,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_all( /* Base */ + [1] = LAYOUT_all( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( /* Layer2 */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/mechlovin/hannah910/rev1/keymaps/default/readme.md b/keyboards/mechlovin/hannah910/rev1/keymaps/default/readme.md new file mode 100644 index 000000000000..fcfadce95109 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hannah910v1 diff --git a/keyboards/mechlovin/hannah910/rev1/keymaps/via/keymap.c b/keyboards/mechlovin/hannah910/rev1/keymaps/via/keymap.c new file mode 100644 index 000000000000..1b91e2aad11a --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 Mechlovin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS, + LT(1,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev1/keymaps/via/readme.md b/keyboards/mechlovin/hannah910/rev1/keymaps/via/readme.md new file mode 100644 index 000000000000..3e54ca18c542 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default keymap (VIA support) for hannah910v1 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev1/keymaps/via/rules.mk b/keyboards/mechlovin/hannah910/rev1/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mechlovin/hannah910/rev1/readme.md b/keyboards/mechlovin/hannah910/rev1/readme.md new file mode 100644 index 000000000000..04df333d1894 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/readme.md @@ -0,0 +1,15 @@ +# hannah910 + +![hannah910](https://i.imgur.com/n8WN5Z7.jpg) + +Replacement PCB and plate for TGR 910 keyboard + +* Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: TGR910 CE, TGR910 SE +* Hardware Availability: [Reddit Group Buy](https://www.reddit.com/r/mechmarket/comments/dhwvbn/gb_1015_update_hannah_910_group_buy_tgr_910/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah910/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah910/rev1/rev1.h b/keyboards/mechlovin/hannah910/rev1/rev1.h new file mode 100644 index 000000000000..d2b39dba0cbb --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/rev1.h @@ -0,0 +1,48 @@ +#pragma once + + +#include "quantum.h" + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ + k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ + { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, k64, KC_NO, k65, KC_NO, k66, KC_NO, k67, k68, k69, k70, k71 }, \ +} +#define LAYOUT_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ + k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k65, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, KC_NO, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ + { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, KC_NO, k67, k68, k69, k70, k71 }, \ +} + +#define LAYOUT_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k43, k45, \ + k46, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k65, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, KC_NO }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, KC_NO, k43, k45 }, \ + { k46, KC_NO, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, KC_NO, k67, k68, k69, k70, k71 }, \ +} diff --git a/keyboards/mechlovin/hannah910/rev1/rules.mk b/keyboards/mechlovin/hannah910/rev1/rules.mk new file mode 100644 index 000000000000..5e17282eb074 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev1/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev2/config.h b/keyboards/mechlovin/hannah910/rev2/config.h new file mode 100644 index 000000000000..3ae3cb65bc40 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define PRODUCT_ID 0x9102 +#define DEVICE_VER 0x0002 + +#define RGBLED_NUM 28 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev2/info.json b/keyboards/mechlovin/hannah910/rev2/info.json new file mode 100644 index 000000000000..df48fbcf3241 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/info.json @@ -0,0 +1,87 @@ +{ + "keyboard_name": "Hannah910 Rev.2", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 72, + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0}, + {"label":"K0E (B0,D3)", "x":14, "y":0}, + {"label":"K49 (B4,C6)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K1D (B1,D2)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2C (B2,D1)", "x":12.75, "y":2}, + {"label":"K2D (B2,D2)", "x":13.75, "y":2, "w":1.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,B6)", "x":1.25, "y":3}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (B4,B6)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.25}, + {"label":"K44 (B4,C1)", "x":3.75, "y":4, "w":2.75}, + {"label":"K46 (B4,C3)", "x":6.5, "y":4, "w":1.25}, + {"label":"K48 (B4,C5)", "x":7.75, "y":4, "w":2.25}, + {"label":"K4A (B4,C7)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (B4,D0)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/mechlovin/hannah910/rev2/keymaps/ansi/keymap.c b/keyboards/mechlovin/hannah910/rev2/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..022f1f3b3710 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/keymaps/ansi/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 Mechlovin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PSCR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS, + LT(1,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ansi( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_ansi( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_ansi( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev2/keymaps/ansi/readme.md b/keyboards/mechlovin/hannah910/rev2/keymaps/ansi/readme.md new file mode 100644 index 000000000000..63604a09e441 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/keymaps/ansi/readme.md @@ -0,0 +1,2 @@ +# The ansi keymap for hannah910v2 +GB PCB rev.2 here: https://www.reddit.com/r/mechmarket/comments/esv0um/gb_team_mechlovin_hannah_910_v2_infinity_ce_jane/ \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev2/keymaps/default/keymap.c b/keyboards/mechlovin/hannah910/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000000..c0f66cebcfee --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 Mechlovin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PSCR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS, + LT(1,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev2/keymaps/default/readme.md b/keyboards/mechlovin/hannah910/rev2/keymaps/default/readme.md new file mode 100644 index 000000000000..63604a09e441 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The ansi keymap for hannah910v2 +GB PCB rev.2 here: https://www.reddit.com/r/mechmarket/comments/esv0um/gb_team_mechlovin_hannah_910_v2_infinity_ce_jane/ \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev2/keymaps/via/keymap.c b/keyboards/mechlovin/hannah910/rev2/keymaps/via/keymap.c new file mode 100644 index 000000000000..9c2a72916d63 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 Mechlovin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PSCR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS, + LT(1,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( /* Layer2 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev2/keymaps/via/readme.md b/keyboards/mechlovin/hannah910/rev2/keymaps/via/readme.md new file mode 100644 index 000000000000..9db84a195eb8 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The default keymap (VIA support) for hannah910v2 +GB PCB rev.2 here: https://www.reddit.com/r/mechmarket/comments/esv0um/gb_team_mechlovin_hannah_910_v2_infinity_ce_jane/ \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev2/keymaps/via/rules.mk b/keyboards/mechlovin/hannah910/rev2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mechlovin/hannah910/rev2/readme.md b/keyboards/mechlovin/hannah910/rev2/readme.md new file mode 100644 index 000000000000..6fc4a06f7116 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/readme.md @@ -0,0 +1,19 @@ +# hannah910v2 + +![hannah910](https://i.imgur.com/rRbSn8U.jpg) + +Replacement PCB and plate for TGR 910 keyboard (maybe fit with dolinger 65) + +* Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: TGR910 CE, TGR910 SE +* Hardware Availability: [Reddit Group Buy](https://www.reddit.com/r/mechmarket/comments/dhwvbn/gb_1015_update_hannah_910_group_buy_tgr_910/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah910/rev2:default + +Build firmware for VIA: + + make mechlovin/hannah910/rev2:via + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah910/rev2/rev2.h b/keyboards/mechlovin/hannah910/rev2/rev2.h new file mode 100644 index 000000000000..d212d1ea3e01 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/rev2.h @@ -0,0 +1,50 @@ +#pragma once + + +#include "quantum.h" + + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k67, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ + k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k64, k65, k66, k68, k69, k70, k71, k72 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ + { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, k64, KC_NO, k65, KC_NO, k66, k67, k68, k69, k70, k71, k72 }, \ +} +#define LAYOUT_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k66, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45, \ + k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k65, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, KC_NO, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k45 }, \ + { k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, k66, k67, k68, k69, k70, k71 }, \ +} + +#define LAYOUT_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k66, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k43, k45, \ + k46, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, \ + k61, k62, k63, k65, k67, k68, k69, k70, k71 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, KC_NO }, \ + { k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, KC_NO, k43, k45 }, \ + { k46, KC_NO, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60 }, \ + { k61, k62, k63, KC_NO, KC_NO, KC_NO, k65, KC_NO, KC_NO, k66, k67, k68, k69, k70, k71 }, \ +} + diff --git a/keyboards/mechlovin/hannah910/rev2/rules.mk b/keyboards/mechlovin/hannah910/rev2/rules.mk new file mode 100644 index 000000000000..e8100a0f42d7 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev2/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rules.mk b/keyboards/mechlovin/hannah910/rules.mk index 5e17282eb074..a35686719722 100644 --- a/keyboards/mechlovin/hannah910/rules.mk +++ b/keyboards/mechlovin/hannah910/rules.mk @@ -1,33 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file +DEFAULT_FOLDER = mechlovin/hannah910/rev1 From 1aee492c0f88b1a96fabdf750a03ed128d9d844a Mon Sep 17 00:00:00 2001 From: Jonas Avellana <14019120+ninjonas@users.noreply.github.com> Date: Fri, 31 Jan 2020 23:38:05 -0700 Subject: [PATCH 180/331] [keymap(kyria), refactor] created kyria keymap. refactored ninjonas userspace (#8053) * [keymap(kyria), refactor] created kyria keymap. refactored ninjonas userspace and keyboards * [fix(#8053)] removed redundant code based off Duckle29's code review * [fix(#8053)] fixing typos * [refactor(#8053)] updating oled timeout * [fix(8053) resolved code review issues identified by noroadsleft --- keyboards/hotdox/keymaps/ninjonas/README.md | 22 +- keyboards/hotdox/keymaps/ninjonas/keymap.c | 72 ++--- keyboards/hotdox/keymaps/ninjonas/rules.mk | 1 + keyboards/kyria/keymaps/ninjonas/config.h | 41 +++ keyboards/kyria/keymaps/ninjonas/keymap.c | 315 ++++++++++++++++++++ keyboards/kyria/keymaps/ninjonas/rules.mk | 4 + keyboards/lily58/keymaps/ninjonas/keymap.c | 6 +- users/ninjonas/README.md | 13 +- users/ninjonas/ninjonas.h | 20 +- users/ninjonas/oled.c | 29 +- users/ninjonas/process_records.c | 16 +- users/ninjonas/process_records.h | 1 + 12 files changed, 468 insertions(+), 72 deletions(-) create mode 100644 keyboards/hotdox/keymaps/ninjonas/rules.mk create mode 100644 keyboards/kyria/keymaps/ninjonas/config.h create mode 100644 keyboards/kyria/keymaps/ninjonas/keymap.c create mode 100644 keyboards/kyria/keymaps/ninjonas/rules.mk diff --git a/keyboards/hotdox/keymaps/ninjonas/README.md b/keyboards/hotdox/keymaps/ninjonas/README.md index 5cbfacf9f5a8..d761bf9c95e7 100644 --- a/keyboards/hotdox/keymaps/ninjonas/README.md +++ b/keyboards/hotdox/keymaps/ninjonas/README.md @@ -32,7 +32,7 @@ This keymap is designed based off my typing habits and is subject to change. Inf ### QWERTY ```c -/* Keymap 0: QWERTY +/* QWERTY * * ,--------------------------------------------------. ,--------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | Play | |K_LOCK | 6 | 7 | 8 | 9 | 0 | - | @@ -43,7 +43,7 @@ This keymap is designed based off my typing habits and is subject to change. Inf * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| + * | | | Alt |  | Ctl | | BkSP | Del |LOWER | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -57,16 +57,16 @@ This keymap is designed based off my typing habits and is subject to change. Inf ### LOWER ```c -/* Keymap 1: LOWER +/* LOWER * * ,--------------------------------------------------. ,----------------------------------------------------. * | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| - * | | | |KC_BRU| Play | Mute | | | | PgUp | Home | Up | End | | | + * | | |KC_BRU| Play | Mute | | | | | PgUp | Home | Up | End | | | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| - * | | | |KC_BRD| Next |VolUp |------| |-------| PgDn | Left | Down |Right |K_LOCK | | + * | | |KC_BRD| Next |VolUp | |------| |-------| PgDn | Left | Down |Right |K_LOCK | | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| - * | | | | | Prev |VolDn | | | | | | | | | | + * | | | | Prev |VolDn | | | | | | | | | | | * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' * | | | | | | | | | |M_CODE | | * `----------------------------------' `-----------------------------------' @@ -82,16 +82,16 @@ This keymap is designed based off my typing habits and is subject to change. Inf ### RAISE ```c -/* Keymap 2: RAISE +/* RAISE * * ,--------------------------------------------------. ,----------------------------------------------------. - * | | | | |K_CSCN| | | | | | | | | | | + * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| - * | M_MAKE | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | | | + * | | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| - * | M_VRSN | | MS_L | MS_D | MS_R | WH_D |------| |-------| | | | | | | + * | | | MS_L | MS_D | MS_R | WH_D |------| |-------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| - * | M_FLSH | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' * | | | | | | | | | | | | * `----------------------------------' `-----------------------------------' diff --git a/keyboards/hotdox/keymaps/ninjonas/keymap.c b/keyboards/hotdox/keymaps/ninjonas/keymap.c index eea86200c754..6637eb3b334a 100644 --- a/keyboards/hotdox/keymaps/ninjonas/keymap.c +++ b/keyboards/hotdox/keymaps/ninjonas/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include "ninjonas.h" +#include "ninjonas.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| + * | | | Alt |  | Ctl | | BkSP | Del |LOWER | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -41,10 +41,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_ergodox_wrapper( // LEFT HAND _____________________NUM_LEFT_______________________, KC_MPLY, - _____________________QWERTY_L1______________________, KC_NO, + _____________________QWERTY_L1______________________, XXXXXXX, _____________________QWERTY_L2______________________, _____________________QWERTY_L3______________________, T_LBRC, - M_SHFT, KC_NO, ________MOD_LEFT_________, + XXXXXXX, XXXXXXX, ________MOD_LEFT_________, // LEFT THUMB KC_UP, KC_DOWN, KC_HOME, @@ -53,10 +53,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //RIGHT HAND K_LOCK, _____________________NUM_RIGHT______________________, - KC_NO, _____________________QWERTY_R1______________________, + XXXXXXX,_____________________QWERTY_R1______________________, _____________________QWERTY_R2______________________, T_RBRC, _____________________QWERTY_R3______________________, - ________MOD_RIGHT________, M_XXX1, M_PYNV, + ________MOD_RIGHT________, XXXXXXX, XXXXXXX, // RIGHT THUMB KC_LEFT, KC_RGHT, KC_PGUP, @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| + * | | | Alt |  | Ctl | | BkSP | Del |LOWER | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -88,10 +88,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT_ergodox_wrapper( // LEFT HAND _____________________NUM_LEFT_______________________, KC_MPLY, - _____________________DVORAK_L1______________________, KC_NO, + _____________________DVORAK_L1______________________, XXXXXXX, _____________________DVORAK_L2______________________, _____________________DVORAK_L3______________________, T_LBRC, - M_SHFT, KC_NO, ________MOD_LEFT_________, + XXXXXXX, XXXXXXX, ________MOD_LEFT_________, // LEFT THUMB KC_UP, KC_DOWN, KC_HOME, @@ -100,10 +100,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //RIGHT HAND K_LOCK, _____________________NUM_RIGHT______________________, - KC_NO, _____________________DVORAK_R1______________________, + XXXXXXX,_____________________DVORAK_R1______________________, _____________________DVORAK_R2______________________, T_RBRC, _____________________DVORAK_R3______________________, - ________MOD_RIGHT________, M_XXX1, M_PYNV, + ________MOD_RIGHT________, XXXXXXX, XXXXXXX, // RIGHT THUMB KC_LEFT, KC_RGHT, KC_PGUP, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * |M_SHFT| | Alt |  | Ctl | | BkSP | Del |LOWER |M_XXX1|M_PYNV| + * | | | Alt |  | Ctl | | BkSP | Del |LOWER | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -135,10 +135,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_COLEMAK] = LAYOUT_ergodox_wrapper( // LEFT HAND _____________________NUM_LEFT_______________________, KC_MPLY, - _____________________COLEMAK_L1_____________________, KC_NO, + _____________________COLEMAK_L1_____________________, XXXXXXX, _____________________COLEMAK_L2_____________________, _____________________COLEMAK_L3_____________________, T_LBRC, - M_SHFT, KC_NO, ________MOD_LEFT_________, + XXXXXXX, XXXXXXX, ________MOD_LEFT_________, // LEFT THUMB KC_UP, KC_DOWN, KC_HOME, @@ -147,10 +147,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //RIGHT HAND K_LOCK, _____________________NUM_RIGHT______________________, - KC_NO, _____________________COLEMAK_R1_____________________, + XXXXXXX,_____________________COLEMAK_R1_____________________, _____________________COLEMAK_R2_____________________, T_RBRC, _____________________COLEMAK_R3_____________________, - ________MOD_RIGHT________, M_XXX1, M_PYNV, + ________MOD_RIGHT________, XXXXXXX, XXXXXXX, // RIGHT THUMB KC_LEFT, KC_RGHT, KC_PGUP, @@ -163,11 +163,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,----------------------------------------------------. * | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 | * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| - * | | | |KC_BRU| Play | Mute | | | | PgUp | Home | Up | End | | | + * | | |KC_BRU| Play | Mute | | | | | PgUp | Home | Up | End | | | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| - * | | | |KC_BRD| Next |VolUp |------| |-------| PgDn | Left | Down |Right |K_LOCK | | + * | | |KC_BRD| Next |VolUp | |------| |-------| PgDn | Left | Down |Right |K_LOCK | | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| - * | | | | | Prev |VolDn | | | | | | | | | | + * | | | | Prev |VolDn | | | | | | | | | | | * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' * | | | | | | | | | |M_CODE | | * `----------------------------------' `-----------------------------------' @@ -182,9 +182,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_ergodox_wrapper( //LEFT HAND _____________________FUNC_LEFT______________________, _______, - _______, _______, _______, _________MEDIA_1_________, _______, - _______, _______, _______, _________MEDIA_2_________, - _______, _______, _______, _________MEDIA_3_________, _______, + _____________________LOWER_L1_______________________, _______, + _____________________LOWER_L2_______________________, + _____________________LOWER_L3_______________________, _______, _______, _______, _______, _______, _______, // LEFT THUMB _______, _______, @@ -194,9 +194,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //RIGHT HAND _______, _____________________FUNC_RIGHT_____________________, - _______, _______________NAV_1______________, _______, _______, - _______________NAV_2______________, K_LOCK, _______, - _______, _______, _______, _______, _______, _______, _______, + _______, _____________________LOWER_R1_______________________, + _____________________LOWER_R2_______________________, + _______, _____________________LOWER_R3_______________________, _______, _______, _______, M_CODE, _______, // RIGHT THUMB _______, _______, @@ -208,7 +208,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* RAISE * * ,--------------------------------------------------. ,----------------------------------------------------. - * | | | | |K_CSCN| | | | | | | | | | | + * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| * | | | MS_1 | MS_U | MS_2 | WH_U | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| @@ -228,7 +228,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT_ergodox_wrapper( //LEFT HAND - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, K_CSCN, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, XXXXXXX, XXXXXXX, _____________MOUSE_2______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, @@ -255,11 +255,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ADJUST * * ,--------------------------------------------------. ,----------------------------------------------------. - * | | | | | | | | | | | | |COLMAK|DVORAK |QWERTY | + * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |-------+------+------+------+------+-------+--------| - * | M_MAKE | | | | | | | | | | | | | | | + * | M_MAKE |RESET | | | | | | | | | | |COLMAK|DVORAK |QWERTY | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| - * | M_VRSN | | | | | |------| |-------| | | | | | | + * | M_VRSN |M_MALL| | | | |------| |-------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+-------+--------| * | M_FLSH | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `--------------+------+------+------+-------+--------' @@ -276,9 +276,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ergodox_wrapper( //LEFT HAND XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - M_MAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - M_VRSN, M_MALL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _____________________ADJUST_L1______________________, XXXXXXX, + _____________________ADJUST_L1______________________, + _____________________ADJUST_L1______________________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // LEFT THUMB _______, _______, @@ -287,10 +287,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, //RIGHT HAND - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, _____________________ADJUST_R1______________________, + _____________________ADJUST_R1______________________, + XXXXXXX, _____________________ADJUST_R1______________________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // RIGHT THUMB _______, _______, diff --git a/keyboards/hotdox/keymaps/ninjonas/rules.mk b/keyboards/hotdox/keymaps/ninjonas/rules.mk new file mode 100644 index 000000000000..3ec5fb062843 --- /dev/null +++ b/keyboards/hotdox/keymaps/ninjonas/rules.mk @@ -0,0 +1 @@ +LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kyria/keymaps/ninjonas/config.h b/keyboards/kyria/keymaps/ninjonas/config.h new file mode 100644 index 000000000000..409058ad762b --- /dev/null +++ b/keyboards/kyria/keymaps/ninjonas/config.h @@ -0,0 +1,41 @@ +/* Copyright 2020 ninjonas + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define TAPPING_TERM 200 + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 + #define OLED_TIMEOUT 30000 +#endif + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_SLEEP +# define RGBLIGHT_LIMIT_VAL 200 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SPLIT +#endif + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +#define SPLIT_USB_DETECT +#define SPLIT_USB_TIMEOUT 1000 diff --git a/keyboards/kyria/keymaps/ninjonas/keymap.c b/keyboards/kyria/keymaps/ninjonas/keymap.c new file mode 100644 index 000000000000..1337c4427988 --- /dev/null +++ b/keyboards/kyria/keymaps/ninjonas/keymap.c @@ -0,0 +1,315 @@ +/* Copyright 2020 ninjonas + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "ninjonas.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_wrapper( +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. + _____________________QWERTY_L1______________________, _____________________QWERTY_R1______________________, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| + _____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| + _____________________QWERTY_L3______________________,XXXXXXX,KC_LALT, M_COPA,XXXXXXX,_____________________QWERTY_R3______________________, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' + _____________MOD_LEFT_____________,T_LBRC, T_RBRC,________MOD_RIGHT________,KC_MUTE +// `----------------------------------------' `----------------------------------------' + ), + + [_DVORAK] = LAYOUT_wrapper( +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. + _____________________DVORAK_L1______________________, _____________________DVORAK_R1______________________, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| + _____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| + _____________________DVORAK_L3______________________,XXXXXXX,KC_LALT, M_COPA,XXXXXXX,_____________________DVORAK_R3______________________, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' + _____________MOD_LEFT_____________,T_LBRC, T_RBRC,________MOD_RIGHT________,KC_MUTE +// `----------------------------------------' `----------------------------------------' + ), + + [_COLEMAK] = LAYOUT_wrapper( +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. + _____________________COLEMAK_L1_____________________, _____________________COLEMAK_R1_____________________, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| + _____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| + _____________________COLEMAK_L3_____________________,XXXXXXX,KC_LALT, M_COPA,XXXXXXX,_____________________COLEMAK_R3_____________________, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' + _____________MOD_LEFT_____________,T_LBRC, T_RBRC,________MOD_RIGHT________,KC_MUTE +// `----------------------------------------' `----------------------------------------' + ), + + [_LOWER] = LAYOUT_wrapper( +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. + _____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| + _____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| + _____________________LOWER_L3_______________________,_______,_______, _______,_______,_____________________LOWER_R3_______________________, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ +// `----------------------------------------' `----------------------------------------' + ), + + [_RAISE] = LAYOUT_wrapper( +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. + _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| + _____________________SYM_LEFT_______________________, _____________________SYM_RIGHT______________________, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| + _____________________FUNC_LEFT______________________,_______,_______, _______,_______,_____________________FUNC_RIGHT_____________________, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ +// `----------------------------------------' `----------------------------------------' + ), + + [_ADJUST] = LAYOUT_wrapper( +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. + _____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| + _____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| + _____________________ADJUST_L3______________________,_______,_______, _______,_______,_____________________ADJUST_R3______________________, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ +// `----------------------------------------' `----------------------------------------' + ), +/* + [_TEMPLATE] = LAYOUT_wrapper( +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' + XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX +// `----------------------------------------' `----------------------------------------' + ), +*/ +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_logo(void) { + static const char PROGMEM logo[] = { + // Converter: https://javl.github.io/image2cpp/ + // Image Dimensions: 128x64 + // Code Output Format: Plain Bytes + // Draw Mode: Vertical, 1 bit per pixel +0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0xe0, +0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x80, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, 0xe0, 0xe0, 0xe0, +0xe0, 0x00, 0x60, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, +0xc0, 0xe0, 0xe0, 0xe0, 0x20, 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, +0xe0, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0x00, +0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0xe0, 0xe0, 0xfc, 0xfe, +0xfe, 0xfe, 0xee, 0xee, 0x0e, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, +0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, +0x00, 0x00, 0x79, 0xfd, 0xfd, 0xfd, 0xec, 0xee, 0x76, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, +0x07, 0x3f, 0xff, 0xfc, 0xf8, 0xff, 0x7f, 0x07, 0x0f, 0x7f, 0xff, 0xf8, 0xfc, 0xff, 0x3f, 0x07, +0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xfe, 0xf0, 0xff, 0x7f, 0x0f, 0x07, 0x3f, 0xff, 0xfc, 0xf8, +0xff, 0x7f, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0xff, 0xfe, 0xf8, 0xff, 0xff, 0x1f, 0x03, +0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xf6, 0xe6, 0xe6, 0xf7, 0xf7, 0x77, 0x37, 0x17, 0x00, 0x30, +0x79, 0xfd, 0xfd, 0xfd, 0xee, 0xee, 0x76, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x7f, 0xff, 0xf1, 0xe0, 0xe0, 0xff, 0xff, 0x7f, 0x3f, +0x0e, 0x00, 0x0e, 0x3f, 0x7f, 0xff, 0xff, 0xe0, 0xe0, 0xe1, 0xff, 0x7f, 0x7f, 0x3f, 0x04, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x3c, 0xfc, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, 0xfc, 0xfc, 0x7c, 0x1c, 0x00, 0xf0, 0xf8, +0xf8, 0xfc, 0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0x30, 0xb8, 0xbc, 0xbc, +0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1d, 0x1d, +0x00, 0xf0, 0xf8, 0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0xfc, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0xe0, 0xf0, +0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0x3c, 0xfc, 0xf8, 0xf8, 0xe0, 0x00, 0x00, 0x20, 0xb8, 0xbc, 0xbc, +0xbc, 0xdc, 0xdc, 0xfc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x0c, 0x7c, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, +0xfc, 0xfc, 0xfc, 0xfc, 0xf0, 0x80, 0x00, 0xf8, 0xfc, 0xfc, 0x3c, 0x04, 0x0c, 0x7c, 0xfc, 0xfc, +0xf0, 0x00, 0xc0, 0xfc, 0xfc, 0x7c, 0xfc, 0xf8, 0xc0, 0x00, 0xf0, 0xfc, 0xfc, 0x7c, 0x0c, 0x00, +0x00, 0x00, 0xc0, 0xc1, 0xc7, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x07, 0x0f, +0x1f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, +0x1d, 0x1d, 0x0e, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, +0x00, 0x07, 0x0f, 0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x03, 0x07, +0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1f, 0x0f, 0x0f, 0x03, 0x00, 0x00, 0x0f, 0x1f, 0x1f, 0x1f, +0x1d, 0x1d, 0x0c, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, +0x0f, 0x01, 0x00, 0x07, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, +0x1f, 0x1e, 0x1f, 0x1f, 0x03, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, +0x00, 0x80, 0xc1, 0xf1, 0xf9, 0xf9, 0xf9, 0xb8, 0xb8, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, +0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, +0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, +0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x7c, 0xfe, 0xff, 0xff, 0xc7, 0x83, 0x83, +0xc7, 0xff, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x7c, 0xff, 0xff, 0xff, 0xc7, 0x83, 0x83, 0xc7, 0xff, +0xff, 0xfe, 0x7c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, +0x00, 0x00, 0x03, 0x1f, 0xff, 0xff, 0xf0, 0xe0, 0xfe, 0xff, 0x1f, 0x3f, 0xff, 0xfe, 0xe0, 0xf0, +0xff, 0xff, 0x1f, 0x03, 0x00, 0x01, 0x0f, 0x7f, 0xff, 0xf8, 0xc0, 0xfc, 0xff, 0x3f, 0x1f, 0xff, +0xfe, 0xf0, 0xe0, 0xff, 0xff, 0x3f, 0x07, 0x00, 0x01, 0x07, 0x3f, 0xff, 0xff, 0xf8, 0xe0, 0xfc, +0xff, 0x7f, 0x0f, 0x03, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xdb, 0x9b, 0x9b, 0xdf, 0xdf, 0xdf, 0xde, +0x1c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, +0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, +0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, +0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, +0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x3f, 0x3f, 0x1f, 0x0f, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00 + }; + oled_write_raw_P(logo, sizeof(logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +void oled_white_space(void){ + oled_write_P(PSTR(" "), false); +} + +static void render_status(void) { + oled_write_P(PSTR("\nLayer: "), false); + oled_write_P(PSTR("LOW"), (layer_state_is(_LOWER) & !layer_state_is(_ADJUST))); + oled_white_space(); + oled_write_P(PSTR("RAI"), (layer_state_is(_RAISE) & !layer_state_is(_ADJUST))); + oled_white_space(); + oled_write_P(PSTR("ADJ"), layer_state_is(_ADJUST)); +} + +void render_default_layer_state(void) { + oled_write_P(PSTR("\nLayout: "), false); + switch (biton32(default_layer_state)) { + case _COLEMAK: + oled_write_P(PSTR("Colemak"), false); + break; + case _DVORAK: + oled_write_P(PSTR("Dvorak"), false); + break; + case _QWERTY: + oled_write_P(PSTR("Qwerty"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } +} + +void render_mod_status(uint8_t modifiers) { + oled_write_P(PSTR("\nMods: "), false); + oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); + oled_white_space(); + oled_write_P(PSTR("CTL"), (modifiers & MOD_MASK_CTRL)); + oled_white_space(); + oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); + oled_white_space(); + oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_qmk_logo(); + render_default_layer_state(); + render_status(); + render_mod_status(get_mods()|get_oneshot_mods()); + } else { + render_logo(); + oled_scroll_left(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (biton32(layer_state)) { + case _LOWER: + if (clockwise) { + tap_code16(SGUI(KC_TAB)); + } else { + tap_code16(LGUI(KC_TAB)); + } + break; + case _RAISE: + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } + break; + case _ADJUST: + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + default: + if (clockwise) { + tap_code(KC_BRIU); + } else { + tap_code(KC_BRID); + } + break; + } + } else if (index == 1) { + switch (biton32(layer_state)) { + case _LOWER: + if (!clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + break; + case _RAISE: + if (!clockwise) { + tap_code16(LCTL(KC_TAB)); + } else { + tap_code16(LCTL(LSFT(KC_TAB))); + } + break; + case _ADJUST: + if (!clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + break; + default: + if (!clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + } +} +#endif \ No newline at end of file diff --git a/keyboards/kyria/keymaps/ninjonas/rules.mk b/keyboards/kyria/keymaps/ninjonas/rules.mk new file mode 100644 index 000000000000..13bc4cf97b13 --- /dev/null +++ b/keyboards/kyria/keymaps/ninjonas/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file diff --git a/keyboards/lily58/keymaps/ninjonas/keymap.c b/keyboards/lily58/keymaps/ninjonas/keymap.c index 0ed197c14117..0bd330a7666b 100644 --- a/keyboards/lily58/keymaps/ninjonas/keymap.c +++ b/keyboards/lily58/keymaps/ninjonas/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _____________________QWERTY_L1______________________, _____________________QWERTY_R1______________________, \ _____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________, \ _____________________QWERTY_L3______________________, T_LBRC, T_RBRC, _____________________QWERTY_R3______________________, \ - ________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \ + _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ \ ), /* DVORAK @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _____________________DVORAK_L1______________________, _____________________DVORAK_R1______________________, \ _____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________, \ _____________________DVORAK_L3______________________, T_LBRC, T_RBRC, _____________________DVORAK_R3______________________, \ - ________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \ + _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ \ ), /* COLEMAK @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _____________________COLEMAK_L1_____________________, _____________________COLEMAK_R1_____________________, \ _____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________, \ _____________________COLEMAK_L3_____________________, T_LBRC, T_RBRC, _____________________COLEMAK_R3_____________________, \ - ________MOD_LEFT_________, LT_RAI, LT_LOW, ________MOD_RIGHT________ \ + _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ \ ), /* LOWER diff --git a/users/ninjonas/README.md b/users/ninjonas/README.md index 1e3fe9c31f06..301b350e7af0 100644 --- a/users/ninjonas/README.md +++ b/users/ninjonas/README.md @@ -14,6 +14,7 @@ See: https://docs.qmk.fm/#/feature_userspace - [Hotdox](../../keyboards/hotdox/keymaps/ninjonas) - [Pinky3](../../keyboards/pinky/3/keymaps/ninjonas) - [Lily58](../../keyboards/lily58/keymaps/ninjonas) +- [Kyria](../../keyboards/kyria/keymaps/ninjonas) ## Features ### [Keys](ninjonas.h#L37) @@ -33,6 +34,8 @@ See: https://docs.qmk.fm/#/feature_userspace |LT_LOW + LT_RAI | Hold for ADJUST | |LM_LOW | Dedicated key to momentarily toggle to use LOWER layer | |LM_RAI | Dedicated key to momentarily toggle to use RAISE layer | +|LG_LOW | Press to toggle LOWER layer | +|LG_RAI | Press to toggle RAISE layer | ### [Mod-Taps](ninjonas.h#L50) |Code | Description | @@ -59,13 +62,15 @@ Predefined keyboard layout templates to speed up configuring split keyboards ### [Macros](process_records.c) |Code | Description | |---|---| -|M_PYNV | macro to activate pyenv with the name `jira` | -|M_MAKE | macro to send QMK make command to compile keyboard | -|M_FLSH | macro to send QMK make command to compile keyboard with the correct bootloader | -|M_VRSN | macro to send QMK version | +|M_PYNV | Macro to activate pyenv with the name `jira` | +|M_MAKE | Macro to send QMK make command to compile keyboard | +|M_MALL | Macro to send QMK make command to all [ninjonas](#Supported%20Keyboards) keyboards | +|M_FLSH | Macro to send QMK make command to compile keyboard with the correct bootloader | +|M_VRSN | Macro to send QMK version | |M_SHFT | Sends  + alt + shift to a keycode to activate [ShiftIt](https://github.com/fikovnik/ShiftIt) | |M_CODE | Opens [Visual Studio Code](https://code.visualstudio.com/) on current directory | |M_TERM | Launches Spotlight and calls Terminal | +|M_COPA | Single key copy/paste | |M_XXX1 to M_XXX5 | Reserved for secret macros see [Secrets](#secrets) | ### [Tap-Dance](tap_dances.h) diff --git a/users/ninjonas/ninjonas.h b/users/ninjonas/ninjonas.h index b86ccc7333e8..ba94c8ea8983 100644 --- a/users/ninjonas/ninjonas.h +++ b/users/ninjonas/ninjonas.h @@ -44,6 +44,8 @@ // Layer Keys #define LM_LOW MO(_LOWER) #define LM_RAI MO(_RAISE) +#define LG_LOW TG(_LOWER) +#define LG_RAI TG(_RAISE) #define LT_LOW LT(_LOWER, KC_ENT) #define LT_RAI LT(_RAISE, KC_SPC) @@ -52,7 +54,7 @@ #define MT_EQL MT(MOD_LALT | MOD_LSFT, KC_EQL) // Layout blocks -#define _____________________QWERTY_L1______________________ T_TAB, T_Q, T_W, KC_E, KC_R, KC_T +#define _____________________QWERTY_L1______________________ T_TAB, T_Q, KC_W, KC_E, KC_R, KC_T #define _____________________QWERTY_L2______________________ T_ESC, KC_A, KC_S, KC_D, KC_F, KC_G #define _____________________QWERTY_L3______________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B @@ -62,13 +64,13 @@ #define _____________________DVORAK_L1______________________ T_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y #define _____________________DVORAK_L2______________________ T_ESC, KC_A, KC_O, KC_E, KC_U, KC_I -#define _____________________DVORAK_L3______________________ KC_LSFT, KC_SCLN, T_Q, KC_J, KC_K, KC_X +#define _____________________DVORAK_L3______________________ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X #define _____________________DVORAK_R1______________________ KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS #define _____________________DVORAK_R2______________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH -#define _____________________DVORAK_R3______________________ KC_B, KC_M, T_W, KC_V, KC_Z, MT_EQL +#define _____________________DVORAK_R3______________________ KC_B, KC_M, KC_W, KC_V, KC_Z, MT_EQL -#define _____________________COLEMAK_L1_____________________ T_TAB, T_Q, T_W, KC_F, KC_P, KC_G +#define _____________________COLEMAK_L1_____________________ T_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G #define _____________________COLEMAK_L2_____________________ T_ESC, KC_A, KC_R, KC_S, KC_T, KC_D #define _____________________COLEMAK_L3_____________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B @@ -94,7 +96,8 @@ #define _____________________LOWER_R3_______________________ T_RBRC, KC_M, M_TERM, M_CODE, M_XXX1, M_PYNV #define _____________________ADJUST_L1______________________ M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#ifdef RGB_MATRIX_ENABLE + +#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) #define _____________________ADJUST_L2______________________ M_VRSN, M_MALL, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI #define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD #else @@ -102,7 +105,7 @@ #define _____________________ADJUST_L3______________________ M_FLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX #endif -#ifdef RGB_MATRIX_ENABLE +#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) #define _____________________ADJUST_R1______________________ RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY #define _____________________ADJUST_R3______________________ RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX #else @@ -119,11 +122,14 @@ #define __________________________________ _______, _______, _______, _______ +#define _____________MOD_LEFT_____________ KC_LALT, T_GUI, KC_LCTL, LT_RAI +#define _____________MOD_RIGHT____________ LT_LOW, KC_BSPC, MT_DEL, LM_LOW + #define _________MEDIA_1_________ KC_BRIU, KC_MPLY, KC_MUTE #define _________MEDIA_2_________ KC_BRID, KC_MFFD, KC__VOLUP #define _________MEDIA_3_________ XXXXXXX, KC_MRWD, KC__VOLDOWN -#ifdef KEYBOARD_crkbd_rev1 +#if defined(KEYBOARD_crkbd_rev1) || defined(KEYBOARD_kyria_rev1) #define ________MOD_LEFT_________ T_GUI, KC_LCTL, LT_RAI #define ________MOD_RIGHT________ LT_LOW, KC_BSPC, MT_DEL #else diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index 721038e15bf1..ac98133bc73f 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c @@ -2,7 +2,7 @@ #include #include "ninjonas.h" -#ifdef OLED_DRIVER_ENABLE +#if defined(OLED_DRIVER_ENABLE) & !defined(KEYBOARD_kyria_rev1) static uint32_t oled_timer = 0; extern uint8_t is_master; @@ -38,19 +38,28 @@ void render_default_layer_state(void) { } } +void oled_white_space(void){ + oled_write_P(PSTR(" "), false); +} + void render_layer_state(void) { - oled_write_P(PSTR("\nLayer:"), false); - oled_write_P(PSTR(" LOW"), layer_state_is(_LOWER)); - oled_write_P(PSTR(" RAI"), layer_state_is(_RAISE)); - oled_write_P(PSTR(" ADJ"), layer_state_is(_ADJUST)); + oled_write_P(PSTR("\nLayer: "), false); + oled_write_P(PSTR("LOW"), (layer_state_is(_LOWER) & !layer_state_is(_ADJUST))); + oled_white_space(); + oled_write_P(PSTR("RAI"), (layer_state_is(_RAISE) & !layer_state_is(_ADJUST))); + oled_white_space(); + oled_write_P(PSTR("ADJ"), layer_state_is(_ADJUST)); } void render_mod_status(uint8_t modifiers) { - oled_write_P(PSTR("\nMods: "), false); - oled_write_P(PSTR("SHF "), (modifiers & MOD_MASK_SHIFT)); - oled_write_P(PSTR("CTL "), (modifiers & MOD_MASK_CTRL)); - oled_write_P(PSTR("ALT "), (modifiers & MOD_MASK_ALT)); - oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); + oled_write_P(PSTR("\nMods: "), false); + oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); + oled_white_space(); + oled_write_P(PSTR("CTL"), (modifiers & MOD_MASK_CTRL)); + oled_white_space(); + oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); + oled_white_space(); + oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); } void render_status(void){ diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c index 8044b49f1008..5c6d98ec8fa4 100644 --- a/users/ninjonas/process_records.c +++ b/users/ninjonas/process_records.c @@ -1,5 +1,7 @@ #include "ninjonas.h" +uint16_t copy_paste_timer; + __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } @@ -44,7 +46,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Sends QMK make command to compile all keyboards case M_MALL: if (record->event.pressed) { - SEND_STRING("rm -f *.hex && rm -rf .build/ && make crkbd:ninjonas lily58:ninjonas hotdox:ninjonas pinky/3:ninjonas\n"); + SEND_STRING("rm -f *.hex && rm -rf .build/ && make crkbd:ninjonas lily58:ninjonas hotdox:ninjonas pinky/3:ninjonas kyria:ninjonas\n"); } break; @@ -90,6 +92,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; + // Single key copy/paste + case M_COPA: + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { + tap_code16(LGUI(KC_C)); // Hold  + C + } else { + tap_code16(LGUI(KC_V)); // Tap  + V + } + } + // BEGIN: Layer macros case QWERTY: if (record->event.pressed) { diff --git a/users/ninjonas/process_records.h b/users/ninjonas/process_records.h index 2e69ca216323..34886531a57d 100644 --- a/users/ninjonas/process_records.h +++ b/users/ninjonas/process_records.h @@ -15,6 +15,7 @@ enum custom_keycodes { M_VRSN, M_CODE, M_TERM, + M_COPA, // Secret Macros M_XXX1, M_XXX2, From 8e550fc11a59326cb759593418ce1a062392daaf Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 23 Jan 2020 05:26:52 +1100 Subject: [PATCH 181/331] Add thread safety around i2c_master for ChibiOS/ARM. --- drivers/arm/i2c_master.c | 63 ++++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index 21aefd497ccf..b3fabb05e740 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -29,8 +29,6 @@ #include #include -static uint8_t i2c_address; - static const I2CConfig i2cconfig = { #ifdef USE_I2CV1 I2C1_OPMODE, @@ -71,27 +69,49 @@ __attribute__((weak)) void i2c_init(void) { } i2c_status_t i2c_start(uint8_t address) { - i2c_address = address; +#if I2C_USE_MUTUAL_EXCLUSION + i2cAcquireBus(&I2C_DRIVER); +#endif + i2cStart(&I2C_DRIVER, &i2cconfig); return I2C_STATUS_SUCCESS; } i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_address = address; +#if I2C_USE_MUTUAL_EXCLUSION + i2cAcquireBus(&I2C_DRIVER); +#endif + i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (address >> 1), data, length, 0, 0, MS2ST(timeout)); + +#if I2C_USE_MUTUAL_EXCLUSION + i2cReleaseBus(&I2C_DRIVER); +#endif + return chibios_to_qmk(&status); } i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_address = address; +#if I2C_USE_MUTUAL_EXCLUSION + i2cAcquireBus(&I2C_DRIVER); +#endif + i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); + msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (address >> 1), data, length, MS2ST(timeout)); + +#if I2C_USE_MUTUAL_EXCLUSION + i2cReleaseBus(&I2C_DRIVER); +#endif + return chibios_to_qmk(&status); } i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_address = devaddr; +#if I2C_USE_MUTUAL_EXCLUSION + i2cAcquireBus(&I2C_DRIVER); +#endif + i2cStart(&I2C_DRIVER, &i2cconfig); uint8_t complete_packet[length + 1]; @@ -100,15 +120,34 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, } complete_packet[0] = regaddr; - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (devaddr >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); + +#if I2C_USE_MUTUAL_EXCLUSION + i2cReleaseBus(&I2C_DRIVER); +#endif + return chibios_to_qmk(&status); } i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_address = devaddr; +#if I2C_USE_MUTUAL_EXCLUSION + i2cAcquireBus(&I2C_DRIVER); +#endif + i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout)); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (devaddr >> 1), ®addr, 1, data, length, MS2ST(timeout)); + +#if I2C_USE_MUTUAL_EXCLUSION + i2cReleaseBus(&I2C_DRIVER); +#endif + return chibios_to_qmk(&status); } -void i2c_stop(void) { i2cStop(&I2C_DRIVER); } +void i2c_stop(void) { + i2cStop(&I2C_DRIVER); + +#if I2C_USE_MUTUAL_EXCLUSION + i2cReleaseBus(&I2C_DRIVER); +#endif +} From 1858c3ed117b8c6b446ad28a7a2f0b8de39b1d71 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 1 Feb 2020 00:42:42 -0800 Subject: [PATCH 182/331] Skog Lite: disable Console; update info.json (#8058) * disable Console to save firmware space * rules.mk templating Add comments regarding the rules, to more closely match the ps2avrgb template. * update info.json This board has a quite interesting take on the standard TKL; why not show it off? --- keyboards/percent/skog_lite/info.json | 292 ++++++++++++++++++++++++-- keyboards/percent/skog_lite/rules.mk | 18 +- 2 files changed, 286 insertions(+), 24 deletions(-) diff --git a/keyboards/percent/skog_lite/info.json b/keyboards/percent/skog_lite/info.json index d8e382cce0b9..a1d10f59c4d5 100644 --- a/keyboards/percent/skog_lite/info.json +++ b/keyboards/percent/skog_lite/info.json @@ -1,20 +1,280 @@ { - "keyboard_name": "Skog Lite", - "url": "", - "maintainer": "qmk", - "width": 18.25, - "height": 6.5, - "layouts": { - "LAYOUT_tkl_ansi": { - "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] - }, + "keyboard_name": "Skog Lite", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0.5}, + {"x":16.25, "y":0.5}, + {"x":17.25, "y":0.5}, + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.75}, + {"x":16.25, "y":1.75}, + {"x":17.25, "y":1.75}, + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":2.25, "w":1.5}, + {"x":15.25, "y":2.75}, + {"x":16.25, "y":2.75}, + {"x":17.25, "y":2.75}, + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25, "w":2.25}, + {"x":0, "y":4.25, "w":2.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + {"x":0, "y":5.25, "w":1.25}, + {"x":1.25, "y":5.25, "w":1.25}, + {"x":2.5, "y":5.25, "w":1.25}, + {"x":3.75, "y":5.25, "w":6.25}, + {"x":10, "y":5.25, "w":1.25}, + {"x":11.25, "y":5.25, "w":1.25}, + {"x":12.5, "y":5.25, "w":1.25}, + {"x":13.75, "y":5.25, "w":1.25}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25} + ] + }, - "LAYOUT_tkl_7u_ansi": { - "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] - }, + "LAYOUT_tkl_7u_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0.5}, + {"x":16.25, "y":0.5}, + {"x":17.25, "y":0.5}, + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.75}, + {"x":16.25, "y":1.75}, + {"x":17.25, "y":1.75}, + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":2.25, "w":1.5}, + {"x":15.25, "y":2.75}, + {"x":16.25, "y":2.75}, + {"x":17.25, "y":2.75}, + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25, "w":2.25}, + {"x":0, "y":4.25, "w":2.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + {"x":0, "y":5.25, "w":1.5}, + {"x":1.5, "y":5.25}, + {"x":2.5, "y":5.25, "w":1.5}, + {"x":4, "y":5.25, "w":7}, + {"x":11, "y":5.25, "w":1.5}, + {"x":12.5, "y":5.25}, + {"x":13.5, "y":5.25, "w":1.5}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25} + ] + }, - "LAYOUT_tkl_7u_ansi_blocker": { - "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] - } - } + "LAYOUT_tkl_7u_ansi_blocker": { + "layout": [ + {"x":0, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0.5}, + {"x":16.25, "y":0.5}, + {"x":17.25, "y":0.5}, + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.75}, + {"x":16.25, "y":1.75}, + {"x":17.25, "y":1.75}, + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":2.25, "w":1.5}, + {"x":15.25, "y":2.75}, + {"x":16.25, "y":2.75}, + {"x":17.25, "y":2.75}, + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25, "w":2.25}, + {"x":0, "y":4.25, "w":2.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + {"x":0, "y":5.25, "w":1.5}, + {"x":2.5, "y":5.25, "w":1.5}, + {"x":4, "y":5.25, "w":7}, + {"x":11, "y":5.25, "w":1.5}, + {"x":13.5, "y":5.25, "w":1.5}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25} + ] + } + } } diff --git a/keyboards/percent/skog_lite/rules.mk b/keyboards/percent/skog_lite/rules.mk index 1d2372c77fcd..dbcb6c188837 100644 --- a/keyboards/percent/skog_lite/rules.mk +++ b/keyboards/percent/skog_lite/rules.mk @@ -11,14 +11,16 @@ MCU = atmega32a # ATmega328P USBasp BOOTLOADER = bootloadHID -# build options -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 From 4e6d1ae0eaafb64d04ae6a5e00d2ef41623248cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=BDupa?= Date: Sat, 1 Feb 2020 10:17:28 +0100 Subject: [PATCH 183/331] Fix timer_elapsed() overflow issue for STM32F103 and other ChibiOS boards (#7595) * fixed strange space cadet timer owerflow on STM32F103 * Moved elapsed time fix to timer.c --- tmk_core/common/chibios/timer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/chibios/timer.c b/tmk_core/common/chibios/timer.c index 1ce9d1d17c1f..66c4a6458eec 100644 --- a/tmk_core/common/chibios/timer.c +++ b/tmk_core/common/chibios/timer.c @@ -28,6 +28,10 @@ uint32_t timer_read32(void) { return current_time_ms; } -uint16_t timer_elapsed(uint16_t last) { return timer_read() - last; } +uint16_t timer_elapsed(uint16_t last) { + return TIMER_DIFF_16(timer_read(), last); +} -uint32_t timer_elapsed32(uint32_t last) { return timer_read32() - last; } +uint32_t timer_elapsed32(uint32_t last) { + return TIMER_DIFF_32(timer_read32(), last); +} From 1a79f14e4390d088fcf6b26fe3b62549875c3e71 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 1 Feb 2020 09:46:34 +0000 Subject: [PATCH 184/331] format code according to conventions [skip ci] --- tmk_core/common/chibios/timer.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tmk_core/common/chibios/timer.c b/tmk_core/common/chibios/timer.c index 66c4a6458eec..ed5cfe1b055e 100644 --- a/tmk_core/common/chibios/timer.c +++ b/tmk_core/common/chibios/timer.c @@ -28,10 +28,6 @@ uint32_t timer_read32(void) { return current_time_ms; } -uint16_t timer_elapsed(uint16_t last) { - return TIMER_DIFF_16(timer_read(), last); -} +uint16_t timer_elapsed(uint16_t last) { return TIMER_DIFF_16(timer_read(), last); } -uint32_t timer_elapsed32(uint32_t last) { - return TIMER_DIFF_32(timer_read32(), last); -} +uint32_t timer_elapsed32(uint32_t last) { return TIMER_DIFF_32(timer_read32(), last); } From e036b94a215157bb45913a22267d709ec5c6ef5f Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 2 Feb 2020 13:10:57 +1100 Subject: [PATCH 185/331] Align ATSAM HID descriptors with LUFA/ChibiOS (#7651) * Align ATSAM HID descriptors with LUFA/ChibiOS * Don't hardcode raw endpoint size --- tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c | 301 +++++++++--------- 1 file changed, 154 insertions(+), 147 deletions(-) diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c index c3952d50c82b..ace7c210873a 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c @@ -98,30 +98,36 @@ UDC_DESC_STORAGE udi_hid_kbd_report_desc_t udi_hid_kbd_report_desc = {{ 0x05, 0x01, // Usage Page (Generic Desktop) 0x09, 0x06, // Usage (Keyboard) 0xA1, 0x01, // Collection (Application) + // Modifiers (8 bits) 0x05, 0x07, // Usage Page (Keyboard) - 0x19, 0xE0, // Usage Minimum (224) - 0x29, 0xE7, // Usage Maximum (231) + 0x19, 0xE0, // Usage Minimum (Keyboard Left Control) + 0x29, 0xE7, // Usage Maximum (Keyboard Right GUI) 0x15, 0x00, // Logical Minimum (0) 0x25, 0x01, // Logical Maximum (1) - 0x75, 0x01, // Report Size (1) 0x95, 0x08, // Report Count (8) + 0x75, 0x01, // Report Size (1) 0x81, 0x02, // Input (Data, Variable, Absolute) + // Reserved (1 byte) 0x81, 0x01, // Input (Constant) + // Keycodes (6 bytes) 0x19, 0x00, // Usage Minimum (0) 0x29, 0xFF, // Usage Maximum (255) 0x15, 0x00, // Logical Minimum (0) 0x25, 0xFF, // Logical Maximum (255) - 0x75, 0x08, // Report Size (8) 0x95, 0x06, // Report Count (6) - 0x81, 0x00, // Input (Data, Array) + 0x75, 0x08, // Report Size (8) + 0x81, 0x00, // Input (Data, Array, Absolute) + + // Status LEDs (5 bits) 0x05, 0x08, // Usage Page (LED) - 0x19, 0x01, // Usage Minimum (1) - 0x29, 0x05, // Usage Maximum (5) + 0x19, 0x01, // Usage Minimum (Num Lock) + 0x29, 0x05, // Usage Maximum (Kana) 0x15, 0x00, // Logical Minimum (0) 0x25, 0x01, // Logical Maximum (1) - 0x75, 0x01, // Report Size (1) 0x95, 0x05, // Report Count (5) + 0x75, 0x01, // Report Size (1) 0x91, 0x02, // Output (Data, Variable, Absolute) + // LED padding (3 bits) 0x95, 0x03, // Report Count (3) 0x91, 0x01, // Output (Constant) 0xC0 // End Collection @@ -231,43 +237,41 @@ static uint8_t udi_hid_nkro_report_trans[UDI_HID_NKRO_REPORT_SIZE]; COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udi_hid_nkro_report_desc_t udi_hid_nkro_report_desc = {{ - 0x05, 0x01, // Usage Page (Generic Desktop), - 0x09, 0x06, // Usage (Keyboard), - 0xA1, 0x01, // Collection (Application) - Keyboard, - - // Mods - 0x75, 0x01, // Report Size (1), - 0x95, 0x08, // Report Count (8), - 0x15, 0x00, // Logical Minimum (0), - 0x25, 0x01, // Logical Maximum (1), - 0x05, 0x07, // Usage Page (Key Codes), - 0x19, 0xE0, // Usage Minimum (224), - 0x29, 0xE7, // Usage Maximum (231), - 0x81, 0x02, // Input (Data, Variable, Absolute), - - // LED Report - 0x75, 0x01, // Report Size (1), - 0x95, 0x05, // Report Count (5), - 0x05, 0x08, // Usage Page (LEDs), - 0x19, 0x01, // Usage Minimum (1), - 0x29, 0x05, // Usage Maximum (5), - 0x91, 0x02, // Output (Data, Variable, Absolute), - - // LED Report Padding - 0x75, 0x03, // Report Size (3), - 0x95, 0x01, // Report Count (1), - 0x91, 0x03, // Output (Constant), - - // Main keys - 0x75, 0x01, // Report Size (1), - 0x95, 0xF8, // Report Count (248), - 0x15, 0x00, // Logical Minimum (0), - 0x25, 0x01, // Logical Maximum (1), - 0x05, 0x07, // Usage Page (Key Codes), - 0x19, 0x00, // Usage Minimum (0), - 0x29, 0xF7, // Usage Maximum (247), - 0x81, 0x02, // Input (Data, Variable, Absolute, Bitfield), - 0xc0, // End Collection - Keyboard + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x06, // Usage (Keyboard) + 0xA1, 0x01, // Collection (Application) + + // Modifiers (8 bits) + 0x05, 0x07, // Usage Page (Keyboard/Keypad) + 0x19, 0xE0, // Usage Minimum (Keyboard Left Control) + 0x29, 0xE7, // Usage Maximum (Keyboard Right GUI) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0x08, // Report Count (8) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Keycodes + 0x05, 0x07, // Usage Page (Keyboard/Keypad) + 0x19, 0x00, // Usage Minimum (0) + 0x29, 0xF7, // Usage Maximum (247) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0xF8, // Report Count (248) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute, Bitfield) + + // Status LEDs (5 bits) + 0x05, 0x08, // Usage Page (LED) + 0x19, 0x01, // Usage Minimum (Num Lock) + 0x29, 0x05, // Usage Maximum (Kana) + 0x95, 0x05, // Report Count (5) + 0x75, 0x01, // Report Size (1) + 0x91, 0x02, // Output (Data, Variable, Absolute) + // LED padding (3 bits) + 0x95, 0x01, // Report Count (1) + 0x75, 0x03, // Report Size (3) + 0x91, 0x03, // Output (Constant) + 0xC0 // End Collection }}; static bool udi_hid_nkro_setreport(void); @@ -373,35 +377,31 @@ static uint8_t udi_hid_exk_report_trans[UDI_HID_EXK_REPORT_SIZE]; COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udi_hid_exk_report_desc_t udi_hid_exk_report_desc = {{ - // System Control Collection (8 bits) - - 0x05, 0x01, // Usage Page (Generic Desktop), - 0x09, 0x80, // Usage (System Control), - 0xA1, 0x01, // Collection (Application), - 0x85, REPORT_ID_SYSTEM, // Report ID (2) (System), - 0x16, 0x01, 0x00, // Logical Minimum (1), - 0x26, 0x03, 0x00, // Logical Maximum (3), - 0x1A, 0x81, 0x00, // Usage Minimum (81) (System Power Down), - 0x2A, 0x83, 0x00, // Usage Maximum (83) (System Wake Up), - 0x75, 0x10, // Report Size (16), - 0x95, 0x01, // Report Count (1), - 0x81, 0x00, // Input (Data, Array), - 0xC0, // End Collection - System Control - - // Consumer Control Collection - Media Keys (16 bits) - - 0x05, 0x0C, // Usage Page (Consumer), - 0x09, 0x01, // Usage (Consumer Control), - 0xA1, 0x01, // Collection (Application), - 0x85, REPORT_ID_CONSUMER, // Report ID (3) (Consumer), - 0x16, 0x01, 0x00, // Logical Minimum (1), - 0x26, 0x9C, 0x02, // Logical Maximum (668), - 0x1A, 0x01, 0x00, // Usage Minimum (1), - 0x2A, 0x9C, 0x02, // Usage Maximum (668), - 0x75, 0x10, // Report Size (16), - 0x95, 0x01, // Report Count (1), - 0x81, 0x00, // Input (Data, Array), - 0xC0, // End Collection - Consumer Control + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x80, // Usage (System Control) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_SYSTEM, // Report ID + 0x1A, 0x81, 0x00, // Usage Minimum (81) (System Power Down) + 0x2A, 0x83, 0x00, // Usage Maximum (83) (System Wake Up) + 0x16, 0x01, 0x00, // Logical Minimum (1) + 0x26, 0x03, 0x00, // Logical Maximum (3) + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) + 0x81, 0x00, // Input (Data, Array, Absolute) + 0xC0, // End Collection + + 0x05, 0x0C, // Usage Page (Consumer) + 0x09, 0x01, // Usage (Consumer Control) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_CONSUMER, // Report ID + 0x1A, 0x01, 0x00, // Usage Minimum (Consumer Control) + 0x2A, 0x9C, 0x02, // Usage Maximum (AC Distribute Vertically) + 0x16, 0x01, 0x00, // Logical Minimum + 0x26, 0x9C, 0x02, // Logical Maximum + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) + 0x81, 0x00, // Input (Data, Array, Absolute) + 0xC0 // End Collection }}; static bool udi_hid_exk_setreport(void); @@ -506,49 +506,53 @@ static uint8_t udi_hid_mou_report_trans[UDI_HID_MOU_REPORT_SIZE]; COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udi_hid_mou_report_desc_t udi_hid_mou_report_desc = {{ - 0x05, 0x01, // Usage Page (Generic Desktop), - 0x09, 0x02, // Usage (Mouse), - 0xA1, 0x01, // Collection (Application), - 0x09, 0x01, // Usage (Pointer), - 0xA1, 0x00, // Collection (Physical), - 0x05, 0x09, // Usage Page (Buttons), - 0x19, 0x01, // Usage Minimum (01), - 0x29, 0x05, // Usage Maximun (05), - 0x15, 0x00, // Logical Minimum (0), - 0x25, 0x01, // Logical Maximum (1), - 0x95, 0x05, // Report Count (5), - 0x75, 0x01, // Report Size (1), - 0x81, 0x02, // Input (Data, Variable, Absolute), ;5 button bits - 0x95, 0x01, // Report Count (1), - 0x75, 0x03, // Report Size (3), - 0x81, 0x01, // Input (Constant), ;3 bit padding, - - 0x05, 0x01, // Usage Page (Generic Desktop), - 0x09, 0x30, // Usage (X), - 0x09, 0x31, // Usage (Y), - 0x15, 0x81, // Logical Minimum (-127), - 0x25, 0x7F, // Logical Maximum (127), - 0x95, 0x02, // Report Count (2), - 0x75, 0x08, // Report Size (8), - 0x81, 0x06, // Input (Data, Variable, Relative), ;2 position bytes (X & Y), - - 0x09, 0x38, // Usage (Wheel), - 0x15, 0x81, // Logical Minimum (-127), - 0x25, 0x7F, // Logical Maximum (127), - 0x95, 0x01, // Report Count (1), - 0x75, 0x08, // Report Size (8), - 0x81, 0x06, // Input (Data, Variable, Relative), - - 0x05, 0x0C, // Usage Page (Consumer), - 0x0A, 0x38, 0x02, // Usage (AC Pan (Horizontal wheel)), - 0x15, 0x81, // Logical Minimum (-127), - 0x25, 0x7F, // Logical Maximum (127), - 0x95, 0x01, // Report Count (1), - 0x75, 0x08, // Report Size (8), - 0x81, 0x06, // Input (Data, Variable, Relative), - - 0xC0, // End Collection, - 0xC0, // End Collection + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x02, // Usage (Mouse) + 0xA1, 0x01, // Collection (Application) + 0x09, 0x01, // Usage (Pointer) + 0xA1, 0x00, // Collection (Physical) + // Buttons (5 bits) + 0x05, 0x09, // Usage Page (Button) + 0x19, 0x01, // Usage Minimum (Button 1) + 0x29, 0x05, // Usage Maximun (Button 5) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0x05, // Report Count (5) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Button padding (3 bits) + 0x95, 0x01, // Report Count (1) + 0x75, 0x03, // Report Size (3) + 0x81, 0x01, // Input (Constant) + + // X/Y position (2 bytes) + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x30, // Usage (X) + 0x09, 0x31, // Usage (Y) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x02, // Report Count (2) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) + + // Vertical wheel (1 byte) + 0x09, 0x38, // Usage (Wheel) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) + + // Horizontal wheel (1 byte) + 0x05, 0x0C, // Usage Page (Consumer) + 0x0A, 0x38, 0x02, // Usage (AC Pan) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) + 0xC0, // End Collection + 0xC0 // End Collection }}; static void udi_hid_mou_report_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep); @@ -636,20 +640,21 @@ static uint8_t udi_hid_raw_report_trans[UDI_HID_RAW_REPORT_SIZE]; COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udi_hid_raw_report_desc_t udi_hid_raw_report_desc = {{ - 0x06, // Usage Page (Vendor Defined) - 0xFF, 0xFF, - 0x0A, // Usage (Mouse) - 0xFF, 0xFF, 0xA1, 0x01, // Collection (Application) - 0x75, 0x08, // Report Size (8) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0xFF, // Logical Maximum (255) - 0x95, 0x40, // Report Count - 0x09, 0x01, // Usage (Input) - 0x81, 0x02, // Input (Data - 0x95, 0x40, // Report Count - 0x09, 0x02, // Usage (Output) - 0x91, 0x02, // Output (Data - 0xC0, // End Collection - Consumer Control + 0x06, 0x60, 0xFF, // Usage Page (Vendor Defined) + 0x09, 0x61, // Usage (Vendor Defined) + 0xA1, 0x01, // Collection (Application) + 0x75, 0x08, // Report Size (8) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0xFF, // Logical Maximum (255) + // Data to host + 0x09, 0x62, // Usage (Vendor Defined) + 0x95, RAW_EPSIZE, // Report Count + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Data from host + 0x09, 0x63, // Usage (Vendor Defined) + 0x95, RAW_EPSIZE, // Report Count + 0x91, 0x02, // Output (Data, Variable, Absolute) + 0xC0 // End Collection }}; static bool udi_hid_raw_setreport(void); @@ -753,22 +758,24 @@ static uint8_t udi_hid_con_report_trans[UDI_HID_CON_REPORT_SIZE]; COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udi_hid_con_report_desc_t udi_hid_con_report_desc = {{ - 0x06, 0x31, 0xFF, // Vendor Page (PJRC Teensy compatible) - 0x09, 0x74, // Vendor Usage (PJRC Teensy compatible) - 0xA1, 0x01, // Collection (Application) - 0x09, 0x75, // Usage (Vendor) - 0x15, 0x00, // Logical Minimum (0x00) - 0x26, 0xFF, 0x00, // Logical Maximum (0x00FF) - 0x95, CONSOLE_EPSIZE, // Report Count - 0x75, 0x08, // Report Size (8) - 0x81, 0x02, // Input (Data) - 0x09, 0x76, // Usage (Vendor) - 0x15, 0x00, // Logical Minimum (0x00) - 0x26, 0xFF, 0x00, // Logical Maximum (0x00FF) - 0x95, CONSOLE_EPSIZE, // Report Count - 0x75, 0x08, // Report Size (8) - 0x91, 0x02, // Output (Data) - 0xC0, // End Collection + 0x06, 0x31, 0xFF, // Usage Page (Vendor Defined - PJRC Teensy compatible) + 0x09, 0x74, // Usage (Vendor Defined - PJRC Teensy compatible) + 0xA1, 0x01, // Collection (Application) + // Data to host + 0x09, 0x75, // Usage (Vendor Defined) + 0x15, 0x00, // Logical Minimum (0x00) + 0x26, 0xFF, 0x00, // Logical Maximum (0x00FF) + 0x95, CONSOLE_EPSIZE, // Report Count + 0x75, 0x08, // Report Size (8) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Data from host + 0x09, 0x76, // Usage (Vendor Defined) + 0x15, 0x00, // Logical Minimum (0x00) + 0x26, 0xFF, 0x00, // Logical Maximum (0x00FF) + 0x95, CONSOLE_EPSIZE, // Report Count + 0x75, 0x08, // Report Size (8) + 0x91, 0x02, // Output (Data) + 0xC0 // End Collection }}; static bool udi_hid_con_setreport(void); From 4888a118c363ed73d913ef8c70eb643dd3ea8bd0 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sun, 2 Feb 2020 02:40:30 +0000 Subject: [PATCH 186/331] format code according to conventions [skip ci] --- tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c index ace7c210873a..5b3295407166 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c @@ -381,27 +381,35 @@ UDC_DESC_STORAGE udi_hid_exk_report_desc_t udi_hid_exk_report_desc = {{ 0x09, 0x80, // Usage (System Control) 0xA1, 0x01, // Collection (Application) 0x85, REPORT_ID_SYSTEM, // Report ID - 0x1A, 0x81, 0x00, // Usage Minimum (81) (System Power Down) - 0x2A, 0x83, 0x00, // Usage Maximum (83) (System Wake Up) - 0x16, 0x01, 0x00, // Logical Minimum (1) - 0x26, 0x03, 0x00, // Logical Maximum (3) - 0x95, 0x01, // Report Count (1) - 0x75, 0x10, // Report Size (16) - 0x81, 0x00, // Input (Data, Array, Absolute) - 0xC0, // End Collection + 0x1A, 0x81, + 0x00, // Usage Minimum (81) (System Power Down) + 0x2A, 0x83, + 0x00, // Usage Maximum (83) (System Wake Up) + 0x16, 0x01, + 0x00, // Logical Minimum (1) + 0x26, 0x03, + 0x00, // Logical Maximum (3) + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) + 0x81, 0x00, // Input (Data, Array, Absolute) + 0xC0, // End Collection 0x05, 0x0C, // Usage Page (Consumer) 0x09, 0x01, // Usage (Consumer Control) 0xA1, 0x01, // Collection (Application) 0x85, REPORT_ID_CONSUMER, // Report ID - 0x1A, 0x01, 0x00, // Usage Minimum (Consumer Control) - 0x2A, 0x9C, 0x02, // Usage Maximum (AC Distribute Vertically) - 0x16, 0x01, 0x00, // Logical Minimum - 0x26, 0x9C, 0x02, // Logical Maximum - 0x95, 0x01, // Report Count (1) - 0x75, 0x10, // Report Size (16) - 0x81, 0x00, // Input (Data, Array, Absolute) - 0xC0 // End Collection + 0x1A, 0x01, + 0x00, // Usage Minimum (Consumer Control) + 0x2A, 0x9C, + 0x02, // Usage Maximum (AC Distribute Vertically) + 0x16, 0x01, + 0x00, // Logical Minimum + 0x26, 0x9C, + 0x02, // Logical Maximum + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) + 0x81, 0x00, // Input (Data, Array, Absolute) + 0xC0 // End Collection }}; static bool udi_hid_exk_setreport(void); @@ -758,9 +766,9 @@ static uint8_t udi_hid_con_report_trans[UDI_HID_CON_REPORT_SIZE]; COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udi_hid_con_report_desc_t udi_hid_con_report_desc = {{ - 0x06, 0x31, 0xFF, // Usage Page (Vendor Defined - PJRC Teensy compatible) - 0x09, 0x74, // Usage (Vendor Defined - PJRC Teensy compatible) - 0xA1, 0x01, // Collection (Application) + 0x06, 0x31, 0xFF, // Usage Page (Vendor Defined - PJRC Teensy compatible) + 0x09, 0x74, // Usage (Vendor Defined - PJRC Teensy compatible) + 0xA1, 0x01, // Collection (Application) // Data to host 0x09, 0x75, // Usage (Vendor Defined) 0x15, 0x00, // Logical Minimum (0x00) From c096be3831f5d9e21fd0da6d3e265a603820c35b Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 1 Feb 2020 21:36:59 -0800 Subject: [PATCH 187/331] [Docs] future branch housekeeping --- docs/breaking_changes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index 56d14438d79c..d3af3c79bfb7 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -15,8 +15,8 @@ The next Breaking Change is scheduled for February 29, 2020. ### Important Dates * [x] 2019 Sep 21 - `future` is created. It will be rebased weekly. -* [ ] 2020 Feb 1 - `future` closed to new PR's. -* [ ] 2020 Feb 1 - Call for testers. +* [x] 2020 Feb 1 - `future` closed to new PR's. +* [x] 2020 Feb 1 - Call for testers. * [ ] 2020 Feb 26 - `master` is locked, no PR's merged. * [ ] 2020 Feb 28 - Merge `future` to `master`. * [ ] 2020 Feb 29 - `master` is unlocked. PR's can be merged again. From 1877736fa40dcf023f67fe05661b516187c08c82 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 3 Feb 2020 00:24:29 +1100 Subject: [PATCH 188/331] Update dirty submodule make message (#8065) --- message.mk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/message.mk b/message.mk index 94ab606ec6e7..831e30ef82ad 100644 --- a/message.mk +++ b/message.mk @@ -54,11 +54,8 @@ MSG_COMPILING_CXX = Compiling: MSG_ASSEMBLING = Assembling: MSG_CLEANING = Cleaning project: MSG_CREATING_LIBRARY = Creating library: -MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \ - Some git sub-modules are out of date or modified, please consider running:$(BOLD)\n\ - make git-submodule\n\ - You can ignore this warning if you are not compiling any ChibiOS keyboards,\n\ - or if you have modified the ChibiOS libraries yourself. \n\n$(NO_COLOR) +MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR) Some git submodules are out of date or modified.\n\ +Please consider running $(BOLD)make git-submodule$(NO_COLOR).\n\n MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR) define GENERATE_MSG_MAKE_KB From 5b91c3e0a0dc8152f69130cf047f3df0d0f94421 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 2 Feb 2020 16:33:17 +0000 Subject: [PATCH 189/331] Fix cformat processing files within ignore folders (#8063) --- lib/python/qmk/cli/cformat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index fe1edef60b83..de55218ae980 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -29,6 +29,7 @@ def cformat(cli): for dirpath, dirnames, filenames in os.walk(dir): if any(i in dirpath for i in ignores): dirnames.clear() + continue for name in filenames: if name.endswith(('.c', '.h', '.cpp')): From b2ce2f8a34fba72e4b4ac2fba0ec11431b0acb0c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 3 Feb 2020 07:17:05 +1100 Subject: [PATCH 190/331] Dedupe extrakey report struct, and send functions in V-USB & LUFA (#7993) * Dedupe extrakey report struct, and send functions in V-USB & LUFA * Doc comment for consistency * Wrap it in ifdef to prevent unused function error * Do the same for ATSAM --- tmk_core/common/report.h | 5 ++++ tmk_core/protocol/arm_atsam/main_arm_atsam.c | 26 ++++++++----------- tmk_core/protocol/chibios/usb_main.h | 14 ---------- tmk_core/protocol/lufa/lufa.c | 27 ++++++++++---------- tmk_core/protocol/lufa/lufa.h | 6 ----- tmk_core/protocol/vusb/vusb.c | 26 ++++++++----------- 6 files changed, 39 insertions(+), 65 deletions(-) diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index ccc6d599b373..2a9dad8811a4 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -150,6 +150,11 @@ typedef union { #endif } __attribute__((packed)) report_keyboard_t; +typedef struct { + uint8_t report_id; + uint16_t usage; +} __attribute__((packed)) report_extra_t; + typedef struct { #ifdef MOUSE_SHARED_EP uint8_t report_id; diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index a42d9daf38fc..e15d51a2635a 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -110,40 +110,34 @@ void send_mouse(report_mouse_t *report) { #endif // MOUSEKEY_ENABLE } -void send_system(uint16_t data) { #ifdef EXTRAKEY_ENABLE +void send_extra(uint8_t report_id, uint16_t data) { uint32_t irqflags; irqflags = __get_PRIMASK(); __disable_irq(); __DMB(); - udi_hid_exk_report.desc.report_id = REPORT_ID_SYSTEM; - if (data != 0) data = data - SYSTEM_POWER_DOWN + 1; + udi_hid_exk_report.desc.report_id = report_id; udi_hid_exk_report.desc.report_data = data; udi_hid_exk_b_report_valid = 1; udi_hid_exk_send_report(); __DMB(); __set_PRIMASK(irqflags); +} +#endif // EXTRAKEY_ENABLE + +void send_system(uint16_t data) { +#ifdef EXTRAKEY_ENABLE + if (data != 0) data = data - SYSTEM_POWER_DOWN + 1; + send_extra(REPORT_ID_SYSTEM, data); #endif // EXTRAKEY_ENABLE } void send_consumer(uint16_t data) { #ifdef EXTRAKEY_ENABLE - uint32_t irqflags; - - irqflags = __get_PRIMASK(); - __disable_irq(); - __DMB(); - - udi_hid_exk_report.desc.report_id = REPORT_ID_CONSUMER; - udi_hid_exk_report.desc.report_data = data; - udi_hid_exk_b_report_valid = 1; - udi_hid_exk_send_report(); - - __DMB(); - __set_PRIMASK(irqflags); + send_extra(REPORT_ID_CONSUMER, data); #endif // EXTRAKEY_ENABLE } diff --git a/tmk_core/protocol/chibios/usb_main.h b/tmk_core/protocol/chibios/usb_main.h index cd2bb695baad..17041b4f2fdf 100644 --- a/tmk_core/protocol/chibios/usb_main.h +++ b/tmk_core/protocol/chibios/usb_main.h @@ -72,20 +72,6 @@ void mouse_in_cb(USBDriver *usbp, usbep_t ep); /* shared IN request callback handler */ void shared_in_cb(USBDriver *usbp, usbep_t ep); -/* --------------- - * Extrakey header - * --------------- - */ - -#ifdef EXTRAKEY_ENABLE - -/* extra report structure */ -typedef struct { - uint8_t report_id; - uint16_t usage; -} __attribute__((packed)) report_extra_t; -#endif /* EXTRAKEY_ENABLE */ - /* -------------- * Console header * -------------- diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index db66a07222af..792db434026f 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -662,17 +662,17 @@ static void send_mouse(report_mouse_t *report) { #endif } -/** \brief Send System +/** \brief Send Extra * * FIXME: Needs doc */ -static void send_system(uint16_t data) { #ifdef EXTRAKEY_ENABLE +static void send_extra(uint8_t report_id, uint16_t data) { uint8_t timeout = 255; if (USB_DeviceState != DEVICE_STATE_Configured) return; - report_extra_t r = {.report_id = REPORT_ID_SYSTEM, .usage = data - SYSTEM_POWER_DOWN + 1}; + report_extra_t r = {.report_id = report_id, .usage = data}; Endpoint_SelectEndpoint(SHARED_IN_EPNUM); /* Check if write ready for a polling interval around 10ms */ @@ -681,6 +681,16 @@ static void send_system(uint16_t data) { Endpoint_Write_Stream_LE(&r, sizeof(report_extra_t), NULL); Endpoint_ClearIN(); +} +#endif + +/** \brief Send System + * + * FIXME: Needs doc + */ +static void send_system(uint16_t data) { +#ifdef EXTRAKEY_ENABLE + send_extra(REPORT_ID_SYSTEM, data - SYSTEM_POWER_DOWN + 1); #endif } @@ -690,7 +700,6 @@ static void send_system(uint16_t data) { */ static void send_consumer(uint16_t data) { #ifdef EXTRAKEY_ENABLE - uint8_t timeout = 255; uint8_t where = where_to_send(); # ifdef BLUETOOTH_ENABLE @@ -729,15 +738,7 @@ static void send_consumer(uint16_t data) { return; } - report_extra_t r = {.report_id = REPORT_ID_CONSUMER, .usage = data}; - Endpoint_SelectEndpoint(SHARED_IN_EPNUM); - - /* Check if write ready for a polling interval around 10ms */ - while (timeout-- && !Endpoint_IsReadWriteAllowed()) _delay_us(40); - if (!Endpoint_IsReadWriteAllowed()) return; - - Endpoint_Write_Stream_LE(&r, sizeof(report_extra_t), NULL); - Endpoint_ClearIN(); + send_extra(REPORT_ID_CONSUMER, data); #endif } diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index 652e4e79b726..1b88060f14bb 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -58,12 +58,6 @@ extern host_driver_t lufa_driver; } #endif -/* extra report structure */ -typedef struct { - uint8_t report_id; - uint16_t usage; -} __attribute__((packed)) report_extra_t; - #ifdef API_ENABLE # include "api.h" #endif diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index e66938445521..71263344fd1d 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -112,31 +112,25 @@ static void send_mouse(report_mouse_t *report) { } } -typedef struct { - uint8_t report_id; - uint16_t usage; -} __attribute__((packed)) report_extra_t; - -static void send_system(uint16_t data) { +static void send_extra(uint8_t report_id, uint16_t data) { + static uint8_t last_id = 0; static uint16_t last_data = 0; - if (data == last_data) return; + if ((report_id == last_id) && (data == last_data)) return; + last_id = report_id; last_data = data; - report_extra_t report = {.report_id = REPORT_ID_SYSTEM, .usage = data}; + report_extra_t report = {.report_id = report_id, .usage = data}; if (usbInterruptIsReady3()) { usbSetInterrupt3((void *)&report, sizeof(report)); } } -static void send_consumer(uint16_t data) { - static uint16_t last_data = 0; - if (data == last_data) return; - last_data = data; +static void send_system(uint16_t data) { + send_extra(REPORT_ID_SYSTEM, data); +} - report_extra_t report = {.report_id = REPORT_ID_CONSUMER, .usage = data}; - if (usbInterruptIsReady3()) { - usbSetInterrupt3((void *)&report, sizeof(report)); - } +static void send_consumer(uint16_t data) { + send_extra(REPORT_ID_CONSUMER, data); } /*------------------------------------------------------------------* From fa9c74c6a2301c8f0f12727eb730e213b3d7453c Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sun, 2 Feb 2020 20:47:40 +0000 Subject: [PATCH 191/331] format code according to conventions [skip ci] --- tmk_core/protocol/arm_atsam/main_arm_atsam.c | 2 +- tmk_core/protocol/lufa/lufa.c | 2 +- tmk_core/protocol/vusb/vusb.c | 12 ++++-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index e15d51a2635a..9c8073dd9eb5 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -131,7 +131,7 @@ void send_extra(uint8_t report_id, uint16_t data) { void send_system(uint16_t data) { #ifdef EXTRAKEY_ENABLE if (data != 0) data = data - SYSTEM_POWER_DOWN + 1; - send_extra(REPORT_ID_SYSTEM, data); + send_extra(REPORT_ID_SYSTEM, data); #endif // EXTRAKEY_ENABLE } diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 792db434026f..933b212c960c 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -700,7 +700,7 @@ static void send_system(uint16_t data) { */ static void send_consumer(uint16_t data) { #ifdef EXTRAKEY_ENABLE - uint8_t where = where_to_send(); + uint8_t where = where_to_send(); # ifdef BLUETOOTH_ENABLE if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 71263344fd1d..110b3069bddf 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -113,10 +113,10 @@ static void send_mouse(report_mouse_t *report) { } static void send_extra(uint8_t report_id, uint16_t data) { - static uint8_t last_id = 0; + static uint8_t last_id = 0; static uint16_t last_data = 0; if ((report_id == last_id) && (data == last_data)) return; - last_id = report_id; + last_id = report_id; last_data = data; report_extra_t report = {.report_id = report_id, .usage = data}; @@ -125,13 +125,9 @@ static void send_extra(uint8_t report_id, uint16_t data) { } } -static void send_system(uint16_t data) { - send_extra(REPORT_ID_SYSTEM, data); -} +static void send_system(uint16_t data) { send_extra(REPORT_ID_SYSTEM, data); } -static void send_consumer(uint16_t data) { - send_extra(REPORT_ID_CONSUMER, data); -} +static void send_consumer(uint16_t data) { send_extra(REPORT_ID_CONSUMER, data); } /*------------------------------------------------------------------* * Request from host * From acef512730479d5489a1ddd3b598c899efd8784e Mon Sep 17 00:00:00 2001 From: Mike Rix Wolfe Date: Sun, 2 Feb 2020 15:11:17 -0600 Subject: [PATCH 192/331] [Keymap] Add User Keymap for FC660C (#8062) * add my keymaps * tri layer keymap * update tri layer * update tri layer * cleaning up * formatting * move to correct location * lily58: move caps off mod key in sublayer * Update keyboards/lily58/keymaps/mikefightsbears/rules.mk * Update keyboards/lily58/keymaps/mikefightsbears/rules.mk * Update keyboards/lily58/keymaps/mikefightsbears/rules.mk * Update keyboards/lily58/keymaps/mikefightsbears/rules.mk * remove unnecessary trailing whacks * remove unneeded file * swap spacebar * update code for comments in PR * add fc660c keymap * rm readme * move layer key * remove inconvenient alternate keys * swap format * add them media keys * add rules mk * swap caps and ctrl * remove unneeded config * use gesc instead of esc --- .../fc660c/keymaps/mikefightsbears/keymap.c | 34 +++++++++++++++++++ .../fc660c/keymaps/mikefightsbears/rules.mk | 6 ++++ .../mkiirgb/keymaps/mikefightsbears/keymap.c | 8 ++--- 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 keyboards/fc660c/keymaps/mikefightsbears/keymap.c create mode 100644 keyboards/fc660c/keymaps/mikefightsbears/rules.mk diff --git a/keyboards/fc660c/keymaps/mikefightsbears/keymap.c b/keyboards/fc660c/keymaps/mikefightsbears/keymap.c new file mode 100644 index 000000000000..2c4f0aa83cf3 --- /dev/null +++ b/keyboards/fc660c/keymaps/mikefightsbears/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2017 Balz Guenat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, + KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, + KC_CAPS,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(1), KC_LEFT,KC_DOWN,KC_RGHT + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,KC_MUTE,KC_MPRV,KC_MNXT,KC_MPLY,_______, KC_PGUP, + _______,_______,_______, _______, _______,_______,_______, KC_HOME,KC_PGDN,KC_END + ) +}; diff --git a/keyboards/fc660c/keymaps/mikefightsbears/rules.mk b/keyboards/fc660c/keymaps/mikefightsbears/rules.mk new file mode 100644 index 000000000000..454ba3005898 --- /dev/null +++ b/keyboards/fc660c/keymaps/mikefightsbears/rules.mk @@ -0,0 +1,6 @@ +# Build Options +# # change to "no" to disable the options, or define them in the Makefile in +# # the appropriate keymap folder that will get included automatically +# # +EXTRAKEY_ENABLE = yes # Audio control and System control +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/keymap.c index bda8fbc7a818..426c72978958 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/keymap.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/keymap.c @@ -10,10 +10,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_65_ansi_blocker( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, - KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, KC_TRNS, RGB_SAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, - KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI, KC_TRNS, RGB_SAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, RGB_RMOD, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_PGUP, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + _______, _______, RGB_VAI, _______, _______, RGB_SAI, RGB_HUI, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, + _______, RGB_SPD, RGB_VAD, RGB_SPI, _______, RGB_SAD, RGB_HUD, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, RGB_RMOD, RGB_TOG, RGB_MOD, _______, _______, _______, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, _______, KC_PGUP, KC_VOLD, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ) }; From 5780c94423615ba51343cd88ae55cf5fdaffb6df Mon Sep 17 00:00:00 2001 From: skullydazed Date: Mon, 3 Feb 2020 09:04:58 -0800 Subject: [PATCH 193/331] Improve the functionality of qmk.questions (#8020) * wip * tested and working * remove unused import * Update lib/python/qmk/questions.py Co-Authored-By: Erovia * fix flake8 errors Co-authored-by: Erovia --- lib/python/qmk/questions.py | 97 ++++++++++++++++++++++++++++++++++--- 1 file changed, 89 insertions(+), 8 deletions(-) diff --git a/lib/python/qmk/questions.py b/lib/python/qmk/questions.py index 34b0b43bc898..27f43ac1e94d 100644 --- a/lib/python/qmk/questions.py +++ b/lib/python/qmk/questions.py @@ -16,7 +16,7 @@ def yesno(prompt, *args, default=None, **kwargs): Arguments: prompt - The prompt to present to the user. Can include ANSI and format strings like milc's `cli.print()`. + The prompt to present to the user. Can include ANSI and format strings like milc's `cli.echo()`. default Whether to default to a Yes or No when the user presses enter. @@ -43,9 +43,9 @@ def yesno(prompt, *args, default=None, **kwargs): prompt = prompt + ' [y/N] ' while True: - print() + cli.echo('') answer = input(format_ansi(prompt % args)) - print() + cli.echo('') if not answer and prompt is not None: return default @@ -57,17 +57,26 @@ def yesno(prompt, *args, default=None, **kwargs): return False -def question(prompt, *args, default=None, confirm=False, answer_type=str, **kwargs): +def question(prompt, *args, default=None, confirm=False, answer_type=str, validate=None, **kwargs): """Prompt the user to answer a question with a free-form input. + Arguments: prompt - The prompt to present to the user. Can include ANSI and format strings like milc's `cli.print()`. + The prompt to present to the user. Can include ANSI and format strings like milc's `cli.echo()`. default The value to return when the user doesn't enter any value. Use None to prompt until they enter a value. + confirm + Present the user with a confirmation dialog before accepting their answer. + answer_type Specify a type function for the answer. Will re-prompt the user if the function raises any errors. Common choices here include int, float, and decimal.Decimal. + + validate + This is an optional function that can be used to validate the answer. It should return True or False and have the following signature: + + def function_name(answer, *args, **kwargs): """ if not args and kwargs: args = kwargs @@ -76,17 +85,21 @@ def question(prompt, *args, default=None, confirm=False, answer_type=str, **kwar prompt = '%s [%s] ' % (prompt, default) while True: - print() + cli.echo('') answer = input(format_ansi(prompt % args)) - print() + cli.echo('') if answer: - if confirm: + if validate is not None and not validate(answer, *args, **kwargs): + continue + + elif confirm: if yesno('Is the answer "%s" correct?', answer, default=True): try: return answer_type(answer) except Exception as e: cli.log.error('Could not convert answer (%s) to type %s: %s', answer, answer_type.__name__, str(e)) + else: try: return answer_type(answer) @@ -95,3 +108,71 @@ def question(prompt, *args, default=None, confirm=False, answer_type=str, **kwar elif default is not None: return default + + +def choice(heading, options, *args, default=None, confirm=False, prompt='Please enter your choice: ', **kwargs): + """Present the user with a list of options and let them pick one. + + Users can enter either the number or the text of their choice. + + This will return the value of the item they choose, not the numerical index. + + Arguments: + heading + The text to place above the list of options. + + options + A sequence of items to choose from. + + default + The index of the item to return when the user doesn't enter any value. Use None to prompt until they enter a value. + + confirm + Present the user with a confirmation dialog before accepting their answer. + + prompt + The prompt to present to the user. Can include ANSI and format strings like milc's `cli.echo()`. + """ + if not args and kwargs: + args = kwargs + + if prompt and default: + prompt = prompt + ' [%s] ' % (default + 1,) + + while True: + # Prompt for an answer. + cli.echo('') + cli.echo(heading % args) + cli.echo('') + for i, option in enumerate(options, 1): + cli.echo('\t{fg_cyan}%d.{fg_reset} %s', i, option) + + cli.echo('') + answer = input(format_ansi(prompt)) + cli.echo('') + + # If the user types in one of the options exactly use that + if answer in options: + return answer + + # Massage the answer into a valid integer + if answer == '' and default: + answer = default + else: + try: + answer = int(answer) - 1 + except Exception: + # Normally we would log the exception here, but in the interest of clean UI we do not. + cli.log.error('Invalid choice: %s', answer + 1) + continue + + # Validate the answer + if answer >= len(options) or answer < 0: + cli.log.error('Invalid choice: %s', answer + 1) + continue + + if confirm and not yesno('Is the answer "%s" correct?', answer + 1, default=True): + continue + + # Return the answer they chose. + return options[answer] From c6f389b527e04e11e62a11e329f8f52b67a47d63 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 3 Feb 2020 13:37:01 -0800 Subject: [PATCH 194/331] Merlin's userspace updates (#8074) --- .../60_ansi/mechmerlin-ansi/keymap.c | 19 +++++++++++------ .../60_ansi/mechmerlin-ansi/readme.md | 8 +++---- .../mechmerlin-split/keymap.c | 21 ++++++++++++------- .../mechmerlin-split/readme.md | 10 ++++----- layouts/community/65_ansi/mechmerlin/keymap.c | 12 +++++++++-- .../community/65_ansi/mechmerlin/readme.md | 2 +- .../65_ansi_blocker/mechmerlin/keymap.c | 14 ++++++++++--- .../65_ansi_blocker/mechmerlin/readme.md | 4 ++-- layouts/community/66_ansi/mechmerlin/keymap.c | 14 ++++++------- .../community/66_ansi/mechmerlin/readme.md | 13 ++++++++++++ layouts/community/68_ansi/mechmerlin/keymap.c | 7 +++++++ .../75_ansi/mechmerlin-75_ansi/keymap.c | 14 +++++++++++-- .../75_ansi/mechmerlin-75_ansi/readme.md | 4 ++-- users/mechmerlin/changelog.md | 5 +++++ users/mechmerlin/config.h | 4 +--- users/mechmerlin/mechmerlin.c | 8 ++++++- users/mechmerlin/mechmerlin.h | 4 +++- users/mechmerlin/readme.md | 7 ++++++- users/mechmerlin/rules.mk | 1 + 19 files changed, 123 insertions(+), 48 deletions(-) create mode 100644 layouts/community/66_ansi/mechmerlin/readme.md diff --git a/layouts/community/60_ansi/mechmerlin-ansi/keymap.c b/layouts/community/60_ansi/mechmerlin-ansi/keymap.c index b3c74da949fd..5ae09ec08691 100644 --- a/layouts/community/60_ansi/mechmerlin-ansi/keymap.c +++ b/layouts/community/60_ansi/mechmerlin-ansi/keymap.c @@ -4,23 +4,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_60_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \ KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FNX, KC_RALT, KC_RGUI, KC_RCTL), [_FL] = LAYOUT_60_ansi( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_TRNS, KC_TRNS, KC_TRNS, MO(_CL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_AL] = LAYOUT_60_ansi( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RSFT_T(KC_UP), \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT) + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), + +[_CL] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; diff --git a/layouts/community/60_ansi/mechmerlin-ansi/readme.md b/layouts/community/60_ansi/mechmerlin-ansi/readme.md index 4d3f3d82034e..1e8d6de597f4 100644 --- a/layouts/community/60_ansi/mechmerlin-ansi/readme.md +++ b/layouts/community/60_ansi/mechmerlin-ansi/readme.md @@ -1,12 +1,12 @@ # MechMerlin's Standard ANSI 60% Layout -This is the 60% layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) +This is the standard 60% layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) YouTube channel. It is used on his -[1up60HSE](https://github.com/qmk/qmk_firmware/tree/master/keyboards/1upkeyboards/1up60hse) -[dz60rgb-ansi](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dztech/dz60rgb) -[HS60 V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/hs60/v2) +* [1up60HSE](https://github.com/qmk/qmk_firmware/tree/master/keyboards/1upkeyboards/1up60hse) +* [dz60rgb-ansi](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dztech/dz60rgb) +* [HS60 V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/hs60/v2) ## Keymap Notes - Arrow toggle switch is tapping the `FN` key once. diff --git a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c index 98ba86e9415f..2b822863810d 100644 --- a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c @@ -4,23 +4,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_60_ansi_split_bs_rshift( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \ KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(_AL), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(_FL), KC_RALT, KC_RGUI, KC_RCTL), [_FL] = LAYOUT_60_ansi_split_bs_rshift( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_TRNS, KC_TRNS, KC_TRNS, MO(_CL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_AL] = LAYOUT_60_ansi_split_bs_rshift( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RSFT_T(KC_UP), KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT) + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), + +[_CL] = LAYOUT_60_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; diff --git a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md index 528776011e67..e3f6311b1912 100644 --- a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md @@ -5,11 +5,11 @@ host of the [MechMerlin](www.youtube.com/mechmerlin) YouTube channel. It is used on his -[DO60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/do60) -[DP60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dp60) -[Sentraq S60-X RGB](https://github.com/qmk/qmk_firmware/tree/master/keyboards/s60_x) -[Waldo](https://github.com/qmk/qmk_firmware/tree/master/keyboards/waldo) -[Zeal60 Rev4](https://github.com/qmk/qmk_firmware/tree/master/keyboards/zeal60) +* [DO60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/do60) +* [DP60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dp60) +* [Sentraq S60-X RGB](https://github.com/qmk/qmk_firmware/tree/master/keyboards/s60_x) +* [Waldo](https://github.com/qmk/qmk_firmware/tree/master/keyboards/waldo) +* [Zeal60 Rev4](https://github.com/qmk/qmk_firmware/tree/master/keyboards/zeal60) ## Keymap Notes - Highly influenced by the KBP V60 and WKL B.Face standard layouts diff --git a/layouts/community/65_ansi/mechmerlin/keymap.c b/layouts/community/65_ansi/mechmerlin/keymap.c index e604c23c6f72..57a1f0116756 100644 --- a/layouts/community/65_ansi/mechmerlin/keymap.c +++ b/layouts/community/65_ansi/mechmerlin/keymap.c @@ -40,10 +40,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FL] = LAYOUT_65_ansi( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, - _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + _______, _______, _______, MO(_CL), _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [_CL] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ), }; diff --git a/layouts/community/65_ansi/mechmerlin/readme.md b/layouts/community/65_ansi/mechmerlin/readme.md index a0860849254f..538f14b98c2a 100644 --- a/layouts/community/65_ansi/mechmerlin/readme.md +++ b/layouts/community/65_ansi/mechmerlin/readme.md @@ -4,7 +4,7 @@ This is the 65% layout used by u/merlin36, host of the [MechMerlin](www.youtube. YouTube channel. It is used on his -* [Novelkeys NK65](https://github.com/qmk/qmk_firmware/tree/master/keyboards/nk65) +* [Novelkeys NK65](https://github.com/qmk/qmk_firmware/tree/master/keyboards/nk65) ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:mechmerlin`. \ No newline at end of file diff --git a/layouts/community/65_ansi_blocker/mechmerlin/keymap.c b/layouts/community/65_ansi_blocker/mechmerlin/keymap.c index 7ab719ab2628..8f78a52b25ba 100644 --- a/layouts/community/65_ansi_blocker/mechmerlin/keymap.c +++ b/layouts/community/65_ansi_blocker/mechmerlin/keymap.c @@ -22,15 +22,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT ), [_FL] = LAYOUT_65_ansi_blocker( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, - _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + _______, _______, _______, MO(_CL), _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [_CL] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, ), }; diff --git a/layouts/community/65_ansi_blocker/mechmerlin/readme.md b/layouts/community/65_ansi_blocker/mechmerlin/readme.md index fa69ce3e7dbd..70ee6e385f49 100644 --- a/layouts/community/65_ansi_blocker/mechmerlin/readme.md +++ b/layouts/community/65_ansi_blocker/mechmerlin/readme.md @@ -4,8 +4,8 @@ This is the 65% layout used by u/merlin36, host of the [MechMerlin](www.youtube. YouTube channel. It is used on his -[RGB Doro67](https://github.com/qmk/qmk_firmware/tree/master/keyboards/doro67/rgb) -[KBD67 mkii](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd67/mkiirgb) +* [RGB Doro67](https://github.com/qmk/qmk_firmware/tree/master/keyboards/doro67/rgb) +* [KBD67 mkii](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd67/mkiirgb/v1) ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:mechmerlin`. \ No newline at end of file diff --git a/layouts/community/66_ansi/mechmerlin/keymap.c b/layouts/community/66_ansi/mechmerlin/keymap.c index 9f041e27ca67..8de35811d9da 100644 --- a/layouts/community/66_ansi/mechmerlin/keymap.c +++ b/layouts/community/66_ansi/mechmerlin/keymap.c @@ -1,8 +1,6 @@ #include QMK_KEYBOARD_H #include "mechmerlin.h" -#define _CL 2 - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_66_ansi( KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_PGUP, \ @@ -13,15 +11,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FL] = LAYOUT_66_ansi( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_VOLD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + BL_TOGG,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_VOLD, \ + RGB_TOG,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,KC_MUTE,KC_VOLD,KC_VOLU,_______, _______, KC_PGUP, \ - _______,_______,_______, _______, _______,_______,_______,KC_HOME,KC_PGDN,KC_END), + _______,_______,_______, MO(_CL), _______,_______,_______,KC_HOME,KC_PGDN,KC_END), [_CL] = LAYOUT_66_ansi( BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, _______, RGB_VAI, \ - BL_TOGG,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - RGB_TOG,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,EEP_RST,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ VLK_TOG, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \ - CK_TOGG,_______,_______, RGB_MOD, _______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI), + CK_TOGG,_______,_______, _______, _______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/layouts/community/66_ansi/mechmerlin/readme.md b/layouts/community/66_ansi/mechmerlin/readme.md new file mode 100644 index 000000000000..cf52dad61a81 --- /dev/null +++ b/layouts/community/66_ansi/mechmerlin/readme.md @@ -0,0 +1,13 @@ +# MechMerlin's 66_ansi layout + +This is the 66 key layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) +YouTube channel. + +It is used on his +* [Clueboard 66 rev4](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev4) +* [Clueboard 66 hotswap gen1](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66_hotswap/gen1) +* [Clueboard 66 hotswap prototype](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66_hotswap/prototype) +* [Clueboard 66 rev1](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) + +### Build +To build the firmware file associated with this keymap, simply run `make your_keyboard:mechmerlin`. \ No newline at end of file diff --git a/layouts/community/68_ansi/mechmerlin/keymap.c b/layouts/community/68_ansi/mechmerlin/keymap.c index 5059bd7d83a8..b3789d84a436 100644 --- a/layouts/community/68_ansi/mechmerlin/keymap.c +++ b/layouts/community/68_ansi/mechmerlin/keymap.c @@ -14,5 +14,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, MO(_CL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_CL] = LAYOUT_68_ansi(\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; \ No newline at end of file diff --git a/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c b/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c index f785cdf3fd9a..c239e2683425 100644 --- a/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c +++ b/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [_FL] = LAYOUT_75_ansi(\ RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -17,5 +17,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) + KC_TRNS, KC_TRNS, KC_TRNS, MO(_CL), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), + +[_CL] = LAYOUT_75_ansi(\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + }; diff --git a/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md b/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md index ab7a9b92f735..d406155bc7f4 100644 --- a/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md +++ b/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md @@ -4,8 +4,8 @@ This is the 75% layout used by u/merlin36, host of the [MechMerlin](www.youtube. YouTube channel. It is used on his -[Duck Octagon V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/duck/octagon/v2) -[XD84](https://github.com/qmk/qmk_firmware/tree/master/keyboards/xd84) +* [Duck Octagon V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/duck/octagon/v2) +* [XD84](https://github.com/qmk/qmk_firmware/tree/master/keyboards/xd84) ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:mechmerlin-ansi`. diff --git a/users/mechmerlin/changelog.md b/users/mechmerlin/changelog.md index f1116b2d2b13..2f8fa687a90d 100644 --- a/users/mechmerlin/changelog.md +++ b/users/mechmerlin/changelog.md @@ -1,6 +1,11 @@ # Changelog All notable changes to my userspace will be documented in this file. +## [0.3.0] - 2020-02-02 +### Changed +- Added the `_CL` layer to all the boards for access to `EEP_RST` and `RESET` keycodes. This was done primarily to avoid triggering `RESET` accidentally. +- Added a placeholder text macro under the custom keycode `KC_MAC`. Currently set to "meow", but will change as needed in the future. + ## [0.2.2] - 2019-04-22 ### Fixed - `config.h` usage of turning on `RGBLIGHT_ENABLE` when it is not enabled on boards other than my two clueboards were causing issues with boards that didn't have RGB underglow on it. diff --git a/users/mechmerlin/config.h b/users/mechmerlin/config.h index fe8f9c9ffb2a..698e237b01f3 100644 --- a/users/mechmerlin/config.h +++ b/users/mechmerlin/config.h @@ -10,8 +10,6 @@ #define AUDIO_CLICKY_FREQ_DEFAULT 261.63f #define AUDIO_CLICKY_FREQ_MIN 65.41f #define AUDIO_CLICKY_FREQ_MAX 1046.5f - //#define AUDIO_CLICKY_FREQ_FACTOR 1.18921f - //#define AUDIO_CLICKY_FREQ_FACTOR 2.71828f // e #define AUDIO_CLICKY_FREQ_FACTOR 1.61803f // golden ratio #define AUDIO_CLICKY_FREQ_RANDOMNESS 17.0f #endif @@ -24,7 +22,7 @@ #ifndef AUDIO_CLICKY #define AUDIO_CLICKY #endif -#elif defined(KEYBOARD_clueboard_66_hotswap_gen1) +#elif defined(KEYBOARD_clueboard_66_hotswap_gen1) || defined(KEYBOARD_clueboard_66_rev4) #ifndef AUDIO_CLICKY #define AUDIO_CLICKY #endif diff --git a/users/mechmerlin/mechmerlin.c b/users/mechmerlin/mechmerlin.c index 8d6cecd18b13..ad60bd196669 100644 --- a/users/mechmerlin/mechmerlin.c +++ b/users/mechmerlin/mechmerlin.c @@ -14,7 +14,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_invert(_AL); } } - return false; + break; + case KC_MAC: + if (record->event.pressed) { + SEND_STRING("meow"); + } else { + } + break; } return true; } \ No newline at end of file diff --git a/users/mechmerlin/mechmerlin.h b/users/mechmerlin/mechmerlin.h index 6b4d50edc841..9802c3ecd27a 100644 --- a/users/mechmerlin/mechmerlin.h +++ b/users/mechmerlin/mechmerlin.h @@ -5,12 +5,14 @@ enum userspace_layers { _BL = 0, // Base Layer _FL, // Function Layer - _AL // Arrow Layer + _AL, // Arrow Layer + _CL // Control Layer }; // Enum of custom keycodes defined in process_record_user enum keycodes { KC_FNX, // Hold for FN layer, tap to toggle ARROWS layer. + KC_MAC, // Text macro. }; // Custom #defined keycodes diff --git a/users/mechmerlin/readme.md b/users/mechmerlin/readme.md index 24335a7ce22d..14a86f055bb9 100644 --- a/users/mechmerlin/readme.md +++ b/users/mechmerlin/readme.md @@ -17,7 +17,7 @@ This layer is commonly accessed via `MO(_FL)` on the base layer. It consists of This layer is only present on my 60% boards. I habitually use the bottom right modifiers as arrows. ### _CL (Control Layer) -This is not defined in here as it's present only on `LAYOUT_66` boards, or to be specific, my clueboard. It currently uses the default clueboard controls. +This layer is used for the `RESET` and `EEP_RST` keycodes. ## Custom Keycodes ---- @@ -46,3 +46,8 @@ If a board has a speaker, enable beeps and boops per switch actuation. This is c ### Velocikey [Velocikey](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_velocikey.md) is an RGBLIGHT feature in which the faster you type, the faster the ARE GEE BEES. + +### Macros + +Basic text macro implemented for future use + diff --git a/users/mechmerlin/rules.mk b/users/mechmerlin/rules.mk index 088743c4679c..043c70fb4d7f 100644 --- a/users/mechmerlin/rules.mk +++ b/users/mechmerlin/rules.mk @@ -1 +1,2 @@ SRC += mechmerlin.c +LTO_ENABLE = yes From 50554ca270ae4c58dfa156ae4960e06a7ec6ef31 Mon Sep 17 00:00:00 2001 From: Jonas Avellana <14019120+ninjonas@users.noreply.github.com> Date: Mon, 3 Feb 2020 18:50:50 -0700 Subject: [PATCH 195/331] Ninjonas userspace (#8070) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [keymap(kyria)] moved OLED & encoder implementation to separate classes * [feat] created logic to cycle through hue wheel when starting keyboard * [feat] created logic to cycle through hue wheel and return to user's default color * [refactor] updating OLED layout for crkbd & lily58 * [refactor] updating OLED layout for crkbd & lily58 * [fix(8070)] updating encoder.c logic based off drashna's code review * [refactor(8070)] added key to send  + Shift + M --- keyboards/crkbd/keymaps/ninjonas/config.h | 6 +- keyboards/kyria/keymaps/ninjonas/config.h | 6 +- keyboards/kyria/keymaps/ninjonas/encoder.c | 84 ++++++++ keyboards/kyria/keymaps/ninjonas/keymap.c | 224 +-------------------- keyboards/kyria/keymaps/ninjonas/oled.c | 168 ++++++++++++++++ keyboards/kyria/keymaps/ninjonas/rules.mk | 5 +- users/ninjonas/README.md | 1 + users/ninjonas/ninjonas.c | 19 ++ users/ninjonas/ninjonas.h | 1 + users/ninjonas/oled.c | 30 ++- 10 files changed, 305 insertions(+), 239 deletions(-) create mode 100644 keyboards/kyria/keymaps/ninjonas/encoder.c create mode 100644 keyboards/kyria/keymaps/ninjonas/oled.c diff --git a/keyboards/crkbd/keymaps/ninjonas/config.h b/keyboards/crkbd/keymaps/ninjonas/config.h index 5d214466231a..8a4ddad7482f 100644 --- a/keyboards/crkbd/keymaps/ninjonas/config.h +++ b/keyboards/crkbd/keymaps/ninjonas/config.h @@ -20,13 +20,9 @@ along with this program. If not, see . #pragma once -//#define USE_MATRIX_I2C - -/* Select hand configuration */ +#define TAPPING_TERM 200 #define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS #define USE_SERIAL_PD2 diff --git a/keyboards/kyria/keymaps/ninjonas/config.h b/keyboards/kyria/keymaps/ninjonas/config.h index 409058ad762b..5673e6c3d83d 100644 --- a/keyboards/kyria/keymaps/ninjonas/config.h +++ b/keyboards/kyria/keymaps/ninjonas/config.h @@ -20,7 +20,7 @@ #ifdef OLED_DRIVER_ENABLE #define OLED_DISPLAY_128X64 - #define OLED_TIMEOUT 30000 + #define OLED_TIMEOUT 15000 #endif #ifdef RGBLIGHT_ENABLE @@ -32,10 +32,6 @@ # define RGBLIGHT_SPLIT #endif -// Allows to use either side as the master. Look at the documentation for info: -// https://docs.qmk.fm/#/config_options?id=setting-handedness -#define EE_HANDS - // If you are using an Elite C rev3 on the slave side, uncomment the lines below: #define SPLIT_USB_DETECT #define SPLIT_USB_TIMEOUT 1000 diff --git a/keyboards/kyria/keymaps/ninjonas/encoder.c b/keyboards/kyria/keymaps/ninjonas/encoder.c new file mode 100644 index 000000000000..e3a4f26616d1 --- /dev/null +++ b/keyboards/kyria/keymaps/ninjonas/encoder.c @@ -0,0 +1,84 @@ +/* Copyright 2020 ninjonas + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "ninjonas.h" + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _LOWER: + if (clockwise) { + tap_code16(SGUI(KC_TAB)); + } else { + tap_code16(LGUI(KC_TAB)); + } + break; + case _RAISE: + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } + break; + case _ADJUST: + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + default: + if (clockwise) { + tap_code(KC_BRIU); + } else { + tap_code(KC_BRID); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case _LOWER: + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + break; + case _RAISE: + if (clockwise) { + tap_code16(LCTL(KC_TAB)); + } else { + tap_code16(LCTL(LSFT(KC_TAB))); + } + break; + case _ADJUST: + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + break; + default: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + } +} +#endif \ No newline at end of file diff --git a/keyboards/kyria/keymaps/ninjonas/keymap.c b/keyboards/kyria/keymaps/ninjonas/keymap.c index 1337c4427988..e6cde72d5f55 100644 --- a/keyboards/kyria/keymaps/ninjonas/keymap.c +++ b/keyboards/kyria/keymaps/ninjonas/keymap.c @@ -60,9 +60,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| _____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, // |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| - _____________________LOWER_L3_______________________,_______,_______, _______,_______,_____________________LOWER_R3_______________________, + _____________________LOWER_L3_______________________,_______,_______, _______,_______,_____________________LOWER_R3_______________________, // `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' - _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ // `----------------------------------------' `----------------------------------------' ), @@ -72,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| _____________________SYM_LEFT_______________________, _____________________SYM_RIGHT______________________, // |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| - _____________________FUNC_LEFT______________________,_______,_______, _______,_______,_____________________FUNC_RIGHT_____________________, + _____________________FUNC_LEFT______________________,_______,_______, K_CPRF,_______,_____________________FUNC_RIGHT_____________________, // `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' - _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ // `----------------------------------------' `----------------------------------------' ), @@ -84,9 +84,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| _____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, // |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| - _____________________ADJUST_L3______________________,_______,_______, _______,_______,_____________________ADJUST_R3______________________, + _____________________ADJUST_L3______________________,_______,_______, _______,_______,_____________________ADJUST_R3______________________, // `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' - _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ // `----------------------------------------' `----------------------------------------' ), /* @@ -102,214 +102,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // `----------------------------------------' `----------------------------------------' ), */ -}; - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_logo(void) { - static const char PROGMEM logo[] = { - // Converter: https://javl.github.io/image2cpp/ - // Image Dimensions: 128x64 - // Code Output Format: Plain Bytes - // Draw Mode: Vertical, 1 bit per pixel -0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0xe0, -0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x80, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, 0xe0, 0xe0, 0xe0, -0xe0, 0x00, 0x60, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, -0xc0, 0xe0, 0xe0, 0xe0, 0x20, 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, -0xe0, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0x00, -0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0xe0, 0xe0, 0xfc, 0xfe, -0xfe, 0xfe, 0xee, 0xee, 0x0e, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, -0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, -0x00, 0x00, 0x79, 0xfd, 0xfd, 0xfd, 0xec, 0xee, 0x76, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, -0x07, 0x3f, 0xff, 0xfc, 0xf8, 0xff, 0x7f, 0x07, 0x0f, 0x7f, 0xff, 0xf8, 0xfc, 0xff, 0x3f, 0x07, -0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xfe, 0xf0, 0xff, 0x7f, 0x0f, 0x07, 0x3f, 0xff, 0xfc, 0xf8, -0xff, 0x7f, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0xff, 0xfe, 0xf8, 0xff, 0xff, 0x1f, 0x03, -0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xf6, 0xe6, 0xe6, 0xf7, 0xf7, 0x77, 0x37, 0x17, 0x00, 0x30, -0x79, 0xfd, 0xfd, 0xfd, 0xee, 0xee, 0x76, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, -0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x7f, 0xff, 0xf1, 0xe0, 0xe0, 0xff, 0xff, 0x7f, 0x3f, -0x0e, 0x00, 0x0e, 0x3f, 0x7f, 0xff, 0xff, 0xe0, 0xe0, 0xe1, 0xff, 0x7f, 0x7f, 0x3f, 0x04, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, -0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0c, 0x3c, 0xfc, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, 0xfc, 0xfc, 0x7c, 0x1c, 0x00, 0xf0, 0xf8, -0xf8, 0xfc, 0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0x30, 0xb8, 0xbc, 0xbc, -0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1d, 0x1d, -0x00, 0xf0, 0xf8, 0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0xfc, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0xe0, 0xf0, -0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0x3c, 0xfc, 0xf8, 0xf8, 0xe0, 0x00, 0x00, 0x20, 0xb8, 0xbc, 0xbc, -0xbc, 0xdc, 0xdc, 0xfc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x0c, 0x7c, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, -0xfc, 0xfc, 0xfc, 0xfc, 0xf0, 0x80, 0x00, 0xf8, 0xfc, 0xfc, 0x3c, 0x04, 0x0c, 0x7c, 0xfc, 0xfc, -0xf0, 0x00, 0xc0, 0xfc, 0xfc, 0x7c, 0xfc, 0xf8, 0xc0, 0x00, 0xf0, 0xfc, 0xfc, 0x7c, 0x0c, 0x00, -0x00, 0x00, 0xc0, 0xc1, 0xc7, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x07, 0x0f, -0x1f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, -0x1d, 0x1d, 0x0e, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, -0x00, 0x07, 0x0f, 0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x03, 0x07, -0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1f, 0x0f, 0x0f, 0x03, 0x00, 0x00, 0x0f, 0x1f, 0x1f, 0x1f, -0x1d, 0x1d, 0x0c, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, -0x0f, 0x01, 0x00, 0x07, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, -0x1f, 0x1e, 0x1f, 0x1f, 0x03, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, -0x00, 0x80, 0xc1, 0xf1, 0xf9, 0xf9, 0xf9, 0xb8, 0xb8, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, -0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, -0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, -0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, -0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, -0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, -0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x7c, 0xfe, 0xff, 0xff, 0xc7, 0x83, 0x83, -0xc7, 0xff, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x7c, 0xff, 0xff, 0xff, 0xc7, 0x83, 0x83, 0xc7, 0xff, -0xff, 0xfe, 0x7c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, -0x00, 0x00, 0x03, 0x1f, 0xff, 0xff, 0xf0, 0xe0, 0xfe, 0xff, 0x1f, 0x3f, 0xff, 0xfe, 0xe0, 0xf0, -0xff, 0xff, 0x1f, 0x03, 0x00, 0x01, 0x0f, 0x7f, 0xff, 0xf8, 0xc0, 0xfc, 0xff, 0x3f, 0x1f, 0xff, -0xfe, 0xf0, 0xe0, 0xff, 0xff, 0x3f, 0x07, 0x00, 0x01, 0x07, 0x3f, 0xff, 0xff, 0xf8, 0xe0, 0xfc, -0xff, 0x7f, 0x0f, 0x03, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xdb, 0x9b, 0x9b, 0xdf, 0xdf, 0xdf, 0xde, -0x1c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, -0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, -0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, -0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, -0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, -0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, -0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x3f, 0x3f, 0x1f, 0x0f, -0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, -0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00 - }; - oled_write_raw_P(logo, sizeof(logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -void oled_white_space(void){ - oled_write_P(PSTR(" "), false); -} - -static void render_status(void) { - oled_write_P(PSTR("\nLayer: "), false); - oled_write_P(PSTR("LOW"), (layer_state_is(_LOWER) & !layer_state_is(_ADJUST))); - oled_white_space(); - oled_write_P(PSTR("RAI"), (layer_state_is(_RAISE) & !layer_state_is(_ADJUST))); - oled_white_space(); - oled_write_P(PSTR("ADJ"), layer_state_is(_ADJUST)); -} - -void render_default_layer_state(void) { - oled_write_P(PSTR("\nLayout: "), false); - switch (biton32(default_layer_state)) { - case _COLEMAK: - oled_write_P(PSTR("Colemak"), false); - break; - case _DVORAK: - oled_write_P(PSTR("Dvorak"), false); - break; - case _QWERTY: - oled_write_P(PSTR("Qwerty"), false); - break; - default: - oled_write_ln_P(PSTR("Undefined"), false); - } -} - -void render_mod_status(uint8_t modifiers) { - oled_write_P(PSTR("\nMods: "), false); - oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); - oled_white_space(); - oled_write_P(PSTR("CTL"), (modifiers & MOD_MASK_CTRL)); - oled_white_space(); - oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); - oled_white_space(); - oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_qmk_logo(); - render_default_layer_state(); - render_status(); - render_mod_status(get_mods()|get_oneshot_mods()); - } else { - render_logo(); - oled_scroll_left(); - } -} -#endif - -#ifdef ENCODER_ENABLE -void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - switch (biton32(layer_state)) { - case _LOWER: - if (clockwise) { - tap_code16(SGUI(KC_TAB)); - } else { - tap_code16(LGUI(KC_TAB)); - } - break; - case _RAISE: - if (clockwise) { - tap_code(KC_PGUP); - } else { - tap_code(KC_PGDN); - } - break; - case _ADJUST: - if (clockwise) { - rgblight_increase_hue(); - } else { - rgblight_decrease_hue(); - } - break; - default: - if (clockwise) { - tap_code(KC_BRIU); - } else { - tap_code(KC_BRID); - } - break; - } - } else if (index == 1) { - switch (biton32(layer_state)) { - case _LOWER: - if (!clockwise) { - tap_code(KC_UP); - } else { - tap_code(KC_DOWN); - } - break; - case _RAISE: - if (!clockwise) { - tap_code16(LCTL(KC_TAB)); - } else { - tap_code16(LCTL(LSFT(KC_TAB))); - } - break; - case _ADJUST: - if (!clockwise) { - rgblight_increase_val(); - } else { - rgblight_decrease_val(); - } - break; - default: - if (!clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - break; - } - } -} -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/kyria/keymaps/ninjonas/oled.c b/keyboards/kyria/keymaps/ninjonas/oled.c new file mode 100644 index 000000000000..ff21b4885f22 --- /dev/null +++ b/keyboards/kyria/keymaps/ninjonas/oled.c @@ -0,0 +1,168 @@ +/* Copyright 2020 ninjonas + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "ninjonas.h" + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +static void render_logo(void) { + static const char PROGMEM logo[] = { + // Converter: https://javl.github.io/image2cpp/ + // Image Dimensions: 128x64 + // Code Output Format: Plain Bytes + // Draw Mode: Vertical, 1 bit per pixel +0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0xe0, +0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x80, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, 0xe0, 0xe0, 0xe0, +0xe0, 0x00, 0x60, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, +0xc0, 0xe0, 0xe0, 0xe0, 0x20, 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, +0xe0, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0x00, +0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0xe0, 0xe0, 0xfc, 0xfe, +0xfe, 0xfe, 0xee, 0xee, 0x0e, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, +0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, +0x00, 0x00, 0x79, 0xfd, 0xfd, 0xfd, 0xec, 0xee, 0x76, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, +0x07, 0x3f, 0xff, 0xfc, 0xf8, 0xff, 0x7f, 0x07, 0x0f, 0x7f, 0xff, 0xf8, 0xfc, 0xff, 0x3f, 0x07, +0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xfe, 0xf0, 0xff, 0x7f, 0x0f, 0x07, 0x3f, 0xff, 0xfc, 0xf8, +0xff, 0x7f, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0xff, 0xfe, 0xf8, 0xff, 0xff, 0x1f, 0x03, +0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xf6, 0xe6, 0xe6, 0xf7, 0xf7, 0x77, 0x37, 0x17, 0x00, 0x30, +0x79, 0xfd, 0xfd, 0xfd, 0xee, 0xee, 0x76, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x7f, 0xff, 0xf1, 0xe0, 0xe0, 0xff, 0xff, 0x7f, 0x3f, +0x0e, 0x00, 0x0e, 0x3f, 0x7f, 0xff, 0xff, 0xe0, 0xe0, 0xe1, 0xff, 0x7f, 0x7f, 0x3f, 0x04, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x3c, 0xfc, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, 0xfc, 0xfc, 0x7c, 0x1c, 0x00, 0xf0, 0xf8, +0xf8, 0xfc, 0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0x30, 0xb8, 0xbc, 0xbc, +0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1d, 0x1d, +0x00, 0xf0, 0xf8, 0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0xfc, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0xe0, 0xf0, +0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0x3c, 0xfc, 0xf8, 0xf8, 0xe0, 0x00, 0x00, 0x20, 0xb8, 0xbc, 0xbc, +0xbc, 0xdc, 0xdc, 0xfc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x0c, 0x7c, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, +0xfc, 0xfc, 0xfc, 0xfc, 0xf0, 0x80, 0x00, 0xf8, 0xfc, 0xfc, 0x3c, 0x04, 0x0c, 0x7c, 0xfc, 0xfc, +0xf0, 0x00, 0xc0, 0xfc, 0xfc, 0x7c, 0xfc, 0xf8, 0xc0, 0x00, 0xf0, 0xfc, 0xfc, 0x7c, 0x0c, 0x00, +0x00, 0x00, 0xc0, 0xc1, 0xc7, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x07, 0x0f, +0x1f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, +0x1d, 0x1d, 0x0e, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, +0x00, 0x07, 0x0f, 0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x03, 0x07, +0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1f, 0x0f, 0x0f, 0x03, 0x00, 0x00, 0x0f, 0x1f, 0x1f, 0x1f, +0x1d, 0x1d, 0x0c, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, +0x0f, 0x01, 0x00, 0x07, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, +0x1f, 0x1e, 0x1f, 0x1f, 0x03, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, +0x00, 0x80, 0xc1, 0xf1, 0xf9, 0xf9, 0xf9, 0xb8, 0xb8, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, +0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, +0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, +0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x7c, 0xfe, 0xff, 0xff, 0xc7, 0x83, 0x83, +0xc7, 0xff, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x7c, 0xff, 0xff, 0xff, 0xc7, 0x83, 0x83, 0xc7, 0xff, +0xff, 0xfe, 0x7c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, +0x00, 0x00, 0x03, 0x1f, 0xff, 0xff, 0xf0, 0xe0, 0xfe, 0xff, 0x1f, 0x3f, 0xff, 0xfe, 0xe0, 0xf0, +0xff, 0xff, 0x1f, 0x03, 0x00, 0x01, 0x0f, 0x7f, 0xff, 0xf8, 0xc0, 0xfc, 0xff, 0x3f, 0x1f, 0xff, +0xfe, 0xf0, 0xe0, 0xff, 0xff, 0x3f, 0x07, 0x00, 0x01, 0x07, 0x3f, 0xff, 0xff, 0xf8, 0xe0, 0xfc, +0xff, 0x7f, 0x0f, 0x03, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xdb, 0x9b, 0x9b, 0xdf, 0xdf, 0xdf, 0xde, +0x1c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, +0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, +0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, +0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, +0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x3f, 0x3f, 0x1f, 0x0f, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00 + }; + oled_write_raw_P(logo, sizeof(logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +void oled_white_space(void){ + oled_write_P(PSTR(" "), false); +} + +void render_layout_state(void) { + oled_write_P(PSTR("\nLayout: "), false); + switch (biton32(default_layer_state)) { + case _COLEMAK: + oled_write_P(PSTR("Colemak"), false); + break; + case _DVORAK: + oled_write_P(PSTR("Dvorak"), false); + break; + case _QWERTY: + oled_write_P(PSTR("Qwerty"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } +} + +static void render_layer_state(void) { + oled_write_P(PSTR("\nLayer:"), false); + bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); + bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); + bool adjust = layer_state_is(_ADJUST); + + if(lower){ + oled_write_P(PSTR(" Lower "), true); + } else if(raise){ + oled_write_P(PSTR(" Raise "), true); + } else if(adjust){ + oled_write_P(PSTR(" Adjust "), true); + } else { + oled_write_P(PSTR(" Default"), false); + } +} + +void render_mod_state(uint8_t modifiers) { + oled_write_P(PSTR("\nMods: "), false); + oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); + oled_white_space(); + oled_write_P(PSTR("CTL"), (modifiers & MOD_MASK_CTRL)); + oled_white_space(); + oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); + oled_white_space(); + oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); +} + +static void render_status(void) { + render_qmk_logo(); + render_layout_state(); + render_layer_state(); + render_mod_state(get_mods()|get_oneshot_mods()); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); + } +} +#endif \ No newline at end of file diff --git a/keyboards/kyria/keymaps/ninjonas/rules.mk b/keyboards/kyria/keymaps/ninjonas/rules.mk index 13bc4cf97b13..3b2894a175ee 100644 --- a/keyboards/kyria/keymaps/ninjonas/rules.mk +++ b/keyboards/kyria/keymaps/ninjonas/rules.mk @@ -1,4 +1,7 @@ OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays ENCODER_ENABLE = yes # Enables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LINK_TIME_OPTIMIZATION_ENABLE = yes + +SRC += encoder.c \ + oled.c \ No newline at end of file diff --git a/users/ninjonas/README.md b/users/ninjonas/README.md index 301b350e7af0..39d92cff35b9 100644 --- a/users/ninjonas/README.md +++ b/users/ninjonas/README.md @@ -25,6 +25,7 @@ See: https://docs.qmk.fm/#/feature_userspace |K_MDSH | MacOS shortcut to get em-dash `–` | |K_RAPP | MacOS shortcut to switch apps to the right | |K_LAPP | MacOS shortcut to switch apps to the left | +|K_CPRF |  + Shift + M. Used for switching Google Chrome profiles | ### [Layers](ninjonas.h#L44) |Code | Description | diff --git a/users/ninjonas/ninjonas.c b/users/ninjonas/ninjonas.c index 49e12e4824ba..7e5afcec87ef 100644 --- a/users/ninjonas/ninjonas.c +++ b/users/ninjonas/ninjonas.c @@ -17,4 +17,23 @@ layer_state_t layer_state_set_user (layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; +#endif +void keyboard_post_init_user() { + #ifdef RGBLIGHT_ENABLE + // Cycles through the entire hue wheel and resetting to default color + uint16_t default_hue = rgblight_config.hue; + rgblight_enable_noeeprom(); + layer_state_set_user(layer_state); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + for (uint16_t i = 255; i > 0; i--) { + rgblight_sethsv_noeeprom((i + default_hue) % 255, rgblight_config.sat, rgblight_config.val); + matrix_scan(); + wait_ms(10); + } + #endif + layer_state_set_user(layer_state); } \ No newline at end of file diff --git a/users/ninjonas/ninjonas.h b/users/ninjonas/ninjonas.h index ba94c8ea8983..6f79b262f60f 100644 --- a/users/ninjonas/ninjonas.h +++ b/users/ninjonas/ninjonas.h @@ -37,6 +37,7 @@ // Shortcut Keys #define K_LOCK LGUI(LCTL(KC_Q)) // Locks screen on MacOS #define K_CSCN LGUI(LCTL(LSFT(KC_4))) // Copy a portion of the screen to the clipboard +#define K_CPRF LGUI(LSFT(KC_M)) //  + Shift + M. Used for switching Google Chrome profiles #define K_MDSH LSFT(LALT(KC_MINS)) #define K_LAPP SGUI(KC_TAB) //  + Shift + Tab #define K_RAPP LGUI(KC_TAB) //  + Tab diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index ac98133bc73f..285b0364e5cc 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c @@ -21,7 +21,7 @@ bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; } -void render_default_layer_state(void) { +void render_layout_state(void) { oled_write_P(PSTR("Layout: "), false); switch (biton32(default_layer_state)) { case _COLEMAK: @@ -43,15 +43,23 @@ void oled_white_space(void){ } void render_layer_state(void) { - oled_write_P(PSTR("\nLayer: "), false); - oled_write_P(PSTR("LOW"), (layer_state_is(_LOWER) & !layer_state_is(_ADJUST))); - oled_white_space(); - oled_write_P(PSTR("RAI"), (layer_state_is(_RAISE) & !layer_state_is(_ADJUST))); - oled_white_space(); - oled_write_P(PSTR("ADJ"), layer_state_is(_ADJUST)); + oled_write_P(PSTR("\nLayer:"), false); + bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); + bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); + bool adjust = layer_state_is(_ADJUST); + + if(lower){ + oled_write_P(PSTR(" Lower "), true); + } else if(raise){ + oled_write_P(PSTR(" Raise "), true); + } else if(adjust){ + oled_write_P(PSTR(" Adjust "), true); + } else { + oled_write_P(PSTR(" Default"), false); + } } -void render_mod_status(uint8_t modifiers) { +void render_mod_state(uint8_t modifiers) { oled_write_P(PSTR("\nMods: "), false); oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); oled_white_space(); @@ -63,10 +71,10 @@ void render_mod_status(uint8_t modifiers) { } void render_status(void){ - render_default_layer_state(); + render_layout_state(); oled_write_P(PSTR("\n"), false); render_layer_state(); - render_mod_status(get_mods()|get_oneshot_mods()); + render_mod_state(get_mods()|get_oneshot_mods()); } static void render_logo(void) { @@ -80,7 +88,7 @@ static void render_logo(void) { } void oled_task_user(void) { - if (timer_elapsed32(oled_timer) > 30000) { + if (timer_elapsed32(oled_timer) > 15000) { oled_off(); return; } From 964ed177165072572112abfbdbba3317ed13170c Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Tue, 4 Feb 2020 14:17:10 -0500 Subject: [PATCH 196/331] ridingqwerty: userspace update (#8076) * Userspace overhaul * Remove testing directory * Minorca keymap tweaks --- .../atreus/keymaps/ridingqwerty/keymap.c | 143 ++- .../atreus/keymaps/ridingqwerty/rules.mk | 15 +- .../minorca/keymaps/ridingqwerty/config.h | 7 + .../minorca/keymaps/ridingqwerty/keymap.c | 123 ++ .../minorca/keymaps/ridingqwerty/readme.md | 1 + .../minorca/keymaps/ridingqwerty/rules.mk | 10 + users/ridingqwerty/config.h | 8 + users/ridingqwerty/dict.h | 1012 +++++++++++++++++ users/ridingqwerty/process_records.c | 467 +++++++- users/ridingqwerty/process_records.h | 55 +- users/ridingqwerty/ridingqwerty.c | 64 ++ users/ridingqwerty/ridingqwerty.h | 64 +- users/ridingqwerty/rules.mk | 20 +- users/ridingqwerty/tapdances.c | 33 + users/ridingqwerty/tapdances.h | 9 + users/ridingqwerty/unicode.c | 7 + users/ridingqwerty/unicode.h | 295 +++++ users/ridingqwerty/wrappers.h | 156 +++ 18 files changed, 2388 insertions(+), 101 deletions(-) create mode 100644 keyboards/handwired/minorca/keymaps/ridingqwerty/config.h create mode 100644 keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c create mode 100644 keyboards/handwired/minorca/keymaps/ridingqwerty/readme.md create mode 100644 keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk create mode 100644 users/ridingqwerty/dict.h create mode 100644 users/ridingqwerty/tapdances.c create mode 100644 users/ridingqwerty/tapdances.h create mode 100644 users/ridingqwerty/unicode.c create mode 100644 users/ridingqwerty/unicode.h create mode 100644 users/ridingqwerty/wrappers.h diff --git a/keyboards/atreus/keymaps/ridingqwerty/keymap.c b/keyboards/atreus/keymaps/ridingqwerty/keymap.c index 336df497303b..1eeb17fd1751 100644 --- a/keyboards/atreus/keymaps/ridingqwerty/keymap.c +++ b/keyboards/atreus/keymaps/ridingqwerty/keymap.c @@ -30,9 +30,7 @@ MODS // LAYERS // MODS // */ -#ifdef LAYOUT -#undef LAYOUT -#define LAYOUT( \ +#define LAYOUT_atreus( \ K00, K01, K02, K03, K04, K40, K41, K42, K43, K44, \ K10, K11, K12, K13, K14, K50, K51, K52, K53, K54, \ K20, K21, K22, K23, K24, K60, K61, K62, K63, K64, \ @@ -47,70 +45,109 @@ { K64, K63, K62, K61, K60, KC_NO }, \ { K75, K74, K73, K72, K71, K70 } \ } -#endif + +//#define ALPHA XP(UCM_LDEL, UCM_UDEL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - ED_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NM_SCLN, - LS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, FK_DOT, RS_SLSH, - LC_ESC, LG_TAB, LA_LBRC, LS_RBRC, NM_BSPC, ED_ESC, SC_TAB, SM_SPC, RS_MINS, RA_EQL, RG_QUOT, RC_ENT + [_QWERTY] = LAYOUT_atreus_wrapper( /* Qwerty */ + ________________ATREUS_L1__________________, ________________ATREUS_R1__________________, + ________________ATREUS_L2__________________, ________________ATREUS_R2__________________, + ________________ATREUS_L3__________________, ________________ATREUS_R3__________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), + [_DVORAK] = LAYOUT_atreus_wrapper( /* Qwerty */ + ________________DVORAK_L1__________________, ________________DVORAK_R1__________________, + ________________DVORAK_L2__________________, ________________DVORAK_R2__________________, + ________________DVORAK_L3__________________, ________________DVORAK_R3__________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), + [_COLEMAK] = LAYOUT_atreus_wrapper( /* Qwerty */ + ________________COLEMAK_L1_________________, ________________COLEMAK_R1_________________, + ________________COLEMAK_L2_________________, ________________COLEMAK_R2_________________, + ________________COLEMAK_L3_________________, ________________COLEMAK_R3_________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), +//#if defined(UNICODEMAP_ENABLE) +//#ifdef UNICODE_H +#ifdef UNICODEMAP_ENABLE + [_GREEK] = LAYOUT_atreus_wrapper( + ________________GREEK_L1___________________, ________________GREEK_R1___________________, + ________________GREEK_L2___________________, ________________GREEK_R2___________________, + ________________GREEK_L3___________________, ________________GREEK_R3___________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), + [_RUSSIAN] = LAYOUT_atreus_wrapper( + ________________CYRLC_L1___________________, ________________CYRLC_R1___________________, + ________________CYRLC_L2___________________, ________________CYRLC_R2___________________, + ________________CYRLC_L3___________________, ________________CYRLC_R3___________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________CYRLC_R4___________________ + ), + [_RUNES] = LAYOUT_atreus_wrapper( + ________________FTHRK_L1___________________, ________________FTHRK_R1___________________, + ________________FTHRK_L2___________________, ________________FTHRK_R2___________________, + ________________FTHRK_L3___________________, ________________FTHRK_R3___________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ + ), + [_HIRA1] = LAYOUT_atreus_wrapper( + ________________JIS1_L1____________________, ________________JIS1_R1____________________, + ________________JIS1_L2____________________, ________________JIS1_R2____________________, + ________________JIS1_L3____________________, ________________JIS1_R3____________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ ), - [_EDITOR] = LAYOUT( /* ED_A, ED_ESC */ - KC_GRV, _______, KC_END, _______, KC_TAB, _______, _______, KC_INS, _______, KC_PGUP, - KC_HOME, _______, KC_DELT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, - _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, KC_BSLS, - _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______ + [_HIRA2] = LAYOUT_atreus_wrapper( + ________________JIS2_L1____________________, ________________JIS2_R1____________________, + ________________JIS2_L2____________________, ________________JIS2_R2____________________, + ________________JIS2_L3____________________, ________________JIS2_R3____________________, + ________________BOTTOM_L4__________________, ____THUMBS_R4___, ________________BOTTOM_R4__________________ ), - [_NUMBER] = LAYOUT( /* NM_SCLN, NM_BSPC */ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, - KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_4, KC_5, KC_6, _______, - _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_BSLS, - _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_0, KC_0, KC_DOT, _______, _______ +#endif + [_EDITOR] = LAYOUT_atreus_wrapper( /* ED_A, ED_ESC */ + ________________EDITOR_L1__________________, ________________EDITOR_R1__________________, + ________________EDITOR_L2__________________, ________________EDITOR_R2__________________, + ________________EDITOR_L3__________________, ________________EDITOR_R3__________________, + _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______ + ), + [_NUMBER] = LAYOUT_atreus_wrapper( /* NM_SCLN, NM_BSPC */ + ________________NUMROW_L1__________________, ________________NUMROW_R1__________________, + ________________NUMROW_R1__________________, ________________NUMPAD_R2__________________, + ___________________________________________, ________________NUMPAD_R3__________________, + ___________________________________________, ________________, ________________NUMPAD_R4__________________ ), - [_SYMBOL] = LAYOUT( /* SM_SPC */ - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, - KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, KC_COLN, + [_SYMBOL] = LAYOUT_atreus_wrapper( /* SM_SPC */ + ________________SYMROW_L1__________________, ________________SYMROW_R1__________________, + ________________SYMROW_R1__________________, ________________SYMROW_R1__________________, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, - _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______ + KC_LBRC, _______, _______, _______, _______, ________________, _______, _______, _______, _______, KC_RBRC ), - [_F_KEYS] = LAYOUT( /* FK_DOT */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_F11, - KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_F12, + [_F_KEYS] = LAYOUT_atreus_wrapper( /* FK_DOT */ + ________________FKEYROW_L1_________________, ________________FKEYROW_R1_________________, + ________________FKEYROW_R1_________________, ________________FKEYROW_L1_________________, + KC_F11, KC_F12, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [_SECRET] = LAYOUT( /* shhhh... */ - RESET, _______, _______, RUSTY, FUEL, KC_F13, _______, _______, _______, _______, + [_DEBUG] = LAYOUT_atreus_wrapper( /* shhhh... */ + ________________DEBUG_L1___________________, ________________DEBUG_R1___________________, + ________________DEBUG_L2___________________, ________________DEBUG_R2___________________, + ________________DEBUG_L3___________________, ________________DEBUG_R3___________________, + _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______ + ), + [_SECRET] = LAYOUT_atreus_wrapper( /* shhhh... */ +/* + _______, _______, _______, RUSTY, FUEL, _______, _______, _______, _______, _______, AR1ST, SYSNOC, _______, _______, _______, _______, _______, _______, OS_LAB, _______, - CDLOCAL, _______, C0RE, VAXIS, _______, _______, MUNKY, _______, _______, _______, + CDLOCAL, _______, C0RE, VAXIS, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +*/ + ________________SECRET_L1__________________, ________________SECRET_R1__________________, + ________________SECRET_L2__________________, ________________SECRET_R2__________________, + ________________SECRET_L3__________________, ________________SECRET_R3__________________, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), - [_FINAL] = LAYOUT( /* . */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + [_FINAL] = LAYOUT_atreus( /* . */ + _______, _______, _______, _______, TESTING, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; - -// custom tap/hold keys -uint16_t key_timer; -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case RG_QUOT: - if (record->event.pressed) { - key_timer = timer_read(); - layer_on(_NUMBER); - register_mods(MOD_BIT(KC_RGUI)); - } else { - unregister_mods(MOD_BIT(KC_RGUI)); - layer_off(_NUMBER); - if (timer_elapsed(key_timer) < TAPPING_TERM) { - tap_code(KC_QUOT); - } - } - return false; break; - } - return true; -}; diff --git a/keyboards/atreus/keymaps/ridingqwerty/rules.mk b/keyboards/atreus/keymaps/ridingqwerty/rules.mk index 95b257f75847..5c89d5481d66 100644 --- a/keyboards/atreus/keymaps/ridingqwerty/rules.mk +++ b/keyboards/atreus/keymaps/ridingqwerty/rules.mk @@ -5,13 +5,14 @@ MCU = STM32F303 # BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -#MOUSEKEY_ENABLE = yes # Mouse keys +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = yes +AUDIO_ENABLE = yes # Doot RGBLIGHT_ENABLE = no -# SERIAL_LINK_ENABLE = yes -#TAP_DANCE_ENABLE = yes +TAP_DANCE_ENABLE = no +UNICODE_ENABLE = no +UNICODEMAP_ENABLE = yes + diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/config.h b/keyboards/handwired/minorca/keymaps/ridingqwerty/config.h new file mode 100644 index 000000000000..c54aac31899b --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/config.h @@ -0,0 +1,7 @@ +#pragma once + +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { B3, B7, D0, D1, D2, D3, C6, C7, B5, B6, F7, F6 } + +#undef MATRIX_ROW_PINS +#define MATRIX_ROW_PINS { F0, F1, F4, F5 } diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c b/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c new file mode 100644 index 000000000000..ae490914d528 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2019 George Koenig + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "ridingqwerty.h" + +/* MinOrca + ┏━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┓ + ┃ ⎋ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ❦ ⌫ ┃ + ┠────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────┨ + ┃ ¶ ⇥ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ 🔢 ↵ ┃ + ┠──────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬───────────┨ + ┃ " ⇧ │ Z │ X │ C │ V │ B │ N │ M │ , │ 𝔽 . │ ⇧ / ┃ + ┠──────────┬───┴──────┬─┴────────┼────────┴────────┴──┬─────┴────────┴─────┬──┴───────┬┴───────┬┴───────────┨ + ┃ { ⎈ │ [ ⌘ │ ( ⌥ │ 🔢 ␣ │ ★ ␣ │ ) ⌥ │ ] ⌘ │ } ⎈ ┃ + ┗━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━┛ +*/ + +#define LAYOUT_minorca( \ + KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11, \ + KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KB11, \ + KC00, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11, \ + KD00, KD02, KD03, KD04, KD07, KD09, KD10, KD11 \ +) { \ + { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11 }, \ + { KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KC_NO, KB11 }, \ + { KC00, KC_NO, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11 }, \ + { KD00, KC_NO, KD02, KD03, KD04, KC_NO, KC_NO, KD07, KC_NO, KD09, KD10, KD11 } \ +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = { + {KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SC(BSPC) }, + {ED(TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, NM(SCLN) }, + {LS(QUOT), XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, FK(DOT), RS(SLSH) }, + {LC(ESC), XXXXXXX, LG(LBRC), LA(RBRC), NM(BSPC), XXXXXXX, XXXXXXX, SM(SPC), XXXXXXX, RA(MINS), RG(EQL), RC(ENT) } +/* + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ +*/ + + + }, +#ifdef UNICODE_H + [_RUNE] = { + {KC_ESC, X(INGWZ), X(WUNJO), X(EHWAZ), X(RAIDO), X(TIWAZ), X(IWAZ), X(UR), X(ISAZ), X(ETHEL), X(PERTH), SC(BSPC) }, + {ED(TAB), X(ANSUZ), X(SOWIL), X(DAGAZ), X(FE), X(GEBO), X(HAGLZ), X(JERAN), X(KAUNA), X(LAUKZ), XXXXXXX, NM(SCLN) }, + {MT_QUOT, XXXXXXX, X(ALGIZ), X(THURS), X(KAUNA), X(WUNJO), X(BEORC), X(NAUDZ), X(MANNZ), KC_COMM, FK(DOT), RS(SLSH) }, + {LC(ESC), XXXXXXX, LG(LBRC), LA(RBRC), NM(BSPC), XXXXXXX, XXXXXXX, SM(SPC), XXXXXXX, RA(MINS), RG(EQL), RC(ENT) } + }, +#endif + [_EDITOR] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {KC_GRV, _______, _______, KC_END, _______, KC_F5, _______, _______, KC_INS, _______, KC_PGUP, KC_DELT }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, KC_HOME, _______, KC_DELT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, KC_SCLN }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PGDN, _______, KC_SCLN, KC_QUOT, KC_BSLS }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, _______, _______, KC_EQL, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, KC_COLN, KC_DQUO, KC_PIPE } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, + [_NUMBER] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, KC_4, KC_5, KC_6, KC_PAST, _______, KC_PPLS, KC_4, KC_5, KC_6, XXXXXXX, _______ }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, KC_7, KC_8, KC_9, KC_SLSH, _______, _______, KC_MINS, KC_1, KC_2, KC_3, _______ }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, KC_0, _______, _______, XXXXXXX, XXXXXXX, KC_0, XXXXXXX, KC_DOT, _______, _______ } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, + [_SYMBOL] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, XXXXXXX, _______ }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, KC_SCLN, KC_QUOT, KC_BSLS }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_COLN, KC_DQUO, KC_PIPE } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, + [_SECRET] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {RESET, _______, _______, _______, SECRET0, SECRET1, _______, _______, _______, _______, VERSION, _______ }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, SECRET4, SECRET8, DEBUG, _______, _______, _______, _______, _______, SECRET7, XXXXXXX, MAKE }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, XXXXXXX, SECRET6, _______, SECRET2, SECRET5, _______, _______, SECRET3, _______, _______, _______ }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______ } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, + [_F_KEYS] = { + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┴────────┤ + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______ }, + //├────────┴────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + {_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + //├─────────────────┼────────┼────────┼────────┴────────┼────────┴────────┼────────┴────────┼────────┼────────┤ + {_______, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______ } + //└─────────────────┴────────┴────────┴─────────────────┴─────────────────┴─────────────────┴────────┴────────┘ + }, +}; diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/readme.md b/keyboards/handwired/minorca/keymaps/ridingqwerty/readme.md new file mode 100644 index 000000000000..4f0b3564b951 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/readme.md @@ -0,0 +1 @@ +# Handwire of Minorca using teensy 2.0 diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk new file mode 100644 index 000000000000..ac798576a5d1 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk @@ -0,0 +1,10 @@ +MCU = atmega32u4 +BOOTLOADER = halfkay + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = yes # Unicode Map diff --git a/users/ridingqwerty/config.h b/users/ridingqwerty/config.h index 2461b8b8dd0d..6501efe62f05 100644 --- a/users/ridingqwerty/config.h +++ b/users/ridingqwerty/config.h @@ -1,3 +1,11 @@ #pragma once + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COL 0 + #define TAPPING_TERM 175 #define MACRO_TIMER 5 +#define TAPPING_FORCE_HOLD_PER_KEY +// testing +#define TAPPING_TERM_PER_KEY +//#define IGNORE_MOD_TAP_INTERRUPT // rolling R3 "zxcv", etc... diff --git a/users/ridingqwerty/dict.h b/users/ridingqwerty/dict.h new file mode 100644 index 000000000000..43d4d50b500c --- /dev/null +++ b/users/ridingqwerty/dict.h @@ -0,0 +1,1012 @@ +#pragma once + +// lower this number if a smaller dictionary is desired +#define NUMBER_OF_WORDS 1000 + +#define MAX_WORDS 1000 +#if (NUMBER_OF_WORDS > MAX_WORDS) +# error *** NUMBER_OF_WORDS must be between 0 and 1000 inclusive +#endif + +const char *dict[MAX_WORDS] = { \ +"the", \ +"of", \ +"to", \ +"and", \ +"a", \ +"in", \ +"is", \ +"it", \ +"you", \ +"that", \ +"he", \ +"was", \ +"for", \ +"on", \ +"are", \ +"with", \ +"as", \ +"I", \ +"his", \ +"they", \ +"be", \ +"at", \ +"one", \ +"have", \ +"this", \ +"from", \ +"or", \ +"had", \ +"by", \ +"not", \ +"word", \ +"but", \ +"what", \ +"some", \ +"we", \ +"can", \ +"out", \ +"other", \ +"were", \ +"all", \ +"there", \ +"when", \ +"up", \ +"use", \ +"your", \ +"how", \ +"said", \ +"an", \ +"each", \ +"she", \ +"which", \ +"do", \ +"their", \ +"time", \ +"if", \ +"will", \ +"way", \ +"about", \ +"many", \ +"then", \ +"them", \ +"write", \ +"would", \ +"like", \ +"so", \ +"these", \ +"her", \ +"long", \ +"make", \ +"thing", \ +"see", \ +"him", \ +"two", \ +"has", \ +"look", \ +"more", \ +"day", \ +"could", \ +"go", \ +"come", \ +"did", \ +"number", \ +"sound", \ +"no", \ +"most", \ +"people", \ +"my", \ +"over", \ +"know", \ +"water", \ +"than", \ +"call", \ +"first", \ +"who", \ +"may", \ +"down", \ +"side", \ +"been", \ +"now", \ +"find", \ +"any", \ +"new", \ +"work", \ +"part", \ +"take", \ +"get", \ +"place", \ +"made", \ +"live", \ +"where", \ +"after", \ +"back", \ +"little", \ +"only", \ +"round", \ +"man", \ +"year", \ +"came", \ +"show", \ +"every", \ +"good", \ +"me", \ +"give", \ +"our", \ +"under", \ +"name", \ +"very", \ +"through", \ +"just", \ +"form", \ +"sentence", \ +"great", \ +"think", \ +"say", \ +"help", \ +"low", \ +"line", \ +"differ", \ +"turn", \ +"cause", \ +"much", \ +"mean", \ +"before", \ +"move", \ +"right", \ +"boy", \ +"old", \ +"too", \ +"same", \ +"tell", \ +"does", \ +"set", \ +"three", \ +"want", \ +"air", \ +"well", \ +"also", \ +"play", \ +"small", \ +"end", \ +"put", \ +"home", \ +"read", \ +"hand", \ +"port", \ +"large", \ +"spell", \ +"add", \ +"even", \ +"land", \ +"here", \ +"must", \ +"big", \ +"high", \ +"such", \ +"follow", \ +"act", \ +"why", \ +"ask", \ +"men", \ +"change", \ +"went", \ +"light", \ +"kind", \ +"off", \ +"need", \ +"house", \ +"picture", \ +"try", \ +"us", \ +"again", \ +"animal", \ +"point", \ +"mother", \ +"world", \ +"near", \ +"build", \ +"self", \ +"earth", \ +"father", \ +"head", \ +"stand", \ +"own", \ +"page", \ +"should", \ +"country", \ +"found", \ +"answer", \ +"school", \ +"grow", \ +"study", \ +"still", \ +"learn", \ +"plant", \ +"cover", \ +"food", \ +"sun", \ +"four", \ +"between", \ +"state", \ +"keep", \ +"eye", \ +"never", \ +"last", \ +"let", \ +"thought", \ +"city", \ +"tree", \ +"cross", \ +"farm", \ +"hard", \ +"start", \ +"might", \ +"story", \ +"saw", \ +"far", \ +"sea", \ +"draw", \ +"left", \ +"late", \ +"run", \ +"don't", \ +"while", \ +"press", \ +"close", \ +"night", \ +"real", \ +"life", \ +"few", \ +"north", \ +"open", \ +"seem", \ +"together", \ +"next", \ +"white", \ +"children", \ +"begin", \ +"got", \ +"walk", \ +"example", \ +"ease", \ +"paper", \ +"group", \ +"always", \ +"music", \ +"those", \ +"both", \ +"mark", \ +"often", \ +"letter", \ +"until", \ +"mile", \ +"river", \ +"car", \ +"feet", \ +"care", \ +"second", \ +"book", \ +"carry", \ +"took", \ +"science", \ +"eat", \ +"room", \ +"friend", \ +"began", \ +"idea", \ +"fish", \ +"mountain", \ +"stop", \ +"once", \ +"base", \ +"hear", \ +"horse", \ +"cut", \ +"sure", \ +"watch", \ +"color", \ +"face", \ +"wood", \ +"main", \ +"enough", \ +"plain", \ +"girl", \ +"usual", \ +"young", \ +"ready", \ +"above", \ +"ever", \ +"red", \ +"list", \ +"though", \ +"feel", \ +"talk", \ +"bird", \ +"soon", \ +"body", \ +"dog", \ +"family", \ +"direct", \ +"pose", \ +"leave", \ +"song", \ +"measure", \ +"door", \ +"product", \ +"black", \ +"short", \ +"numeral", \ +"class", \ +"wind", \ +"question", \ +"happen", \ +"complete", \ +"ship", \ +"area", \ +"half", \ +"rock", \ +"order", \ +"fire", \ +"south", \ +"problem", \ +"piece", \ +"told", \ +"knew", \ +"pass", \ +"since", \ +"top", \ +"whole", \ +"king", \ +"space", \ +"heard", \ +"best", \ +"hour", \ +"better", \ +"true", \ +"during", \ +"hundred", \ +"five", \ +"remember", \ +"step", \ +"early", \ +"hold", \ +"west", \ +"ground", \ +"interest", \ +"reach", \ +"fast", \ +"verb", \ +"sing", \ +"listen", \ +"six", \ +"table", \ +"travel", \ +"less", \ +"morning", \ +"ten", \ +"simple", \ +"several", \ +"vowel", \ +"toward", \ +"war", \ +"lay", \ +"against", \ +"pattern", \ +"slow", \ +"center", \ +"love", \ +"person", \ +"money", \ +"serve", \ +"appear", \ +"road", \ +"map", \ +"rain", \ +"rule", \ +"govern", \ +"pull", \ +"cold", \ +"notice", \ +"voice", \ +"unit", \ +"power", \ +"town", \ +"fine", \ +"certain", \ +"fly", \ +"fall", \ +"lead", \ +"cry", \ +"dark", \ +"machine", \ +"note", \ +"wait", \ +"plan", \ +"figure", \ +"star", \ +"box", \ +"noun", \ +"field", \ +"rest", \ +"correct", \ +"able", \ +"pound", \ +"done", \ +"beauty", \ +"drive", \ +"stood", \ +"contain", \ +"front", \ +"teach", \ +"week", \ +"final", \ +"gave", \ +"green", \ +"oh", \ +"quick", \ +"develop", \ +"ocean", \ +"warm", \ +"free", \ +"minute", \ +"strong", \ +"special", \ +"mind", \ +"behind", \ +"clear", \ +"tail", \ +"produce", \ +"fact", \ +"street", \ +"inch", \ +"multiply", \ +"nothing", \ +"course", \ +"stay", \ +"wheel", \ +"full", \ +"force", \ +"blue", \ +"object", \ +"decide", \ +"surface", \ +"deep", \ +"moon", \ +"island", \ +"foot", \ +"system", \ +"busy", \ +"test", \ +"record", \ +"boat", \ +"common", \ +"gold", \ +"possible", \ +"plane", \ +"stead", \ +"dry", \ +"wonder", \ +"laugh", \ +"thousand", \ +"ago", \ +"ran", \ +"check", \ +"game", \ +"shape", \ +"equate", \ +"hot", \ +"miss", \ +"brought", \ +"heat", \ +"snow", \ +"tire", \ +"bring", \ +"yes", \ +"distant", \ +"fill", \ +"east", \ +"paint", \ +"language", \ +"among", \ +"grand", \ +"ball", \ +"yet", \ +"wave", \ +"drop", \ +"heart", \ +"am", \ +"present", \ +"heavy", \ +"dance", \ +"engine", \ +"position", \ +"arm", \ +"wide", \ +"sail", \ +"material", \ +"size", \ +"vary", \ +"settle", \ +"speak", \ +"weight", \ +"general", \ +"ice", \ +"matter", \ +"circle", \ +"pair", \ +"include", \ +"divide", \ +"syllable", \ +"felt", \ +"perhaps", \ +"pick", \ +"sudden", \ +"count", \ +"square", \ +"reason", \ +"length", \ +"represent", \ +"art", \ +"subject", \ +"region", \ +"energy", \ +"hunt", \ +"probable", \ +"bed", \ +"brother", \ +"egg", \ +"ride", \ +"cell", \ +"believe", \ +"fraction", \ +"forest", \ +"sit", \ +"race", \ +"window", \ +"store", \ +"summer", \ +"train", \ +"sleep", \ +"prove", \ +"lone", \ +"leg", \ +"exercise", \ +"wall", \ +"catch", \ +"mount", \ +"wish", \ +"sky", \ +"board", \ +"joy", \ +"winter", \ +"sat", \ +"written", \ +"wild", \ +"instrument", \ +"kept", \ +"glass", \ +"grass", \ +"cow", \ +"job", \ +"edge", \ +"sign", \ +"visit", \ +"past", \ +"soft", \ +"fun", \ +"bright", \ +"gas", \ +"weather", \ +"month", \ +"million", \ +"bear", \ +"finish", \ +"happy", \ +"hope", \ +"flower", \ +"clothe", \ +"strange", \ +"gone", \ +"jump", \ +"baby", \ +"eight", \ +"village", \ +"meet", \ +"root", \ +"buy", \ +"raise", \ +"solve", \ +"metal", \ +"whether", \ +"push", \ +"seven", \ +"paragraph", \ +"third", \ +"shall", \ +"held", \ +"hair", \ +"describe", \ +"cook", \ +"floor", \ +"either", \ +"result", \ +"burn", \ +"hill", \ +"safe", \ +"cat", \ +"century", \ +"consider", \ +"type", \ +"law", \ +"bit", \ +"coast", \ +"copy", \ +"phrase", \ +"silent", \ +"tall", \ +"sand", \ +"soil", \ +"roll", \ +"temperature", \ +"finger", \ +"industry", \ +"value", \ +"fight", \ +"lie", \ +"beat", \ +"excite", \ +"natural", \ +"view", \ +"sense", \ +"ear", \ +"else", \ +"quite", \ +"broke", \ +"case", \ +"middle", \ +"kill", \ +"son", \ +"lake", \ +"moment", \ +"scale", \ +"loud", \ +"spring", \ +"observe", \ +"child", \ +"straight", \ +"consonant", \ +"nation", \ +"dictionary", \ +"milk", \ +"speed", \ +"method", \ +"organ", \ +"pay", \ +"age", \ +"section", \ +"dress", \ +"cloud", \ +"surprise", \ +"quiet", \ +"stone", \ +"tiny", \ +"climb", \ +"cool", \ +"design", \ +"poor", \ +"lot", \ +"experiment", \ +"bottom", \ +"key", \ +"iron", \ +"single", \ +"stick", \ +"flat", \ +"twenty", \ +"skin", \ +"smile", \ +"crease", \ +"hole", \ +"trade", \ +"melody", \ +"trip", \ +"office", \ +"receive", \ +"row", \ +"mouth", \ +"exact", \ +"symbol", \ +"die", \ +"least", \ +"trouble", \ +"shout", \ +"except", \ +"wrote", \ +"seed", \ +"tone", \ +"join", \ +"suggest", \ +"clean", \ +"break", \ +"lady", \ +"yard", \ +"rise", \ +"bad", \ +"blow", \ +"oil", \ +"blood", \ +"touch", \ +"grew", \ +"cent", \ +"mix", \ +"team", \ +"wire", \ +"cost", \ +"lost", \ +"brown", \ +"wear", \ +"garden", \ +"equal", \ +"sent", \ +"choose", \ +"fell", \ +"fit", \ +"flow", \ +"fair", \ +"bank", \ +"collect", \ +"save", \ +"control", \ +"decimal", \ +"gentle", \ +"woman", \ +"captain", \ +"practice", \ +"separate", \ +"difficult", \ +"doctor", \ +"please", \ +"protect", \ +"noon", \ +"whose", \ +"locate", \ +"ring", \ +"character", \ +"insect", \ +"caught", \ +"period", \ +"indicate", \ +"radio", \ +"spoke", \ +"atom", \ +"human", \ +"history", \ +"effect", \ +"electric", \ +"expect", \ +"crop", \ +"modern", \ +"element", \ +"hit", \ +"student", \ +"corner", \ +"party", \ +"supply", \ +"bone", \ +"rail", \ +"imagine", \ +"provide", \ +"agree", \ +"thus", \ +"capital", \ +"won't", \ +"chair", \ +"danger", \ +"fruit", \ +"rich", \ +"thick", \ +"soldier", \ +"process", \ +"operate", \ +"guess", \ +"necessary", \ +"sharp", \ +"wing", \ +"create", \ +"neighbor", \ +"wash", \ +"bat", \ +"rather", \ +"crowd", \ +"corn", \ +"compare", \ +"poem", \ +"string", \ +"bell", \ +"depend", \ +"meat", \ +"rub", \ +"tube", \ +"famous", \ +"dollar", \ +"stream", \ +"fear", \ +"sight", \ +"thin", \ +"triangle", \ +"planet", \ +"hurry", \ +"chief", \ +"colony", \ +"clock", \ +"mine", \ +"tie", \ +"enter", \ +"major", \ +"fresh", \ +"search", \ +"send", \ +"yellow", \ +"gun", \ +"allow", \ +"print", \ +"dead", \ +"spot", \ +"desert", \ +"suit", \ +"current", \ +"lift", \ +"rose", \ +"continue", \ +"block", \ +"chart", \ +"hat", \ +"sell", \ +"success", \ +"company", \ +"subtract", \ +"event", \ +"particular", \ +"deal", \ +"swim", \ +"term", \ +"opposite", \ +"wife", \ +"shoe", \ +"shoulder", \ +"spread", \ +"arrange", \ +"camp", \ +"invent", \ +"cotton", \ +"born", \ +"determine", \ +"quart", \ +"nine", \ +"truck", \ +"noise", \ +"level", \ +"chance", \ +"gather", \ +"shop", \ +"stretch", \ +"throw", \ +"shine", \ +"property", \ +"column", \ +"molecule", \ +"select", \ +"wrong", \ +"gray", \ +"repeat", \ +"require", \ +"broad", \ +"prepare", \ +"salt", \ +"nose", \ +"plural", \ +"anger", \ +"claim", \ +"continent", \ +"oxygen", \ +"sugar", \ +"death", \ +"pretty", \ +"skill", \ +"women", \ +"season", \ +"solution", \ +"magnet", \ +"silver", \ +"thank", \ +"branch", \ +"match", \ +"suffix", \ +"especially", \ +"fig", \ +"afraid", \ +"huge", \ +"sister", \ +"steel", \ +"discuss", \ +"forward", \ +"similar", \ +"guide", \ +"experience", \ +"score", \ +"apple", \ +"bought", \ +"led", \ +"pitch", \ +"coat", \ +"mass", \ +"card", \ +"band", \ +"rope", \ +"slip", \ +"win", \ +"dream", \ +"evening", \ +"condition", \ +"feed", \ +"tool", \ +"total", \ +"basic", \ +"smell", \ +"valley", \ +"nor", \ +"double", \ +"seat", \ +"arrive", \ +"master", \ +"track", \ +"parent", \ +"shore", \ +"division", \ +"sheet", \ +"substance", \ +"favor", \ +"connect", \ +"post", \ +"spend", \ +"chord", \ +"fat", \ +"glad", \ +"original", \ +"share", \ +"station", \ +"dad", \ +"bread", \ +"charge", \ +"proper", \ +"bar", \ +"offer", \ +"segment", \ +"slave", \ +"duck", \ +"instant", \ +"market", \ +"degree", \ +"populate", \ +"chick", \ +"dear", \ +"enemy", \ +"reply", \ +"drink", \ +"occur", \ +"support", \ +"speech", \ +"nature", \ +"range", \ +"steam", \ +"motion", \ +"path", \ +"liquid", \ +"log", \ +"meant", \ +"quotient", \ +"teeth", \ +"shell", \ +"neck" \ +}; diff --git a/users/ridingqwerty/process_records.c b/users/ridingqwerty/process_records.c index be72883ecb66..b0b0b48a2238 100644 --- a/users/ridingqwerty/process_records.c +++ b/users/ridingqwerty/process_records.c @@ -1,4 +1,7 @@ +#include +#include #include "ridingqwerty.h" +#include "dict.h" __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { @@ -10,23 +13,475 @@ bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } -uint16_t user_key_timer; +/* +typedef union { + struct { + uint8_t aesthetic : 1, + spongebob : 1, + uppercase : 1, + australia : 1, + unusued : 4; + }; + uint8_t all; +} mode_config_t; +*/ +mode_config_t mode = {.all = 0U}; + +bool randword_seed = false; +uint8_t user_mod_state; +uint16_t rand_key; +uint16_t temp_keycode; +uint32_t user_key_timer; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + + temp_keycode = keycode; + if ((mode.all != 0U) && ((keycode != DB(TAB) || keycode != ED(ESC)) && ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)))) { + temp_keycode &= 0xFF; + } + + if (mode.spongebob) { + switch(temp_keycode) { + case KC_A ... KC_Z: + if (record->event.pressed) { + (mode.uppercase ^= 1) == 0 ? tap_code16(S(temp_keycode)) : tap_code(temp_keycode); + } + return false; + } + } + + if (mode.aesthetic) { + switch(temp_keycode) { +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + case KC_A: + if (record->event.pressed) { + send_unicode_hex_string("039B"); + tap_code(KC_SPC); + } + return false; + case KC_E: + if (record->event.pressed) { + send_unicode_hex_string("039E"); + tap_code(KC_SPC); + } + return false; +#else + case A: + case E: + if (record->event.pressed) { + tap_code16(S(temp_keycode)); + tap_code(KC_SPC); + } + return false; +#endif + case KC_B ... KC_D: + case KC_F ... KC_Z: + if (record->event.pressed) { + tap_code16(S(temp_keycode)); + tap_code(KC_SPC); + } + return false; + case KC_1 ... KC_0: + if (record->event.pressed) { + tap_code(temp_keycode); + tap_code(KC_SPC); + } + return false; + + case KC_BSPC: + if (record->event.pressed) { + tap_code(KC_BSPC); + tap_code(KC_BSPC); + } + return false; + case KC_SPC: + if (record->event.pressed) { + tap_code(KC_SPC); + tap_code(KC_SPC); + tap_code(KC_SPC); + } + return false; + } + } + + if (mode.australia) { + switch(temp_keycode) { + // IDEMPOTENT + case KC_L: + case KC_O: + case KC_S: + case KC_Z: + case KC_8: + case KC_0: + if (record->event.pressed) { + tap_code(temp_keycode); + tap_code(KC_LEFT); + } + return false; + + // INVERSE + case KC_B: + if (record->event.pressed) { + tap_code(KC_Q); + tap_code(KC_LEFT); + } + return false; + case KC_Q: + if (record->event.pressed) { + tap_code(KC_B); + tap_code(KC_LEFT); + } + return false; + case KC_D: + if (record->event.pressed) { + tap_code(KC_P); + tap_code(KC_LEFT); + } + return false; + case KC_P: + if (record->event.pressed) { + tap_code(KC_D); + tap_code(KC_LEFT); + } + return false; + case KC_N: + if (record->event.pressed) { + tap_code(KC_U); + tap_code(KC_LEFT); + } + return false; + case KC_U: + if (record->event.pressed) { + tap_code(KC_N); + tap_code(KC_LEFT); + } + return false; + case KC_6: + if (record->event.pressed) { + tap_code(KC_9); + tap_code(KC_LEFT); + } + return false; + case KC_9: + if (record->event.pressed) { + tap_code(KC_6); + tap_code(KC_LEFT); + } + return false; + + // TRANSLATE + case KC_A: + if (record->event.pressed) { + send_unicode_hex_string("0250"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_C: + if (record->event.pressed) { + send_unicode_hex_string("0254"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_E: + if (record->event.pressed) { + send_unicode_hex_string("01DD"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_F: + if (record->event.pressed) { + send_unicode_hex_string("025F"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_G: + if (record->event.pressed) { + send_unicode_hex_string("0183"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_H: + if (record->event.pressed) { + send_unicode_hex_string("0265"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_I: + if (record->event.pressed) { + send_unicode_hex_string("1D09"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_J: + if (record->event.pressed) { + send_unicode_hex_string("027E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_K: + if (record->event.pressed) { + send_unicode_hex_string("029E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_M: + if (record->event.pressed) { + send_unicode_hex_string("026F"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_R: + if (record->event.pressed) { + send_unicode_hex_string("0279"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_T: + if (record->event.pressed) { + send_unicode_hex_string("0287"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_V: + if (record->event.pressed) { + send_unicode_hex_string("028C"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_W: + if (record->event.pressed) { + send_unicode_hex_string("028D"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_X: + if (record->event.pressed) { + send_unicode_hex_string("2717"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_Y: + if (record->event.pressed) { + send_unicode_hex_string("028E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_1: + if (record->event.pressed) { + send_unicode_hex_string("0269"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_2: + if (record->event.pressed) { + send_unicode_hex_string("3139"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_3: + if (record->event.pressed) { + send_unicode_hex_string("0190"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_4: + if (record->event.pressed) { + send_unicode_hex_string("3123"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_5: + if (record->event.pressed) { + send_unicode_hex_string("03DB"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_7: + if (record->event.pressed) { + send_unicode_hex_string("3125"); + tap_code(KC_LEFT); + } + return false; + + // CONTROLS + case KC_ENT: + if (record->event.pressed) { + tap_code(KC_END); + tap_code(KC_ENTER); + } + return false; + case KC_BSPC: + if (record->event.pressed) { + tap_code(KC_DELT); + } + return false; + case KC_SPC: + if (record->event.pressed) { + tap_code(KC_SPC); + tap_code(KC_LEFT); + } + return false; + } + } + switch(keycode) { + + case VERSION: + if (!record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD ":" QMK_KEYMAP "\nVersion:" QMK_VERSION ", built: " QMK_BUILDDATE "\n"), MACRO_TIMER); + } + break; + + case QWERTY ... COLEMAK: +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + case GREEK ... HIRAGAN: +#endif + if (record->event.pressed) { + //set_single_persistent_default_layer(keycode - QWERTY); + default_layer_set(1U << (keycode - QWERTY)); + } + break; + + case MAKE: + if (record->event.pressed) { + user_mod_state = get_mods() & MOD_MASK_CTRL; + if (user_mod_state) { + clear_mods(); + send_string_with_delay_P(PSTR("sleep 1 && "), MACRO_TIMER); + } + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); + if (user_mod_state) { + send_string_with_delay_P(PSTR(":flash\n"), MACRO_TIMER); + reset_keyboard(); + } else { + send_string_with_delay_P(PSTR("\n"), MACRO_TIMER); + } + } + break; + + case RNGWORD: + if (randword_seed == false) { + randword_seed = true; + srand(timer_read32()); + } + rand_key = rand() % NUMBER_OF_WORDS; + if (record->event.pressed) { + send_string(dict[rand_key]); + tap_code(KC_SPC); + } + break; + case RG_QUOT: if (record->event.pressed) { - user_key_timer = timer_read(); +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + user_mod_state = get_mods() & MOD_MASK_ALT; + if (user_mod_state) { + unregister_mods(MOD_BIT(KC_RALT)); + send_unicode_hex_string("00B0"); + set_mods(user_mod_state); + return false; + } +#endif + user_key_timer = timer_read32(); layer_on(_NUMBER); register_mods(MOD_BIT(KC_RGUI)); } else { unregister_mods(MOD_BIT(KC_RGUI)); layer_off(_NUMBER); - if (timer_elapsed(user_key_timer) < TAPPING_TERM) { - register_code(KC_QUOT); - unregister_code(KC_QUOT); - } + if (timer_elapsed32(user_key_timer) < TAPPING_TERM) { + tap_code(KC_QUOT); + } } return false; break; + + case TESTING: + /* + if (record->event.pressed) { + int length = snprintf( NULL, 0, "%lu", test_number ); + char* str = malloc( length + 1 ); + snprintf( str, length + 1, "%lu", test_number ); + send_string(str); + free(str); + // make CFLAGS+="-lc -specs=nosys.specs" board:keymap + } + */ + break; + + case CCCV: // One key copy/paste + if (record->event.pressed) { + user_key_timer = timer_read32(); + } else { + if (timer_elapsed32(user_key_timer) > TAPPING_TERM) { // Hold, copy + register_code(KC_LCTL); + tap_code(KC_C); + unregister_code(KC_LCTL); + } else { // Tap, paste + register_code(KC_LCTL); + tap_code(KC_V); + unregister_code(KC_LCTL); + } + } + break; + + case SEED: + if (record->event.pressed) { + srand(timer_read32()); + } + break; + + case SARCASM: + if (record->event.pressed) { + if (!(mode.spongebob ^= 1)) { mode.all = 0U; }; + } + break; + + case VPRWAVE: + if (record->event.pressed) { + if (!(mode.aesthetic ^= 1)) { mode.all = 0U; }; + } + break; + + case STRAYA: + if (record->event.pressed) { + if (!(mode.australia ^= 1)) { mode.all = 0U; }; + } + break; + default: + if (record->event.pressed && record->event.key.col == 4 && record->event.key.row == 1) { + if (get_mods() & MOD_BIT(KC_RALT)) { + unregister_mods(MOD_BIT(KC_RALT)); + //send_unicode_hex_string("262D"); + tap_code(KC_BSPC); + set_mods(MOD_BIT(KC_RALT)); + return false; + } + } + break; + } return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); diff --git a/users/ridingqwerty/process_records.h b/users/ridingqwerty/process_records.h index 2c453bcd93de..47c5f6790321 100644 --- a/users/ridingqwerty/process_records.h +++ b/users/ridingqwerty/process_records.h @@ -11,19 +11,48 @@ bool process_record_secrets(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); enum userspace_custom_keycodes { - FIRST = PLACEHOLDER_SAFE_RANGE, - RUSTY, - FUEL, - C0RE, - MUNKY, - AR1ST, - VAXIS, - OS_LAB, - CDLOCAL, - SYSNOC, + VERSION = PLACEHOLDER_SAFE_RANGE, + QWERTY, + DVORAK, + COLEMAK, +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + GREEK, + RUSSIAN, + RUNES, + HIRAGAN, +#endif + MAKE, RG_QUOT, - LAST + TESTING, + RNGWORD, + CCCV, + SEED, + SARCASM, + VPRWAVE, + STRAYA, + SECRET0, + SECRET1, + SECRET2, + SECRET3, + SECRET4, + SECRET5, + SECRET6, + SECRET7, + SECRET8, + NEW_SAFE_RANGE // start new keyboard-level declarations with NEW_SAFE_RANGE }; -bool process_record_secrets(uint16_t keycode, keyrecord_t *record); -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +// clang-format off +typedef union { + struct { + uint8_t aesthetic : 1, + spongebob : 1, + uppercase : 1, + australia : 1, + unusued : 4; + }; + uint8_t all; +} mode_config_t; +// clang-format on + +extern mode_config_t mode; diff --git a/users/ridingqwerty/ridingqwerty.c b/users/ridingqwerty/ridingqwerty.c index fd39021da538..ee6e7e897a83 100644 --- a/users/ridingqwerty/ridingqwerty.c +++ b/users/ridingqwerty/ridingqwerty.c @@ -1 +1,65 @@ #include "ridingqwerty.h" + +__attribute__((weak)) +void matrix_init_keymap(void) {} + +void matrix_init_user(void) { + matrix_init_keymap(); + +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + set_unicode_input_mode(UC_LNX); +#endif + + //set_single_persistent_default_layer(_QWERTY); + default_layer_set(1U << _QWERTY); +} + +__attribute__((weak)) +void matrix_scan_keymap(void) { +} + +void matrix_scan_user(void) { + // use for global event timers +} + +__attribute__((weak)) +void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { +#if defined(CONSOLE_ENABLE) + debug_enable = true; + debug_matrix = true; + //debug_keyboard=true; + //debug_mouse=true; +#endif +} + +__attribute__((weak)) +layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _EDITOR, _DEBUG, _SECRET); +#ifdef CONSOLE_ENABLE + uprintf("LAYER: %u\n", state); +#endif + return state; +} + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case RC(ENT): + case ED(ESC): + return 225; + default: + return TAPPING_TERM; + } +}; + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case NM(SCLN): + return true; + default: + return false; + } +} diff --git a/users/ridingqwerty/ridingqwerty.h b/users/ridingqwerty/ridingqwerty.h index ae5262567c8e..6bd4aa5700e9 100644 --- a/users/ridingqwerty/ridingqwerty.h +++ b/users/ridingqwerty/ridingqwerty.h @@ -1,37 +1,61 @@ #pragma once #include "quantum.h" +#include "version.h" #include "process_records.h" +#include "wrappers.h" +#ifdef TAP_DANCE_ENABLE +# include "tapdances.h" +#endif +#if defined(UNICODEMAP_ENABLE) || defined(UNICODE_ENABLE) +# include "unicode.h" +#endif enum userspace_layers { - _QWERTY = 0, + _QWERTY, + _DVORAK, + _COLEMAK, +/* + _WORKMAN et al. go here +*/ +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + _GREEK, + _RUSSIAN, + _RUNES, + _HIRA1, + _HIRA2, +#endif _EDITOR, _NUMBER, _SYMBOL, _F_KEYS, _DEBUG, _SECRET, +#if defined(MOUSEKEY_ENABLED) + _MOUSE, +#endif + _MEDIA, _FINAL }; -// modtaps -#define LS_Z MT(MOD_LSFT, KC_Z) -#define LC_ESC MT(MOD_LCTL, KC_ESC) -#define LG_TAB MT(MOD_LGUI, KC_TAB) -#define LA_LBRC MT(MOD_LALT, KC_LBRC) -#define LS_RBRC MT(MOD_LSFT, KC_RBRC) -#define RS_MINS MT(MOD_RSFT, KC_MINS) -#define RA_EQL MT(MOD_RALT, KC_EQL) -//RG_LMOT defined in process_records.h -#define RC_ENT MT(MOD_RCTL, KC_ENT) -#define RS_SLSH MT(MOD_RSFT, KC_SLSH) -// layertaps -#define ED_A LT(_EDITOR, KC_A) -#define ED_ESC LT(_EDITOR, KC_ESC) -#define NM_SCLN LT(_NUMBER, KC_SCLN) -#define NM_BSPC LT(_NUMBER, KC_BSPC) -#define SM_SPC LT(_SYMBOL, KC_SPC) -#define SC_TAB LT(_SECRET, KC_TAB) -#define FK_DOT LT(_F_KEYS, KC_DOT) +#define LS(kc) MT(MOD_LSFT, KC_##kc) +#define LC(kc) MT(MOD_LCTL, KC_##kc) +#define LG(kc) MT(MOD_LGUI, KC_##kc) +#define LA(kc) MT(MOD_LALT, KC_##kc) +#define RS(kc) MT(MOD_RSFT, KC_##kc) +#define RC(kc) MT(MOD_RCTL, KC_##kc) +#define RG(kc) MT(MOD_RGUI, KC_##kc) +#define RA(kc) MT(MOD_RALT, KC_##kc) +#define ED(kc) LT(_EDITOR, KC_##kc) +#define NM(kc) LT(_NUMBER, KC_##kc) +#define SM(kc) LT(_SYMBOL, KC_##kc) +#define SC(kc) LT(_SECRET, KC_##kc) +#define FK(kc) LT(_F_KEYS, KC_##kc) +#define DB(kc) LT(_DEBUG, KC_##kc) + +void matrix_init_keymap(void); +void matrix_scan_keymap(void); +void keyboard_post_init_keymap(void); +layer_state_t layer_state_set_keymap(layer_state_t state); diff --git a/users/ridingqwerty/rules.mk b/users/ridingqwerty/rules.mk index 9c3846744806..153e5ff90530 100644 --- a/users/ridingqwerty/rules.mk +++ b/users/ridingqwerty/rules.mk @@ -1,8 +1,24 @@ -#LEADER_ENABLE = yes - SRC += ridingqwerty.c \ process_records.c +BOOTMAGIC_ENABLE = lite +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +UNICODE_ENABLE = no # "yes" in Atreus default keymap, blocking UNICODEMAP_ENABLE +UNICODEMAP_ENABLE = yes +MOUSEKEY_ENABLE = no +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = no + ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") SRC += secrets.c endif + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tapdances.c +endif + +ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) + SRC += unicode.c +endif + diff --git a/users/ridingqwerty/tapdances.c b/users/ridingqwerty/tapdances.c new file mode 100644 index 000000000000..644166cb45bd --- /dev/null +++ b/users/ridingqwerty/tapdances.c @@ -0,0 +1,33 @@ +#include "ridingqwerty.h" +#include "tapdances.h" + +void braces_finished (qk_tap_dance_state_t *state, void *user_data) { + if ((state->count == 1) || (state->count == 3)) { + register_code(KC_LSFT); + } +} + +void braces_reset (qk_tap_dance_state_t *state, void *user_data) { + // two or three taps for "[]"/"{}" + if ((state->count == 2) || (state->count == 3)) { + tap_code(KC_LBRC); + tap_code(KC_RBRC); + } + // one tap for "()" + else if (state->count == 1) { + tap_code(KC_9); + tap_code(KC_0); + } + + // unregister the shift unconditionally + unregister_code(KC_LSFT); + + // move back one space, inside the braces + if (state->count <= 3) { + tap_code(KC_LEFT); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BRACES] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, braces_finished, braces_reset) +}; diff --git a/users/ridingqwerty/tapdances.h b/users/ridingqwerty/tapdances.h new file mode 100644 index 000000000000..6eba0e2cbcbc --- /dev/null +++ b/users/ridingqwerty/tapdances.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#define TD_BRC TD(TD_BRACES) + +enum tapdance_id { + TD_BRACES = 0 +}; diff --git a/users/ridingqwerty/unicode.c b/users/ridingqwerty/unicode.c new file mode 100644 index 000000000000..8ef5aaa1ec35 --- /dev/null +++ b/users/ridingqwerty/unicode.c @@ -0,0 +1,7 @@ +#include "unicode.h" + +#ifdef UNICODEMAP_ENABLE +const uint32_t PROGMEM unicode_map[] = { + FOREACH_UNICODE(UCM_ENTRY) +}; +#endif diff --git a/users/ridingqwerty/unicode.h b/users/ridingqwerty/unicode.h new file mode 100644 index 000000000000..8b403272aef3 --- /dev/null +++ b/users/ridingqwerty/unicode.h @@ -0,0 +1,295 @@ +#pragma once +#include "quantum.h" + +// clang-format off +#define FOREACH_UNICODE(M) \ + M(UALP, 0x0391) /* Α */ \ + M(UBET, 0x0392) /* Β */ \ + M(UGAM, 0x0393) /* Γ */ \ + M(UDEL, 0x0394) /* Δ */ \ + M(UEPS, 0x0395) /* Ε */ \ + M(UZET, 0x0396) /* Ζ */ \ + M(UETA, 0x0397) /* Η */ \ + M(UTHE, 0x0398) /* Θ */ \ + M(UIOT, 0x0399) /* Ι */ \ + M(UKAP, 0x039A) /* Κ */ \ + M(ULAM, 0x039B) /* Λ */ \ + M(UMU, 0x039C) /* M */ \ + M(UNU, 0x039D) /* Ν */ \ + M(UXI, 0x039E) /* Ξ */ \ + M(UOMI, 0x039F) /* Ο */ \ + M(UPI, 0x03A0) /* Π */ \ + M(URHO, 0x03A1) /* Ρ */ \ + M(USIG, 0x03A3) /* Σ */ \ + M(UTAU, 0x03A4) /* Τ */ \ + M(UUPS, 0x03A5) /* Υ */ \ + M(UPHI, 0x03A6) /* Φ */ \ + M(UCHI, 0x03A7) /* Χ */ \ + M(UPSI, 0x03A8) /* Ψ */ \ + M(UOME, 0x03A9) /* Ω */ \ + M(LALP, 0x03B1) /* α */ \ + M(LBET, 0x03B2) /* β */ \ + M(LGAM, 0x03B3) /* γ */ \ + M(LDEL, 0x03B4) /* δ */ \ + M(LEPS, 0x03B5) /* ε */ \ + M(LZET, 0x03B6) /* ζ */ \ + M(LETA, 0x03B7) /* η */ \ + M(LTHE, 0x03B8) /* θ */ \ + M(LIOT, 0x03B9) /* ι */ \ + M(LKAP, 0x03BA) /* κ */ \ + M(LLAM, 0x03BB) /* λ */ \ + M(LMU, 0x03BC) /* μ */ \ + M(LNU, 0x03BD) /* ν */ \ + M(LXI, 0x03BE) /* ξ */ \ + M(LOMI, 0x03BF) /* ο */ \ + M(LPI, 0x03C0) /* π */ \ + M(LRHO, 0x03C1) /* ρ */ \ + M(LSIG, 0x03C3) /* σ */ \ + M(LTAU, 0x03C4) /* τ */ \ + M(LUPS, 0x03C5) /* υ */ \ + M(LPHI, 0x03C6) /* φ */ \ + M(LCHI, 0x03C7) /* χ */ \ + M(LPSI, 0x03C8) /* ψ */ \ + M(LOME, 0x03C9) /* ω */ \ + M(UAH, 0x0410) /* А */ \ + M(UBE, 0x0411) /* Б */ \ + M(UVE, 0x0412) /* В */ \ + M(UGHE, 0x0413) /* Г */ \ + M(UDE, 0x0414) /* Д */ \ + M(UIE, 0x0415) /* Е */ \ + M(UIO, 0x0401) /* Ё */ \ + M(UZHE, 0x0416) /* Ж */ \ + M(UZE, 0x0417) /* З */ \ + M(UIH, 0x0418) /* И */ \ + M(USIH, 0x0419) /* Й */ \ + M(UKA, 0x041A) /* К */ \ + M(UEL, 0x041B) /* Л */ \ + M(UEM, 0x041C) /* М */ \ + M(UEN, 0x041D) /* Н */ \ + M(UOH, 0x041E) /* О */ \ + M(UPE, 0x041F) /* П */ \ + M(UER, 0x0420) /* Р */ \ + M(UES, 0x0421) /* С */ \ + M(UTE, 0x0422) /* Т */ \ + M(UUU, 0x0423) /* У */ \ + M(UEF, 0x0424) /* Ф */ \ + M(UHA, 0x0425) /* Х */ \ + M(UTSE, 0x0426) /* Ц */ \ + M(UCHE, 0x0427) /* Ч */ \ + M(USHA, 0x0428) /* Ш */ \ + M(USCHA, 0x0429) /* Щ */ \ + M(UHARD, 0x042A) /* Ъ */ \ + M(UYERU, 0x042B) /* Ы */ \ + M(USOFT, 0x042C) /* Ь */ \ + M(UEH, 0x042D) /* Э */ \ + M(UYU, 0x042E) /* Ю */ \ + M(UYA, 0x042F) /* Я */ \ + M(LAH, 0x0430) /* а */ \ + M(LBE, 0x0431) /* б */ \ + M(LVE, 0x0432) /* в */ \ + M(LGHE, 0x0433) /* г */ \ + M(LDE, 0x0434) /* д */ \ + M(LIE, 0x0435) /* е */ \ + M(LIO, 0x0451) /* ё */ \ + M(LZHE, 0x0436) /* ж */ \ + M(LZE, 0x0437) /* з */ \ + M(LIH, 0x0438) /* и */ \ + M(LSIH, 0x0439) /* й */ \ + M(LKA, 0x043A) /* к */ \ + M(LEL, 0x043B) /* л */ \ + M(LEM, 0x043C) /* м */ \ + M(LEN, 0x043D) /* н */ \ + M(LOH, 0x043E) /* о */ \ + M(LPE, 0x043F) /* п */ \ + M(LER, 0x0440) /* р */ \ + M(LES, 0x0441) /* с */ \ + M(LTE, 0x0442) /* т */ \ + M(LUU, 0x0443) /* у */ \ + M(LEF, 0x0444) /* ф */ \ + M(LHA, 0x0445) /* х */ \ + M(LTSE, 0x0446) /* ц */ \ + M(LCHE, 0x0447) /* ч */ \ + M(LSHA, 0x0448) /* ш */ \ + M(LSCHA, 0x0449) /* щ */ \ + M(LHARD, 0x044A) /* ъ */ \ + M(LYERU, 0x044B) /* ы */ \ + M(LSOFT, 0x044C) /* ь */ \ + M(LEH, 0x044D) /* э */ \ + M(LYU, 0x044E) /* ю */ \ + M(LYA, 0x044F) /* я */ \ + M(FE, 0x16A0) /* ᚠ */ \ + M(UR, 0x16A2) /* ᚢ */ \ + M(THURS, 0x16A6) /* ᚦ */ \ + M(ANSUZ, 0x16A8) /* ᚨ */ \ + M(RAIDO, 0x16B1) /* ᚱ */ \ + M(KAUNA, 0x16B2) /* ᚲ */ \ + M(GEBO, 0x16B7) /* ᚷ */ \ + M(WUNJO, 0x16B9) /* ᚹ */ \ + M(HAGLZ, 0x16BA) /* ᚺ */ \ + M(NAUDZ, 0x16BE) /* ᚾ */ \ + M(ISAZ, 0x16C1) /* ᛁ */ \ + M(JERAN, 0x16C3) /* ᛃ */ \ + M(IWAZ, 0x16C7) /* ᛇ */ \ + M(PERTH, 0x16C8) /* ᛈ */ \ + M(ALGIZ, 0x16C9) /* ᛉ */ \ + M(SOWIL, 0x16CA) /* ᛊ */ \ + M(TIWAZ, 0x16CF) /* ᛏ */ \ + M(BEORC, 0x16D2) /* ᛒ */ \ + M(EHWAZ, 0x16D6) /* ᛖ */ \ + M(MANNZ, 0x16D7) /* ᛗ */ \ + M(LAUKZ, 0x16DA) /* ᛚ */ \ + M(INGWZ, 0x16DC) /* ᛜ */ \ + M(DAGAZ, 0x16DE) /* ᛞ */ \ + M(ETHEL, 0x16DF) /* ᛟ */ \ + M(JRO, 0x308D) /* ろ */ \ + M(JWA, 0x308F) /* わ */ \ + M(JNU, 0x306C) /* ぬ */ \ + M(JHU, 0x3075) /* ふ */ \ + M(JA, 0x3042) /* あ */ \ + M(JU, 0x3046) /* う */ \ + M(JE, 0x3048) /* え */ \ + M(JO, 0x304A) /* お */ \ + M(JYA, 0x3084) /* や */ \ + M(JYU, 0x3086) /* ゆ */ \ + M(JYO, 0x3088) /* よ */ \ + M(JHO, 0x307B) /* ほ */ \ + M(JHE, 0x3078) /* へ */ \ + M(JMU, 0x3080) /* む */ \ + M(JTA, 0x305F) /* た */ \ + M(JTE, 0x3066) /* て */ \ + M(JI, 0x3044) /* い */ \ + M(JSU, 0x3059) /* す */ \ + M(JKA, 0x3095) /* ゕ */ \ + M(JN, 0x3093) /* ん */ \ + M(JNA, 0x306A) /* な */ \ + M(JNI, 0x306B) /* に */ \ + M(JRA, 0x3089) /* ら */ \ + M(JSE, 0x305B) /* せ */ \ + M(JVV, 0x309B) /* ゛*/ \ + M(JSV, 0x309C) /* ゜*/ \ + M(JTI, 0x3061) /* ち */ \ + M(JTO, 0x3068) /* と */ \ + M(JSI, 0x3057) /* し */ \ + M(JHA, 0x306F) /* は */ \ + M(JKI, 0x304D) /* き */ \ + M(JKU, 0x304F) /* く */ \ + M(JMA, 0x307E) /* ま */ \ + M(JNO, 0x306E) /* の */ \ + M(JRI, 0x308A) /* り */ \ + M(JRE, 0x308C) /* れ */ \ + M(JKE, 0x3051) /* け */ \ + M(JTU, 0x3064) /* つ */ \ + M(JSA, 0x3055) /* さ */ \ + M(JSO, 0x305D) /* そ */ \ + M(JHI, 0x3072) /* ひ */ \ + M(JKO, 0x3053) /* こ */ \ + M(JMI, 0x307F) /* み */ \ + M(JMO, 0x3082) /* も */ \ + M(JNE, 0x306D) /* ね */ \ + M(JRU, 0x308B) /* る */ \ + M(JME, 0x3081) /* め */ \ + M(ALEF, 0x05D0) /* א */ \ + M(BET, 0x05D1) /* ב */ \ + M(GIMEL, 0x05D2) /* ג */ \ + M(DALET, 0x05D3) /* ד */ \ + M(HE, 0x05D4) /* ה */ \ + M(VAV, 0x05D5) /* ו */ \ + M(ZAYIN, 0x05D6) /* ז */ \ + M(CHET, 0x05D7) /* ח */ \ + M(TET, 0x05D8) /* ט */ \ + M(YOD, 0x05D9) /* י */ \ + M(KAF, 0x05DB) /* כ */ \ + M(LAMED, 0x05DC) /* ל */ \ + M(MEM, 0x05DE) /* מ */ \ + M(NUN, 0x05E0) /* נ */ \ + M(SAMCH, 0x05E1) /* ס */ \ + M(AYIN, 0x05E2) /* ע */ \ + M(PE, 0x05E4) /* פ */ \ + M(TZADI, 0x05E6) /* צ */ \ + M(KOF, 0x05E7) /* ק */ \ + M(RESH, 0x05E8) /* ר */ \ + M(SHIN, 0x05E9) /* ש */ \ + M(TAV, 0x05EA) /* ת */ +// clang-format on + +#define UC_KEYCODE(name, code) name = UC(code), // LALP = UC(0x03B1), + +#define UCM_NAME(name, code) UCM_ ## name, // UCM_LALP, +#define UCM_ENTRY(name, code) [UCM_ ## name] = code, // [UCM_LALP] = 0x03B1, +#define UCM_KEYCODE(name, code) name = X(UCM_ ## name), // LALP = X(UCM_LALP) + +#if defined(UNICODE_ENABLE) +enum unicode_keycodes { + FOREACH_UNICODE(UC_KEYCODE) +}; +#elif defined(UNICODEMAP_ENABLE) +enum unicode_names { + FOREACH_UNICODE(UCM_NAME) +}; + +extern const uint32_t PROGMEM unicode_map[]; + +enum unicode_keycodes { + FOREACH_UNICODE(UCM_KEYCODE) +}; +#endif + + +#define ALPHA XP(LALP, UALP) +#define BETA XP(LBET, UBET) +#define GAMMA XP(LGAM, UGAM) +#define DELTA XP(LDEL, UDEL) +#define EPSLN XP(LEPS, UEPS) +#define ZETA XP(LZET, UZET) +#define ETA XP(LETA, UETA) +#define THETA XP(LTHE, UTHE) +#define IOTA XP(LIOT, UIOT) +#define KAPPA XP(LKAP, UKAP) +#define LAMBD XP(LLAM, ULAM) +#define GMU XP(LMU, UMU) +#define NU XP(LNU, UNU) +#define XI XP(LXI, UXI) +#define OMCRN XP(LOMI, UOMI) +#define PI XP(LPI, UPI) +#define RHO XP(LRHO, URHO) +#define SIGMA XP(LSIG, USIG) +#define TAU XP(LTAU, UTAU) +#define UPSLN XP(LUPS, UUPS) +#define PHI XP(LPHI, UPHI) +#define CHI XP(LCHI, UCHI) +#define PSI XP(LPSI, UPSI) +#define OMEGA XP(LOME, UOME) + +#define AH XP(LAH, UAH) +#define BE XP(LBE, UBE) +#define VE XP(LVE, UVE) +#define GHE XP(LGHE, UGHE) +#define DE XP(LDE, UDE) +#define IE XP(LIE, UIE) +#define IO XP(LIO, UIO) +#define ZHE XP(LZHE, UZHE) +#define ZE XP(LZE, UZE) +#define IH XP(LIH, UIH) +#define SIH XP(LSIH, USIH) +#define KA XP(LKA, UKA) +#define EL XP(LEL, UEL) +#define EM XP(LEM, UEM) +#define EN XP(LEN, UEN) +#define OH XP(LOH, UOH) +#define PE XP(LPE, UPE) +#define ER XP(LER, UER) +#define ES XP(LES, UES) +#define TE XP(LTE, UTE) +#define UU XP(LUU, UUU) +#define EF XP(LEF, UEF) +#define HA XP(LHA, UHA) +#define TSE XP(LTSE, UTSE) +#define CHE XP(LCHE, UCHE) +#define SHA XP(LSHA, USHA) +#define SCHA XP(LSCHA, USCHA) +#define HARD XP(LHARD, UHARD) +#define YERU XP(LYERU, UYERU) +#define SOFT XP(LSOFT, USOFT) +#define EH XP(LEH, UEH) +#define YU XP(LYU, UYU) +#define YA XP(LYA, UYA) diff --git a/users/ridingqwerty/wrappers.h b/users/ridingqwerty/wrappers.h new file mode 100644 index 000000000000..f78219a56c1a --- /dev/null +++ b/users/ridingqwerty/wrappers.h @@ -0,0 +1,156 @@ +#pragma once +#include "ridingqwerty.h" + +// clang-format off +#define LAYOUT_atreus_wrapper(...) LAYOUT_atreus(__VA_ARGS__) +#define LAYOUT_minorca_wrapper(...) LAYOUT_minorca(__VA_ARGS__) + +#define ___________VI_ARROWS______________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + +// 1......__2......__3......__4......__5...... 1......__2......__3......__4......__5...... +#define ________________QWERTY_L1__________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define ________________QWERTY_L2__________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define ________________QWERTY_L3__________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define ________________QWERTY_R1__________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define ________________QWERTY_R2__________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define ________________QWERTY_R3__________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + + +#define ________________ATREUS_L1__________________ ________________QWERTY_L1__________________ +#define ________________ATREUS_L2__________________ ED(A), KC_S, KC_D, KC_F, KC_G +#define ________________ATREUS_L3__________________ LS(Z), KC_X, KC_C, KC_V, KC_B + +#define ________________ATREUS_R1__________________ ________________QWERTY_R1__________________ +#define ________________ATREUS_R2__________________ KC_H, KC_J, KC_K, KC_L, NM(SCLN) +#define ________________ATREUS_R3__________________ KC_N, KC_M, KC_COMM, FK(DOT), RS(SLSH) + +#define ________________FNHOMEROW_L2_______________ C(KC_A), G(KC_S), A(KC_D), S(KC_F), KC_G +#define ________________FNHOMEROW_R2_______________ KC_H, S(KC_J), A(KC_K), G(KC_L), C(SCLN) + +#define ____THUMBS_R4___ ED(ESC), DB(TAB) +#define _____BLANK_R4___ _______, _______ +#define ________________ _______, _______ + + +#define ________________COLEMAK_L1_________________ KC_Q, KC_W, KC_F, KC_P, KC_G +#define ________________COLEMAK_L2_________________ ED(A), KC_R, KC_S, KC_T, KC_D +#define ________________COLEMAK_L3_________________ LS(Z), KC_X, KC_C, KC_V, KC_B + +#define ________________COLEMAK_R1_________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define ________________COLEMAK_R2_________________ KC_H, KC_N, KC_E, KC_I, NM(O) +#define ________________COLEMAK_R3_________________ KC_K, KC_M, KC_COMM, FK(DOT), RS(SLSH) + + +#define ________________DVORAK_L1__________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define ________________DVORAK_L2__________________ ED(A), KC_O, KC_E, KC_U, KC_I +#define ________________DVORAK_L3__________________ LS(SCLN),KC_Q, KC_J, KC_K, KC_X + +#define ________________DVORAK_R1__________________ KC_F, KC_G, KC_C, KC_R, KC_L +#define ________________DVORAK_R2__________________ KC_D, KC_H, KC_T, KC_N, NM(S) +#define ________________DVORAK_R3__________________ KC_B, KC_M, KC_W, FK(V), RS(Z) + +#define ________________BOTTOM_L4__________________ LC(ESC), LG(TAB), LA(LBRC), LS(RBRC), NM(BSPC) +#define ________________BOTTOM_R4__________________ SM(SPC), RS(MINS), RA(EQL), RG_QUOT, RC(ENT) + + +#define ________________NUMROW_L1__________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMROW_R1__________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define ________________NUMPAD_R1__________________ _______, KC_7, KC_8, KC_9, KC_0 +#define ________________NUMPAD_R2__________________ _______, KC_4, KC_5, KC_6, _______ +#define ________________NUMPAD_R3__________________ _______, KC_1, KC_2, KC_3, KC_BSLS +#define ________________NUMPAD_R4__________________ KC_0, KC_0, KC_DOT, KC_3, _______ + + +#define ________________SYMROW_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define ________________SYMROW_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN + + +#define ________________ _______, _______ +#define _________________________ _______, _______, _______ +#define __________________________________ _______, _______, _______, _______ +#define ___________________________________________ _______, _______, _______, _______, _______ +#define ___________________________________________ _______, _______, _______, _______, _______ +#define ___________________________________________ _______, _______, _______, _______, _______ +#define ________________BLANK______________________ ___________________________________________ +#define ________________BLOCK______________________ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ________________BLOCK______________________ + +#define ________________FKEYROW_L1_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ________________FKEYROW_R1_________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define ________________EDITOR_L1__________________ KC_GRV, _______, KC_END, _______, KC_F5 +#define ________________EDITOR_L2__________________ KC_HOME, _______, KC_DELT, _______, _______ +#if defined(TAP_DANCE_ENABLE) +#define ________________EDITOR_L3__________________ _______, KC_VOLD, KC_VOLU, CCCV, TD_BRC +#else +#define ________________EDITOR_L3__________________ _______, KC_VOLD, KC_VOLU, CCCV, _______ +#endif + +#define ________________EDITOR_R1__________________ _______, _______, KC_INS, _______, KC_PGUP +#define ________________EDITOR_R2__________________ ___________VI_ARROWS______________, _______ +#define ________________EDITOR_R3__________________ KC_PGDN, _______, _______, _______, KC_BSLS + + +#define ________________DEBUG_L1___________________ DEBUG, _______, _______, RNGWORD, SARCASM +#define ________________DEBUG_L2___________________ GREEK, RUSSIAN, HIRAGAN, RUNES, _______ +#define ________________DEBUG_L3___________________ _______, _______, _______, VERSION, _______ + +#define ________________DEBUG_R1___________________ VPRWAVE, STRAYA, _______, TESTING, _______ +#define ________________DEBUG_R2___________________ _______, _______, EEP_RST, RESET, MAKE +#define ________________DEBUG_R3___________________ QWERTY, DVORAK, COLEMAK, _______, _______ + + +#define ________________SECRET_L1__________________ _______, _______, _______, SECRET0, SECRET1 +#define ________________SECRET_L2__________________ SECRET4, SECRET8, _______, _______, _______ +#define ________________SECRET_L3__________________ SECRET7, _______, SECRET2, SECRET5, _______ + +#define ________________SECRET_R1__________________ _______, _______, _______, _______, _______ +#define ________________SECRET_R2__________________ _______, _______, _______, SECRET6, _______ +#define ________________SECRET_R3__________________ _______, SECRET3, _______, _______, _______ + + +#if defined(UNICODEMAP_ENABLE) +// Greek +#define ________________GREEK_L1___________________ THETA, OMEGA, EPSLN, RHO, TAU +#define ________________GREEK_L2___________________ ALPHA, SIGMA, DELTA, PHI, GAMMA +#define ________________GREEK_L3___________________ ZETA, XI, CHI, PHI, BETA +#define ________________GREEK_R1___________________ UPSLN, UPSLN, IOTA, OMCRN, PI +#define ________________GREEK_R2___________________ ETA, PSI, KAPPA, LAMBD, NM(SCLN) +#define ________________GREEK_R3___________________ NU, GMU, KC_COMM, FK(DOT), RS(SLSH) + +// Elder Futhark +#define ________________FTHRK_L1___________________ INGWZ, WUNJO, EHWAZ, RAIDO, TIWAZ +#define ________________FTHRK_L2___________________ ANSUZ, SOWIL, DAGAZ, FE, GEBO +#define ________________FTHRK_L3___________________ ALGIZ, THURS, KAUNA, WUNJO, BEORC +#define ________________FTHRK_R1___________________ IWAZ, UR, ISAZ, ETHEL, PERTH +#define ________________FTHRK_R2___________________ HAGLZ, JERAN, KAUNA, LAUKZ, KC_SCLN +#define ________________FTHRK_R3___________________ NAUDZ, MANNZ, KC_COMM, KC_DOT, KC_SLSH + +// Russian Cyrillic +#define ________________CYRLC_L1___________________ YA, SCHA, IE, ER, TE +#define ________________CYRLC_L2___________________ AH, ES, DE, EF, GHE +#define ________________CYRLC_L3___________________ ZE, HA, TSE, VE, BE +#define ________________CYRLC_R1___________________ YERU, UU, IH, OH, PE +#define ________________CYRLC_R2___________________ CHE, SIH, KA, EL, SOFT +#define ________________CYRLC_R3___________________ EN, EM, YU, SCHA, EH +#define ________________CYRLC_R4___________________ SM(SPC), IO, HARD, ZHE, RC(ENT) + +// Hiragana +#define ________________JIS1_R1____________________ JTA, JTE, JI, JSU, JKA +#define ________________JIS1_R2____________________ JTI, JTO, JSI, JHA, JKI +#define ________________JIS1_R3____________________ JMI, JMO, KC_COMM, KC_DOT, MO(_HIRA2) +#define ________________JIS1_L1____________________ JN, JNA, JNI, JRA, JSE +#define ________________JIS1_L2____________________ JKU, JMA, JNO, JRI, JRE +#define ________________JIS1_L3____________________ JTU, JSA, JSO, JHI, JKO + +#define ________________JIS2_R1____________________ JRO, JWA, JNU, JHU, JA +#define ________________JIS2_R2____________________ JYO, JHO, JHE, JMU, JVV +#define ________________JIS2_R3____________________ JRU, JME, KC_COMM, KC_DOT, _______ +#define ________________JIS2_L1____________________ JU, JE, JO, JYA, JYU +#define ________________JIS2_L2____________________ JSV, JKE, JMI, JMO, JNE +#define ________________JIS2_L3____________________ JTU, JSA, JSO, JHI, JKO + +#endif +// clang-format on From 8a749a7a8e0c47488b19bb92ac5b35bc60f66dd8 Mon Sep 17 00:00:00 2001 From: Jesse Leventhal <45154268+jessel92@users.noreply.github.com> Date: Tue, 4 Feb 2020 20:56:50 -0500 Subject: [PATCH 197/331] Encoder brush size (#8087) * Added brush size to encoder knob as new keymap * Encoder keymap added --- keyboards/ncc1701kb/info.json | 12 ++++- .../ncc1701kb/keymaps/brushsize/keymap.c | 51 +++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 keyboards/ncc1701kb/keymaps/brushsize/keymap.c diff --git a/keyboards/ncc1701kb/info.json b/keyboards/ncc1701kb/info.json index bc0f04db1686..d5a80ba0d197 100644 --- a/keyboards/ncc1701kb/info.json +++ b/keyboards/ncc1701kb/info.json @@ -6,7 +6,17 @@ "height": 3, "layouts": { "LAYOUT": { - "layout": [{"x":0, "y":0}, {"label":"Encoder", "x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}] + "layout": [ + {"x":0, "y":0}, + {"label":"Encoder", "x":1, "y":0}, + {"x":2, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2} + ] } } } diff --git a/keyboards/ncc1701kb/keymaps/brushsize/keymap.c b/keyboards/ncc1701kb/keymaps/brushsize/keymap.c new file mode 100644 index 000000000000..4150e7099753 --- /dev/null +++ b/keyboards/ncc1701kb/keymaps/brushsize/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* LAYER 0 + * ,-----------------------. + * | << | MUTE | >> | ENCODER - PRESS (MUTE) / KNOB (Brush size) + * |-------+-------+-------| + * | STOP | PLAY | MEDIA | + * |-------+-------+-------| + * | CALC | MAIL | PC/FN | + * `-----------------------' + */ +[0] = LAYOUT( + KC_MPRV, KC_MUTE, KC_MNXT, + KC_MSTP, KC_MPLY, KC_MSEL, + KC_CALC, KC_MAIL, LT(1, KC_MYCM) +), + +/* LAYER 1 + * ,-----------------------. + * |BL TOG | | BREATH| + * |-------+-------+-------| + * | BL + | BL - |BL CYCL| + * |-------+-------+-------| + * | BL ON | BL OFF| | + * `-----------------------' + */ +[1] = LAYOUT( + BL_TOGG, KC_TRNS, BL_BRTG, + BL_INC, BL_DEC, BL_STEP, + BL_ON, BL_OFF, KC_TRNS +) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_RBRC); + } else { + tap_code(KC_LBRC); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_RBRC); + } else { + tap_code(KC_LBRC); + } + } +} \ No newline at end of file From 0010d0c45e4aba8225249e230b3d23337e8378f4 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 4 Feb 2020 18:28:47 -0800 Subject: [PATCH 198/331] Add Midi Endpoint task to ChibiOS main (#8071) --- tmk_core/protocol/chibios/main.c | 6 ++++++ tmk_core/protocol/chibios/usb_main.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 4b66bc5224b6..a61ffad12d26 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -81,6 +81,9 @@ void raw_hid_task(void); #ifdef CONSOLE_ENABLE void console_task(void); #endif +#ifdef MIDI_ENABLE +void midi_ep_task(void); +#endif /* TESTING * Amber LED blinker thread, times are in milliseconds. @@ -214,6 +217,9 @@ int main(void) { #ifdef CONSOLE_ENABLE console_task(); #endif +#ifdef MIDI_ENABLE + midi_ep_task(); +#endif #ifdef VIRTSER_ENABLE virtser_task(); #endif diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index dd701f661e90..d5eeffcbe476 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -833,7 +833,17 @@ bool recv_midi_packet(MIDI_EventPacket_t *const event) { size_t size = chnReadTimeout(&drivers.midi_driver.driver, (uint8_t *)event, sizeof(MIDI_EventPacket_t), TIME_IMMEDIATE); return size == sizeof(MIDI_EventPacket_t); } - +void midi_ep_task(void) { + uint8_t buffer[MIDI_STREAM_EPSIZE]; + size_t size = 0; + do { + size_t size = chnReadTimeout(&drivers.midi_driver.driver, buffer, sizeof(buffer), TIME_IMMEDIATE); + if (size > 0) { + MIDI_EventPacket_t event; + recv_midi_packet(&event); + } + } while (size > 0); +} #endif #ifdef VIRTSER_ENABLE From 74e3cad72829f673b6398dc18257f9d05bdaa3fe Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 5 Feb 2020 13:30:57 +1100 Subject: [PATCH 199/331] Remove entries for Minidox eep files from gitignore (#8077) --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7b15615625c1..c2738311bdf7 100644 --- a/.gitignore +++ b/.gitignore @@ -63,9 +63,6 @@ util/Win_Check_Output.txt *.gif *.jpg -# Do not ignore MiniDox left/right hand eeprom files -!keyboards/minidox/*.eep - # things travis sees secrets.tar id_rsa_* From efe8bd8e9218f67a0845ccfa3eef7b074aebf7dc Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 5 Feb 2020 13:41:19 +1100 Subject: [PATCH 200/331] [Keyboard] LFKPad refactor (#8079) --- keyboards/lfkeyboards/lfkpad/config.h | 131 +++++++++++++++--- keyboards/lfkeyboards/lfkpad/info.json | 40 ++++-- .../lfkpad/keymaps/default/config.h | 3 - .../lfkpad/keymaps/default/keymap.c | 50 +++---- .../lfkpad/keymaps/default/readme.md | 2 +- keyboards/lfkeyboards/lfkpad/lfkpad.c | 92 ++++++------ keyboards/lfkeyboards/lfkpad/lfkpad.h | 22 +-- keyboards/lfkeyboards/lfkpad/readme.md | 31 ++--- keyboards/lfkeyboards/lfkpad/rules.mk | 43 +++--- 9 files changed, 242 insertions(+), 172 deletions(-) delete mode 100644 keyboards/lfkeyboards/lfkpad/keymaps/default/config.h diff --git a/keyboards/lfkeyboards/lfkpad/config.h b/keyboards/lfkeyboards/lfkpad/config.h index 1d8de837dae9..fb48297e5cdb 100644 --- a/keyboards/lfkeyboards/lfkpad/config.h +++ b/keyboards/lfkeyboards/lfkpad/config.h @@ -15,31 +15,56 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" +/* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER LFKeyboards #define PRODUCT LFKPad 21 -#define DESCRIPTION QMK keyboard firmware for LFKPad LFK_REV_STRING +#define DESCRIPTION QMK keyboard firmware for LFKPad -#define DIODE_DIRECTION COL2ROW +/* key matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 4 -#define MATRIX_ROW_PINS { D5, F4, F6, F7, C7, C6} -#define MATRIX_COL_PINS { F1, F0, D4, D6} -#define UNUSED_PINS { } -#define RGBLED_NUM 28 // Number of LEDs + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D5, F4, F6, F7, C7, C6 } +#define MATRIX_COL_PINS { F1, F0, D4, D6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 #define RGB_DI_PIN C7 // Have to set it to something to get the ws2812 code to compile -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 28 +# define RGBLIGHT_HUE_STEP 10 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 +# define RGBLIGHT_ANIMATIONS +#endif #define TAPPING_TERM 200 @@ -49,13 +74,16 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + /* * Force NKRO * @@ -89,6 +117,10 @@ along with this program. If not, see . * */ +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -98,8 +130,8 @@ along with this program. If not, see . //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH //#define MAGIC_KEY_DEBUG D //#define MAGIC_KEY_DEBUG_MATRIX X //#define MAGIC_KEY_DEBUG_KBD K @@ -107,9 +139,8 @@ along with this program. If not, see . //#define MAGIC_KEY_VERSION V //#define MAGIC_KEY_STATUS S //#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE //#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE //#define MAGIC_KEY_LAYER1 1 //#define MAGIC_KEY_LAYER2 2 //#define MAGIC_KEY_LAYER3 3 @@ -119,9 +150,11 @@ along with this program. If not, see . //#define MAGIC_KEY_LAYER7 7 //#define MAGIC_KEY_LAYER8 8 //#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC //#define MAGIC_KEY_LOCK CAPS //#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE //#define MAGIC_KEY_NKRO N //#define MAGIC_KEY_SLEEP_LED Z @@ -140,7 +173,63 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line #endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/lfkeyboards/lfkpad/info.json b/keyboards/lfkeyboards/lfkpad/info.json index 71adb5d447d8..f5f41f5a7a7d 100644 --- a/keyboards/lfkeyboards/lfkpad/info.json +++ b/keyboards/lfkeyboards/lfkpad/info.json @@ -1,12 +1,34 @@ { - "keyboard_name": "LFKPad", - "url": "", - "maintainer": "qmk", - "width": 4, - "height": 6, - "layouts": { - "LAYOUT_numpad_6x4": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, {"label":"=", "x":2, "y":0}, {"label":"Fn", "x":3, "y":0}, {"label":"Num Lock", "x":0, "y":1}, {"label":"/", "x":1, "y":1}, {"label":"*", "x":2, "y":1}, {"label":"-", "x":3, "y":1}, {"label":"7", "x":0, "y":2}, {"label":"8", "x":1, "y":2}, {"label":"9", "x":2, "y":2}, {"label":"4", "x":0, "y":3}, {"label":"5", "x":1, "y":3}, {"label":"6", "x":2, "y":3}, {"label":"+", "x":3, "y":2, "h":2}, {"label":"1", "x":0, "y":4}, {"label":"2", "x":1, "y":4}, {"label":"3", "x":2, "y":4}, {"label":"0", "x":0, "y":5, "w":2}, {"label":".", "x":2, "y":5}, {"label":"Enter", "x":3, "y":4, "h":2}] + "keyboard_name": "LFKPad", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_numpad_6x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":2, "h":2}, + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":0, "y":5, "w":2}, + {"x":2, "y":5}, + {"x":3, "y":4, "h":2} + ] + } } - } } diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h b/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h deleted file mode 100644 index 271f48d0011b..000000000000 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -// place overrides here diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c index 3e131b241444..0aa720e40036 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c @@ -1,41 +1,31 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_numpad_6x4( /* Base */ - KC_ESC, KC_TAB, KC_PEQL, MO(1), \ - KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, \ - KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_P1, KC_P2, KC_P3, \ - KC_P0, KC_PDOT, KC_PENT \ - ), - - [1] = LAYOUT_numpad_6x4( /* RGB */ - RGB_SAI, RGB_VAI, RGB_HUI, _______, \ - RGB_SAD, RGB_VAD, RGB_HUD, _______, \ - RGB_M_X, RGB_M_G, RGB_MOD, \ - RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_RMOD, \ - RGB_M_P, RGB_M_B, RGB_M_R, \ - XXXXXXX, XXXXXXX, RGB_TOG \ - ), + /* Base */ + [0] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, KC_PEQL, MO(1), + KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + + /* RGB */ + [1] = LAYOUT_numpad_6x4( + RGB_SAI, RGB_VAI, RGB_HUI, _______, + RGB_SAD, RGB_VAD, RGB_HUD, _______, + RGB_M_X, RGB_M_G, RGB_MOD, + RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_RMOD, + RGB_M_P, RGB_M_B, RGB_M_R, + XXXXXXX, XXXXXXX, RGB_TOG + ) }; void matrix_init_user(void) { // This keymap only has a single base layer, so reset the default if needed - if(eeconfig_read_default_layer() > 1){ + if (eeconfig_read_default_layer() > 1) { eeconfig_update_default_layer(1); default_layer_set(1); } } - -void matrix_scan_user(void) { - -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/readme.md b/keyboards/lfkeyboards/lfkpad/keymaps/default/readme.md index 6c48b8d0b8c7..9c0dad030151 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/readme.md +++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap LFKPad 21 +# The default keymap for the LFKPad 21 diff --git a/keyboards/lfkeyboards/lfkpad/lfkpad.c b/keyboards/lfkeyboards/lfkpad/lfkpad.c index 232285c3228c..b91b7da67d40 100644 --- a/keyboards/lfkeyboards/lfkpad/lfkpad.c +++ b/keyboards/lfkeyboards/lfkpad/lfkpad.c @@ -1,112 +1,117 @@ -#include +#include "lfkpad.h" + +#include "quantum.h" + #include #include -#include "lfkpad.h" -#include "keymap.h" #include "issi.h" #include "TWIlib.h" #include "lighting.h" -#include "debug.h" -#include "quantum.h" uint16_t click_hz = CLICK_HZ; uint16_t click_time = CLICK_MS; uint8_t click_toggle = CLICK_ENABLED; - -void matrix_init_kb(void) -{ +void matrix_init_kb(void) { matrix_init_user(); + #ifndef AUDIO_ENABLE // If we're not using the audio pin, drive it low - sbi(DDRC, 6); - cbi(PORTC, 6); + setPinOutput(C6); + writePinLow(C6); #endif #ifdef ISSI_ENABLE issi_init(); #endif + #ifdef WATCHDOG_ENABLE // This is done after turning the layer LED red, if we're caught in a loop // we should get a flashing red light wdt_enable(WDTO_500MS); #endif - } -void matrix_scan_kb(void) -{ +void matrix_scan_kb(void) { #ifdef WATCHDOG_ENABLE wdt_reset(); #endif + #ifdef ISSI_ENABLE // switch/underglow lighting update static uint32_t issi_device = 0; static uint32_t twi_last_ready = 0; - if(twi_last_ready > 1000){ - // Its been way too long since the last ISSI update, reset the I2C bus and start again + + if (twi_last_ready > 1000) { + // It's been way too long since the last ISSI update, reset the I2C bus and start again dprintf("TWI failed to recover, TWI re-init\n"); twi_last_ready = 0; TWIInit(); force_issi_refresh(); } - if(isTWIReady()){ + + if (isTWIReady()) { twi_last_ready = 0; // If the i2c bus is available, kick off the issi update, alternate between devices update_issi(issi_device, issi_device); - if(issi_device){ + + if (issi_device) { issi_device = 0; - }else{ + } else { issi_device = 3; } - }else{ + } else { twi_last_ready++; } #endif + matrix_scan_user(); } -void click(uint16_t freq, uint16_t duration){ +void click(uint16_t freq, uint16_t duration) { #ifdef AUDIO_ENABLE - if(freq >= 100 && freq <= 20000 && duration < 100){ + if (freq >= 100 && freq <= 20000 && duration < 100) { play_note(freq, 10); - for (uint16_t i = 0; i < duration; i++){ + + for (uint16_t i = 0; i < duration; i++) { _delay_ms(1); } + stop_all_notes(); } #endif } -bool process_record_kb(uint16_t keycode, keyrecord_t* record) -{ - if (click_toggle && record->event.pressed){ +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (click_toggle && record->event.pressed) { click(click_hz, click_time); } + if (keycode == RESET) { reset_keyboard_kb(); - } else { } + return process_record_user(keycode, record); } -void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) -{ +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) { #ifdef AUDIO_ENABLE int8_t sign = 1; #endif - if(id == LFK_ESC_TILDE){ + + if (id == LFK_ESC_TILDE) { // Send ~ on shift-esc void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key; - uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); - if(layer_state == 0){ + uint8_t shifted = get_mods() & MOD_MASK_SHIFT; + + if (layer_state == 0) { method(shifted ? KC_GRAVE : KC_ESCAPE); - }else{ + } else { method(shifted ? KC_ESCAPE : KC_GRAVE); } send_keyboard_report(); - }else if(event->event.pressed){ - switch(id){ + } else if (event->event.pressed) { + switch (id) { case LFK_SET_DEFAULT_LAYER: // set/save the current base layer to eeprom, falls through to LFK_CLEAR eeconfig_update_default_layer(1UL << opt); @@ -117,24 +122,24 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) break; #ifdef AUDIO_ENABLE case LFK_CLICK_FREQ_LOWER: - sign = -1; // continue to next statement + sign = -1; // continue to next statement case LFK_CLICK_FREQ_HIGHER: click_hz += sign * 100; click(click_hz, click_time); break; case LFK_CLICK_TOGGLE: - if(click_toggle){ + if (click_toggle) { click_toggle = 0; click(4000, 100); click(1000, 100); - }else{ + } else { click_toggle = 1; click(1000, 100); click(4000, 100); } break; case LFK_CLICK_TIME_SHORTER: - sign = -1; // continue to next statement + sign = -1; // continue to next statement case LFK_CLICK_TIME_LONGER: click_time += sign; click(click_hz, click_time); @@ -144,22 +149,18 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) } } -void reset_keyboard_kb(){ +void reset_keyboard_kb() { #ifdef WATCHDOG_ENABLE MCUSR = 0; wdt_disable(); wdt_reset(); #endif - reset_keyboard(); -} -void led_set_kb(uint8_t usb_led) -{ - led_set_user(usb_led); + reset_keyboard(); } // LFK lighting info -const uint8_t rgb_matrices[] = {0, 1}; +const uint8_t rgb_matrices[] = { 0, 1 }; const uint8_t rgb_sequence[] = { 32, 1, 2, 3, 31, 30, 5, 6, @@ -172,5 +173,4 @@ const uint8_t rgb_sequence[] = { 4, 25, 13, 24, 20 - }; diff --git a/keyboards/lfkeyboards/lfkpad/lfkpad.h b/keyboards/lfkeyboards/lfkpad/lfkpad.h index a4c248e2a089..0f34150db99e 100644 --- a/keyboards/lfkeyboards/lfkpad/lfkpad.h +++ b/keyboards/lfkeyboards/lfkpad/lfkpad.h @@ -1,23 +1,6 @@ -#ifndef LFKPAD_H -#define LFKPAD_H - -/* if the kb.h file exists (because we're running from qmkbuilder) include it */ -#if __has_include("kb.h") -#include "kb.h" -#endif +#pragma once #include "quantum.h" -#include "matrix.h" -#include - -#ifndef cbi -#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) -#endif - -#ifndef sbi -#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) -#endif - typedef struct RGB_Color { uint16_t red; @@ -57,7 +40,6 @@ void click(uint16_t freq, uint16_t duration); // readability #define ___ KC_NO - #define LAYOUT_numpad_6x4( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ @@ -73,5 +55,3 @@ void click(uint16_t freq, uint16_t duration); { k40, k41, k42, k43 }, \ { k50, ___, k52, ___ } \ } - -#endif //LFKPAD_H diff --git a/keyboards/lfkeyboards/lfkpad/readme.md b/keyboards/lfkeyboards/lfkpad/readme.md index 7dd8337e8ae6..ce5e7f67b90b 100644 --- a/keyboards/lfkeyboards/lfkpad/readme.md +++ b/keyboards/lfkeyboards/lfkpad/readme.md @@ -1,28 +1,15 @@ -bluepad keyboard firmware -====================== +# LFKPad -## Quantum MK Firmware +![LFKPad](https://cdn11.bigcommerce.com/s-dvx2zpcx7r/images/stencil/500x659/products/118/385/img_0256__06462.1546304848.jpg) -For the full Quantum feature list, see [the parent readme.md](/docs/README.md). +Hotswap 21-key numpad PCB with USB-C, per-key RGB and underglow. -## Building +* Keyboard Maintainer: QMK community +* Hardware Supported: LFKPad HS21 PCB +* Hardware Availability: [LFKeyboards](https://www.lfkeyboards.com/lfkpad/) -Download or clone the whole firmware and navigate to the keyboards/bluepad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. +Make example for this keyboard (after setting up your build environment): -Depending on which keymap you would like to use, you will have to compile slightly differently. + make lfkeyboards/lfkpad:default -### Default - -To build with the default keymap, simply run `make`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: - -``` -$ make keymap=[default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 1529f8986345..aca77f562e0d 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk @@ -11,26 +11,29 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -LAYOUTS = numpad_6x4 - -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -TAP_DANCE_ENABLE = no +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs -ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled -WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms +ISSI_ENABLE = yes # If the I2C pullup resistors aren't installed this must be disabled +WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every 250ms SRC = TWIlib.c issi.c lighting.c @@ -41,3 +44,5 @@ endif ifeq ($(strip $(WATCHDOG_ENABLE)), yes) TMK_COMMON_DEFS += -DWATCHDOG_ENABLE endif + +LAYOUTS = numpad_6x4 From 393937b43fe37a9faceb3a40e5f6fcc604659fb0 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 5 Feb 2020 02:49:10 +0000 Subject: [PATCH 201/331] Relocate grave keycode processing (#8082) * Relocate grave keycode processing * Tidy up code * Refactor grave -> grave_esc --- common_features.mk | 17 +++-- quantum/process_keycode/process_grave_esc.c | 71 +++++++++++++++++++++ quantum/process_keycode/process_grave_esc.h | 20 ++++++ quantum/quantum.c | 55 +--------------- quantum/quantum.h | 4 ++ 5 files changed, 110 insertions(+), 57 deletions(-) create mode 100644 quantum/process_keycode/process_grave_esc.c create mode 100644 quantum/process_keycode/process_grave_esc.h diff --git a/common_features.mk b/common_features.mk index 2c24eb28c2ff..425d5b47326c 100644 --- a/common_features.mk +++ b/common_features.mk @@ -420,6 +420,12 @@ ifeq ($(strip $(LEADER_ENABLE)), yes) OPT_DEFS += -DLEADER_ENABLE endif + +ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/dip_switch.c + OPT_DEFS += -DDIP_SWITCH_ENABLE +endif + include $(DRIVER_PATH)/qwiic/qwiic.mk QUANTUM_SRC:= \ @@ -505,12 +511,13 @@ ifeq ($(strip $(MAGIC_ENABLE)), yes) OPT_DEFS += -DMAGIC_KEYCODE_ENABLE endif +GRAVE_ESC_ENABLE ?= yes +ifeq ($(strip $(GRAVE_ESC_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_grave_esc.c + OPT_DEFS += -DGRAVE_ESC_ENABLE +endif + ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c OPT_DEFS += -DDYNAMIC_MACRO_ENABLE endif - -ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/dip_switch.c - OPT_DEFS += -DDIP_SWITCH_ENABLE -endif diff --git a/quantum/process_keycode/process_grave_esc.c b/quantum/process_keycode/process_grave_esc.c new file mode 100644 index 000000000000..41c50f5cb8b3 --- /dev/null +++ b/quantum/process_keycode/process_grave_esc.c @@ -0,0 +1,71 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "process_grave_esc.h" + +/* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise. + * Used to ensure that the correct keycode is released if the key is released. + */ +static bool grave_esc_was_shifted = false; + +bool process_grave_esc(uint16_t keycode, keyrecord_t *record) { + if (keycode == GRAVE_ESC) { + const uint8_t mods = get_mods(); + uint8_t shifted = mods & MOD_MASK_SG; + +#ifdef GRAVE_ESC_ALT_OVERRIDE + // if ALT is pressed, ESC is always sent + // this is handy for the cmd+opt+esc shortcut on macOS, among other things. + if (mods & MOD_MASK_ALT) { + shifted = 0; + } +#endif + +#ifdef GRAVE_ESC_CTRL_OVERRIDE + // if CTRL is pressed, ESC is always sent + // this is handy for the ctrl+shift+esc shortcut on windows, among other things. + if (mods & MOD_MASK_CTRL) { + shifted = 0; + } +#endif + +#ifdef GRAVE_ESC_GUI_OVERRIDE + // if GUI is pressed, ESC is always sent + if (mods & MOD_MASK_GUI) { + shifted = 0; + } +#endif + +#ifdef GRAVE_ESC_SHIFT_OVERRIDE + // if SHIFT is pressed, ESC is always sent + if (mods & MOD_MASK_SHIFT) { + shifted = 0; + } +#endif + + if (record->event.pressed) { + grave_esc_was_shifted = shifted; + add_key(shifted ? KC_GRAVE : KC_ESCAPE); + } else { + del_key(grave_esc_was_shifted ? KC_GRAVE : KC_ESCAPE); + } + + send_keyboard_report(); + return false; + } + + // Not a grave keycode so continue processing + return true; +} diff --git a/quantum/process_keycode/process_grave_esc.h b/quantum/process_keycode/process_grave_esc.h new file mode 100644 index 000000000000..bbf448376314 --- /dev/null +++ b/quantum/process_keycode/process_grave_esc.h @@ -0,0 +1,20 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +bool process_grave_esc(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum.c b/quantum/quantum.c index 36062866e721..52062bb17482 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -256,6 +256,9 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef MAGIC_KEYCODE_ENABLE process_magic(keycode, record) && #endif +#ifdef GRAVE_ESC_ENABLE + process_grave_esc(keycode, record) && +#endif #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) process_rgb(keycode, record) && #endif @@ -316,58 +319,6 @@ bool process_record_quantum(keyrecord_t *record) { } } - // keycodes that depend on both pressed and non-pressed state - switch (keycode) { - case GRAVE_ESC: { - /* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise. - * Used to ensure that the correct keycode is released if the key is released. - */ - static bool grave_esc_was_shifted = false; - - uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))); - -#ifdef GRAVE_ESC_ALT_OVERRIDE - // if ALT is pressed, ESC is always sent - // this is handy for the cmd+opt+esc shortcut on macOS, among other things. - if (get_mods() & (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT))) { - shifted = 0; - } -#endif - -#ifdef GRAVE_ESC_CTRL_OVERRIDE - // if CTRL is pressed, ESC is always sent - // this is handy for the ctrl+shift+esc shortcut on windows, among other things. - if (get_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))) { - shifted = 0; - } -#endif - -#ifdef GRAVE_ESC_GUI_OVERRIDE - // if GUI is pressed, ESC is always sent - if (get_mods() & (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))) { - shifted = 0; - } -#endif - -#ifdef GRAVE_ESC_SHIFT_OVERRIDE - // if SHIFT is pressed, ESC is always sent - if (get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) { - shifted = 0; - } -#endif - - if (record->event.pressed) { - grave_esc_was_shifted = shifted; - add_key(shifted ? KC_GRAVE : KC_ESCAPE); - } else { - del_key(grave_esc_was_shifted ? KC_GRAVE : KC_ESCAPE); - } - - send_keyboard_report(); - return false; - } - } - return process_action_kb(record); } diff --git a/quantum/quantum.h b/quantum/quantum.h index 3b9eeaa6de1b..fbd5e9079271 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -138,6 +138,10 @@ extern layer_state_t layer_state; # include "process_magic.h" #endif +#ifdef GRAVE_ESC_ENABLE +# include "process_grave_esc.h" +#endif + #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) # include "process_rgb.h" #endif From a6b0a74d95535be1d3c0cd1b6c836ed2dea1b150 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 4 Feb 2020 18:51:09 -0800 Subject: [PATCH 202/331] Add RESET key for default keymap in Satisfaction 75 (#8088) --- keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c index 61a9d097a338..10a4b60ee124 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c @@ -32,6 +32,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; From a557a5b2c5e62c20e037fbca56dc902a20cd6ff8 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 5 Feb 2020 02:59:20 +0000 Subject: [PATCH 203/331] [Keyboard] Refactor deltasplit75 to use split_common (#8083) * Refactor deltasplit75 to use split_common * Refactor deltasplit75 to use split_common - small tidy up --- keyboards/deltasplit75/config.h | 23 - keyboards/deltasplit75/deltasplit75.h | 9 +- keyboards/deltasplit75/eeprom-lefthand.eep | 2 - keyboards/deltasplit75/eeprom-righthand.eep | 2 - keyboards/deltasplit75/i2c.c | 162 ------- keyboards/deltasplit75/i2c.h | 31 -- keyboards/deltasplit75/matrix.c | 454 -------------------- keyboards/deltasplit75/readme.md | 11 +- keyboards/deltasplit75/rules.mk | 29 +- keyboards/deltasplit75/serial.c | 228 ---------- keyboards/deltasplit75/serial.h | 26 -- keyboards/deltasplit75/split_util.c | 86 ---- keyboards/deltasplit75/split_util.h | 19 - keyboards/deltasplit75/v2/config.h | 10 +- keyboards/deltasplit75/v2/v2.c | 15 +- keyboards/deltasplit75/v2/v2.h | 5 +- 16 files changed, 29 insertions(+), 1083 deletions(-) delete mode 100644 keyboards/deltasplit75/config.h delete mode 100644 keyboards/deltasplit75/eeprom-lefthand.eep delete mode 100644 keyboards/deltasplit75/eeprom-righthand.eep delete mode 100644 keyboards/deltasplit75/i2c.c delete mode 100644 keyboards/deltasplit75/i2c.h delete mode 100644 keyboards/deltasplit75/matrix.c delete mode 100644 keyboards/deltasplit75/serial.c delete mode 100644 keyboards/deltasplit75/serial.h delete mode 100644 keyboards/deltasplit75/split_util.c delete mode 100644 keyboards/deltasplit75/split_util.h diff --git a/keyboards/deltasplit75/config.h b/keyboards/deltasplit75/config.h deleted file mode 100644 index 8a2fbb3b265e..000000000000 --- a/keyboards/deltasplit75/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -#endif diff --git a/keyboards/deltasplit75/deltasplit75.h b/keyboards/deltasplit75/deltasplit75.h index 79d018c912f4..b78d8573442e 100644 --- a/keyboards/deltasplit75/deltasplit75.h +++ b/keyboards/deltasplit75/deltasplit75.h @@ -1,8 +1,7 @@ -#ifndef DELTASPLIT75_H -#define DELTASPLIT75_H - -#include "v2.h" +#pragma once #include "quantum.h" -#endif \ No newline at end of file +#ifdef KEYBOARD_deltasplit75_v2 +# include "v2.h" +#endif diff --git a/keyboards/deltasplit75/eeprom-lefthand.eep b/keyboards/deltasplit75/eeprom-lefthand.eep deleted file mode 100644 index b9666a74c01f..000000000000 --- a/keyboards/deltasplit75/eeprom-lefthand.eep +++ /dev/null @@ -1,2 +0,0 @@ -:0B0000000000000000000000000001F4 -:00000001FF diff --git a/keyboards/deltasplit75/eeprom-righthand.eep b/keyboards/deltasplit75/eeprom-righthand.eep deleted file mode 100644 index 94cc5be7fc68..000000000000 --- a/keyboards/deltasplit75/eeprom-righthand.eep +++ /dev/null @@ -1,2 +0,0 @@ -:0B0000000000000000000000000000F5 -:00000001FF diff --git a/keyboards/deltasplit75/i2c.c b/keyboards/deltasplit75/i2c.c deleted file mode 100644 index 084c890c405f..000000000000 --- a/keyboards/deltasplit75/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 100000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - -#endif diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c deleted file mode 100644 index 28198d89b0eb..000000000000 --- a/keyboards/deltasplit75/matrix.c +++ /dev/null @@ -1,454 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#if (DEBOUNCE > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - TX_RX_LED_INIT; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); - -} - -uint8_t _matrix_scan(void) -{ - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); -#if (DIODE_DIRECTION == COL2ROW) - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# else - read_cols_on_row(matrix+offset, current_row); -# endif - - } - -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix+offset, current_col); -# endif - - } -#endif - -# if (DEBOUNCE > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selecton to stabilize - select_row(current_row); - wait_us(30); - - // For each col... - for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - - // Select the col pin to read (active low) - uint8_t pin = col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - - // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); - } - - // Unselect row - unselect_row(current_row); - - return (last_row_value != current_matrix[current_row]); -} - -static void select_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -static void init_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - // Select col and wait for col selecton to stabilize - select_col(current_col); - wait_us(30); - - // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) - { - - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[row_index]; - - // Check row pin state - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) - { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); - } - else - { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -static void select_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#endif diff --git a/keyboards/deltasplit75/readme.md b/keyboards/deltasplit75/readme.md index 096fced97f2d..a39e9298eb5e 100644 --- a/keyboards/deltasplit75/readme.md +++ b/keyboards/deltasplit75/readme.md @@ -1,17 +1,16 @@ -DeltaSplit75 -====== +# DeltaSplit75 A split 75% keyboard made by xyxjj. [More info on qmk.fm](http://qmk.fm/deltasplit75/) -Keyboard Maintainer: [xyxjj](https://github.com/xyxjj) & [itsaferbie](https://github.com/itsaferbie) -Hardware Supported: Pro Micro -Hardware Availability: Group Buy +* Keyboard Maintainer: [xyxjj](https://github.com/xyxjj) & [itsaferbie](https://github.com/itsaferbie) +* Hardware Supported: Pro Micro +* Hardware Availability: Group Buy Make example for this keyboard (after setting up your build environment): make deltasplit75/v2:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). Files are available here: [DeltaSplit75 Case Files](https://github.com/xyxjj/DeltaSplit75-Case-files) diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk index 9504f60bf037..b0049fcbff8f 100644 --- a/keyboards/deltasplit75/rules.mk +++ b/keyboards/deltasplit75/rules.mk @@ -12,30 +12,25 @@ MCU = atmega32u4 BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs -CUSTOM_MATRIX = yes -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c +SPLIT_KEYBOARD = yes DEFAULT_FOLDER = deltasplit75/v2 diff --git a/keyboards/deltasplit75/serial.c b/keyboards/deltasplit75/serial.c deleted file mode 100644 index 74bcbb6bf6e2..000000000000 --- a/keyboards/deltasplit75/serial.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/deltasplit75/serial.h b/keyboards/deltasplit75/serial.h deleted file mode 100644 index 6ef52019a856..000000000000 --- a/keyboards/deltasplit75/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_COLS+7)/8 *MATRIX_ROWS/2) -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/deltasplit75/split_util.c b/keyboards/deltasplit75/split_util.c deleted file mode 100644 index 346cbc908949..000000000000 --- a/keyboards/deltasplit75/split_util.c +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { -#ifdef USE_I2C - i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); -void keyboard_slave_loop(void); - -#endif diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h index 6a2e48f4f4f0..844fcf43bd37 100644 --- a/keyboards/deltasplit75/v2/config.h +++ b/keyboards/deltasplit75/v2/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_V2_H -#define CONFIG_V2_H +#pragma once #include "config_common.h" @@ -40,6 +39,11 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -76,5 +80,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/deltasplit75/v2/v2.c b/keyboards/deltasplit75/v2/v2.c index a7ee1fa8a51e..caf7c6f0f2bf 100644 --- a/keyboards/deltasplit75/v2/v2.c +++ b/keyboards/deltasplit75/v2/v2.c @@ -1,14 +1 @@ -#include "deltasplit75.h" - -void matrix_init_kb(void) { - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - +#include "v2.h" diff --git a/keyboards/deltasplit75/v2/v2.h b/keyboards/deltasplit75/v2/v2.h index 82f54c2b0d0e..bab6a47cd99b 100644 --- a/keyboards/deltasplit75/v2/v2.h +++ b/keyboards/deltasplit75/v2/v2.h @@ -1,5 +1,4 @@ -#ifndef V2_H -#define V2_H +#pragma once #include "deltasplit75.h" @@ -56,5 +55,3 @@ { K120, K121, K122, K123, KC_NO, KC_NO, K126, K127}, \ { KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \ } - -#endif From 307be48de9a24a182420a6c42222906132035ea2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 5 Feb 2020 03:37:04 +0000 Subject: [PATCH 204/331] Reduce SPLIT_USB_TIMEOUT by 500ms (#7637) * Update SPLIT_USB_TIMEOUT -500ms * Align keyboard level SPLIT_USB_TIMEOUT defaults * Align keyboard level SPLIT_USB_TIMEOUT_POLL * Review fixes --- docs/config_options.md | 5 ++++- docs/feature_split_keyboard.md | 7 ++++++- keyboards/crkbd/rev1/split_util.c | 12 ++++++++---- keyboards/helix/rev2/split_util.c | 12 ++++++++---- quantum/split_common/split_util.c | 12 ++++++++---- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 6df08233560d..be328405e029 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -276,9 +276,12 @@ There are a few different ways to set handedness for split keyboards (listed in * Default behavior for ARM * Required for AVR Teensy -* `#define SPLIT_USB_TIMEOUT 2500` +* `#define SPLIT_USB_TIMEOUT 2000` * Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT` +* `#define SPLIT_USB_TIMEOUT_POLL 10` + * Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT` + # The `rules.mk` File This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index affce3429348..66194c5f4b2f 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -198,10 +198,15 @@ This option changes the startup behavior to detect an active USB connection when ?> This setting will stop the ability to demo using battery packs. ```c -#define SPLIT_USB_TIMEOUT 2500 +#define SPLIT_USB_TIMEOUT 2000 ``` This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`. +```c +#define SPLIT_USB_TIMEOUT_POLL 10 +``` +This sets the poll frequency when detecting master/slave when using `SPLIT_USB_DETECT` + ## Additional Resources Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information. diff --git a/keyboards/crkbd/rev1/split_util.c b/keyboards/crkbd/rev1/split_util.c index 35aa54d78078..b642a734cc52 100644 --- a/keyboards/crkbd/rev1/split_util.c +++ b/keyboards/crkbd/rev1/split_util.c @@ -20,18 +20,22 @@ #endif #ifndef SPLIT_USB_TIMEOUT -# define SPLIT_USB_TIMEOUT 2500 +# define SPLIT_USB_TIMEOUT 2000 +#endif + +#ifndef SPLIT_USB_TIMEOUT_POLL +# define SPLIT_USB_TIMEOUT_POLL 10 #endif volatile bool isLeftHand = true; bool waitForUsb(void) { - for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) { - // This will return true of a USB connection has been established + for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) { + // This will return true if a USB connection has been established if (UDADDR & _BV(ADDEN)) { return true; } - wait_ms(100); + wait_ms(SPLIT_USB_TIMEOUT_POLL); } // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow diff --git a/keyboards/helix/rev2/split_util.c b/keyboards/helix/rev2/split_util.c index 89df43e2773a..9d31d0dec361 100644 --- a/keyboards/helix/rev2/split_util.c +++ b/keyboards/helix/rev2/split_util.c @@ -20,18 +20,22 @@ #endif #ifndef SPLIT_USB_TIMEOUT - #define SPLIT_USB_TIMEOUT 2500 +# define SPLIT_USB_TIMEOUT 2000 +#endif + +#ifndef SPLIT_USB_TIMEOUT_POLL +# define SPLIT_USB_TIMEOUT_POLL 10 #endif volatile bool isLeftHand = true; bool waitForUsb(void) { - for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) { - // This will return true of a USB connection has been established + for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) { + // This will return true if a USB connection has been established if (UDADDR & _BV(ADDEN)) { return true; } - wait_ms(100); + wait_ms(SPLIT_USB_TIMEOUT_POLL); } // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 076f186649b0..103bc97142ee 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -15,14 +15,18 @@ #endif #ifndef SPLIT_USB_TIMEOUT -# define SPLIT_USB_TIMEOUT 2500 +# define SPLIT_USB_TIMEOUT 2000 +#endif + +#ifndef SPLIT_USB_TIMEOUT_POLL +# define SPLIT_USB_TIMEOUT_POLL 10 #endif volatile bool isLeftHand = true; bool waitForUsb(void) { - for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) { - // This will return true of a USB connection has been established + for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) { + // This will return true if a USB connection has been established #if defined(__AVR__) if (UDADDR & _BV(ADDEN)) { #else @@ -30,7 +34,7 @@ bool waitForUsb(void) { #endif return true; } - wait_ms(100); + wait_ms(SPLIT_USB_TIMEOUT_POLL); } // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow From aed18a5ff3b9eae14464aca2efb2a3ed029aea49 Mon Sep 17 00:00:00 2001 From: ENDO Katsuhiro Date: Wed, 5 Feb 2020 13:47:59 +0900 Subject: [PATCH 205/331] [Keyboard] Add a new keyboard Chidori. (#7496) * [Keyboard] Add a new keyboard Chidori. * Update keyboards/chidori/info.json * Update keyboards/chidori/keymaps/default/keymap.c * Update keyboards/chidori/chidori.h * Update keyboards/chidori/keymaps/extended/keymap.c * Update keyboards/chidori/keymaps/extended/keymap.c * Update keyboards/chidori/keymaps/extended/keymap.c * Update keyboards/chidori/keymaps/extended/keymap.c * Update keyboards/chidori/keymaps/extended/keymap.c * Update keyboards/chidori/keymaps/extended/keymap.c * Update keyboards/chidori/keymaps/extended/keymap.c * Update keyboards/chidori/readme.md * Update keyboards/chidori/readme.md * Update keyboards/chidori/readme.md * Update keyboards/chidori/readme.md * Update keyboards/chidori/rules.mk * Update keyboards/chidori/rules.mk * Update keyboards/chidori/rules.mk * Update keyboards/chidori/rules.mk * Update keyboards/chidori/rules.mk * Update keyboards/chidori/rules.mk * Update keyboards/chidori/rules.mk * Update keyboards/chidori/rules.mk * Update keyboards/chidori/rules.mk * Update rules.mk * Delete unnecesarry lines. * Changes layer keys handing. --- keyboards/chidori/board.c | 366 +++++++++++++++++ keyboards/chidori/board.h | 190 +++++++++ keyboards/chidori/chidori.c | 15 + keyboards/chidori/chidori.h | 59 +++ keyboards/chidori/config.h | 253 ++++++++++++ keyboards/chidori/info.json | 25 ++ keyboards/chidori/keymaps/default/config.h | 48 +++ keyboards/chidori/keymaps/default/keymap.c | 176 ++++++++ keyboards/chidori/keymaps/default/readme.md | 1 + keyboards/chidori/keymaps/extended/config.h | 59 +++ keyboards/chidori/keymaps/extended/keymap.c | 181 +++++++++ keyboards/chidori/keymaps/extended/readme.md | 1 + keyboards/chidori/matrix.c | 113 ++++++ keyboards/chidori/readme.md | 15 + keyboards/chidori/rules.mk | 44 ++ keyboards/chidori/usbconfig.h | 397 +++++++++++++++++++ 16 files changed, 1943 insertions(+) create mode 100644 keyboards/chidori/board.c create mode 100644 keyboards/chidori/board.h create mode 100644 keyboards/chidori/chidori.c create mode 100644 keyboards/chidori/chidori.h create mode 100644 keyboards/chidori/config.h create mode 100644 keyboards/chidori/info.json create mode 100644 keyboards/chidori/keymaps/default/config.h create mode 100644 keyboards/chidori/keymaps/default/keymap.c create mode 100644 keyboards/chidori/keymaps/default/readme.md create mode 100644 keyboards/chidori/keymaps/extended/config.h create mode 100644 keyboards/chidori/keymaps/extended/keymap.c create mode 100644 keyboards/chidori/keymaps/extended/readme.md create mode 100644 keyboards/chidori/matrix.c create mode 100644 keyboards/chidori/readme.md create mode 100644 keyboards/chidori/rules.mk create mode 100644 keyboards/chidori/usbconfig.h diff --git a/keyboards/chidori/board.c b/keyboards/chidori/board.c new file mode 100644 index 000000000000..ff5b76a3af93 --- /dev/null +++ b/keyboards/chidori/board.c @@ -0,0 +1,366 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "matrix.h" +#include "quantum.h" +#include "board.h" +#include "i2c_master.h" + +static board_info_t boards[NUM_BOARDS] = BOARD_INFOS; +static board_info_t* master_board = NULL; + +static bool board_is_master(board_info_t* board); +static bool board_is_initialized(board_info_t* board); +static board_info_t* get_board_by_index(uint8_t board_index); +static uint8_t board_merge_led_config(board_info_t* board, uint8_t iodir); +static uint8_t board_merge_led_status(board_info_t* board, uint8_t data); +static void board_master_init(void); +static void board_slave_init(void); + +// +// board interface +// +static void board_select_master_row(board_info_t* board, uint8_t row); +static void board_unselect_master_row(board_info_t* board, uint8_t row); +static void board_unselect_master_rows(board_info_t* board); +static bool board_read_cols_on_master_row(board_info_t* board, matrix_row_t current_matrix[], uint8_t row); +static void board_set_master_led(board_info_t* board, uint8_t led_index, bool status); +static void board_select_slave_row(board_info_t* board, uint8_t row); +static void board_unselect_slave_row(board_info_t* board, uint8_t row); +static void board_unselect_slave_rows(board_info_t* board); +static bool board_read_cols_on_slave_row(board_info_t* board, matrix_row_t current_matrix[], uint8_t row); +static void board_set_slave_led(board_info_t* board, uint8_t led_index, bool status); + +static board_interface_t master_interface = {board_select_master_row, board_unselect_master_row, board_unselect_master_rows, board_read_cols_on_master_row, board_set_master_led}; +static board_interface_t slave_interface = {board_select_slave_row, board_unselect_slave_row, board_unselect_slave_rows, board_read_cols_on_slave_row, board_set_slave_led}; + +static board_interface_t* get_interface(board_info_t* board) { + if (board_is_master(board)) { + return &master_interface; + } + return &slave_interface; +} + +static void board_set_master_led(board_info_t* board, uint8_t led_index, bool status) { + pin_t pin = board->led_pins[led_index]; + board->led_status[led_index] = status; + setPinOutput(pin); + status ? writePinHigh(pin) : writePinLow(pin); +} + +static void board_set_slave_led(board_info_t* board, uint8_t led_index, bool status) { + board->led_status[led_index] = status; + uint8_t iodir = board_merge_led_config(board, 0xff); + uint8_t data = board_merge_led_status(board, 0x00); + i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRB, (const uint8_t*)&iodir, sizeof(iodir), BOARD_I2C_TIMEOUT); + i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_OLATB, (const uint8_t*)&data, sizeof(data), BOARD_I2C_TIMEOUT); +} + +static uint8_t board_merge_led_config(board_info_t* board, uint8_t iodir) { + for (uint8_t i = 0; i < NUM_LEDS; i++) { + iodir &= PIN2MASK(board->led_pins[i]); + } + return iodir; +} + +static bool board_slave_config(board_info_t* board) { + uint8_t set = 0xff; + uint8_t clear = 0x00; + i2c_status_t res = 0; + + // Set to input + res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRA, (const uint8_t*)&set, sizeof(set), BOARD_I2C_TIMEOUT); + if (res < 0) return false; + // RESTRICTION: LEDs only on PORT B. + set = board_merge_led_config(board, set); + res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRB, (const uint8_t*)&set, sizeof(set), BOARD_I2C_TIMEOUT); + if (res < 0) return false; + set = 0xff; + + // Pull up for input - enable + res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPPUA, (const uint8_t*)&set, sizeof(set), BOARD_I2C_TIMEOUT); + if (res < 0) return false; + res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPPUB, (const uint8_t*)&set, sizeof(set), BOARD_I2C_TIMEOUT); + if (res < 0) return false; + + // Disable interrupt + res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPINTENA, (const uint8_t*)&clear, sizeof(clear), BOARD_I2C_TIMEOUT); + if (res < 0) return false; + res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPINTENB, (const uint8_t*)&clear, sizeof(clear), BOARD_I2C_TIMEOUT); + if (res < 0) return false; + + // Polarity - same logic + res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IPOLA, (const uint8_t*)&clear, sizeof(clear), BOARD_I2C_TIMEOUT); + if (res < 0) return false; + res = i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IPOLB, (const uint8_t*)&clear, sizeof(clear), BOARD_I2C_TIMEOUT); + if (res < 0) return false; + + return true; +} + +static void board_slave_init(void) { + i2c_init(); + _delay_ms(500); + + for (uint8_t i = 0; i < NUM_BOARDS; i++) { + board_info_t* board = &boards[i]; + if (board_is_master(board)) { + continue; + } + if (i2c_start(EXPANDER_ADDR(board->i2c_address), BOARD_I2C_TIMEOUT) != I2C_STATUS_SUCCESS) { + continue; + } + i2c_stop(); + if (board_slave_config(board)) { + board->initialized = true; + } + } +} + +inline bool board_is_master(board_info_t* board) { + if (board) { + return board->master; + } + return false; +} + +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } + +inline uint8_t matrix2board(uint8_t row) { return row % NUM_ROWS; } + +inline uint8_t board_index(uint8_t row) { return row / NUM_ROWS; } + +static board_info_t* get_master_board(void) { + if (master_board == NULL) { + for (uint8_t i = 0; i < NUM_BOARDS; i++) { + if (boards[i].master) { + master_board = &boards[i]; + return master_board; + } + } + } + return NULL; +} + +inline bool board_is_initialized(board_info_t* board) { return board == NULL ? false : board->initialized; } + +static board_info_t* get_board_by_index(uint8_t board_index) { + if (board_index >= 0 && board_index < NUM_BOARDS) { + if (!board_is_initialized(&boards[board_index])) { + return NULL; + } + return &boards[board_index]; + } + return NULL; +} + +static board_info_t* get_board(uint8_t row) { + uint8_t idx = board_index(row); + if (idx >= 0 && idx < NUM_BOARDS) { + if (!board_is_initialized(&boards[idx])) { + return NULL; + } + return &boards[idx]; + } + return NULL; +} + +static uint8_t board_merge_led_status(board_info_t* board, uint8_t data) { + if (!board_is_initialized(board)) { + return data; + } + for (uint8_t i = 0; i < NUM_LEDS; i++) { + bool status = board->led_status[i]; + if (status) { + data |= (uint8_t)1 << PIN2INDEX(board->led_pins[i]); + } else { + data &= PIN2MASK(board->led_pins[i]); + } + } + return data; +} + +// +// Functions for slave +// +static uint8_t board_read_slave_cols(board_info_t* board) { + if (!board_is_initialized(board)) { + return 0xff; + } + uint8_t data = 0xff; + i2c_status_t res = i2c_readReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_GPIOA, &data, sizeof(data), BOARD_I2C_TIMEOUT); + return (res < 0) ? 0xff : data; +} + +static void board_select_slave_row(board_info_t* board, uint8_t board_row) { + if (!board_is_initialized(board)) { + return; + } + uint8_t pin = board->row_pins[board_row]; + uint8_t iodir = board_merge_led_config(board, PIN2MASK(pin)); + uint8_t status = board_merge_led_status(board, PIN2MASK(pin)); + i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRB, (const uint8_t*)&iodir, sizeof(iodir), BOARD_I2C_TIMEOUT); + i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_OLATB, (const uint8_t*)&status, sizeof(status), BOARD_I2C_TIMEOUT); +} + +static void board_unselect_slave_rows(board_info_t* board) { + if (!board_is_initialized(board)) { + return; + } + uint8_t iodir = board_merge_led_config(board, 0xff); + uint8_t data = board_merge_led_status(board, 0x00); + i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_IODIRB, (const uint8_t*)&iodir, sizeof(iodir), BOARD_I2C_TIMEOUT); + i2c_writeReg(EXPANDER_ADDR(board->i2c_address), EXPANDER_OLATB, (const uint8_t*)&data, sizeof(data), BOARD_I2C_TIMEOUT); +} + +static void board_unselect_slave_row(board_info_t* board, uint8_t board_row) { board_unselect_slave_rows(board); } + +/* + * row : matrix row (not board row) + */ +static bool board_read_cols_on_slave_row(board_info_t* board, matrix_row_t current_matrix[], uint8_t row) { + matrix_row_t last_row_value = current_matrix[row]; + current_matrix[row] = 0; + + uint8_t board_row = matrix2board(row); + board_select_slave_row(board, board_row); + wait_us(30); + + uint8_t cols = board_read_slave_cols(board); + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + uint8_t pin = board->col_pins[col_index]; + uint8_t pin_state = cols & PIN2BIT(pin); + current_matrix[row] |= pin_state ? 0 : (1 << col_index); + } + board_unselect_slave_row(board, board_row); + + return (last_row_value != current_matrix[row]); +} + +// +// Functions for master board +// +static void board_select_master_row(board_info_t* board, uint8_t board_row) { + setPinOutput(board->row_pins[board_row]); + writePinLow(board->row_pins[board_row]); +} + +static void board_unselect_master_row(board_info_t* board, uint8_t board_row) { setPinInputHigh(board->row_pins[board_row]); } + +static void board_unselect_master_rows(board_info_t* board) { + if (!board) { + return; + } + for (uint8_t x = 0; x < NUM_ROWS; x++) { + setPinInput(board->row_pins[x]); + } +} + +/* + * row : matrix row (not board row) + */ +static bool board_read_cols_on_master_row(board_info_t* board, matrix_row_t current_matrix[], uint8_t row) { + matrix_row_t last_row_value = current_matrix[row]; + current_matrix[row] = 0; + + uint8_t board_row = matrix2board(row); + board_select_master_row(board, board_row); + wait_us(30); + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + uint8_t pin_state = readPin(board->col_pins[col_index]); + current_matrix[row] |= pin_state ? 0 : (1 << col_index); + } + board_unselect_master_row(board, board_row); + + return (last_row_value != current_matrix[row]); +} + +static void board_master_init(void) { + board_info_t* board = get_master_board(); + if (!board) { + return; + } + for (uint8_t x = 0; x < NUM_COLS; x++) { + setPinInputHigh(board->col_pins[x]); + } + board->initialized = true; +} + +static void board_setup(void) { + for (uint8_t i = 0; i < NUM_BOARDS; i++) { + board_info_t* board = &boards[i]; + board->interface = get_interface(board); + } +} + +// +// Public functions +// + +// NOTE: Do not call this while matrix scanning... +void board_set_led_by_index(uint8_t board_index, uint8_t led_index, bool status) { + board_info_t* board = get_board_by_index(board_index); + if (!board) return; + if (led_index < 0 || led_index > NUM_LEDS) return; + (*board->interface->set_led)(board, led_index, status); +} + +bool board_read_cols_on_row(matrix_row_t current_matrix[], uint8_t row) { + bool result = false; + board_info_t* board = get_board(row); + if (!board) { + return false; + } + result = (*board->interface->read_cols_on_row)(board, current_matrix, row); + return result; +} + +void board_select_row(uint8_t row) { + board_info_t* board = get_board(row); + if (!board) { + return; + } + uint8_t board_row = matrix2board(row); + (*board->interface->select_row)(board, board_row); +} + +void board_unselect_row(uint8_t row) { + board_info_t* board = get_board(row); + if (!board) { + return; + } + uint8_t board_row = matrix2board(row); + (*board->interface->unselect_row)(board, board_row); +} + +void board_unselect_rows(void) { + for (uint8_t i = 0; i < NUM_BOARDS; i++) { + board_info_t* board = &boards[i]; + (*board->interface->unselect_rows)(board); + } +} + +void board_init(void) { + board_setup(); + board_master_init(); + board_slave_init(); + board_unselect_rows(); +} diff --git a/keyboards/chidori/board.h b/keyboards/chidori/board.h new file mode 100644 index 000000000000..892ea6c0f145 --- /dev/null +++ b/keyboards/chidori/board.h @@ -0,0 +1,190 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define NUM_ROWS 4 +#define NUM_COLS 6 +#define NUM_LEDS 2 + +#define LED_GREEN 0 +#define LED_YELLOW 1 + +typedef struct board_info_t board_info_t; +typedef struct board_interface_t board_interface_t; + +struct board_info_t { + bool master; + bool initialized; + uint8_t i2c_address; + pin_t row_pins[NUM_ROWS]; + pin_t col_pins[NUM_COLS]; + pin_t led_pins[NUM_LEDS]; + bool led_status[NUM_LEDS]; + board_interface_t* interface; +}; + +struct board_interface_t { + void (*select_row)(board_info_t* board, uint8_t row); + void (*unselect_row)(board_info_t* board, uint8_t row); + void (*unselect_rows)(board_info_t* board); + bool (*read_cols_on_row)(board_info_t* board, matrix_row_t current_matrix[], uint8_t row); + void (*set_led)(board_info_t* board, uint8_t led_index, bool status); +}; + +#define BOARD_I2C_TIMEOUT 20 + +#define GPA0 0x00 +#define GPA1 0x01 +#define GPA2 0x02 +#define GPA3 0x03 +#define GPA4 0x04 +#define GPA5 0x05 +#define GPA6 0x06 +#define GPA7 0x07 +#define GPB0 0x08 +#define GPB1 0x09 +#define GPB2 0x0A +#define GPB3 0x0B +#define GPB4 0x0C +#define GPB5 0x0D +#define GPB6 0x0E +#define GPB7 0x0F + +//#define PORTA 0x00 +//#define PORTB 0x01 +#define PORT_MASK 0x08 +#define PIN_MASK 0x07 + +#define PIN2REGISTER(reg, pin) (reg & ((pin & PORT_MASK) >> 3)) +#define PIN2PORT(pin) ((pin & PORT_MASK) >> 3) +#define PIN2MASK(pin) (~(1 << PIN2INDEX(pin))) +#define PIN2INDEX(pin) (pin & ~PORT_MASK) +#define PIN2BIT(pin) (1 << PIN2INDEX(pin)) + +#define EXPANDER_ADDR(addr) (addr << 1) + +#define EXPANDER_IODIR(pin) (0x00 | PIN2PORT(pin)) +#define EXPANDER_IPOL(pin) (0x02 | PIN2PORT(pin)) +#define EXPANDER_GPINTEN(pin) (0x04 | PIN2PORT(pin)) +#define EXPANDER_DEFVAL(pin) (0x06 | PIN2PORT(pin)) +#define EXPANDER_INTCON(pin) (0x08 | PIN2PORT(pin)) +#define EXPANDER_IOCON(pin) (0x0A | PIN2PORT(pin)) +#define EXPANDER_GPPU(pin) (0x0C | PIN2PORT(pin)) +#define EXPANDER_INTF(pin) (0x0E | PIN2PORT(pin)) +#define EXPANDER_INTCAP(pin) (0x10 | PIN2PORT(pin)) +#define EXPANDER_GPIO(pin) (0x12 | PIN2PORT(pin)) +#define EXPANDER_OLAT(pin) (0x14 | PIN2PORT(pin)) + +#define EXPANDER_IODIRA 0x00 +#define EXPANDER_IODIRB 0x01 +#define EXPANDER_IPOLA 0x02 +#define EXPANDER_IPOLB 0x03 +#define EXPANDER_GPINTENA 0x04 +#define EXPANDER_GPINTENB 0x05 +#define EXPANDER_DEFVALA 0x06 +#define EXPANDER_DEFVALB 0x07 +#define EXPANDER_INTCONA 0x08 +#define EXPANDER_INTCONB 0x09 +#define EXPANDER_IOCONA 0x0A +#define EXPANDER_IOCONB 0x0B +#define EXPANDER_GPPUA 0x0C +#define EXPANDER_GPPUB 0x0D +#define EXPANDER_INTFA 0x0E +#define EXPANDER_INTFB 0x0F +#define EXPANDER_INTCAPA 0x10 +#define EXPANDER_INTCAPB 0x11 +#define EXPANDER_GPIOA 0x12 +#define EXPANDER_GPIOB 0x13 +#define EXPANDER_OLATA 0x14 +#define EXPANDER_OLATB 0x15 + +// +// Default board config +// +#ifndef NUM_BOARDS +# define NUM_BOARDS 2 +#endif + +// clang-format off +#ifndef BOARD_INFOS +#if NUM_BOARDS == 2 +#define BOARD_INFOS \ +{ \ + { \ + true, \ + false, \ + 0x00, \ + { D4, D5, D6, D7 }, \ + { D1, D0, C3, C2, C1, C0 }, \ + { B1, B2 }, \ + { false, false }, \ + NULL \ + }, \ + { \ + false, \ + false, \ + 0x20, \ + { GPB4, GPB5, GPB6, GPB7 }, \ + { GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \ + { GPB0, GPB1 }, \ + { false, false }, \ + NULL \ + }, \ +} +#elif NUM_BOARDS == 3 +#define BOARD_INFOS \ +{ \ + { \ + true, \ + false, \ + 0x00, \ + { D4, D5, D6, D7 }, \ + { D1, D0, C3, C2, C1, C0 }, \ + { B1, B2 }, \ + { false, false }, \ + NULL \ + }, \ + { \ + false, \ + false, \ + 0x20, \ + { GPB4, GPB5, GPB6, GPB7 }, \ + { GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \ + { GPB0, GPB1 }, \ + { false, false }, \ + NULL \ + }, \ + { \ + false, \ + false, \ + 0x21, \ + { GPB4, GPB5, GPB6, GPB7 }, \ + { GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \ + { GPB0, GPB1 }, \ + { false, false }, \ + NULL \ + }, \ +} +#endif +#endif +// clang-format on + +void board_set_led_by_index(uint8_t board_index, uint8_t led_index, bool status); +bool board_read_cols_on_row(matrix_row_t current_matrix[], uint8_t row); +void board_select_row(uint8_t row); +void board_unselect_row(uint8_t row); +void board_unselect_rows(void); +void board_init(void); diff --git a/keyboards/chidori/chidori.c b/keyboards/chidori/chidori.c new file mode 100644 index 000000000000..a3b6f2c041c0 --- /dev/null +++ b/keyboards/chidori/chidori.c @@ -0,0 +1,15 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ diff --git a/keyboards/chidori/chidori.h b/keyboards/chidori/chidori.h new file mode 100644 index 000000000000..efaff719480b --- /dev/null +++ b/keyboards/chidori/chidori.h @@ -0,0 +1,59 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +// clang-format off +#define LAYOUT( \ + L01, L02, L03, L04, L05, L06, R01, R02, R03, R04, R05, R06, \ + L07, L08, L09, L10, L11, L12, R07, R08, R09, R10, R11, R12, \ + L13, L14, L15, L16, L17, L18, R13, R14, R15, R16, R17, R18, \ + L19, L20, L21, L22, L23, L24, R19, R20, R21, R22, R23, R24 \ + ) \ + { \ + { L01, L02, L03, L04, L05, L06 }, \ + { L07, L08, L09, L10, L11, L12 }, \ + { L13, L14, L15, L16, L17, L18 }, \ + { L19, L20, L21, L22, L23, L24 }, \ + { R01, R02, R03, R04, R05, R06 }, \ + { R07, R08, R09, R10, R11, R12 }, \ + { R13, R14, R15, R16, R17, R18 }, \ + { R19, R20, R21, R22, R23, R24 } \ + } + +#define LAYOUT_extended( \ + L01, L02, L03, L04, L05, L06, M01, M02, M03, M04, M05, M06, R01, R02, R03, R04, R05, R06, \ + L07, L08, L09, L10, L11, L12, M07, M08, M09, M10, M11, M12, R07, R08, R09, R10, R11, R12, \ + L13, L14, L15, L16, L17, L18, M13, M14, M15, M16, M17, M18, R13, R14, R15, R16, R17, R18, \ + L19, L20, L21, L22, L23, L24, M19, M20, M21, M22, M23, M24, R19, R20, R21, R22, R23, R24 \ + ) \ + { \ + { L01, L02, L03, L04, L05, L06 }, \ + { L07, L08, L09, L10, L11, L12 }, \ + { L13, L14, L15, L16, L17, L18 }, \ + { L19, L20, L21, L22, L23, L24 }, \ + { M01, M02, M03, M04, M05, M06 }, \ + { M07, M08, M09, M10, M11, M12 }, \ + { M13, M14, M15, M16, M17, M18 }, \ + { M19, M20, M21, M22, M23, M24 }, \ + { R01, R02, R03, R04, R05, R06 }, \ + { R07, R08, R09, R10, R11, R12 }, \ + { R13, R14, R15, R16, R17, R18 }, \ + { R19, R20, R21, R22, R23, R24 } \ + } + +// clang-format on diff --git a/keyboards/chidori/config.h b/keyboards/chidori/config.h new file mode 100644 index 000000000000..669b68a247b4 --- /dev/null +++ b/keyboards/chidori/config.h @@ -0,0 +1,253 @@ +/* +Copyright 2019 ENDO Katsuhiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3942 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kagizaraya +#define PRODUCT Chidori +#define DESCRIPTION Yet another split keyboard made with only through - hole components + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +/* +#define MATRIX_ROW_PINS \ + { D0, D5 } +#define MATRIX_COL_PINS \ + { F1, F0, B0 } +*/ +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +// #define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/chidori/info.json b/keyboards/chidori/info.json new file mode 100644 index 000000000000..49e8c5d40fbb --- /dev/null +++ b/keyboards/chidori/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "Chidori", + "url": "", + "maintainer": "ka2hiro", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3} + ] + }, + "LAYOUT_extended": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":15, "y":3} + ] + } + } +} diff --git a/keyboards/chidori/keymaps/default/config.h b/keyboards/chidori/keymaps/default/config.h new file mode 100644 index 000000000000..1501061e79e5 --- /dev/null +++ b/keyboards/chidori/keymaps/default/config.h @@ -0,0 +1,48 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* + * Board config + */ +/* +#define NUM_BOARDS 2 + +#define BOARD_INFOS \ +{ \ + { \ + true, \ + false, \ + 0x00, \ + { D4, D5, D6, D7 }, \ + { D1, D0, C3, C2, C1, C0 }, \ + { B1, B2 }, \ + { false, false }, \ + NULL \ + }, \ + { \ + false, \ + false, \ + 0x20, \ + { GPB4, GPB5, GPB6, GPB7 }, \ + { GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \ + { GPB0, GPB1 }, \ + { false, false }, \ + NULL \ + }, \ +} +*/ diff --git a/keyboards/chidori/keymaps/default/keymap.c b/keyboards/chidori/keymaps/default/keymap.c new file mode 100644 index 000000000000..4aacdfb742e8 --- /dev/null +++ b/keyboards/chidori/keymaps/default/keymap.c @@ -0,0 +1,176 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#include "board.h" + +enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK }; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ + [_COLEMAK] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ + [_DVORAK] = LAYOUT( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | - | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | Home | End | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ + [_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ + [_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | |Qwerty|Colemk|Dvorak| | Ins | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Caps | | | | | Mac | | Win | - | = |Print |ScLock|Pause | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | KANA | | Home |PageDn|PageUp| End | + * `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, + KC_CAPS, _______, _______, _______, _______, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ) +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + board_set_led_by_index(0, LED_YELLOW, true); + } else { + board_set_led_by_index(0, LED_YELLOW, false); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + board_set_led_by_index(1, LED_YELLOW, true); + } else { + board_set_led_by_index(1, LED_YELLOW, false); + } +} diff --git a/keyboards/chidori/keymaps/default/readme.md b/keyboards/chidori/keymaps/default/readme.md new file mode 100644 index 000000000000..8e66dc4b39d1 --- /dev/null +++ b/keyboards/chidori/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for chidori diff --git a/keyboards/chidori/keymaps/extended/config.h b/keyboards/chidori/keymaps/extended/config.h new file mode 100644 index 000000000000..0c07b315a826 --- /dev/null +++ b/keyboards/chidori/keymaps/extended/config.h @@ -0,0 +1,59 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* + * Board config + */ +#define NUM_BOARDS 3 + +/* +#define BOARD_INFOS \ +{ \ + { \ + true, \ + false, \ + 0x00, \ + { D4, D5, D6, D7 }, \ + { D1, D0, C3, C2, C1, C0 }, \ + { B1, B2 }, \ + { false, false }, \ + NULL \ + }, \ + { \ + false, \ + false, \ + 0x20, \ + { GPB4, GPB5, GPB6, GPB7 }, \ + { GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \ + { GPB0, GPB1 }, \ + { false, false }, \ + NULL \ + }, \ + { \ + false, \ + false, \ + 0x21, \ + { GPB4, GPB5, GPB6, GPB7 }, \ + { GPA7, GPA6, GPA5, GPA4, GPA3, GPA2 }, \ + { GPB0, GPB1 }, \ + { false, false }, \ + NULL \ + }, \ +} +*/ + diff --git a/keyboards/chidori/keymaps/extended/keymap.c b/keyboards/chidori/keymaps/extended/keymap.c new file mode 100644 index 000000000000..a5c9769f0ca7 --- /dev/null +++ b/keyboards/chidori/keymaps/extended/keymap.c @@ -0,0 +1,181 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#include "board.h" + +enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK }; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | 7 | 8 | 9 | |NumLck| Esc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | | 4 | 5 | 6 | | / | Tab | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | | 1 | 2 | 3 | | * | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------| + * |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | 0 | . | | - | Bksp | + * `-----------------------------------------' `-----------------------------------------' `-----------------------------------------' + */ + [_QWERTY] = LAYOUT_extended( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL, + ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC + ), + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | | 7 | 8 | 9 | |NumLck| Esc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | | 4 | 5 | 6 | | / | Tab | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | | 1 | 2 | 3 | | * | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------| + * |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | 0 | . | | - | Bksp | + * `-----------------------------------------' `-----------------------------------------' `-----------------------------------------' + */ + [_COLEMAK] = LAYOUT_extended( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL, + ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC + ), + + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------. + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | | 7 | 8 | 9 | |NumLck| Esc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | | 4 | 5 | 6 | | / | Tab | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | | 1 | 2 | 3 | | * | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------| + * |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | 0 | . | | - | Bksp | + * `-----------------------------------------' `-----------------------------------------' `-----------------------------------------' + */ + [_DVORAK] = LAYOUT_extended( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL, + ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | 7 | 8 | 9 | |NumLck| Esc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------| + * | | | | | | | | - | _ | + | { | } | | | | 4 | 5 | 6 | | / | Tab | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | Home | End | | | 1 | 2 | 3 | | * | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | | 0 | . | | - | Bksp | + * `-----------------------------------------' `-----------------------------------------' `-----------------------------------------' + */ + [_LOWER] = LAYOUT_extended( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC, + _______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | 7 | 8 | 9 | |NumLck| Esc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | 4 | 5 | 6 | | / | Tab | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | 1 | 2 | 3 | | * | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | | 0 | . | | - | Bksp | + * `-----------------------------------------' `-----------------------------------------' `-----------------------------------------' + */ + [_RAISE] = LAYOUT_extended( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | |Qwerty|Colemk|Dvorak| | Ins | | 7 | 8 | 9 | |NumLck| Esc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------| + |------+------| + * | Caps | | | | | Mac | | Win | - | = |Print |ScLock|Pause | | 4 | 5 | 6 | | / | Tab | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | | 1 | 2 | 3 | | * | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| |-------------+------|Enter |------+------| + * | | | | | | | | | | Home |PageDn|PageUp| End | | 0 | . | | - | Bksp | + * `-----------------------------------------' `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT_extended( + _______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_ESC, + KC_CAPS, _______, _______, _______, _______, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS, KC_P4, KC_P5, KC_P6, _______, KC_PSLS, KC_TAB, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PAST, KC_PEQL, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_P0, _______, KC_PDOT,_______, KC_PMNS, KC_BSPC + ) +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + board_set_led_by_index(0, LED_YELLOW, true); + } else { + board_set_led_by_index(0, LED_YELLOW, false); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + board_set_led_by_index(1, LED_YELLOW, true); + } else { + board_set_led_by_index(1, LED_YELLOW, false); + } + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + board_set_led_by_index(2, LED_YELLOW, true); + } else { + board_set_led_by_index(2, LED_YELLOW, false); + } +} diff --git a/keyboards/chidori/keymaps/extended/readme.md b/keyboards/chidori/keymaps/extended/readme.md new file mode 100644 index 000000000000..5bfdbedcce3a --- /dev/null +++ b/keyboards/chidori/keymaps/extended/readme.md @@ -0,0 +1 @@ +# The extended keymap for chidori diff --git a/keyboards/chidori/matrix.c b/keyboards/chidori/matrix.c new file mode 100644 index 000000000000..204f236a6e7f --- /dev/null +++ b/keyboards/chidori/matrix.c @@ -0,0 +1,113 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" +#include "board.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED +extern const matrix_row_t matrix_mask[]; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +__attribute__((weak)) void matrix_init_quantum(void) { matrix_init_kb(); } + +__attribute__((weak)) void matrix_scan_quantum(void) { matrix_scan_kb(); } + +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__((weak)) void matrix_init_user(void) {} + +__attribute__((weak)) void matrix_scan_user(void) {} + +inline matrix_row_t matrix_get_row(uint8_t row) { + // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a + // switch blocker installed and the switch is always pressed. +#ifdef MATRIX_MASKED + return matrix[row] & matrix_mask[row]; +#else + return matrix[row]; +#endif +} + +void matrix_print(void) { + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); + print(": "); + print_matrix_row(row); + print("\n"); + } +} + +void matrix_init(void) { + // initialize key pins + board_init(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= board_read_cols_on_row(raw_matrix, current_row); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return 1; +} diff --git a/keyboards/chidori/readme.md b/keyboards/chidori/readme.md new file mode 100644 index 000000000000..d02b50a75865 --- /dev/null +++ b/keyboards/chidori/readme.md @@ -0,0 +1,15 @@ +# chidori + +![Chidori](https://i.imgur.com/QvpLiOvl.jpg) + +Yet another split keyboard made with only through-hole components. + +* Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro) +* Hardware Supported: Chidori PCB, ATMEGA328P +* Hardware Availability: [@kagizaraya](https://twitter.com/kagizaraya) + +Make example for this keyboard (after setting up your build environment): + + make chidori:default:usbasp + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/chidori/rules.mk b/keyboards/chidori/rules.mk new file mode 100644 index 000000000000..2e88146bac42 --- /dev/null +++ b/keyboards/chidori/rules.mk @@ -0,0 +1,44 @@ +# MCU name +MCU = atmega328p +ARCH = AVR8 +F_USB = $(F_CPU) + +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +CUSTOM_MATRIX = yes + +# project specific files +SRC += matrix.c +SRC += board.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/chidori/usbconfig.h b/keyboards/chidori/usbconfig.h new file mode 100644 index 000000000000..361868d281ce --- /dev/null +++ b/keyboards/chidori/usbconfig.h @@ -0,0 +1,397 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +// max power draw with maxed white underglow measured at 120 mA (peaks) +#define USB_CFG_MAX_BUS_POWER 100 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xED), ((VENDOR_ID >> 8) & 0xFE) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0x00), ((PRODUCT_ID >> 8) & 0x00) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'k','a','g','i','z','a','r','a','y','a' +#define USB_CFG_VENDOR_NAME_LEN 10 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'C', 'h', 'i', 'd', 'o', 'r', 'i' +#define USB_CFG_DEVICE_NAME_LEN 7 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +//#define USB_CFG_SERIAL_NUMBER 'd','m','9','r','e','c','o','r','d','s','.','c','o','m',':','p','1' +//#define USB_CFG_SERIAL_NUMBER_LEN 17 +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +// /* #define USB_INTR_CFG_CLR 0 */ +// /* #define USB_INTR_ENABLE EIMSK */ +// #define USB_INTR_ENABLE_BIT INT1 +// /* #define USB_INTR_PENDING EIFR */ +// #define USB_INTR_PENDING_BIT INTF1 +// #define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ From d3286af398c76749cc57d807ff3513d6547e9a9a Mon Sep 17 00:00:00 2001 From: Daniel H Klein Date: Tue, 4 Feb 2020 21:30:31 -0800 Subject: [PATCH 206/331] Add Uni660 Keyboard (#8018) * UniGo66 keyboard added * UniGo66 keyboard added * case correction of unigo66 files * create sirius folder * Update keyboards/sirius/unigo66/rules.mk Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/default/config.h Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/config.h Co-Authored-By: danielhklein * debugging * correct keymap to layout * readme * remove common config * suggested changes to config.h * default keymap cleanup * bug fixes * add uni660 keyboard * remove zip * remove redundant rules.mk * remove redundant via keymap * Update keyboards/sirius/uni660/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/sirius/uni660/config.h Co-Authored-By: Drashna Jaelre * remove unnecessary functions * fix if * add back via keymap, remove old eeprom code * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/rules.mk Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/rules.mk Co-Authored-By: fauxpark * changes requested for qmk * Update keyboards/sirius/uni660/rules.mk Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/rules.mk Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/rules.mk Co-Authored-By: fauxpark * debouncing and other minor changes * Update keyboards/sirius/uni660/uni660.c Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.c Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.c Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.c Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark * Update keyboards/sirius/uni660/uni660.h Co-Authored-By: fauxpark Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Drashna Jaelre Co-authored-by: fauxpark --- keyboards/sirius/uni660/config.h | 78 +++++++++ keyboards/sirius/uni660/info.json | 12 ++ .../sirius/uni660/keymaps/default/keymap.c | 11 ++ keyboards/sirius/uni660/keymaps/via/keymap.c | 35 ++++ keyboards/sirius/uni660/keymaps/via/rules.mk | 1 + keyboards/sirius/uni660/matrix.c | 160 ++++++++++++++++++ keyboards/sirius/uni660/readme.md | 13 ++ keyboards/sirius/uni660/rules.mk | 32 ++++ keyboards/sirius/uni660/uni660.c | 35 ++++ keyboards/sirius/uni660/uni660.h | 61 +++++++ 10 files changed, 438 insertions(+) create mode 100644 keyboards/sirius/uni660/config.h create mode 100644 keyboards/sirius/uni660/info.json create mode 100644 keyboards/sirius/uni660/keymaps/default/keymap.c create mode 100644 keyboards/sirius/uni660/keymaps/via/keymap.c create mode 100644 keyboards/sirius/uni660/keymaps/via/rules.mk create mode 100644 keyboards/sirius/uni660/matrix.c create mode 100644 keyboards/sirius/uni660/readme.md create mode 100644 keyboards/sirius/uni660/rules.mk create mode 100644 keyboards/sirius/uni660/uni660.c create mode 100644 keyboards/sirius/uni660/uni660.h diff --git a/keyboards/sirius/uni660/config.h b/keyboards/sirius/uni660/config.h new file mode 100644 index 000000000000..06f1c7810045 --- /dev/null +++ b/keyboards/sirius/uni660/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0x5352 // "SR" +#define PRODUCT_ID 0x0201 // Second Product First Version +#define DEVICE_VER 0x1912 // 2019.12 +#define MANUFACTURER SiRius +#define PRODUCT SiRius Uni660 +#define DESCRIPTION SiRius Uni660 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 1000000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + } while(0) + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/sirius/uni660/info.json b/keyboards/sirius/uni660/info.json new file mode 100644 index 000000000000..296626d06a2d --- /dev/null +++ b/keyboards/sirius/uni660/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Uni660", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 5.75, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.75}, {"x":1, "y":0.25}, {"x":2, "y":0}, {"x":3, "y":0.25}, {"x":4, "y":0.125}, {"x":7, "y":0.125}, {"x":8, "y":0.25}, {"x":9, "y":0}, {"x":10, "y":0.25}, {"x":11, "y":0.75}, {"x":0, "y":1.75}, {"x":1, "y":1.25}, {"x":2, "y":1}, {"x":3, "y":1.25}, {"x":4, "y":1.125}, {"x":7, "y":1.125}, {"x":8, "y":1.25}, {"x":9, "y":1}, {"x":10, "y":1.25}, {"x":11, "y":1.75}, {"x":0, "y":2.75}, {"x":1, "y":2.25}, {"x":2, "y":2}, {"x":3, "y":2.25}, {"x":4, "y":2.125}, {"x":7, "y":2.125}, {"x":8, "y":2.25}, {"x":9, "y":2}, {"x":10, "y":2.25}, {"x":11, "y":2.75}, {"x":1.5, "y":3.75}, {"x":2.5, "y":3.75}, {"x":3.5, "y":3.75}, {"x":4.5, "y":3.75}, {"x":6.5, "y":3.75}, {"x":7.5, "y":3.75}, {"x":8.5, "y":3.75}, {"x":9.5, "y":3.75}, {"x":1.5, "y":4.75}, {"x":2.5, "y":4.75}, {"x":3.5, "y":4.75}, {"x":4.5, "y":4.75}, {"x":6.5, "y":4.75}, {"x":7.5, "y":4.75}, {"x":8.5, "y":4.75}, {"x":9.5, "y":4.75}] + } + } +} diff --git a/keyboards/sirius/uni660/keymaps/default/keymap.c b/keyboards/sirius/uni660/keymaps/default/keymap.c new file mode 100644 index 000000000000..336aa84108be --- /dev/null +++ b/keyboards/sirius/uni660/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ +KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, +KC_F1, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, +KC_F2, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, +KC_F3, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, +KC_F4, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), +}; diff --git a/keyboards/sirius/uni660/keymaps/via/keymap.c b/keyboards/sirius/uni660/keymaps/via/keymap.c new file mode 100644 index 000000000000..61bac7e4d550 --- /dev/null +++ b/keyboards/sirius/uni660/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ +KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, +KC_F1, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, +KC_F2, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, +KC_F3, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, +KC_F4, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), + +[1] = LAYOUT( /* Layer 1 */ +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[2] = LAYOUT( /* Layer 2 */ +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[3] = LAYOUT( /* Layer 3 */ +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +}; diff --git a/keyboards/sirius/uni660/keymaps/via/rules.mk b/keyboards/sirius/uni660/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/sirius/uni660/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/sirius/uni660/matrix.c b/keyboards/sirius/uni660/matrix.c new file mode 100644 index 000000000000..3e231b33bc38 --- /dev/null +++ b/keyboards/sirius/uni660/matrix.c @@ -0,0 +1,160 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" +#include "debounce.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + debounce_init(MATRIX_ROWS); + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + bool matrix_has_changed = false; + + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + //the s character requests the RF slave to send the matrix + SERIAL_UART_DATA = 's'; + + //trust the external keystates entirely, erase the last data + uint8_t uart_data[17] = {0}; + + //there are 16 bytes corresponding to 16 columns, and an end byte + for (uint8_t i = 0; i < 17; i++) { + //wait for the serial data, timeout if it's been too long + //this only happened in testing with a loose wire, but does no + //harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, the key state bytes use the LSBs, so 0xE0 + //will only show up here if the correct bytes were recieved + if (uart_data[10] == 0xE0) + { + //shifting and transferring the keystates to the QMK matrix variable + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 8; + } + } + + debounce(matrix, matrix, MATRIX_ROWS, matrix_has_changed); + + matrix_scan_quantum(); + + return matrix_has_changed; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< Date: Wed, 5 Feb 2020 23:53:28 +0700 Subject: [PATCH 207/331] [Keyboard] Added Atreus Pro Micro variant (#8059) * new alternative controller. * following suggestions at qmk's 8059. * forgot to replace some underscores and keycodes. * following drashna's suggestions at qmk's 8059. * following zvecr's suggestion in qmk's 8059. * following noroadsleft's suggestion at qmk's 8059. --- keyboards/atreus/atreus.h | 2 + keyboards/atreus/keymaps/ibnuda/config.h | 5 + keyboards/atreus/keymaps/ibnuda/keymap.c | 258 +++++++++++++++++++++++ keyboards/atreus/keymaps/ibnuda/rules.mk | 7 + keyboards/atreus/promicro/config.h | 40 ++++ keyboards/atreus/promicro/promicro.c | 16 ++ keyboards/atreus/promicro/promicro.h | 17 ++ keyboards/atreus/promicro/rules.mk | 12 ++ keyboards/atreus/readme.md | 5 +- 9 files changed, 360 insertions(+), 2 deletions(-) create mode 100644 keyboards/atreus/keymaps/ibnuda/config.h create mode 100644 keyboards/atreus/keymaps/ibnuda/keymap.c create mode 100644 keyboards/atreus/keymaps/ibnuda/rules.mk create mode 100644 keyboards/atreus/promicro/config.h create mode 100644 keyboards/atreus/promicro/promicro.c create mode 100644 keyboards/atreus/promicro/promicro.h create mode 100644 keyboards/atreus/promicro/rules.mk diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h index 88dd4d9dc8d2..a3d350775991 100644 --- a/keyboards/atreus/atreus.h +++ b/keyboards/atreus/atreus.h @@ -24,6 +24,8 @@ #include "astar_mirrored.h" #elif KEYBOARD_atreus_teensy2 #include "teensy2.h" +#elif KEYBOARD_atreus_promicro + #include "promicro.h" #endif // This a shortcut to help you visually see your layout. diff --git a/keyboards/atreus/keymaps/ibnuda/config.h b/keyboards/atreus/keymaps/ibnuda/config.h new file mode 100644 index 000000000000..625abe488fcc --- /dev/null +++ b/keyboards/atreus/keymaps/ibnuda/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT +#define COMBO_COUNT 15 diff --git a/keyboards/atreus/keymaps/ibnuda/keymap.c b/keyboards/atreus/keymaps/ibnuda/keymap.c new file mode 100644 index 000000000000..3c1c0f45034f --- /dev/null +++ b/keyboards/atreus/keymaps/ibnuda/keymap.c @@ -0,0 +1,258 @@ +#include QMK_KEYBOARD_H + +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_TAP, +} td_state_t; + +static td_state_t td_state; + +int current_dance(qk_tap_dance_state_t *state); + +void dance_tmb_finished(qk_tap_dance_state_t *state, void *user_data); +void dance_tmb_reset(qk_tap_dance_state_t *state, void *user_data); + +// enum for tap dances. +enum { + TD_DLT_CTLDLT = 0, + TD_SCLN_CLN, + TD_LEFT_THUMB, +}; + +// enum for combos. +enum combos { + // left hand combinations. + COLON_COMMA, + COMMA_DOT, + DOT_P, + Q_J, + J_K, + + // right hand combinations. + L_R, + R_C, + C_G, + V_W, + W_M, + + // both hands combinations. + DOT_C, + J_W, + P_G, + U_H, + K_M, +}; + +enum { + _BASE, + _LOWER, + _RAISE, + _ADJUST, + _MUIS +}; + +// thumb keys. +#define ALT_ENT ALT_T(KC_ENT) +#define SFT_ESC SFT_T(KC_ESC) + +// home row mods. +#define CT_O RCTL_T(KC_O) +#define CT_N RCTL_T(KC_N) +#define SH_A RSFT_T(KC_A) +#define SH_S RSFT_T(KC_S) +#define AL_E RALT_T(KC_E) +#define AL_T RALT_T(KC_T) +#define GU_I RGUI_T(KC_I) +#define GU_D RGUI_T(KC_D) + +// layer toggle. +#define LW_BSPC LT(_LOWER, KC_BSPC) +#define RS_SPC LT(_RAISE, KC_SPC) +#define RS_D LT(_RAISE, KC_D) +#define LW_I LT(_LOWER, KC_I) +#define MU_QUOT LT(_MUIS, KC_QUOT) +#define MU_Z LT(_MUIS, KC_Z) + +// idk, man. not used, i guess. +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) +#define ADDDD MO(_ADJUST) +#define MUIS MO(_MUIS) + +// common shortcuts for windows and linux that i use. +#define NXTTAB LCTL(KC_PGDN) +#define PRVTAB LCTL(KC_PGUP) +#define UPTAB LCTL(LSFT(KC_PGUP)) +#define DNTAB LCTL(LSFT(KC_PGDN)) +#define NXTWIN LALT(KC_TAB) +#define PRVWIN LALT(LSFT(KC_TAB)) +#define CALDL LCTL(LALT(KC_DELT)) +#define TSKMGR LCTL(LSFT(KC_ESC)) +#define EXPLR LGUI(KC_E) +#define LCKGUI LGUI(KC_L) +#define CONPST LSFT(KC_INS) +#define CLSGUI LALT(KC_F4) + +// tap dances +#define CTL_DLT TD(TD_DLT_CTLDLT) +#define SM_CLN TD(TD_SCLN_CLN) +#define LFT_TMB TD(TD_LEFT_THUMB) + +// left hand combinations. +const uint16_t PROGMEM colon_comma_combo[] = {KC_SCLN, KC_COMM, COMBO_END}; +const uint16_t PROGMEM comma_dot_combo[] = {KC_COMM, KC_DOT, COMBO_END}; +const uint16_t PROGMEM dot_p_combo[] = {KC_DOT, KC_P, COMBO_END}; +const uint16_t PROGMEM q_j_combo[] = {KC_Q, KC_J, COMBO_END}; +const uint16_t PROGMEM j_k_combo[] = {KC_J, KC_K, COMBO_END}; + +// right hand combinations. +const uint16_t PROGMEM l_r_combo[] = {KC_L, KC_R, COMBO_END}; +const uint16_t PROGMEM r_c_combo[] = {KC_R, KC_C, COMBO_END}; +const uint16_t PROGMEM c_g_combo[] = {KC_C, KC_G, COMBO_END}; +const uint16_t PROGMEM v_w_combo[] = {KC_V, KC_W, COMBO_END}; +const uint16_t PROGMEM w_m_combo[] = {KC_W, KC_M, COMBO_END}; + +// both hand combinations. +const uint16_t PROGMEM dot_c_combo[] = {KC_DOT, KC_C, COMBO_END}; +const uint16_t PROGMEM j_w_combo[] = {KC_J, KC_W, COMBO_END}; +const uint16_t PROGMEM u_h_combo[] = {KC_U, KC_H, COMBO_END}; +const uint16_t PROGMEM p_g_combo[] = {KC_P, KC_G, COMBO_END}; +const uint16_t PROGMEM k_m_combo[] = {KC_K, KC_M, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + // left hand combinations. + [COLON_COMMA] = COMBO(colon_comma_combo, KC_TAB), + [COMMA_DOT] = COMBO(comma_dot_combo, KC_QUES), + [DOT_P] = COMBO(dot_p_combo, KC_UNDS), + [Q_J] = COMBO(q_j_combo, LCTL(KC_W)), + [J_K] = COMBO(j_k_combo, KC_DELT), + + // right hand combinations. + [L_R] = COMBO(l_r_combo, KC_BSPC), + [R_C] = COMBO(r_c_combo, KC_SLSH), + [C_G] = COMBO(c_g_combo, KC_MINS), + [V_W] = COMBO(v_w_combo, KC_APP), + [W_M] = COMBO(w_m_combo, KC_DELT), + + // both hand combinations. + [DOT_C] = COMBO(dot_c_combo, KC_PGUP), + [J_W] = COMBO(j_w_combo, KC_PGDN), + [U_H] = COMBO(u_h_combo, KC_ENT), + [P_G] = COMBO(p_g_combo, KC_HOME), + [K_M] = COMBO(k_m_combo, KC_END), +}; + +void dance_dlt_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code16(KC_DELT); + } else { + register_code16(C(KC_DELT)); + } +} + +void dance_dlt_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code16(KC_DELT); + } else { + unregister_code16(C(KC_DELT)); + } +} + +void dance_cln_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_LSFT); + } + register_code(KC_SCLN); +} + +void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_LSFT); + } + unregister_code(KC_SCLN); +} + +int current_dance(qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { + return SINGLE_TAP; + } else { + return SINGLE_HOLD; + } + } + if (state->count == 2) { + return DOUBLE_TAP; + } else { + return 3; + } +} + +void dance_tmb_finished(qk_tap_dance_state_t *state, void *user_data) { + td_state = current_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_ESC); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_TAP: + register_code16(KC_DELT); + break; + } +} + +void dance_tmb_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + unregister_code16(KC_ESC); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_TAP: + unregister_code16(KC_DELT); + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_DLT_CTLDLT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_dlt_finished, dance_dlt_reset), + [TD_SCLN_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset), + [TD_LEFT_THUMB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_tmb_finished, dance_tmb_reset), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( + SM_CLN, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, + SH_A, CT_O, AL_E, KC_U, GU_I, GU_D, KC_H, AL_T, CT_N, SH_S, + MU_QUOT,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, MU_Z, + _______,_______,_______,_______,LW_BSPC,SFT_ESC, ALT_ENT,RS_SPC, _______,_______,_______,_______ +), + +[_RAISE] = LAYOUT( + KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR, KC_BSLS,KC_7, KC_8, KC_9, KC_ASTR , + KC_HASH,KC_LEFT,KC_DOWN,KC_RGHT,KC_DLR, KC_EQL, KC_4, KC_5, KC_6, KC_TILD , + KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_PLUS , + _______,_______,_______,_______,ADDDD, _______, ALT_ENT,RS_SPC, _______,KC_0, _______,_______ +), +[_LOWER] = LAYOUT( + KC_ESC, KC_QUES,KC_UNDS,KC_F1, KC_F2, KC_F3, KC_F4, KC_MINS,KC_SLSH,KC_BSPC , + KC_LSFT,KC_TAB, KC_PGUP,KC_F5, KC_F6, KC_F7, KC_F8, KC_HOME,KC_LALT,KC_ENT , + KC_CLCK,KC_SLCK,KC_PGDN,KC_F9, KC_F10, KC_F11, KC_F12, KC_END, KC_INS, KC_SLSH , + _______,_______,_______,_______,ADDDD, _______, KC_DELT,ADDDD, _______,_______,_______,_______ +), +[_ADJUST] = LAYOUT( + _______,EXPLR, KC_UP, PRVTAB, PRVWIN, NXTWIN, NXTTAB, _______,_______,LCKGUI, + TSKMGR, KC_LEFT,KC_DOWN,KC_RGHT,UPTAB, DNTAB, KC_ENT, KC_LGUI,_______,CALDL, + _______,CLSGUI, _______,CONPST, RESET, _______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ +), +[_MUIS] = LAYOUT( + _______,KC_BTN2,KC_MS_U,KC_BTN1,_______, _______,KC_BTN1,KC_MS_U,KC_BTN2,_______, + _______,KC_MS_L,KC_MS_D,KC_MS_R,_______, _______,KC_MS_L,KC_MS_D,KC_MS_R,_______, + _______,_______,KC_WH_D,KC_WH_U,_______, _______,KC_WH_U,KC_WH_D,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ +), +}; diff --git a/keyboards/atreus/keymaps/ibnuda/rules.mk b/keyboards/atreus/keymaps/ibnuda/rules.mk new file mode 100644 index 000000000000..ce80219d1a56 --- /dev/null +++ b/keyboards/atreus/keymaps/ibnuda/rules.mk @@ -0,0 +1,7 @@ +# Build Options +# change yes to no to disable +# + +MOUSEKEY_ENABLE = yes +COMBO_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/atreus/promicro/config.h b/keyboards/atreus/promicro/config.h new file mode 100644 index 000000000000..03b63f6ff329 --- /dev/null +++ b/keyboards/atreus/promicro/config.h @@ -0,0 +1,40 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, B2, B4, B5 } +#if defined(PCBDOWN) + #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B6, B3, B1, F7, F6, F5 } +#else + #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B6, E6, D7, C6, D4, D0 } +#endif +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/promicro/promicro.c b/keyboards/atreus/promicro/promicro.c new file mode 100644 index 000000000000..ad08ac9f0147 --- /dev/null +++ b/keyboards/atreus/promicro/promicro.c @@ -0,0 +1,16 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "promicro.h" diff --git a/keyboards/atreus/promicro/promicro.h b/keyboards/atreus/promicro/promicro.h new file mode 100644 index 000000000000..bf74ceb17f4b --- /dev/null +++ b/keyboards/atreus/promicro/promicro.h @@ -0,0 +1,17 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once diff --git a/keyboards/atreus/promicro/rules.mk b/keyboards/atreus/promicro/rules.mk new file mode 100644 index 000000000000..e6fef517279c --- /dev/null +++ b/keyboards/atreus/promicro/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 0dbd098ca703..0f499ca2a28d 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -16,8 +16,9 @@ Make example for this keyboard (after setting up your build environment): If you would like to use one of the alternative controllers: - make atreus/astar:default:avrdude - make atreus/teensy2:default:teensy + make atreus/astar:default:flash + make atreus/teensy2:default:flash + make atreus/promicro:default:flash If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands, e.g. From b32a9a201dfd02fa6cd131011319bfd1e99e0af5 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Thu, 6 Feb 2020 00:12:53 +0700 Subject: [PATCH 208/331] [Keyboard] add Infinity CE (#8067) * add new pcb Inffinity CE * update * Update config.h PID change, rgb version will be release * Update config.h * Update infinityce.c --- keyboards/mechlovin/infinityce/config.h | 49 +++ keyboards/mechlovin/infinityce/infinityce.c | 42 +++ keyboards/mechlovin/infinityce/infinityce.h | 67 ++++ keyboards/mechlovin/infinityce/info.json | 293 ++++++++++++++++++ .../infinityce/keymaps/default/keymap.c | 29 ++ .../infinityce/keymaps/default/readme.md | 1 + .../mechlovin/infinityce/keymaps/via/keymap.c | 53 ++++ .../infinityce/keymaps/via/readme.md | 3 + .../mechlovin/infinityce/keymaps/via/rules.mk | 1 + keyboards/mechlovin/infinityce/readme.md | 19 ++ keyboards/mechlovin/infinityce/rules.mk | 32 ++ 11 files changed, 589 insertions(+) create mode 100644 keyboards/mechlovin/infinityce/config.h create mode 100644 keyboards/mechlovin/infinityce/infinityce.c create mode 100644 keyboards/mechlovin/infinityce/infinityce.h create mode 100644 keyboards/mechlovin/infinityce/info.json create mode 100644 keyboards/mechlovin/infinityce/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/infinityce/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/infinityce/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/infinityce/keymaps/via/readme.md create mode 100644 keyboards/mechlovin/infinityce/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/infinityce/readme.md create mode 100644 keyboards/mechlovin/infinityce/rules.mk diff --git a/keyboards/mechlovin/infinityce/config.h b/keyboards/mechlovin/infinityce/config.h new file mode 100644 index 000000000000..ff10e183d540 --- /dev/null +++ b/keyboards/mechlovin/infinityce/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 mechlovin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D4C // ML-Mechlovin +#define PRODUCT_ID 0x8801 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Team.Mechlovin +#define PRODUCT Infinity CE +#define DESCRIPTION Team.Mechlovin Infinity CE +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +#define MATRIX_ROW_PINS { D7, D6, B6, B1, C6, C7 } +#define MATRIX_COL_PINS { B5, B4, B0, D5, D4, D1, D0, E6, F7, F6, F5, F4, F1, F0, B2, D3, D2} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 31 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_ANIMATIONS \ No newline at end of file diff --git a/keyboards/mechlovin/infinityce/infinityce.c b/keyboards/mechlovin/infinityce/infinityce.c new file mode 100644 index 000000000000..5d75b480b3d7 --- /dev/null +++ b/keyboards/mechlovin/infinityce/infinityce.c @@ -0,0 +1,42 @@ +/* Copyright 2020 mechlovin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "infinityce.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + setPinOutput(B3); +} +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B3, led_state.caps_lock); + rgblight_set_effect_range(1, 30); + if (led_state.scroll_lock) { + rgblight_setrgb_at(255, 255, 255, 0); + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } + } + return res; +} \ No newline at end of file diff --git a/keyboards/mechlovin/infinityce/infinityce.h b/keyboards/mechlovin/infinityce/infinityce.h new file mode 100644 index 000000000000..26a8f3749317 --- /dev/null +++ b/keyboards/mechlovin/infinityce/infinityce.h @@ -0,0 +1,67 @@ +/* Copyright 2020 mechlovin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4G, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4G, KC_NO }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ +} + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4G, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO, KC_NO }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, KC_NO, K4G, KC_NO }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ +} + +#define LAYOUT_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4G, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, KC_NO, K4G, KC_NO }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ +} diff --git a/keyboards/mechlovin/infinityce/info.json b/keyboards/mechlovin/infinityce/info.json new file mode 100644 index 000000000000..61801e991fe5 --- /dev/null +++ b/keyboards/mechlovin/infinityce/info.json @@ -0,0 +1,293 @@ +{ + "keyboard_name": "Infinity CE", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "key_count": 91, + "layout": [ + {"label":"K00 (B0,B6)", "x":0, "y":0}, + {"label":"K01 (B0,B7)", "x":1.25, "y":0}, + {"label":"K02 (B0,C0)", "x":2.25, "y":0}, + {"label":"K03 (B0,C1)", "x":3.25, "y":0}, + {"label":"K04 (B0,C2)", "x":4.25, "y":0}, + {"label":"K05 (B0,C3)", "x":5.5, "y":0}, + {"label":"K06 (B0,C4)", "x":6.5, "y":0}, + {"label":"K07 (B0,C5)", "x":7.5, "y":0}, + {"label":"K08 (B0,C6)", "x":8.5, "y":0}, + {"label":"K09 (B0,C7)", "x":9.75, "y":0}, + {"label":"K0A (B0,D0)", "x":10.75, "y":0}, + {"label":"K0B (B0,D1)", "x":11.75, "y":0}, + {"label":"K0C (B0,D2)", "x":12.75, "y":0}, + {"label":"K0D (B0,D3)", "x":14, "y":0}, + {"label":"K0E (B0,D4)", "x":15.25, "y":0}, + {"label":"K0F (B0,D5)", "x":16.25, "y":0}, + {"label":"K0G (B0,D6)", "x":17.25, "y":0}, + {"label":"K10 (B1,B6)", "x":0, "y":1.25}, + {"label":"K11 (B1,B7)", "x":1, "y":1.25}, + {"label":"K12 (B1,C0)", "x":2, "y":1.25}, + {"label":"K13 (B1,C1)", "x":3, "y":1.25}, + {"label":"K14 (B1,C2)", "x":4, "y":1.25}, + {"label":"K15 (B1,C3)", "x":5, "y":1.25}, + {"label":"K16 (B1,C4)", "x":6, "y":1.25}, + {"label":"K17 (B1,C5)", "x":7, "y":1.25}, + {"label":"K18 (B1,C6)", "x":8, "y":1.25}, + {"label":"K19 (B1,C7)", "x":9, "y":1.25}, + {"label":"K1A (B1,D0)", "x":10, "y":1.25}, + {"label":"K1B (B1,D1)", "x":11, "y":1.25}, + {"label":"K1C (B1,D2)", "x":12, "y":1.25}, + {"label":"K1D (B1,D3)", "x":13, "y":1.25, "w":2}, + {"label":"K1E (B1,D4)", "x":15.25, "y":1.25}, + {"label":"K1F (B1,D5)", "x":16.25, "y":1.25}, + {"label":"K1G (B1,D6)", "x":17.25, "y":1.25}, + {"label":"K20 (B2,B6)", "x":0, "y":2.25, "w":1.5}, + {"label":"K21 (B2,B7)", "x":1.5, "y":2.25}, + {"label":"K22 (B2,C0)", "x":2.5, "y":2.25}, + {"label":"K23 (B2,C1)", "x":3.5, "y":2.25}, + {"label":"K24 (B2,C2)", "x":4.5, "y":2.25}, + {"label":"K25 (B2,C3)", "x":5.5, "y":2.25}, + {"label":"K26 (B2,C4)", "x":6.5, "y":2.25}, + {"label":"K27 (B2,C5)", "x":7.5, "y":2.25}, + {"label":"K28 (B2,C6)", "x":8.5, "y":2.25}, + {"label":"K29 (B2,C7)", "x":9.5, "y":2.25}, + {"label":"K2A (B2,D0)", "x":10.5, "y":2.25}, + {"label":"K2B (B2,D1)", "x":11.5, "y":2.25}, + {"label":"K2C (B2,D2)", "x":12.5, "y":2.25}, + {"label":"K2D (B2,D3)", "x":13.5, "y":2.25, "w":1.5}, + {"label":"K2E (B2,D4)", "x":15.25, "y":2.25}, + {"label":"K2F (B2,D5)", "x":16.25, "y":2.25}, + {"label":"K2G (B2,D6)", "x":17.25, "y":2.25}, + {"label":"K30 (B3,B6)", "x":0, "y":3.25, "w":1.75}, + {"label":"K31 (B3,B7)", "x":1.75, "y":3.25}, + {"label":"K32 (B3,C0)", "x":2.75, "y":3.25}, + {"label":"K33 (B3,C1)", "x":3.75, "y":3.25}, + {"label":"K34 (B3,C2)", "x":4.75, "y":3.25}, + {"label":"K35 (B3,C3)", "x":5.75, "y":3.25}, + {"label":"K36 (B3,C4)", "x":6.75, "y":3.25}, + {"label":"K37 (B3,C5)", "x":7.75, "y":3.25}, + {"label":"K38 (B3,C6)", "x":8.75, "y":3.25}, + {"label":"K39 (B3,C7)", "x":9.75, "y":3.25}, + {"label":"K3A (B3,D0)", "x":10.75, "y":3.25}, + {"label":"K3B (B3,D1)", "x":11.75, "y":3.25}, + {"label":"K3C (B3,D2)", "x":12.75, "y":3.25}, + {"label":"K3D (B3,D3)", "x":13.75, "y":3.25, "w":1.25}, + {"label":"K40 (B4,B6)", "x":0, "y":4.25, "w":1.25}, + {"label":"K41 (B4,B7)", "x":1.25, "y":4.25}, + {"label":"K42 (B4,C0)", "x":2.25, "y":4.25}, + {"label":"K43 (B4,C1)", "x":3.25, "y":4.25}, + {"label":"K44 (B4,C2)", "x":4.25, "y":4.25}, + {"label":"K45 (B4,C3)", "x":5.25, "y":4.25}, + {"label":"K46 (B4,C4)", "x":6.25, "y":4.25}, + {"label":"K47 (B4,C5)", "x":7.25, "y":4.25}, + {"label":"K48 (B4,C6)", "x":8.25, "y":4.25}, + {"label":"K49 (B4,C7)", "x":9.25, "y":4.25}, + {"label":"K4A (B4,D0)", "x":10.25, "y":4.25}, + {"label":"K4B (B4,D1)", "x":11.25, "y":4.25}, + {"label":"K4C (B4,D2)", "x":12.25, "y":4.25, "w":1.75}, + {"label":"K4D (B4,D3)", "x":14, "y":4.25}, + {"label":"K4F (B4,D5)", "x":16.25, "y":4.25}, + {"label":"K50 (B5,B6)", "x":0, "y":5.25, "w":1.25}, + {"label":"K51 (B5,B7)", "x":1.25, "y":5.25, "w":1.25}, + {"label":"K52 (B5,C0)", "x":2.5, "y":5.25, "w":1.25}, + {"label":"K56 (B5,C4)", "x":3.75, "y":5.25, "w":6.25}, + {"label":"K5A (B5,D0)", "x":10, "y":5.25, "w":1.25}, + {"label":"K5B (B5,D1)", "x":11.25, "y":5.25, "w":1.25}, + {"label":"K5C (B5,D2)", "x":12.5, "y":5.25, "w":1.25}, + {"label":"K5D (B5,D3)", "x":13.75, "y":5.25, "w":1.25}, + {"label":"K5E (B5,D4)", "x":15.25, "y":5.25}, + {"label":"K5F (B5,D5)", "x":16.25, "y":5.25}, + {"label":"K5G (B5,D6)", "x":17.25, "y":5.25} + ] + }, + "LAYOUT_ansi": { + "key_count": 88, + "layout": [ + {"label":"K00 (B0,B6)", "x":0, "y":0}, + {"label":"K01 (B0,B7)", "x":1.25, "y":0}, + {"label":"K02 (B0,C0)", "x":2.25, "y":0}, + {"label":"K03 (B0,C1)", "x":3.25, "y":0}, + {"label":"K04 (B0,C2)", "x":4.25, "y":0}, + {"label":"K05 (B0,C3)", "x":5.5, "y":0}, + {"label":"K06 (B0,C4)", "x":6.5, "y":0}, + {"label":"K07 (B0,C5)", "x":7.5, "y":0}, + {"label":"K08 (B0,C6)", "x":8.5, "y":0}, + {"label":"K09 (B0,C7)", "x":9.75, "y":0}, + {"label":"K0A (B0,D0)", "x":10.75, "y":0}, + {"label":"K0B (B0,D1)", "x":11.75, "y":0}, + {"label":"K0C (B0,D2)", "x":12.75, "y":0}, + {"label":"K0D (B0,D3)", "x":14, "y":0}, + {"label":"K0E (B0,D4)", "x":15.25, "y":0}, + {"label":"K0F (B0,D5)", "x":16.25, "y":0}, + {"label":"K0G (B0,D6)", "x":17.25, "y":0}, + {"label":"K10 (B1,B6)", "x":0, "y":1.25}, + {"label":"K11 (B1,B7)", "x":1, "y":1.25}, + {"label":"K12 (B1,C0)", "x":2, "y":1.25}, + {"label":"K13 (B1,C1)", "x":3, "y":1.25}, + {"label":"K14 (B1,C2)", "x":4, "y":1.25}, + {"label":"K15 (B1,C3)", "x":5, "y":1.25}, + {"label":"K16 (B1,C4)", "x":6, "y":1.25}, + {"label":"K17 (B1,C5)", "x":7, "y":1.25}, + {"label":"K18 (B1,C6)", "x":8, "y":1.25}, + {"label":"K19 (B1,C7)", "x":9, "y":1.25}, + {"label":"K1A (B1,D0)", "x":10, "y":1.25}, + {"label":"K1B (B1,D1)", "x":11, "y":1.25}, + {"label":"K1C (B1,D2)", "x":12, "y":1.25}, + {"label":"K1D (B1,D3)", "x":13, "y":1.25, "w":2}, + {"label":"K1E (B1,D4)", "x":15.25, "y":1.25}, + {"label":"K1F (B1,D5)", "x":16.25, "y":1.25}, + {"label":"K1G (B1,D6)", "x":17.25, "y":1.25}, + {"label":"K20 (B2,B6)", "x":0, "y":2.25, "w":1.5}, + {"label":"K21 (B2,B7)", "x":1.5, "y":2.25}, + {"label":"K22 (B2,C0)", "x":2.5, "y":2.25}, + {"label":"K23 (B2,C1)", "x":3.5, "y":2.25}, + {"label":"K24 (B2,C2)", "x":4.5, "y":2.25}, + {"label":"K25 (B2,C3)", "x":5.5, "y":2.25}, + {"label":"K26 (B2,C4)", "x":6.5, "y":2.25}, + {"label":"K27 (B2,C5)", "x":7.5, "y":2.25}, + {"label":"K28 (B2,C6)", "x":8.5, "y":2.25}, + {"label":"K29 (B2,C7)", "x":9.5, "y":2.25}, + {"label":"K2A (B2,D0)", "x":10.5, "y":2.25}, + {"label":"K2B (B2,D1)", "x":11.5, "y":2.25}, + {"label":"K2C (B2,D2)", "x":12.5, "y":2.25}, + {"label":"K2D (B2,D3)", "x":13.5, "y":2.25, "w":1.5}, + {"label":"K2E (B2,D4)", "x":15.25, "y":2.25}, + {"label":"K2F (B2,D5)", "x":16.25, "y":2.25}, + {"label":"K2G (B2,D6)", "x":17.25, "y":2.25}, + {"label":"K30 (B3,B6)", "x":0, "y":3.25, "w":1.75}, + {"label":"K31 (B3,B7)", "x":1.75, "y":3.25}, + {"label":"K32 (B3,C0)", "x":2.75, "y":3.25}, + {"label":"K33 (B3,C1)", "x":3.75, "y":3.25}, + {"label":"K34 (B3,C2)", "x":4.75, "y":3.25}, + {"label":"K35 (B3,C3)", "x":5.75, "y":3.25}, + {"label":"K36 (B3,C4)", "x":6.75, "y":3.25}, + {"label":"K37 (B3,C5)", "x":7.75, "y":3.25}, + {"label":"K38 (B3,C6)", "x":8.75, "y":3.25}, + {"label":"K39 (B3,C7)", "x":9.75, "y":3.25}, + {"label":"K3A (B3,D0)", "x":10.75, "y":3.25}, + {"label":"K3B (B3,D1)", "x":11.75, "y":3.25}, + {"label":"K3D (B3,D3)", "x":12.75, "y":3.25, "w":2.25}, + {"label":"K40 (B4,B6)", "x":0, "y":4.25, "w":2.25}, + {"label":"K42 (B4,C0)", "x":2.25, "y":4.25}, + {"label":"K43 (B4,C1)", "x":3.25, "y":4.25}, + {"label":"K44 (B4,C2)", "x":4.25, "y":4.25}, + {"label":"K45 (B4,C3)", "x":5.25, "y":4.25}, + {"label":"K46 (B4,C4)", "x":6.25, "y":4.25}, + {"label":"K47 (B4,C5)", "x":7.25, "y":4.25}, + {"label":"K48 (B4,C6)", "x":8.25, "y":4.25}, + {"label":"K49 (B4,C7)", "x":9.25, "y":4.25}, + {"label":"K4A (B4,D0)", "x":10.25, "y":4.25}, + {"label":"K4B (B4,D1)", "x":11.25, "y":4.25}, + {"label":"K4D (B4,D3)", "x":12.25, "y":4.25, "w":2.75}, + {"label":"K4F (B4,D5)", "x":16.25, "y":4.25}, + {"label":"K50 (B5,B6)", "x":0, "y":5.25, "w":1.25}, + {"label":"K51 (B5,B7)", "x":1.25, "y":5.25, "w":1.25}, + {"label":"K52 (B5,C0)", "x":2.5, "y":5.25, "w":1.25}, + {"label":"K56 (B5,C4)", "x":3.75, "y":5.25, "w":6.25}, + {"label":"K5A (B5,D0)", "x":10, "y":5.25, "w":1.25}, + {"label":"K5B (B5,D1)", "x":11.25, "y":5.25, "w":1.25}, + {"label":"K5C (B5,D2)", "x":12.5, "y":5.25, "w":1.25}, + {"label":"K5D (B5,D3)", "x":13.75, "y":5.25, "w":1.25}, + {"label":"K5E (B5,D4)", "x":15.25, "y":5.25}, + {"label":"K5F (B5,D5)", "x":16.25, "y":5.25}, + {"label":"K5G (B5,D6)", "x":17.25, "y":5.25} + ] + }, + "LAYOUT_iso": { + "key_count": 89, + "layout": [ + {"label":"K00 (B0,B6)", "x":0, "y":0}, + {"label":"K01 (B0,B7)", "x":1.25, "y":0}, + {"label":"K02 (B0,C0)", "x":2.25, "y":0}, + {"label":"K03 (B0,C1)", "x":3.25, "y":0}, + {"label":"K04 (B0,C2)", "x":4.25, "y":0}, + {"label":"K05 (B0,C3)", "x":5.5, "y":0}, + {"label":"K06 (B0,C4)", "x":6.5, "y":0}, + {"label":"K07 (B0,C5)", "x":7.5, "y":0}, + {"label":"K08 (B0,C6)", "x":8.5, "y":0}, + {"label":"K09 (B0,C7)", "x":9.75, "y":0}, + {"label":"K0A (B0,D0)", "x":10.75, "y":0}, + {"label":"K0B (B0,D1)", "x":11.75, "y":0}, + {"label":"K0C (B0,D2)", "x":12.75, "y":0}, + {"label":"K0D (B0,D3)", "x":14, "y":0}, + {"label":"K0E (B0,D4)", "x":15.25, "y":0}, + {"label":"K0F (B0,D5)", "x":16.25, "y":0}, + {"label":"K0G (B0,D6)", "x":17.25, "y":0}, + {"label":"K10 (B1,B6)", "x":0, "y":1.25}, + {"label":"K11 (B1,B7)", "x":1, "y":1.25}, + {"label":"K12 (B1,C0)", "x":2, "y":1.25}, + {"label":"K13 (B1,C1)", "x":3, "y":1.25}, + {"label":"K14 (B1,C2)", "x":4, "y":1.25}, + {"label":"K15 (B1,C3)", "x":5, "y":1.25}, + {"label":"K16 (B1,C4)", "x":6, "y":1.25}, + {"label":"K17 (B1,C5)", "x":7, "y":1.25}, + {"label":"K18 (B1,C6)", "x":8, "y":1.25}, + {"label":"K19 (B1,C7)", "x":9, "y":1.25}, + {"label":"K1A (B1,D0)", "x":10, "y":1.25}, + {"label":"K1B (B1,D1)", "x":11, "y":1.25}, + {"label":"K1C (B1,D2)", "x":12, "y":1.25}, + {"label":"K1D (B1,D3)", "x":13, "y":1.25, "w":2}, + {"label":"K1E (B1,D4)", "x":15.25, "y":1.25}, + {"label":"K1F (B1,D5)", "x":16.25, "y":1.25}, + {"label":"K1G (B1,D6)", "x":17.25, "y":1.25}, + {"label":"K20 (B2,B6)", "x":0, "y":2.25, "w":1.5}, + {"label":"K21 (B2,B7)", "x":1.5, "y":2.25}, + {"label":"K22 (B2,C0)", "x":2.5, "y":2.25}, + {"label":"K23 (B2,C1)", "x":3.5, "y":2.25}, + {"label":"K24 (B2,C2)", "x":4.5, "y":2.25}, + {"label":"K25 (B2,C3)", "x":5.5, "y":2.25}, + {"label":"K26 (B2,C4)", "x":6.5, "y":2.25}, + {"label":"K27 (B2,C5)", "x":7.5, "y":2.25}, + {"label":"K28 (B2,C6)", "x":8.5, "y":2.25}, + {"label":"K29 (B2,C7)", "x":9.5, "y":2.25}, + {"label":"K2A (B2,D0)", "x":10.5, "y":2.25}, + {"label":"K2B (B2,D1)", "x":11.5, "y":2.25}, + {"label":"K2C (B2,D2)", "x":12.5, "y":2.25}, + {"label":"K2E (B2,D4)", "x":15.25, "y":2.25}, + {"label":"K2F (B2,D5)", "x":16.25, "y":2.25}, + {"label":"K2G (B2,D6)", "x":17.25, "y":2.25}, + {"label":"K30 (B3,B6)", "x":0, "y":3.25, "w":1.75}, + {"label":"K31 (B3,B7)", "x":1.75, "y":3.25}, + {"label":"K32 (B3,C0)", "x":2.75, "y":3.25}, + {"label":"K33 (B3,C1)", "x":3.75, "y":3.25}, + {"label":"K34 (B3,C2)", "x":4.75, "y":3.25}, + {"label":"K35 (B3,C3)", "x":5.75, "y":3.25}, + {"label":"K36 (B3,C4)", "x":6.75, "y":3.25}, + {"label":"K37 (B3,C5)", "x":7.75, "y":3.25}, + {"label":"K38 (B3,C6)", "x":8.75, "y":3.25}, + {"label":"K39 (B3,C7)", "x":9.75, "y":3.25}, + {"label":"K3A (B3,D0)", "x":10.75, "y":3.25}, + {"label":"K3B (B3,D1)", "x":11.75, "y":3.25}, + {"label":"K3C (B3,D2)", "x":12.75, "y":3.25}, + {"label":"K3D (B3,D3)", "x":13.75, "y":2.25, "w":1.25, "h":2}, + {"label":"K40 (B4,B6)", "x":0, "y":4.25, "w":1.25}, + {"label":"K41 (B4,B7)", "x":1.25, "y":4.25}, + {"label":"K42 (B4,C0)", "x":2.25, "y":4.25}, + {"label":"K43 (B4,C1)", "x":3.25, "y":4.25}, + {"label":"K44 (B4,C2)", "x":4.25, "y":4.25}, + {"label":"K45 (B4,C3)", "x":5.25, "y":4.25}, + {"label":"K46 (B4,C4)", "x":6.25, "y":4.25}, + {"label":"K47 (B4,C5)", "x":7.25, "y":4.25}, + {"label":"K48 (B4,C6)", "x":8.25, "y":4.25}, + {"label":"K49 (B4,C7)", "x":9.25, "y":4.25}, + {"label":"K4A (B4,D0)", "x":10.25, "y":4.25}, + {"label":"K4B (B4,D1)", "x":11.25, "y":4.25}, + {"label":"K4D (B4,D3)", "x":12.25, "y":4.25, "w":2.75}, + {"label":"K4F (B4,D5)", "x":16.25, "y":4.25}, + {"label":"K50 (B5,B6)", "x":0, "y":5.25, "w":1.25}, + {"label":"K51 (B5,B7)", "x":1.25, "y":5.25, "w":1.25}, + {"label":"K52 (B5,C0)", "x":2.5, "y":5.25, "w":1.25}, + {"label":"K56 (B5,C4)", "x":3.75, "y":5.25, "w":6.25}, + {"label":"K5A (B5,D0)", "x":10, "y":5.25, "w":1.25}, + {"label":"K5B (B5,D1)", "x":11.25, "y":5.25, "w":1.25}, + {"label":"K5C (B5,D2)", "x":12.5, "y":5.25, "w":1.25}, + {"label":"K5D (B5,D3)", "x":13.75, "y":5.25, "w":1.25}, + {"label":"K5E (B5,D4)", "x":15.25, "y":5.25}, + {"label":"K5F (B5,D5)", "x":16.25, "y":5.25}, + {"label":"K5G (B5,D6)", "x":17.25, "y":5.25} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} \ No newline at end of file diff --git a/keyboards/mechlovin/infinityce/keymaps/default/keymap.c b/keyboards/mechlovin/infinityce/keymaps/default/keymap.c new file mode 100644 index 000000000000..5b3747b6ee81 --- /dev/null +++ b/keyboards/mechlovin/infinityce/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2020 mechlovin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_SLSH, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, MO(1), KC_LSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/keyboards/mechlovin/infinityce/keymaps/default/readme.md b/keyboards/mechlovin/infinityce/keymaps/default/readme.md new file mode 100644 index 000000000000..32a673192496 --- /dev/null +++ b/keyboards/mechlovin/infinityce/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for infinityce diff --git a/keyboards/mechlovin/infinityce/keymaps/via/keymap.c b/keyboards/mechlovin/infinityce/keymaps/via/keymap.c new file mode 100644 index 000000000000..310529e0eaea --- /dev/null +++ b/keyboards/mechlovin/infinityce/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2020 mechlovin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_SLSH, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, MO(1), KC_LSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/mechlovin/infinityce/keymaps/via/readme.md b/keyboards/mechlovin/infinityce/keymaps/via/readme.md new file mode 100644 index 000000000000..992bbfbcecb1 --- /dev/null +++ b/keyboards/mechlovin/infinityce/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The VIA keymap for infinityce + +![infinityce](https://i.imgur.com/f2VPnXY.png) diff --git a/keyboards/mechlovin/infinityce/keymaps/via/rules.mk b/keyboards/mechlovin/infinityce/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/mechlovin/infinityce/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/infinityce/readme.md b/keyboards/mechlovin/infinityce/readme.md new file mode 100644 index 000000000000..376dd3cb464d --- /dev/null +++ b/keyboards/mechlovin/infinityce/readme.md @@ -0,0 +1,19 @@ +# infinityce + +![infinityce](https://i.imgur.com/GyH1G1M.jpg) + +Replacement PCB for TGR Jane CE V2 keyboard + +* Keyboard Maintainer: [mechlovin](https://github.com/mechlovin) +* Hardware Supported: Infinity CE PCB +* Hardware Availability: [GeekhackGB](https://geekhack.org/index.php?topic=104345.0) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/infinityce:default + +Build firmware for VIA: + + make mechlovin/infinityce:via + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/infinityce/rules.mk b/keyboards/mechlovin/infinityce/rules.mk new file mode 100644 index 000000000000..8e8807c5e9b3 --- /dev/null +++ b/keyboards/mechlovin/infinityce/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 9fe0c87e9aee518f4bdbc839cb451d69f2a3ad18 Mon Sep 17 00:00:00 2001 From: KamoNanban <35567743+KamoNanban@users.noreply.github.com> Date: Thu, 6 Feb 2020 02:14:00 +0900 Subject: [PATCH 209/331] [Keyboard] manta60 (#8068) * manta60_update * Update config.h * Update config.h * Update config.h * Fixed info and readme * Fixed config.h * Fixed rules.mk * Fixed keymap.c * Update keyboards/manta60/rules.mk Co-Authored-By: Drashna Jaelre * Fixed keymap.c * Fixed rules.mk * Update rules.mk * Update keyboards/manta60/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/manta60/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/manta60/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/manta60/keymaps/default/keymap.c Co-Authored-By: fauxpark Co-authored-by: Drashna Jaelre Co-authored-by: fauxpark --- keyboards/manta60/config.h | 130 +++++++++++++++++++ keyboards/manta60/info.json | 81 ++++++++++++ keyboards/manta60/keymaps/default/config.h | 21 ++++ keyboards/manta60/keymaps/default/keymap.c | 131 ++++++++++++++++++++ keyboards/manta60/keymaps/default/readme.md | 1 + keyboards/manta60/manta60.c | 1 + keyboards/manta60/manta60.h | 45 +++++++ keyboards/manta60/readme.md | 15 +++ keyboards/manta60/rules.mk | 40 ++++++ 9 files changed, 465 insertions(+) create mode 100644 keyboards/manta60/config.h create mode 100644 keyboards/manta60/info.json create mode 100644 keyboards/manta60/keymaps/default/config.h create mode 100644 keyboards/manta60/keymaps/default/keymap.c create mode 100644 keyboards/manta60/keymaps/default/readme.md create mode 100644 keyboards/manta60/manta60.c create mode 100644 keyboards/manta60/manta60.h create mode 100644 keyboards/manta60/readme.md create mode 100644 keyboards/manta60/rules.mk diff --git a/keyboards/manta60/config.h b/keyboards/manta60/config.h new file mode 100644 index 000000000000..0bc49541c90a --- /dev/null +++ b/keyboards/manta60/config.h @@ -0,0 +1,130 @@ +/* +Copyright 2020 kamonanban + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x991D +#define DEVICE_VER 0x0001 +#define MANUFACTURER kamonanban +#define PRODUCT manta60 +#define DESCRIPTION A split keyboard with 27 ortholinear keys and 5-7 thumb/little finger keys + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 ,B4} +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 + +#define RGBLIGHT_SPLIT +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE + #define RGBLED_NUM 68 // Number of LEDs + #define RGBLED_SPLIT { 34, 34 } +#endif + +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +#ifndef IOS_DEVICE_ENABLE + /* The maximum brightness level */ + #define RGBLIGHT_LIMIT_VAL 128 + #define RGBLIGHT_VAL_STEP 16 +#else + #define RGBLIGHT_LIMIT_VAL 32 + #define RGBLIGHT_VAL_STEP 4 +#endif + +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) + #define USB_MAX_POWER_CONSUMPTION 400 +#else + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/manta60/info.json b/keyboards/manta60/info.json new file mode 100644 index 000000000000..6934b0269b1c --- /dev/null +++ b/keyboards/manta60/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "manta60", + "url": "https://github.com/KamoNanban", + "maintainer": "kamonanban", + "width": 17, + "height": 4.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"=", "x":6, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"^", "x":12, "y":0}, + {"label":"&", "x":13, "y":0}, + {"label":"*", "x":14, "y":0}, + {"label":"(", "x":15, "y":0}, + {"label":")", "x":16, "y":0}, + {"label":"\\", "x":17, "y":0}, + {"label":"-", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"[", "x":6, "y":1}, + {"label":"]", "x":11, "y":1}, + {"label":"Y", "x":12, "y":1}, + {"label":"U", "x":13, "y":1}, + {"label":"I", "x":14, "y":1}, + {"label":"O", "x":15, "y":1}, + {"label":"P", "x":16, "y":1}, + {"label":"@", "x":17, "y":1}, + {"label":"Tab", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":",", "x":6, "y":2}, + {"label":".", "x":11, "y":2}, + {"label":"H", "x":12, "y":2}, + {"label":"J", "x":13, "y":2}, + {"label":"K", "x":14, "y":2}, + {"label":"L", "x":15, "y":2}, + {"label":"UP", "x":16, "y":2}, + {"label":";", "x":17, "y":2}, + {"label":"Shft", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"Alt", "x":5, "y":3}, + {"label":"B", "x":12, "y":3}, + {"label":"N", "x":13, "y":3}, + {"label":"M", "x":14, "y":3}, + {"label":"LEFT", "x":15, "y":3}, + {"label":"DOWN", "x":16, "y":3}, + {"label":"RIGHT", "x":17, "y":3}, + {"label":"LOWER", "x":0, "y":4.5}, + {"x":1, "y":4.5}, + {"label":"Alt", "x":4, "y":4.5}, + {"label":"Ctrl", "x":5, "y":4.5}, + {"label":"SPC", "x":6, "y":4.5}, + {"label":"cmd", "x":7, "y":4.5}, + {"label":"Enter", "x":8, "y":4.5}, + {"label":"BS", "x":11, "y":4.5}, + {"label":"DEL", "x":12, "y":4.5}, + {"label":"SPC", "x":13, "y":4.5}, + {"label":"Ctrl", "x":14, "y":4.5}, + {"label":"Alt", "x":15, "y":4.5}, + {"x":16, "y":4.5}, + {"label":"RAISE", "x":17, "y":4.5} + ] + } + } +} diff --git a/keyboards/manta60/keymaps/default/config.h b/keyboards/manta60/keymaps/default/config.h new file mode 100644 index 000000000000..55af5473e020 --- /dev/null +++ b/keyboards/manta60/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 kamonanban + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define RGBLIGHT_SLEEP + +// place overrides here diff --git a/keyboards/manta60/keymaps/default/keymap.c b/keyboards/manta60/keymaps/default/keymap.c new file mode 100644 index 000000000000..5e98141b7034 --- /dev/null +++ b/keyboards/manta60/keymaps/default/keymap.c @@ -0,0 +1,131 @@ +/* Copyright 2020 kamonanban + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,---------------------------------------------------------------------.,---------------------------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_AT, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_COMM, KC_DOT, KC_H, KC_J, KC_K, KC_L, KC_UP, KC_SCLN, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_SLSH, KC_B, KC_N, KC_M, KC_LEFT, KC_DOWN, KC_RGHT, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + LOWER, XXXXXXX, KC_LALT, KC_LCTRL, KC_SPC, KC_LGUI, KC_ENT, KC_BSPC, KC_DEL, KC_SPC, KC_RCTRL, KC_RALT, XXXXXXX, RAISE + //`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------.,---------------------------------------------------------------------. + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE + //`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------.,---------------------------------------------------------------------. + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE + //`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------' + ), + + [_ADJUST] = LAYOUT( + //,---------------------------------------------------------------------.,---------------------------------------------------------------------. + _______, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_M_SN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, RGB_M_T, RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_K, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, RGB_M_P, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_SW, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE + //`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------' + ) +}; + +static inline void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { +case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; +case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; +case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/manta60/keymaps/default/readme.md b/keyboards/manta60/keymaps/default/readme.md new file mode 100644 index 000000000000..f5c0e2c18cc2 --- /dev/null +++ b/keyboards/manta60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for manta60 diff --git a/keyboards/manta60/manta60.c b/keyboards/manta60/manta60.c new file mode 100644 index 000000000000..59319d32ee33 --- /dev/null +++ b/keyboards/manta60/manta60.c @@ -0,0 +1 @@ +#include "manta60.h" diff --git a/keyboards/manta60/manta60.h b/keyboards/manta60/manta60.h new file mode 100644 index 000000000000..f68594d75974 --- /dev/null +++ b/keyboards/manta60/manta60.h @@ -0,0 +1,45 @@ +/* Copyright 2020 kamonanban + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + #define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, KC_NO}, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30, KC_NO } , \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } diff --git a/keyboards/manta60/readme.md b/keyboards/manta60/readme.md new file mode 100644 index 000000000000..f163be27df05 --- /dev/null +++ b/keyboards/manta60/readme.md @@ -0,0 +1,15 @@ +# manta60 + +![manta60](https://github.com/KamoNanban/Manta60/blob/master/documents/_image/manta60_1.jpg) + +A split keyboard with 27 ortholinear keys and 5-7 thumb/little finger keys + +* Keyboard Maintainer: [kamonanban](https://github.com/KamoNanban) +* Hardware Supported: MANTA60 PCBs, Pro Micro (ATmega32U4) +* Hardware Availability: https://github.com/KamoNanban/Manta60 + +Make example for this keyboard (after setting up your build environment): + + make manta60:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/manta60/rules.mk b/keyboards/manta60/rules.mk new file mode 100644 index 000000000000..559044bb6d9e --- /dev/null +++ b/keyboards/manta60/rules.mk @@ -0,0 +1,40 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +SPLIT_KEYBOARD = yes + +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif From ae7b208d32322167793976f24aa2a42228c3dad3 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 5 Feb 2020 10:29:52 -0800 Subject: [PATCH 210/331] fixup keymap for 65_ansi_blocker (#8099) --- layouts/community/65_ansi_blocker/mechmerlin/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/community/65_ansi_blocker/mechmerlin/keymap.c b/layouts/community/65_ansi_blocker/mechmerlin/keymap.c index 8f78a52b25ba..0ce4f38c64a8 100644 --- a/layouts/community/65_ansi_blocker/mechmerlin/keymap.c +++ b/layouts/community/65_ansi_blocker/mechmerlin/keymap.c @@ -35,10 +35,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CL] = LAYOUT_65_ansi_blocker( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, - ), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; From b015c37922fa1085cf4128059c11167362768db5 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 5 Feb 2020 12:34:08 -0800 Subject: [PATCH 211/331] VIA Support: KBD67 mkii v1/v2 (#8085) * add the via keymap * get an appropriate unused VID * fix formatting up a bit * Update keyboards/kbdfans/kbd67/mkiirgb/v1/config.h * Update keyboards/kbdfans/kbd67/mkiirgb/v2/config.h --- .../kbd67/mkiirgb/keymaps/via/keymap.c | 29 +++++++++++++++++++ .../kbd67/mkiirgb/keymaps/via/rules.mk | 2 ++ keyboards/kbdfans/kbd67/mkiirgb/v1/config.h | 6 ++-- keyboards/kbdfans/kbd67/mkiirgb/v2/config.h | 6 ++-- 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/rules.mk diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..37d7fc0c3e45 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, KC_PGUP,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT_65_ansi_blocker( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME,\ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,\ + KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN,\ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + [2] = LAYOUT_65_ansi_blocker( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [3] = LAYOUT_65_ansi_blocker( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h index b60685e2b041..9e47d12584c1 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h @@ -1,10 +1,10 @@ #pragma once #include "config_common.h" -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4B42 // KB #define PRODUCT_ID 0x1224 #define DEVICE_VER 0x0001 #define MANUFACTURER KBDfans -#define PRODUCT kbd67mkiirgb +#define PRODUCT kbd67mkiirgb v1 #define DESCRIPTION kbd67mkii rgb keyboard #define MATRIX_ROWS 5 @@ -42,4 +42,4 @@ #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 35 #define DRIVER_2_LED_TOTAL 32 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) \ No newline at end of file +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h index bd6827ab05a2..f1be48510d49 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h @@ -1,10 +1,10 @@ #pragma once #include "config_common.h" -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1224 +#define VENDOR_ID 0x4B42 // KB +#define PRODUCT_ID 0x1225 #define DEVICE_VER 0x0002 #define MANUFACTURER KBDfans -#define PRODUCT kbd67mkiirgb +#define PRODUCT kbd67mkiirgb v2 #define DESCRIPTION kbd67mkii rgb keyboard #define MATRIX_ROWS 5 From 78ae77f3073107ed016b0c8ed760f0817e97c30e Mon Sep 17 00:00:00 2001 From: plikki <30385247+plikki@users.noreply.github.com> Date: Wed, 5 Feb 2020 21:42:22 +0100 Subject: [PATCH 212/331] [Keymap] User keymap for AKB/Raine (#8081) * Adding my keymap Adding a personalized keymap to the Raine keyboard. This diffirentiates itself by being useble with nordic characters even when the bottom row has blockers. Also added ASCII art to help visualize what you are doing when programming the board. * Update Readme.md Ned image of the board * Update Readme.md Forgot a space in Readme * Update Readme.md And another missed space * Update keymap.c Renoved Definetion that is not used * Update Readme.md * Remove files for renaming * Adding files after renaming Was unable to get Girthub to push renamed files/folders. Therefore removeing and adding them again. --- .../akb/raine/keymaps/mehadviceguy/keymap.c | 75 +++++++++++++++++++ .../akb/raine/keymaps/mehadviceguy/readme.md | 68 +++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 keyboards/akb/raine/keymaps/mehadviceguy/keymap.c create mode 100644 keyboards/akb/raine/keymaps/mehadviceguy/readme.md diff --git a/keyboards/akb/raine/keymaps/mehadviceguy/keymap.c b/keyboards/akb/raine/keymaps/mehadviceguy/keymap.c new file mode 100644 index 000000000000..0014d699a35f --- /dev/null +++ b/keyboards/akb/raine/keymaps/mehadviceguy/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2019 Elliot Powell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +/* +BLANK + ,----------------------------------------------------------------. ,--------------. + | | | | | | | | | | | | | | | | | | + |----------------------------------------------------------------| |--------------| + | | | | | | | | | | | | | | | | | + |------------------------------------------------------------ | |--------------| + | | | | | | | | | | | | | | | | | + |----------------------------------------------------------------' |--------------| + | | | | | | | | | | | | ,----. | | | | + |-----------------------------------------------------------' | | `--------------| + | | | | | | ,--------------. | | | + `------` '------------------------------` '-----' | | | | `---------' + `--------------' +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base + ,----------------------------------------------------------------. ,--------------. + |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | Bac| | / | * | + | + |----------------------------------------------------------------| |--------------| + | Tab | Q | W | E | R | T | Y | U | I | O | P | Enter| | 7 | 8 | 9 | + |------------------------------------------------------------ | |--------------| + |CapsLock | A | S | D | F | G | H | J | K | L | : | | | 4 | 5 | 6 | + |----------------------------------------------------------------' |--------------| + |Shift | \ | Z | X | C | V | B | N | M | , | . | ,----. | 1 | 2 | 3 | + |-----------------------------------------------------------' | Up | `--------------| + | Ctrl | | SPACE | |AltGr| ,--------------. | 0 | . | + `------` '------------------------------` '-----' |L/fn|Down|Rght| `---------' + `--------------' + */ +KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_PSLS, KC_PAST, KC_PPLS, +KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, KC_P7, KC_P8, KC_P9, +KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_P4, KC_P5, KC_P6, +KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_UP, KC_P1, KC_P2, KC_P3, +KC_LCTL, _______, _______, _______, KC_SPC, _______, _______, KC_RALT, LT(1, KC_LEFT), KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + + [1] = LAYOUT( /* Second + ,----------------------------------------------------------------. ,--------------. + | GRV| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9| F10| F11| F12 | |Nlck|Pscr| = | + |----------------------------------------------------------------| |--------------| + | | | | | | | | | | | ? | DEL | |Home| Up |PgUp| + |------------------------------------------------------------ | |--------------| + | | | | | | | | | | | ' |DEL | |Left|ScrL|Rght| + |----------------------------------------------------------------' |--------------| + | | | | | | | | | | [ | ] | ,----. |End |Down|PgDn| + |-----------------------------------------------------------' | | `--------------| + | GUI | | | | | ,--------------. | |Rest| + `------` '------------------------------` '-----' | | | | `---------' + `--------------' + */ +KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NLCK, KC_PSCR, KC_EQUAL, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, _______, KC_HOME, KC_UP, KC_PGUP, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_DEL, KC_LEFT, KC_SLCK, KC_RGHT, +_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_END, KC_DOWN, KC_PGDN, +KC_LGUI, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, RESET), +}; + diff --git a/keyboards/akb/raine/keymaps/mehadviceguy/readme.md b/keyboards/akb/raine/keymaps/mehadviceguy/readme.md new file mode 100644 index 000000000000..e9e411bc5b90 --- /dev/null +++ b/keyboards/akb/raine/keymaps/mehadviceguy/readme.md @@ -0,0 +1,68 @@ +# Eyecandy +![Eyecandy](https://i.imgur.com/gYWNDlF.png) + +# MehAdviceGuy Raine layout + +Welcome to one of the most useless layouts you will find this side of town! +The layout is born out of the need for AltGr to get to æø and å when you don't have a full bottom row. + +## Base Layer (0) +The base layer borrows alot from the Default Raine layer in regards to the alphas, and the numpad. But deviates ever so slightly by putting the layer key on the Left arrow key, relacing it from its original location with AltGr. And putting , and . on what was normally ? and right shift. +``` + ,----------------------------------------------------------------. ,--------------. + |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | Bac| | / | * | + | + |----------------------------------------------------------------| |--------------| + | Tab | Q | W | E | R | T | Y | U | I | O | P | Enter| | 7 | 8 | 9 | + |------------------------------------------------------------ | |--------------| + |CapsLock | A | S | D | F | G | H | J | K | L | : | | | 4 | 5 | 6 | + |----------------------------------------------------------------' |--------------| + |Shift | \ | Z | X | C | V | B | N | M | , | . | ,----. | 1 | 2 | 3 | + |-----------------------------------------------------------' | Up | `--------------| + | Ctrl | | SPACE | |AltGr| ,--------------. | 0 | . | + `------` '------------------------------` '-----' |L/fn|Down|Rght| `---------' + `--------------' +``` + +## Modifier Layer (1) +The Modifier layer also borrows a few things from the Default Raine layout, but changes a fair bit of things in it. These changes include: +* Moving Delete to Enter and completing the F-row +* Moving [ and ] to , and . +* Adding GUI to Left Ctrl +* Replacing insert with = +* Adding / to the P position +* Moving ' one to the left + +``` + ,----------------------------------------------------------------. ,--------------. + | GRV| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9| F10| F11| F12 | |Nlck|Pscr| = | + |----------------------------------------------------------------| |--------------| + | | | | | | | | | | | ? | DEL | |Home| Up |PgUp| + |------------------------------------------------------------ | |--------------| + | | | | | | | | | | | ' |DEL | |Left|ScrL|Rght| + |----------------------------------------------------------------' |--------------| + | | | | | | | | | | [ | ] | ,----. |End |Down|PgDn| + |-----------------------------------------------------------' | | `--------------| + | GUI | | | | | ,--------------. | |Rest| + `------` '------------------------------` '-----' | | | | `---------' + `--------------' +``` + +### Blank ASKII version if anyone needs! +``` + ,----------------------------------------------------------------. ,--------------. + | | | | | | | | | | | | | | | | | | + |----------------------------------------------------------------| |--------------| + | | | | | | | | | | | | | | | | | + |------------------------------------------------------------ | |--------------| + | | | | | | | | | | | | | | | | | + |----------------------------------------------------------------' |--------------| + | | | | | | | | | | | | ,----. | | | | + |-----------------------------------------------------------' | | `--------------| + | | | | | | ,--------------. | | | + `------` '------------------------------` '-----' | | | | `---------' + `--------------' +``` + +### KLE +![KLE Layout](https://i.imgur.com/JDc1oM4.png) +![KLE Link](http://www.keyboard-layout-editor.com/##@@=Esc%0A%60&=!%0A1&=%2F@%0A2&=%23%0A3&=$%0A4&=%25%0A5&=%5E%0A6&=%2F&%0A7&=*%0A8&=(%0A9&=)%0A0&=%2F_%0A-&=+%0A%2F=&_x:0.25%3B&=%2F%2F&=*&=+%3B&@_w:1.5%3B&=Tab&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_x:0.25&w:1.25&h:2&w2:1.5&h2:1&x2:-0.25%3B&=Enter&_x:0.25%3B&=7&=8&=9%3B&@_w:1.75%3B&=Caps%20Lock&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F:%0A%2F%3B&_x:1.5%3B&=4&=5&=6%3B&@_w:1.25%3B&=Shift&=%7C%0A%5C&=Z&=X&=C&=V&=B&=N&=M&=%3C%0A,&_w:1.5%3B&=%3E%0A.&_x:1.5%3B&=1&=2&=3%3B&@_y:-0.75&x:12%3B&=%E2%86%91%3B&@_y:-0.25&w:1.25%3B&=Ctrl&_x:1&a:7&w:6.25%3B&=&_x:1&a:4&w:1.25%3B&=AltGr&_x:3.5%3B&=0&=.%3B&@_y:-0.75&x:11%3B&=%E2%86%90%0AFN&=%E2%86%93&=%E2%86%92%3B&@_y:0.25%3B&=%60&=F1&=F2&=F3&=F4&=F5&=F6&=F7&=F8&=F9&=F10&=F11&=F12&_x:0.25%3B&=NLock&=Print&=%2F=%3B&@_a:7&w:1.5%3B&=&=&=&=&=&=&=&=&=&=&_a:4%3B&=%2F%2F&_x:0.25&w:1.25&h:2&w2:1.5&h2:1&x2:-0.25%3B&=Del&_x:0.25%3B&=Home&=Up&=PgUp%3B&@_a:7&w:1.75%3B&=&=&=&=&=&=&=&=&=&=&_a:4%3B&='&_x:1.5%3B&=Left&=ScrLc&=Right%3B&@_a:7&w:1.25%3B&=&=&=&=&=&=&=&=&=&_a:4%3B&=%5B&_w:1.5%3B&=%5D&_x:1.5%3B&=End&=Down&=PgDn%3B&@_y:-0.75&x:12&a:7%3B&=%3B&@_y:-0.25&a:4&w:1.25%3B&=Win&_x:1&w:6.25%3B&=RAlt&_x:1&a:7&w:1.25%3B&=&_x:3.5%3B&=&_a:4%3B&=Rst%3B&@_y:-0.75&x:11&a:7%3B&=&=&=) \ No newline at end of file From de288adb97936f22c92f5e7d70f075a17d6cf5f9 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 5 Feb 2020 14:51:58 -0800 Subject: [PATCH 213/331] VIA Support: 1upkeyboards 1up60rgb (#8097) * add VIA keymap to 1up60rgb * change VID to align with other 1up boards --- keyboards/1upkeyboards/1up60rgb/config.h | 4 +-- .../1up60rgb/keymaps/via/keymap.c | 34 +++++++++++++++++++ .../1up60rgb/keymaps/via/rules.mk | 2 ++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 keyboards/1upkeyboards/1up60rgb/keymaps/via/keymap.c create mode 100644 keyboards/1upkeyboards/1up60rgb/keymaps/via/rules.mk diff --git a/keyboards/1upkeyboards/1up60rgb/config.h b/keyboards/1upkeyboards/1up60rgb/config.h index 6cf5b6904584..46e08a5160b2 100644 --- a/keyboards/1upkeyboards/1up60rgb/config.h +++ b/keyboards/1upkeyboards/1up60rgb/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x6F75 // OU +#define PRODUCT_ID 0x7267 // RG #define DEVICE_VER 0x0001 #define MANUFACTURER 1upkeyboards #define PRODUCT 1UP RGB Underglow PCB diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/via/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..1ff6ef5b4060 --- /dev/null +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/via/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + + [1] = LAYOUT_all( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/via/rules.mk b/keyboards/1upkeyboards/1up60rgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 917eebcfac33b81021fa40cef7a5ef8ab3cf73a2 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 6 Feb 2020 05:33:43 -0800 Subject: [PATCH 214/331] Xelus Dawn60: layout macro update and Configurator layout support (#8102) * fix layout macro and update keymaps K2D switch position is actually physically on the top row, as the right half of a split Backspace. * add QMK Configurator layout support --- keyboards/xelus/dawn60/dawn60.h | 4 +- keyboards/xelus/dawn60/info.json | 77 +++++++++++++++++++ .../xelus/dawn60/keymaps/default/keymap.c | 16 ++-- keyboards/xelus/dawn60/keymaps/via/keymap.c | 16 ++-- 4 files changed, 95 insertions(+), 18 deletions(-) create mode 100644 keyboards/xelus/dawn60/info.json diff --git a/keyboards/xelus/dawn60/dawn60.h b/keyboards/xelus/dawn60/dawn60.h index b1de35a7eb6f..fe63de10fee4 100644 --- a/keyboards/xelus/dawn60/dawn60.h +++ b/keyboards/xelus/dawn60/dawn60.h @@ -22,9 +22,9 @@ #define XXX KC_NO #define LAYOUT_60_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3B, K3C, K3D, \ K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ ) { \ diff --git a/keyboards/xelus/dawn60/info.json b/keyboards/xelus/dawn60/info.json new file mode 100644 index 000000000000..e39165bd0f04 --- /dev/null +++ b/keyboards/xelus/dawn60/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Dawn60", + "url": "", + "maintainer": "Xelus22", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_all": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"\\", "x":13, "y":0}, + {"label":"Delete", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3, "w":1.75}, + {"label":"Up", "x":13, "y":3}, + {"label":"Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4}, + {"label":"Ctrl", "x":11, "y":4}, + {"label":"Left", "x":12, "y":4}, + {"label":"Down", "x":13, "y":4}, + {"label":"Right", "x":14, "y":4} + ] + } + } +} diff --git a/keyboards/xelus/dawn60/keymaps/default/keymap.c b/keyboards/xelus/dawn60/keymaps/default/keymap.c index 522997342c70..431a596c22d5 100644 --- a/keyboards/xelus/dawn60/keymaps/default/keymap.c +++ b/keyboards/xelus/dawn60/keymaps/default/keymap.c @@ -13,33 +13,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default layer: Pressing caps-lock momentarily switches to Layer 1. // This is the default layer. Pressing an empty keycode on another layer will take you here. [0] = LAYOUT_60_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL , KC_BSLS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL , KC_BSLS, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_DEL , + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_60_all( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PSCR, KC_CAPS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), [2] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [3] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) diff --git a/keyboards/xelus/dawn60/keymaps/via/keymap.c b/keyboards/xelus/dawn60/keymaps/via/keymap.c index 522997342c70..431a596c22d5 100644 --- a/keyboards/xelus/dawn60/keymaps/via/keymap.c +++ b/keyboards/xelus/dawn60/keymaps/via/keymap.c @@ -13,33 +13,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default layer: Pressing caps-lock momentarily switches to Layer 1. // This is the default layer. Pressing an empty keycode on another layer will take you here. [0] = LAYOUT_60_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL , KC_BSLS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL , KC_BSLS, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_DEL , + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_60_all( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PSCR, KC_CAPS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), [2] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [3] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) From 6a0e155afe607c75bfffe3f10fb73c9337942f52 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 6 Feb 2020 05:38:41 -0800 Subject: [PATCH 215/331] Ergosaurus Configurator support bugfix (#8104) Corrected the layout macro name in `info.json`. --- keyboards/ergosaurus/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergosaurus/info.json b/keyboards/ergosaurus/info.json index c43af511b188..97873afd2ef1 100644 --- a/keyboards/ergosaurus/info.json +++ b/keyboards/ergosaurus/info.json @@ -4,7 +4,7 @@ "width": 19.75, "height": 5.25, "layouts": { - "LAYOUT_default": { + "LAYOUT": { "layout": [ {"label":"`", "x":0.5, "y":0}, {"label":"Esc", "x":1.75, "y":0.25}, From fe814be287bc0591df87549ea6233eae2177e062 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Thu, 6 Feb 2020 09:55:55 -0600 Subject: [PATCH 216/331] [keyboard] adding keyboard: jerkin (#7975) * jerkin * Update config.h * Apply suggestions from code review Co-Authored-By: Drashna Jaelre Co-Authored-By: Akaash Suresh * Update rules.mk * Apply suggestions from code review * Missing closing parenthesis in one of the suggestions. * Finalize collaborator suggestions * One final tweak to standardize MANUFACTURER Co-authored-by: ridingqwerty Co-authored-by: Drashna Jaelre Co-authored-by: Akaash Suresh --- keyboards/wsk/jerkin/config.h | 46 +++++++++++++ keyboards/wsk/jerkin/info.json | 12 ++++ keyboards/wsk/jerkin/jerkin.c | 1 + keyboards/wsk/jerkin/jerkin.h | 13 ++++ keyboards/wsk/jerkin/keymaps/default/keymap.c | 65 +++++++++++++++++++ keyboards/wsk/jerkin/readme.md | 15 +++++ keyboards/wsk/jerkin/rules.mk | 29 +++++++++ 7 files changed, 181 insertions(+) create mode 100644 keyboards/wsk/jerkin/config.h create mode 100644 keyboards/wsk/jerkin/info.json create mode 100644 keyboards/wsk/jerkin/jerkin.c create mode 100644 keyboards/wsk/jerkin/jerkin.h create mode 100644 keyboards/wsk/jerkin/keymaps/default/keymap.c create mode 100644 keyboards/wsk/jerkin/readme.md create mode 100644 keyboards/wsk/jerkin/rules.mk diff --git a/keyboards/wsk/jerkin/config.h b/keyboards/wsk/jerkin/config.h new file mode 100644 index 000000000000..20adc99e0ee5 --- /dev/null +++ b/keyboards/wsk/jerkin/config.h @@ -0,0 +1,46 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x79AE +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT Jerkin +#define DESCRIPTION Alice style 30% board + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 13 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, B4, B5 } +#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, B1, F7, F6, F5, F4, E6, D7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/wsk/jerkin/info.json b/keyboards/wsk/jerkin/info.json new file mode 100644 index 000000000000..551bbb0b75a1 --- /dev/null +++ b/keyboards/wsk/jerkin/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Jerkin", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 15.5, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":1, "y":0.75}, {"x":2, "y":0.75}, {"x":12, "y":0.75}, {"x":13, "y":0.75}, {"x":14, "y":0.75}, {"x":0.83, "y":1.75, "w":1.25}, {"x":2.08, "y":1.75}, {"x":12.5, "y":1.75}, {"x":13.5, "y":1.75, "w":1.75}, {"x":0.58, "y":2.75, "w":1.75}, {"x":2.33, "y":2.75}, {"x":12.25, "y":2.75}, {"x":13.25, "y":2.75}, {"x":14.25, "y":2.75, "w":1.25}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":-7.0, "y":3.25}, {"x":-6, "y":3.25}, {"x":-5.0, "y":3.25}, {"x":-4, "y":3.25}, {"x":-6.75, "y":4.25}, {"x":-5.75, "y":4.25}, {"x":-4.75, "y":4.25}, {"x":-3.75, "y":4.25}, {"x":-7.25, "y":5.25}, {"x":-6.25, "y":5.25}, {"x":-5.25, "y":5.25}, {"x":-4.25, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/wsk/jerkin/jerkin.c b/keyboards/wsk/jerkin/jerkin.c new file mode 100644 index 000000000000..d2ed417097d5 --- /dev/null +++ b/keyboards/wsk/jerkin/jerkin.c @@ -0,0 +1 @@ +#include "jerkin.h" diff --git a/keyboards/wsk/jerkin/jerkin.h b/keyboards/wsk/jerkin/jerkin.h new file mode 100644 index 000000000000..201a9db13bd4 --- /dev/null +++ b/keyboards/wsk/jerkin/jerkin.h @@ -0,0 +1,13 @@ + #pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 } \ +} diff --git a/keyboards/wsk/jerkin/keymaps/default/keymap.c b/keyboards/wsk/jerkin/keymaps/default/keymap.c new file mode 100644 index 000000000000..38c1195e9176 --- /dev/null +++ b/keyboards/wsk/jerkin/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +#include QMK_KEYBOARD_H + +enum custom_keycodes {KC_PASTA = SAFE_RANGE}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC, + CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, LT(2, KC_ENT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LT(1, KC_SPC), KC_N, KC_M, KC_COMM, ALT_T(KC_DOT), GUI_T(KC_SLSH), SFT_T(KC_DEL)), + + [1] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, KC_BSLS, + KC_TRNS, KC_MINS, KC_EQL, KC_BSLS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS), + + [2] = LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PASTA, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + if (record->event.pressed) { + switch (keycode) { + case KC_PASTA: + if (record->event.pressed) { + SEND_STRING("https://i.imgur.com/dzBrlqc.png"); + } + break; + + } + } + return true; +} + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(B2); + writePinLow(B2); + // set NumLock LED to output and low + setPinOutput(B6); + writePinLow(B6); + +} + +layer_state_t layer_state_set_user(layer_state_t state) +{ + if (layer_state_cmp(state, 1)) { + writePinHigh(B2); + } else if (state & (1<<2)) { + writePinLow(B2); + writePinHigh(B6); + } else if (state & (1<<3)) { + writePinHigh(B2); + writePinHigh(B6); + } else { + writePinLow(B2); + writePinLow(B6); + } + return state; +} diff --git a/keyboards/wsk/jerkin/readme.md b/keyboards/wsk/jerkin/readme.md new file mode 100644 index 000000000000..3dce6a129465 --- /dev/null +++ b/keyboards/wsk/jerkin/readme.md @@ -0,0 +1,15 @@ +# Jerkin + +![Jerkin](https://i.imgur.com/7wcPUfl.png) + +An Alice style 30% board. + +* Keyboard Maintainer: [Worldspawn00](https://github.com/Worldspawn00) +* Hardware Supported: Jerkin PCB +* Hardware Availability: https://www.etsy.com/shop/WorldspawnsKeebs + +Make example for this keyboard (after setting up your build environment): + + make wsk/jerkin:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) diff --git a/keyboards/wsk/jerkin/rules.mk b/keyboards/wsk/jerkin/rules.mk new file mode 100644 index 000000000000..7a4212cd73a4 --- /dev/null +++ b/keyboards/wsk/jerkin/rules.mk @@ -0,0 +1,29 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no # Audio output on port C6 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow From d84eb14b3a8516c2a16b69d09dc31e3a9f21122b Mon Sep 17 00:00:00 2001 From: Ted M Lin Date: Thu, 6 Feb 2020 20:53:43 -0500 Subject: [PATCH 217/331] Use function for KEYCODE2 routines instead of macro. (#8101) * Option to use function for KEYCODE2 routines. Convert the KEYCODE2SYSTEM and KEYCODE2CONSUMER macros to functions, defaulting to using the macros. The function form allows the compiler to optimize the switch statement itself, over the macro nested ternaries. To enable this feature, #define USE_KEYCODE2_FUNCTION. Testing against a random selection of avr-based keyboards, this increased available flash by ~500 bytes. For arm-based keyboards, the available flash increased by ~400 bytes. * Replace macro with function entirely. As zvecr states, go bold and just commit to using the function instead of the macro. * Reformat whitespace now that functional review is done Verified against clang-format output. --- tmk_core/common/report.h | 67 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index 2a9dad8811a4..ecd5da89a06b 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -167,11 +167,72 @@ typedef struct { } __attribute__((packed)) report_mouse_t; /* keycode to system usage */ -#define KEYCODE2SYSTEM(key) (key == KC_SYSTEM_POWER ? SYSTEM_POWER_DOWN : (key == KC_SYSTEM_SLEEP ? SYSTEM_SLEEP : (key == KC_SYSTEM_WAKE ? SYSTEM_WAKE_UP : 0))) +static inline uint16_t KEYCODE2SYSTEM(uint8_t key) { + switch (key) { + case KC_SYSTEM_POWER: + return SYSTEM_POWER_DOWN; + case KC_SYSTEM_SLEEP: + return SYSTEM_SLEEP; + case KC_SYSTEM_WAKE: + return SYSTEM_WAKE_UP; + default: + return 0; + } +} /* keycode to consumer usage */ -#define KEYCODE2CONSUMER(key) \ - (key == KC_AUDIO_MUTE ? AUDIO_MUTE : (key == KC_AUDIO_VOL_UP ? AUDIO_VOL_UP : (key == KC_AUDIO_VOL_DOWN ? AUDIO_VOL_DOWN : (key == KC_MEDIA_NEXT_TRACK ? TRANSPORT_NEXT_TRACK : (key == KC_MEDIA_PREV_TRACK ? TRANSPORT_PREV_TRACK : (key == KC_MEDIA_FAST_FORWARD ? TRANSPORT_FAST_FORWARD : (key == KC_MEDIA_REWIND ? TRANSPORT_REWIND : (key == KC_MEDIA_STOP ? TRANSPORT_STOP : (key == KC_MEDIA_EJECT ? TRANSPORT_STOP_EJECT : (key == KC_MEDIA_PLAY_PAUSE ? TRANSPORT_PLAY_PAUSE : (key == KC_MEDIA_SELECT ? AL_CC_CONFIG : (key == KC_MAIL ? AL_EMAIL : (key == KC_CALCULATOR ? AL_CALCULATOR : (key == KC_MY_COMPUTER ? AL_LOCAL_BROWSER : (key == KC_WWW_SEARCH ? AC_SEARCH : (key == KC_WWW_HOME ? AC_HOME : (key == KC_WWW_BACK ? AC_BACK : (key == KC_WWW_FORWARD ? AC_FORWARD : (key == KC_WWW_STOP ? AC_STOP : (key == KC_WWW_REFRESH ? AC_REFRESH : (key == KC_BRIGHTNESS_UP ? BRIGHTNESS_UP : (key == KC_BRIGHTNESS_DOWN ? BRIGHTNESS_DOWN : (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0))))))))))))))))))))))) +static inline uint16_t KEYCODE2CONSUMER(uint8_t key) { + switch (key) { + case KC_AUDIO_MUTE: + return AUDIO_MUTE; + case KC_AUDIO_VOL_UP: + return AUDIO_VOL_UP; + case KC_AUDIO_VOL_DOWN: + return AUDIO_VOL_DOWN; + case KC_MEDIA_NEXT_TRACK: + return TRANSPORT_NEXT_TRACK; + case KC_MEDIA_PREV_TRACK: + return TRANSPORT_PREV_TRACK; + case KC_MEDIA_FAST_FORWARD: + return TRANSPORT_FAST_FORWARD; + case KC_MEDIA_REWIND: + return TRANSPORT_REWIND; + case KC_MEDIA_STOP: + return TRANSPORT_STOP; + case KC_MEDIA_EJECT: + return TRANSPORT_STOP_EJECT; + case KC_MEDIA_PLAY_PAUSE: + return TRANSPORT_PLAY_PAUSE; + case KC_MEDIA_SELECT: + return AL_CC_CONFIG; + case KC_MAIL: + return AL_EMAIL; + case KC_CALCULATOR: + return AL_CALCULATOR; + case KC_MY_COMPUTER: + return AL_LOCAL_BROWSER; + case KC_WWW_SEARCH: + return AC_SEARCH; + case KC_WWW_HOME: + return AC_HOME; + case KC_WWW_BACK: + return AC_BACK; + case KC_WWW_FORWARD: + return AC_FORWARD; + case KC_WWW_STOP: + return AC_STOP; + case KC_WWW_REFRESH: + return AC_REFRESH; + case KC_BRIGHTNESS_UP: + return BRIGHTNESS_UP; + case KC_BRIGHTNESS_DOWN: + return BRIGHTNESS_DOWN; + case KC_WWW_FAVORITES: + return AC_BOOKMARKS; + default: + return 0; + } +} uint8_t has_anykey(report_keyboard_t* keyboard_report); uint8_t get_first_key(report_keyboard_t* keyboard_report); From e3444084fb11b1c53a3fc24a064f7c501214cb8b Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Thu, 6 Feb 2020 21:58:16 -0500 Subject: [PATCH 218/331] Committing fix to info.json for wsk/jerkin (#8110) --- keyboards/wsk/jerkin/info.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/wsk/jerkin/info.json b/keyboards/wsk/jerkin/info.json index 551bbb0b75a1..528fa0f0d92a 100644 --- a/keyboards/wsk/jerkin/info.json +++ b/keyboards/wsk/jerkin/info.json @@ -1,12 +1,12 @@ { - "keyboard_name": "Jerkin", - "url": "https://qmk.fm/keyboards", - "maintainer": "worldspawn00", - "width": 15.5, - "height": 6.25, + "keyboard_name": "Jerkin", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 15.25, + "height": 3, "layouts": { "LAYOUT": { - "layout": [{"x":1, "y":0.75}, {"x":2, "y":0.75}, {"x":12, "y":0.75}, {"x":13, "y":0.75}, {"x":14, "y":0.75}, {"x":0.83, "y":1.75, "w":1.25}, {"x":2.08, "y":1.75}, {"x":12.5, "y":1.75}, {"x":13.5, "y":1.75, "w":1.75}, {"x":0.58, "y":2.75, "w":1.75}, {"x":2.33, "y":2.75}, {"x":12.25, "y":2.75}, {"x":13.25, "y":2.75}, {"x":14.25, "y":2.75, "w":1.25}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":-7.0, "y":3.25}, {"x":-6, "y":3.25}, {"x":-5.0, "y":3.25}, {"x":-4, "y":3.25}, {"x":-6.75, "y":4.25}, {"x":-5.75, "y":4.25}, {"x":-4.75, "y":4.25}, {"x":-3.75, "y":4.25}, {"x":-7.25, "y":5.25}, {"x":-6.25, "y":5.25}, {"x":-5.25, "y":5.25}, {"x":-4.25, "y":5.25}] + "layout": [{"label":"Esc", "x":0.5, "y":0}, {"label":"Q", "x":1.5, "y":0}, {"label":"W", "x":2.5, "y":0}, {"label":"E", "x":3.5, "y":0}, {"label":"R", "x":4.5, "y":0}, {"label":"T", "x":5.5, "y":0}, {"label":"Y", "x":7.75, "y":0}, {"label":"U", "x":8.75, "y":0}, {"label":"I", "x":9.75, "y":0}, {"label":"O", "x":10.75, "y":0}, {"label":"P", "x":11.75, "y":0}, {"label":"{", "x":12.75, "y":0}, {"label":"Back
Space", "x":13.75, "y":0}, {"label":"Tab", "x":0.25, "y":1, "w":1.25}, {"label":"A", "x":1.5, "y":1}, {"label":"S", "x":2.5, "y":1}, {"label":"D", "x":3.5, "y":1}, {"label":"F", "x":4.5, "y":1}, {"label":"G", "x":5.5, "y":1}, {"label":"H", "x":8.25, "y":1}, {"label":"J", "x":9.25, "y":1}, {"label":"K", "x":10.25, "y":1}, {"label":"L", "x":11.25, "y":1}, {"label":"\"", "x":12.25, "y":1}, {"label":"Enter", "x":13.25, "y":1, "w":1.75}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"x":8, "y":2}, {"label":"N", "x":9, "y":2}, {"label":"M", "x":10, "y":2}, {"label":"<", "x":11, "y":2}, {"label":">", "x":12, "y":2}, {"label":"?", "x":13, "y":2}, {"label":"Shift", "x":14, "y":2, "w":1.25}] } } -} \ No newline at end of file +} From a73c38112dedaeeb837fb9d388f17becd8480f95 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 7 Feb 2020 15:54:14 +1100 Subject: [PATCH 219/331] =?UTF-8?q?Move=20Grave=20Escape,=20Lock=20and=20L?= =?UTF-8?q?eader=20keycodes=20into=20their=20own=20sect=E2=80=A6=20(#8093)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/keycodes.md | 33 ++++++++++++++++++++++++--------- docs/quantum_keycodes.md | 13 +++++-------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index dd4c4418ba52..c151c5700a80 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -208,14 +208,11 @@ This is a reference only. Each group of keys links to the page documenting their ## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes) -|Key |Aliases |Description | -|---------------|-----------|---------------------------------------------------------------------| -|`RESET` | |Put the keyboard into DFU mode for flashing | -|`DEBUG` | |Toggle debug mode | -|`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it | -|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| -|`KC_LEAD` | |The [Leader key](feature_leader_key.md) | -|`KC_LOCK` | |The [Lock key](feature_key_lock.md) | +|Key |Aliases |Description | +|--------------|---------|-------------------------------------------------------| +|`RESET` | |Put the keyboard into bootloader mode for flashing | +|`DEBUG` | |Toggle debug mode | +|`EEPROM_RESET`|`EEP_RST`|Reinitializes the keyboard's EEPROM (persistent memory)| ## [Audio Keys](feature_audio.md) @@ -289,7 +286,7 @@ This is a reference only. Each group of keys links to the page documenting their ## [Dynamic Macros](feature_dynamic_macros.md) -|Key |Alias |Description | +|Key |Aliases |Description | |-----------------|---------|--------------------------------------------------| |`DYN_REC_START1` |`DM_REC1`|Start recording Macro 1 | |`DYN_REC_START2` |`DM_REC2`|Start recording Macro 2 | @@ -297,6 +294,18 @@ This is a reference only. Each group of keys links to the page documenting their |`DYN_MACRO_PLAY2`|`DM_PLY2`|Replay Macro 2 | |`DYN_REC_STOP` |`DM_RSTP`|Finish the macro that is currently being recorded.| +## [Grave Escape](feature_grave_esc.md) + +|Key |Aliases |Description | +|-----------|---------|------------------------------------------------------------------| +|`GRAVE_ESC`|`KC_GESC`|Escape when pressed, ` when Shift or GUI are held| + +## [Key Lock](feature_key_lock.md) + +|Key |Description | +|---------|--------------------------------------------------------------| +|`KC_LOCK`|Hold down the next key pressed, until the key is pressed again| + ## [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) |Key |Description | @@ -310,6 +319,12 @@ This is a reference only. Each group of keys links to the page documenting their |`TO(layer)` |Turns on `layer` and turns off all other layers, except the default layer | |`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on | +## [Leader Key](feature_leader_key.md) + +|Key |Description | +|---------|------------------------| +|`KC_LEAD`|Begins a leader sequence| + ## [Mouse Keys](feature_mouse_keys.md) |Key |Aliases |Description | diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md index 26ce6d2447a8..969849cda523 100644 --- a/docs/quantum_keycodes.md +++ b/docs/quantum_keycodes.md @@ -8,11 +8,8 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are ## QMK Keycodes -|Key |Aliases |Description | -|---------------|-----------|---------------------------------------------------------------------| -|`RESET` | |Put the keyboard into DFU mode for flashing | -|`DEBUG` | |Toggle debug mode | -|`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it | -|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| -|`KC_LEAD` | |The [Leader key](feature_leader_key.md) | -|`KC_LOCK` | |The [Lock key](feature_key_lock.md) | +|Key |Aliases |Description | +|--------------|---------|-------------------------------------------------------| +|`RESET` | |Put the keyboard into bootloader mode for flashing | +|`DEBUG` | |Toggle debug mode | +|`EEPROM_RESET`|`EEP_RST`|Reinitializes the keyboard's EEPROM (persistent memory)| From e43d143ab09cea268079edae10f14c554b39aa59 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Thu, 6 Feb 2020 23:28:08 -0600 Subject: [PATCH 220/331] [Keyboard] adding keyboard: tkl30 (#7979) * tkl30 * Amended with collaborator suggestions * s/DEBOUNCING_DELAY/DEBOUNCE/ * Used noroadsleft's PID suggestion * Committed noroadsleft's keymap formatting and rules.mk suggestions * LAYOUT formatting and readme suggestions --- keyboards/wsk/tkl30/config.h | 48 ++++++++++++++++++++ keyboards/wsk/tkl30/info.json | 12 +++++ keyboards/wsk/tkl30/keymaps/default/keymap.c | 24 ++++++++++ keyboards/wsk/tkl30/readme.md | 16 +++++++ keyboards/wsk/tkl30/rules.mk | 32 +++++++++++++ keyboards/wsk/tkl30/tkl30.c | 1 + keyboards/wsk/tkl30/tkl30.h | 14 ++++++ 7 files changed, 147 insertions(+) create mode 100644 keyboards/wsk/tkl30/config.h create mode 100644 keyboards/wsk/tkl30/info.json create mode 100644 keyboards/wsk/tkl30/keymaps/default/keymap.c create mode 100644 keyboards/wsk/tkl30/readme.md create mode 100644 keyboards/wsk/tkl30/rules.mk create mode 100644 keyboards/wsk/tkl30/tkl30.c create mode 100644 keyboards/wsk/tkl30/tkl30.h diff --git a/keyboards/wsk/tkl30/config.h b/keyboards/wsk/tkl30/config.h new file mode 100644 index 000000000000..d5595388f218 --- /dev/null +++ b/keyboards/wsk/tkl30/config.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0B7F +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT TKL30 +#define DESCRIPTION A 3-row TKL-style keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D2, B5, F4 } +#define MATRIX_COL_PINS { D3, D1, D0, D4, F7, C6, B1, D7, B3, E6, B2, B4, B6, F6, E5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 1 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/wsk/tkl30/info.json b/keyboards/wsk/tkl30/info.json new file mode 100644 index 000000000000..e19c678c6b12 --- /dev/null +++ b/keyboards/wsk/tkl30/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TKL30", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 18.25, + "height": 3.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Tab", "x":0, "y":0.25, "w":1.5}, {"label":"Q", "x":1.5, "y":0.25}, {"label":"W", "x":2.5, "y":0.25}, {"label":"E", "x":3.5, "y":0.25}, {"label":"R", "x":4.5, "y":0.25}, {"label":"T", "x":5.5, "y":0.25}, {"label":"Y", "x":6.5, "y":0.25}, {"label":"U", "x":7.5, "y":0.25}, {"label":"I", "x":8.5, "y":0.25}, {"label":"O", "x":9.5, "y":0.25}, {"label":"P", "x":10.5, "y":0.25}, {"label":"{", "x":11.5, "y":0.25}, {"label":"}", "x":12.5, "y":0.25}, {"label":"|", "x":13.5, "y":0.25, "w":1.5}, {"label":"Ctrl", "x":0, "y":1.25, "w":1.75}, {"label":"A", "x":1.75, "y":1.25}, {"label":"S", "x":2.75, "y":1.25}, {"label":"D", "x":3.75, "y":1.25}, {"label":"F", "x":4.75, "y":1.25}, {"label":"G", "x":5.75, "y":1.25}, {"label":"H", "x":6.75, "y":1.25}, {"label":"J", "x":7.75, "y":1.25}, {"label":"K", "x":8.75, "y":1.25}, {"label":"L", "x":9.75, "y":1.25}, {"label":":", "x":10.75, "y":1.25}, {"label":"\"", "x":11.75, "y":1.25}, {"label":"Enter", "x":12.75, "y":1.25, "w":2.25}, {"label":"\u2191", "x":16.25, "y":1.25}, {"label":"Shift", "x":0, "y":2.25, "w":1.25}, {"label":"Alt", "x":1.25, "y":2.25}, {"label":"Z", "x":2.25, "y":2.25}, {"label":"X", "x":3.25, "y":2.25}, {"label":"C", "x":4.25, "y":2.25}, {"label":"V", "x":5.25, "y":2.25}, {"x":6.25, "y":2.25, "w":2}, {"label":"B", "x":8.25, "y":2.25}, {"label":"N", "x":9.25, "y":2.25}, {"label":"M", "x":10.25, "y":2.25}, {"label":"<", "x":11.25, "y":2.25}, {"label":">", "x":12.25, "y":2.25}, {"label":"Fn", "x":13.25, "y":2.25, "w":1.75}, {"label":"\u2190", "x":15.25, "y":2.25}, {"label":"\u2193", "x":16.25, "y":2.25}, {"label":"\u2192", "x":17.25, "y":2.25}] + } + } +} diff --git a/keyboards/wsk/tkl30/keymaps/default/keymap.c b/keyboards/wsk/tkl30/keymaps/default/keymap.c new file mode 100644 index 000000000000..7f1089304920 --- /dev/null +++ b/keyboards/wsk/tkl30/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_UP, + KC_LSFT, KC_LALT, KC_Z, KC_X, KC_C, KC_V, LT(1,KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(2), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_LGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [2] = LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; + diff --git a/keyboards/wsk/tkl30/readme.md b/keyboards/wsk/tkl30/readme.md new file mode 100644 index 000000000000..fb758b1d5321 --- /dev/null +++ b/keyboards/wsk/tkl30/readme.md @@ -0,0 +1,16 @@ +# TKL30 + +![TKL30](https://i.imgur.com/rnhOx87.png) + +The TKL30 is a three-row TKL-style board. + +* Keyboard Maintainer: [worldspawn00](https://github.com/worldspawn00/) +* Hardware Supported: TKL30 PCB, Pro Micro +* Hardware Availability: [PCB](https://github.com/worldspawn00/TKL30) + +Make example for this keyboard (after setting up your build environment): + + make wsk/tkl30:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + diff --git a/keyboards/wsk/tkl30/rules.mk b/keyboards/wsk/tkl30/rules.mk new file mode 100644 index 000000000000..ad1dd3454860 --- /dev/null +++ b/keyboards/wsk/tkl30/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/wsk/tkl30/tkl30.c b/keyboards/wsk/tkl30/tkl30.c new file mode 100644 index 000000000000..b25dc56a9517 --- /dev/null +++ b/keyboards/wsk/tkl30/tkl30.c @@ -0,0 +1 @@ +#include "tkl30.h" diff --git a/keyboards/wsk/tkl30/tkl30.h b/keyboards/wsk/tkl30/tkl30.h new file mode 100644 index 000000000000..3beba7245d20 --- /dev/null +++ b/keyboards/wsk/tkl30/tkl30.h @@ -0,0 +1,14 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K114, K214 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 } \ +} + From fb6f5811571dfd033eecfe3073a58fd131b3b5c4 Mon Sep 17 00:00:00 2001 From: Marius Rugan Date: Fri, 7 Feb 2020 11:13:53 +0100 Subject: [PATCH 221/331] jj4x4: README update (#7854) * Updates README jj4x4 * Update keyboards/jj4x4/README.md * Update keyboards/jj4x4/README.md * Update keyboards/jj4x4/README.md * Update keyboards/jj4x4/README.md * Update keyboards/jj4x4/README.md --- keyboards/jj4x4/README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/keyboards/jj4x4/README.md b/keyboards/jj4x4/README.md index a7c93c930ff6..24212bc9905e 100644 --- a/keyboards/jj4x4/README.md +++ b/keyboards/jj4x4/README.md @@ -16,6 +16,24 @@ Flashing example for this keyboard ([after setting up the bootloadHID flashing e make jj4x4:default:flash -**Reset Key**: Hold down the key located at *K00*, commonly programmed as *8* while plugging in the keyboard. +**Reset Key**: + +Hold down the key located at *K12*, commonly programmed as *8* while plugging in the keyboard USB cable. + +Key *K12* is in the above picture: + +Row 2 from the top, Column 2 from the left, see the schematic below: + +``` + ,-----------------------. + | | | | | + |-----`-----`-----`-----| + | | K12 | | | + |-----`-----`-----`-----| + | | | | | + |-----`-----`-----`-----| + | | | | | + `-----`-----`-----`-----' +``` See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From c93093569ecd6024c43e9b0d2e8881e0f768c940 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 7 Feb 2020 13:58:55 +0000 Subject: [PATCH 222/331] Refactor mint60 to use split_common (#8084) --- keyboards/mint60/config.h | 11 +- keyboards/mint60/i2c.c | 162 ---------- keyboards/mint60/i2c.h | 49 ---- keyboards/mint60/keymaps/default/keymap.c | 28 -- keyboards/mint60/matrix.c | 343 ---------------------- keyboards/mint60/mint60.c | 27 -- keyboards/mint60/mint60.h | 19 +- keyboards/mint60/rules.mk | 19 +- keyboards/mint60/serial.c | 295 ------------------- keyboards/mint60/serial.h | 27 -- keyboards/mint60/serial_config.h | 16 - keyboards/mint60/split_util.c | 70 ----- keyboards/mint60/split_util.h | 19 -- 13 files changed, 13 insertions(+), 1072 deletions(-) delete mode 100644 keyboards/mint60/i2c.c delete mode 100644 keyboards/mint60/i2c.h delete mode 100644 keyboards/mint60/matrix.c delete mode 100644 keyboards/mint60/serial.c delete mode 100644 keyboards/mint60/serial.h delete mode 100644 keyboards/mint60/serial_config.h delete mode 100644 keyboards/mint60/split_util.c delete mode 100644 keyboards/mint60/split_util.h diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index c98b9c1af8ae..19a17a7c5e0f 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -18,7 +18,6 @@ along with this program. If not, see . #pragma once #include "config_common.h" -#include /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -28,11 +27,6 @@ along with this program. If not, see . #define PRODUCT Mint60 #define DESCRIPTION A row staggered split keyboard -#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100 - -#define USE_SERIAL - /* key matrix size */ #define MATRIX_ROWS 10 #define MATRIX_COLS 8 @@ -54,6 +48,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/mint60/i2c.c b/keyboards/mint60/i2c.c deleted file mode 100644 index 4bee5c639829..000000000000 --- a/keyboards/mint60/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/mint60/keymaps/default/keymap.c b/keyboards/mint60/keymaps/default/keymap.c index 0c65f73c7eea..a56bc5a1adf2 100644 --- a/keyboards/mint60/keymaps/default/keymap.c +++ b/keyboards/mint60/keymaps/default/keymap.c @@ -14,22 +14,11 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#include "split_util.h" -#endif - - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif enum custom_keycodes { RGBRST = SAFE_RANGE }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ @@ -47,10 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case RGBRST: @@ -58,22 +43,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { eeconfig_update_rgblight_default(); rgblight_enable(); - RGB_current_mode = rgblight_config.mode; } #endif break; } return true; } - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/mint60/matrix.c b/keyboards/mint60/matrix.c deleted file mode 100644 index 30f3c56bcf1b..000000000000 --- a/keyboards/mint60/matrix.c +++ /dev/null @@ -1,343 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - TX_RX_LED_INIT; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - matrix_init_quantum(); -} - -uint8_t _matrix_scan(void) -{ - // Right hand is stored after the left in the matirx so, we need to offset it - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); - - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - int ret=serial_update_buffers(); - if (ret ) { - if(ret==2)RXLED1; - return 1; - } -RXLED0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[offset+i] = serial_master_buffer[i]; - } - - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - -#ifndef KEYBOARD_helix_rev1 - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C -// for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ -// i2c_slave_buffer[i] = matrix[offset+i]; -// } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_master_buffer[i] = matrix[offset+i]; - } -#endif -#endif - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} - -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} diff --git a/keyboards/mint60/mint60.c b/keyboards/mint60/mint60.c index 724bea757a2e..8905392eff1b 100644 --- a/keyboards/mint60/mint60.c +++ b/keyboards/mint60/mint60.c @@ -14,30 +14,3 @@ * along with this program. If not, see . */ #include "mint60.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} diff --git a/keyboards/mint60/mint60.h b/keyboards/mint60/mint60.h index ed2ee255f43c..78529921aa53 100644 --- a/keyboards/mint60/mint60.h +++ b/keyboards/mint60/mint60.h @@ -13,25 +13,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef MINT60_H -#define MINT60_H +#pragma once #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - - // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments @@ -55,5 +40,3 @@ { R30, R31, R32, R33, R34, R35, R36, R37 }, \ { R40, R41, KC_NO, R43, KC_NO, R45, R46, R47 }, \ } - -#endif diff --git a/keyboards/mint60/rules.mk b/keyboards/mint60/rules.mk index 33368caab518..bd9f3154d921 100644 --- a/keyboards/mint60/rules.mk +++ b/keyboards/mint60/rules.mk @@ -14,16 +14,17 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -31,10 +32,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -CUSTOM_MATRIX = yes -SRC += i2c.c \ - serial.c \ - matrix.c \ - split_util.c -USE_I2C = yes -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SPLIT_KEYBOARD = yes diff --git a/keyboards/mint60/serial.c b/keyboards/mint60/serial.c deleted file mode 100644 index 591941587789..000000000000 --- a/keyboards/mint60/serial.c +++ /dev/null @@ -1,295 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifdef USE_SERIAL - -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// Serial pulse period in microseconds. -#define SELECT_SERIAL_SPEED 1 -#if SELECT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #define READ_WRITE_START_ADJUST 23 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 50 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#else -#error Illegal Serial Speed -#endif - - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH 1 -#define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input_with_pullup(); - -#if SERIAL_PIN_MASK == _BV(PD0) - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -#elif SERIAL_PIN_MASK == _BV(PD2) - // Enable INT2 - EIMSK |= _BV(INT2); - // Trigger on falling edge of INT2 - EICRA &= ~(_BV(ISC20) | _BV(ISC21)); -#else - #error unknown SERIAL_PIN_MASK value -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static -void sync_recv(void) { - for (int i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - _delay_sub_us(READ_WRITE_START_ADJUST); - for ( uint8_t i = 0; i < 8; ++i) { - serial_delay_half1(); // read the middle of pulses - byte = (byte << 1) | serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 1<<7; - while( b ) { - if(data & b) { - serial_high(); - } else { - serial_low(); - } - b >>= 1; - serial_delay(); - } - serial_low(); // sync_send() / senc_recv() need raise edge -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - serial_output(); - - // slave send phase - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - sync_send(); - serial_write_byte(serial_slave_buffer[i]); - checksum += serial_slave_buffer[i]; - } - sync_send(); - serial_write_byte(checksum); - - // slave switch to input - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 - - // slave recive phase - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - sync_recv(); - serial_master_buffer[i] = serial_read_byte(); - checksum_computed += serial_master_buffer[i]; - } - sync_recv(); - uint8_t checksum_received = serial_read_byte(); - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } - - sync_recv(); //weit master output to high -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH); - - // wait for the slaves response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - sei(); - return 1; - } - - // master recive phase - // if the slave is present syncronize with it - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - sync_recv(); - serial_slave_buffer[i] = serial_read_byte(); - checksum_computed += serial_slave_buffer[i]; - } - sync_recv(); - uint8_t checksum_received = serial_read_byte(); - - if (checksum_computed != checksum_received) { - serial_output(); - serial_high(); - sei(); - return 2; - } - - // master switch to output - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); // 3 - serial_delay_half1(); //4 - - // master send phase - uint8_t checksum = 0; - - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - sync_send(); - serial_write_byte(serial_master_buffer[i]); - checksum += serial_master_buffer[i]; - } - sync_send(); - serial_write_byte(checksum); - - // always, release the line when not in use - sync_send(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/mint60/serial.h b/keyboards/mint60/serial.h deleted file mode 100644 index c3c9569b2c4a..000000000000 --- a/keyboards/mint60/serial.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H - -#include - -// //////////////////////////////////////////// -// Need Soft Serial defines in serial_config.h -// //////////////////////////////////////////// -// ex. -// #define SERIAL_PIN_DDR DDRD -// #define SERIAL_PIN_PORT PORTD -// #define SERIAL_PIN_INPUT PIND -// #define SERIAL_PIN_MASK _BV(PD?) ?=0,2 -// #define SERIAL_PIN_INTERRUPT INT?_vect ?=0,2 -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/mint60/serial_config.h b/keyboards/mint60/serial_config.h deleted file mode 100644 index 82c6e4e836e3..000000000000 --- a/keyboards/mint60/serial_config.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef SOFT_SERIAL_CONFIG_H -#define SOFT_SERIAL_CONFIG_H - -/* Soft Serial defines */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD2) -#define SERIAL_PIN_INTERRUPT INT2_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -//// #error rev2 serial config - -#endif /* SOFT_SERIAL_CONFIG_H */ diff --git a/keyboards/mint60/split_util.c b/keyboards/mint60/split_util.c deleted file mode 100644 index cd3a1896e567..000000000000 --- a/keyboards/mint60/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); - -#endif From e77188458f136da3e25ce066e80b21d38f6e8cdc Mon Sep 17 00:00:00 2001 From: Cody Bender <50554676+cfbender@users.noreply.github.com> Date: Fri, 7 Feb 2020 13:48:37 -0700 Subject: [PATCH 223/331] Add QMK Compile Context Sensitivity (#6884) * Add context sensitive compile, without config check * Initial full working state. Plan to refactor * Refactor loop for simplicity, add comments * Update docs/cli.md with qmk compile examples * Simplify path for keyboard derivation * Update path to use path.join instead of concat * Refactor keyboard path, the skully way * Add in keymap folder support * Add /layouts compile support * Update docs/cli.md with empty compile in layouts * Add comments to compile.py * Update docs for clarity, and fix compile error typo * Fix config option compile * Fix layout compile and failure mode * Add rules.mk check * Fix variable names for global config * Add in_layout priority * Remove default fallback in favor of throw, update docs * Add keymap folder context * Fix formatting * Add os import * Convert to create_make_command * Fix Travis lint errors * Remove blank line with whitespace * Add blank lines for readability * Remove unnecessary config logic * Update Docs to add flash Co-Authored-By: skullydazed * Shift config precedence to MILC Co-authored-by: skullydazed --- docs/cli.md | 49 ++++++++++++++++++++++- lib/python/qmk/cli/compile.py | 75 +++++++++++++++++++++++++++++++++-- 2 files changed, 120 insertions(+), 4 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 4f328a75a2d4..f1c158af44c3 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -81,7 +81,7 @@ qmk cformat [file1] [file2] [...] [fileN] ## `qmk compile` -This command allows you to compile firmware from any directory. You can compile JSON exports from or compile keymaps in the repo. +This command allows you to compile firmware from any directory. You can compile JSON exports from , compile keymaps in the repo, or compile the keyboard in the current working directory. **Usage for Configurator Exports**: @@ -95,6 +95,53 @@ qmk compile qmk compile -kb -km ``` +**Usage in Keyboard Directory**: + +Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap ` +``` +qmk compile +``` + +**Example**: +``` +$ qmk config compile.keymap=default +$ cd ~/qmk_firmware/keyboards/planck/rev6 +$ qmk compile +Ψ Compiling keymap with make planck/rev6:default +... +``` +or with optional keymap argument + +``` +$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4 +$ qmk compile -km 66_iso +Ψ Compiling keymap with make clueboard/66/rev4:66_iso +... +``` +or in keymap directory + +``` +$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak +$ qmk compile +Ψ Compiling keymap with make make gh60/satan:colemak +... +``` + +**Usage in Layout Directory**: + +Must be under `qmk_firmware/layouts/`, and in a keymap folder. +``` +qmk compile -kb +``` + +**Example**: +``` +$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi +$ qmk compile -kb dz60 +Ψ Compiling keymap with make dz60:mechmerlin-ansi +... +``` + ## `qmk flash` This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 8e2d0cdbf4fb..826b969ef608 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py @@ -3,6 +3,7 @@ You can compile a keymap already in the repo or using a QMK Configurator export. """ import subprocess +import os from argparse import FileType from milc import cli @@ -28,6 +29,46 @@ def compile(cli): If --keyboard and --keymap are provided this command will build a firmware based on that. """ + # Set CWD as directory command was issued from + cwd = os.environ['ORIG_CWD'] + qmk_path = os.getcwd() + current_folder = os.path.basename(cwd) + # Initialize boolean to check for being in a keyboard directory and initialize keyboard string + in_keyboard = False + in_layout = False + keyboard = "" + keymap = "" + user_keymap = "" + user_keyboard = "" + + # Set path for '/keyboards/' directory + keyboards_path = os.path.join(qmk_path, "keyboards") + layouts_path = os.path.join(qmk_path, "layouts") + + # If below 'keyboards' and not in 'keyboards' or 'keymaps', get current keyboard name + if cwd.startswith(keyboards_path): + if current_folder != "keyboards" and current_folder != "keymaps": + if os.path.basename(os.path.abspath(os.path.join(cwd, ".."))) == "keymaps": + # If in a keymap folder, set relative path, get everything before /keymaps, and the keymap name + relative_path = cwd[len(keyboards_path):][1:] + keyboard = str(relative_path).split("/keymaps", 1)[0] + keymap = str(relative_path.rsplit("/", 1)[-1]) + else: + keyboard = str(cwd[len(keyboards_path):])[1:] + + in_keyboard = True + + # If in layouts dir + if cwd.startswith(layouts_path): + if current_folder != "layouts": + in_layout = True + + # If user keyboard/keymap or compile keyboard/keymap are supplied, assign those + if cli.config.compile.keyboard: + user_keyboard = cli.config.compile.keyboard + if cli.config.compile.keymap and not in_layout: + user_keymap = cli.config.compile.keymap + if cli.args.filename: # Parse the configurator json user_keymap = parse_configurator_json(cli.args.filename) @@ -41,12 +82,40 @@ def compile(cli): cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap']) - elif cli.config.compile.keyboard and cli.config.compile.keymap: + elif user_keyboard and user_keymap: # Generate the make command for a specific keyboard/keymap. - command = create_make_command(cli.config.compile.keyboard, cli.config.compile.keymap) + command = create_make_command(user_keyboard, user_keymap) + + elif in_keyboard: + keyboard = user_keyboard if user_keyboard else keyboard + keymap = user_keymap if user_keymap else keymap + + if not os.path.exists(os.path.join(keyboards_path, keyboard, "rules.mk")): + cli.log.error('This directory does not contain a rules.mk file. Change directory or supply --keyboard with optional --keymap') + return False + + # Get path for keyboard directory + keymap_path = qmk.path.keymap(keyboard) + + # Check for global keymap config first + if keymap: + command = create_make_command(keyboard, keymap) + + else: + # If no default keymap exists and none provided + cli.log.error('This directory does not contain a keymap. Set one with `qmk config` or supply `--keymap` ') + return False + + elif in_layout: + if user_keyboard: + keymap = current_folder + command = create_make_command(user_keyboard, keymap) + else: + cli.log.error('You must supply a keyboard to compile a layout keymap. Set one with `qmk config` or supply `--keyboard` ') + return False else: - cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`.') + cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') return False cli.log.info('Compiling keymap with {fg_cyan}%s\n\n', ' '.join(command)) From 889eb51fb576cd875ed0f9d199e512d0dfba9607 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 7 Feb 2020 18:09:55 -0800 Subject: [PATCH 224/331] ZJ68: complete Configurator layout support (#8116) Only LAYOUT_all had its layout data present; the data for LAYOUT_65_ansi and LAYOUT_65_ansi_split_bs was missing. --- keyboards/zj68/info.json | 153 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) diff --git a/keyboards/zj68/info.json b/keyboards/zj68/info.json index f93963936dab..60dcfd3f742b 100644 --- a/keyboards/zj68/info.json +++ b/keyboards/zj68/info.json @@ -81,6 +81,159 @@ { "x": 14, "y": 4 }, { "x": 15, "y": 4 } ] + }, + "LAYOUT_65_ansi": { + "layout": [ + { "label": "~", "x": 0, "y": 0 }, + { "label": "!", "x": 1, "y": 0 }, + { "label": "@", "x": 2, "y": 0 }, + { "label": "#", "x": 3, "y": 0 }, + { "label": "$", "x": 4, "y": 0 }, + { "label": "%", "x": 5, "y": 0 }, + { "label": "^", "x": 6, "y": 0 }, + { "label": "&", "x": 7, "y": 0 }, + { "label": "*", "x": 8, "y": 0 }, + { "label": "(", "x": 9, "y": 0 }, + { "label": ")", "x": 10, "y": 0 }, + { "label": "_", "x": 11, "y": 0 }, + { "label": "+", "x": 12, "y": 0 }, + { "label": "Backspace", "x": 13, "y": 0, "w": 2 }, + { "label": "Delete", "x": 15, "y": 0 }, + + { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "{ ", "x": 11.5, "y": 1 }, + { "label": " }", "x": 12.5, "y": 1 }, + { "label": "|", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "PgUp", "x": 15, "y": 1 }, + + { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ": ", "x": 10.75, "y": 2 }, + { "label": "\"", "x": 11.75, "y": 2 }, + { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "PgDn", "x": 15, "y": 2 }, + + { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "Up", "x": 14, "y": 3 }, + { "label": "Fn", "x": 15, "y": 3 }, + + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "GUI", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "Space", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 4 }, + { "label": "Menu", "x": 11, "y": 4 }, + { "label": "Ctrl", "x": 12, "y": 4 }, + { "label": "Left", "x": 13, "y": 4 }, + { "label": "Down", "x": 14, "y": 4 }, + { "label": "Right", "x": 15, "y": 4 } + ] + }, + "LAYOUT_65_ansi_split_bs": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "!", "x": 1, "y": 0 }, + { "label": "@", "x": 2, "y": 0 }, + { "label": "#", "x": 3, "y": 0 }, + { "label": "$", "x": 4, "y": 0 }, + { "label": "%", "x": 5, "y": 0 }, + { "label": "^", "x": 6, "y": 0 }, + { "label": "&", "x": 7, "y": 0 }, + { "label": "*", "x": 8, "y": 0 }, + { "label": "(", "x": 9, "y": 0 }, + { "label": ")", "x": 10, "y": 0 }, + { "label": "_", "x": 11, "y": 0 }, + { "label": "+", "x": 12, "y": 0 }, + { "label": "|", "x": 13, "y": 0 }, + { "label": "~", "x": 14, "y": 0 }, + { "label": "Delete", "x": 15, "y": 0 }, + + { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "{ ", "x": 11.5, "y": 1 }, + { "label": " }", "x": 12.5, "y": 1 }, + { "label": "Backspace", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "PgUp", "x": 15, "y": 1 }, + + { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ": ", "x": 10.75, "y": 2 }, + { "label": "\"", "x": 11.75, "y": 2 }, + { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "PgDn", "x": 15, "y": 2 }, + + { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "Up", "x": 14, "y": 3 }, + { "label": "Fn", "x": 15, "y": 3 }, + + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "GUI", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "Space", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 4 }, + { "label": "Menu", "x": 11, "y": 4 }, + { "label": "Ctrl", "x": 12, "y": 4 }, + { "label": "Left", "x": 13, "y": 4 }, + { "label": "Down", "x": 14, "y": 4 }, + { "label": "Right", "x": 15, "y": 4 } + ] } } } From be05de6a3de19e5641692651ef03ae16f3bf653e Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 7 Feb 2020 18:16:44 -0800 Subject: [PATCH 225/331] XD84: Configurator bugfix for ISO layout (#8117) * switch to debug linting * move ISO Enter to its proper location --- keyboards/xd84/info.json | 202 +++++++++++++++++++++++++++++++++++---- 1 file changed, 186 insertions(+), 16 deletions(-) diff --git a/keyboards/xd84/info.json b/keyboards/xd84/info.json index b701db1b79e5..3647da0e9a37 100644 --- a/keyboards/xd84/info.json +++ b/keyboards/xd84/info.json @@ -1,18 +1,188 @@ { - "keyboard_name": "XD84", - "url": "", - "maintainer": "qmk", - "width": 16, - "height": 6, - "layouts": { - "LAYOUT_75_ansi": { - "key_count": 84, - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"1", "x":1, "y":1}, {"label":"2", "x":2, "y":1}, {"label":"3", "x":3, "y":1}, {"label":"4", "x":4, "y":1}, {"label":"5", "x":5, "y":1}, {"label":"6", "x":6, "y":1}, {"label":"7", "x":7, "y":1}, {"label":"8", "x":8, "y":1}, {"label":"9", "x":9, "y":1}, {"label":"0", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"delete", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] - }, - - "LAYOUT_75_iso": { - "key_count": 85, - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"1", "x":1, "y":1}, {"label":"2", "x":2, "y":1}, {"label":"3", "x":3, "y":1}, {"label":"4", "x":4, "y":1}, {"label":"5", "x":5, "y":1}, {"label":"6", "x":6, "y":1}, {"label":"7", "x":7, "y":1}, {"label":"8", "x":8, "y":1}, {"label":"9", "x":9, "y":1}, {"label":"0", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"delete", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + "keyboard_name": "XD84", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_75_ansi": { + "key_count": 84, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"Pause", "x":14, "y":0}, + {"label":"Delete", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"|", "x":13.5, "y":2, "w":1.5}, + {"label":"Page Up", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"\"", "x":11.75, "y":3}, + {"label":"Enter", "x":12.75, "y":3, "w":2.25}, + {"label":"Page Down", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":2.25}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"Up", "x":14, "y":4}, + {"label":"End", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5, "w":6.25}, + {"label":"Alt", "x":10, "y":5}, + {"label":"Fn", "x":11, "y":5}, + {"label":"Ctrl", "x":12, "y":5}, + {"label":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] + }, + "LAYOUT_75_iso": { + "key_count": 85, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"Pause", "x":14, "y":0}, + {"label":"Delete", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"Page Up", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"@", "x":11.75, "y":3}, + {"label":"~", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"Page Down", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"|", "x":1.25, "y":4}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"Up", "x":14, "y":4}, + {"label":"End", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5, "w":6.25}, + {"label":"Alt", "x":10, "y":5}, + {"label":"Fn", "x":11, "y":5}, + {"label":"Ctrl", "x":12, "y":5}, + {"label":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] + } } - } -} \ No newline at end of file +} From 707c04b4ab588967c803114d7d88ef3fdd934967 Mon Sep 17 00:00:00 2001 From: Alfred Maler Date: Fri, 7 Feb 2020 21:42:04 -0500 Subject: [PATCH 226/331] [Keymap] Add users/alfrdmalr and switch to layouts (#8030) * WIP do not merge * first pass at custom preonic layout * add auto shift and reset via leader key * Update readme * update copyright notice * formatting changes * fix: use MO instead of process_record_user * added backslash and moved grave position * remove extraneous 'j' characer in NUMPAD template * update template formatting * remove process_record_user * swap "!" with "@" * fix readme formatting * update readme layout image * restore settings layer * add windows minimize sequence * fix: switch to correct seq function for three-key sequence * fix: missing semicolon * refactor: move keymap to userspace and generic 5x12 layout * add numlock to numpad layer * add readme * update readme formatting * remove unused wrappers from layout keymap * update readme title to reflect new location * remove alfrdmalr directory from preonic/keymaps * clean up user config --- keyboards/preonic/keymaps/alfrdmalr/config.h | 40 --- keyboards/preonic/keymaps/alfrdmalr/keymap.c | 192 ------------ keyboards/preonic/keymaps/alfrdmalr/readme.md | 80 ----- keyboards/preonic/keymaps/alfrdmalr/rules.mk | 3 - .../community/ortho_5x12/alfrdmalr/config.h | 5 + .../community/ortho_5x12/alfrdmalr/keymap.c | 49 ++++ .../community/ortho_5x12/alfrdmalr/rules.mk | 0 users/alfrdmalr/alfrdmalr.c | 44 +++ users/alfrdmalr/alfrdmalr.h | 276 ++++++++++++++++++ users/alfrdmalr/config.h | 7 + users/alfrdmalr/readme.md | 47 +++ users/alfrdmalr/rules.mk | 8 + 12 files changed, 436 insertions(+), 315 deletions(-) delete mode 100644 keyboards/preonic/keymaps/alfrdmalr/config.h delete mode 100644 keyboards/preonic/keymaps/alfrdmalr/keymap.c delete mode 100644 keyboards/preonic/keymaps/alfrdmalr/readme.md delete mode 100644 keyboards/preonic/keymaps/alfrdmalr/rules.mk create mode 100644 layouts/community/ortho_5x12/alfrdmalr/config.h create mode 100644 layouts/community/ortho_5x12/alfrdmalr/keymap.c create mode 100644 layouts/community/ortho_5x12/alfrdmalr/rules.mk create mode 100644 users/alfrdmalr/alfrdmalr.c create mode 100644 users/alfrdmalr/alfrdmalr.h create mode 100644 users/alfrdmalr/config.h create mode 100644 users/alfrdmalr/readme.md create mode 100644 users/alfrdmalr/rules.mk diff --git a/keyboards/preonic/keymaps/alfrdmalr/config.h b/keyboards/preonic/keymaps/alfrdmalr/config.h deleted file mode 100644 index d906664c95a6..000000000000 --- a/keyboards/preonic/keymaps/alfrdmalr/config.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PREONIC_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) - - #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND) \ - } -#endif - -#define MUSIC_MASK (keycode != KC_NO) - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ - -#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#define LEADER_TIMEOUT 400 -#define LEADER_PER_KEY_TIMING diff --git a/keyboards/preonic/keymaps/alfrdmalr/keymap.c b/keyboards/preonic/keymaps/alfrdmalr/keymap.c deleted file mode 100644 index c2a682d4a301..000000000000 --- a/keyboards/preonic/keymaps/alfrdmalr/keymap.c +++ /dev/null @@ -1,192 +0,0 @@ -/* Copyright 2015-2017 Jack Humbert 2019-2020 Alfred Maler - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H -#include "muse.h" - -enum preonic_layers { - _QWERTY, - _SETTINGS, - _SYMBOLS, - _NAVIGATION, - _NUMPAD, -}; - -enum preonic_keycodes { - QWERTY = SAFE_RANGE, - SYMBOLS, - NAVIGATION, - NUMPAD, - SETTINGS -}; - -#define NUMSPACE LT(_NUMPAD, KC_SPC) -#define NAVLAYER MO(_NAVIGATION) -#define SYMLAYER MO(_SYMBOLS) -#define CTRLSHFT C(KC_LSFT) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | DEL | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | NAV | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | CTRL | C/S | LGUI | LALT | SYMB | SPACE/NUM | SYMB | RALT | SETT | MUTG | LEAD | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_preonic_grid( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - NAVLAYER, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, CTRLSHFT, KC_LGUI, KC_LALT, SYMLAYER, NUMSPACE, NUMSPACE, SYMLAYER, KC_RALT, SETTINGS, MU_TOG, KC_LEAD -), - -/* SYMBOLS - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TAB | # | $ | { | } | | | ^ | * | | | ~ | DEL | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ESC | < | > | ( | ) | | | - | + | & | \ | ` | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | SHFT | ! | @ | [ | ] | | | _ | = | % | / | SHFT | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | - * `-----------------------------------------------------------------------------------' - */ -[_SYMBOLS] = LAYOUT_preonic_grid( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_HASH, KC_DOLLAR, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_CIRC, KC_ASTR, KC_PIPE, KC_TILD, KC_DEL, - KC_NO, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_MINS, KC_PLUS, KC_AMPR, KC_BSLS, KC_GRV, - KC_LSFT, KC_EXCLAIM, KC_AT, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_UNDS, KC_EQL, KC_PERC, KC_SLSH, KC_RSFT, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS -), - -/* NAVIGATION - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | | DEL | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | NAV | SHFT | CTRl | ALT | GUI | | LEFT | DOWN | UP | RGHT | | ENTR | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | SHFT | UNDO | CUT | COPY | PSTE | | SPC | PGDO | PGUP | | | SHFT | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS | - * `-----------------------------------------------------------------------------------' - */ -[_NAVIGATION] = LAYOUT_preonic_grid( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TRNS, KC_NO, KC_NO, KC_SPC, KC_F5, KC_NO, KC_INS, KC_HOME, KC_END, KC_TAB, KC_NO, KC_DEL, - KC_TRNS, KC_LSFT, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_ENT, - KC_TRNS, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), KC_NO, KC_SPC, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ESC, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS -), - -/* NUMPAD - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | F9 | F10 | F11 | F12 | | | 7 | 8 | 9 | - | DEL | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS | - * `-----------------------------------------------------------------------------------' - */ -[_NUMPAD] = LAYOUT_preonic_grid( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_MINS, KC_DEL, - KC_ESC, KC_F5, KC_F6, KC_F7, KC_F8, KC_SPC, KC_SPC, KC_4, KC_5, KC_6, KC_PLUS, KC_ENT, - KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_LALT, KC_CAPS, KC_1, KC_2, KC_3, KC_SLSH, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_ASTR, KC_TRNS -), - -/* SETTINGS - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_SETTINGS] = LAYOUT_preonic_grid( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, _______, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, - KC_ASTG, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) -}; - - -bool muse_mode = false; -uint8_t last_muse_note = 0; -uint16_t muse_counter = 0; -uint8_t muse_offset = 70; -uint16_t muse_tempo = 50; - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { -#ifdef AUDIO_ENABLE - if (muse_mode) { - if (muse_counter == 0) { - uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; - if (muse_note != last_muse_note) { - stop_note(compute_freq_for_midi_note(last_muse_note)); - play_note(compute_freq_for_midi_note(muse_note), 0xF); - last_muse_note = muse_note; - } - } - muse_counter = (muse_counter + 1) % muse_tempo; - } else { - if (muse_counter) { - stop_all_notes(); - muse_counter = 0; - } - } -#endif - - LEADER_DICTIONARY() { - leading = false; - SEQ_FIVE_KEYS(KC_R, KC_E, KC_S, KC_E, KC_T) { - reset_keyboard(); - } - leader_end(); - } -} - -bool music_mask_user(uint16_t keycode) { - switch (keycode) { - default: - return true; - } -} \ No newline at end of file diff --git a/keyboards/preonic/keymaps/alfrdmalr/readme.md b/keyboards/preonic/keymaps/alfrdmalr/readme.md deleted file mode 100644 index 13c5d711cdfe..000000000000 --- a/keyboards/preonic/keymaps/alfrdmalr/readme.md +++ /dev/null @@ -1,80 +0,0 @@ -# alfrdmalr's preonic layout -## Overview -The alphanumeric characters and symbols are spread between three main 'typing' layers: QWERTY, NUMPAD, and SYMBOLS. The NUMPAD layer also holds the first twelve function keys. - -A fourth layer, NAVIGATION, contains useful modifiers, shortcuts, and navigation functions like the arrow keys and page up/down. This layer also provides access to the ENTER and ESC keys. - -Finally, a SETTINGS layer can be used to adjust certain keyboard-related options. Right now, this is pretty similar to the default settings layer (the planck's ADJUST layer). Primary differences are the inclusion of an autoshift toggle and the removal of the reset button. The bootloader functionality has been moved to a leader key sequence: LEAD - R - E - S - E - T. - -``` -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | NAV | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | CTRL | C/S | LGUI | LALT | SYMB | SPACE/NUM | SYMB | RALT | SETT |mu tog| LEAD | - * `-----------------------------------------------------------------------------------' - */ - - /* SYMBOLS - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | # | $ | { | } | | | ^ | * | | | ~ | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Esc | < | > | ( | ) | | | - | + | & | ` | ENTR | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | SHFT | ! | @ | [ | ] | | | _ | = | % | / | SHFT | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | - * `-----------------------------------------------------------------------------------' - */ - - /* NUMPAD - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | F9 | F10 | F11 | F12 | | | 7 | 8 | 9 | - | DEL | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS | - * `-----------------------------------------------------------------------------------' - */ - - /* NAVIGATION - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | NAV | SHIFT| CTRl | ALT | GUI | | LEFT | DOWN | UP | RIGHT| | ENTR | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | SHFT | UNDO | CUT | COPY | PASTE| | SPC | PGDO | PGUP | | | SHFT | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS | - * `-----------------------------------------------------------------------------------' - */ - - /* SETTINGS - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ - ``` - ASTG = autoshift toggle diff --git a/keyboards/preonic/keymaps/alfrdmalr/rules.mk b/keyboards/preonic/keymaps/alfrdmalr/rules.mk deleted file mode 100644 index 291bb16fabee..000000000000 --- a/keyboards/preonic/keymaps/alfrdmalr/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC += muse.c -AUTO_SHIFT_ENABLE = yes -LEADER_ENABLE = yes diff --git a/layouts/community/ortho_5x12/alfrdmalr/config.h b/layouts/community/ortho_5x12/alfrdmalr/config.h new file mode 100644 index 000000000000..885107524d3c --- /dev/null +++ b/layouts/community/ortho_5x12/alfrdmalr/config.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) +#endif \ No newline at end of file diff --git a/layouts/community/ortho_5x12/alfrdmalr/keymap.c b/layouts/community/ortho_5x12/alfrdmalr/keymap.c new file mode 100644 index 000000000000..c140128d80dd --- /dev/null +++ b/layouts/community/ortho_5x12/alfrdmalr/keymap.c @@ -0,0 +1,49 @@ +#include "alfrdmalr.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// QWERTY +[_QWERTY] = LAYOUT_ortho_5x12_wrapper( + K00, ____NUMROW_L0____, ____NUMROW_R0____, K0B, + K10, ____QWERTY_L1____, ____QWERTY_R1____, K1B_ALT, + K20, ____QWERTY_L2____, ____QWERTY_R2____, K2B, + K30, ____QWERTY_L3____, ____QWERTY_R3____, K3B, + K40, _____BASE_L4_____, _____BASE_R4_____, K4B +), + +// SYMBOLS +[_SYMBOLS] = LAYOUT_ortho_5x12_wrapper( + K00_SYM, ____NUMROW_L0____, ____NUMROW_R0____, K0B_SYM, + K10_SYM, ____SYMBOL_L1____, ____SYMBOL_R1____, K1B_SYM, + K20_SYM, ____SYMBOL_L2____, ____SYMBOL_R2____, K2B_SYM, + K30_SYM, ____SYMBOL_L3____, ____SYMBOL_R3____, K3B_SYM, + K40_SYM, ____SYMBOL_L4____, ____SYMBOL_R4____, K4B_SYM +), + +// NAVIGATION +[_NAVIGATION] = LAYOUT_ortho_5x12_wrapper( + K00_NAV, ____NUMROW_L0____, ____NUMROW_R0____, K0B_NAV, + K10_NAV, __NAVIGATION_L1__, __NAVIGATION_R1__, K1B_NAV, + K20_NAV, __NAVIGATION_L2__, __NAVIGATION_R2__, K2B_NAV, + K30_NAV, __NAVIGATION_L3__, __NAVIGATION_R3__, K3B_NAV, + K40_NAV, __NAVIGATION_L4__, __NAVIGATION_R4__, K4B_NAV +), + +// NUMPAD +[_NUMPAD] = LAYOUT_ortho_5x12_wrapper( + K00_NUM, ____NUMROW_L0____, ____NUMROW_R0____, K0B_NUM, + K10_NUM, ____NUMPAD_L1____, ____NUMPAD_R1____, K1B_NUM, + K20_NUM, ____NUMPAD_L2____, ____NUMPAD_R2____, K2B_NUM, + K30_NUM, ____NUMPAD_L3____, ____NUMPAD_R3____, K3B_NUM, + K40_NUM, ____NUMPAD_L4____, ____NUMPAD_R4____, K4B_NUM +), + +// SETTINGS +[_SETTINGS] = LAYOUT_ortho_5x12_wrapper( + K00_SET, ______TRANS______, ______TRANS______, K0B_SET, + K10_SET, ___SETTINGS_L1___, ___SETTINGS_R1___, K1B_SET, + K20_SET, ___SETTINGS_L2___, ___SETTINGS_R2___, K2B_SET, + K30_SET, ___SETTINGS_L3___, ___SETTINGS_R3___, K3B_SET, + K40_SET, ___SETTINGS_L4___, ___SETTINGS_R4___, K4B_SET +) +}; \ No newline at end of file diff --git a/layouts/community/ortho_5x12/alfrdmalr/rules.mk b/layouts/community/ortho_5x12/alfrdmalr/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/users/alfrdmalr/alfrdmalr.c b/users/alfrdmalr/alfrdmalr.c new file mode 100644 index 000000000000..39d2b62e0035 --- /dev/null +++ b/users/alfrdmalr/alfrdmalr.c @@ -0,0 +1,44 @@ +#include "alfrdmalr.h" +#include "muse.h" + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif + + LEADER_DICTIONARY() { + leading = false; + // reset keyboard to bootloader + SEQ_FIVE_KEYS(KC_R, KC_E, KC_S, KC_E, KC_T) { + reset_keyboard(); + } + // minimize window (Windows) + SEQ_THREE_KEYS(KC_M, KC_I, KC_N) { + SEND_STRING(SS_LALT(" ")"n"); + } + leader_end(); + } +} \ No newline at end of file diff --git a/users/alfrdmalr/alfrdmalr.h b/users/alfrdmalr/alfrdmalr.h new file mode 100644 index 000000000000..922b7ca40674 --- /dev/null +++ b/users/alfrdmalr/alfrdmalr.h @@ -0,0 +1,276 @@ +/* +Copyright 2020 Alfred Maler @alfrdmalr + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +#include QMK_KEYBOARD_H + +enum shared_layers { + _QWERTY, + _SETTINGS, + _SYMBOLS, + _NAVIGATION, + _NUMPAD +}; + +// KEYCODES ============================================================================ +#define NUMSPACE LT(_NUMPAD, KC_SPC) +#define NAVLAYER MO(_NAVIGATION) +#define SYMLAYER MO(_SYMBOLS) +#define SETLAYER MO(_SETTINGS) +#define CTRLSHFT C(KC_LSFT) +#define WINUNDO C(KC_Z) +#define WINCOPY C(KC_C) +#define WINCUT C(KC_X) +#define WINPASTE C(KC_V) + +// convenience keycodes/aliases for base modifiers +// bottom row +#define K41 CTRLSHFT +#define K42 KC_LGUI +#define K43 KC_LALT +#define K44 SYMLAYER +#define K45 NUMSPACE +#define K46 NUMSPACE +#define K47 SYMLAYER +#define K48 KC_RALT +#define K49 SETLAYER +#define K4A MU_TOG + +// leftmost column +#define K00 KC_ESC +#define K10 KC_TAB +#define K20 NAVLAYER +#define K30 KC_LSFT +#define K40 KC_LCTL + +// rightmost column +#define K0B KC_BSPC +#define K1B KC_BSPC +#define K1B_ALT KC_DEL // for 5x12 boards, keep backspace as the top-left key and add delete key +#define K2B KC_QUOT +#define K3B KC_RSFT +#define K4B KC_LEAD + +// LAYOUT WRAPPERS ===================================================================== +#if (!defined(LAYOUT) && defined(KEYMAP)) +# define LAYOUT KEYMAP +#endif + +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) +#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) + +// KEYCODE GROUPS ====================================================================== +// MISC +#define ______TRANS______ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +#define ____NUMROW_L0____ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ____NUMROW_R0____ KC_6, KC_7, KC_8, KC_9, KC_0 +#define _____BASE_L4_____ K41, K42, K43, K44, K45 +#define _____BASE_R4_____ K46, K47, K48, K49, K4A + +/* QWERTY ============================================================================== + * ,-----------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | DEL | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NAV | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | C/S | LGUI | LALT | SYMB | NUM/SPACE | SYMB | RALT | SETT | MUTG | LEAD | + * `-----------------------------------------------------------------------------------' + */ + +// LEFT +// - CORE +#define ____QWERTY_L1____ KC_Q, KC_W, KC_E, KC_R, KC_T +#define ____QWERTY_L2____ KC_A, KC_S, KC_D, KC_F, KC_G +#define ____QWERTY_L3____ KC_Z, KC_X, KC_C, KC_V, KC_B + +// RIGHT +// - CORE +#define ____QWERTY_R1____ KC_Y, KC_U, KC_I, KC_O, KC_P +#define ____QWERTY_R2____ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define ____QWERTY_R3____ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + +/* NUMPAD ============================================================================== + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | F9 | F10 | F11 | F12 | | NLCK | 7 | 8 | 9 | - | DEL | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS | + * `-----------------------------------------------------------------------------------' + */ + +// LEFT +// - CORE +#define ____NUMPAD_L1____ KC_F9, KC_F10, KC_F11, KC_F12, KC_NO +#define ____NUMPAD_L2____ KC_F5, KC_F6, KC_F7, KC_F8, KC_SPC +#define ____NUMPAD_L3____ KC_F1, KC_F2, KC_F3, KC_F4, KC_LALT + +// - MODS +#define ____NUMPAD_L4____ ______TRANS______ +#define K00_NUM KC_TRNS +#define K10_NUM KC_TRNS +#define K20_NUM KC_TRNS +#define K30_NUM KC_TRNS +#define K40_NUM KC_TRNS + +// RIGHT +// - CORE +#define ____NUMPAD_R1____ KC_NLCK, KC_7, KC_8, KC_9, KC_MINS +#define ____NUMPAD_R2____ KC_SPC, KC_4, KC_5, KC_6, KC_PLUS +#define ____NUMPAD_R3____ KC_CAPS, KC_1, KC_2, KC_3, KC_SLSH + +// - MODS +#define ____NUMPAD_R4____ KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_ASTR +#define K0B_NUM KC_TRNS +#define K1B_NUM KC_TRNS +#define K2B_NUM KC_ENT +#define K3B_NUM KC_TRNS +#define K4B_NUM KC_TRNS + +/* SYMBOLS ============================================================================= + * ,-----------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | # | $ | { | } | | | ^ | * | | | ~ | TRNS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | < | > | ( | ) | | | - | + | & | \ | ` | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | ! | @ | [ | ] | | | _ | = | % | / | SHFT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | + * `-----------------------------------------------------------------------------------' + */ + +// LEFT +// - CORE +#define ____SYMBOL_L1____ KC_HASH, KC_DOLLAR, KC_LCBR, KC_RCBR, KC_NO +#define ____SYMBOL_L2____ KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO +#define ____SYMBOL_L3____ KC_EXCLAIM, KC_AT, KC_LBRC, KC_RBRC, KC_NO + +// - MODS +#define ____SYMBOL_L4____ ______TRANS______ +#define K00_SYM KC_TRNS +#define K10_SYM KC_TRNS +#define K20_SYM KC_TRNS +#define K30_SYM KC_TRNS +#define K40_SYM KC_TRNS + +// RIGHT +// - CORE +#define ____SYMBOL_R1____ KC_NO, KC_CIRC, KC_ASTR, KC_PIPE, KC_TILD +#define ____SYMBOL_R2____ KC_NO, KC_MINS, KC_PLUS, KC_AMPR, KC_BSLS +#define ____SYMBOL_R3____ KC_NO, KC_UNDS, KC_EQL, KC_PERC, KC_SLSH + +// - MODS +#define ____SYMBOL_R4____ ______TRANS______ +#define K0B_SYM KC_TRNS +#define K1B_SYM KC_TRNS +#define K2B_SYM KC_GRV +#define K3B_SYM KC_TRNS +#define K4B_SYM KC_TRNS + +/* NAVIGATION ========================================================================== + * ,-----------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | DEL | TRNS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | SHFT | CTRl | ALT | GUI | | LEFT | DOWN | UP | RGHT | | ENTR | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | UNDO | CUT | COPY | PSTE | | SPC | PGDO | PGUP | | | TRNS | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS | + * `-----------------------------------------------------------------------------------' + */ + +// LEFT +// - CORE +#define __NAVIGATION_L1__ KC_NO, KC_NO, KC_SPC, KC_F5, KC_NO +#define __NAVIGATION_L2__ KC_LSFT, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO +#define __NAVIGATION_L3__ WINUNDO, WINCUT, WINCOPY, WINPASTE, KC_NO + +// - MODS +#define __NAVIGATION_L4__ _______, _______, _______, _______, KC_ESC +#define K00_NAV KC_TRNS +#define K10_NAV KC_TRNS +#define K20_NAV KC_TRNS +#define K30_NAV KC_TRNS +#define K40_NAV KC_TRNS + +// RIGHT +// - CORE +#define __NAVIGATION_R1__ KC_INS, KC_HOME, KC_END, KC_TAB, KC_DEL +#define __NAVIGATION_R2__ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO +#define __NAVIGATION_R3__ KC_SPC, KC_PGDN, KC_PGUP, KC_NO, KC_NO + +// - MODS +#define __NAVIGATION_R4__ KC_ESC, _______, _______, _______, _______ +#define K0B_NAV KC_TRNS +#define K1B_NAV KC_TRNS +#define K2B_NAV KC_ENT +#define K3B_NAV KC_TRNS +#define K4B_NAV KC_TRNS + +/* SETTINGS ============================================================================ + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | DBUG | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +// LEFT +// - CORE +#define ___SETTINGS_L1___ _______, DEBUG, _______, _______, _______ +#define ___SETTINGS_L2___ _______, MU_MOD, AU_ON, AU_OFF, AG_NORM +#define ___SETTINGS_L3___ MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON + +// - MODS +#define ___SETTINGS_L4___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define K00_SET KC_NO +#define K10_SET KC_NO +#define K20_SET KC_NO +#define K30_SET KC_ASTG +#define K40_SET KC_NO + +// RIGHT +// - CORE +#define ___SETTINGS_R1___ TERM_ON, TERM_OFF, _______, _______, _______ +#define ___SETTINGS_R2___ _______, _______, _______, _______, _______ +#define ___SETTINGS_R3___ _______, _______, _______, _______, _______ + +// - MODS +#define ___SETTINGS_R4___ KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO +#define K0B_SET KC_NO +#define K1B_SET KC_NO +#define K2B_SET KC_NO +#define K3B_SET KC_NO +#define K4B_SET KC_NO \ No newline at end of file diff --git a/users/alfrdmalr/config.h b/users/alfrdmalr/config.h new file mode 100644 index 000000000000..502d3158bcf9 --- /dev/null +++ b/users/alfrdmalr/config.h @@ -0,0 +1,7 @@ +#pragma once + +#define MUSIC_MASK (keycode != KC_NO) +#define MIDI_BASIC + +#define LEADER_TIMEOUT 400 +#define LEADER_PER_KEY_TIMING diff --git a/users/alfrdmalr/readme.md b/users/alfrdmalr/readme.md new file mode 100644 index 000000000000..d462a5baf17b --- /dev/null +++ b/users/alfrdmalr/readme.md @@ -0,0 +1,47 @@ +# alfrdmalr's userspace +## Overview +The alphanumeric characters and symbols are spread between three main 'typing' layers: REGULAR, NUMPAD, and SYMBOLS. + +A fourth layer, NAVIGATION, contains useful modifiers, shortcuts, and navigation functions like the arrow keys and page up/down. This layer also provides access to the `ENTER` and `ESC` keys. + +Finally, a SETTINGS layer can be used to adjust certain keyboard-related options. + +A visual representation of each layer can be found in [alfrdmalr.h](./alfrdmalr.h) + +### Layers + +#### REGULAR +Right now this is just a QWERTY layer, but other layouts (DVORAK, COLEMAK, etc.) could easily be added. The REGULAR layer uses the default modifiers. + +The default modifiers are defined in the style `K00`, where the first digit is the row index and the second digit is the column index. These indices are based on the Preonic's 5x12 grid, and are **not** adjusted for a board of different size; for instance, the upper-leftmost key in the preonic layout is `K00`, whereas the upper-leftmost key on a Planck would be `K10`. + +This convention is designed to work nicely with layout wrappers. + +#### NUMPAD +The NUMPAD layer puts a numpad under the right hand, surrounding the home row position. Several basic arithmetic operators are also provided, as well as comma/decimal symbols, to emulate a traditional numpad. The numlock/capslock keys are accessible from this layer as well, though it should be noted that the actual keycodes being sent by the numpad are NOT the numpad versions of the numbers - this is to prevent the normal numlock behavior from blocking numbers from being sent. + +This layer also holds the first twelve function keys. + +#### SYMBOLS +This layer holds all the symbols that are not accessible from the REGULAR layer. There is some redundancy (for instance, `/` exists in both the REGULAR and SYMBOLS layer; its position, however, remains consistent) but with the exception of single and double quotes, all symbols are available from this layer. + +#### NAVIGATION +The primary function of this layer is to provide arrow keys under hjkl. The surrounding keys contain similar functionality - for instance, the keys directly below `DOWN` and `UP` are `PAGEDOWN` and `PAGEUP`, respectively. `HOME` and `END` are inverted from this convention, simply because I kept hitting the wrong key when trying to jump to the beginning/end of lines when editing text. + +To the immediate right of the NAVIGATION layer key are the following modifiers: `SHIFT`, `CONTROL`, `ALT`, `GUI`. All modifiers are the "left" variants. The idea is to use the left hand to hold different modifiers as necessary while using the right hand to navigate and format. + +`ESCAPE` is located on the spacebar from this layer, and `DELETE` is placed next to `BACKSPACE`, for convenience when formatting text. There are also four Windows shortcuts for undo, cut, copy, and paste, located in the same position as the relevant keys on the base layer (undo, for example, is in the same place as the `Z` key). + +#### SETTINGS +Right now, this is pretty similar to the default settings layer (the planck's ADJUST layer). + +Primary differences are the inclusion of an autoshift toggle and the removal of the reset button. The bootloader functionality has been moved to a leader key sequence: LEAD - R - E - S - E - T. + +### Leader Key Sequences +A complete list of leader sequences can be found below: + +#### Reset +LEAD - R - E - S - E - T + +#### Minimize (Windows) +LEAD - M - I - N diff --git a/users/alfrdmalr/rules.mk b/users/alfrdmalr/rules.mk new file mode 100644 index 000000000000..1b674c04ec72 --- /dev/null +++ b/users/alfrdmalr/rules.mk @@ -0,0 +1,8 @@ +SRC += alfrdmalr.c + +ifdef AUDIO_ENABLE + SRC += muse.c +endif + +AUTO_SHIFT_ENABLE = yes +LEADER_ENABLE = yes From 3b1f29a5d6d171c7c659eb0d76fff806a52ac1cf Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 8 Feb 2020 13:50:42 +1100 Subject: [PATCH 227/331] [Keyboard] Misc tidyups for Chidori (#8091) --- keyboards/chidori/board.c | 2 - keyboards/chidori/chidori.c | 2 + keyboards/chidori/chidori.h | 68 ++++++++-------- keyboards/chidori/keymaps/default/keymap.c | 16 ++-- keyboards/chidori/keymaps/extended/keymap.c | 22 ++--- keyboards/chidori/matrix.c | 89 ++------------------- keyboards/chidori/rules.mk | 6 +- keyboards/chidori/usbconfig.h | 23 ++---- 8 files changed, 59 insertions(+), 169 deletions(-) diff --git a/keyboards/chidori/board.c b/keyboards/chidori/board.c index ff5b76a3af93..e00156eb9032 100644 --- a/keyboards/chidori/board.c +++ b/keyboards/chidori/board.c @@ -141,8 +141,6 @@ inline bool board_is_master(board_info_t* board) { return false; } -inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } - inline uint8_t matrix2board(uint8_t row) { return row % NUM_ROWS; } inline uint8_t board_index(uint8_t row) { return row / NUM_ROWS; } diff --git a/keyboards/chidori/chidori.c b/keyboards/chidori/chidori.c index a3b6f2c041c0..229982724e81 100644 --- a/keyboards/chidori/chidori.c +++ b/keyboards/chidori/chidori.c @@ -13,3 +13,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +#include "chidori.h" diff --git a/keyboards/chidori/chidori.h b/keyboards/chidori/chidori.h index efaff719480b..d82b9217fb94 100644 --- a/keyboards/chidori/chidori.h +++ b/keyboards/chidori/chidori.h @@ -13,47 +13,45 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once #include "quantum.h" // clang-format off #define LAYOUT( \ - L01, L02, L03, L04, L05, L06, R01, R02, R03, R04, R05, R06, \ - L07, L08, L09, L10, L11, L12, R07, R08, R09, R10, R11, R12, \ - L13, L14, L15, L16, L17, L18, R13, R14, R15, R16, R17, R18, \ - L19, L20, L21, L22, L23, L24, R19, R20, R21, R22, R23, R24 \ - ) \ - { \ - { L01, L02, L03, L04, L05, L06 }, \ - { L07, L08, L09, L10, L11, L12 }, \ - { L13, L14, L15, L16, L17, L18 }, \ - { L19, L20, L21, L22, L23, L24 }, \ - { R01, R02, R03, R04, R05, R06 }, \ - { R07, R08, R09, R10, R11, R12 }, \ - { R13, R14, R15, R16, R17, R18 }, \ - { R19, R20, R21, R22, R23, R24 } \ - } + L01, L02, L03, L04, L05, L06, R01, R02, R03, R04, R05, R06, \ + L07, L08, L09, L10, L11, L12, R07, R08, R09, R10, R11, R12, \ + L13, L14, L15, L16, L17, L18, R13, R14, R15, R16, R17, R18, \ + L19, L20, L21, L22, L23, L24, R19, R20, R21, R22, R23, R24 \ +) { \ + { L01, L02, L03, L04, L05, L06 }, \ + { L07, L08, L09, L10, L11, L12 }, \ + { L13, L14, L15, L16, L17, L18 }, \ + { L19, L20, L21, L22, L23, L24 }, \ + { R01, R02, R03, R04, R05, R06 }, \ + { R07, R08, R09, R10, R11, R12 }, \ + { R13, R14, R15, R16, R17, R18 }, \ + { R19, R20, R21, R22, R23, R24 } \ +} #define LAYOUT_extended( \ - L01, L02, L03, L04, L05, L06, M01, M02, M03, M04, M05, M06, R01, R02, R03, R04, R05, R06, \ - L07, L08, L09, L10, L11, L12, M07, M08, M09, M10, M11, M12, R07, R08, R09, R10, R11, R12, \ - L13, L14, L15, L16, L17, L18, M13, M14, M15, M16, M17, M18, R13, R14, R15, R16, R17, R18, \ - L19, L20, L21, L22, L23, L24, M19, M20, M21, M22, M23, M24, R19, R20, R21, R22, R23, R24 \ - ) \ - { \ - { L01, L02, L03, L04, L05, L06 }, \ - { L07, L08, L09, L10, L11, L12 }, \ - { L13, L14, L15, L16, L17, L18 }, \ - { L19, L20, L21, L22, L23, L24 }, \ - { M01, M02, M03, M04, M05, M06 }, \ - { M07, M08, M09, M10, M11, M12 }, \ - { M13, M14, M15, M16, M17, M18 }, \ - { M19, M20, M21, M22, M23, M24 }, \ - { R01, R02, R03, R04, R05, R06 }, \ - { R07, R08, R09, R10, R11, R12 }, \ - { R13, R14, R15, R16, R17, R18 }, \ - { R19, R20, R21, R22, R23, R24 } \ - } - + L01, L02, L03, L04, L05, L06, M01, M02, M03, M04, M05, M06, R01, R02, R03, R04, R05, R06, \ + L07, L08, L09, L10, L11, L12, M07, M08, M09, M10, M11, M12, R07, R08, R09, R10, R11, R12, \ + L13, L14, L15, L16, L17, L18, M13, M14, M15, M16, M17, M18, R13, R14, R15, R16, R17, R18, \ + L19, L20, L21, L22, L23, L24, M19, M20, M21, M22, M23, M24, R19, R20, R21, R22, R23, R24 \ +) { \ + { L01, L02, L03, L04, L05, L06 }, \ + { L07, L08, L09, L10, L11, L12 }, \ + { L13, L14, L15, L16, L17, L18 }, \ + { L19, L20, L21, L22, L23, L24 }, \ + { M01, M02, M03, M04, M05, M06 }, \ + { M07, M08, M09, M10, M11, M12 }, \ + { M13, M14, M15, M16, M17, M18 }, \ + { M19, M20, M21, M22, M23, M24 }, \ + { R01, R02, R03, R04, R05, R06 }, \ + { R07, R08, R09, R10, R11, R12 }, \ + { R13, R14, R15, R16, R17, R18 }, \ + { R19, R20, R21, R22, R23, R24 } \ +} // clang-format on diff --git a/keyboards/chidori/keymaps/default/keymap.c b/keyboards/chidori/keymaps/default/keymap.c index 4aacdfb742e8..373b5ec83b29 100644 --- a/keyboards/chidori/keymaps/default/keymap.c +++ b/keyboards/chidori/keymaps/default/keymap.c @@ -162,15 +162,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - board_set_led_by_index(0, LED_YELLOW, true); - } else { - board_set_led_by_index(0, LED_YELLOW, false); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - board_set_led_by_index(1, LED_YELLOW, true); - } else { - board_set_led_by_index(1, LED_YELLOW, false); - } +bool led_update_user(led_t led_state) { + board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock); + board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock); + + return false; } diff --git a/keyboards/chidori/keymaps/extended/keymap.c b/keyboards/chidori/keymaps/extended/keymap.c index a5c9769f0ca7..174e9ff2e6f1 100644 --- a/keyboards/chidori/keymaps/extended/keymap.c +++ b/keyboards/chidori/keymaps/extended/keymap.c @@ -162,20 +162,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - board_set_led_by_index(0, LED_YELLOW, true); - } else { - board_set_led_by_index(0, LED_YELLOW, false); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - board_set_led_by_index(1, LED_YELLOW, true); - } else { - board_set_led_by_index(1, LED_YELLOW, false); - } - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - board_set_led_by_index(2, LED_YELLOW, true); - } else { - board_set_led_by_index(2, LED_YELLOW, false); - } +bool led_update_user(led_t led_state) { + board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock); + board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock); + board_set_led_by_index(2, LED_YELLOW, led_state.num_lock); + + return false; } diff --git a/keyboards/chidori/matrix.c b/keyboards/chidori/matrix.c index 204f236a6e7f..6228125d9231 100644 --- a/keyboards/chidori/matrix.c +++ b/keyboards/chidori/matrix.c @@ -14,100 +14,23 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "debounce.h" + #include "quantum.h" +#include "matrix.h" #include "board.h" -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop16(matrix[i]) -# define ROW_SHIFTER ((uint16_t)1) -#elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop32(matrix[i]) -# define ROW_SHIFTER ((uint32_t)1) -#endif - -#ifdef MATRIX_MASKED -extern const matrix_row_t matrix_mask[]; -#endif - -/* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -static matrix_row_t matrix[MATRIX_ROWS]; // debounced values - -__attribute__((weak)) void matrix_init_quantum(void) { matrix_init_kb(); } - -__attribute__((weak)) void matrix_scan_quantum(void) { matrix_scan_kb(); } - -__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__((weak)) void matrix_init_user(void) {} - -__attribute__((weak)) void matrix_scan_user(void) {} - -inline matrix_row_t matrix_get_row(uint8_t row) { - // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a - // switch blocker installed and the switch is always pressed. -#ifdef MATRIX_MASKED - return matrix[row] & matrix_mask[row]; -#else - return matrix[row]; -#endif -} - -void matrix_print(void) { - print_matrix_header(); - - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); - print(": "); - print_matrix_row(row); - print("\n"); - } -} - -void matrix_init(void) { +void matrix_init_custom(void) { // initialize key pins board_init(); - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - raw_matrix[i] = 0; - matrix[i] = 0; - } - - debounce_init(MATRIX_ROWS); - - matrix_init_quantum(); } -uint8_t matrix_scan(void) { +bool matrix_scan_custom(matrix_row_t current_matrix[]) { bool changed = false; // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { - changed |= board_read_cols_on_row(raw_matrix, current_row); + changed |= board_read_cols_on_row(current_matrix, current_row); } - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - - matrix_scan_quantum(); - return 1; + return changed; } diff --git a/keyboards/chidori/rules.mk b/keyboards/chidori/rules.mk index 2e88146bac42..7902c41db5fe 100644 --- a/keyboards/chidori/rules.mk +++ b/keyboards/chidori/rules.mk @@ -1,9 +1,5 @@ # MCU name MCU = atmega328p -ARCH = AVR8 -F_USB = $(F_CPU) - -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader selection # Teensy halfkay @@ -36,7 +32,7 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -CUSTOM_MATRIX = yes +CUSTOM_MATRIX = lite # project specific files SRC += matrix.c diff --git a/keyboards/chidori/usbconfig.h b/keyboards/chidori/usbconfig.h index 361868d281ce..48b72de93b91 100644 --- a/keyboards/chidori/usbconfig.h +++ b/keyboards/chidori/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -219,7 +208,7 @@ section at the end of this file). /* -------------------------- Device Description --------------------------- */ -#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xED), ((VENDOR_ID >> 8) & 0xFE) +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) /* USB vendor ID for the device, low byte first. If you have registered your * own Vendor ID, define it here. Otherwise you may use one of obdev's free * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! @@ -228,7 +217,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0x00), ((PRODUCT_ID >> 8) & 0x00) +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) /* This is the ID of the product, low byte first. It is interpreted in the * scope of the vendor ID. If you have registered your own VID with usb.org * or if you have licensed a PID from somebody else, define it here. Otherwise @@ -239,10 +228,10 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ -#define USB_CFG_VENDOR_NAME 'k','a','g','i','z','a','r','a','y','a' +#define USB_CFG_VENDOR_NAME 'K','a','g','i','z','a','r','a','y','a' #define USB_CFG_VENDOR_NAME_LEN 10 /* These two values define the vendor name returned by the USB device. The name * must be given as a list of characters under single quotes. The characters @@ -258,8 +247,8 @@ section at the end of this file). * the macros. See the file USB-IDs-for-free.txt before you assign a name if * you use a shared VID/PID. */ -//#define USB_CFG_SERIAL_NUMBER 'd','m','9','r','e','c','o','r','d','s','.','c','o','m',':','p','1' -//#define USB_CFG_SERIAL_NUMBER_LEN 17 +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ /* Same as above for the serial number. If you don't want a serial number, * undefine the macros. * It may be useful to provide the serial number through other means than at From 7182e9a8ad5e5baa36be5c032c16923396838b3f Mon Sep 17 00:00:00 2001 From: esinlayo Date: Fri, 7 Feb 2020 18:52:02 -0800 Subject: [PATCH 228/331] [Keyboard] Remove i2c write command when reading columns on Ergodox EZ (#8092) * Remove i2c write command when reading cols on Ergodox EZ * Comment on mcp23018 address state during read_cols --- keyboards/ergodox_ez/matrix.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index c7077293804c..28dc37a09925 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -208,10 +208,8 @@ static matrix_row_t read_cols(uint8_t row) { return 0; } else { uint8_t data = 0; - mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; + // reading GPIOB (column port) since in mcp23018's sequential mode + // it is addressed directly after writing to GPIOA in select_row() mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); From fd2ac4b4d59c6208bf9f851df19e387fd598c94b Mon Sep 17 00:00:00 2001 From: Yasuhiro SHIMIZU Date: Sat, 8 Feb 2020 11:53:54 +0900 Subject: [PATCH 229/331] [Keymap] add lily58 yshrsmz keymap (#8095) * add lily58 yshrsmz keymap * apply requested changes * remove more backslashes * remove more backslashes * update rules.mk --- keyboards/lily58/keymaps/yshrsmz/config.h | 52 +++++ keyboards/lily58/keymaps/yshrsmz/keymap.c | 239 ++++++++++++++++++++++ keyboards/lily58/keymaps/yshrsmz/rules.mk | 11 + 3 files changed, 302 insertions(+) create mode 100644 keyboards/lily58/keymaps/yshrsmz/config.h create mode 100644 keyboards/lily58/keymaps/yshrsmz/keymap.c create mode 100644 keyboards/lily58/keymaps/yshrsmz/rules.mk diff --git a/keyboards/lily58/keymaps/yshrsmz/config.h b/keyboards/lily58/keymaps/yshrsmz/config.h new file mode 100644 index 000000000000..58bbdc5e9d05 --- /dev/null +++ b/keyboards/lily58/keymaps/yshrsmz/config.h @@ -0,0 +1,52 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +// Underglow +/* +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +*/ \ No newline at end of file diff --git a/keyboards/lily58/keymaps/yshrsmz/keymap.c b/keyboards/lily58/keymaps/yshrsmz/keymap.c new file mode 100644 index 000000000000..4c56aa523591 --- /dev/null +++ b/keyboards/lily58/keymaps/yshrsmz/keymap.c @@ -0,0 +1,239 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + + + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | \ | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /BackSP / \Enter \ |Space |RAISE | RGUI | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + KC_LALT, KC_LGUI,LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_RGUI +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| Left | Down | Up |Right | PGUP | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | | | | | |-------| |-------| Home | End |Alt+← |Alt+→ | PGDN | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /BackSP / \Enter \ |Space |RAISE | RGUI | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_LOWER] = LAYOUT( + KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 |-------. ,-------| Left | Down | Up |Right | PGUP | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | | | | | |-------| |-------| Home | End |Alt+← |Alt+→ | PGDN | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | / Del / \Enter \ |Space |RAISE | RGUI | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + +[_RAISE] = LAYOUT( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, _______, _______, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, + _______, _______, _______, KC_DEL, _______, _______, _______, _______ +), +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /BackSP / \Enter \ |Space |RAISE | RGUI | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lily58/keymaps/yshrsmz/rules.mk b/keyboards/lily58/keymaps/yshrsmz/rules.mk new file mode 100644 index 000000000000..9c0b3dee64b5 --- /dev/null +++ b/keyboards/lily58/keymaps/yshrsmz/rules.mk @@ -0,0 +1,11 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ From ea2fcb5b082df66778db869f74d50b1147eea7d7 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Sat, 8 Feb 2020 03:54:41 +0100 Subject: [PATCH 230/331] [Keymap] Phoebe/Maxr1998 keymap: enable space cadet with curly braces (#8096) * Phoebe/Maxr1998 keymap: enable space cadet with curly braces * Revert space cadet for left shift, open curly brace on right shift --- keyboards/maxr1998/phoebe/keymaps/default/config.h | 3 +++ keyboards/maxr1998/phoebe/keymaps/default/keymap.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 keyboards/maxr1998/phoebe/keymaps/default/config.h diff --git a/keyboards/maxr1998/phoebe/keymaps/default/config.h b/keyboards/maxr1998/phoebe/keymaps/default/config.h new file mode 100644 index 000000000000..593ac440c145 --- /dev/null +++ b/keyboards/maxr1998/phoebe/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define RSPC_KEYS KC_RSFT, KC_RALT, KC_7 diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c index 1b6052a9d640..b1a37a2f19aa 100644 --- a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c +++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_QST, KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC, KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, KC_SC, KC_SPC, KC_ALGR, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT ), From 4962b743d2123bc0c00330b9e1a2ce687dad5414 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 8 Feb 2020 03:03:51 +0000 Subject: [PATCH 231/331] [Keyboard] Port SPLIT_USB_DETECT to lily58 (#8107) * remove unused files * Port SPLIT_USB_DETECT to lily58 --- keyboards/lily58/matrix.c | 459 ----------------------------- keyboards/lily58/rev1/matrix.c | 5 +- keyboards/lily58/rev1/split_util.c | 76 +++-- keyboards/lily58/split_util.c | 83 ------ keyboards/lily58/split_util.h | 20 -- 5 files changed, 55 insertions(+), 588 deletions(-) delete mode 100644 keyboards/lily58/matrix.c delete mode 100644 keyboards/lily58/split_util.c delete mode 100644 keyboards/lily58/split_util.h diff --git a/keyboards/lily58/matrix.c b/keyboards/lily58/matrix.c deleted file mode 100644 index 328d16c77bf5..000000000000 --- a/keyboards/lily58/matrix.c +++ /dev/null @@ -1,459 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#if (DEBOUNCE > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col -#if (DIODE_DIRECTION == COL2ROW) - unselect_rows(); - init_cols(); -#elif (DIODE_DIRECTION == ROW2COL) - unselect_cols(); - init_rows(); -#endif - - TX_RX_LED_INIT; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); - -} - -uint8_t _matrix_scan(void) -{ - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); -#if (DIODE_DIRECTION == COL2ROW) - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# else - read_cols_on_row(matrix+offset, current_row); -# endif - - } - -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCE > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix+offset, current_col); -# endif - - } -#endif - -# if (DEBOUNCE > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selecton to stabilize - select_row(current_row); - wait_us(30); - - // For each col... - for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - - // Select the col pin to read (active low) - uint8_t pin = col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - - // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); - } - - // Unselect row - unselect_row(current_row); - - return (last_row_value != current_matrix[current_row]); -} - -static void select_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -static void init_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - // Select col and wait for col selecton to stabilize - select_col(current_col); - wait_us(30); - - // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) - { - - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[row_index]; - - // Check row pin state - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) - { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); - } - else - { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -static void select_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#endif diff --git a/keyboards/lily58/rev1/matrix.c b/keyboards/lily58/rev1/matrix.c index 718cc574481a..eaff974e5d87 100755 --- a/keyboards/lily58/rev1/matrix.c +++ b/keyboards/lily58/rev1/matrix.c @@ -95,9 +95,8 @@ uint8_t matrix_cols(void) void matrix_init(void) { - debug_enable = true; - debug_matrix = true; - debug_mouse = true; + split_keyboard_setup(); + // initialize row and col unselect_rows(); init_cols(); diff --git a/keyboards/lily58/rev1/split_util.c b/keyboards/lily58/rev1/split_util.c index e1ff8b4379dc..316c1c389e9d 100755 --- a/keyboards/lily58/rev1/split_util.c +++ b/keyboards/lily58/rev1/split_util.c @@ -7,6 +7,7 @@ #include "split_util.h" #include "matrix.h" #include "keyboard.h" +#include "wait.h" #ifdef USE_MATRIX_I2C # include "i2c.h" @@ -14,19 +15,59 @@ # include "split_scomm.h" #endif +#ifndef SPLIT_USB_TIMEOUT +# define SPLIT_USB_TIMEOUT 2500 +#endif + volatile bool isLeftHand = true; -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif +bool waitForUsb(void) { + for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / 100); i++) { + // This will return true of a USB connection has been established + if (UDADDR & _BV(ADDEN)) { + return true; + } + wait_ms(100); + } + + // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow + (USBCON &= ~(_BV(USBE) | _BV(OTGPADE))); + + return false; +} + +__attribute__((weak)) bool is_keyboard_left(void) { +#if defined(SPLIT_HAND_PIN) + // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand + setPinInput(SPLIT_HAND_PIN); + return readPin(SPLIT_HAND_PIN); +#elif defined(EE_HANDS) + return eeconfig_read_handedness(); +#elif defined(MASTER_RIGHT) + return !has_usb(); +#endif + + return has_usb(); +} + +__attribute__((weak)) bool has_usb(void) { + static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; + + // only check once, as this is called often + if (usbstate == UNKNOWN) { +#if defined(SPLIT_USB_DETECT) + usbstate = waitForUsb() ? MASTER : SLAVE; +#elif defined(__AVR__) + USBCON |= (1 << OTGPADE); // enables VBUS pad + wait_us(5); + + usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS +#else + usbstate = MASTER; +#endif + } + + return (usbstate == MASTER); } static void keyboard_master_setup(void) { @@ -47,14 +88,8 @@ static void keyboard_slave_setup(void) { #endif } -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { -#ifdef USE_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); -void keyboard_slave_loop(void); - -void matrix_master_OLED_init (void); - -#endif From 43c0a9293e74bc0f20c8b4324ea532dff56d9c50 Mon Sep 17 00:00:00 2001 From: Mehmet Denizhan Erdem Date: Sat, 8 Feb 2020 06:07:05 +0300 Subject: [PATCH 232/331] [Keymap] Added keymap for keebio/nyquist (#8108) * my custom keymap for nyquist rev3 * Formatted keymap and added readme --- .../nyquist/keymaps/pipicanim/README.md | 63 +++++++++++++++++++ .../keebio/nyquist/keymaps/pipicanim/config.h | 31 +++++++++ .../keebio/nyquist/keymaps/pipicanim/keymap.c | 29 +++++++++ .../keebio/nyquist/keymaps/pipicanim/rules.mk | 1 + 4 files changed, 124 insertions(+) create mode 100644 keyboards/keebio/nyquist/keymaps/pipicanim/README.md create mode 100644 keyboards/keebio/nyquist/keymaps/pipicanim/config.h create mode 100644 keyboards/keebio/nyquist/keymaps/pipicanim/keymap.c create mode 100644 keyboards/keebio/nyquist/keymaps/pipicanim/rules.mk diff --git a/keyboards/keebio/nyquist/keymaps/pipicanim/README.md b/keyboards/keebio/nyquist/keymaps/pipicanim/README.md new file mode 100644 index 000000000000..8104213913ba --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/pipicanim/README.md @@ -0,0 +1,63 @@ +# pipicanim's Nyquist layout + +``` +make keebio/nyquist/rev3:pipicanim +``` + +## Layers ++ Lower -> Layer 2 ++ Raise -> Layer 1 ++ Code -> Layer 3 + +### Base +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│TAB │Q │W │E │R │T │ │Y │U │I │O │P │BCKPC │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ESC │A │S │D │F │G │ │H │J │K │L │; │' │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│SHIFT │Z │X │C │V │B │ │N │M │, │. │/ │ENTER │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│CTRL |SUPER │MO(3) │ALT │MO(2) │SPACE │ │SPACE │MO(1) │ALT │MO(3) │SUPER │CTRL │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` + +### Lower, Numbers/Special Characters and Navigation +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│` │1 │2 │3 │4 │ │ │ │PGUP │UP │PGDOWN│( │) │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │5 │6 │7 │8 │ │ │HOME │LEFT │DOWN │RIGHT │[ │] │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │9 │0 │- │= │ │ │END │ │ │ │\ │| │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` + +### Raise, F buttons +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│CAPS │ │PRSRC │SCLOCK│PAUSE │ │ │ │F1 │F2 │F3 │F4 │DEL │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │INSERT│HOME │PGUP │ │ │ │F5 │F6 │F7 │F8 │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │DEL │END │PGDOWN│ │ │ │F9 │F10 │F11 │F12 │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` + +### Code, RGB and media controls. + +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│RGBTOG│RGBM+ │RGBM- │ │ │ │ | │ │ │ │ │RESET │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│HUE+ │SAT+ │BRGHT+│EFCT+ │ │ │ │ │PREV │PLAY │NEXT │ │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│HUE- │SAT- │BRGHT-│EFCT │ │ │ | │MUTE │VOL- │VOL+ │ │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` diff --git a/keyboards/keebio/nyquist/keymaps/pipicanim/config.h b/keyboards/keebio/nyquist/keymaps/pipicanim/config.h new file mode 100644 index 000000000000..ef1c4a51ab9b --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/pipicanim/config.h @@ -0,0 +1,31 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/nyquist/keymaps/pipicanim/keymap.c b/keyboards/keebio/nyquist/keymaps/pipicanim/keymap.c new file mode 100644 index 000000000000..1aa9fffdb308 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/pipicanim/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x12( + KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSPC, + KC_ESC,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT, + KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_ENT, + KC_LCTL,KC_LGUI,MO(3),KC_LALT,MO(2),KC_SPC,KC_SPC,MO(1),KC_LALT,MO(3),KC_RGUI,KC_RCTL + ), + [1] = LAYOUT_ortho_4x12( + KC_GRV,KC_1,KC_2,KC_3,KC_4,KC_TRNS,KC_TRNS,KC_PGUP,KC_UP,KC_PGDN,KC_LPRN,KC_RPRN, + KC_TRNS,KC_5,KC_6,KC_7,KC_8,KC_TRNS,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_LBRC,KC_RBRC, + KC_TRNS,KC_9,KC_0,KC_MINS,KC_EQL,KC_TRNS,KC_END,KC_TRNS,KC_TRNS,KC_TRNS,KC_BSLS,KC_PIPE, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + [2] = LAYOUT_ortho_4x12( + KC_CAPS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS,KC_TRNS,KC_F1,KC_F2,KC_F3,KC_F4,KC_DEL, + KC_TRNS,KC_TRNS,KC_INS,KC_HOME,KC_PGUP,KC_TRNS,KC_TRNS,KC_F5,KC_F6,KC_F7,KC_F8,KC_TRNS, + KC_TRNS,KC_TRNS,KC_DEL,KC_END,KC_PGDN,KC_TRNS,KC_TRNS,KC_F9,KC_F10,KC_F11,KC_F12,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + [3] = LAYOUT_ortho_4x12( + RGB_TOG,RGB_MOD,RGB_RMOD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RESET, + RGB_HUI,RGB_SAI,RGB_VAI,RGB_SPI,KC_TRNS,KC_TRNS,KC_TRNS,KC_MPRV,KC_MPLY,KC_MNXT,KC_TRNS,KC_TRNS, + RGB_HUD,RGB_SAD,RGB_VAD,RGB_SPD,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,KC_VOLD,KC_VOLU,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ) +}; + diff --git a/keyboards/keebio/nyquist/keymaps/pipicanim/rules.mk b/keyboards/keebio/nyquist/keymaps/pipicanim/rules.mk new file mode 100644 index 000000000000..7ad666d1a383 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/pipicanim/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes \ No newline at end of file From b62829031de1ae2e5e1efaa35606981c04c443c3 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 7 Feb 2020 19:15:35 -0800 Subject: [PATCH 233/331] [Keyboard] YMDK NP21: matrix and keymap refactor (#8112) * YMDK NP21: matrix and keymap refactor - refactored layout macros - LAYOUT_ortho_6x4 orients the keyboard with the USB port to the back instead of to the right - LAYOUT uses the previous sideways orientation (included for backwards compatibility) - removed redundant includes from ymdk_np21.h - added a readme for the default keymap * add Configurator layout support --- keyboards/ymdk_np21/info.json | 69 +++++++++++++++++++ keyboards/ymdk_np21/keymaps/default/keymap.c | 56 ++++++--------- keyboards/ymdk_np21/keymaps/default/readme.md | 26 +++++++ keyboards/ymdk_np21/ymdk_np21.h | 32 ++++++--- 4 files changed, 137 insertions(+), 46 deletions(-) create mode 100644 keyboards/ymdk_np21/info.json create mode 100644 keyboards/ymdk_np21/keymaps/default/readme.md diff --git a/keyboards/ymdk_np21/info.json b/keyboards/ymdk_np21/info.json new file mode 100644 index 000000000000..b17059a1cd88 --- /dev/null +++ b/keyboards/ymdk_np21/info.json @@ -0,0 +1,69 @@ +{ + "keyboard_name": "YMDK NP21", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_ortho_6x4": { + "width": 4, + "height": 6.25, + "key_count": 24, + "layout": [ + {"label":"K06", "x":0, "y":0}, + {"label":"K16", "x":1, "y":0}, + {"label":"K26", "x":2, "y":0}, + {"label":"K36", "x":3, "y":0}, + {"label":"K05", "x":0, "y":1.25}, + {"label":"K15", "x":1, "y":1.25}, + {"label":"K25", "x":2, "y":1.25}, + {"label":"K35", "x":3, "y":1.25}, + {"label":"K04", "x":0, "y":2.25}, + {"label":"K14", "x":1, "y":2.25}, + {"label":"K24", "x":2, "y":2.25}, + {"label":"K34", "x":3, "y":2.25}, + {"label":"K03", "x":0, "y":3.25}, + {"label":"K13", "x":1, "y":3.25}, + {"label":"K23", "x":2, "y":3.25}, + {"label":"K33", "x":3, "y":3.25}, + {"label":"K02", "x":0, "y":4.25}, + {"label":"K12", "x":1, "y":4.25}, + {"label":"K22", "x":2, "y":4.25}, + {"label":"K32", "x":3, "y":4.25}, + {"label":"K01", "x":0, "y":5.25}, + {"label":"K11", "x":1, "y":5.25}, + {"label":"K21", "x":2, "y":5.25}, + {"label":"K31", "x":3, "y":5.25} + ] + }, + "LAYOUT": { + "width": 6.25, + "height": 4, + "key_count": 24, + "layout": [ + {"label":"K01", "x":0, "y":0}, + {"label":"K02", "x":1, "y":0}, + {"label":"K03", "x":2, "y":0}, + {"label":"K04", "x":3, "y":0}, + {"label":"K05", "x":4, "y":0}, + {"label":"K06", "x":5.25, "y":0}, + {"label":"K11", "x":0, "y":1}, + {"label":"K12", "x":1, "y":1}, + {"label":"K13", "x":2, "y":1}, + {"label":"K14", "x":3, "y":1}, + {"label":"K15", "x":4, "y":1}, + {"label":"K16", "x":5.25, "y":1}, + {"label":"K21", "x":0, "y":2}, + {"label":"K22", "x":1, "y":2}, + {"label":"K23", "x":2, "y":2}, + {"label":"K24", "x":3, "y":2}, + {"label":"K25", "x":4, "y":2}, + {"label":"K26", "x":5.25, "y":2}, + {"label":"K31", "x":0, "y":3}, + {"label":"K32", "x":1, "y":3}, + {"label":"K33", "x":2, "y":3}, + {"label":"K34", "x":3, "y":3}, + {"label":"K35", "x":4, "y":3}, + {"label":"K36", "x":5.25, "y":3} + ] + } + } +} diff --git a/keyboards/ymdk_np21/keymaps/default/keymap.c b/keyboards/ymdk_np21/keymaps/default/keymap.c index 3ade30479fad..143f4f61bbbd 100644 --- a/keyboards/ymdk_np21/keymaps/default/keymap.c +++ b/keyboards/ymdk_np21/keymaps/default/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H #define _NP 0 -#define _BL 1 +#define _BL 1 enum custom_keycodes { NP = SAFE_RANGE, @@ -9,38 +9,24 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-----------------------------------------. - * | 0 | 1 | 4 | 7 | NUM | ESC | - * |------+------+------+------+------+------| - * | . | 2 | 5 | 8 | / | TAB |---, - * |------+------+------+------+------+------|USB| - * | DOT | 3 | 6 | 9 | * | BS |---' - * |------+------+------+------+------+------| - * | Enter| Enter| + | + | - | FN | - * `-----------------------------------------' - */ -[_NP] = LAYOUT( \ - KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, \ - KC_DOT, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, KC_TAB, \ - KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, KC_BSPACE, \ - KC_KP_ENTER, KC_KP_ENTER, KC_KP_PLUS, KC_KP_PLUS, KC_KP_MINUS, MO(_BL) \ -), -/* Qwerty - * ,---------------------------------------------. - * | BL_BRTG | | | | | | - * |---------+--------+---------+--------+---+---| - * | | BL_OFF | BL_TOGG | BL_ON | | |---, - * |---------+--------+---------+--------+---+---|USB| - * | | | | | | |---' - * |---------+--------+---------+--------+---+---| - * | BL_DEC | BL_DEC | BL_INC | BL_INC | | | - * `---------------------------------------------' - */ -[_BL] = LAYOUT( \ - BL_BRTG, _______, _______, _______, _______, _______, \ - _______, BL_OFF, BL_TOGG, BL_ON, _______, _______, \ - _______, _______, _______, _______, _______, _______, \ - BL_DEC, BL_DEC, BL_INC, BL_INC, _______, _______ \ -) + /* Qwerty */ + + [_NP] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_BSPC, MO(_BL), + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_DOT, KC_PDOT, KC_PENT + ), + + [_BL] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, BL_ON, _______, BL_INC, + _______, BL_TOGG, _______, BL_INC, + _______, BL_OFF, _______, BL_DEC, + BL_BRTG, _______, _______, BL_DEC + ) + }; diff --git a/keyboards/ymdk_np21/keymaps/default/readme.md b/keyboards/ymdk_np21/keymaps/default/readme.md new file mode 100644 index 000000000000..aca4c0caba80 --- /dev/null +++ b/keyboards/ymdk_np21/keymaps/default/readme.md @@ -0,0 +1,26 @@ +# default + +The default keymap for the YMDK NP21 keypad. + + Base Layer Function Layer + .-----. .-----. + | USB | | USB | + ,-------------------------------. ,-------------------------------. + | Esc | Tab | Back | Fn | | | | |▒▒▒▒▒▒▒| + | | | Space | | | | | |▒▒▒▒▒▒▒| + |-------+-------+-------+-------| |-------+-------+-------+-------| + | Num | / | * | - | | | | | | + | Lock | | | | | | | | | + |-------+-------+-------+-------| |-------+-------+-------+-------| + | 7 | 8 | 9 | + | | | BL | | BL | + | Home | Up | PgUp | | | | On | | Inc | + |-------+-------+-------+-------| |-------+-------+-------+-------| + | 4 | 5 | 6 | + | | | BL | | BL | + | Left | | Right | | | | Togg | | Inc | + |-------+-------+-------+-------| |-------+-------+-------+-------| + | 1 | 2 | 3 | Ent | | | BL | | BL | + | End | Down | PgDn | | | | Off | | Dec | + |-------+-------+-------+-------| |-------+-------+-------+-------| + | 0 | . | . | Ent | | BL | | | BL | + | Ins | | Del | | | Brthg | | | Dec | + `-------------------------------' `-------------------------------' diff --git a/keyboards/ymdk_np21/ymdk_np21.h b/keyboards/ymdk_np21/ymdk_np21.h index 2cd2d13c21ab..afd3d38c7d45 100644 --- a/keyboards/ymdk_np21/ymdk_np21.h +++ b/keyboards/ymdk_np21/ymdk_np21.h @@ -15,19 +15,17 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" -#define LAYOUT( \ - K01, K02, K03, K04, K05, K06, \ - K11, K12, K13, K14, K15, K16, \ - K21, K22, K23, K24, K25, K26, \ - K31, K32, K33, K34, K35, K36 \ +#define LAYOUT_ortho_6x4( \ + K06, K16, K26, K36, \ + K05, K15, K25, K35, \ + K04, K14, K24, K34, \ + K03, K13, K23, K33, \ + K02, K12, K22, K32, \ + K01, K11, K21, K31 \ ) \ { \ { K06, K05, K04, K03, K02, K01 }, \ @@ -36,4 +34,16 @@ along with this program. If not, see . { K36, K35, K34, K33, K32, K31 } \ } -#endif +#define LAYOUT( \ + K01, K02, K03, K04, K05, K06, \ + K11, K12, K13, K14, K15, K16, \ + K21, K22, K23, K24, K25, K26, \ + K31, K32, K33, K34, K35, K36 \ +) LAYOUT_ortho_6x4( \ + K06, K16, K26, K36, \ + K05, K15, K25, K35, \ + K04, K14, K24, K34, \ + K03, K13, K23, K33, \ + K02, K12, K22, K32, \ + K01, K11, K21, K31 \ +) From df029f9660ff95b8d627b50af4dd539b31f02f26 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Fri, 7 Feb 2020 21:32:14 -0600 Subject: [PATCH 234/331] [Keyboard] adding keyboard: gothic50 (#7983) * gothic50 * Update keyboards/wsk/gothic50/config.h Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/config.h Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/config.h Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/config.h Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic50/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/wsk/gothic50/readme.md Co-Authored-By: Drashna Jaelre * Update keyboards/wsk/gothic50/readme.md Co-Authored-By: Drashna Jaelre * Update keyboards/wsk/gothic50/readme.md Co-Authored-By: Drashna Jaelre * Update keyboards/wsk/gothic50/rules.mk Co-Authored-By: ridingqwerty * Updated with collaborator suggestions * Fixing layout for configurator Co-authored-by: ridingqwerty Co-authored-by: Drashna Jaelre --- keyboards/wsk/gothic50/config.h | 58 +++++++++++++++++++ keyboards/wsk/gothic50/gothic50.c | 1 + keyboards/wsk/gothic50/gothic50.h | 24 ++++++++ keyboards/wsk/gothic50/info.json | 12 ++++ .../wsk/gothic50/keymaps/default/keymap.c | 57 ++++++++++++++++++ .../wsk/gothic50/keymaps/default/rules.mk | 1 + keyboards/wsk/gothic50/readme.md | 15 +++++ keyboards/wsk/gothic50/rules.mk | 32 ++++++++++ 8 files changed, 200 insertions(+) create mode 100644 keyboards/wsk/gothic50/config.h create mode 100644 keyboards/wsk/gothic50/gothic50.c create mode 100644 keyboards/wsk/gothic50/gothic50.h create mode 100644 keyboards/wsk/gothic50/info.json create mode 100644 keyboards/wsk/gothic50/keymaps/default/keymap.c create mode 100644 keyboards/wsk/gothic50/keymaps/default/rules.mk create mode 100644 keyboards/wsk/gothic50/readme.md create mode 100644 keyboards/wsk/gothic50/rules.mk diff --git a/keyboards/wsk/gothic50/config.h b/keyboards/wsk/gothic50/config.h new file mode 100644 index 000000000000..5eb4b30f2e93 --- /dev/null +++ b/keyboards/wsk/gothic50/config.h @@ -0,0 +1,58 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x04EF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT Gothic50 +#define DESCRIPTION Expanded Ergo Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ + +#define MATRIX_ROW_PINS { B5, B4, D7, D6 } +#define MATRIX_COL_PINS { E6, F0, F1, C7, C6, B6, D4, D5, D3, D2, D1, D0, B7, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define RGB_DI_PIN F7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +#define GRAVE_ESC_CTRL_OVERRIDE + + + + + + diff --git a/keyboards/wsk/gothic50/gothic50.c b/keyboards/wsk/gothic50/gothic50.c new file mode 100644 index 000000000000..66854ba8468a --- /dev/null +++ b/keyboards/wsk/gothic50/gothic50.c @@ -0,0 +1 @@ +#include "gothic50.h" diff --git a/keyboards/wsk/gothic50/gothic50.h b/keyboards/wsk/gothic50/gothic50.h new file mode 100644 index 000000000000..03d2a975acdb --- /dev/null +++ b/keyboards/wsk/gothic50/gothic50.h @@ -0,0 +1,24 @@ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k34, k35, k37, k39, k3A, k3B, k3C, k3D \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, KC_NO, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, KC_NO, k34, k35, KC_NO, k37, KC_NO, k39, k3A, k3B, k3C, k3D } \ +} diff --git a/keyboards/wsk/gothic50/info.json b/keyboards/wsk/gothic50/info.json new file mode 100644 index 000000000000..4d2274466b3c --- /dev/null +++ b/keyboards/wsk/gothic50/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Gothic50", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 16.5, + "height": 4.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":8.25, "y":0}, {"label":"U", "x":9.25, "y":0}, {"label":"I", "x":10.25, "y":0}, {"label":"O", "x":11.25, "y":0}, {"label":"P", "x":12.25, "y":0}, {"label":"{", "x":13.25, "y":0}, {"label":"}", "x":14.25, "y":0}, {"x":15.5, "y":0}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":8.5, "y":1}, {"label":"J", "x":9.5, "y":1}, {"label":"K", "x":10.5, "y":1}, {"label":"L", "x":11.5, "y":1}, {"label":":", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1, "w":1.75}, {"x":15.5, "y":1}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"x":8, "y":2}, {"label":"N", "x":9, "y":2}, {"label":"M", "x":10, "y":2}, {"label":"<", "x":11, "y":2}, {"label":">", "x":12, "y":2}, {"label":"?", "x":13, "y":2}, {"x":15.5, "y":2}, {"x":14.25, "y":2.25}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Win", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3}, {"x":5.5, "y":3, "w":1.25}, {"x":8, "y":3, "w":1.75}, {"label":"Alt", "x":9.75, "y":3}, {"label":"Win", "x":10.75, "y":3, "w":1.25}, {"x":13.25, "y":3.25}, {"x":14.25, "y":3.25}, {"x":15.25, "y":3.25}] + } + } +} diff --git a/keyboards/wsk/gothic50/keymaps/default/keymap.c b/keyboards/wsk/gothic50/keymaps/default/keymap.c new file mode 100644 index 000000000000..477c9fad3220 --- /dev/null +++ b/keyboards/wsk/gothic50/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +#include QMK_KEYBOARD_H + +// Tap Dance Declarations +enum { + TD_SCAPS = 0 +}; + +#define SCAPS_LG TD(TD_SCAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PSCR, \ + LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, KC_INS, \ + SCAPS_LG, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(2), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_DEL, \ + KC_APP, KC_LGUI, KC_LALT, MO(1), LT(1,KC_SPC), KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + [1] = LAYOUT( + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PAUS, \ + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, KC_SCLN, KC_BSLS, KC_MUTE, \ + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_MPLY, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), + + [2] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(F6); + writePinLow(F6); + // set NumLock LED to output and low + setPinOutput(F5); + writePinLow(F5); + // set ScrollLock LED to output and low + setPinOutput(F4); + writePinLow(F4); +} + +layer_state_t layer_state_set_user(layer_state_t state) +{ + writePin(F4, (state & 0x1)); + writePin(F5, (state & 0x2)); + writePin(F6, (state & 0x4)); + return state; +} + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // double tap for caps + [TD_SCAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) +}; diff --git a/keyboards/wsk/gothic50/keymaps/default/rules.mk b/keyboards/wsk/gothic50/keymaps/default/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/wsk/gothic50/keymaps/default/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/wsk/gothic50/readme.md b/keyboards/wsk/gothic50/readme.md new file mode 100644 index 000000000000..dd25695a4819 --- /dev/null +++ b/keyboards/wsk/gothic50/readme.md @@ -0,0 +1,15 @@ +# Gothic50 + +![Gothic50](https://i.imgur.com/T2V63c8.png) + +An Alice style 40% board with arrowkeys, based on the Fate Arisu layout. + +* Keyboard Maintainer: [Worldspawn00](https://github.com/Worldspawn00) +* Hardware Supported: Gothic50 PCB +* Hardware Availability: https://geekhack.org/index.php?topic=102180.0 + +Make example for this keyboard (after setting up your build environment): + + make wsk/gothic50:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) diff --git a/keyboards/wsk/gothic50/rules.mk b/keyboards/wsk/gothic50/rules.mk new file mode 100644 index 000000000000..6a1221aa1a1b --- /dev/null +++ b/keyboards/wsk/gothic50/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From a1a88b8ac778b2b22be127eb2409ae7b338f7e7e Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Fri, 7 Feb 2020 21:34:37 -0600 Subject: [PATCH 235/331] [Keyboard] adding keyboard: gothic70 (#7982) * gothic70 * Update keyboards/wsk/gothic70/readme.md Co-Authored-By: Drashna Jaelre * Update keyboards/wsk/gothic70/readme.md Co-Authored-By: Drashna Jaelre * Update keyboards/wsk/gothic70/readme.md Co-Authored-By: Drashna Jaelre * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/wsk/gothic70/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic70/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic70/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic70/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic70/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic70/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic70/config.h Co-Authored-By: ridingqwerty * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/config.h Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Update keyboards/wsk/gothic70/keymaps/default/keymap.c Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Committed review suggestions * Small indicator LED layer function tweak * Fixing layout for configurator Co-authored-by: Drashna Jaelre Co-authored-by: ridingqwerty Co-authored-by: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> --- keyboards/wsk/gothic70/config.h | 46 +++++++++++++ keyboards/wsk/gothic70/gothic70.c | 1 + keyboards/wsk/gothic70/gothic70.h | 41 +++++++++++ keyboards/wsk/gothic70/info.json | 12 ++++ .../wsk/gothic70/keymaps/default/keymap.c | 69 +++++++++++++++++++ .../wsk/gothic70/keymaps/default/rules.mk | 1 + keyboards/wsk/gothic70/readme.md | 15 ++++ keyboards/wsk/gothic70/rules.mk | 32 +++++++++ 8 files changed, 217 insertions(+) create mode 100644 keyboards/wsk/gothic70/config.h create mode 100644 keyboards/wsk/gothic70/gothic70.c create mode 100644 keyboards/wsk/gothic70/gothic70.h create mode 100644 keyboards/wsk/gothic70/info.json create mode 100644 keyboards/wsk/gothic70/keymaps/default/keymap.c create mode 100644 keyboards/wsk/gothic70/keymaps/default/rules.mk create mode 100644 keyboards/wsk/gothic70/readme.md create mode 100644 keyboards/wsk/gothic70/rules.mk diff --git a/keyboards/wsk/gothic70/config.h b/keyboards/wsk/gothic70/config.h new file mode 100644 index 000000000000..98e70e615c9b --- /dev/null +++ b/keyboards/wsk/gothic70/config.h @@ -0,0 +1,46 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x63CC +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT Gothic70 +#define DESCRIPTION Expanded Ergo Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ + +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN F4 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 7 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + diff --git a/keyboards/wsk/gothic70/gothic70.c b/keyboards/wsk/gothic70/gothic70.c new file mode 100644 index 000000000000..dde147117425 --- /dev/null +++ b/keyboards/wsk/gothic70/gothic70.c @@ -0,0 +1 @@ +#include "gothic70.h" diff --git a/keyboards/wsk/gothic70/gothic70.h b/keyboards/wsk/gothic70/gothic70.h new file mode 100644 index 000000000000..532eca8808ba --- /dev/null +++ b/keyboards/wsk/gothic70/gothic70.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Fate + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k1E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k2E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k3E, \ + k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k44, k45, k47, k49, k4A, k4C, k4D, k4E \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \ + { k40, k41, k42, KC_NO, k44, k45, k46, k47, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E } \ +} diff --git a/keyboards/wsk/gothic70/info.json b/keyboards/wsk/gothic70/info.json new file mode 100644 index 000000000000..230f0ecdde54 --- /dev/null +++ b/keyboards/wsk/gothic70/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Gothic70", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 18, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.75, "y":0}, {"label":"*", "x":9.75, "y":0}, {"label":"(", "x":10.75, "y":0}, {"label":")", "x":11.75, "y":0}, {"label":"_", "x":12.75, "y":0}, {"label":"+", "x":13.75, "y":0}, {"label":"BS", "x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":17, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8.25, "y":1}, {"label":"U", "x":9.25, "y":1}, {"label":"I", "x":10.25, "y":1}, {"label":"O", "x":11.25, "y":1}, {"label":"P", "x":12.25, "y":1}, {"label":"{", "x":13.25, "y":1}, {"label":"}", "x":14.25, "y":1}, {"label":"|", "x":15.25, "y":1, "w":1.5}, {"x":17, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.5, "y":2}, {"label":"J", "x":9.5, "y":2}, {"label":"K", "x":10.5, "y":2}, {"label":"L", "x":11.5, "y":2}, {"label":":", "x":12.5, "y":2}, {"label":"\"", "x":13.5, "y":2}, {"label":"Enter", "x":14.5, "y":2, "w":2.25}, {"x":17, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"x":8, "y":3}, {"label":"N", "x":9, "y":3}, {"label":"M", "x":10, "y":3}, {"label":"<", "x":11, "y":3}, {"label":">", "x":12, "y":3}, {"label":"?", "x":13, "y":3}, {"label":"Shift", "x":14, "y":3, "w":1.75}, {"x":16, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3, "y":4, "w":1.5}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4}, {"x":8.5, "y":4, "w":2.75}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Win", "x":13.5, "y":4, "w":1.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}] + } + } +} diff --git a/keyboards/wsk/gothic70/keymaps/default/keymap.c b/keyboards/wsk/gothic70/keymaps/default/keymap.c new file mode 100644 index 000000000000..5e73ec419710 --- /dev/null +++ b/keyboards/wsk/gothic70/keymaps/default/keymap.c @@ -0,0 +1,69 @@ + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _MEDIA }; + +// Tap Dance Declarations +enum { + TD_SCAPS = 0 +}; + +#define SCAPS_LG TD(TD_SCAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PSCR, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_DEL, \ + SCAPS_LG, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + [_FN] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PAUS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), + + [_MEDIA] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and off (active low) + setPinOutput(F5); + writePinHigh(F5); + // set NumLock LED to output and off (active low) + setPinOutput(F6); + writePinHigh(F6); + // set ScrollLock LED to output and off (active low) + setPinOutput(F7); + writePinHigh(F7); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) +{ + writePin(F5, (state & 0x1)); + writePin(F6, (state & 0x2)); + writePin(F7, (state & 0x4)); + return state; +} + + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for + [TD_SCAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), +}; diff --git a/keyboards/wsk/gothic70/keymaps/default/rules.mk b/keyboards/wsk/gothic70/keymaps/default/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/wsk/gothic70/keymaps/default/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/wsk/gothic70/readme.md b/keyboards/wsk/gothic70/readme.md new file mode 100644 index 000000000000..42c5f9197f6f --- /dev/null +++ b/keyboards/wsk/gothic70/readme.md @@ -0,0 +1,15 @@ +# Gothic70 + +![Gothic70](https://i.imgur.com/v84tpIQ.png) + +An Alice style board with arrowkeys, based on the Fate Arisu layout. + +* Keyboard Maintainer: [Worldspawn00](https://github.com/Worldspawn00) +* Hardware Supported: Gothic70 PCB +* Hardware Availability: https://geekhack.org/index.php?topic=102180.0 + +Make example for this keyboard (after setting up your build environment): + + make wsk/gothic70:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) diff --git a/keyboards/wsk/gothic70/rules.mk b/keyboards/wsk/gothic70/rules.mk new file mode 100644 index 000000000000..6a1221aa1a1b --- /dev/null +++ b/keyboards/wsk/gothic70/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From f44a89ca77e63188d3e7102cd5b49352d07fa4c9 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Fri, 7 Feb 2020 21:37:46 -0600 Subject: [PATCH 236/331] [Keyboard] adding keyboard: kodachi50 (#7976) * kodachi50 * Amendeded with collaborator suggestions * Add a missing key to layer 2 top row Co-authored-by: ridingqwerty --- keyboards/wsk/kodachi50/config.h | 48 +++++++++++++++++++ keyboards/wsk/kodachi50/info.json | 12 +++++ .../wsk/kodachi50/keymaps/default/keymap.c | 25 ++++++++++ keyboards/wsk/kodachi50/kodachi50.c | 1 + keyboards/wsk/kodachi50/kodachi50.h | 20 ++++++++ keyboards/wsk/kodachi50/readme.md | 16 +++++++ keyboards/wsk/kodachi50/rules.mk | 26 ++++++++++ 7 files changed, 148 insertions(+) create mode 100644 keyboards/wsk/kodachi50/config.h create mode 100644 keyboards/wsk/kodachi50/info.json create mode 100644 keyboards/wsk/kodachi50/keymaps/default/keymap.c create mode 100644 keyboards/wsk/kodachi50/kodachi50.c create mode 100644 keyboards/wsk/kodachi50/kodachi50.h create mode 100644 keyboards/wsk/kodachi50/readme.md create mode 100644 keyboards/wsk/kodachi50/rules.mk diff --git a/keyboards/wsk/kodachi50/config.h b/keyboards/wsk/kodachi50/config.h new file mode 100644 index 000000000000..fca7a5b99045 --- /dev/null +++ b/keyboards/wsk/kodachi50/config.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x72D4 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT Kodachi50 +#define DESCRIPTION Mirror stagger 50% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D2, B5, B6, B2, B3, B1, F7, F6 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 7 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/wsk/kodachi50/info.json b/keyboards/wsk/kodachi50/info.json new file mode 100644 index 000000000000..5f1222dec42b --- /dev/null +++ b/keyboards/wsk/kodachi50/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Kodachi50", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 15, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Tab", "x":0, "y":0, "w":1.5}, {"label":"Q", "x":1.5, "y":0}, {"label":"W", "x":2.5, "y":0}, {"label":"E", "x":3.5, "y":0}, {"label":"R", "x":4.5, "y":0}, {"label":"T", "x":5.5, "y":0}, {"label":"{", "x":6.5, "y":0}, {"label":"}", "x":7.5, "y":0}, {"label":"Y", "x":8.5, "y":0}, {"label":"U", "x":9.5, "y":0}, {"label":"I", "x":10.5, "y":0}, {"label":"O", "x":11.5, "y":0}, {"label":"P", "x":12.5, "y":0}, {"label":"Backspace", "x":13.5, "y":0, "w":1.5}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"|", "x":6.25, "y":1, "w":1.25}, {"label":"Alt", "x":7.5, "y":1, "w":1.25}, {"label":"H", "x":8.75, "y":1}, {"label":"J", "x":9.75, "y":1}, {"label":"K", "x":10.75, "y":1}, {"label":"L", "x":11.75, "y":1}, {"label":"\"", "x":12.75, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"~", "x":6, "y":2}, {"label":"_", "x":7, "y":2}, {"label":"+", "x":8, "y":2}, {"label":"N", "x":9, "y":2}, {"label":"M", "x":10, "y":2}, {"label":"<", "x":11, "y":2}, {"label":">", "x":12, "y":2}, {"label":"?", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Win", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":2.75}, {"x":6.5, "y":3}, {"x":7.5, "y":3, "w":2.25}, {"label":"Win", "x":9.75, "y":3, "w":1.25}, {"label":"Left", "x":11, "y":3}, {"label":"Down", "x":12, "y":3}, {"label":"Up", "x":13, "y":3}, {"label":"Right", "x":14, "y":3}] + } + } +} diff --git a/keyboards/wsk/kodachi50/keymaps/default/keymap.c b/keyboards/wsk/kodachi50/keymaps/default/keymap.c new file mode 100644 index 000000000000..2b21a35f9679 --- /dev/null +++ b/keyboards/wsk/kodachi50/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSLS, + KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LALT, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_NO, KC_ENT, + KC_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MINS, KC_EQL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_PSCR, + KC_MENU, KC_LGUI, KC_LALT, LT(1, KC_SPC), KC_RSFT, KC_BSPC, MO(2), KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), + + [2] = LAYOUT( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + + diff --git a/keyboards/wsk/kodachi50/kodachi50.c b/keyboards/wsk/kodachi50/kodachi50.c new file mode 100644 index 000000000000..77ee65bbc1e3 --- /dev/null +++ b/keyboards/wsk/kodachi50/kodachi50.c @@ -0,0 +1 @@ +#include "kodachi50.h" diff --git a/keyboards/wsk/kodachi50/kodachi50.h b/keyboards/wsk/kodachi50/kodachi50.h new file mode 100644 index 000000000000..15fc9ac0ce22 --- /dev/null +++ b/keyboards/wsk/kodachi50/kodachi50.h @@ -0,0 +1,20 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K76, K75, K74, K73, K72, K71, K70, \ + K10, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, \ + K20, K21, K22, K23, K24, K25, K35, K26, K56, K55, K54, K53, K52, K51, K50, \ + K30, K31, K32, K34, K36, K46, K44, K43, K42, K41, K40 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, KC_NO, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, KC_NO, K46 }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { K70, K71, K72, K73, K74, K75, K76 } \ +} + diff --git a/keyboards/wsk/kodachi50/readme.md b/keyboards/wsk/kodachi50/readme.md new file mode 100644 index 000000000000..8a20c8905233 --- /dev/null +++ b/keyboards/wsk/kodachi50/readme.md @@ -0,0 +1,16 @@ +# Kodachi50 + +![Kodachi50](https://i.imgur.com/v1SYb6a.png) + +The Kodachi50 is a mirror stagger 50% board. + +* Keyboard Maintainer: [worldspawn00](https://github.com/worldspawn00/) +* Hardware Supported: The Kodachi50 PCB and kit. +* Hardware Availability: [PCB & Kit](https://geekhack.org/index.php?topic=100535) + +Make example for this keyboard (after setting up your build environment): + + make wsk/kodachi50:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + diff --git a/keyboards/wsk/kodachi50/rules.mk b/keyboards/wsk/kodachi50/rules.mk new file mode 100644 index 000000000000..0f9fe8d42363 --- /dev/null +++ b/keyboards/wsk/kodachi50/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes From a86a8a236aaf3e21f0bbfa36feb1b3acc19b9947 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Fri, 7 Feb 2020 21:38:20 -0600 Subject: [PATCH 237/331] [Keyboard] adding keyboard: houndstooth (#7981) * houndstooth * Amended with collaborator suggestions * LAYOUT fixup, left crud in keymap * Fix missing comma in keymap.c * Correct RGBLIGHT_ENABLE to no Co-authored-by: ridingqwerty --- keyboards/wsk/houndstooth/config.h | 48 +++++++++++++++++++ keyboards/wsk/houndstooth/houndstooth.c | 1 + keyboards/wsk/houndstooth/houndstooth.h | 20 ++++++++ keyboards/wsk/houndstooth/info.json | 12 +++++ .../wsk/houndstooth/keymaps/default/keymap.c | 17 +++++++ keyboards/wsk/houndstooth/readme.md | 16 +++++++ keyboards/wsk/houndstooth/rules.mk | 26 ++++++++++ 7 files changed, 140 insertions(+) create mode 100644 keyboards/wsk/houndstooth/config.h create mode 100644 keyboards/wsk/houndstooth/houndstooth.c create mode 100644 keyboards/wsk/houndstooth/houndstooth.h create mode 100644 keyboards/wsk/houndstooth/info.json create mode 100644 keyboards/wsk/houndstooth/keymaps/default/keymap.c create mode 100644 keyboards/wsk/houndstooth/readme.md create mode 100644 keyboards/wsk/houndstooth/rules.mk diff --git a/keyboards/wsk/houndstooth/config.h b/keyboards/wsk/houndstooth/config.h new file mode 100644 index 000000000000..4d7f6bb3a985 --- /dev/null +++ b/keyboards/wsk/houndstooth/config.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xFA9C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT Houndstooth +#define DESCRIPTION 12-column split ortho 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, F7, D7, B1, B4, B2, B5, B6 } +#define MATRIX_COL_PINS { D1, F4, D0, F5, D4, F6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +//#ifdef BACKLIGHT_PIN +//#define BACKLIGHT_LEVELS 0 +//#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN F1 +//#ifdef RGB_DI_PIN +//#define RGBLIGHT_ANIMATIONS +//#define RGBLED_NUM 0 +//#define RGBLIGHT_HUE_STEP 8 +//#define RGBLIGHT_SAT_STEP 8 +//#define RGBLIGHT_VAL_STEP 8 +//#endif + diff --git a/keyboards/wsk/houndstooth/houndstooth.c b/keyboards/wsk/houndstooth/houndstooth.c new file mode 100644 index 000000000000..2dcd1aa8c328 --- /dev/null +++ b/keyboards/wsk/houndstooth/houndstooth.c @@ -0,0 +1 @@ +#include "houndstooth.h" diff --git a/keyboards/wsk/houndstooth/houndstooth.h b/keyboards/wsk/houndstooth/houndstooth.h new file mode 100644 index 000000000000..ae9d73476f2a --- /dev/null +++ b/keyboards/wsk/houndstooth/houndstooth.h @@ -0,0 +1,20 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K20, K21, K22, K23, K24, K25, \ + K40, K41, K42, K43, K44, K45, K60, K61, K62, K63, K64, K65, \ + K10, K11, K12, K13, K14, K15, K30, K31, K32, K33, K34, K35, \ + K50, K51, K52, K53, K54, K55, K70, K71, K72, K73, K74, K75 \ +) { \ + { K00, K01, K02, K03, K04, K05 }, \ + { K10, K11, K12, K13, K14, K15 }, \ + { K20, K21, K22, K23, K24, K25 }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K40, K41, K42, K43, K44, K45 }, \ + { K50, K51, K52, K53, K54, K55 }, \ + { K60, K61, K62, K63, K64, K65 }, \ + { K70, K71, K72, K73, K74, K75 } \ +} + diff --git a/keyboards/wsk/houndstooth/info.json b/keyboards/wsk/houndstooth/info.json new file mode 100644 index 000000000000..97c57adc8eb5 --- /dev/null +++ b/keyboards/wsk/houndstooth/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Houndstooth", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 12.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6.5, "y":0}, {"label":"U", "x":7.5, "y":0}, {"label":"I", "x":8.5, "y":0}, {"label":"O", "x":9.5, "y":0}, {"label":"P", "x":10.5, "y":0}, {"label":"Back Space", "x":11.5, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6.5, "y":1}, {"label":"J", "x":7.5, "y":1}, {"label":"K", "x":8.5, "y":1}, {"label":"L", "x":9.5, "y":1}, {"label":";", "x":10.5, "y":1}, {"label":"'", "x":11.5, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6.5, "y":2}, {"label":"M", "x":7.5, "y":2}, {"label":",", "x":8.5, "y":2}, {"label":".", "x":9.5, "y":2}, {"label":"/", "x":10.5, "y":2}, {"label":"Return", "x":11.5, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3}, {"x":6.5, "y":3}, {"label":"⇑", "x":7.5, "y":3}, {"label":"←", "x":8.5, "y":3}, {"label":"↓", "x":9.5, "y":3}, {"label":"↑", "x":10.5, "y":3}, {"label":"→", "x":11.5, "y":3}] + } + } +} \ No newline at end of file diff --git a/keyboards/wsk/houndstooth/keymaps/default/keymap.c b/keyboards/wsk/houndstooth/keymaps/default/keymap.c new file mode 100644 index 000000000000..d98999a28c5f --- /dev/null +++ b/keyboards/wsk/houndstooth/keymaps/default/keymap.c @@ -0,0 +1,17 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + + [1] = LAYOUT( + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_DEL, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END) +}; + diff --git a/keyboards/wsk/houndstooth/readme.md b/keyboards/wsk/houndstooth/readme.md new file mode 100644 index 000000000000..75c0f0d273d7 --- /dev/null +++ b/keyboards/wsk/houndstooth/readme.md @@ -0,0 +1,16 @@ +# Houndstooth + +![Houndstooth](https://i.imgur.com/YkD4GNG.png) + +The Houndstooth is a 12 column split ortho 40% keyboard. + +* Keyboard Maintainer: [worldspawn00](https://github.com/worldspawn00/) +* Hardware Supported: The Houndstooth PCB and kit. +* Hardware Availability: [PCB & Kit](https://geekhack.org/index.php?topic=101374) + +Make example for this keyboard (after setting up your build environment): + + make wsk/houndstooth:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + diff --git a/keyboards/wsk/houndstooth/rules.mk b/keyboards/wsk/houndstooth/rules.mk new file mode 100644 index 000000000000..c93932238311 --- /dev/null +++ b/keyboards/wsk/houndstooth/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no From 96a4388c437cedb7143c83df22cbf31090899611 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Fri, 7 Feb 2020 21:39:44 -0600 Subject: [PATCH 238/331] [Keyboard] adding keyboard: sl40 (#7978) * sl40 * Amended with collaborator suggestions Co-authored-by: ridingqwerty --- keyboards/wsk/sl40/config.h | 48 +++++++++++++++++++++ keyboards/wsk/sl40/info.json | 12 ++++++ keyboards/wsk/sl40/keymaps/default/keymap.c | 19 ++++++++ keyboards/wsk/sl40/readme.md | 16 +++++++ keyboards/wsk/sl40/rules.mk | 26 +++++++++++ keyboards/wsk/sl40/sl40.c | 1 + keyboards/wsk/sl40/sl40.h | 16 +++++++ 7 files changed, 138 insertions(+) create mode 100644 keyboards/wsk/sl40/config.h create mode 100644 keyboards/wsk/sl40/info.json create mode 100644 keyboards/wsk/sl40/keymaps/default/keymap.c create mode 100644 keyboards/wsk/sl40/readme.md create mode 100644 keyboards/wsk/sl40/rules.mk create mode 100644 keyboards/wsk/sl40/sl40.c create mode 100644 keyboards/wsk/sl40/sl40.h diff --git a/keyboards/wsk/sl40/config.h b/keyboards/wsk/sl40/config.h new file mode 100644 index 000000000000..523e82b478ce --- /dev/null +++ b/keyboards/wsk/sl40/config.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xC456 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT SL40 +#define DESCRIPTION 14-column staggered 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, D2, D0 } +#define MATRIX_COL_PINS { D3, D1, F6, F7, B6, B2, B3, B1, D4, C6, D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN F1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/wsk/sl40/info.json b/keyboards/wsk/sl40/info.json new file mode 100644 index 000000000000..98fd353d756f --- /dev/null +++ b/keyboards/wsk/sl40/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "SL40", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1}, {"x":12.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3, "w":1.25}, {"x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":6.25}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}] + } + } +} diff --git a/keyboards/wsk/sl40/keymaps/default/keymap.c b/keyboards/wsk/sl40/keymaps/default/keymap.c new file mode 100644 index 000000000000..97bf62762233 --- /dev/null +++ b/keyboards/wsk/sl40/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RESET, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, KC_TRNS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MSTP, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) + +}; + + diff --git a/keyboards/wsk/sl40/readme.md b/keyboards/wsk/sl40/readme.md new file mode 100644 index 000000000000..5c74b7c2d416 --- /dev/null +++ b/keyboards/wsk/sl40/readme.md @@ -0,0 +1,16 @@ +# SL40 + +![SL40](https://i.imgur.com/HeeUwVj.png) + +The SL40 is a 14 column staggered 40% keyboard. + +* Keyboard Maintainer: [worldspawn00](https://github.com/worldspawn00/) +* Hardware Supported: The SL40 PCB and kit. +* Hardware Availability: [PCB](https://github.com/worldspawn00/SL40) + +Make example for this keyboard (after setting up your build environment): + + make wsk/sl40:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + diff --git a/keyboards/wsk/sl40/rules.mk b/keyboards/wsk/sl40/rules.mk new file mode 100644 index 000000000000..0f9fe8d42363 --- /dev/null +++ b/keyboards/wsk/sl40/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/wsk/sl40/sl40.c b/keyboards/wsk/sl40/sl40.c new file mode 100644 index 000000000000..22b3bd41ab4f --- /dev/null +++ b/keyboards/wsk/sl40/sl40.c @@ -0,0 +1 @@ +#include "sl40.h" diff --git a/keyboards/wsk/sl40/sl40.h b/keyboards/wsk/sl40/sl40.h new file mode 100644 index 000000000000..94543c1f64d1 --- /dev/null +++ b/keyboards/wsk/sl40/sl40.h @@ -0,0 +1,16 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K306, K310, K311, K312, K313 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, KC_NO, KC_NO, KC_NO, K306, KC_NO, KC_NO, KC_NO, K310, K311, K312, K313 } \ +} + From 610cf729af9e4499702b88091a2f06ec0235d0b4 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Fri, 7 Feb 2020 21:42:03 -0600 Subject: [PATCH 239/331] [Keyboard] adding keyboard: pain27 (#7977) * pain27 * Applied review suggestions * Correct DEBOUNCE verbiage, remove .ini files * Readme tweaks Co-authored-by: ridingqwerty --- keyboards/wsk/pain27/config.h | 48 +++++++++++++++++++ keyboards/wsk/pain27/info.json | 12 +++++ keyboards/wsk/pain27/keymaps/default/keymap.c | 18 +++++++ keyboards/wsk/pain27/pain27.c | 1 + keyboards/wsk/pain27/pain27.h | 14 ++++++ keyboards/wsk/pain27/readme.md | 16 +++++++ keyboards/wsk/pain27/rules.mk | 26 ++++++++++ 7 files changed, 135 insertions(+) create mode 100644 keyboards/wsk/pain27/config.h create mode 100644 keyboards/wsk/pain27/info.json create mode 100644 keyboards/wsk/pain27/keymaps/default/keymap.c create mode 100644 keyboards/wsk/pain27/pain27.c create mode 100644 keyboards/wsk/pain27/pain27.h create mode 100644 keyboards/wsk/pain27/readme.md create mode 100644 keyboards/wsk/pain27/rules.mk diff --git a/keyboards/wsk/pain27/config.h b/keyboards/wsk/pain27/config.h new file mode 100644 index 000000000000..48894fd1e0fc --- /dev/null +++ b/keyboards/wsk/pain27/config.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9E8C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT PAIN27 +#define DESCRIPTION A 27-key Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, D0 } +#define MATRIX_COL_PINS { D2, B3, F6, B1, B2, B6, D4, C6, D7, E6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN D1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/wsk/pain27/info.json b/keyboards/wsk/pain27/info.json new file mode 100644 index 000000000000..07eecacb6a93 --- /dev/null +++ b/keyboards/wsk/pain27/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Pain27v2", + "url": "https://qmk.fm/keyboards", + "maintainer": "worldspawn00", + "width": 11, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"x":3.25, "y":3, "w":6.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/wsk/pain27/keymaps/default/keymap.c b/keyboards/wsk/pain27/keymaps/default/keymap.c new file mode 100644 index 000000000000..54098287efc2 --- /dev/null +++ b/keyboards/wsk/pain27/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, + MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(1, KC_C), LT(2, KC_V), MT(MOD_RGUI,KC_B), MT(MOD_RALT, KC_N), MT(MOD_RCTL, KC_M), MT(MOD_LSFT, KC_SPC)), + [1] = LAYOUT(KC_ESC, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC, + KC_TAB, RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_LCTL, KC_LALT, KC_TRNS, MO(3), KC_RGUI, KC_RALT, KC_RCTL, KC_NO), + [2] = LAYOUT(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_ENT, + KC_LCTL, KC_LALT, MO(3), KC_TRNS, KC_COMM, KC_DOT, KC_SLSH, KC_NO), + [3] = LAYOUT(KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, RGB_SPD, RGB_SPI, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_DEL, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, KC_RGUI, KC_RALT, KC_RCTL, KC_NO) + +}; + diff --git a/keyboards/wsk/pain27/pain27.c b/keyboards/wsk/pain27/pain27.c new file mode 100644 index 000000000000..8fa76871f191 --- /dev/null +++ b/keyboards/wsk/pain27/pain27.c @@ -0,0 +1 @@ +#include "pain27.h" diff --git a/keyboards/wsk/pain27/pain27.h b/keyboards/wsk/pain27/pain27.h new file mode 100644 index 000000000000..918b1aaf1e91 --- /dev/null +++ b/keyboards/wsk/pain27/pain27.h @@ -0,0 +1,14 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, \ + K200, K201, K202, K203, K204, K205, K206, K207 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, KC_NO, KC_NO } \ +} + diff --git a/keyboards/wsk/pain27/readme.md b/keyboards/wsk/pain27/readme.md new file mode 100644 index 000000000000..1813de813689 --- /dev/null +++ b/keyboards/wsk/pain27/readme.md @@ -0,0 +1,16 @@ +# Pain27v2 + +![Pain27v2](https://i.imgur.com/qJZlelV.png) + +The Pain27v2 is an adaptation of the original Pain27 board by jonathan(uuupah), adding RGB LEDs and moving the controller under the keys. + +* Keyboard Maintainer: [worldspawn00](https://github.com/worldspawn00/) +* Hardware Supported: The Pain27v2 PCB and kit. +* Hardware Availability: [PCB & Kit](https://geekhack.org/index.php?topic=100283) + +Make example for this keyboard (after setting up your build environment): + + make wsk/pain27:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + diff --git a/keyboards/wsk/pain27/rules.mk b/keyboards/wsk/pain27/rules.mk new file mode 100644 index 000000000000..8b5c7c51b8d4 --- /dev/null +++ b/keyboards/wsk/pain27/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes From dd6f92541d0a860c23d0f465cb45631c5097a2d1 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Fri, 7 Feb 2020 21:42:29 -0600 Subject: [PATCH 240/331] [Keyboard] adding keyboard: neuron (#7980) * neuron * Update keyboards/walletburner/neuron/neuron.h Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/neuron.h Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/config.h Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/config.h Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/config.h Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/walletburner/neuron/readme.md Co-Authored-By: Drashna Jaelre * Update keyboards/walletburner/neuron/readme.md Co-Authored-By: Drashna Jaelre * Update keyboards/walletburner/neuron/readme.md Co-Authored-By: Drashna Jaelre * Committed review suggestions * Corrected bootloader to use atmel-dfu * One last tweak to correct MANUFACTURER Co-authored-by: ridingqwerty Co-authored-by: Drashna Jaelre --- keyboards/walletburner/neuron/config.h | 50 +++++++++++++++++++ keyboards/walletburner/neuron/info.json | 12 +++++ .../neuron/keymaps/default/keymap.c | 18 +++++++ keyboards/walletburner/neuron/neuron.c | 1 + keyboards/walletburner/neuron/neuron.h | 16 ++++++ keyboards/walletburner/neuron/readme.md | 15 ++++++ keyboards/walletburner/neuron/rules.mk | 26 ++++++++++ 7 files changed, 138 insertions(+) create mode 100644 keyboards/walletburner/neuron/config.h create mode 100644 keyboards/walletburner/neuron/info.json create mode 100644 keyboards/walletburner/neuron/keymaps/default/keymap.c create mode 100644 keyboards/walletburner/neuron/neuron.c create mode 100644 keyboards/walletburner/neuron/neuron.h create mode 100644 keyboards/walletburner/neuron/readme.md create mode 100644 keyboards/walletburner/neuron/rules.mk diff --git a/keyboards/walletburner/neuron/config.h b/keyboards/walletburner/neuron/config.h new file mode 100644 index 000000000000..0671200dbc6d --- /dev/null +++ b/keyboards/walletburner/neuron/config.h @@ -0,0 +1,50 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x62AC +#define DEVICE_VER 0x0001 +#define MANUFACTURER Walletburner +#define PRODUCT Neuron +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D3, F5 } +#define MATRIX_COL_PINS { F0, F7, F6, F4, F1, E6, D6, D2, B4, D7, B6, D5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#define BACKLIGHT_PIN B5 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/walletburner/neuron/info.json b/keyboards/walletburner/neuron/info.json new file mode 100644 index 000000000000..4ea4bcb941e7 --- /dev/null +++ b/keyboards/walletburner/neuron/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Neuron", + "url": "https://qmk.fm/keyboards/", + "maintainer": "worldspawn00", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O\u2191", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back
Space", "x":11, "y":0}, {"label":"Ctrl", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K\u2190", "x":8.25, "y":1}, {"label":"L\u2192", "x":9.25, "y":1}, {"label":"Enter", "x":10.25, "y":1, "w":1.75}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<\u2193,", "x":8.75, "y":2}, {"label":">.", "x":9.75, "y":2}, {"label":"Fn", "x":10.75, "y":2, "w":1.25}, {"label":"Super", "x":1, "y":3}, {"label":"Meta", "x":2, "y":3, "w":1.5}, {"x":3.5, "y":3, "w":2.25}, {"x":5.75, "y":3, "w":2.75}, {"label":"Meta", "x":8.5, "y":3, "w":1.5}, {"label":"Alt Gr", "x":10, "y":3}] + } + } +} \ No newline at end of file diff --git a/keyboards/walletburner/neuron/keymaps/default/keymap.c b/keyboards/walletburner/neuron/keymaps/default/keymap.c new file mode 100644 index 000000000000..e2c1dcf01d19 --- /dev/null +++ b/keyboards/walletburner/neuron/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), + KC_LGUI, KC_RALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI), + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + diff --git a/keyboards/walletburner/neuron/neuron.c b/keyboards/walletburner/neuron/neuron.c new file mode 100644 index 000000000000..b6ca44bd7808 --- /dev/null +++ b/keyboards/walletburner/neuron/neuron.c @@ -0,0 +1 @@ +#include "neuron.h" diff --git a/keyboards/walletburner/neuron/neuron.h b/keyboards/walletburner/neuron/neuron.h new file mode 100644 index 000000000000..b224260d2f76 --- /dev/null +++ b/keyboards/walletburner/neuron/neuron.h @@ -0,0 +1,16 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K111, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K301, K302, K303, K306, K308, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, K111 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { KC_NO, K301, K302, K303, KC_NO, KC_NO, K306, KC_NO, K308, KC_NO, K310, K311 } \ +} + diff --git a/keyboards/walletburner/neuron/readme.md b/keyboards/walletburner/neuron/readme.md new file mode 100644 index 000000000000..d33c561a62ef --- /dev/null +++ b/keyboards/walletburner/neuron/readme.md @@ -0,0 +1,15 @@ +# Neuron + +![Neuron](https://i.imgur.com/HeeUwVj.png) + +The Neuron is a 12 column staggered 40% keyboard. + +* Keyboard Maintainer: [worldspawn00](https://github.com/worldspawn00/) +* Hardware Supported: The Neuron PCB and kit. +* Hardware Availability: [PCB & Kit](https://geekhack.org/index.php?topic=102681.0) + +Make example for this keyboard (after setting up your build environment): + + make walletburner/neuron:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/walletburner/neuron/rules.mk b/keyboards/walletburner/neuron/rules.mk new file mode 100644 index 000000000000..ae77f0a0e1c6 --- /dev/null +++ b/keyboards/walletburner/neuron/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes From 8fe29f2784b1c14a75694a908b8a5116d9517b97 Mon Sep 17 00:00:00 2001 From: holtenc Date: Fri, 7 Feb 2020 22:03:44 -0600 Subject: [PATCH 241/331] Add Prime_L V2 and Prime_EXL Plus (#8111) * correct indicator light states. function of indicator lights was inverted. these changes correct that. * flesh out keymaps pre production * Enable extrakey in rules * Prime_BLE initial commit * Initial commit for Prime_L V2 * Update info.json correct key spacing. * update copyright * Update readme.md * Inital commit * updates before PR into QMK master * Drop Prime_EXL Plus from PR. Make requested changes to Prime_L V2 * Rename keyboards/primekb/Prime_l_v2/config.h to keyboards/primekb/prime_l_v2/config.h * Rename keyboards/primekb/prime_l_v2/config.h to keyboards/primekb/Prime_l_v2/config.h * remove directory Prime_l_v2 * re-submit with proper folder name. --- .../handwired/prime_exl/keymaps/via/keymap.c | 2 +- keyboards/primekb/prime_l_v2/config.h | 48 +++++++++++++++++++ keyboards/primekb/prime_l_v2/info.json | 16 +++++++ .../prime_l_v2/keymaps/default/keymap.c | 34 +++++++++++++ .../prime_l_v2/keymaps/default/readme.md | 1 + keyboards/primekb/prime_l_v2/prime_l_v2.c | 16 +++++++ keyboards/primekb/prime_l_v2/prime_l_v2.h | 33 +++++++++++++ keyboards/primekb/prime_l_v2/readme.md | 15 ++++++ keyboards/primekb/prime_l_v2/rules.mk | 33 +++++++++++++ 9 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 keyboards/primekb/prime_l_v2/config.h create mode 100644 keyboards/primekb/prime_l_v2/info.json create mode 100644 keyboards/primekb/prime_l_v2/keymaps/default/keymap.c create mode 100644 keyboards/primekb/prime_l_v2/keymaps/default/readme.md create mode 100644 keyboards/primekb/prime_l_v2/prime_l_v2.c create mode 100644 keyboards/primekb/prime_l_v2/prime_l_v2.h create mode 100644 keyboards/primekb/prime_l_v2/readme.md create mode 100644 keyboards/primekb/prime_l_v2/rules.mk diff --git a/keyboards/handwired/prime_exl/keymaps/via/keymap.c b/keyboards/handwired/prime_exl/keymaps/via/keymap.c index c01c247c8967..1b62d25ba48d 100644 --- a/keyboards/handwired/prime_exl/keymaps/via/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/via/keymap.c @@ -92,7 +92,7 @@ void led_set_user(uint8_t usb_led) { //function for layer indicator LED uint32_t layer_state_set_user(uint32_t state) { - if (biton32(state) == 2) { + if (biton32(state) == 1) { writePinHigh(C6); } else { writePinLow(C6); diff --git a/keyboards/primekb/prime_l_v2/config.h b/keyboards/primekb/prime_l_v2/config.h new file mode 100644 index 000000000000..63ef3e51693a --- /dev/null +++ b/keyboards/primekb/prime_l_v2/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2020 Holten Campbell + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x4024 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PrimeKB +#define PRODUCT Prime_L_V2 +#define DESCRIPTION Custom layout keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { E6, B2, B1, B0, B6 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D4, D0, D1, D2, D3, D5, B7, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/primekb/prime_l_v2/info.json b/keyboards/primekb/prime_l_v2/info.json new file mode 100644 index 000000000000..524c6ef181be --- /dev/null +++ b/keyboards/primekb/prime_l_v2/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Prime_L V2", + "url": "https://www.primekb.com", + "maintainer": "HoltenC", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "w":1.25}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2, "w":1.75}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "w":1.75}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3}, {"x":14.75, "y":3, "w":1.25}, + {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4, "w":1.25}, {"x":4.25, "y":4, "w":1.25}, {"x":5.5, "y":4}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":1.75}, {"x":9.5, "y":4, "w":1.75}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.25}, {"x":14.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/primekb/prime_l_v2/keymaps/default/keymap.c b/keyboards/primekb/prime_l_v2/keymaps/default/keymap.c new file mode 100644 index 000000000000..0e8e15195b64 --- /dev/null +++ b/keyboards/primekb/prime_l_v2/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Holten Campbell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_HOME, KC_END, KC_PSCR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGUP, KC_BSPC, + KC_P7, KC_P8, KC_P9, KC_NLCK, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PGDN, KC_BSLS, + KC_P4, KC_P5, KC_P6, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_P1, KC_P2, KC_P3, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_ENT, KC_PDOT, KC_P0, KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, MO(1), KC_SPC, KC_MINS, KC_EQL, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS + ) +}; \ No newline at end of file diff --git a/keyboards/primekb/prime_l_v2/keymaps/default/readme.md b/keyboards/primekb/prime_l_v2/keymaps/default/readme.md new file mode 100644 index 000000000000..f2f4348c2d68 --- /dev/null +++ b/keyboards/primekb/prime_l_v2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for prime_l_v2 \ No newline at end of file diff --git a/keyboards/primekb/prime_l_v2/prime_l_v2.c b/keyboards/primekb/prime_l_v2/prime_l_v2.c new file mode 100644 index 000000000000..50e7a5e3f758 --- /dev/null +++ b/keyboards/primekb/prime_l_v2/prime_l_v2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Holten Campbell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "prime_l_v2.h" diff --git a/keyboards/primekb/prime_l_v2/prime_l_v2.h b/keyboards/primekb/prime_l_v2/prime_l_v2.h new file mode 100644 index 000000000000..b0924d5d79bc --- /dev/null +++ b/keyboards/primekb/prime_l_v2/prime_l_v2.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Holten Campbell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215 , \ + K300, K301, K302, K303, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ + K400, K401, K402, K403, K405, K406, K407, K408, K410, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K314, K315 }, \ + { K400, K401, K402, K403, K405, K406, K407, K408, KC_NO, K410, KC_NO, K412, K413, KC_NO, K414, K415 } \ +} diff --git a/keyboards/primekb/prime_l_v2/readme.md b/keyboards/primekb/prime_l_v2/readme.md new file mode 100644 index 000000000000..22696dbe2204 --- /dev/null +++ b/keyboards/primekb/prime_l_v2/readme.md @@ -0,0 +1,15 @@ +# Prime_L_V2 + +![Prime_L_V2](https://i.imgur.com/P3P6GUu.jpg) + +A compact layout with the footprint of your typical 65% board, featuring a left mini-numpad. + +* Keyboard Maintainer: [HoltenC](https://github.com/HoltenC) +* Hardware Supported: Prime_L_V2 PCBs, ATMega32u4 +* Hardware Availability: [Store Link](https://www.primekb.com) + +Make example for this keyboard (after setting up your build environment): + + make primekb/prime_l_v2:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/primekb/prime_l_v2/rules.mk b/keyboards/primekb/prime_l_v2/rules.mk new file mode 100644 index 000000000000..674751489d55 --- /dev/null +++ b/keyboards/primekb/prime_l_v2/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file From 75e7018f72a716ca2809e337d524966c7c4137a8 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 8 Feb 2020 12:43:55 +0000 Subject: [PATCH 242/331] CI: Add workflow for CLI testing (#7357) Create GitHub Actions cli test workflow and remove travis runs of 'qmk pytest' --- .github/workflows/cli.yml | 28 +++++++++++++++++++++++ lib/python/qmk/tests/test_cli_commands.py | 2 +- util/travis_test.sh | 7 ------ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/cli.yml diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml new file mode 100644 index 000000000000..275581273543 --- /dev/null +++ b/.github/workflows/cli.yml @@ -0,0 +1,28 @@ +name: CLI CI + +on: + push: + branches: + - master + - future + pull_request: + paths: + - 'lib/python/**' + - 'bin/qmk' + - 'requirements.txt' + - '.github/workflows/cli.yml' + +jobs: + test: + runs-on: ubuntu-latest + + container: qmkfm/base_container + + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + - name: Install dependencies + run: pip3 install -r requirements.txt + - name: Run tests + run: bin/qmk pytest diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 3f75cef3e1d2..f1a92d9a310d 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -30,7 +30,7 @@ def test_kle2json(): def test_doctor(): - result = check_subcommand('doctor') + result = check_subcommand('doctor', '-n') assert result.returncode == 0 assert 'QMK Doctor is checking your environment.' in result.stderr assert 'QMK is ready to go' in result.stderr diff --git a/util/travis_test.sh b/util/travis_test.sh index 95991907ef35..c6fc0f9034d7 100644 --- a/util/travis_test.sh +++ b/util/travis_test.sh @@ -3,7 +3,6 @@ source util/travis_utils.sh NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)' -e '^(util/)' -e '^(lib/python/)' -e '^(bin/qmk)' -e '^(requirements.txt)' -e '(.travis.yml)') -NUM_PY_CHANGES=$(echo "$QMK_CHANGES" | grep -Ec -e '^(lib/python/)' -e '^(bin/qmk)') if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then echo "Skipping due to commit message" @@ -19,10 +18,4 @@ if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_CORE_CHANGES" != "0" ]; then fi -if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_PY_CHANGES" != "0" ]; then - echo "Running python tests." - qmk pytest - : $((exit_code = $exit_code + $?)) -fi - exit $exit_code From 5ab0eeb513f50a14e51467bf76a19997b75d65fb Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 8 Feb 2020 10:25:50 -0800 Subject: [PATCH 243/331] [Keyboard] Boardwalk Refactor (#8122) * refactor keymaps Create one keymap for each layout macro. * remove config.h for default keymap There's nothing in it. * update readme - use the new list format - use a smaller version of the keyboard photo (does the readme really need a 14MP image on it?) --- keyboards/boardwalk/keymaps/default/config.h | 16 -- keyboards/boardwalk/keymaps/default/keymap.c | 182 +++++------------- .../keymaps/default_2u_arrow/keymap.c | 68 +++++++ .../keymaps/default_2u_arrow/readme.md | 1 + .../keymaps/default_625u_arrow/keymap.c | 68 +++++++ .../keymaps/default_625u_arrow/readme.md | 1 + .../keymaps/default_ortho_7u/keymap.c | 68 +++++++ .../keymaps/default_ortho_7u/readme.md | 1 + .../keymaps/default_ortho_hhkb/keymap.c | 68 +++++++ .../keymaps/default_ortho_hhkb/readme.md | 1 + keyboards/boardwalk/readme.md | 8 +- 11 files changed, 324 insertions(+), 158 deletions(-) delete mode 100644 keyboards/boardwalk/keymaps/default/config.h create mode 100644 keyboards/boardwalk/keymaps/default_2u_arrow/keymap.c create mode 100644 keyboards/boardwalk/keymaps/default_2u_arrow/readme.md create mode 100644 keyboards/boardwalk/keymaps/default_625u_arrow/keymap.c create mode 100644 keyboards/boardwalk/keymaps/default_625u_arrow/readme.md create mode 100644 keyboards/boardwalk/keymaps/default_ortho_7u/keymap.c create mode 100644 keyboards/boardwalk/keymaps/default_ortho_7u/readme.md create mode 100644 keyboards/boardwalk/keymaps/default_ortho_hhkb/keymap.c create mode 100644 keyboards/boardwalk/keymaps/default_ortho_hhkb/readme.md diff --git a/keyboards/boardwalk/keymaps/default/config.h b/keyboards/boardwalk/keymaps/default/config.h deleted file mode 100644 index a2530241f477..000000000000 --- a/keyboards/boardwalk/keymaps/default/config.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once diff --git a/keyboards/boardwalk/keymaps/default/keymap.c b/keyboards/boardwalk/keymaps/default/keymap.c index fddb3da8251f..6ee85e49991a 100644 --- a/keyboards/boardwalk/keymaps/default/keymap.c +++ b/keyboards/boardwalk/keymaps/default/keymap.c @@ -16,147 +16,53 @@ #include QMK_KEYBOARD_H // Layer shorthand -enum layer { - _1U, - _FN, - _HHKB, - _7U, - _2UARROW, - _625UARROW, +enum layer_names { + _BASE, + _FN, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* 1uGrid - * .-----------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | SPACE | SPACE | SPACE | SPACE | RIGHT | DOWN | UP | RIGHT | - * '-----------------------------------------------------------------------------------------------------------------------------' - */ - - [_1U] = LAYOUT_ortho_5x14( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL \ - ), - - /* HHKB - * .-----------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| - * | | LCTRL | FN | LALT | LGUI | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | | - * '-----------------------------------------------------------------------------------------------------------------------------' - */ - - [_HHKB] = LAYOUT_ortho_hhkb( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ - ), - - /* 7u HHKB - * .-----------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| - * | | LCTRL | LALT | SPACE | RALT | FN | | - * '-----------------------------------------------------------------------------------------------------------------------------' - */ - - [_7U] = LAYOUT_ortho_7u( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(1) \ - ), - - /* 2x2u Space with Arrows - * .-----------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | RALT | RGUI | RCTRL | LEFT | DOWN | RIGHT | - * '-----------------------------------------------------------------------------------------------------------------------------' - */ - - [_2UARROW] = LAYOUT_2u_arrow( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_QUOT, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - - /* 6.25u Space with Arrows - * .-----------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LGUI | LALT | SPACE | FN | RCTRL | LEFT | DOWN | RIGHT | - * '-----------------------------------------------------------------------------------------------------------------------------' - */ - - [_625UARROW] = LAYOUT_625u_arrow( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_QUOT, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - -/* FUNCTION - * .-----------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | | | | | | | | | | - * '-----------------------------------------------------------------------------------------------------------------------------' - */ - + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | SPACE | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | RCTRL | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_5x14( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL + ), + + /* Function Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_5x14( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) - [_FN] = LAYOUT_ortho_5x14( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) }; diff --git a/keyboards/boardwalk/keymaps/default_2u_arrow/keymap.c b/keyboards/boardwalk/keymaps/default_2u_arrow/keymap.c new file mode 100644 index 000000000000..96b87d1cd4fb --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_2u_arrow/keymap.c @@ -0,0 +1,68 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layer { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | RALT | RGUI | RCTRL | LEFT | DOWN | RIGHT | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_2u_arrow( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Function Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | PRT SC | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | HOME | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | MUTE | VOL DN | VOL UP | | | | END | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | RESET | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_2u_arrow( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardwalk/keymaps/default_2u_arrow/readme.md b/keyboards/boardwalk/keymaps/default_2u_arrow/readme.md new file mode 100644 index 000000000000..2774d6e2bbf7 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_2u_arrow/readme.md @@ -0,0 +1 @@ +# The default_2u_arrow keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/default_625u_arrow/keymap.c b/keyboards/boardwalk/keymaps/default_625u_arrow/keymap.c new file mode 100644 index 000000000000..a609859bb3fb --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_625u_arrow/keymap.c @@ -0,0 +1,68 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layer { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | SPACE | FN | RCTRL | LEFT | DOWN | RIGHT | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_625u_arrow( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Function Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | PRT SC | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | HOME | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | MUTE | VOL DN | VOL UP | | | | END | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | RESET | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_625u_arrow( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, RESET, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardwalk/keymaps/default_625u_arrow/readme.md b/keyboards/boardwalk/keymaps/default_625u_arrow/readme.md new file mode 100644 index 000000000000..25eca02be6b7 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_625u_arrow/readme.md @@ -0,0 +1 @@ +# The default_625u_arrow keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/default_ortho_7u/keymap.c b/keyboards/boardwalk/keymaps/default_ortho_7u/keymap.c new file mode 100644 index 000000000000..8d61b54a3183 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_ortho_7u/keymap.c @@ -0,0 +1,68 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layer { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | LCTRL | LALT | SPACE | RALT | FN | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_7u( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(_FN) + ), + + /* Function Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_7u( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, + _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardwalk/keymaps/default_ortho_7u/readme.md b/keyboards/boardwalk/keymaps/default_ortho_7u/readme.md new file mode 100644 index 000000000000..57fa07eab607 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_ortho_7u/readme.md @@ -0,0 +1 @@ +# The default_ortho_7u keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/default_ortho_hhkb/keymap.c b/keyboards/boardwalk/keymaps/default_ortho_hhkb/keymap.c new file mode 100644 index 000000000000..d9819d9ccfca --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_ortho_hhkb/keymap.c @@ -0,0 +1,68 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layer { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | LCTRL | FN | LALT | LGUI | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, MO(_FN), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Function Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_hhkb( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardwalk/keymaps/default_ortho_hhkb/readme.md b/keyboards/boardwalk/keymaps/default_ortho_hhkb/readme.md new file mode 100644 index 000000000000..b11c8c4009b3 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_ortho_hhkb/readme.md @@ -0,0 +1 @@ +# The default_ortho_hhkb keymap for Boardwalk diff --git a/keyboards/boardwalk/readme.md b/keyboards/boardwalk/readme.md index 932e7e9d6c42..e66c0a07f4b9 100644 --- a/keyboards/boardwalk/readme.md +++ b/keyboards/boardwalk/readme.md @@ -1,13 +1,13 @@ # Boardwalk -![Boardwalk](https://i.imgur.com/CQj3b9E.jpg) +![Boardwalk](https://i.imgur.com/CQj3b9El.jpg) The Boardwalk is a 60% ortholinear keyboard, designed around Ergodox keycap sets and to fit into many standard 60% cases. The project was inspired by OLKB’s Atomic keyboard, which used larger 2u mods, but u/shensmobile decided to switch to 1.5u keys so that Ergodox sets would provide excellent compatibility. The rest of the board can be covered using standard key sizes from 60% sets. -Keyboard Maintainer: QMK Community -Hardware Supported: Boardwalk Ortholinear PCB -Hardware Availability: [panc.co](https://www.panc.co/boardwalk-group-buy.html) +* Keyboard Maintainer: QMK Community +* Hardware Supported: Boardwalk Ortholinear PCB +* Hardware Availability: [panc.co](https://www.panc.co/boardwalk-group-buy.html) Make example for this keyboard (after setting up your build environment): From 174a15d07d7321e762e51584e985bb73fe01e99b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 6 Feb 2020 11:30:45 +1100 Subject: [PATCH 244/331] Remove PJRC USB stack --- doxygen-todo | 1 - tmk_core/common/command.c | 24 - tmk_core/protocol/bluefruit.mk | 18 +- tmk_core/protocol/bluefruit/main.c | 47 -- tmk_core/protocol/pjrc.mk | 35 - tmk_core/protocol/pjrc/MEMO.txt | 25 - tmk_core/protocol/pjrc/main.c | 72 -- tmk_core/protocol/pjrc/pjrc.c | 58 -- tmk_core/protocol/pjrc/pjrc.h | 25 - tmk_core/protocol/pjrc/usb.c | 970 -------------------------- tmk_core/protocol/pjrc/usb.h | 131 ---- tmk_core/protocol/pjrc/usb_debug.c | 98 --- tmk_core/protocol/pjrc/usb_debug.h | 39 -- tmk_core/protocol/pjrc/usb_extra.c | 62 -- tmk_core/protocol/pjrc/usb_extra.h | 44 -- tmk_core/protocol/pjrc/usb_keyboard.c | 114 --- tmk_core/protocol/pjrc/usb_keyboard.h | 38 - tmk_core/protocol/pjrc/usb_mouse.c | 83 --- tmk_core/protocol/pjrc/usb_mouse.h | 47 -- tmk_core/readme.md | 9 +- 20 files changed, 5 insertions(+), 1935 deletions(-) delete mode 100644 tmk_core/protocol/pjrc.mk delete mode 100644 tmk_core/protocol/pjrc/MEMO.txt delete mode 100644 tmk_core/protocol/pjrc/main.c delete mode 100644 tmk_core/protocol/pjrc/pjrc.c delete mode 100644 tmk_core/protocol/pjrc/pjrc.h delete mode 100644 tmk_core/protocol/pjrc/usb.c delete mode 100644 tmk_core/protocol/pjrc/usb.h delete mode 100644 tmk_core/protocol/pjrc/usb_debug.c delete mode 100644 tmk_core/protocol/pjrc/usb_debug.h delete mode 100644 tmk_core/protocol/pjrc/usb_extra.c delete mode 100644 tmk_core/protocol/pjrc/usb_extra.h delete mode 100644 tmk_core/protocol/pjrc/usb_keyboard.c delete mode 100644 tmk_core/protocol/pjrc/usb_keyboard.h delete mode 100644 tmk_core/protocol/pjrc/usb_mouse.c delete mode 100644 tmk_core/protocol/pjrc/usb_mouse.h diff --git a/doxygen-todo b/doxygen-todo index 0f3010ffafcc..6483b47c6174 100644 --- a/doxygen-todo +++ b/doxygen-todo @@ -6,7 +6,6 @@ tmk_core/protocol/lufa tmk_core/protocol/midi tmk_core/protocol/midi/bytequeue tmk_core/protocol/midi/Config -tmk_core/protocol/pjrc tmk_core/protocol/usb_hid tmk_core/protocol/vusb tmk_core/tool diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index 0d6661d6035d..900de5410311 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -43,13 +43,6 @@ along with this program. If not, see . # include "mousekey.h" #endif -#ifdef PROTOCOL_PJRC -# include "usb_keyboard.h" -# ifdef EXTRAKEY_ENABLE -# include "usb_extra.h" -# endif -#endif - #ifdef PROTOCOL_VUSB # include "usbdrv.h" #endif @@ -165,9 +158,6 @@ static void print_version(void) { /* build options */ print("OPTIONS:" -#ifdef PROTOCOL_PJRC - " PJRC" -#endif #ifdef PROTOCOL_LUFA " LUFA" #endif @@ -217,20 +207,6 @@ static void print_status(void) { print_val_hex8(keymap_config.nkro); #endif print_val_hex32(timer_read32()); - -#ifdef PROTOCOL_PJRC - print_val_hex8(UDCON); - print_val_hex8(UDIEN); - print_val_hex8(UDINT); - print_val_hex8(usb_keyboard_leds); - print_val_hex8(usb_keyboard_idle_count); -#endif - -#ifdef PROTOCOL_PJRC -# if USB_COUNT_SOF - print_val_hex8(usbSofCount); -# endif -#endif return; } diff --git a/tmk_core/protocol/bluefruit.mk b/tmk_core/protocol/bluefruit.mk index e1c5fff77ffa..13a0693c5725 100644 --- a/tmk_core/protocol/bluefruit.mk +++ b/tmk_core/protocol/bluefruit.mk @@ -1,27 +1,11 @@ BLUEFRUIT_DIR = protocol/bluefruit -PJRC_DIR = protocol/pjrc SRC += $(BLUEFRUIT_DIR)/main.c \ $(BLUEFRUIT_DIR)/bluefruit.c \ - serial_uart.c \ - $(PJRC_DIR)/pjrc.c \ - $(PJRC_DIR)/usb_keyboard.c \ - $(PJRC_DIR)/usb_debug.c \ - $(PJRC_DIR)/usb.c - -# Option modules -ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE) - SRC += $(PJRC_DIR)/usb_mouse.c -endif - -ifdef EXTRAKEY_ENABLE - SRC += $(PJRC_DIR)/usb_extra.c -endif + serial_uart.c # Search Path VPATH += $(TMK_DIR)/$(BLUEFRUIT_DIR) #VPATH += $(TMK_DIR)/$(BLUEFRUIT_DIR)/usb_debug_only -VPATH += $(TMK_DIR)/$(PJRC_DIR) OPT_DEFS += -DPROTOCOL_BLUEFRUIT -OPT_DEFS += -DPROTOCOL_PJRC diff --git a/tmk_core/protocol/bluefruit/main.c b/tmk_core/protocol/bluefruit/main.c index 3adcab4f426d..aca46206d5af 100644 --- a/tmk_core/protocol/bluefruit/main.c +++ b/tmk_core/protocol/bluefruit/main.c @@ -24,7 +24,6 @@ along with this program. If not, see . #include #include "../serial.h" #include "keyboard.h" -#include "usb.h" #include "host.h" #include "timer.h" #include "print.h" @@ -32,14 +31,9 @@ along with this program. If not, see . #include "sendchar.h" #include "suspend.h" #include "bluefruit.h" -#include "pjrc.h" #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) -#define HOST_DRIVER_NOT_SET 0 -#define BLUEFRUIT_HOST_DRIVER 1 -#define PJRC_HOST_DRIVER 2 - int main(void) { CPU_PRESCALE(0); @@ -51,27 +45,11 @@ int main(void) { print_set_sendchar(sendchar); - // usb_init(); - // _delay_ms(2000); - // while (!usb_configured()) /* wait */ - keyboard_setup(); dprintf("Initializing keyboard...\n"); keyboard_init(); - // This implementation is pretty simplistic... if the USB connection - // is not configured, choose the Bluefruit, otherwise use USB - // Definitely would prefer to have this driven by an input pin and make - // it switch dynamically - BCG - // if (!usb_configured()) { - - // // Send power to Bluefruit... Adafruit says it takes 27 mA, I think - // // the pins should provide 40 mA, but just in case I switch the - // // Bluefruit using a transistor - BCG - // DDRB = _BV(PB6); - // PORTB |= _BV(PB6); - dprintf("Setting host driver to bluefruit...\n"); host_set_driver(bluefruit_driver()); @@ -106,29 +84,4 @@ int main(void) { while (1) { keyboard_task(); } - - // } else { - - // // I'm not smart enough to get this done with LUFA - BCG - // dprintf("Setting host driver to PJRC...\n"); - // host_set_driver(pjrc_driver()); - // #ifdef SLEEP_LED_ENABLE - // sleep_led_init(); - // #endif - // // wait an extra second for the PC's operating system - // // to load drivers and do whatever it does to actually - // // be ready for input - // _delay_ms(1000); - // PORTB = ~_BV(PB0); - // dprintf("Starting main loop"); - // while (1) { - // while (suspend) { - // suspend_power_down(); - // if (remote_wakeup && suspend_wakeup_condition()) { - // usb_remote_wakeup(); - // } - // } - // keyboard_task(); - // } - // } } diff --git a/tmk_core/protocol/pjrc.mk b/tmk_core/protocol/pjrc.mk deleted file mode 100644 index 7c0c1fa851b8..000000000000 --- a/tmk_core/protocol/pjrc.mk +++ /dev/null @@ -1,35 +0,0 @@ -PJRC_DIR = protocol/pjrc - -SRC += $(PJRC_DIR)/main.c \ - $(PJRC_DIR)/pjrc.c \ - $(PJRC_DIR)/usb_keyboard.c \ - $(PJRC_DIR)/usb_debug.c \ - $(PJRC_DIR)/usb.c - -# Option modules -ifdef MOUSEKEY_ENABLE - SRC += $(PJRC_DIR)/usb_mouse.c -endif - -ifdef ADB_MOUSE_ENABLE - SRC += $(PJRC_DIR)/usb_mouse.c -endif - -ifdef PS2_MOUSE_ENABLE - SRC += $(PJRC_DIR)/usb_mouse.c -endif - -ifdef EXTRAKEY_ENABLE - SRC += $(PJRC_DIR)/usb_extra.c -endif - - -ifdef POINTING_DEVICE_ENABLE - SRC += $(PJRC_DIR)/usb_mouse.c -endif - -# Search Path -VPATH += $(TMK_DIR)/$(PJRC_DIR) - -# This indicates using LUFA stack -OPT_DEFS += -DPROTOCOL_PJRC diff --git a/tmk_core/protocol/pjrc/MEMO.txt b/tmk_core/protocol/pjrc/MEMO.txt deleted file mode 100644 index b0f0598313db..000000000000 --- a/tmk_core/protocol/pjrc/MEMO.txt +++ /dev/null @@ -1,25 +0,0 @@ -Endpoint configuration ----------------------- -0 Control endpoint -1 keyboard -2 mouse -3 debug -4 extra key(consumer/system) -5 nkro keyboard(supported only on ATmega32U4/16U4 and AT90USB64/128) - - -ATmega32U4/16U4, AT90USB64/128 -• Endpoint 0:programmable size FIFO up to 64 bytes, default control endpoint -• Endpoints 1 programmable size FIFO up to 256 bytes in ping-pong mode. -• Endpoints 2 to 6: programmable size FIFO up to 64 bytes in ping-pong mode. - -AT90USB82/162, ATmega8U2/16U2/32U2 -• Endpoint 0:programmable size FIFO up to 64 bytes, default control endpoint -• Endpoints 1 and 2: programmable size FIFO up to 64 bytes. -• Endpoints 3 and 4: programmable size FIFO up to 64 bytes with ping-pong mode. - -ping-pong mode means double buffer feature. - - -NOTE: ATmega8U2/16U2/32U2 is not supported with PJRC stack at this time. -TODO: Macro definition for ATmega8U2/16U2/32U2 in usb.h diff --git a/tmk_core/protocol/pjrc/main.c b/tmk_core/protocol/pjrc/main.c deleted file mode 100644 index d16051c5f816..000000000000 --- a/tmk_core/protocol/pjrc/main.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Keyboard example with debug channel, for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2008 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include "keyboard.h" -#include "usb.h" -#include "matrix.h" -#include "print.h" -#include "debug.h" -#include "sendchar.h" -#include "util.h" -#include "suspend.h" -#include "host.h" -#include "pjrc.h" - -#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) - -int main(void) { - // set for 16 MHz clock - CPU_PRESCALE(0); - - keyboard_setup(); - - // Initialize the USB, and then wait for the host to set configuration. - // If the Teensy is powered without a PC connected to the USB port, - // this will wait forever. - usb_init(); - while (!usb_configured()) /* wait */ - ; - - print_set_sendchar(sendchar); - - keyboard_init(); - host_set_driver(pjrc_driver()); -#ifdef SLEEP_LED_ENABLE - sleep_led_init(); -#endif - while (1) { - while (suspend) { - suspend_power_down(); - if (remote_wakeup && suspend_wakeup_condition()) { - usb_remote_wakeup(); - } - } - - keyboard_task(); - } -} diff --git a/tmk_core/protocol/pjrc/pjrc.c b/tmk_core/protocol/pjrc/pjrc.c deleted file mode 100644 index 60932f59e8a9..000000000000 --- a/tmk_core/protocol/pjrc/pjrc.c +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2011 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include "usb_keyboard.h" -#include "usb_mouse.h" -#include "usb_extra.h" -#include "host_driver.h" -#include "pjrc.h" - -/*------------------------------------------------------------------* - * Host driver - *------------------------------------------------------------------*/ -static uint8_t keyboard_leds(void); -static void send_keyboard(report_keyboard_t *report); -static void send_mouse(report_mouse_t *report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); - -static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; - -host_driver_t *pjrc_driver(void) { return &driver; } - -static uint8_t keyboard_leds(void) { return usb_keyboard_leds; } - -static void send_keyboard(report_keyboard_t *report) { usb_keyboard_send_report(report); } - -static void send_mouse(report_mouse_t *report) { -#ifdef MOUSE_ENABLE - usb_mouse_send(report->x, report->y, report->v, report->h, report->buttons); -#endif -} - -static void send_system(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - usb_extra_system_send(data); -#endif -} - -static void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - usb_extra_consumer_send(data); -#endif -} diff --git a/tmk_core/protocol/pjrc/pjrc.h b/tmk_core/protocol/pjrc/pjrc.h deleted file mode 100644 index 08a1ede18662..000000000000 --- a/tmk_core/protocol/pjrc/pjrc.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2011 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef PJRC_H -#define PJRC_H - -#include "host_driver.h" - -host_driver_t *pjrc_driver(void); - -#endif diff --git a/tmk_core/protocol/pjrc/usb.c b/tmk_core/protocol/pjrc/usb.c deleted file mode 100644 index 22fbcfdcd478..000000000000 --- a/tmk_core/protocol/pjrc/usb.c +++ /dev/null @@ -1,970 +0,0 @@ -/* USB Keyboard Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include "usb.h" -#include "usb_keyboard.h" -#include "usb_mouse.h" -#include "usb_debug.h" -#include "usb_extra.h" -#include "led.h" -#include "print.h" -#include "util.h" -#ifdef SLEEP_LED_ENABLE -# include "sleep_led.h" -#endif -#include "suspend.h" -#include "action.h" -#include "action_util.h" - -#ifdef NKRO_ENABLE -# include "keycode_config.h" - -extern keymap_config_t keymap_config; -#endif - -/************************************************************************** - * - * Configurable Options - * - **************************************************************************/ - -// You can change these to give your code its own name. -#ifndef MANUFACTURER -# define STR_MANUFACTURER L"t.m.k." -#else -# define STR_MANUFACTURER LSTR(MANUFACTURER) -#endif -#ifndef PRODUCT -# define STR_PRODUCT L"t.m.k. keyboard" -#else -# define STR_PRODUCT LSTR(PRODUCT) -#endif - -// Mac OS-X and Linux automatically load the correct drivers. On -// Windows, even though the driver is supplied by Microsoft, an -// INF file is needed to load the driver. These numbers need to -// match the INF file. -#ifndef VENDOR_ID -# define VENDOR_ID 0xFEED -#endif - -#ifndef PRODUCT_ID -# define PRODUCT_ID 0xBABE -#endif - -#ifndef DEVICE_VER -# define DEVICE_VER 0x0100 -#endif - -// USB devices are supposed to implment a halt feature, which is -// rarely (if ever) used. If you comment this line out, the halt -// code will be removed, saving 102 bytes of space (gcc 4.3.0). -// This is not strictly USB compliant, but works with all major -// operating systems. -#define SUPPORT_ENDPOINT_HALT - -/************************************************************************** - * - * Endpoint Buffer Configuration - * - **************************************************************************/ - -#define ENDPOINT0_SIZE 32 - -bool remote_wakeup = false; -bool suspend = false; - -// 0:control endpoint is enabled automatically by controller. -static const uint8_t PROGMEM endpoint_config_table[] = { - // enable, UECFG0X(type, direction), UECFG1X(size, bank, allocation) - 1, EP_TYPE_INTERRUPT_IN, EP_SIZE(KBD_SIZE) | KBD_BUFFER, // 1 -#ifdef MOUSE_ENABLE - 1, EP_TYPE_INTERRUPT_IN, EP_SIZE(MOUSE_SIZE) | MOUSE_BUFFER, // 2 -#else - 0, // 2 -#endif -#ifdef CONSOLE_ENABLE - 1, EP_TYPE_INTERRUPT_IN, EP_SIZE(DEBUG_TX_SIZE) | DEBUG_TX_BUFFER, // 3 -#else - 0, -#endif -#ifdef EXTRAKEY_ENABLE - 1, EP_TYPE_INTERRUPT_IN, EP_SIZE(EXTRA_SIZE) | EXTRA_BUFFER, // 4 -#else - 0, // 4 -#endif -#ifdef NKRO_ENABLE - 1, EP_TYPE_INTERRUPT_IN, EP_SIZE(KBD2_SIZE) | KBD2_BUFFER, // 5 -#else - 0, // 5 -#endif - 0, // 6 -}; - -/************************************************************************** - * - * Descriptor Data - * - **************************************************************************/ - -// Descriptors are the data that your computer reads when it auto-detects -// this USB device (called "enumeration" in USB lingo). The most commonly -// changed items are editable at the top of this file. Changing things -// in here should only be done by those who've read chapter 9 of the USB -// spec and relevant portions of any USB class specifications! - -static const uint8_t PROGMEM device_descriptor[] = { - 18, // bLength - 1, // bDescriptorType - 0x00, - 0x02, // bcdUSB - 0, // bDeviceClass - 0, // bDeviceSubClass - 0, // bDeviceProtocol - ENDPOINT0_SIZE, // bMaxPacketSize0 - LSB(VENDOR_ID), - MSB(VENDOR_ID), // idVendor - LSB(PRODUCT_ID), - MSB(PRODUCT_ID), // idProduct - LSB(DEVICE_VER), - MSB(DEVICE_VER), // bcdDevice - 1, // iManufacturer - 2, // iProduct - 0, // iSerialNumber - 1 // bNumConfigurations -}; - -// Keyboard Protocol 1, HID 1.11 spec, Appendix B, page 59-60 -static const uint8_t PROGMEM keyboard_hid_report_desc[] = { - 0x05, 0x01, // Usage Page (Generic Desktop), - 0x09, 0x06, // Usage (Keyboard), - 0xA1, 0x01, // Collection (Application), - 0x75, 0x01, // Report Size (1), - 0x95, 0x08, // Report Count (8), - 0x05, 0x07, // Usage Page (Key Codes), - 0x19, 0xE0, // Usage Minimum (224), - 0x29, 0xE7, // Usage Maximum (231), - 0x15, 0x00, // Logical Minimum (0), - 0x25, 0x01, // Logical Maximum (1), - 0x81, 0x02, // Input (Data, Variable, Absolute), ;Modifier byte - 0x95, 0x01, // Report Count (1), - 0x75, 0x08, // Report Size (8), - 0x81, 0x03, // Input (Constant), ;Reserved byte - 0x95, 0x05, // Report Count (5), - 0x75, 0x01, // Report Size (1), - 0x05, 0x08, // Usage Page (LEDs), - 0x19, 0x01, // Usage Minimum (1), - 0x29, 0x05, // Usage Maximum (5), - 0x91, 0x02, // Output (Data, Variable, Absolute), ;LED report - 0x95, 0x01, // Report Count (1), - 0x75, 0x03, // Report Size (3), - 0x91, 0x03, // Output (Constant), ;LED report padding - 0x95, KBD_REPORT_KEYS, // Report Count (), - 0x75, 0x08, // Report Size (8), - 0x15, 0x00, // Logical Minimum (0), - 0x25, 0xFF, // Logical Maximum(255), - 0x05, 0x07, // Usage Page (Key Codes), - 0x19, 0x00, // Usage Minimum (0), - 0x29, 0xFF, // Usage Maximum (255), - 0x81, 0x00, // Input (Data, Array), - 0xc0 // End Collection -}; -#ifdef NKRO_ENABLE -static const uint8_t PROGMEM keyboard2_hid_report_desc[] = { - 0x05, 0x01, // Usage Page (Generic Desktop), - 0x09, 0x06, // Usage (Keyboard), - 0xA1, 0x01, // Collection (Application), - // bitmap of modifiers - 0x75, 0x01, // Report Size (1), - 0x95, 0x08, // Report Count (8), - 0x05, 0x07, // Usage Page (Key Codes), - 0x19, 0xE0, // Usage Minimum (224), - 0x29, 0xE7, // Usage Maximum (231), - 0x15, 0x00, // Logical Minimum (0), - 0x25, 0x01, // Logical Maximum (1), - 0x81, 0x02, // Input (Data, Variable, Absolute), ;Modifier byte - // LED output report - 0x95, 0x05, // Report Count (5), - 0x75, 0x01, // Report Size (1), - 0x05, 0x08, // Usage Page (LEDs), - 0x19, 0x01, // Usage Minimum (1), - 0x29, 0x05, // Usage Maximum (5), - 0x91, 0x02, // Output (Data, Variable, Absolute), - 0x95, 0x01, // Report Count (1), - 0x75, 0x03, // Report Size (3), - 0x91, 0x03, // Output (Constant), - // bitmap of keys - 0x95, KBD2_REPORT_KEYS * 8, // Report Count (), - 0x75, 0x01, // Report Size (1), - 0x15, 0x00, // Logical Minimum (0), - 0x25, 0x01, // Logical Maximum(1), - 0x05, 0x07, // Usage Page (Key Codes), - 0x19, 0x00, // Usage Minimum (0), - 0x29, KBD2_REPORT_KEYS * 8 - 1, // Usage Maximum (), - 0x81, 0x02, // Input (Data, Variable, Absolute), - 0xc0 // End Collection -}; -#endif - -#ifdef MOUSE_ENABLE -// Mouse Protocol 1, HID 1.11 spec, Appendix B, page 59-60, with wheel extension -// http://www.microchip.com/forums/tm.aspx?high=&m=391435&mpage=1#391521 -// http://www.keil.com/forum/15671/ -// http://www.microsoft.com/whdc/device/input/wheel.mspx -static const uint8_t PROGMEM mouse_hid_report_desc[] = { - /* mouse */ - 0x05, 0x01, // USAGE_PAGE (Generic Desktop) - 0x09, 0x02, // USAGE (Mouse) - 0xa1, 0x01, // COLLECTION (Application) - // 0x85, REPORT_ID_MOUSE, // REPORT_ID (1) - 0x09, 0x01, // USAGE (Pointer) - 0xa1, 0x00, // COLLECTION (Physical) - // ---------------------------- Buttons - 0x05, 0x09, // USAGE_PAGE (Button) - 0x19, 0x01, // USAGE_MINIMUM (Button 1) - 0x29, 0x05, // USAGE_MAXIMUM (Button 5) - 0x15, 0x00, // LOGICAL_MINIMUM (0) - 0x25, 0x01, // LOGICAL_MAXIMUM (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x95, 0x05, // REPORT_COUNT (5) - 0x81, 0x02, // INPUT (Data,Var,Abs) - 0x75, 0x03, // REPORT_SIZE (3) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x03, // INPUT (Cnst,Var,Abs) - // ---------------------------- X,Y position - 0x05, 0x01, // USAGE_PAGE (Generic Desktop) - 0x09, 0x30, // USAGE (X) - 0x09, 0x31, // USAGE (Y) - 0x15, 0x81, // LOGICAL_MINIMUM (-127) - 0x25, 0x7f, // LOGICAL_MAXIMUM (127) - 0x75, 0x08, // REPORT_SIZE (8) - 0x95, 0x02, // REPORT_COUNT (2) - 0x81, 0x06, // INPUT (Data,Var,Rel) - // ---------------------------- Vertical wheel - 0x09, 0x38, // USAGE (Wheel) - 0x15, 0x81, // LOGICAL_MINIMUM (-127) - 0x25, 0x7f, // LOGICAL_MAXIMUM (127) - 0x35, 0x00, // PHYSICAL_MINIMUM (0) - reset physical - 0x45, 0x00, // PHYSICAL_MAXIMUM (0) - 0x75, 0x08, // REPORT_SIZE (8) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x06, // INPUT (Data,Var,Rel) - // ---------------------------- Horizontal wheel - 0x05, 0x0c, // USAGE_PAGE (Consumer Devices) - 0x0a, 0x38, 0x02, // USAGE (AC Pan) - 0x15, 0x81, // LOGICAL_MINIMUM (-127) - 0x25, 0x7f, // LOGICAL_MAXIMUM (127) - 0x75, 0x08, // REPORT_SIZE (8) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x06, // INPUT (Data,Var,Rel) - 0xc0, // END_COLLECTION - 0xc0, // END_COLLECTION -}; -#endif - -static const uint8_t PROGMEM debug_hid_report_desc[] = { - 0x06, 0x31, 0xFF, // Usage Page 0xFF31 (vendor defined) - 0x09, 0x74, // Usage 0x74 - 0xA1, 0x53, // Collection 0x53 - 0x75, 0x08, // report size = 8 bits - 0x15, 0x00, // logical minimum = 0 - 0x26, 0xFF, 0x00, // logical maximum = 255 - 0x95, DEBUG_TX_SIZE, // report count - 0x09, 0x75, // usage - 0x81, 0x02, // Input (array) - 0xC0 // end collection -}; - -#ifdef EXTRAKEY_ENABLE -// audio controls & system controls -// http://www.microsoft.com/whdc/archive/w2kbd.mspx -static const uint8_t PROGMEM extra_hid_report_desc[] = { - /* system control */ - 0x05, 0x01, // USAGE_PAGE (Generic Desktop) - 0x09, 0x80, // USAGE (System Control) - 0xa1, 0x01, // COLLECTION (Application) - 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) - 0x15, 0x01, // LOGICAL_MINIMUM (0x1) - 0x25, 0xb7, // LOGICAL_MAXIMUM (0xb7) - 0x19, 0x01, // USAGE_MINIMUM (0x1) - 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) - 0x75, 0x10, // REPORT_SIZE (16) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x00, // INPUT (Data,Array,Abs) - 0xc0, // END_COLLECTION - /* consumer */ - 0x05, 0x0c, // USAGE_PAGE (Consumer Devices) - 0x09, 0x01, // USAGE (Consumer Control) - 0xa1, 0x01, // COLLECTION (Application) - 0x85, REPORT_ID_CONSUMER, // REPORT_ID (3) - 0x15, 0x01, // LOGICAL_MINIMUM (0x1) - 0x26, 0x9c, 0x02, // LOGICAL_MAXIMUM (0x29c) - 0x19, 0x01, // USAGE_MINIMUM (0x1) - 0x2a, 0x9c, 0x02, // USAGE_MAXIMUM (0x29c) - 0x75, 0x10, // REPORT_SIZE (16) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x00, // INPUT (Data,Array,Abs) - 0xc0, // END_COLLECTION -}; -#endif - -#define KBD_HID_DESC_NUM 0 -#define KBD_HID_DESC_OFFSET (9 + (9 + 9 + 7) * KBD_HID_DESC_NUM + 9) - -#ifdef MOUSE_ENABLE -# define MOUSE_HID_DESC_NUM (KBD_HID_DESC_NUM + 1) -# define MOUSE_HID_DESC_OFFSET (9 + (9 + 9 + 7) * MOUSE_HID_DESC_NUM + 9) -#else -# define MOUSE_HID_DESC_NUM (KBD_HID_DESC_NUM + 0) -#endif - -#ifdef CONSOLE_ENABLE -# define DEBUG_HID_DESC_NUM (MOUSE_HID_DESC_NUM + 1) -# define DEBUG_HID_DESC_OFFSET (9 + (9 + 9 + 7) * DEBUG_HID_DESC_NUM + 9) -#else -# define DEBUG_HID_DESC_NUM (MOUSE_HID_DESC_NUM + 0) -#endif - -#ifdef EXTRAKEY_ENABLE -# define EXTRA_HID_DESC_NUM (DEBUG_HID_DESC_NUM + 1) -# define EXTRA_HID_DESC_OFFSET (9 + (9 + 9 + 7) * EXTRA_HID_DESC_NUM + 9) -#else -# define EXTRA_HID_DESC_NUM (DEBUG_HID_DESC_NUM + 0) -#endif - -#ifdef NKRO_ENABLE -# define KBD2_HID_DESC_NUM (EXTRA_HID_DESC_NUM + 1) -# define KBD2_HID_DESC_OFFSET (9 + (9 + 9 + 7) * EXTRA_HID_DESC_NUM + 9) -#else -# define KBD2_HID_DESC_NUM (EXTRA_HID_DESC_NUM + 0) -#endif - -#define NUM_INTERFACES (KBD2_HID_DESC_NUM + 1) -#define CONFIG1_DESC_SIZE (9 + (9 + 9 + 7) * NUM_INTERFACES) -static const uint8_t PROGMEM config1_descriptor[CONFIG1_DESC_SIZE] = { - // configuration descriptor, USB spec 9.6.3, page 264-266, Table 9-10 - 9, // bLength; - 2, // bDescriptorType; - LSB(CONFIG1_DESC_SIZE), // wTotalLength - MSB(CONFIG1_DESC_SIZE), - NUM_INTERFACES, // bNumInterfaces - 1, // bConfigurationValue - 0, // iConfiguration - 0xA0, // bmAttributes - 50, // bMaxPower - - // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12 - 9, // bLength - 4, // bDescriptorType - KBD_INTERFACE, // bInterfaceNumber - 0, // bAlternateSetting - 1, // bNumEndpoints - 0x03, // bInterfaceClass (0x03 = HID) - 0x01, // bInterfaceSubClass (0x01 = Boot) - 0x01, // bInterfaceProtocol (0x01 = Keyboard) - 0, // iInterface - // HID descriptor, HID 1.11 spec, section 6.2.1 - 9, // bLength - 0x21, // bDescriptorType - 0x11, 0x01, // bcdHID - 0, // bCountryCode - 1, // bNumDescriptors - 0x22, // bDescriptorType - sizeof(keyboard_hid_report_desc), // wDescriptorLength - 0, - // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13 - 7, // bLength - 5, // bDescriptorType - KBD_ENDPOINT | 0x80, // bEndpointAddress - 0x03, // bmAttributes (0x03=intr) - KBD_SIZE, 0, // wMaxPacketSize - 10, // bInterval - -#ifdef MOUSE_ENABLE - // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12 - 9, // bLength - 4, // bDescriptorType - MOUSE_INTERFACE, // bInterfaceNumber - 0, // bAlternateSetting - 1, // bNumEndpoints - 0x03, // bInterfaceClass (0x03 = HID) - // ThinkPad T23 BIOS doesn't work with boot mouse. - 0x00, // bInterfaceSubClass (0x01 = Boot) - 0x00, // bInterfaceProtocol (0x02 = Mouse) - /* - 0x01, // bInterfaceSubClass (0x01 = Boot) - 0x02, // bInterfaceProtocol (0x02 = Mouse) - */ - 0, // iInterface - // HID descriptor, HID 1.11 spec, section 6.2.1 - 9, // bLength - 0x21, // bDescriptorType - 0x11, 0x01, // bcdHID - 0, // bCountryCode - 1, // bNumDescriptors - 0x22, // bDescriptorType - sizeof(mouse_hid_report_desc), // wDescriptorLength - 0, - // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13 - 7, // bLength - 5, // bDescriptorType - MOUSE_ENDPOINT | 0x80, // bEndpointAddress - 0x03, // bmAttributes (0x03=intr) - MOUSE_SIZE, 0, // wMaxPacketSize - 1, // bInterval -#endif - -#ifdef CONSOLE_ENABLE - // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12 - 9, // bLength - 4, // bDescriptorType - DEBUG_INTERFACE, // bInterfaceNumber - 0, // bAlternateSetting - 1, // bNumEndpoints - 0x03, // bInterfaceClass (0x03 = HID) - 0x00, // bInterfaceSubClass - 0x00, // bInterfaceProtocol - 0, // iInterface - // HID descriptor, HID 1.11 spec, section 6.2.1 - 9, // bLength - 0x21, // bDescriptorType - 0x11, 0x01, // bcdHID - 0, // bCountryCode - 1, // bNumDescriptors - 0x22, // bDescriptorType - sizeof(debug_hid_report_desc), // wDescriptorLength - 0, - // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13 - 7, // bLength - 5, // bDescriptorType - DEBUG_TX_ENDPOINT | 0x80, // bEndpointAddress - 0x03, // bmAttributes (0x03=intr) - DEBUG_TX_SIZE, 0, // wMaxPacketSize - 1, // bInterval -#endif - -#ifdef EXTRAKEY_ENABLE - // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12 - 9, // bLength - 4, // bDescriptorType - EXTRA_INTERFACE, // bInterfaceNumber - 0, // bAlternateSetting - 1, // bNumEndpoints - 0x03, // bInterfaceClass (0x03 = HID) - 0x00, // bInterfaceSubClass - 0x00, // bInterfaceProtocol - 0, // iInterface - // HID descriptor, HID 1.11 spec, section 6.2.1 - 9, // bLength - 0x21, // bDescriptorType - 0x11, 0x01, // bcdHID - 0, // bCountryCode - 1, // bNumDescriptors - 0x22, // bDescriptorType - sizeof(extra_hid_report_desc), // wDescriptorLength - 0, - // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13 - 7, // bLength - 5, // bDescriptorType - EXTRA_ENDPOINT | 0x80, // bEndpointAddress - 0x03, // bmAttributes (0x03=intr) - EXTRA_SIZE, 0, // wMaxPacketSize - 10, // bInterval -#endif - -#ifdef NKRO_ENABLE - // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12 - 9, // bLength - 4, // bDescriptorType - KBD2_INTERFACE, // bInterfaceNumber - 0, // bAlternateSetting - 1, // bNumEndpoints - 0x03, // bInterfaceClass (0x03 = HID) - 0x00, // bInterfaceSubClass (0x01 = Boot) - 0x00, // bInterfaceProtocol (0x01 = Keyboard) - 0, // iInterface - // HID descriptor, HID 1.11 spec, section 6.2.1 - 9, // bLength - 0x21, // bDescriptorType - 0x11, 0x01, // bcdHID - 0, // bCountryCode - 1, // bNumDescriptors - 0x22, // bDescriptorType - sizeof(keyboard2_hid_report_desc), // wDescriptorLength - 0, - // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13 - 7, // bLength - 5, // bDescriptorType - KBD2_ENDPOINT | 0x80, // bEndpointAddress - 0x03, // bmAttributes (0x03=intr) - KBD2_SIZE, 0, // wMaxPacketSize - 1, // bInterval -#endif -}; - -// If you're desperate for a little extra code memory, these strings -// can be completely removed if iManufacturer, iProduct, iSerialNumber -// in the device desciptor are changed to zeros. -struct usb_string_descriptor_struct { - uint8_t bLength; - uint8_t bDescriptorType; - int16_t wString[]; -}; -static const struct usb_string_descriptor_struct PROGMEM string0 = {4, 3, {0x0409}}; -static const struct usb_string_descriptor_struct PROGMEM string1 = {sizeof(STR_MANUFACTURER), 3, STR_MANUFACTURER}; -static const struct usb_string_descriptor_struct PROGMEM string2 = {sizeof(STR_PRODUCT), 3, STR_PRODUCT}; - -// This table defines which descriptor data is sent for each specific -// request from the host (in wValue and wIndex). -static const struct descriptor_list_struct { - uint16_t wValue; // descriptor type - uint16_t wIndex; - const uint8_t *addr; - uint8_t length; -} PROGMEM descriptor_list[] = { - // DEVICE descriptor - {0x0100, 0x0000, device_descriptor, sizeof(device_descriptor)}, - // CONFIGURATION descriptor - {0x0200, 0x0000, config1_descriptor, sizeof(config1_descriptor)}, - // HID/REPORT descriptors - {0x2100, KBD_INTERFACE, config1_descriptor + KBD_HID_DESC_OFFSET, 9}, - {0x2200, KBD_INTERFACE, keyboard_hid_report_desc, sizeof(keyboard_hid_report_desc)}, -#ifdef MOUSE_ENABLE - {0x2100, MOUSE_INTERFACE, config1_descriptor + MOUSE_HID_DESC_OFFSET, 9}, - {0x2200, MOUSE_INTERFACE, mouse_hid_report_desc, sizeof(mouse_hid_report_desc)}, -#endif -#ifdef CONSOLE_ENABLE - {0x2100, DEBUG_INTERFACE, config1_descriptor + DEBUG_HID_DESC_OFFSET, 9}, - {0x2200, DEBUG_INTERFACE, debug_hid_report_desc, sizeof(debug_hid_report_desc)}, -#endif -#ifdef EXTRAKEY_ENABLE - {0x2100, EXTRA_INTERFACE, config1_descriptor + EXTRA_HID_DESC_OFFSET, 9}, - {0x2200, EXTRA_INTERFACE, extra_hid_report_desc, sizeof(extra_hid_report_desc)}, -#endif -#ifdef NKRO_ENABLE - {0x2100, KBD2_INTERFACE, config1_descriptor + KBD2_HID_DESC_OFFSET, 9}, - {0x2200, KBD2_INTERFACE, keyboard2_hid_report_desc, sizeof(keyboard2_hid_report_desc)}, -#endif - // STRING descriptors - {0x0300, 0x0000, (const uint8_t *)&string0, 4}, - {0x0301, 0x0409, (const uint8_t *)&string1, sizeof(STR_MANUFACTURER)}, - {0x0302, 0x0409, (const uint8_t *)&string2, sizeof(STR_PRODUCT)}}; -#define NUM_DESC_LIST (sizeof(descriptor_list) / sizeof(struct descriptor_list_struct)) - -/************************************************************************** - * - * Variables - these are the only non-stack RAM usage - * - **************************************************************************/ - -// zero when we are not configured, non-zero when enumerated -static volatile uint8_t usb_configuration = 0; - -/************************************************************************** - * - * Public Functions - these are the API intended for the user - * - **************************************************************************/ - -// initialize USB -void usb_init(void) { - HW_CONFIG(); - USB_FREEZE(); // enable USB - PLL_CONFIG(); // config PLL - while (!(PLLCSR & (1 << PLOCK))) - ; // wait for PLL lock - USB_CONFIG(); // start USB clock - UDCON = 0; // enable attach resistor - usb_configuration = 0; - suspend = false; - UDIEN = (1 << EORSTE) | (1 << SOFE) | (1 << SUSPE) | (1 << WAKEUPE); - sei(); -} - -// return 0 if the USB is not configured, or the configuration -// number selected by the HOST -uint8_t usb_configured(void) { return usb_configuration && !suspend; } - -void usb_remote_wakeup(void) { - UDCON |= (1 << RMWKUP); - while (UDCON & (1 << RMWKUP)) - ; -} - -/************************************************************************** - * - * Private Functions - not intended for general user consumption.... - * - **************************************************************************/ - -// USB Device Interrupt - handle all device-level events -// the transmit buffer flushing is triggered by the start of frame -// -ISR(USB_GEN_vect) { - uint8_t intbits, t; - static uint8_t div4 = 0; - - intbits = UDINT; - UDINT = 0; - if ((intbits & (1 << SUSPI)) && (UDIEN & (1 << SUSPE)) && usb_configuration) { -#ifdef SLEEP_LED_ENABLE - sleep_led_enable(); -#endif - UDIEN &= ~(1 << SUSPE); - UDIEN |= (1 << WAKEUPE); - suspend = true; - } - if ((intbits & (1 << WAKEUPI)) && (UDIEN & (1 << WAKEUPE)) && usb_configuration) { - suspend_wakeup_init(); -#ifdef SLEEP_LED_ENABLE - sleep_led_disable(); - // NOTE: converters may not accept this - led_set(host_keyboard_leds()); -#endif - - UDIEN |= (1 << SUSPE); - UDIEN &= ~(1 << WAKEUPE); - suspend = false; - } - if (intbits & (1 << EORSTI)) { - UENUM = 0; - UECONX = 1; - UECFG0X = EP_TYPE_CONTROL; - UECFG1X = EP_SIZE(ENDPOINT0_SIZE) | EP_SINGLE_BUFFER; - UEIENX = (1 << RXSTPE); - usb_configuration = 0; - } - if ((intbits & (1 << SOFI)) && usb_configuration) { - t = debug_flush_timer; - if (t) { - debug_flush_timer = --t; - if (!t) { - UENUM = DEBUG_TX_ENDPOINT; - while ((UEINTX & (1 << RWAL))) { - UEDATX = 0; - } - UEINTX = 0x3A; - } - } - /* TODO: should keep IDLE rate on each keyboard interface */ -#ifdef NKRO_ENABLE - if (!keymap_config.nkro && keyboard_idle && (++div4 & 3) == 0) { -#else - if (keyboard_idle && (++div4 & 3) == 0) { -#endif - UENUM = KBD_ENDPOINT; - if (UEINTX & (1 << RWAL)) { - usb_keyboard_idle_count++; - if (usb_keyboard_idle_count == keyboard_idle) { - usb_keyboard_idle_count = 0; - /* TODO: fix keyboard_report inconsistency */ - /* To avoid Mac SET_IDLE behaviour. - UEDATX = keyboard_report_prev->mods; - UEDATX = 0; - uint8_t keys = keyboard_protocol ? KBD_REPORT_KEYS : 6; - for (uint8_t i=0; ikeys[i]; - } - UEINTX = 0x3A; - */ - } - } - } - } -} - -// Misc functions to wait for ready and send/receive packets -static inline void usb_wait_in_ready(void) { - while (!(UEINTX & (1 << TXINI))) - ; -} -static inline void usb_send_in(void) { UEINTX = ~(1 << TXINI); } -static inline void usb_wait_receive_out(void) { - while (!(UEINTX & (1 << RXOUTI))) - ; -} -static inline void usb_ack_out(void) { UEINTX = ~(1 << RXOUTI); } - -// USB Endpoint Interrupt - endpoint 0 is handled here. The -// other endpoints are manipulated by the user-callable -// functions, and the start-of-frame interrupt. -// -ISR(USB_COM_vect) { - uint8_t intbits; - const uint8_t *list; - const uint8_t *cfg; - uint8_t i, n, len, en; - uint8_t bmRequestType; - uint8_t bRequest; - uint16_t wValue; - uint16_t wIndex; - uint16_t wLength; - uint16_t desc_val; - const uint8_t *desc_addr; - uint8_t desc_length; - - UENUM = 0; - intbits = UEINTX; - if (intbits & (1 << RXSTPI)) { - bmRequestType = UEDATX; - bRequest = UEDATX; - wValue = UEDATX; - wValue |= (UEDATX << 8); - wIndex = UEDATX; - wIndex |= (UEDATX << 8); - wLength = UEDATX; - wLength |= (UEDATX << 8); - UEINTX = ~((1 << RXSTPI) | (1 << RXOUTI) | (1 << TXINI)); - if (bRequest == GET_DESCRIPTOR) { - list = (const uint8_t *)descriptor_list; - for (i = 0;; i++) { - if (i >= NUM_DESC_LIST) { - UECONX = (1 << STALLRQ) | (1 << EPEN); // stall - return; - } - desc_val = pgm_read_word(list); - if (desc_val != wValue) { - list += sizeof(struct descriptor_list_struct); - continue; - } - list += 2; - desc_val = pgm_read_word(list); - if (desc_val != wIndex) { - list += sizeof(struct descriptor_list_struct) - 2; - continue; - } - list += 2; - desc_addr = (const uint8_t *)pgm_read_word(list); - list += 2; - desc_length = pgm_read_byte(list); - break; - } - len = (wLength < 256) ? wLength : 255; - if (len > desc_length) len = desc_length; - do { - // wait for host ready for IN packet - do { - i = UEINTX; - } while (!(i & ((1 << TXINI) | (1 << RXOUTI)))); - if (i & (1 << RXOUTI)) return; // abort - // send IN packet - n = len < ENDPOINT0_SIZE ? len : ENDPOINT0_SIZE; - for (i = n; i; i--) { - UEDATX = pgm_read_byte(desc_addr++); - } - len -= n; - usb_send_in(); - } while (len || n == ENDPOINT0_SIZE); - return; - } - if (bRequest == SET_ADDRESS) { - usb_send_in(); - usb_wait_in_ready(); - UDADDR = wValue | (1 << ADDEN); - return; - } - if (bRequest == SET_CONFIGURATION && bmRequestType == 0) { - usb_configuration = wValue; - usb_send_in(); - cfg = endpoint_config_table; - for (i = 1; i <= MAX_ENDPOINT; i++) { - UENUM = i; - en = pgm_read_byte(cfg++); - if (en) { - UECONX = (1 << EPEN); - UECFG0X = pgm_read_byte(cfg++); - UECFG1X = pgm_read_byte(cfg++); - } else { - UECONX = 0; - } - } - UERST = UERST_MASK; - UERST = 0; - return; - } - if (bRequest == GET_CONFIGURATION && bmRequestType == 0x80) { - usb_wait_in_ready(); - UEDATX = usb_configuration; - usb_send_in(); - return; - } - - if (bRequest == GET_STATUS) { - usb_wait_in_ready(); - i = 0; -#ifdef SUPPORT_ENDPOINT_HALT - if (bmRequestType == 0x82) { - UENUM = wIndex; - if (UECONX & (1 << STALLRQ)) i = 1; - UENUM = 0; - } -#endif - UEDATX = i; - UEDATX = 0; - usb_send_in(); - return; - } - if (bRequest == CLEAR_FEATURE || bRequest == SET_FEATURE) { -#ifdef SUPPORT_ENDPOINT_HALT - if (bmRequestType == 0x02 && wValue == ENDPOINT_HALT) { - i = wIndex & 0x7F; - if (i >= 1 && i <= MAX_ENDPOINT) { - usb_send_in(); - UENUM = i; - if (bRequest == SET_FEATURE) { - UECONX = (1 << STALLRQ) | (1 << EPEN); - } else { - UECONX = (1 << STALLRQC) | (1 << RSTDT) | (1 << EPEN); - UERST = (1 << i); - UERST = 0; - } - return; - } - } -#endif - if (bmRequestType == 0x00 && wValue == DEVICE_REMOTE_WAKEUP) { - if (bRequest == SET_FEATURE) { - remote_wakeup = true; - } else { - remote_wakeup = false; - } - usb_send_in(); - return; - } - } - if (wIndex == KBD_INTERFACE) { - if (bmRequestType == 0xA1) { - if (bRequest == HID_GET_REPORT) { - usb_wait_in_ready(); - UEDATX = keyboard_report->mods; - UEDATX = 0; - for (i = 0; i < 6; i++) { - UEDATX = keyboard_report->keys[i]; - } - usb_send_in(); - return; - } - if (bRequest == HID_GET_IDLE) { - usb_wait_in_ready(); - UEDATX = keyboard_idle; - usb_send_in(); - return; - } - if (bRequest == HID_GET_PROTOCOL) { - usb_wait_in_ready(); - UEDATX = keyboard_protocol; - usb_send_in(); - return; - } - } - if (bmRequestType == 0x21) { - if (bRequest == HID_SET_REPORT) { - usb_wait_receive_out(); - usb_keyboard_leds = UEDATX; - usb_ack_out(); - usb_send_in(); - return; - } - if (bRequest == HID_SET_IDLE) { - keyboard_idle = (wValue >> 8); - usb_keyboard_idle_count = 0; - // usb_wait_in_ready(); - usb_send_in(); - return; - } - if (bRequest == HID_SET_PROTOCOL) { - keyboard_protocol = wValue; -#ifdef NKRO_ENABLE - keymap_config.nkro = !!keyboard_protocol; -#endif - clear_keyboard(); - // usb_wait_in_ready(); - usb_send_in(); - return; - } - } - } -#ifdef MOUSE_ENABLE - if (wIndex == MOUSE_INTERFACE) { - if (bmRequestType == 0xA1) { - if (bRequest == HID_GET_REPORT) { - if (wValue == HID_REPORT_INPUT) { - usb_wait_in_ready(); - UEDATX = 0; - UEDATX = 0; - UEDATX = 0; - UEDATX = 0; - usb_send_in(); - return; - } - if (wValue == HID_REPORT_FEATURE) { - usb_wait_in_ready(); - UEDATX = 0x05; - usb_send_in(); - return; - } - } - if (bRequest == HID_GET_PROTOCOL) { - usb_wait_in_ready(); - UEDATX = usb_mouse_protocol; - usb_send_in(); - return; - } - } - if (bmRequestType == 0x21) { - if (bRequest == HID_SET_PROTOCOL) { - usb_mouse_protocol = wValue; - usb_send_in(); - return; - } - } - } -#endif - if (wIndex == DEBUG_INTERFACE) { - if (bRequest == HID_GET_REPORT && bmRequestType == 0xA1) { - len = wLength; - do { - // wait for host ready for IN packet - do { - i = UEINTX; - } while (!(i & ((1 << TXINI) | (1 << RXOUTI)))); - if (i & (1 << RXOUTI)) return; // abort - // send IN packet - n = len < ENDPOINT0_SIZE ? len : ENDPOINT0_SIZE; - for (i = n; i; i--) { - UEDATX = 0; - } - len -= n; - usb_send_in(); - } while (len || n == ENDPOINT0_SIZE); - return; - } - } - } - UECONX = (1 << STALLRQ) | (1 << EPEN); // stall -} diff --git a/tmk_core/protocol/pjrc/usb.h b/tmk_core/protocol/pjrc/usb.h deleted file mode 100644 index 50654dccf7f5..000000000000 --- a/tmk_core/protocol/pjrc/usb.h +++ /dev/null @@ -1,131 +0,0 @@ -/* USB Keyboard Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef USB_H -#define USB_H 1 - -#include -#include -#include - -extern bool remote_wakeup; -extern bool suspend; - -void usb_init(void); // initialize everything -uint8_t usb_configured(void); // is the USB port configured -void usb_remote_wakeup(void); - -#define EP_TYPE_CONTROL 0x00 -#define EP_TYPE_BULK_IN 0x81 -#define EP_TYPE_BULK_OUT 0x80 -#define EP_TYPE_INTERRUPT_IN 0xC1 -#define EP_TYPE_INTERRUPT_OUT 0xC0 -#define EP_TYPE_ISOCHRONOUS_IN 0x41 -#define EP_TYPE_ISOCHRONOUS_OUT 0x40 - -#define EP_SINGLE_BUFFER 0x02 -#define EP_DOUBLE_BUFFER 0x06 - -#define EP_SIZE(s) ((s) == 64 ? 0x30 : ((s) == 32 ? 0x20 : ((s) == 16 ? 0x10 : 0x00))) - -#if defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__) -# define MAX_ENDPOINT 4 -# define UERST_MASK 0x1E -#else -# define MAX_ENDPOINT 6 -# define UERST_MASK 0x7E -#endif - -#define LSB(n) (n & 255) -#define MSB(n) ((n >> 8) & 255) - -#if defined(__AVR_AT90USB162__) -# define HW_CONFIG() -# define PLL_CONFIG() (PLLCSR = ((1 << PLLE) | (1 << PLLP0))) -# define USB_CONFIG() (USBCON = (1 << USBE)) -# define USB_FREEZE() (USBCON = ((1 << USBE) | (1 << FRZCLK))) -#elif defined(__AVR_ATmega32U4__) -# define HW_CONFIG() (UHWCON = 0x01) -# define PLL_CONFIG() (PLLCSR = 0x12) -# define USB_CONFIG() (USBCON = ((1 << USBE) | (1 << OTGPADE))) -# define USB_FREEZE() (USBCON = ((1 << USBE) | (1 << FRZCLK))) -#elif defined(__AVR_AT90USB646__) -# define HW_CONFIG() (UHWCON = 0x81) -# define PLL_CONFIG() (PLLCSR = 0x1A) -# define USB_CONFIG() (USBCON = ((1 << USBE) | (1 << OTGPADE))) -# define USB_FREEZE() (USBCON = ((1 << USBE) | (1 << FRZCLK))) -#elif defined(__AVR_AT90USB1286__) -# define HW_CONFIG() (UHWCON = 0x81) -# define PLL_CONFIG() (PLLCSR = 0x16) -# define USB_CONFIG() (USBCON = ((1 << USBE) | (1 << OTGPADE))) -# define USB_FREEZE() (USBCON = ((1 << USBE) | (1 << FRZCLK))) -#endif - -// standard control endpoint request types -#define GET_STATUS 0 -#define CLEAR_FEATURE 1 -#define SET_FEATURE 3 -#define SET_ADDRESS 5 -#define GET_DESCRIPTOR 6 -#define GET_CONFIGURATION 8 -#define SET_CONFIGURATION 9 -#define GET_INTERFACE 10 -#define SET_INTERFACE 11 -// HID (human interface device) -#define HID_GET_REPORT 1 -#define HID_GET_IDLE 2 -#define HID_GET_PROTOCOL 3 -#define HID_SET_REPORT 9 -#define HID_SET_IDLE 10 -#define HID_SET_PROTOCOL 11 -#define HID_REPORT_INPUT 1 -#define HID_REPORT_OUTPUT 2 -#define HID_REPORT_FEATURE 3 -// CDC (communication class device) -#define CDC_SET_LINE_CODING 0x20 -#define CDC_GET_LINE_CODING 0x21 -#define CDC_SET_CONTROL_LINE_STATE 0x22 -// HID feature selectors -#define DEVICE_REMOTE_WAKEUP 1 -#define ENDPOINT_HALT 0 -#define TEST_MODE 2 - -/*------------------------------------------------------------------* - * Keyboard descriptor setting - *------------------------------------------------------------------*/ -#define KBD_INTERFACE 0 -#define KBD_ENDPOINT 1 -#define KBD_SIZE 8 -#define KBD_BUFFER EP_SINGLE_BUFFER -#define KBD_REPORT_KEYS (KBD_SIZE - 2) - -// secondary keyboard -#ifdef NKRO_ENABLE -# define KBD2_INTERFACE 4 -# define KBD2_ENDPOINT 5 -# define KBD2_SIZE 16 -# define KBD2_BUFFER EP_DOUBLE_BUFFER -# define KBD2_REPORT_KEYS (KBD2_SIZE - 1) -#endif - -#endif diff --git a/tmk_core/protocol/pjrc/usb_debug.c b/tmk_core/protocol/pjrc/usb_debug.c deleted file mode 100644 index 7e78d96c3503..000000000000 --- a/tmk_core/protocol/pjrc/usb_debug.c +++ /dev/null @@ -1,98 +0,0 @@ -/* USB Keyboard Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include "sendchar.h" -#include "usb_debug.h" - -// the time remaining before we transmit any partially full -// packet, or send a zero length packet. -volatile uint8_t debug_flush_timer = 0; - -int8_t sendchar(uint8_t c) { - static uint8_t previous_timeout = 0; - uint8_t timeout, intr_state; - - // if we're not online (enumerated and configured), error - if (!usb_configured()) return -1; - // interrupts are disabled so these functions can be - // used from the main program or interrupt context, - // even both in the same program! - intr_state = SREG; - cli(); - UENUM = DEBUG_TX_ENDPOINT; - // if we gave up due to timeout before, don't wait again - if (previous_timeout) { - if (!(UEINTX & (1 << RWAL))) { - SREG = intr_state; - return -1; - } - previous_timeout = 0; - } - // wait for the FIFO to be ready to accept data - timeout = UDFNUML + 4; - while (1) { - // are we ready to transmit? - if (UEINTX & (1 << RWAL)) break; - SREG = intr_state; - // have we waited too long? - if (UDFNUML == timeout) { - previous_timeout = 1; - return -1; - } - // has the USB gone offline? - if (!usb_configured()) return -1; - // get ready to try checking again - intr_state = SREG; - cli(); - UENUM = DEBUG_TX_ENDPOINT; - } - // actually write the byte into the FIFO - UEDATX = c; - // if this completed a packet, transmit it now! - if (!(UEINTX & (1 << RWAL))) { - UEINTX = 0x3A; - debug_flush_timer = 0; - } else { - debug_flush_timer = 2; - } - SREG = intr_state; - return 0; -} - -// immediately transmit any buffered output. -void usb_debug_flush_output(void) { - uint8_t intr_state; - - intr_state = SREG; - cli(); - if (debug_flush_timer) { - UENUM = DEBUG_TX_ENDPOINT; - while ((UEINTX & (1 << RWAL))) { - UEDATX = 0; - } - UEINTX = 0x3A; - debug_flush_timer = 0; - } - SREG = intr_state; -} diff --git a/tmk_core/protocol/pjrc/usb_debug.h b/tmk_core/protocol/pjrc/usb_debug.h deleted file mode 100644 index efe075fa97d0..000000000000 --- a/tmk_core/protocol/pjrc/usb_debug.h +++ /dev/null @@ -1,39 +0,0 @@ -/* USB Keyboard Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef USB_DEBUG_H -#define USB_DEBUG_H 1 - -#include -#include "usb.h" - -#define DEBUG_INTERFACE 2 -#define DEBUG_TX_ENDPOINT 3 -#define DEBUG_TX_SIZE 32 -#define DEBUG_TX_BUFFER EP_DOUBLE_BUFFER - -extern volatile uint8_t debug_flush_timer; - -void usb_debug_flush_output(void); // immediately transmit any buffered output - -#endif diff --git a/tmk_core/protocol/pjrc/usb_extra.c b/tmk_core/protocol/pjrc/usb_extra.c deleted file mode 100644 index 1745e651c7ef..000000000000 --- a/tmk_core/protocol/pjrc/usb_extra.c +++ /dev/null @@ -1,62 +0,0 @@ -/* USB Keyboard Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include -#include "host.h" -#include "usb_extra.h" - -int8_t usb_extra_send(uint8_t report_id, uint16_t data) { - uint8_t intr_state, timeout; - - if (!usb_configured()) return -1; - intr_state = SREG; - cli(); - UENUM = EXTRA_ENDPOINT; - timeout = UDFNUML + 50; - while (1) { - // are we ready to transmit? - if (UEINTX & (1 << RWAL)) break; - SREG = intr_state; - // has the USB gone offline? - if (!usb_configured()) return -1; - // have we waited too long? - if (UDFNUML == timeout) return -1; - // get ready to try checking again - intr_state = SREG; - cli(); - UENUM = EXTRA_ENDPOINT; - } - - UEDATX = report_id; - UEDATX = data & 0xFF; - UEDATX = (data >> 8) & 0xFF; - - UEINTX = 0x3A; - SREG = intr_state; - return 0; -} - -int8_t usb_extra_consumer_send(uint16_t bits) { return usb_extra_send(REPORT_ID_CONSUMER, bits); } - -int8_t usb_extra_system_send(uint16_t bits) { return usb_extra_send(REPORT_ID_SYSTEM, bits); } diff --git a/tmk_core/protocol/pjrc/usb_extra.h b/tmk_core/protocol/pjrc/usb_extra.h deleted file mode 100644 index 674d582ac2c8..000000000000 --- a/tmk_core/protocol/pjrc/usb_extra.h +++ /dev/null @@ -1,44 +0,0 @@ -/* USB Keyboard Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef USB_EXTRA_H -#define USB_EXTRA_H 1 -/* - * Enhanced keyboard features for Windows: - * Audio control and System control - * - * http://www.microsoft.com/whdc/archive/w2kbd.mspx - */ - -#include -#include "usb.h" - -#define EXTRA_INTERFACE 3 -#define EXTRA_ENDPOINT 4 -#define EXTRA_SIZE 8 -#define EXTRA_BUFFER EP_DOUBLE_BUFFER - -int8_t usb_extra_consumer_send(uint16_t bits); -int8_t usb_extra_system_send(uint16_t bits); - -#endif diff --git a/tmk_core/protocol/pjrc/usb_keyboard.c b/tmk_core/protocol/pjrc/usb_keyboard.c deleted file mode 100644 index 31856d0fda14..000000000000 --- a/tmk_core/protocol/pjrc/usb_keyboard.c +++ /dev/null @@ -1,114 +0,0 @@ -/* USB Keyboard Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include -#include "keycode.h" -#include "usb_keyboard.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "host.h" - -#ifdef NKRO_ENABLE -# include "keycode_config.h" - -extern keymap_config_t keymap_config; -#endif - -// protocol setting from the host. We use exactly the same report -// either way, so this variable only stores the setting since we -// are required to be able to report which setting is in use. -uint8_t keyboard_protocol = 1; - -// the idle configuration, how often we send the report to the -// host (ms * 4) even when it hasn't changed -// Windows and Linux set 0 while OS X sets 6(24ms) by SET_IDLE request. -uint8_t keyboard_idle = 125; - -// count until idle timeout -uint8_t usb_keyboard_idle_count = 0; - -// 1=num lock, 2=caps lock, 4=scroll lock, 8=compose, 16=kana -volatile uint8_t usb_keyboard_leds = 0; - -static inline int8_t send_report(report_keyboard_t *report, uint8_t endpoint, uint8_t keys_start, uint8_t keys_end); - -int8_t usb_keyboard_send_report(report_keyboard_t *report) { - int8_t result = 0; - -#ifdef NKRO_ENABLE - if (keymap_config.nkro) - result = send_report(report, KBD2_ENDPOINT, 0, KBD2_SIZE); - else -#endif - { - result = send_report(report, KBD_ENDPOINT, 0, KBD_SIZE); - } - - if (result) return result; - usb_keyboard_idle_count = 0; - usb_keyboard_print_report(report); - return 0; -} - -void usb_keyboard_print_report(report_keyboard_t *report) { - if (!debug_keyboard) return; - print("keys: "); - for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - phex(report->keys[i]); - print(" "); - } - print(" mods: "); - phex(report->mods); - print("\n"); -} - -static inline int8_t send_report(report_keyboard_t *report, uint8_t endpoint, uint8_t keys_start, uint8_t keys_end) { - uint8_t intr_state, timeout; - - if (!usb_configured()) return -1; - intr_state = SREG; - cli(); - UENUM = endpoint; - timeout = UDFNUML + 50; - while (1) { - // are we ready to transmit? - if (UEINTX & (1 << RWAL)) break; - SREG = intr_state; - // has the USB gone offline? - if (!usb_configured()) return -1; - // have we waited too long? - if (UDFNUML == timeout) return -1; - // get ready to try checking again - intr_state = SREG; - cli(); - UENUM = endpoint; - } - for (uint8_t i = keys_start; i < keys_end; i++) { - UEDATX = report->raw[i]; - } - UEINTX = 0x3A; - SREG = intr_state; - return 0; -} diff --git a/tmk_core/protocol/pjrc/usb_keyboard.h b/tmk_core/protocol/pjrc/usb_keyboard.h deleted file mode 100644 index 919685fde4b8..000000000000 --- a/tmk_core/protocol/pjrc/usb_keyboard.h +++ /dev/null @@ -1,38 +0,0 @@ -/* USB Keyboard Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_keyboard.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef USB_KEYBOARD_H -#define USB_KEYBOARD_H 1 - -#include -#include -#include "usb.h" -#include "host.h" - -extern uint8_t usb_keyboard_idle_count; -extern volatile uint8_t usb_keyboard_leds; - -int8_t usb_keyboard_send_report(report_keyboard_t *report); -void usb_keyboard_print_report(report_keyboard_t *report); - -#endif diff --git a/tmk_core/protocol/pjrc/usb_mouse.c b/tmk_core/protocol/pjrc/usb_mouse.c deleted file mode 100644 index 9e3639571c13..000000000000 --- a/tmk_core/protocol/pjrc/usb_mouse.c +++ /dev/null @@ -1,83 +0,0 @@ -/* USB Mouse Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_mouse.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include -#include "usb_mouse.h" -#include "print.h" -#include "debug.h" - -uint8_t usb_mouse_protocol = 1; - -int8_t usb_mouse_send(int8_t x, int8_t y, int8_t wheel_v, int8_t wheel_h, uint8_t buttons) { - uint8_t intr_state, timeout; - - if (!usb_configured()) return -1; - if (x == -128) x = -127; - if (y == -128) y = -127; - if (wheel_v == -128) wheel_v = -127; - if (wheel_h == -128) wheel_h = -127; - intr_state = SREG; - cli(); - UENUM = MOUSE_ENDPOINT; - timeout = UDFNUML + 50; - while (1) { - // are we ready to transmit? - if (UEINTX & (1 << RWAL)) break; - SREG = intr_state; - // has the USB gone offline? - if (!usb_configured()) return -1; - // have we waited too long? - if (UDFNUML == timeout) return -1; - // get ready to try checking again - intr_state = SREG; - cli(); - UENUM = MOUSE_ENDPOINT; - } - UEDATX = buttons; - UEDATX = x; - UEDATX = y; - if (usb_mouse_protocol) { - UEDATX = wheel_v; - UEDATX = wheel_h; - } - - UEINTX = 0x3A; - SREG = intr_state; - return 0; -} - -void usb_mouse_print(int8_t x, int8_t y, int8_t wheel_v, int8_t wheel_h, uint8_t buttons) { - if (!debug_mouse) return; - print("usb_mouse[btn|x y v h]: "); - phex(buttons); - print("|"); - phex(x); - print(" "); - phex(y); - print(" "); - phex(wheel_v); - print(" "); - phex(wheel_h); - print("\n"); -} diff --git a/tmk_core/protocol/pjrc/usb_mouse.h b/tmk_core/protocol/pjrc/usb_mouse.h deleted file mode 100644 index ba7df230de70..000000000000 --- a/tmk_core/protocol/pjrc/usb_mouse.h +++ /dev/null @@ -1,47 +0,0 @@ -/* USB Mouse Plus Debug Channel Example for Teensy USB Development Board - * http://www.pjrc.com/teensy/usb_mouse.html - * Copyright (c) 2009 PJRC.COM, LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef USB_MOUSE_H -#define USB_MOUSE_H 1 - -#include -#include -#include "usb.h" - -#define MOUSE_INTERFACE 1 -#define MOUSE_ENDPOINT 2 -#define MOUSE_SIZE 8 -#define MOUSE_BUFFER EP_SINGLE_BUFFER - -#define MOUSE_BTN1 (1 << 0) -#define MOUSE_BTN2 (1 << 1) -#define MOUSE_BTN3 (1 << 2) -#define MOUSE_BTN4 (1 << 3) -#define MOUSE_BTN5 (1 << 4) - -extern uint8_t usb_mouse_protocol; - -int8_t usb_mouse_send(int8_t x, int8_t y, int8_t wheel_v, int8_t wheel_h, uint8_t buttons); -void usb_mouse_print(int8_t x, int8_t y, int8_t wheel_v, int8_t wheel_h, uint8_t buttons); - -#endif diff --git a/tmk_core/readme.md b/tmk_core/readme.md index a3783fe37b8a..71b8d2e9fc48 100644 --- a/tmk_core/readme.md +++ b/tmk_core/readme.md @@ -48,7 +48,7 @@ Complete firmwares for various keyboards and protocol converters. License ------- **GPLv2** or later. Some protocol files are under **Modified BSD License**. -LUFA, PJRC and V-USB stack have their own license respectively. +ChibiOS, LUFA and V-USB stack have their own license respectively. @@ -85,9 +85,9 @@ Architecture / /| Keys/Mouse | Protocol |d| | Action | | | Protocol | /__________/ |<-----------| LUFA |r| | Layer, Tap | | | Matrix | |.--------.| | LED | V-USB |i| |-------------| | | PS/2,IBM | __________________ - || || |----------->| PJRC |v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /| - || Host || | Console | iWRAP(BT)|e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / / - ||________||/.<-----------| UART |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / / + || || |----------->| iWRAP(BT)|v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /| + || Host || | Console | UART |e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / / + ||________||/.<-----------| |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / / `_========_'/| |---------------------------------------------|-------->/___ /_______/ ___/ / |_o______o_|/ | Sendchar, Print, Debug, Command, ... | |_________________|/ +---------------------------------------------+ Keyboard @@ -133,7 +133,6 @@ Files and Directories ### Keyboard Protocols * lufa/ - LUFA USB stack -* pjrc/ - PJRC USB stack * vusb/ - Objective Development V-USB * iwrap/ - Bluetooth HID for Bluegiga iWRAP * ps2.c - PS/2 protocol From b6e23f974bf92a2e2342ede43e98ecfd24a84f51 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sat, 8 Feb 2020 23:58:28 +0100 Subject: [PATCH 245/331] Update the flash cli command to use the user config (#8125) --- lib/python/qmk/cli/flash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index e897174a2025..cc1e6235afa5 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py @@ -52,7 +52,7 @@ def flash(cli): print_bootloader_help() return False - elif cli.args.keymap and not cli.args.keyboard: + elif cli.config.flash.keymap and not cli.config.flash.keyboard: # If only a keymap was given but no keyboard, suggest listing keyboards cli.echo('usage: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]') cli.log.error('run \'qmk list_keyboards\' to find out the supported keyboards') @@ -70,7 +70,7 @@ def flash(cli): cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap']) - elif cli.args.keyboard and cli.args.keymap: + elif cli.config.flash.keyboard and cli.config.flash.keymap: # Generate the make command for a specific keyboard/keymap. command = create_make_command(cli.config.flash.keyboard, cli.config.flash.keymap, cli.args.bootloader) From 2fe288d01d1f15cd2bcfcf6f4282f728da6ea7be Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Sat, 8 Feb 2020 22:54:10 -0500 Subject: [PATCH 246/331] [Keymap] Adding ergodash/rev1:nopunin10did (#8098) * Adding ergodash/rev1:nopunin10did * Update keyboards/ergodash/rev1/keymaps/nopunin10did/keymap.c * Update keyboards/ergodash/rev1/keymaps/nopunin10did/keymap.c * Update keyboards/ergodash/rev1/keymaps/nopunin10did/readme.md --- .../rev1/keymaps/nopunin10did/config.h | 36 +++++++++++++++++++ .../rev1/keymaps/nopunin10did/keymap.c | 18 ++++++++++ .../rev1/keymaps/nopunin10did/layers.json | 1 + .../rev1/keymaps/nopunin10did/readme.md | 13 +++++++ .../rev1/keymaps/nopunin10did/rules.mk | 3 ++ 5 files changed, 71 insertions(+) create mode 100644 keyboards/ergodash/rev1/keymaps/nopunin10did/config.h create mode 100644 keyboards/ergodash/rev1/keymaps/nopunin10did/keymap.c create mode 100644 keyboards/ergodash/rev1/keymaps/nopunin10did/layers.json create mode 100644 keyboards/ergodash/rev1/keymaps/nopunin10did/readme.md create mode 100644 keyboards/ergodash/rev1/keymaps/nopunin10did/rules.mk diff --git a/keyboards/ergodash/rev1/keymaps/nopunin10did/config.h b/keyboards/ergodash/rev1/keymaps/nopunin10did/config.h new file mode 100644 index 000000000000..b5c45669d4b5 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/nopunin10did/config.h @@ -0,0 +1,36 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef TAPPING_TERM +#define TAPPING_TERM 300 \ No newline at end of file diff --git a/keyboards/ergodash/rev1/keymaps/nopunin10did/keymap.c b/keyboards/ergodash/rev1/keymaps/nopunin10did/keymap.c new file mode 100644 index 000000000000..61cac97b0d77 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/nopunin10did/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_3key_2us( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_PGUP, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + LCA_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGDN, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_GRV, KC_SPC, LT(1,KC_DEL), KC_HOME, KC_END, KC_BSLS, KC_LEFT, KC_RGHT, KC_DOWN, KC_UP + ), + [1] = LAYOUT_3key_2us( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F12, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LSFT(KC_HOME), LSFT(KC_END), KC_TRNS, LALT(LSFT(KC_LEFT)), LALT(LSFT(KC_RIGHT)), LALT(LSFT(KC_DOWN)), LALT(LSFT(KC_UP)) + ) +}; diff --git a/keyboards/ergodash/rev1/keymaps/nopunin10did/layers.json b/keyboards/ergodash/rev1/keymaps/nopunin10did/layers.json new file mode 100644 index 000000000000..d6f647622b9d --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/nopunin10did/layers.json @@ -0,0 +1 @@ +[["KC_ESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_EQL", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_BSPC", "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_PGUP", "KC_LBRC", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_ENT", "LCA_T(KC_CAPS)", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_PGDN", "KC_RBRC", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_LCTL", "KC_LGUI", "KC_LALT", "MO(1)", "KC_GRV", "KC_SPC", "LT(1,KC_DEL)", "KC_HOME", "KC_END", "KC_BSLS", "KC_LEFT", "KC_RGHT", "KC_DOWN", "KC_UP"], ["KC_TRNS", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F12", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "LSFT(KC_HOME)", "LSFT(KC_END)", "KC_TRNS", "LALT(LSFT(KC_LEFT))", "LALT(LSFT(KC_RIGHT))", "LALT(LSFT(KC_DOWN))", "LALT(LSFT(KC_UP))"]] \ No newline at end of file diff --git a/keyboards/ergodash/rev1/keymaps/nopunin10did/readme.md b/keyboards/ergodash/rev1/keymaps/nopunin10did/readme.md new file mode 100644 index 000000000000..f3ba6752ad1e --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/nopunin10did/readme.md @@ -0,0 +1,13 @@ +# Generated Keymap Layout + +This layout was generated by the QMK API. You can find the JSON data used to +generate this keymap in the file layers.json. + +To make use of this file you will need follow the following steps: + +* Download or Clone QMK Firmware: +* Extract QMK Firmware to a location on your hard drive +* Copy this folder into `keyboards/ergodash/rev1/keymaps/` +* You are now ready to compile or use your keymap with the source + +More information can be found in the QMK docs: diff --git a/keyboards/ergodash/rev1/keymaps/nopunin10did/rules.mk b/keyboards/ergodash/rev1/keymaps/nopunin10did/rules.mk new file mode 100644 index 000000000000..bb9e33b08297 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/nopunin10did/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no From 6052aa499e6fa6f2601d71b18301a76218944463 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 10 Feb 2020 04:19:08 +1100 Subject: [PATCH 247/331] Use FIRMWARE_FORMAT for "Checking file size" message (#8121) --- message.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/message.mk b/message.mk index 831e30ef82ad..c8da7df0bb40 100644 --- a/message.mk +++ b/message.mk @@ -78,7 +78,7 @@ define GENERATE_MSG_AVAILABLE_KEYMAPS endef MSG_AVAILABLE_KEYMAPS = $(eval $(call GENERATE_MSG_AVAILABLE_KEYMAPS))$(MSG_AVAILABLE_KEYMAPS_ACTUAL) -MSG_CHECK_FILESIZE = Checking file size of $(TARGET).hex +MSG_CHECK_FILESIZE = Checking file size of $(TARGET).$(FIRMWARE_FORMAT) MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n From c3200aa8fcf86122736846017ca7b125ac225842 Mon Sep 17 00:00:00 2001 From: Ted Lin <49993528+tedlinsonos@users.noreply.github.com> Date: Sun, 9 Feb 2020 23:50:45 -0500 Subject: [PATCH 248/331] Compile error if ONESHOT_TIMEOUT defined but oneshot disabled (#8100) * Compile error if ONESHOT_TIMEOUT defined but oneshot disabled When ONESHOT_TIMEOUT and NO_ACTION_ONESHOT are both defined, this code fails to compile. Wrap the one usage of ONESHOT_TIMEOUT that is inconsistent with the rest so all usages are properly wrapped by a check of NO_ACTION_ONESHOT. * Run file through clang-format Co-authored-by: Ted M Lin --- tmk_core/common/action.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 5dadba4fb7f3..d572b7056449 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -90,13 +90,15 @@ void action_exec(keyevent_t event) { keyrecord_t record = {.event = event}; -#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) +#ifndef NO_ACTION_ONESHOT +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) if (has_oneshot_layer_timed_out()) { clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); } if (has_oneshot_mods_timed_out()) { clear_oneshot_mods(); } +# endif #endif #ifndef NO_ACTION_TAPPING From 35c4dbe688f2db07426990c5980e9c70b4ff5667 Mon Sep 17 00:00:00 2001 From: madhogs <59648482+madhogs@users.noreply.github.com> Date: Mon, 10 Feb 2020 07:53:12 +0000 Subject: [PATCH 249/331] New iso layout and keymap for dz60 with 4th row all 1u (#7830) * Added new iso layout and keymap for dz60 with all 4th row keys 1u in size --- keyboards/dz60/dz60.h | 27 +++++++++++++++ keyboards/dz60/info.json | 6 +++- .../dz60/keymaps/iso_4th_row_all_1u/keymap.c | 29 ++++++++++++++++ .../dz60/keymaps/iso_4th_row_all_1u/readme.md | 34 +++++++++++++++++++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 keyboards/dz60/keymaps/iso_4th_row_all_1u/keymap.c create mode 100644 keyboards/dz60/keymaps/iso_4th_row_all_1u/readme.md diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 1d0c921935d8..c5c1c84958ca 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -628,4 +628,31 @@ { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, k4c, k4d, k4e } \ } + +/* LAYOUT_60_iso_4th_row_all_1u + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │1e │ │ + * ├───┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │3e │ + * ├───┴┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + * │40 │41 │43 │46 │4a │4b │4c │4d │4e │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +*/ +#define LAYOUT_60_iso_4th_row_all_1u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k43, k46, k4a, k4b, k4c, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ +} #endif diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index 49efeba06680..2d0220352896 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -92,6 +92,10 @@ "LAYOUT_60_abnt2": { "key_count": 63, "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"\u00a8", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"`", "x":11.5, "y":1}, {"label":"{", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":"\u00c7", "x":10.75, "y":2}, {"label":"^", "x":11.75, "y":2}, {"label":"}", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":":", "x":11.25, "y":3}, {"label":"?", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - } + }, + "LAYOUT_60_iso_4th_row_all_1u": { + "key_count": 65, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"|", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Fn", "x":10, "y":4}, {"label":"←", "x":11, "y":4}, {"label":"↓", "x":12, "y":4}, {"label":"↑", "x":13, "y":4}, {"label":"→", "x":14, "y":4}] + } } } diff --git a/keyboards/dz60/keymaps/iso_4th_row_all_1u/keymap.c b/keyboards/dz60/keymaps/iso_4th_row_all_1u/keymap.c new file mode 100644 index 000000000000..e1552eccc44d --- /dev/null +++ b/keyboards/dz60/keymaps/iso_4th_row_all_1u/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +// LAYERS +#define _QWERTY 0 // QWERTY layer +#define _QW _QWERTY + +#define _FUNCTION 1 // Function layer +#define _FN _FUNCTION + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_60_iso_4th_row_all_1u( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INS, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_CAPS, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FUNCTION] = LAYOUT_60_iso_4th_row_all_1u( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, XXXXXXX, KC_PGUP, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_HOME, KC_PGDN, KC_END + ), +}; diff --git a/keyboards/dz60/keymaps/iso_4th_row_all_1u/readme.md b/keyboards/dz60/keymaps/iso_4th_row_all_1u/readme.md new file mode 100644 index 000000000000..6182800543b9 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_4th_row_all_1u/readme.md @@ -0,0 +1,34 @@ +DZ60 iso layout with 4th row (Z row) having all 1u size keys. + +### _QWERTY: +Base iso qwerty layer with arrow keys +``` +,-----------------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | +|---------------------------------------------------------------------------------- Enter + +| Fn | A | S | D | F | G | H | J | K | L | ; | ' | # | | +|-----------------------------------------------------------------------------------------+ +|Shift| \ | Z | X | C | V | B | N | M | , | . | / | Ins | Up | Del | +|-----------------------------------------------------------------------------------------+ +| Ctrl | Os | Alt | Space |Caps | Fn |Left |Down |Right| +`-----------------------------------------------------------------------------------------' +``` + +### _FUNCTION +Layer with function keys, media keys and rgb keys +``` +FN Layer +,-----------------------------------------------------------------------------------------. +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | +|-----------------------------------------------------------------------------------------+ +| | | Up | | | | | | | |PSRC | | | | +|---------------------------------------------------------------------------------- + +| |Left |Down |Right| | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | |MPrev|MNext|Mute |VolUp|VolDn|MPlay| |PgUp | | +|-----------------------------------------------------------------------------------------+ +| | | | | | |Home |PGDn | End | +`-----------------------------------------------------------------------------------------' +``` \ No newline at end of file From 8f333138f5cc76ecc7538100ce93af5e228f0eb0 Mon Sep 17 00:00:00 2001 From: ai03 Date: Mon, 10 Feb 2020 00:53:16 -0800 Subject: [PATCH 250/331] [Keyboard] Add support for Polaris (#8123) * Drop in old files * Make a blank template keyboard to refresh ancient files to latest config * Update keymaps files to new format * Remove chunks of config asked for removal in previous pullreqs * Remove split pin option from config * Update rules.mk to latest version * Remove unused functions from polaris.c * Add via keymap * Build basic tsangan keymap; add QMK configurator info * Remove temporary template * Update keyboards/ai03/polaris/config.h * Update keyboards/ai03/polaris/readme.md * Update keyboards/ai03/polaris/readme.md * Update keyboards/ai03/polaris/readme.md * Update rules.mk * Fixes as per pullreq * Update keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c * Update keyboards/ai03/polaris/polaris.h * Update keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c * Update keyboards/ai03/polaris/info.json * Update keyboards/ai03/polaris/keymaps/testing/readme.md --- keyboards/ai03/polaris/config.h | 169 ++++++++++++++++++ keyboards/ai03/polaris/info.json | 145 +++++++++++++++ .../ai03/polaris/keymaps/default/keymap.c | 39 ++++ .../ai03/polaris/keymaps/default/readme.md | 3 + .../keymaps/default_ansi_tsangan/keymap.c | 38 ++++ .../keymaps/default_ansi_tsangan/readme.md | 3 + .../ai03/polaris/keymaps/testing/keymap.c | 39 ++++ .../ai03/polaris/keymaps/testing/readme.md | 16 ++ keyboards/ai03/polaris/keymaps/via/keymap.c | 55 ++++++ keyboards/ai03/polaris/keymaps/via/readme.md | 3 + keyboards/ai03/polaris/keymaps/via/rules.mk | 1 + keyboards/ai03/polaris/polaris.c | 16 ++ keyboards/ai03/polaris/polaris.h | 56 ++++++ keyboards/ai03/polaris/readme.md | 15 ++ keyboards/ai03/polaris/rules.mk | 32 ++++ 15 files changed, 630 insertions(+) create mode 100644 keyboards/ai03/polaris/config.h create mode 100644 keyboards/ai03/polaris/info.json create mode 100644 keyboards/ai03/polaris/keymaps/default/keymap.c create mode 100644 keyboards/ai03/polaris/keymaps/default/readme.md create mode 100644 keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c create mode 100644 keyboards/ai03/polaris/keymaps/default_ansi_tsangan/readme.md create mode 100644 keyboards/ai03/polaris/keymaps/testing/keymap.c create mode 100644 keyboards/ai03/polaris/keymaps/testing/readme.md create mode 100644 keyboards/ai03/polaris/keymaps/via/keymap.c create mode 100644 keyboards/ai03/polaris/keymaps/via/readme.md create mode 100644 keyboards/ai03/polaris/keymaps/via/rules.mk create mode 100644 keyboards/ai03/polaris/polaris.c create mode 100644 keyboards/ai03/polaris/polaris.h create mode 100644 keyboards/ai03/polaris/readme.md create mode 100644 keyboards/ai03/polaris/rules.mk diff --git a/keyboards/ai03/polaris/config.h b/keyboards/ai03/polaris/config.h new file mode 100644 index 000000000000..bb3307d97cef --- /dev/null +++ b/keyboards/ai03/polaris/config.h @@ -0,0 +1,169 @@ +/* +Copyright 2019 Ryota Goto + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ai03 Design Studio +#define PRODUCT Polaris +#define DESCRIPTION Basic 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } +#define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 14 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/polaris/info.json b/keyboards/ai03/polaris/info.json new file mode 100644 index 000000000000..f40e7bec77d6 --- /dev/null +++ b/keyboards/ai03/polaris/info.json @@ -0,0 +1,145 @@ +{ + "keyboard_name": "Polaris", + "url": "https://kb.ai03.me/projects/polaris.html", + "maintainer": "ai03", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Delete", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Print Screen", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_ansi_tsangan_split_rshift": { + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Delete", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Print Screen", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"Win", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"label":"Alt", "x":11, "y":4, "w":1.5}, + {"label":"Win", "x":12.5, "y":4}, + {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/ai03/polaris/keymaps/default/keymap.c b/keyboards/ai03/polaris/keymaps/default/keymap.c new file mode 100644 index 000000000000..65902ae583e8 --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [_FN] = LAYOUT_all( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_BSPC, + _______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, BL_STEP, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/ai03/polaris/keymaps/default/readme.md b/keyboards/ai03/polaris/keymaps/default/readme.md new file mode 100644 index 000000000000..ec7f3154a4f8 --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Polaris + +Fits just about everything on two layers. \ No newline at end of file diff --git a/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c b/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c new file mode 100644 index 000000000000..3ccaa28fe3bc --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_ansi_tsangan_split_rshift( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + [_FN] = LAYOUT_60_ansi_tsangan_split_rshift( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_BSPC, + _______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, BL_STEP, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/readme.md b/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/readme.md new file mode 100644 index 000000000000..a6a85dd525f7 --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/readme.md @@ -0,0 +1,3 @@ +# The default_ansi_tsangan keymap for Polaris + +Simplified down to the basic ANSI Tsangan layouts for ease of configuration. \ No newline at end of file diff --git a/keyboards/ai03/polaris/keymaps/testing/keymap.c b/keyboards/ai03/polaris/keymaps/testing/keymap.c new file mode 100644 index 000000000000..c8192251034b --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/testing/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( /* Base */ + BL_TOGG, BL_STEP, KC_NO, KC_NO, KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [_FN] = LAYOUT_all( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_BSPC, + _______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, BL_STEP, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/ai03/polaris/keymaps/testing/readme.md b/keyboards/ai03/polaris/keymaps/testing/readme.md new file mode 100644 index 000000000000..ceefe30e8a02 --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/testing/readme.md @@ -0,0 +1,16 @@ +# The PCB testing keymap for Polaris + +LED control keys are placed on the numrow. +Mainly for factory testing use only. + +ESC = Backlight Toggle +1 = Backlight Step + +5 = RGB Toggle +6 = RGB Mode Cycle +7 = RGB Hue Increase +8 = RGB Hue Decrease +9 = RGB Saturation Increase +0 = RGB Saturation Decrease +MINS = RGB Value Increase +EQL = RGB Value Decrease diff --git a/keyboards/ai03/polaris/keymaps/via/keymap.c b/keyboards/ai03/polaris/keymaps/via/keymap.c new file mode 100644 index 000000000000..67c5cd37eabc --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN, + _EXTRA_ONE, + _EXTRA_TWO +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RALT, KC_RGUI, KC_RCTL + ), + [_FN] = LAYOUT_all( /* FN */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_BSPC, + _______, _______, _______, KC_PGUP, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, BL_STEP, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_EXTRA_ONE] = LAYOUT_all( /* Layer 3 */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_EXTRA_TWO] = LAYOUT_all( /* Layer 3 */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/ai03/polaris/keymaps/via/readme.md b/keyboards/ai03/polaris/keymaps/via/readme.md new file mode 100644 index 000000000000..6e4d2c7446c6 --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The via keymap for Polaris + +For via configurator use \ No newline at end of file diff --git a/keyboards/ai03/polaris/keymaps/via/rules.mk b/keyboards/ai03/polaris/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ai03/polaris/polaris.c b/keyboards/ai03/polaris/polaris.c new file mode 100644 index 000000000000..256dcb930a6d --- /dev/null +++ b/keyboards/ai03/polaris/polaris.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "polaris.h" diff --git a/keyboards/ai03/polaris/polaris.h b/keyboards/ai03/polaris/polaris.h new file mode 100644 index 000000000000..306f446765e7 --- /dev/null +++ b/keyboards/ai03/polaris/polaris.h @@ -0,0 +1,56 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K404, K406, K408, K410, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 } \ +} + +#define LAYOUT_60_ansi_tsangan_split_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K406, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, K413 } \ +} diff --git a/keyboards/ai03/polaris/readme.md b/keyboards/ai03/polaris/readme.md new file mode 100644 index 000000000000..c9c8e7e222a0 --- /dev/null +++ b/keyboards/ai03/polaris/readme.md @@ -0,0 +1,15 @@ +# Polaris + +![Polaris](https://i.imgur.com/bENjPiKh.jpg) + +A basic 60% keyboard + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +* Hardware Supported: Polaris PCB/case +* Hardware Availability: Will be posted [here](https://kb.ai03.me/projects/polaris.html) + +Make example for this keyboard (after setting up your build environment): + + make ai03/polaris:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ai03/polaris/rules.mk b/keyboards/ai03/polaris/rules.mk new file mode 100644 index 000000000000..547bb88c7417 --- /dev/null +++ b/keyboards/ai03/polaris/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 89c528e443561731eb3cf4ed3d49002545421afe Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Tue, 11 Feb 2020 00:16:27 +1100 Subject: [PATCH 251/331] [Keyboard] Add support for Hub16 (#7794) Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> Co-Authored-By: fauxpark --- keyboards/hub16/config.h | 97 ++++++++ keyboards/hub16/hub16.c | 16 ++ keyboards/hub16/hub16.h | 42 ++++ keyboards/hub16/keymaps/default/keymap.c | 96 ++++++++ keyboards/hub16/keymaps/no_mod/keymap.c | 63 ++++++ keyboards/hub16/matrix.c | 270 +++++++++++++++++++++++ keyboards/hub16/readme.md | 15 ++ keyboards/hub16/rules.mk | 38 ++++ 8 files changed, 637 insertions(+) create mode 100755 keyboards/hub16/config.h create mode 100755 keyboards/hub16/hub16.c create mode 100755 keyboards/hub16/hub16.h create mode 100755 keyboards/hub16/keymaps/default/keymap.c create mode 100755 keyboards/hub16/keymaps/no_mod/keymap.c create mode 100644 keyboards/hub16/matrix.c create mode 100755 keyboards/hub16/readme.md create mode 100755 keyboards/hub16/rules.mk diff --git a/keyboards/hub16/config.h b/keyboards/hub16/config.h new file mode 100755 index 000000000000..c7dec995ebc2 --- /dev/null +++ b/keyboards/hub16/config.h @@ -0,0 +1,97 @@ +/* +Copyright 2019 Josh Johnson + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x8F73 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Josh Johnson +#define PRODUCT Hub16 +#define DESCRIPTION Macro Pad with USB Hub and Encoders + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { F0, C7, C6, B6, E6} +#define MATRIX_COL_PINS \ + { F4, F1, D5, D3 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D1 +// #ifdef RGB_DI_PIN +#define RGBLED_NUM 11 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 20 + +/* ENCODER THINGS */ + +// #define NUMBER_OF_ENCODERS 2 +#define ENCODERS_PAD_A \ + { F6, B4 } +#define ENCODERS_PAD_B \ + { F5, B5 } + +/* Tap Dance timing */ +#define TAPPING_TERM 200 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/hub16/hub16.c b/keyboards/hub16/hub16.c new file mode 100755 index 000000000000..e18ba5526916 --- /dev/null +++ b/keyboards/hub16/hub16.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Josh Johnson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "hub16.h" \ No newline at end of file diff --git a/keyboards/hub16/hub16.h b/keyboards/hub16/hub16.h new file mode 100755 index 000000000000..36830bf5c086 --- /dev/null +++ b/keyboards/hub16/hub16.h @@ -0,0 +1,42 @@ +/* Copyright 2019 Josh Johnson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#define ___ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k40, k41, \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33 \ +) { \ + { k00, k01, k02, k03, }, \ + { k10, k11, k12, k13, }, \ + { k20, k21, k22, k23, }, \ + { k30, k31, k32, k33, }, \ + { k40, k41, ___, ___, } \ +} + diff --git a/keyboards/hub16/keymaps/default/keymap.c b/keyboards/hub16/keymaps/default/keymap.c new file mode 100755 index 000000000000..a77c8bc78294 --- /dev/null +++ b/keyboards/hub16/keymaps/default/keymap.c @@ -0,0 +1,96 @@ +/* Copyright 2019 Josh Johnson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Function key we are 'wrapping' usual key presses in +#define KC_WRAP KC_F24 + +// Tap Dance Declarations +enum { TD_TO_LED = 0, TD_TO_DEFAULT = 1 }; + +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for HID, twice to toggle layer 1 + [TD_TO_LED] = ACTION_TAP_DANCE_DUAL_ROLE(_______, 1), + [TD_TO_DEFAULT] = ACTION_TAP_DANCE_DUAL_ROLE(_______, 0)}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_S, KC_V, + KC_A, KC_B, KC_C, KC_D, + KC_E, KC_F, KC_G, KC_H, + KC_I, KC_J, KC_K, KC_L, + KC_M, KC_N, KC_O, TD(TD_TO_LED) + ), + + [1] = LAYOUT( /* LED Control */ + KC_NO, KC_NO, + _______, RGB_MOD, RGB_RMOD, RGB_TOG, + RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, + RGB_SAD, RGB_SAI, _______, _______, + _______, _______, RESET, TD(TD_TO_DEFAULT) + ), +}; + +// Keyboard is setup to 'warp' the pressed key with F24, +// allowing for easy differentiation from a real keyboard. +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left Encoder */ + if (clockwise) { + register_code(KC_WRAP); + tap_code(KC_R); + unregister_code(KC_WRAP); + } else { + register_code(KC_WRAP); + tap_code(KC_Q); + unregister_code(KC_WRAP); + } + } else if (index == 1) { /* Right Encoder */ + if (clockwise) { + register_code(KC_WRAP); + tap_code(KC_U); + unregister_code(KC_WRAP); + } else { + register_code(KC_WRAP); + tap_code(KC_T); + unregister_code(KC_WRAP); + } + } +} + +// Below stolen from TaranVH (https://github.com/TaranVH/2nd-keyboard/blob/master/HASU_USB/F24/keymap.c) +// Shoutout to drashna on the QMK discord for basically writing this for me.... :P + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint8_t f24_tracker; + switch (keycode) { + case KC_A ... KC_F23: + case KC_EXECUTE ... KC_EXSEL: + if (record->event.pressed) { + register_code(KC_WRAP); + f24_tracker++; + register_code(keycode); + } else { + unregister_code(keycode); + f24_tracker--; + if (!f24_tracker) { + unregister_code(KC_WRAP); + } + } + return false; + break; + } + return true; +} diff --git a/keyboards/hub16/keymaps/no_mod/keymap.c b/keyboards/hub16/keymaps/no_mod/keymap.c new file mode 100755 index 000000000000..c86ffcc16d27 --- /dev/null +++ b/keyboards/hub16/keymaps/no_mod/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2019 Josh Johnson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Function key we are 'wrapping' usual key presses in +#define KC_WRAP KC_F24 + +// Tap Dance Declarations +enum { TD_TO_LED = 0, TD_TO_DEFAULT = 1 }; + +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for HID, twice to toggle layer 1 + [TD_TO_LED] = ACTION_TAP_DANCE_DUAL_ROLE(_______, 1), + [TD_TO_DEFAULT] = ACTION_TAP_DANCE_DUAL_ROLE(_______, 0)}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_S, KC_V, + KC_A, KC_B, KC_C, KC_D, + KC_E, KC_F, KC_G, KC_H, + KC_I, KC_J, KC_K, KC_L, + KC_M, KC_N, KC_O, TD(TD_TO_LED) + ), + + [1] = LAYOUT( /* LED Control */ + KC_NO, KC_NO, + _______, RGB_MOD, RGB_RMOD, RGB_TOG, + RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, + RGB_SAD, RGB_SAI, _______, _______, + _______, _______, RESET, TD(TD_TO_DEFAULT) + ), +}; + +// Keyboard is setup to 'warp' the pressed key with F24, +// allowing for easy differentiation from a real keyboard. +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left Encoder */ + if (clockwise) { + tap_code(KC_R); + } else { + tap_code(KC_Q); + } + } else if (index == 1) { /* Right Encoder */ + if (clockwise) { + tap_code(KC_U); + } else { + tap_code(KC_T); + } + } +} \ No newline at end of file diff --git a/keyboards/hub16/matrix.c b/keyboards/hub16/matrix.c new file mode 100644 index 000000000000..ad77c923bea6 --- /dev/null +++ b/keyboards/hub16/matrix.c @@ -0,0 +1,270 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#include "wait.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +// Encoder things +#define SWITCH_1 F7 +#define SWITCH_2 D7 +static bool read_encoder_values(matrix_row_t current_matrix[], uint8_t current_row); + +#ifdef MATRIX_MASKED +extern const matrix_row_t matrix_mask[]; +#endif + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +// helper functions + +inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } + +inline matrix_row_t matrix_get_row(uint8_t row) { + // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a + // switch blocker installed and the switch is always pressed. +#ifdef MATRIX_MASKED + return matrix[row] & matrix_mask[row]; +#else + return matrix[row]; +#endif +} + +// matrix code + +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + current_matrix[current_row] = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + } + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == COL2ROW) + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } + +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +#endif + +void matrix_init(void) { + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(raw_matrix, current_col); + } +#endif + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + // Read encoder switches, already debounced + changed |= read_encoder_values(matrix, 4); + + matrix_scan_quantum(); + return (uint8_t)changed; +} + +// Customisations for the encoders +void matrix_init_kb(void){ + setPinInput(SWITCH_1); + setPinInput(SWITCH_2); +} + +void matrix_scan_kb(void){ + +} + +void matrix_print(void){ + +} + +static bool read_encoder_values(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Debounce the encoder buttons using a shift register + static uint8_t btn_1_array; + static uint8_t btn_2_array; + bool btn_1_rising = 0; + bool btn_2_rising = 0; + btn_1_array <<= 1; + btn_2_array <<= 1; + btn_1_array |= readPin(SWITCH_1); + btn_2_array |= readPin(SWITCH_2); + (btn_1_array == 0b01111111) ? (btn_1_rising = 1) : (btn_1_rising = 0); + (btn_2_array == 0b01111111) ? (btn_2_rising = 1) : (btn_2_rising = 0); + + // Populate the matrix row with the state of the encoder + current_matrix[current_row] |= btn_1_rising ? (1 << 0) : 0; + current_matrix[current_row] |= btn_2_rising ? (1 << 1) : 0; + + return (last_row_value != current_matrix[current_row]); +} \ No newline at end of file diff --git a/keyboards/hub16/readme.md b/keyboards/hub16/readme.md new file mode 100755 index 000000000000..996fa4463506 --- /dev/null +++ b/keyboards/hub16/readme.md @@ -0,0 +1,15 @@ +# Hub16 + +Hub16 is a 16 Key Macro Pad with inbuilt USB 2.0 hub and dual rotary encoders. + +For more information regarding the keyboard, please visit the [Hub16 Webpage](https://www.joshajohnson.com/hub16-keyboard/) or [GitHub Repo](https://github.com/joshajohnson/Hub16). + +* Keyboard Maintainer: [Josh Johnson](https://github.com/joshajohnson) +* Hardware Supported: Hub16 PCB (atmega32u4) +* Hardware Availability: [Josh Johnson](https://www.joshajohnson.com/hub16-keyboard/) + +Make example for this keyboard (after setting up your build environment): + + make hub16:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/hub16/rules.mk b/keyboards/hub16/rules.mk new file mode 100755 index 000000000000..ad1e238604df --- /dev/null +++ b/keyboards/hub16/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +CUSTOM_MATRIX = yes # Custom scanning of matrix +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = yes # Rotary Encoder support +TAP_DANCE_ENABLE = yes # Support for tap dancing + +SRC = matrix.c From 9398c11b5190372e11cfe20222a9c872710dd86c Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 11 Feb 2020 07:52:40 +1100 Subject: [PATCH 252/331] Remove tzarc's Luddite keymap. (#8139) --- .../luddite/keymaps/tzarc/config.h | 6 ---- .../luddite/keymaps/tzarc/keymap.c | 30 ------------------- .../luddite/keymaps/tzarc/rules.mk | 1 - 3 files changed, 37 deletions(-) delete mode 100644 keyboards/40percentclub/luddite/keymaps/tzarc/config.h delete mode 100644 keyboards/40percentclub/luddite/keymaps/tzarc/keymap.c delete mode 100644 keyboards/40percentclub/luddite/keymaps/tzarc/rules.mk diff --git a/keyboards/40percentclub/luddite/keymaps/tzarc/config.h b/keyboards/40percentclub/luddite/keymaps/tzarc/config.h deleted file mode 100644 index f8feb798d42a..000000000000 --- a/keyboards/40percentclub/luddite/keymaps/tzarc/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#undef RGBLED_NUM -#define RGBLED_NUM 16 - -#define QMK_ESC_OUTPUT F4 -#define QMK_ESC_INPUT D3 -#define QMK_LED B0 diff --git a/keyboards/40percentclub/luddite/keymaps/tzarc/keymap.c b/keyboards/40percentclub/luddite/keymaps/tzarc/keymap.c deleted file mode 100644 index dfa1c499c29b..000000000000 --- a/keyboards/40percentclub/luddite/keymaps/tzarc/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include QMK_KEYBOARD_H - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BASE 0 -#define _FN1 1 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_60_ansi( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT , KC_SPC, KC_RALT, KC_APP, MO(_FN1), KC_RCTL - ), - - [_FN1] = LAYOUT_60_ansi( - KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, - RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, - BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_GRV, _______, _______, _______, _______, KC_RGUI, _______, _______ - ) -}; diff --git a/keyboards/40percentclub/luddite/keymaps/tzarc/rules.mk b/keyboards/40percentclub/luddite/keymaps/tzarc/rules.mk deleted file mode 100644 index 0613ea8667c0..000000000000 --- a/keyboards/40percentclub/luddite/keymaps/tzarc/rules.mk +++ /dev/null @@ -1 +0,0 @@ -BOOTLOADER = qmk-dfu From 5279571e415ef5da07551655a500911551d20efc Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 10 Feb 2020 20:58:55 +0000 Subject: [PATCH 253/331] Remove zvecr dz60 keymap (#8140) --- keyboards/dz60/keymaps/zvecr/keymap.c | 40 --------------------------- 1 file changed, 40 deletions(-) delete mode 100644 keyboards/dz60/keymaps/zvecr/keymap.c diff --git a/keyboards/dz60/keymaps/zvecr/keymap.c b/keyboards/dz60/keymaps/zvecr/keymap.c deleted file mode 100644 index 9127fa0a7e65..000000000000 --- a/keyboards/dz60/keymaps/zvecr/keymap.c +++ /dev/null @@ -1,40 +0,0 @@ -#include QMK_KEYBOARD_H - -/* -* Each layer gets a name for readability. -* The underscores don't mean anything - you can -* have a layer called STUFF or any other name. -* Layer names don't all need to be of the same -* length, and you can also skip them entirely -* and just use numbers. -* -*/ -#define BL 0 // Base Layer -#define FL 1 // Function Layer -#define ML 2 // Macro Layer - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [BL] = LAYOUT_60_ansi_split( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(FL), KC_SPC, KC_RALT, KC_RGUI, MO(ML), KC_RCTL), - - [FL] = LAYOUT_60_ansi_split( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, - _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, KC_DEL, KC_END, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - - [ML] = LAYOUT_60_ansi_split( - _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - -}; From cabe4dfa72ce0ec24e7991e90977d27e97e5a95d Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 10 Feb 2020 17:14:19 -0800 Subject: [PATCH 254/331] [Keyboard] VIA Support for Boardwalk (#8124) * initial commit of VIA Support * update PRODUCT (and MANUFACTURER) per VIA docs Reference: https://caniusevia.com/docs/configuring_qmk#change-product Updated MANUFACTURER so it matches what the PRODUCT says. * enable Link Time Optimization per mechmerlin * revert change to USB Product Name * add two empty layers to via keymap VIA keymaps need four layers in flash. * correct the layer indexes Start from 0, not 1. --- keyboards/boardwalk/config.h | 2 +- keyboards/boardwalk/keymaps/via/keymap.c | 110 ++++++++++++++++++++++ keyboards/boardwalk/keymaps/via/readme.md | 1 + keyboards/boardwalk/keymaps/via/rules.mk | 2 + 4 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 keyboards/boardwalk/keymaps/via/keymap.c create mode 100644 keyboards/boardwalk/keymaps/via/readme.md create mode 100644 keyboards/boardwalk/keymaps/via/rules.mk diff --git a/keyboards/boardwalk/config.h b/keyboards/boardwalk/config.h index fa80673d80c0..e53b76afd3a0 100644 --- a/keyboards/boardwalk/config.h +++ b/keyboards/boardwalk/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0xCDCD #define PRODUCT_ID 0x5337 #define DEVICE_VER 0x0001 -#define MANUFACTURER shens +#define MANUFACTURER shensmobile #define PRODUCT Boardwalk #define DESCRIPTION QMK keyboard firmware for Boardwalk diff --git a/keyboards/boardwalk/keymaps/via/keymap.c b/keyboards/boardwalk/keymaps/via/keymap.c new file mode 100644 index 000000000000..d5b1795b6287 --- /dev/null +++ b/keyboards/boardwalk/keymaps/via/keymap.c @@ -0,0 +1,110 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layer_names { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | SPACE | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | RCTRL | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_5x14( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL + ), + + /* Function Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_5x14( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Empty Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [2] = LAYOUT_ortho_5x14( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Empty Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [3] = LAYOUT_ortho_5x14( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardwalk/keymaps/via/readme.md b/keyboards/boardwalk/keymaps/via/readme.md new file mode 100644 index 000000000000..86a7b902f35f --- /dev/null +++ b/keyboards/boardwalk/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/via/rules.mk b/keyboards/boardwalk/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/boardwalk/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 4b7d46ced0ba6e97bc8100d91bd2466db947d7b3 Mon Sep 17 00:00:00 2001 From: a_p_u_r_o Date: Tue, 11 Feb 2020 10:22:37 +0900 Subject: [PATCH 255/331] [Keyboard] Use DIRECT_PINS instead of empty MATRIX_ROW_PINS: sixshooter (#8130) * [Keyboard] Use DIRECT_PINS instead of empty MATRIX_ROW_PINS: sixshooter * [Keyboard] Reform the matrix into 2x3: sixshooter --- keyboards/bpiphany/sixshooter/config.h | 24 +++++++--------------- keyboards/bpiphany/sixshooter/sixshooter.h | 10 +++++---- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/keyboards/bpiphany/sixshooter/config.h b/keyboards/bpiphany/sixshooter/config.h index ade95cc19188..c3ce8c88454c 100644 --- a/keyboards/bpiphany/sixshooter/config.h +++ b/keyboards/bpiphany/sixshooter/config.h @@ -11,26 +11,16 @@ #define DESCRIPTION A PCB for the CM Storm switch tester utilizing a Teensy 2.0. /* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 6 +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { } -#define MATRIX_COL_PINS { F7, F6, F1, F5, F4, F0 } +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { F7, F6, F1 }, \ + { F5, F4, F0 } \ +} #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/bpiphany/sixshooter/sixshooter.h b/keyboards/bpiphany/sixshooter/sixshooter.h index 490d562d061a..e8fc68f5c90e 100644 --- a/keyboards/bpiphany/sixshooter/sixshooter.h +++ b/keyboards/bpiphany/sixshooter/sixshooter.h @@ -4,10 +4,12 @@ #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, \ - K03, K04, K05 \ -) { \ - { K00, K01, K02, K03, K04, K05 }, \ + K00, K01, K02, \ + K03, K04, K05 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K03, K04, K05 } \ } inline void sixshooter_led_0_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } From f4c1e066ba4064bf2c20c9ced84fd11aa1c274ae Mon Sep 17 00:00:00 2001 From: dnsnrk Date: Tue, 11 Feb 2020 03:05:25 +0100 Subject: [PATCH 256/331] [Keymap] User keymap for KBDfans KBD67 MKII RGB (hot-swap) (#7697) * initial custom keymap * initial code for caps lock LED * added debounce overrides * override caps lock handler * finished up on CAPS LOCK LED customization * lowered debounce * layer lightning fx * Added layer tap-toggle * reformatting * refined keymap * copyright and more clean-up * increased DEBOUNCE * initial custom keymap * initial code for caps lock LED * added debounce overrides * override caps lock handler * finished up on CAPS LOCK LED customization * lowered debounce * layer lightning fx * Added layer tap-toggle * reformatting * refined keymap * copyright and more clean-up * increased DEBOUNCE * added readme and some more clean-up * incorporated pull request feedback --- .../kbd67/mkiirgb/keymaps/dnsnrk/config.h | 24 +++++ .../kbd67/mkiirgb/keymaps/dnsnrk/keymap.c | 95 +++++++++++++++++++ .../kbd67/mkiirgb/keymaps/dnsnrk/readme.md | 41 ++++++++ 3 files changed, 160 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/config.h create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/readme.md diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/config.h b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/config.h new file mode 100644 index 000000000000..25f645f73490 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/config.h @@ -0,0 +1,24 @@ +/* Copyright 2019 dnsnrk + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* place overrides here */ +#undef QMK_KEYS_PER_SCAN +#define QMK_KEYS_PER_SCAN 4 +#undef DEBOUNCE +#define DEBOUNCE 8 +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c new file mode 100644 index 000000000000..889a1e5f1b57 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c @@ -0,0 +1,95 @@ +/* Copyright 2019 dnsnrk + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +#define RC_ENT RCTL_T(KC_ENT) +#define LC_CPS LCTL_T(KC_CAPS) + +enum { + _LAYER0 = 0, + _LAYER1, + _LAYER2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_65_ansi_blocker( /* Base Layer */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, KC_PGUP, + LC_CPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, RC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, TT(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TT(1), KC_LEFT, KC_DOWN, KC_RIGHT), + [_LAYER1] = LAYOUT_65_ansi_blocker( /* FN, RGB Controls */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_POWER, + _______, RGB_TOG, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, + _______, RGB_RMOD, RGB_SPD, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, _______, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI), + [_LAYER2] = LAYOUT_65_ansi_blocker( /* Media, Programming */ + _______, KC_BRMD, KC_BRMU, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC__MUTE, KC_VOLD, KC_VOLU, KC_EJCT, _______, + _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +void set_hsv_at(HSV hsv, uint8_t index); + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void rgb_matrix_indicators_user(void) { + if (rgb_matrix_config.enable) { + HSV hsv = rgb_matrix_config.hsv; + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + HSV hsv_inv_hue = {hsv.h + 128, hsv.s, hsv.v}; + set_hsv_at(hsv_inv_hue, 30); + } + // indicate which higher layer is currently active on which key + HSV hsv1 = {hsv.h - 64, hsv.s, hsv.v}; + HSV hsv2 = {hsv.h + 64, hsv.s, hsv.v}; + // except when we are in any animated LED mode + if (rgb_matrix_config.mode < RGB_MATRIX_BREATHING || rgb_matrix_config.mode > RGB_MATRIX_JELLYBEAN_RAINDROPS) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + keypos_t pos = {col, row}; + uint8_t key_layer = layer_switch_get_layer(pos); + uint8_t key_led = g_led_config.matrix_co[row][col]; + if (key_led != NO_LED) { + switch(key_layer) { + case _LAYER2: + set_hsv_at(hsv2, key_led); + break; + case _LAYER1: + set_hsv_at(hsv1, key_led); + break; + default: + break; + } + } + } + } + } + // sticky layer indicators regardless of RGB mode. Hardcoded for lack of better idea. + set_hsv_at(hsv1, 63); + set_hsv_at(hsv2, 57); + } +} + +void set_hsv_at(HSV hsv, uint8_t index) { + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(index, rgb.r, rgb.g, rgb.b); +} diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/readme.md b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/readme.md new file mode 100644 index 000000000000..5554b03e5deb --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/readme.md @@ -0,0 +1,41 @@ +# dnsnrk's KDB67 MKII Layout + +* This is a three layer layout wih some consolidated functionality in the second and third layer. +* The keyboard is mostly used on macOS, but also on Linux and therefore it can swap ALT/CMD. +* There are additional CTRL keys for left and right when caps lock or enter key is held. +* Layers can be toggled (tap twice) or actived momentarily (hold). +* There are 2 seperate FN keys to activate layer 1 and 2 separately, indicated by different RGB colors. +* The main custom feature is using RGB to indicate the current active layer for each key. This is best achieved in solid color RGB modes. + +## Layer 0 + +This is the base QUERTY layer. + +* Grave is provided in the top right corner. +* Caps lock is tapped once on and off and indicated by hue inverted LED when on. +* Caps lock and enter become CTRL when held. +* Primary Fn in the last row activates layer 1, indicated by hue shifted LED color. +* Secondary Fn right to the up arrow key activates layer 2, indicated by 2nd hue shifted LED color. +* Toggle layers by tapping Fn twice or switch on by holding Fn. + +## Layer 1 + +This layer activates function keys and provides RGB controls. Keys acting on this layer are indicated by an LED color matching the current Fn key's LED color. + +* Number keys become equivalent function keys. +* ESC becomes Grave. +* Grave becomes POWER (very useful on macOS only). +* Q toggles RGB. +* WASD for navigating through RGB modes and adjusting speed. +* <> control RGB saturation. +* Arrow keys shift hue and adjust brightness. +* PgUp, PgDown become HOME and END respectively. +* Backspace acts as delete, pipe as insert. + +## Layer 2 + +This layer comprises most macOS media keys at the top row and some additional programming options. Keys acting on this layer are indicated by an LED color matching the current Fn key's LED color. + +* N, M swap ALT/CMD for (N)ormal or (M)acOS. +* E resets (E)EPROM. +* R (R)esets keyboard. From 1fed214490e00e83b958a239c7cb97e98eec763b Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Mon, 10 Feb 2020 21:11:09 -0600 Subject: [PATCH 257/331] Tweak my TAPPING_TERM and be more futureproof (#8143) * Explicitly undef things I override in keymaps * Reduce TAPPING_TERM back to default --- keyboards/crkbd/keymaps/bcat/config.h | 1 + keyboards/keebio/quefrency/keymaps/bcat/config.h | 1 + users/bcat/config.h | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/keyboards/crkbd/keymaps/bcat/config.h b/keyboards/crkbd/keymaps/bcat/config.h index fd5fce542120..65e7a8052383 100644 --- a/keyboards/crkbd/keymaps/bcat/config.h +++ b/keyboards/crkbd/keymaps/bcat/config.h @@ -3,4 +3,5 @@ #define EE_HANDS /* Limit max RGB LED current to avoid tripping controller fuse. */ +#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 diff --git a/keyboards/keebio/quefrency/keymaps/bcat/config.h b/keyboards/keebio/quefrency/keymaps/bcat/config.h index 071856f10b2c..34387f2dd044 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/config.h +++ b/keyboards/keebio/quefrency/keymaps/bcat/config.h @@ -13,4 +13,5 @@ #define RGBLED_NUM 17 /* Set up RGB lighting so it works with either side as master. */ +#undef RGBLED_SPLIT #define RGBLED_SPLIT { 8, 9 } diff --git a/users/bcat/config.h b/users/bcat/config.h index 6b132a429cd7..da74cb0a0b1f 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -3,10 +3,13 @@ #define TAP_CODE_DELAY 20 -/* Extend default tap timeout because I'm too slow. :) */ +/* + * Force the default tapping term since some keyboards make it way too short + * (*cough*Lily58*cough*). + */ #undef TAPPING_TERM -#define TAPPING_TERM 250 +#define TAPPING_TERM 200 /* * Treat mod-tap keys as holds even if the mod-tap key and the key being From 310b2f1be43a9faa8599f143b459ae43e55393a4 Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Tue, 11 Feb 2020 10:37:15 +0100 Subject: [PATCH 258/331] use replace() over rename() to have cross-platform overwriting (#8148) --- lib/python/milc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/milc.py b/lib/python/milc.py index 36072ca76415..949bb0252a6a 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -571,7 +571,7 @@ def save_config(self): # Move the new config file into place atomically if os.path.getsize(tmpfile.name) > 0: - os.rename(tmpfile.name, str(self.config_file)) + os.replace(tmpfile.name, str(self.config_file)) else: self.log.warning('Config file saving failed, not replacing %s with %s.', str(self.config_file), tmpfile.name) From fba99715551e2f106f550dd49984cd38cd8c73f4 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 11 Feb 2020 14:59:58 +0000 Subject: [PATCH 259/331] Align max backlight level in docs (#8142) --- docs/config_options.md | 2 +- docs/ja/config_options.md | 2 +- ...porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index be328405e029..5344fe851f45 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -78,7 +78,7 @@ This is a C header file that is one of the first things included, and will persi * `#define BACKLIGHT_PIN B7` * pin of the backlight * `#define BACKLIGHT_LEVELS 3` - * number of levels your backlight will have (maximum 15 excluding off) + * number of levels your backlight will have (maximum 31 excluding off) * `#define BACKLIGHT_BREATHING` * enables backlight breathing * `#define BREATHING_PERIOD 6` diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index a1d74543818c..ca6ea5479fad 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -83,7 +83,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * `#define BACKLIGHT_PIN B7` * バックライトのピン * `#define BACKLIGHT_LEVELS 3` - * バックライトのレベル数 (off を除いて最大15) + * バックライトのレベル数 (off を除いて最大31) * `#define BACKLIGHT_BREATHING` * バックライトのブレスを有効にします * `#define BREATHING_PERIOD 6` diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md index bce9f9dc9bca..22d3de852567 100644 --- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md +++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md @@ -38,7 +38,7 @@ To configure a keyboard where each switch is connected to a separate pin and gro `BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap. -`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number. +`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 31, and they are computed automatically from this number. ## `/keyboards//Makefile` From a624c439a436c7cdcedbdbe50db4c26da117251f Mon Sep 17 00:00:00 2001 From: a_p_u_r_o Date: Wed, 12 Feb 2020 00:02:18 +0900 Subject: [PATCH 260/331] [Keyboard] Fixed inconsistent MATRIX_ROWS and MATRIX_COLS: wsk/gothic50 (#8150) --- keyboards/wsk/gothic50/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/wsk/gothic50/config.h b/keyboards/wsk/gothic50/config.h index 5eb4b30f2e93..af5b473e2532 100644 --- a/keyboards/wsk/gothic50/config.h +++ b/keyboards/wsk/gothic50/config.h @@ -11,8 +11,8 @@ #define DESCRIPTION Expanded Ergo Keyboard /* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 /* key matrix pins */ From 387c486e570cc94d6798a8f326dcfe7fdeb7891f Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Tue, 11 Feb 2020 11:47:16 -0600 Subject: [PATCH 261/331] Rename Polaris Tsangan layout to 60_tsangan_hhkb and enable community layout support (#8144) * Rename Polaris Tsangan layout to 60_tsangan_hhkb --- keyboards/ai03/polaris/info.json | 2 +- keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c | 4 ++-- keyboards/ai03/polaris/polaris.h | 2 +- keyboards/ai03/polaris/rules.mk | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/keyboards/ai03/polaris/info.json b/keyboards/ai03/polaris/info.json index f40e7bec77d6..59a24e2e5999 100644 --- a/keyboards/ai03/polaris/info.json +++ b/keyboards/ai03/polaris/info.json @@ -75,7 +75,7 @@ {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} ] }, - "LAYOUT_60_ansi_tsangan_split_rshift": { + "LAYOUT_60_tsangan_hhkb": { "layout": [ {"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, diff --git a/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c b/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c index 3ccaa28fe3bc..410f9b379f7e 100644 --- a/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c +++ b/keyboards/ai03/polaris/keymaps/default_ansi_tsangan/keymap.c @@ -21,14 +21,14 @@ enum layer_names { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_60_ansi_tsangan_split_rshift( /* Base */ + [_BASE] = LAYOUT_60_tsangan_hhkb( /* Base */ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), - [_FN] = LAYOUT_60_ansi_tsangan_split_rshift( /* FN */ + [_FN] = LAYOUT_60_tsangan_hhkb( /* FN */ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_BSPC, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, BL_STEP, _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, diff --git a/keyboards/ai03/polaris/polaris.h b/keyboards/ai03/polaris/polaris.h index 306f446765e7..2bd65806ff3c 100644 --- a/keyboards/ai03/polaris/polaris.h +++ b/keyboards/ai03/polaris/polaris.h @@ -40,7 +40,7 @@ { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 } \ } -#define LAYOUT_60_ansi_tsangan_split_rshift( \ +#define LAYOUT_60_tsangan_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ diff --git a/keyboards/ai03/polaris/rules.mk b/keyboards/ai03/polaris/rules.mk index 547bb88c7417..150199cbe062 100644 --- a/keyboards/ai03/polaris/rules.mk +++ b/keyboards/ai03/polaris/rules.mk @@ -30,3 +30,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = 60_tsangan_hhkb From 6a165c41cb6e861efdcb737db966c4e4a0c72599 Mon Sep 17 00:00:00 2001 From: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Wed, 12 Feb 2020 02:05:23 +0800 Subject: [PATCH 262/331] [Docs] doc update zh-cn (#8147) * update zh-cn translate Timestamp was added at the end of the document, it can help me manage version easier. * fix _summary.md to utf-8 * fix _summary.md with vscode --- docs/zh-cn/_summary.md | 54 +++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md index 033fecde42be..2f473305ae76 100644 --- a/docs/zh-cn/_summary.md +++ b/docs/zh-cn/_summary.md @@ -3,30 +3,41 @@ * [构建你的第一个固件](zh-cn/newbs_building_firmware.md) * [刷新固件](zh-cn/newbs_flashing.md) * [测试和调试](zh-cn/newbs_testing_debugging.md) - * [Git最佳实践](zh-cn/newbs_best_practices.md) + * [Git最佳实践](zh-cn/newbs_git_best_practices.md) + * [使用你分叉(fork)的主分支(master)](zh-cn/newbs_git_using_your_master_branch.md) + * [解决合并冲突](zh-cn/newbs_git_resolving_merge_conflicts.md) + * [重新同步一个分支](zh-cn/newbs_git_resynchronize_a_branch.md) * [学习资源](zh-cn/newbs_learn_more_resources.md) * [QMK基础](zh-cn/README.md) * [QMK简介](zh-cn/getting_started_introduction.md) - * [向QMK贡献](zh-cn/contributing.md) + * [QMK命令行工具](zh-cn/cli.md) + * [QMK命令行工具配置](zh-cn/cli_configuration.md) + * [向QMK贡献代码](zh-cn/contributing.md) * [如何使用Github](zh-cn/getting_started_github.md) * [获得帮助](zh-cn/getting_started_getting_help.md) -* [问题解答](zh-cn/faq.md) +* [非兼容性修改](zh-cn/breaking_changes.md) + * [我的PR已经被标记为非兼容性修改](zh-cn/breaking_changes_instructions.md) + * [2019年8月30日](zh-cn/ChangeLog/20190830.md) + +* [问题与解答](zh-cn/faq.md) * [一般问题](zh-cn/faq_general.md) * [构建/编译](zh-cn/faq_build.md) * [调试/故障排除](zh-cn/faq_debug.md) - * [键盘映射](zh-cn/faq_keymap.md) + * [布局](zh-cn/faq_keymap.md) + * [Zadig驱动安装](zh-cn/driver_installation_zadig.md) * 详细指南 * [安装构建工具](zh-cn/getting_started_build_tools.md) * [vagrant指南](zh-cn/getting_started_vagrant.md) - * [构建/编译指令](zh-cn/getting_started_make_guide.md) + * [构建/编译指南](zh-cn/getting_started_make_guide.md) * [刷新固件](zh-cn/flashing.md) * [定制功能](zh-cn/custom_quantum_functions.md) - * [映射概述](zh-cn/keymap.md) + * [布局概述](zh-cn/keymap.md) * [硬件](zh-cn/hardware.md) + * [兼容的单片机](zh-cn/compatible_microcontrollers.md) * [AVR处理器](zh-cn/hardware_avr.md) * [驱动](zh-cn/hardware_drivers.md) @@ -34,13 +45,16 @@ * [键盘指南](zh-cn/hardware_keyboard_guidelines.md) * [配置选项](zh-cn/config_options.md) * [键码](zh-cn/keycodes.md) - * [记录最佳实践](zh-cn/documentation_best_practices.md) + * [代码书写规范 - C](zh-cn/coding_conventions_c.md) + * [代码书写规范 - Python](zh-cn/coding_conventions_python.md) + * [文档书写规范](zh-cn/documentation_best_practices.md) * [文档模板](zh-cn/documentation_templates.md) * [术语表](zh-cn/reference_glossary.md) * [单元测试](zh-cn/unit_testing.md) - * [有用的功能](zh-cn/ref_functions.md) + * [实用函数](zh-cn/ref_functions.md) * [配置器支持](zh-cn/reference_configurator_support.md) * [info.json 格式](zh-cn/reference_info_json.md) + * [Python 命令行开发](zh-cn/cli_development.md) * [特性](zh-cn/features.md) * [基本键码](zh-cn/keycodes_basic.md) @@ -54,22 +68,27 @@ * [热改键](zh-cn/feature_bootmagic.md) * [组合](zh-cn/feature_combo) * [命令](zh-cn/feature_command.md) + * [消抖 API](zh-cn/feature_debounce_type.md) * [拨动开关](zh-cn/feature_dip_switch.md) * [动态宏指令](zh-cn/feature_dynamic_macros.md) * [编码器](zh-cn/feature_encoders.md) * [重音号Esc复合键](zh-cn/feature_grave_esc.md) + * [触摸反馈](zh-cn/feature_haptic_feedback.md) + * [HD44780 LCD控制器](zh-cn/feature_hd44780.md) * [自锁键](zh-cn/feature_key_lock.md) * [布局](zh-cn/feature_layouts.md) * [前导键](zh-cn/feature_leader_key.md) * [LED阵列](zh-cn/feature_led_matrix.md) * [宏指令](zh-cn/feature_macros.md) * [鼠标键](zh-cn/feature_mouse_keys.md) + * [OLED驱动](zh-cn/feature_oled_driver.md) * [一键功能](zh-cn/feature_advanced_keycodes.md#one-shot-keys) * [指针设备](zh-cn/feature_pointing_device.md) * [PS/2鼠标](zh-cn/feature_ps2_mouse.md) * [RGB灯光](zh-cn/feature_rgblight.md) * [RGB矩阵](zh-cn/feature_rgb_matrix.md) * [空格候补换挡](zh-cn/feature_space_cadet.md) + * [分体键盘](zh-cn/feature_split_keyboard.md) * [速录机](zh-cn/feature_stenography.md) * [换手](zh-cn/feature_swap_hands.md) * [多击键](zh-cn/feature_tap_dance.md) @@ -79,28 +98,35 @@ * [用户空间](zh-cn/feature_userspace.md) * [速度键](zh-cn/feature_velocikey.md) -* 针对制造者和定制者 +* 制造和定制者指南 * [手工连线指南](zh-cn/hand_wire.md) * [ISP刷新指南](zh-cn/isp_flashing_guide.md) * [ARM调试指南](zh-cn/arm_debugging.md) - * [I2C驱动](zh-cn/i2c_driver.md) - * [GPIO控制器](zh-cn/internals_gpio_control.md) + * [ADC设备](zh-cn/adc_driver.md) + * [I2C设备](zh-cn/i2c_driver.md) + * [WS2812设备](zh-cn/ws2812_driver.md) + * [EEPROM设备](zh-cn/eeprom_driver.md) + * [GPIO控制](zh-cn/internals_gpio_control.md) + * [自定义键盘矩阵](zh-cn/custom_matrix.md) * [Proton C转换](zh-cn/proton_c_conversion.md) * 深入了解 - * [键盘如何工作](zh-cn/how_keyboards_work.md) - * [理解QMK](zh-cn/understanding_qmk.md) + * [键盘工作原理](zh-cn/how_keyboards_work.md) + * [深入了解QMK](zh-cn/understanding_qmk.md) * 其他话题 * [使用Eclipse开发QMK](zh-cn/other_eclipse.md) * [使用VSCode开发QMK](zh-cn/other_vscode.md) * [支持](zh-cn/support.md) + * [翻译QMK文档](zh-cn/translating.md) * QMK 内构 (正在编写) * [定义](zh-cn/internals_defines.md) * [输入回调寄存器](zh-cn/internals_input_callback_reg.md) * [Midi设备](zh-cn/internals_midi_device.md) - * [Midi设备设置过程](zh-cn/internals_midi_device_setup_process.md) + * [Midi设备配置过程](zh-cn/internals_midi_device_setup_process.md) * [Midi工具库](zh-cn/internals_midi_util.md) * [发送函数](zh-cn/internals_send_functions.md) * [Sysex工具](zh-cn/internals_sysex_tools.md) + + \ No newline at end of file From c53d4ecf3250aacdd226e8cd7d45f7af9788873a Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 11 Feb 2020 10:07:06 -0800 Subject: [PATCH 263/331] VIA Support: Duck Eagle V2 (#8133) * add via keymap * Update keyboards/duck/eagle_viper/v2/keymaps/via/keymap.c --- .../duck/eagle_viper/v2/keymaps/via/keymap.c | 51 +++++++++++++++++++ .../duck/eagle_viper/v2/keymaps/via/readme.md | 10 ++++ .../duck/eagle_viper/v2/keymaps/via/rules.mk | 2 + 3 files changed, 63 insertions(+) create mode 100644 keyboards/duck/eagle_viper/v2/keymaps/via/keymap.c create mode 100644 keyboards/duck/eagle_viper/v2/keymaps/via/readme.md create mode 100644 keyboards/duck/eagle_viper/v2/keymaps/via/rules.mk diff --git a/keyboards/duck/eagle_viper/v2/keymaps/via/keymap.c b/keyboards/duck/eagle_viper/v2/keymaps/via/keymap.c new file mode 100644 index 000000000000..61981459824c --- /dev/null +++ b/keyboards/duck/eagle_viper/v2/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_all(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL \ + ), + + [1] = LAYOUT_all(\ + _______, RGB_TOG, RGB_MOD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [2] = LAYOUT_all(\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [3] = LAYOUT_all(\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ) +}; diff --git a/keyboards/duck/eagle_viper/v2/keymaps/via/readme.md b/keyboards/duck/eagle_viper/v2/keymaps/via/readme.md new file mode 100644 index 000000000000..834ff7cd3a67 --- /dev/null +++ b/keyboards/duck/eagle_viper/v2/keymaps/via/readme.md @@ -0,0 +1,10 @@ +# Default Eagle Layout + +This is the default implement layout for Duck Eagle V2. + +![Duck Eagle V2 Default Layout](https://imgur.com/mWBY3Dc.png) + + +## Features + +* Default QWERTY layer diff --git a/keyboards/duck/eagle_viper/v2/keymaps/via/rules.mk b/keyboards/duck/eagle_viper/v2/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/duck/eagle_viper/v2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 78e060f55adef8de358ba4bf7f5d5854a70dd421 Mon Sep 17 00:00:00 2001 From: IFo Hancroft Date: Tue, 11 Feb 2020 22:44:09 +0200 Subject: [PATCH 264/331] VIA Support for the Idobo (ID75) (#8146) * VIA Support for the Idobo (ID75) * Implemented the requested PR changes * Readme was pointing to the wrong board * Fixed Product ID * Fixed Manufacturer name * Better Vendor ID Using the two 8-bit ASCII values from the keyboard name. * Removed Bootmagic Lite as enabled anyway by VIA --- keyboards/idobo/config.h | 8 ++--- keyboards/idobo/keymaps/via/keymap.c | 52 ++++++++++++++++++++++++++++ keyboards/idobo/keymaps/via/rules.mk | 1 + keyboards/idobo/readme.md | 2 +- 4 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 keyboards/idobo/keymaps/via/keymap.c create mode 100644 keyboards/idobo/keymaps/via/rules.mk diff --git a/keyboards/idobo/config.h b/keyboards/idobo/config.h index e1c08afae160..d764512dc749 100644 --- a/keyboards/idobo/config.h +++ b/keyboards/idobo/config.h @@ -20,11 +20,11 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x6964 // ID +#define PRODUCT_ID 0x0075 #define DEVICE_VER 0x0001 -#define MANUFACTURER You -#define PRODUCT idobo +#define MANUFACTURER Generic +#define PRODUCT Idobo #define DESCRIPTION A custom keyboard /* key matrix size */ diff --git a/keyboards/idobo/keymaps/via/keymap.c b/keyboards/idobo/keymaps/via/keymap.c new file mode 100644 index 000000000000..de7581ea039b --- /dev/null +++ b/keyboards/idobo/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 IFo Hancroft + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_5x15( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ortho_5x15( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ortho_5x15( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_ortho_5x15( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/idobo/keymaps/via/rules.mk b/keyboards/idobo/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/idobo/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/idobo/readme.md b/keyboards/idobo/readme.md index 7f2c684464a3..254616decb86 100644 --- a/keyboards/idobo/readme.md +++ b/keyboards/idobo/readme.md @@ -8,7 +8,7 @@ Firmware here originally appeared on qmkeyboard.cn Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Hardware Supported: IDOBO PCB -Hardware Availability: [IDOBO on Massdrop](https://www.massdrop.com/buy/xd75-aluminum-mechanical-keyboard) +Hardware Availability: [IDOBO on Drop](https://drop.com/buy/id75-hot-swappable-ortholinear-keyboard-kit) Make example for this keyboard (after setting up your build environment): From 9456832a3bba4dd766a26a6286e78d3e88e4efce Mon Sep 17 00:00:00 2001 From: Ted M Lin Date: Tue, 11 Feb 2020 16:38:20 -0500 Subject: [PATCH 265/331] Fix out of bound OLED font access (#8145) * Fix out of bound OLED font access The default font is 1344 bytes, or a total of 224 glyphs (each 6-bytes wide). OLED_FONT_END defaults to 224, which if used will then index off the end of the font array. So either the documentation or code is wrong. Instead of figuring out the rewording of the documentation, just change the OLED_FONT_END default value to 223, to match the documentation and code. * Add static assert to check array size Build bomb if the font array size doesn't match to the defines. --- docs/feature_oled_driver.md | 2 +- drivers/oled/oled_driver.c | 4 +++- drivers/oled/oled_driver.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 29548cb8204d..ebabc314ffec 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -104,7 +104,7 @@ void oled_task_user(void) { |`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | |`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | |`OLED_FONT_START` |`0` |The starting characer index for custom fonts | -|`OLED_FONT_END` |`224` |The ending characer index for custom fonts | +|`OLED_FONT_END` |`223` |The ending characer index for custom fonts | |`OLED_FONT_WIDTH` |`6` |The font width | |`OLED_FONT_HEIGHT` |`8` |The font height (untested) | |`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index f20f4629aafa..e541228ea92d 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -392,6 +392,8 @@ void oled_write_char(const char data, bool invert) { static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); + _Static_assert(sizeof(font) >= ((OLED_FONT_END + 1 - OLED_FONT_START) * OLED_FONT_WIDTH), "OLED_FONT_END references outside array"); + // set the reder buffer data uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) { @@ -585,4 +587,4 @@ void oled_task(void) { #endif } -__attribute__((weak)) void oled_task_user(void) {} \ No newline at end of file +__attribute__((weak)) void oled_task_user(void) {} diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index f490f367ae32..e8a7188577dc 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -131,7 +131,7 @@ along with this program. If not, see . #endif // unsigned char value of the last character in the font file #if !defined(OLED_FONT_END) -# define OLED_FONT_END 224 +# define OLED_FONT_END 223 #endif // Font render width #if !defined(OLED_FONT_WIDTH) @@ -260,4 +260,4 @@ bool oled_scroll_off(void); uint8_t oled_max_chars(void); // Returns the maximum number of lines that will fit on the oled -uint8_t oled_max_lines(void); \ No newline at end of file +uint8_t oled_max_lines(void); From 177666cbc8d6f9859773f8fc0232ba4b3a1f9a97 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Wed, 12 Feb 2020 04:33:05 +0000 Subject: [PATCH 266/331] VIA support for Graystudio Space65 (#8126) * VIA support for Graystudio Space65 * Update Space65 PRODUCT and remove VIA JSON def --- keyboards/gray_studio/space65/config.h | 8 ++-- .../gray_studio/space65/keymaps/via/keymap.c | 47 +++++++++++++++++++ .../gray_studio/space65/keymaps/via/rules.mk | 2 + 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 keyboards/gray_studio/space65/keymaps/via/keymap.c create mode 100644 keyboards/gray_studio/space65/keymaps/via/rules.mk diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 979cb0a604eb..0485afca40cb 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4753 +#define PRODUCT_ID 0x3000 #define DEVICE_VER 0x0001 -#define MANUFACTURER Gray Studio +#define MANUFACTURER Graystudio #define PRODUCT Space65 -#define DESCRIPTION 65% custom keyboard +#define DESCRIPTION Graystudio Space65 /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/gray_studio/space65/keymaps/via/keymap.c b/keyboards/gray_studio/space65/keymaps/via/keymap.c new file mode 100644 index 000000000000..e621685e1a90 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 Rys Sommefeldt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/gray_studio/space65/keymaps/via/rules.mk b/keyboards/gray_studio/space65/keymaps/via/rules.mk new file mode 100644 index 000000000000..96d2d189b2e6 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no From f318d6fffcda102b9063effb5403598d4bbf1213 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Wed, 12 Feb 2020 04:33:29 +0000 Subject: [PATCH 267/331] VIA support for the Think6.5 (#8118) * VIA support for Think6.5 * VIA support for Think6.5 Hotswap * VIA works better with separate layout options * Remove the colours used to help develop it in KLE * Pay better attention to the JSON linter * Update Think6.5 PRODUCT and remove VIA JSON defs --- .../gray_studio/think65/hotswap/config.h | 12 ++--- .../think65/hotswap/keymaps/via/keymap.c | 47 +++++++++++++++++++ .../think65/hotswap/keymaps/via/rules.mk | 2 + keyboards/gray_studio/think65/solder/config.h | 12 ++--- .../think65/solder/keymaps/via/keymap.c | 47 +++++++++++++++++++ .../think65/solder/keymaps/via/rules.mk | 2 + 6 files changed, 110 insertions(+), 12 deletions(-) create mode 100644 keyboards/gray_studio/think65/hotswap/keymaps/via/keymap.c create mode 100644 keyboards/gray_studio/think65/hotswap/keymaps/via/rules.mk create mode 100644 keyboards/gray_studio/think65/solder/keymaps/via/keymap.c create mode 100644 keyboards/gray_studio/think65/solder/keymaps/via/rules.mk diff --git a/keyboards/gray_studio/think65/hotswap/config.h b/keyboards/gray_studio/think65/hotswap/config.h index fc1734146da8..05a818a7310c 100644 --- a/keyboards/gray_studio/think65/hotswap/config.h +++ b/keyboards/gray_studio/think65/hotswap/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4753 +#define PRODUCT_ID 0x4001 #define DEVICE_VER 0x0001 -#define MANUFACTURER Gray Studio -#define PRODUCT THINK6.5 -#define DESCRIPTION 65% 6.5 degree custom keyboard +#define MANUFACTURER Graystudio +#define PRODUCT Think6.5° Hotswap +#define DESCRIPTION Graystudio Think6.5 Hotswap /* key matrix size */ #define MATRIX_ROWS 5 @@ -69,4 +69,4 @@ along with this program. If not, see . #endif // generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/via/keymap.c b/keyboards/gray_studio/think65/hotswap/keymaps/via/keymap.c new file mode 100644 index 000000000000..5079ca5551d3 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 Rys Sommefeldt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/via/rules.mk b/keyboards/gray_studio/think65/hotswap/keymaps/via/rules.mk new file mode 100644 index 000000000000..96d2d189b2e6 --- /dev/null +++ b/keyboards/gray_studio/think65/hotswap/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no diff --git a/keyboards/gray_studio/think65/solder/config.h b/keyboards/gray_studio/think65/solder/config.h index cc8892a1167c..f75635402bc2 100644 --- a/keyboards/gray_studio/think65/solder/config.h +++ b/keyboards/gray_studio/think65/solder/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4753 +#define PRODUCT_ID 0x4000 #define DEVICE_VER 0x0001 -#define MANUFACTURER Gray Studio -#define PRODUCT THINK6.5 -#define DESCRIPTION 65% 6.5 degree custom keyboard +#define MANUFACTURER Graystudio +#define PRODUCT Think6.5° +#define DESCRIPTION Graystudio Think6.5 /* key matrix size */ #define MATRIX_ROWS 5 @@ -70,4 +70,4 @@ along with this program. If not, see . #endif // generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/gray_studio/think65/solder/keymaps/via/keymap.c b/keyboards/gray_studio/think65/solder/keymaps/via/keymap.c new file mode 100644 index 000000000000..0dbe44c8725a --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 Rys Sommefeldt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/gray_studio/think65/solder/keymaps/via/rules.mk b/keyboards/gray_studio/think65/solder/keymaps/via/rules.mk new file mode 100644 index 000000000000..96d2d189b2e6 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no From eaf32621aa0c067b2cab203e5e8e58c7c07a4ff4 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 12 Feb 2020 17:19:39 +1100 Subject: [PATCH 268/331] Align VUSB HID descriptors with LUFA/ChibiOS (#7675) * Align VUSB HID descriptors with LUFA/ChibiOS * Wrap send_system and send_consumer in ifdefs too * Offset system usages to match LUFA/ChibiOS --- tmk_core/protocol/vusb/vusb.c | 247 +++++++++++++++++----------------- 1 file changed, 127 insertions(+), 120 deletions(-) diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 110b3069bddf..7c1f4ca7f0d5 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -112,6 +112,7 @@ static void send_mouse(report_mouse_t *report) { } } +#ifdef EXTRAKEY_ENABLE static void send_extra(uint8_t report_id, uint16_t data) { static uint8_t last_id = 0; static uint16_t last_data = 0; @@ -124,10 +125,19 @@ static void send_extra(uint8_t report_id, uint16_t data) { usbSetInterrupt3((void *)&report, sizeof(report)); } } +#endif -static void send_system(uint16_t data) { send_extra(REPORT_ID_SYSTEM, data); } +static void send_system(uint16_t data) { +#ifdef EXTRAKEY_ENABLE + send_extra(REPORT_ID_SYSTEM, data - SYSTEM_POWER_DOWN + 1); +#endif +} -static void send_consumer(uint16_t data) { send_extra(REPORT_ID_CONSUMER, data); } +static void send_consumer(uint16_t data) { +#ifdef EXTRAKEY_ENABLE + send_extra(REPORT_ID_CONSUMER, data); +#endif +} /*------------------------------------------------------------------* * Request from host * @@ -200,128 +210,125 @@ uchar usbFunctionWrite(uchar *data, uchar len) { * Descriptors * *------------------------------------------------------------------*/ -/* - * Report Descriptor for keyboard - * - * from an example in HID spec appendix - */ const PROGMEM uchar keyboard_hid_report[] = { - 0x05, 0x01, // Usage Page (Generic Desktop), - 0x09, 0x06, // Usage (Keyboard), - 0xA1, 0x01, // Collection (Application), - 0x75, 0x01, // Report Size (1), - 0x95, 0x08, // Report Count (8), - 0x05, 0x07, // Usage Page (Key Codes), - 0x19, 0xE0, // Usage Minimum (224), - 0x29, 0xE7, // Usage Maximum (231), - 0x15, 0x00, // Logical Minimum (0), - 0x25, 0x01, // Logical Maximum (1), - 0x81, 0x02, // Input (Data, Variable, Absolute), ;Modifier byte - 0x95, 0x01, // Report Count (1), - 0x75, 0x08, // Report Size (8), - 0x81, 0x03, // Input (Constant), ;Reserved byte - 0x95, 0x05, // Report Count (5), - 0x75, 0x01, // Report Size (1), - 0x05, 0x08, // Usage Page (LEDs), - 0x19, 0x01, // Usage Minimum (1), - 0x29, 0x05, // Usage Maximum (5), - 0x91, 0x02, // Output (Data, Variable, Absolute), ;LED report - 0x95, 0x01, // Report Count (1), - 0x75, 0x03, // Report Size (3), - 0x91, 0x03, // Output (Constant), ;LED report padding - 0x95, 0x06, // Report Count (6), - 0x75, 0x08, // Report Size (8), - 0x15, 0x00, // Logical Minimum (0), - 0x26, 0xFF, 0x00, // Logical Maximum(255), - 0x05, 0x07, // Usage Page (Key Codes), - 0x19, 0x00, // Usage Minimum (0), - 0x29, 0xFF, // Usage Maximum (255), - 0x81, 0x00, // Input (Data, Array), - 0xc0 // End Collection + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x06, // Usage (Keyboard) + 0xA1, 0x01, // Collection (Application) + // Modifiers (8 bits) + 0x05, 0x07, // Usage Page (Keyboard/Keypad) + 0x19, 0xE0, // Usage Minimum (Keyboard Left Control) + 0x29, 0xE7, // Usage Maximum (Keyboard Right GUI) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0x08, // Report Count (8) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Reserved (1 byte) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x03, // Input (Constant) + // Keycodes (6 bytes) + 0x05, 0x07, // Usage Page (Keyboard/Keypad) + 0x19, 0x00, // Usage Minimum (0) + 0x29, 0xFF, // Usage Maximum (255) + 0x15, 0x00, // Logical Minimum (0) + 0x26, 0xFF, 0x00, // Logical Maximum (255) + 0x95, 0x06, // Report Count (6) + 0x75, 0x08, // Report Size (8) + 0x81, 0x00, // Input (Data, Array, Absolute) + + // Status LEDs (5 bits) + 0x05, 0x08, // Usage Page (LED) + 0x19, 0x01, // Usage Minimum (Num Lock) + 0x29, 0x05, // Usage Maximum (Kana) + 0x95, 0x05, // Report Count (5) + 0x75, 0x01, // Report Size (1) + 0x91, 0x02, // Output (Data, Variable, Absolute) + // LED padding (3 bits) + 0x95, 0x01, // Report Count (1) + 0x75, 0x03, // Report Size (3) + 0x91, 0x03, // Output (Constant) + 0xC0 // End Collection }; -/* - * Report Descriptor for mouse - * - * Mouse Protocol 1, HID 1.11 spec, Appendix B, page 59-60, with wheel extension - * http://www.microchip.com/forums/tm.aspx?high=&m=391435&mpage=1#391521 - * http://www.keil.com/forum/15671/ - * http://www.microsoft.com/whdc/device/input/wheel.mspx - */ const PROGMEM uchar mouse_hid_report[] = { - /* mouse */ - 0x05, 0x01, // USAGE_PAGE (Generic Desktop) - 0x09, 0x02, // USAGE (Mouse) - 0xa1, 0x01, // COLLECTION (Application) - 0x85, REPORT_ID_MOUSE, // REPORT_ID (1) - 0x09, 0x01, // USAGE (Pointer) - 0xa1, 0x00, // COLLECTION (Physical) - // ---------------------------- Buttons - 0x05, 0x09, // USAGE_PAGE (Button) - 0x19, 0x01, // USAGE_MINIMUM (Button 1) - 0x29, 0x05, // USAGE_MAXIMUM (Button 5) - 0x15, 0x00, // LOGICAL_MINIMUM (0) - 0x25, 0x01, // LOGICAL_MAXIMUM (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x95, 0x05, // REPORT_COUNT (5) - 0x81, 0x02, // INPUT (Data,Var,Abs) - 0x75, 0x03, // REPORT_SIZE (3) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x03, // INPUT (Cnst,Var,Abs) - // ---------------------------- X,Y position - 0x05, 0x01, // USAGE_PAGE (Generic Desktop) - 0x09, 0x30, // USAGE (X) - 0x09, 0x31, // USAGE (Y) - 0x15, 0x81, // LOGICAL_MINIMUM (-127) - 0x25, 0x7f, // LOGICAL_MAXIMUM (127) - 0x75, 0x08, // REPORT_SIZE (8) - 0x95, 0x02, // REPORT_COUNT (2) - 0x81, 0x06, // INPUT (Data,Var,Rel) - // ---------------------------- Vertical wheel - 0x09, 0x38, // USAGE (Wheel) - 0x15, 0x81, // LOGICAL_MINIMUM (-127) - 0x25, 0x7f, // LOGICAL_MAXIMUM (127) - 0x35, 0x00, // PHYSICAL_MINIMUM (0) - reset physical - 0x45, 0x00, // PHYSICAL_MAXIMUM (0) - 0x75, 0x08, // REPORT_SIZE (8) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x06, // INPUT (Data,Var,Rel) - // ---------------------------- Horizontal wheel - 0x05, 0x0c, // USAGE_PAGE (Consumer Devices) - 0x0a, 0x38, 0x02, // USAGE (AC Pan) - 0x15, 0x81, // LOGICAL_MINIMUM (-127) - 0x25, 0x7f, // LOGICAL_MAXIMUM (127) - 0x75, 0x08, // REPORT_SIZE (8) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x06, // INPUT (Data,Var,Rel) - 0xc0, // END_COLLECTION - 0xc0, // END_COLLECTION - /* system control */ - 0x05, 0x01, // USAGE_PAGE (Generic Desktop) - 0x09, 0x80, // USAGE (System Control) - 0xa1, 0x01, // COLLECTION (Application) - 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) - 0x15, 0x01, // LOGICAL_MINIMUM (0x1) - 0x26, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) - 0x19, 0x01, // USAGE_MINIMUM (0x1) - 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) - 0x75, 0x10, // REPORT_SIZE (16) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x00, // INPUT (Data,Array,Abs) - 0xc0, // END_COLLECTION - /* consumer */ - 0x05, 0x0c, // USAGE_PAGE (Consumer Devices) - 0x09, 0x01, // USAGE (Consumer Control) - 0xa1, 0x01, // COLLECTION (Application) - 0x85, REPORT_ID_CONSUMER, // REPORT_ID (3) - 0x15, 0x01, // LOGICAL_MINIMUM (0x1) - 0x26, 0x9c, 0x02, // LOGICAL_MAXIMUM (0x29c) - 0x19, 0x01, // USAGE_MINIMUM (0x1) - 0x2a, 0x9c, 0x02, // USAGE_MAXIMUM (0x29c) - 0x75, 0x10, // REPORT_SIZE (16) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x00, // INPUT (Data,Array,Abs) - 0xc0, // END_COLLECTION + // Mouse report descriptor + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x02, // Usage (Mouse) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_MOUSE, // Report ID + 0x09, 0x01, // Usage (Pointer) + 0xA1, 0x00, // Collection (Physical) + // Buttons (5 bits) + 0x05, 0x09, // Usage Page (Button) + 0x19, 0x01, // Usage Minimum (Button 1) + 0x29, 0x05, // Usage Maximum (Button 5) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0x05, // Report Count (5) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Button padding (3 bits) + 0x95, 0x01, // Report Count (1) + 0x75, 0x03, // Report Size (3) + 0x81, 0x03, // Input (Constant) + + // X/Y position (2 bytes) + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x30, // Usage (X) + 0x09, 0x31, // Usage (Y) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x02, // Report Count (2) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) + + // Vertical wheel (1 byte) + 0x09, 0x38, // Usage (Wheel) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) + // Horizontal wheel (1 byte) + 0x05, 0x0C, // Usage Page (Consumer) + 0x0A, 0x38, 0x02, // Usage (AC Pan) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) + 0xC0, // End Collection + 0xC0, // End Collection + +#ifdef EXTRAKEY_ENABLE + // Extrakeys report descriptor + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x80, // Usage (System Control) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_SYSTEM, // Report ID + 0x1A, 0x81, 0x00, // Usage Minimum (System Power Down) + 0x2A, 0x83, 0x00, // Usage Maximum (System Wake Up) + 0x16, 0x01, 0x00, // Logical Minimum + 0x26, 0x03, 0x00, // Logical Maximum + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) + 0x81, 0x00, // Input (Data, Array, Absolute) + 0xC0, // End Collection + + 0x05, 0x0C, // Usage Page (Consumer) + 0x09, 0x01, // Usage (Consumer Control) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_CONSUMER, // Report ID + 0x1A, 0x01, 0x00, // Usage Minimum (Consumer Control) + 0x2A, 0x9C, 0x02, // Usage Maximum (AC Distribute Vertically) + 0x16, 0x01, 0x00, // Logical Minimum + 0x26, 0x9C, 0x02, // Logical Maximum + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) + 0x81, 0x00, // Input (Data, Array, Absolute) + 0xC0 // End Collection +#endif }; #ifndef USB_MAX_POWER_CONSUMPTION From 7740470a94ef10de3cedbe57c38d9f06c06a618d Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Wed, 12 Feb 2020 06:50:23 +0000 Subject: [PATCH 269/331] format code according to conventions [skip ci] --- tmk_core/protocol/vusb/vusb.c | 116 +++++++++++++++++----------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 7c1f4ca7f0d5..2d2e5ca5c3e8 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -211,22 +211,22 @@ uchar usbFunctionWrite(uchar *data, uchar len) { *------------------------------------------------------------------*/ const PROGMEM uchar keyboard_hid_report[] = { - 0x05, 0x01, // Usage Page (Generic Desktop) - 0x09, 0x06, // Usage (Keyboard) - 0xA1, 0x01, // Collection (Application) + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x06, // Usage (Keyboard) + 0xA1, 0x01, // Collection (Application) // Modifiers (8 bits) - 0x05, 0x07, // Usage Page (Keyboard/Keypad) - 0x19, 0xE0, // Usage Minimum (Keyboard Left Control) - 0x29, 0xE7, // Usage Maximum (Keyboard Right GUI) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x01, // Logical Maximum (1) - 0x95, 0x08, // Report Count (8) - 0x75, 0x01, // Report Size (1) - 0x81, 0x02, // Input (Data, Variable, Absolute) + 0x05, 0x07, // Usage Page (Keyboard/Keypad) + 0x19, 0xE0, // Usage Minimum (Keyboard Left Control) + 0x29, 0xE7, // Usage Maximum (Keyboard Right GUI) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0x08, // Report Count (8) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute) // Reserved (1 byte) - 0x95, 0x01, // Report Count (1) - 0x75, 0x08, // Report Size (8) - 0x81, 0x03, // Input (Constant) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x03, // Input (Constant) // Keycodes (6 bytes) 0x05, 0x07, // Usage Page (Keyboard/Keypad) 0x19, 0x00, // Usage Minimum (0) @@ -238,17 +238,17 @@ const PROGMEM uchar keyboard_hid_report[] = { 0x81, 0x00, // Input (Data, Array, Absolute) // Status LEDs (5 bits) - 0x05, 0x08, // Usage Page (LED) - 0x19, 0x01, // Usage Minimum (Num Lock) - 0x29, 0x05, // Usage Maximum (Kana) - 0x95, 0x05, // Report Count (5) - 0x75, 0x01, // Report Size (1) - 0x91, 0x02, // Output (Data, Variable, Absolute) + 0x05, 0x08, // Usage Page (LED) + 0x19, 0x01, // Usage Minimum (Num Lock) + 0x29, 0x05, // Usage Maximum (Kana) + 0x95, 0x05, // Report Count (5) + 0x75, 0x01, // Report Size (1) + 0x91, 0x02, // Output (Data, Variable, Absolute) // LED padding (3 bits) - 0x95, 0x01, // Report Count (1) - 0x75, 0x03, // Report Size (3) - 0x91, 0x03, // Output (Constant) - 0xC0 // End Collection + 0x95, 0x01, // Report Count (1) + 0x75, 0x03, // Report Size (3) + 0x91, 0x03, // Output (Constant) + 0xC0 // End Collection }; const PROGMEM uchar mouse_hid_report[] = { @@ -260,46 +260,46 @@ const PROGMEM uchar mouse_hid_report[] = { 0x09, 0x01, // Usage (Pointer) 0xA1, 0x00, // Collection (Physical) // Buttons (5 bits) - 0x05, 0x09, // Usage Page (Button) - 0x19, 0x01, // Usage Minimum (Button 1) - 0x29, 0x05, // Usage Maximum (Button 5) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x01, // Logical Maximum (1) - 0x95, 0x05, // Report Count (5) - 0x75, 0x01, // Report Size (1) - 0x81, 0x02, // Input (Data, Variable, Absolute) + 0x05, 0x09, // Usage Page (Button) + 0x19, 0x01, // Usage Minimum (Button 1) + 0x29, 0x05, // Usage Maximum (Button 5) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0x05, // Report Count (5) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute) // Button padding (3 bits) - 0x95, 0x01, // Report Count (1) - 0x75, 0x03, // Report Size (3) - 0x81, 0x03, // Input (Constant) + 0x95, 0x01, // Report Count (1) + 0x75, 0x03, // Report Size (3) + 0x81, 0x03, // Input (Constant) // X/Y position (2 bytes) - 0x05, 0x01, // Usage Page (Generic Desktop) - 0x09, 0x30, // Usage (X) - 0x09, 0x31, // Usage (Y) - 0x15, 0x81, // Logical Minimum (-127) - 0x25, 0x7F, // Logical Maximum (127) - 0x95, 0x02, // Report Count (2) - 0x75, 0x08, // Report Size (8) - 0x81, 0x06, // Input (Data, Variable, Relative) + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x30, // Usage (X) + 0x09, 0x31, // Usage (Y) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x02, // Report Count (2) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) // Vertical wheel (1 byte) - 0x09, 0x38, // Usage (Wheel) - 0x15, 0x81, // Logical Minimum (-127) - 0x25, 0x7F, // Logical Maximum (127) - 0x95, 0x01, // Report Count (1) - 0x75, 0x08, // Report Size (8) - 0x81, 0x06, // Input (Data, Variable, Relative) + 0x09, 0x38, // Usage (Wheel) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) // Horizontal wheel (1 byte) - 0x05, 0x0C, // Usage Page (Consumer) - 0x0A, 0x38, 0x02, // Usage (AC Pan) - 0x15, 0x81, // Logical Minimum (-127) - 0x25, 0x7F, // Logical Maximum (127) - 0x95, 0x01, // Report Count (1) - 0x75, 0x08, // Report Size (8) - 0x81, 0x06, // Input (Data, Variable, Relative) - 0xC0, // End Collection - 0xC0, // End Collection + 0x05, 0x0C, // Usage Page (Consumer) + 0x0A, 0x38, 0x02, // Usage (AC Pan) + 0x15, 0x81, // Logical Minimum (-127) + 0x25, 0x7F, // Logical Maximum (127) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x06, // Input (Data, Variable, Relative) + 0xC0, // End Collection + 0xC0, // End Collection #ifdef EXTRAKEY_ENABLE // Extrakeys report descriptor From 667b29b77c71cb0a0f8b4298900304c08b13e410 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 12 Feb 2020 10:54:05 +0000 Subject: [PATCH 270/331] Align split_common/matrix.c with matrix.c (#8153) --- quantum/split_common/matrix.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 454ea59c3b1e..2c0e028f7da0 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -19,10 +19,10 @@ along with this program. If not, see . #include "wait.h" #include "util.h" #include "matrix.h" +#include "debounce.h" +#include "quantum.h" #include "split_util.h" #include "config.h" -#include "quantum.h" -#include "debounce.h" #include "transport.h" #ifdef ENCODER_ENABLE @@ -35,7 +35,7 @@ along with this program. If not, see . #ifdef DIRECT_PINS static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; -#else +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif @@ -115,8 +115,11 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // For each col... for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (MATRIX_ROW_SHIFTER << col_index); + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); } // Unselect row @@ -160,12 +163,12 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) matrix_row_t last_row_value = current_matrix[row_index]; // Check row pin state - if (readPin(row_pins[row_index])) { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); - } else { + if (readPin(row_pins[row_index]) == 0) { // Pin LO, set col bit current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); } // Determine if the matrix changed state From 1a77abfe64f08a0b72f4f328418b4f4dc138ac8d Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 14 Feb 2020 06:36:21 +1100 Subject: [PATCH 271/331] Define backlight pin for Quefrency Rev2 (#8141) --- keyboards/keebio/quefrency/rev2/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/keebio/quefrency/rev2/config.h b/keyboards/keebio/quefrency/rev2/config.h index e50c8142e880..4463eb73963e 100644 --- a/keyboards/keebio/quefrency/rev2/config.h +++ b/keyboards/keebio/quefrency/rev2/config.h @@ -46,6 +46,8 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +#define BACKLIGHT_PIN B5 + /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 From 014ad1d747d1688dc12a690282deae00a8efb88c Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 13 Feb 2020 19:39:22 +0000 Subject: [PATCH 272/331] Fix RESET keycode on some STM32F072 keyboards (#8134) * Add f072 board files with 'enter_bootloader_mode_if_requested' support * rename default f072 board file to GENERIC_STM32_F072XB * Remove board files * Add bootloader def * Update generic f072 board paths * Revert wrong deletion --- drivers/boards/GENERIC_STM32_F072XB/board.c | 109 +++ drivers/boards/GENERIC_STM32_F072XB/board.h | 923 ++++++++++++++++++ drivers/boards/GENERIC_STM32_F072XB/board.mk | 5 + .../GENERIC_STM32_F072XB}/bootloader_defs.h | 0 .../GENERIC_STM32_F072XB/cfg/board.chcfg | 703 +++++++++++++ keyboards/at_at/660m/rules.mk | 1 + keyboards/candybar/rules.mk | 1 + keyboards/cannonkeys/an_c/rules.mk | 1 + keyboards/cannonkeys/chimera65/rules.mk | 1 + keyboards/cannonkeys/instant60/rules.mk | 1 + keyboards/cannonkeys/iron165/rules.mk | 1 + keyboards/cannonkeys/satisfaction75/rules.mk | 1 + keyboards/cannonkeys/savage65/rules.mk | 1 + keyboards/cannonkeys/tmov2/rules.mk | 1 + keyboards/projectkb/alice/rules.mk | 1 + keyboards/xiaomi/mk02/rules.mk | 1 + quantum/mcu_selection.mk | 2 +- 17 files changed, 1752 insertions(+), 1 deletion(-) create mode 100644 drivers/boards/GENERIC_STM32_F072XB/board.c create mode 100644 drivers/boards/GENERIC_STM32_F072XB/board.h create mode 100644 drivers/boards/GENERIC_STM32_F072XB/board.mk rename {keyboards/handwired/ck4x4 => drivers/boards/GENERIC_STM32_F072XB}/bootloader_defs.h (100%) create mode 100644 drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.c b/drivers/boards/GENERIC_STM32_F072XB/board.c new file mode 100644 index 000000000000..2ad6d744be7d --- /dev/null +++ b/drivers/boards/GENERIC_STM32_F072XB/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.h b/drivers/boards/GENERIC_STM32_F072XB/board.h new file mode 100644 index 000000000000..379e690a647c --- /dev/null +++ b/drivers/boards/GENERIC_STM32_F072XB/board.h @@ -0,0 +1,923 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for Generic STM32_F072 Board + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F072XB +#define BOARD_NAME "STM32_F072" + +/* + * Board oscillators-related settings. + * NOTE: LSE not fitted. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.mk b/drivers/boards/GENERIC_STM32_F072XB/board.mk new file mode 100644 index 000000000000..c136f705a636 --- /dev/null +++ b/drivers/boards/GENERIC_STM32_F072XB/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB diff --git a/keyboards/handwired/ck4x4/bootloader_defs.h b/drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h similarity index 100% rename from keyboards/handwired/ck4x4/bootloader_defs.h rename to drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/at_at/660m/rules.mk b/keyboards/at_at/660m/rules.mk index 0b3685f09e4e..8c69ff7e247d 100644 --- a/keyboards/at_at/660m/rules.mk +++ b/keyboards/at_at/660m/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk index cb1b832886a0..4e89dbf477b6 100644 --- a/keyboards/candybar/rules.mk +++ b/keyboards/candybar/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk index 2050ba34c499..faaed5c1ab7f 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/chimera65/rules.mk b/keyboards/cannonkeys/chimera65/rules.mk index 9b1ab589917f..7476e5f007a7 100644 --- a/keyboards/cannonkeys/chimera65/rules.mk +++ b/keyboards/cannonkeys/chimera65/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index 0b4afd8da81e..7ae14c4986fc 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/iron165/rules.mk b/keyboards/cannonkeys/iron165/rules.mk index 33529718eb40..795e2baf8d92 100644 --- a/keyboards/cannonkeys/iron165/rules.mk +++ b/keyboards/cannonkeys/iron165/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk index 5fd801819403..6584bb5ff3ff 100644 --- a/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/savage65/rules.mk b/keyboards/cannonkeys/savage65/rules.mk index 1c1c4c2ec417..bf4b9a2897b3 100644 --- a/keyboards/cannonkeys/savage65/rules.mk +++ b/keyboards/cannonkeys/savage65/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/tmov2/rules.mk b/keyboards/cannonkeys/tmov2/rules.mk index 646288504cee..7d29079c37c3 100644 --- a/keyboards/cannonkeys/tmov2/rules.mk +++ b/keyboards/cannonkeys/tmov2/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index 97fcc754da1b..503bc7ad7065 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY # Build Options # comment out to disable the options. diff --git a/keyboards/xiaomi/mk02/rules.mk b/keyboards/xiaomi/mk02/rules.mk index 93ff487dc8ac..730fb0a894cf 100644 --- a/keyboards/xiaomi/mk02/rules.mk +++ b/keyboards/xiaomi/mk02/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = STM32F072 +BOARD = ST_STM32F072B_DISCOVERY MCU_LDSCRIPT = STM32F072_0x2000_bootloader DFU_ARGS = -d 0483:df11 -a 0 -s 0x08002000:leave diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index bddafa6a4c47..f41a9e8215d7 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -55,7 +55,7 @@ ifneq ($(findstring STM32F072, $(MCU)),) # Board: it should exist either in /os/hal/boards/, # /boards/, or drivers/boards/ - BOARD ?= ST_STM32F072B_DISCOVERY + BOARD ?= GENERIC_STM32_F072XB USE_FPU ?= no From 31aadc8725d836f57a983e84ac2b2bc58ddf21d5 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Thu, 13 Feb 2020 20:09:39 +0000 Subject: [PATCH 273/331] format code according to conventions [skip ci] --- drivers/boards/GENERIC_STM32_F072XB/board.c | 84 +- drivers/boards/GENERIC_STM32_F072XB/board.h | 911 ++++---------------- 2 files changed, 223 insertions(+), 772 deletions(-) diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.c b/drivers/boards/GENERIC_STM32_F072XB/board.c index 2ad6d744be7d..dcbb94310f24 100644 --- a/drivers/boards/GENERIC_STM32_F072XB/board.c +++ b/drivers/boards/GENERIC_STM32_F072XB/board.c @@ -28,42 +28,33 @@ * This variable is used by the HAL when initializing the PAL driver. */ const PALConfig pal_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} -#endif +# if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +# endif +# if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +# endif +# if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +# endif +# if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +# endif +# if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +# endif +# if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +# endif +# if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +# endif +# if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +# endif +# if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +# endif }; #endif @@ -75,8 +66,8 @@ __attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} * and before any other initialization. */ void __early_init(void) { - enter_bootloader_mode_if_requested(); - stm32_clock_init(); + enter_bootloader_mode_if_requested(); + stm32_clock_init(); } #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) @@ -84,20 +75,18 @@ void __early_init(void) { * @brief MMC_SPI card detection. */ bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; } /** * @brief MMC_SPI card write protection detection. */ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; } #endif @@ -105,5 +94,4 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @brief Board-specific initialization code. * @todo Add your board-specific code, if any. */ -void boardInit(void) { -} +void boardInit(void) {} diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.h b/drivers/boards/GENERIC_STM32_F072XB/board.h index 379e690a647c..c625a4330adb 100644 --- a/drivers/boards/GENERIC_STM32_F072XB/board.h +++ b/drivers/boards/GENERIC_STM32_F072XB/board.h @@ -38,13 +38,13 @@ * NOTE: HSE not fitted. */ #if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U +# define STM32_LSECLK 0U #endif -#define STM32_LSEDRV (3U << 3U) +#define STM32_LSEDRV (3U << 3U) #if !defined(STM32_HSECLK) -#define STM32_HSECLK 0U +# define STM32_HSECLK 0U #endif #define STM32_HSE_BYPASS @@ -57,155 +57,153 @@ /* * IO pins assignments. */ -#define GPIOA_BUTTON 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_USB_DM 11U -#define GPIOA_USB_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_SPI2_SCK 13U -#define GPIOB_SPI2_MISO 14U -#define GPIOB_SPI2_MOSI 15U - -#define GPIOC_MEMS_CS 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_LED_RED 6U -#define GPIOC_LED_BLUE 7U -#define GPIOC_LED_ORANGE 8U -#define GPIOC_LED_GREEN 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_OSC32_IN 14U -#define GPIOC_OSC32_OUT 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_OSC_IN 0U -#define GPIOF_OSC_OUT 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U /* * IO lines assignments. */ -#define LINE_BUTTON PAL_LINE(GPIOA, 0U) -#define LINE_USB_DM PAL_LINE(GPIOA, 11U) -#define LINE_USB_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) - -#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) -#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) -#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) - -#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) -#define LINE_LED_RED PAL_LINE(GPIOC, 6U) -#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) -#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) -#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) -#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) -#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) - - - -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) /* * I/O ports initial setup, this configuration is established soon after reset * in the initialization code. * Please refer to the STM32 Reference Manual for details. */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) +#define PIN_MODE_INPUT(n) (0U << ((n)*2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n)*2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n)*2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n)*2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n)*2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) /* * GPIOA setup: @@ -227,102 +225,13 @@ * PA14 - SWCLK (alternate 0). * PA15 - PIN15 (input pullup). */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ - PIN_MODE_INPUT(GPIOA_PIN1) | \ - PIN_MODE_INPUT(GPIOA_PIN2) | \ - PIN_MODE_INPUT(GPIOA_PIN3) | \ - PIN_MODE_INPUT(GPIOA_PIN4) | \ - PIN_MODE_INPUT(GPIOA_PIN5) | \ - PIN_MODE_INPUT(GPIOA_PIN6) | \ - PIN_MODE_INPUT(GPIOA_PIN7) | \ - PIN_MODE_INPUT(GPIOA_PIN8) | \ - PIN_MODE_INPUT(GPIOA_PIN9) | \ - PIN_MODE_INPUT(GPIOA_PIN10) | \ - PIN_MODE_INPUT(GPIOA_USB_DM) | \ - PIN_MODE_INPUT(GPIOA_USB_DP) | \ - PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ - PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ - PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ - PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_PIN4) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_USB_DM) | \ - PIN_ODR_HIGH(GPIOA_USB_DP) | \ - PIN_ODR_HIGH(GPIOA_SWDIO) | \ - PIN_ODR_HIGH(GPIOA_SWCLK) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN7, 0U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0U)) +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_INPUT(GPIOA_USB_DM) | PIN_MODE_INPUT(GPIOA_USB_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | PIN_OSPEED_VERYLOW(GPIOA_PIN1) | PIN_OSPEED_VERYLOW(GPIOA_PIN2) | PIN_OSPEED_VERYLOW(GPIOA_PIN3) | PIN_OSPEED_VERYLOW(GPIOA_PIN4) | PIN_OSPEED_VERYLOW(GPIOA_PIN5) | PIN_OSPEED_VERYLOW(GPIOA_PIN6) | PIN_OSPEED_VERYLOW(GPIOA_PIN7) | PIN_OSPEED_VERYLOW(GPIOA_PIN8) | PIN_OSPEED_VERYLOW(GPIOA_PIN9) | PIN_OSPEED_VERYLOW(GPIOA_PIN10) | PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | PIN_PUPDR_PULLUP(GPIOA_PIN1) | PIN_PUPDR_PULLUP(GPIOA_PIN2) | PIN_PUPDR_PULLUP(GPIOA_PIN3) | PIN_PUPDR_PULLUP(GPIOA_PIN4) | PIN_PUPDR_PULLUP(GPIOA_PIN5) | PIN_PUPDR_PULLUP(GPIOA_PIN6) | PIN_PUPDR_PULLUP(GPIOA_PIN7) | PIN_PUPDR_PULLUP(GPIOA_PIN8) | PIN_PUPDR_PULLUP(GPIOA_PIN9) | PIN_PUPDR_PULLUP(GPIOA_PIN10) | PIN_PUPDR_FLOATING(GPIOA_USB_DM) | PIN_PUPDR_FLOATING(GPIOA_USB_DP) | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | PIN_ODR_HIGH(GPIOA_PIN1) | PIN_ODR_HIGH(GPIOA_PIN2) | PIN_ODR_HIGH(GPIOA_PIN3) | PIN_ODR_HIGH(GPIOA_PIN4) | PIN_ODR_HIGH(GPIOA_PIN5) | PIN_ODR_HIGH(GPIOA_PIN6) | PIN_ODR_HIGH(GPIOA_PIN7) | PIN_ODR_HIGH(GPIOA_PIN8) | PIN_ODR_HIGH(GPIOA_PIN9) | PIN_ODR_HIGH(GPIOA_PIN10) | PIN_ODR_HIGH(GPIOA_USB_DM) | PIN_ODR_HIGH(GPIOA_USB_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | PIN_AFIO_AF(GPIOA_PIN1, 0U) | PIN_AFIO_AF(GPIOA_PIN2, 0U) | PIN_AFIO_AF(GPIOA_PIN3, 0U) | PIN_AFIO_AF(GPIOA_PIN4, 0U) | PIN_AFIO_AF(GPIOA_PIN5, 0U) | PIN_AFIO_AF(GPIOA_PIN6, 0U) | PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | PIN_AFIO_AF(GPIOA_PIN9, 0U) | PIN_AFIO_AF(GPIOA_PIN10, 0U) | PIN_AFIO_AF(GPIOA_USB_DM, 0U) | PIN_AFIO_AF(GPIOA_USB_DP, 0U) | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | PIN_AFIO_AF(GPIOA_PIN15, 0U)) /* * GPIOB setup: @@ -344,102 +253,13 @@ * PB14 - SPI2_MISO (alternate 0). * PB15 - SPI2_MOSI (alternate 0). */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_INPUT(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_INPUT(GPIOB_PIN6) | \ - PIN_MODE_INPUT(GPIOB_PIN7) | \ - PIN_MODE_INPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ - PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ - PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ - PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ - PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_HIGH(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_HIGH(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ - PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ - PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ - PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ - PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_PIN3) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_HIGH(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ - PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ - PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ - PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ - PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_INPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_PIN3) | PIN_OSPEED_HIGH(GPIOB_PIN4) | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | PIN_OSPEED_VERYLOW(GPIOB_PIN6) | PIN_OSPEED_VERYLOW(GPIOB_PIN7) | PIN_OSPEED_VERYLOW(GPIOB_PIN8) | PIN_OSPEED_VERYLOW(GPIOB_PIN9) | PIN_OSPEED_VERYLOW(GPIOB_PIN10) | PIN_OSPEED_VERYLOW(GPIOB_PIN11) | PIN_OSPEED_VERYLOW(GPIOB_PIN12) | PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_PIN3) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_PULLUP(GPIOB_PIN6) | PIN_PUPDR_PULLUP(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_PIN8) | PIN_PUPDR_PULLUP(GPIOB_PIN9) | PIN_PUPDR_PULLUP(GPIOB_PIN10) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_PIN3) | PIN_ODR_HIGH(GPIOB_PIN4) | PIN_ODR_HIGH(GPIOB_PIN5) | PIN_ODR_HIGH(GPIOB_PIN6) | PIN_ODR_HIGH(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_PIN8) | PIN_ODR_HIGH(GPIOB_PIN9) | PIN_ODR_HIGH(GPIOB_PIN10) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_SPI2_SCK) | PIN_ODR_HIGH(GPIOB_SPI2_MISO) | PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | PIN_AFIO_AF(GPIOB_PIN1, 0U) | PIN_AFIO_AF(GPIOB_PIN2, 0U) | PIN_AFIO_AF(GPIOB_PIN3, 0U) | PIN_AFIO_AF(GPIOB_PIN4, 0U) | PIN_AFIO_AF(GPIOB_PIN5, 0U) | PIN_AFIO_AF(GPIOB_PIN6, 0U) | PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | PIN_AFIO_AF(GPIOB_PIN9, 0U) | PIN_AFIO_AF(GPIOB_PIN10, 0U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) /* * GPIOC setup: @@ -461,102 +281,13 @@ * PC14 - OSC32_IN (input floating). * PC15 - OSC32_OUT (input floating). */ -#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ - PIN_MODE_INPUT(GPIOC_PIN1) | \ - PIN_MODE_INPUT(GPIOC_PIN2) | \ - PIN_MODE_INPUT(GPIOC_PIN3) | \ - PIN_MODE_INPUT(GPIOC_PIN4) | \ - PIN_MODE_INPUT(GPIOC_PIN5) | \ - PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ - PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ - PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ - PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ - PIN_MODE_INPUT(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ - PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ - PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ - PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ - PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ - PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ - PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ - PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ - PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ - PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ - PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ - PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ - PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ - PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_LOW(GPIOC_LED_RED) | \ - PIN_ODR_LOW(GPIOC_LED_BLUE) | \ - PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ - PIN_ODR_LOW(GPIOC_LED_GREEN) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ - PIN_ODR_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ - PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ - PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ - PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_OUTPUT(GPIOC_LED_RED) | PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_OSC32_IN) | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | PIN_OSPEED_VERYLOW(GPIOC_PIN1) | PIN_OSPEED_VERYLOW(GPIOC_PIN2) | PIN_OSPEED_VERYLOW(GPIOC_PIN3) | PIN_OSPEED_VERYLOW(GPIOC_PIN4) | PIN_OSPEED_VERYLOW(GPIOC_PIN5) | PIN_OSPEED_HIGH(GPIOC_LED_RED) | PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | PIN_PUPDR_PULLUP(GPIOC_PIN1) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_PULLUP(GPIOC_PIN3) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_FLOATING(GPIOC_LED_RED) | PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | PIN_ODR_HIGH(GPIOC_PIN1) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_PIN3) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_LOW(GPIOC_LED_RED) | PIN_ODR_LOW(GPIOC_LED_BLUE) | PIN_ODR_LOW(GPIOC_LED_ORANGE) | PIN_ODR_LOW(GPIOC_LED_GREEN) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_OSC32_IN) | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | PIN_AFIO_AF(GPIOC_PIN1, 0U) | PIN_AFIO_AF(GPIOC_PIN2, 0U) | PIN_AFIO_AF(GPIOC_PIN3, 0U) | PIN_AFIO_AF(GPIOC_PIN4, 0U) | PIN_AFIO_AF(GPIOC_PIN5, 0U) | PIN_AFIO_AF(GPIOC_LED_RED, 0U) | PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | PIN_AFIO_AF(GPIOC_PIN10, 0U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_PIN12, 0U) | PIN_AFIO_AF(GPIOC_PIN13, 0U) | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) /* * GPIOD setup: @@ -578,102 +309,13 @@ * PD14 - PIN14 (input pullup). * PD15 - PIN15 (input pullup). */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ - PIN_MODE_INPUT(GPIOD_PIN1) | \ - PIN_MODE_INPUT(GPIOD_PIN2) | \ - PIN_MODE_INPUT(GPIOD_PIN3) | \ - PIN_MODE_INPUT(GPIOD_PIN4) | \ - PIN_MODE_INPUT(GPIOD_PIN5) | \ - PIN_MODE_INPUT(GPIOD_PIN6) | \ - PIN_MODE_INPUT(GPIOD_PIN7) | \ - PIN_MODE_INPUT(GPIOD_PIN8) | \ - PIN_MODE_INPUT(GPIOD_PIN9) | \ - PIN_MODE_INPUT(GPIOD_PIN10) | \ - PIN_MODE_INPUT(GPIOD_PIN11) | \ - PIN_MODE_INPUT(GPIOD_PIN12) | \ - PIN_MODE_INPUT(GPIOD_PIN13) | \ - PIN_MODE_INPUT(GPIOD_PIN14) | \ - PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_PIN4) | \ - PIN_ODR_HIGH(GPIOD_PIN5) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_HIGH(GPIOD_PIN12) | \ - PIN_ODR_HIGH(GPIOD_PIN13) | \ - PIN_ODR_HIGH(GPIOD_PIN14) | \ - PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0U)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0U)) +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | PIN_MODE_INPUT(GPIOD_PIN1) | PIN_MODE_INPUT(GPIOD_PIN2) | PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11) | PIN_MODE_INPUT(GPIOD_PIN12) | PIN_MODE_INPUT(GPIOD_PIN13) | PIN_MODE_INPUT(GPIOD_PIN14) | PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | PIN_OSPEED_VERYLOW(GPIOD_PIN1) | PIN_OSPEED_VERYLOW(GPIOD_PIN2) | PIN_OSPEED_VERYLOW(GPIOD_PIN3) | PIN_OSPEED_VERYLOW(GPIOD_PIN4) | PIN_OSPEED_VERYLOW(GPIOD_PIN5) | PIN_OSPEED_VERYLOW(GPIOD_PIN6) | PIN_OSPEED_VERYLOW(GPIOD_PIN7) | PIN_OSPEED_VERYLOW(GPIOD_PIN8) | PIN_OSPEED_VERYLOW(GPIOD_PIN9) | PIN_OSPEED_VERYLOW(GPIOD_PIN10) | PIN_OSPEED_VERYLOW(GPIOD_PIN11) | PIN_OSPEED_VERYLOW(GPIOD_PIN12) | PIN_OSPEED_VERYLOW(GPIOD_PIN13) | PIN_OSPEED_VERYLOW(GPIOD_PIN14) | PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | PIN_PUPDR_PULLUP(GPIOD_PIN1) | PIN_PUPDR_PULLUP(GPIOD_PIN2) | PIN_PUPDR_PULLUP(GPIOD_PIN3) | PIN_PUPDR_PULLUP(GPIOD_PIN4) | PIN_PUPDR_PULLUP(GPIOD_PIN5) | PIN_PUPDR_PULLUP(GPIOD_PIN6) | PIN_PUPDR_PULLUP(GPIOD_PIN7) | PIN_PUPDR_PULLUP(GPIOD_PIN8) | PIN_PUPDR_PULLUP(GPIOD_PIN9) | PIN_PUPDR_PULLUP(GPIOD_PIN10) | PIN_PUPDR_PULLUP(GPIOD_PIN11) | PIN_PUPDR_PULLUP(GPIOD_PIN12) | PIN_PUPDR_PULLUP(GPIOD_PIN13) | PIN_PUPDR_PULLUP(GPIOD_PIN14) | PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | PIN_ODR_HIGH(GPIOD_PIN1) | PIN_ODR_HIGH(GPIOD_PIN2) | PIN_ODR_HIGH(GPIOD_PIN3) | PIN_ODR_HIGH(GPIOD_PIN4) | PIN_ODR_HIGH(GPIOD_PIN5) | PIN_ODR_HIGH(GPIOD_PIN6) | PIN_ODR_HIGH(GPIOD_PIN7) | PIN_ODR_HIGH(GPIOD_PIN8) | PIN_ODR_HIGH(GPIOD_PIN9) | PIN_ODR_HIGH(GPIOD_PIN10) | PIN_ODR_HIGH(GPIOD_PIN11) | PIN_ODR_HIGH(GPIOD_PIN12) | PIN_ODR_HIGH(GPIOD_PIN13) | PIN_ODR_HIGH(GPIOD_PIN14) | PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | PIN_AFIO_AF(GPIOD_PIN1, 0U) | PIN_AFIO_AF(GPIOD_PIN2, 0U) | PIN_AFIO_AF(GPIOD_PIN3, 0U) | PIN_AFIO_AF(GPIOD_PIN4, 0U) | PIN_AFIO_AF(GPIOD_PIN5, 0U) | PIN_AFIO_AF(GPIOD_PIN6, 0U) | PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | PIN_AFIO_AF(GPIOD_PIN9, 0U) | PIN_AFIO_AF(GPIOD_PIN10, 0U) | PIN_AFIO_AF(GPIOD_PIN11, 0U) | PIN_AFIO_AF(GPIOD_PIN12, 0U) | PIN_AFIO_AF(GPIOD_PIN13, 0U) | PIN_AFIO_AF(GPIOD_PIN14, 0U) | PIN_AFIO_AF(GPIOD_PIN15, 0U)) /* * GPIOE setup: @@ -695,102 +337,13 @@ * PE14 - PIN14 (input pullup). * PE15 - PIN15 (input pullup). */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) | \ - PIN_MODE_INPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) | \ - PIN_MODE_INPUT(GPIOE_PIN5) | \ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_INPUT(GPIOE_PIN8) | \ - PIN_MODE_INPUT(GPIOE_PIN9) | \ - PIN_MODE_INPUT(GPIOE_PIN10) | \ - PIN_MODE_INPUT(GPIOE_PIN11) | \ - PIN_MODE_INPUT(GPIOE_PIN12) | \ - PIN_MODE_INPUT(GPIOE_PIN13) | \ - PIN_MODE_INPUT(GPIOE_PIN14) | \ - PIN_MODE_INPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_HIGH(GPIOE_PIN8) | \ - PIN_ODR_HIGH(GPIOE_PIN9) | \ - PIN_ODR_HIGH(GPIOE_PIN10) | \ - PIN_ODR_HIGH(GPIOE_PIN11) | \ - PIN_ODR_HIGH(GPIOE_PIN12) | \ - PIN_ODR_HIGH(GPIOE_PIN13) | \ - PIN_ODR_HIGH(GPIOE_PIN14) | \ - PIN_ODR_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0U)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0U)) +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_INPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_INPUT(GPIOE_PIN8) | PIN_MODE_INPUT(GPIOE_PIN9) | PIN_MODE_INPUT(GPIOE_PIN10) | PIN_MODE_INPUT(GPIOE_PIN11) | PIN_MODE_INPUT(GPIOE_PIN12) | PIN_MODE_INPUT(GPIOE_PIN13) | PIN_MODE_INPUT(GPIOE_PIN14) | PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | PIN_OSPEED_VERYLOW(GPIOE_PIN1) | PIN_OSPEED_VERYLOW(GPIOE_PIN2) | PIN_OSPEED_VERYLOW(GPIOE_PIN3) | PIN_OSPEED_VERYLOW(GPIOE_PIN4) | PIN_OSPEED_VERYLOW(GPIOE_PIN5) | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | PIN_OSPEED_VERYLOW(GPIOE_PIN8) | PIN_OSPEED_VERYLOW(GPIOE_PIN9) | PIN_OSPEED_VERYLOW(GPIOE_PIN10) | PIN_OSPEED_VERYLOW(GPIOE_PIN11) | PIN_OSPEED_VERYLOW(GPIOE_PIN12) | PIN_OSPEED_VERYLOW(GPIOE_PIN13) | PIN_OSPEED_VERYLOW(GPIOE_PIN14) | PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_PULLUP(GPIOE_PIN3) | PIN_PUPDR_PULLUP(GPIOE_PIN4) | PIN_PUPDR_PULLUP(GPIOE_PIN5) | PIN_PUPDR_PULLUP(GPIOE_PIN6) | PIN_PUPDR_PULLUP(GPIOE_PIN7) | PIN_PUPDR_PULLUP(GPIOE_PIN8) | PIN_PUPDR_PULLUP(GPIOE_PIN9) | PIN_PUPDR_PULLUP(GPIOE_PIN10) | PIN_PUPDR_PULLUP(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_PULLUP(GPIOE_PIN13) | PIN_PUPDR_PULLUP(GPIOE_PIN14) | PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | PIN_ODR_HIGH(GPIOE_PIN1) | PIN_ODR_HIGH(GPIOE_PIN2) | PIN_ODR_HIGH(GPIOE_PIN3) | PIN_ODR_HIGH(GPIOE_PIN4) | PIN_ODR_HIGH(GPIOE_PIN5) | PIN_ODR_HIGH(GPIOE_PIN6) | PIN_ODR_HIGH(GPIOE_PIN7) | PIN_ODR_HIGH(GPIOE_PIN8) | PIN_ODR_HIGH(GPIOE_PIN9) | PIN_ODR_HIGH(GPIOE_PIN10) | PIN_ODR_HIGH(GPIOE_PIN11) | PIN_ODR_HIGH(GPIOE_PIN12) | PIN_ODR_HIGH(GPIOE_PIN13) | PIN_ODR_HIGH(GPIOE_PIN14) | PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | PIN_AFIO_AF(GPIOE_PIN1, 0U) | PIN_AFIO_AF(GPIOE_PIN2, 0U) | PIN_AFIO_AF(GPIOE_PIN3, 0U) | PIN_AFIO_AF(GPIOE_PIN4, 0U) | PIN_AFIO_AF(GPIOE_PIN5, 0U) | PIN_AFIO_AF(GPIOE_PIN6, 0U) | PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | PIN_AFIO_AF(GPIOE_PIN9, 0U) | PIN_AFIO_AF(GPIOE_PIN10, 0U) | PIN_AFIO_AF(GPIOE_PIN11, 0U) | PIN_AFIO_AF(GPIOE_PIN12, 0U) | PIN_AFIO_AF(GPIOE_PIN13, 0U) | PIN_AFIO_AF(GPIOE_PIN14, 0U) | PIN_AFIO_AF(GPIOE_PIN15, 0U)) /* * GPIOF setup: @@ -812,112 +365,22 @@ * PF14 - PIN14 (input pullup). * PF15 - PIN15 (input pullup). */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ - PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ - PIN_MODE_INPUT(GPIOF_PIN2) | \ - PIN_MODE_INPUT(GPIOF_PIN3) | \ - PIN_MODE_INPUT(GPIOF_PIN4) | \ - PIN_MODE_INPUT(GPIOF_PIN5) | \ - PIN_MODE_INPUT(GPIOF_PIN6) | \ - PIN_MODE_INPUT(GPIOF_PIN7) | \ - PIN_MODE_INPUT(GPIOF_PIN8) | \ - PIN_MODE_INPUT(GPIOF_PIN9) | \ - PIN_MODE_INPUT(GPIOF_PIN10) | \ - PIN_MODE_INPUT(GPIOF_PIN11) | \ - PIN_MODE_INPUT(GPIOF_PIN12) | \ - PIN_MODE_INPUT(GPIOF_PIN13) | \ - PIN_MODE_INPUT(GPIOF_PIN14) | \ - PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ - PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ - PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ - PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ - PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ - PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0U)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0U)) - +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | PIN_MODE_INPUT(GPIOF_OSC_OUT) | PIN_MODE_INPUT(GPIOF_PIN2) | PIN_MODE_INPUT(GPIOF_PIN3) | PIN_MODE_INPUT(GPIOF_PIN4) | PIN_MODE_INPUT(GPIOF_PIN5) | PIN_MODE_INPUT(GPIOF_PIN6) | PIN_MODE_INPUT(GPIOF_PIN7) | PIN_MODE_INPUT(GPIOF_PIN8) | PIN_MODE_INPUT(GPIOF_PIN9) | PIN_MODE_INPUT(GPIOF_PIN10) | PIN_MODE_INPUT(GPIOF_PIN11) | PIN_MODE_INPUT(GPIOF_PIN12) | PIN_MODE_INPUT(GPIOF_PIN13) | PIN_MODE_INPUT(GPIOF_PIN14) | PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | PIN_OSPEED_VERYLOW(GPIOF_PIN2) | PIN_OSPEED_VERYLOW(GPIOF_PIN3) | PIN_OSPEED_VERYLOW(GPIOF_PIN4) | PIN_OSPEED_VERYLOW(GPIOF_PIN5) | PIN_OSPEED_VERYLOW(GPIOF_PIN6) | PIN_OSPEED_VERYLOW(GPIOF_PIN7) | PIN_OSPEED_VERYLOW(GPIOF_PIN8) | PIN_OSPEED_VERYLOW(GPIOF_PIN9) | PIN_OSPEED_VERYLOW(GPIOF_PIN10) | PIN_OSPEED_VERYLOW(GPIOF_PIN11) | PIN_OSPEED_VERYLOW(GPIOF_PIN12) | PIN_OSPEED_VERYLOW(GPIOF_PIN13) | PIN_OSPEED_VERYLOW(GPIOF_PIN14) | PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | PIN_PUPDR_PULLUP(GPIOF_PIN2) | PIN_PUPDR_PULLUP(GPIOF_PIN3) | PIN_PUPDR_PULLUP(GPIOF_PIN4) | PIN_PUPDR_PULLUP(GPIOF_PIN5) | PIN_PUPDR_PULLUP(GPIOF_PIN6) | PIN_PUPDR_PULLUP(GPIOF_PIN7) | PIN_PUPDR_PULLUP(GPIOF_PIN8) | PIN_PUPDR_PULLUP(GPIOF_PIN9) | PIN_PUPDR_PULLUP(GPIOF_PIN10) | PIN_PUPDR_PULLUP(GPIOF_PIN11) | PIN_PUPDR_PULLUP(GPIOF_PIN12) | PIN_PUPDR_PULLUP(GPIOF_PIN13) | PIN_PUPDR_PULLUP(GPIOF_PIN14) | PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | PIN_ODR_HIGH(GPIOF_OSC_OUT) | PIN_ODR_HIGH(GPIOF_PIN2) | PIN_ODR_HIGH(GPIOF_PIN3) | PIN_ODR_HIGH(GPIOF_PIN4) | PIN_ODR_HIGH(GPIOF_PIN5) | PIN_ODR_HIGH(GPIOF_PIN6) | PIN_ODR_HIGH(GPIOF_PIN7) | PIN_ODR_HIGH(GPIOF_PIN8) | PIN_ODR_HIGH(GPIOF_PIN9) | PIN_ODR_HIGH(GPIOF_PIN10) | PIN_ODR_HIGH(GPIOF_PIN11) | PIN_ODR_HIGH(GPIOF_PIN12) | PIN_ODR_HIGH(GPIOF_PIN13) | PIN_ODR_HIGH(GPIOF_PIN14) | PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOF_PIN2, 0U) | PIN_AFIO_AF(GPIOF_PIN3, 0U) | PIN_AFIO_AF(GPIOF_PIN4, 0U) | PIN_AFIO_AF(GPIOF_PIN5, 0U) | PIN_AFIO_AF(GPIOF_PIN6, 0U) | PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | PIN_AFIO_AF(GPIOF_PIN9, 0U) | PIN_AFIO_AF(GPIOF_PIN10, 0U) | PIN_AFIO_AF(GPIOF_PIN11, 0U) | PIN_AFIO_AF(GPIOF_PIN12, 0U) | PIN_AFIO_AF(GPIOF_PIN13, 0U) | PIN_AFIO_AF(GPIOF_PIN14, 0U) | PIN_AFIO_AF(GPIOF_PIN15, 0U)) #if !defined(_FROM_ASM_) -#ifdef __cplusplus +# ifdef __cplusplus extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus +# endif +void boardInit(void); +# ifdef __cplusplus } -#endif +# endif #endif /* _FROM_ASM_ */ #endif /* BOARD_H */ From 9241d11dc5f98a862fb58cb0c125d14451568e78 Mon Sep 17 00:00:00 2001 From: Keelhauler <41901381+Keelhauler@users.noreply.github.com> Date: Thu, 13 Feb 2020 14:35:53 -0600 Subject: [PATCH 274/331] [Keymap] Add personal keymap (#7338) * Copy default config * Copy and edit Preonic keymap layers * Update README --- keyboards/preonic/keymaps/keelhauler/config.h | 37 +++ keyboards/preonic/keymaps/keelhauler/keymap.c | 314 ++++++++++++++++++ .../preonic/keymaps/keelhauler/readme.md | 11 + keyboards/preonic/keymaps/keelhauler/rules.mk | 1 + 4 files changed, 363 insertions(+) create mode 100644 keyboards/preonic/keymaps/keelhauler/config.h create mode 100644 keyboards/preonic/keymaps/keelhauler/keymap.c create mode 100644 keyboards/preonic/keymaps/keelhauler/readme.md create mode 100644 keyboards/preonic/keymaps/keelhauler/rules.mk diff --git a/keyboards/preonic/keymaps/keelhauler/config.h b/keyboards/preonic/keymaps/keelhauler/config.h new file mode 100644 index 000000000000..40a9524b469d --- /dev/null +++ b/keyboards/preonic/keymaps/keelhauler/config.h @@ -0,0 +1,37 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/preonic/keymaps/keelhauler/keymap.c b/keyboards/preonic/keymaps/keelhauler/keymap.c new file mode 100644 index 000000000000..e83e40dfc5b2 --- /dev/null +++ b/keyboards/preonic/keymaps/keelhauler/keymap.c @@ -0,0 +1,314 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +// Tap and hold mods + // Enter into right shift + #define ENT_RSFT RSFT_T(KC_ENT) + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | PSCR |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ENT_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_PSCR, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | PSCR |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, ENT_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_PSCR, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | PSCR |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, ENT_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_PSCR, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Home | End | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Prev | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, KC_MPLY, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Pg Up| Pg Dn| Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Prev | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGUP, KC_PGDN, KC_MPLY, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + writePinHigh(E6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/keelhauler/readme.md b/keyboards/preonic/keymaps/keelhauler/readme.md new file mode 100644 index 000000000000..93c026d9c6f6 --- /dev/null +++ b/keyboards/preonic/keymaps/keelhauler/readme.md @@ -0,0 +1,11 @@ +# Keelhauler's Preonic layout + +## Aims to provide a more seamless transition from a normal full-size keyboard and layout to the otholinear 50% layout of the preonic than the stock keymap. + +## Includes some personal touches that I find more helpful than the stock keymaps. + +### Base Keymap Improvements + + FN key removed + Bottom left redesign from FN, CTRL, ALT, OS to CTRL, OS, ALT, PSCR + Enter functions as RShift when held, Enter when tapped diff --git a/keyboards/preonic/keymaps/keelhauler/rules.mk b/keyboards/preonic/keymaps/keelhauler/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/keelhauler/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 806cd392e70b81bbefdc06f111d2562ead4094ba Mon Sep 17 00:00:00 2001 From: Morton Jonuschat Date: Thu, 13 Feb 2020 19:30:32 -0800 Subject: [PATCH 275/331] [osx_neo2] Bugfixes and improvements to Ergodox macOS Neo2 keymap (#8154) * Use TAPPING_TERM constant (and redefine value to 200ms) * change TAPPING_TOGGLE to 2 to require two taps to lock in layer 4 * add support for Shift-Command 3/4/5 key combinations that are used in macOS Catalina * avoid false positive tap detecion for RMOD3 when the whole sequence of pressing RMOD3, tapping another key and releasing RMOD3 took less than TAPPING_TERM milliseconds. * replace SEND_STRING with tap_code()/tap_code16(), saving ~860 bytes in compiled firmware size. --- layouts/community/ergodox/osx_neo2/config.h | 7 ++ layouts/community/ergodox/osx_neo2/keymap.c | 113 +++++++++++++------- 2 files changed, 79 insertions(+), 41 deletions(-) create mode 100644 layouts/community/ergodox/osx_neo2/config.h diff --git a/layouts/community/ergodox/osx_neo2/config.h b/layouts/community/ergodox/osx_neo2/config.h new file mode 100644 index 000000000000..faa79da02622 --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/config.h @@ -0,0 +1,7 @@ +#pragma once + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 diff --git a/layouts/community/ergodox/osx_neo2/keymap.c b/layouts/community/ergodox/osx_neo2/keymap.c index 9e379c73f5a4..3dbfceabc431 100644 --- a/layouts/community/ergodox/osx_neo2/keymap.c +++ b/layouts/community/ergodox/osx_neo2/keymap.c @@ -5,6 +5,9 @@ // Timer to detect tap/hold on NEO_RMOD3 key static uint16_t neo3_timer; // State bitmap to track which key(s) enabled NEO_3 layer +// Bit 1 = LMOD state +// Bit 2 = RMOD state +// Bit 3 = Seen other keypress static uint8_t neo3_state = 0; // State bitmap to track key combo for CAPSLOCK static uint8_t capslock_state = 0; @@ -453,6 +456,7 @@ void tap_with_modifiers(uint16_t keycode, uint8_t force_modifiers) { bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) { uint8_t active_modifiers = get_mods(); uint8_t shifted = active_modifiers & MOD_MASK_SHIFT; + uint8_t command = active_modifiers & MOD_MASK_GUI; // Early return on key release if (!record->event.pressed) { @@ -465,67 +469,81 @@ bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case NEO2_1: // degree symbol - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_8) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + tap_code16(S(A(KC_8))); break; case NEO2_2: // section symbol - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_6) SS_UP(X_LALT)); + tap_code16(A(KC_6)); break; case NEO2_3: - // There is no OSX key combination for the script small l character + if (command) { + tap_code16(S(G(KC_3))); + } else { + // There is no OSX key combination for the script small l character + } break; case NEO2_4: - // right angled quote - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_BSLASH) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + if (command) { + tap_code16(S(G(KC_4))); + } else { + tap_code16(S(A(KC_BSLASH))); + } break; case NEO2_5: - // left angled quote - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_BSLASH) SS_UP(X_LALT)); + if (command) { + tap_code16(S(G(KC_5))); + } else { + // left angled quote + tap_code16(A(KC_BSLASH)); + } break; case NEO2_6: // dollar sign - SEND_STRING(SS_DOWN(X_LSHIFT) SS_TAP(X_4) SS_UP(X_LSHIFT)); + tap_code16(S(KC_4)); break; case NEO2_7: // euro sign - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_2) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + tap_code16(S(A(KC_2))); break; case NEO2_8: // low9 double quote - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_W) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + tap_code16(S(A(KC_W))); break; case NEO2_9: // left double quote - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_LBRACKET) SS_UP(X_LALT)); + tap_code16(A(KC_LBRACKET)); break; case NEO2_0: // right double quote - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_LBRACKET) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + tap_code16(S(A(KC_LBRACKET))); break; case NEO2_MINUS: // em dash - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_MINUS) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + tap_code16(S(A(KC_MINUS))); break; case NEO2_COMMA: // en dash - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_MINUS) SS_UP(X_LALT)); + tap_code16(A(KC_MINUS)); break; case NEO2_DOT: // bullet - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_8) SS_UP(X_LALT)); + tap_code16(A(KC_8)); break; case NEO2_SHARP_S: // german sharp s - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT)); + tap_code16(S(KC_S)); break; case NEO2_UE: - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_U) SS_UP(X_LSHIFT)); + tap_code16(A(KC_U)); + tap_code16(S(KC_U)); break; case NEO2_OE: - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_O) SS_UP(X_LSHIFT)); + tap_code16(A(KC_U)); + tap_code16(S(KC_O)); break; case NEO2_AE: - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_A) SS_UP(X_LSHIFT)); + tap_code16(A(KC_U)); + tap_code16(S(KC_A)); break; default: set_mods(active_modifiers); @@ -537,56 +555,59 @@ bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) { } else { switch (keycode) { case NEO2_1: - SEND_STRING(SS_TAP(X_1)); + tap_code(KC_1); break; case NEO2_2: - SEND_STRING(SS_TAP(X_2)); + tap_code(KC_2); break; case NEO2_3: - SEND_STRING(SS_TAP(X_3)); + tap_code(KC_3); break; case NEO2_4: - SEND_STRING(SS_TAP(X_4)); + tap_code(KC_4); break; case NEO2_5: - SEND_STRING(SS_TAP(X_5)); + tap_code(KC_5); break; case NEO2_6: - SEND_STRING(SS_TAP(X_6)); + tap_code(KC_6); break; case NEO2_7: - SEND_STRING(SS_TAP(X_7)); + tap_code(KC_7); break; case NEO2_8: - SEND_STRING(SS_TAP(X_8)); + tap_code(KC_8); break; case NEO2_9: - SEND_STRING(SS_TAP(X_9)); + tap_code(KC_9); break; case NEO2_0: - SEND_STRING(SS_TAP(X_0)); + tap_code(KC_0); break; case NEO2_MINUS: - SEND_STRING(SS_TAP(X_MINUS)); + tap_code(KC_MINUS); break; case NEO2_COMMA: - SEND_STRING(SS_TAP(X_COMMA)); + tap_code(KC_COMMA); break; case NEO2_DOT: - SEND_STRING(SS_TAP(X_DOT)); + tap_code(KC_DOT); break; case NEO2_SHARP_S: // german sharp s - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT)); + tap_code16(A(KC_S)); break; case NEO2_UE: - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_U)); + tap_code16(A(KC_U)); + tap_code(KC_U); break; case NEO2_OE: - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_O)); + tap_code16(A(KC_U)); + tap_code(KC_O); break; case NEO2_AE: - SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_A)); + tap_code16(A(KC_U)); + tap_code(KC_A); break; default: return true; @@ -619,7 +640,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { neo3_state |= (1 << 1); } else { // Turn off NEO_3 layer unless it's enabled through NEO2_RMOD3 as well. - if ((neo3_state & ~(1 << 1)) == 0) { + if ((neo3_state & (1 << 2)) == 0) { layer_off(NEO_3); } neo3_state &= ~(1 << 1); @@ -629,28 +650,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { neo3_timer = timer_read(); neo3_state |= (1 << 2); + // Reset tap detection state + neo3_state &= ~(1 << 3); layer_on(NEO_3); } else { // Turn off NEO_3 layer unless it's enabled through NEO2_LMOD3 as well. - if ((neo3_state & ~(1 << 2)) == 0) { + if ((neo3_state & (1 << 1)) == 0) { layer_off(NEO_3); } neo3_state &= ~(1 << 2); // Was the NEO2_RMOD3 key TAPPED? - if (timer_elapsed(neo3_timer) <= 150) { - if (neo3_state > 0) { + if (timer_elapsed(neo3_timer) <= TAPPING_TERM) { + if ((neo3_state & ~(1 << 3)) > 0) { // We are still in NEO_3 layer, send keycode and modifiers for @ tap_with_modifiers(KC_2, MOD_MASK_SHIFT); return false; } else { // Do the normal key processing, send y - tap_with_modifiers(KC_Y, MOD_MASK_NONE); + if ((neo3_state & (1 << 3)) == 0) { + tap_with_modifiers(KC_Y, MOD_MASK_NONE); + } return false; } } } break; + default: + if (record->event.pressed && neo3_state > 0) { + // Track that we've seen a separate keypress event + neo3_state |= (1 << 3); + } + break; } if ((capslock_state & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { From ac0947c9e8fc97797880cf96c983a718e6ada4a9 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 14 Feb 2020 17:20:18 +1100 Subject: [PATCH 276/331] Convert two handwired default keymaps to Dynamic Macro feature (#8166) --- .../handwired/daishi/keymaps/default/keymap.c | 12 +++--------- keyboards/handwired/daishi/rules.mk | 1 + .../space_oddity/keymaps/default/keymap.c | 17 ++++------------- keyboards/handwired/space_oddity/rules.mk | 1 + 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/keyboards/handwired/daishi/keymaps/default/keymap.c b/keyboards/handwired/daishi/keymaps/default/keymap.c index c0baf7006b93..eef82dd9b9f9 100644 --- a/keyboards/handwired/daishi/keymaps/default/keymap.c +++ b/keyboards/handwired/daishi/keymaps/default/keymap.c @@ -6,12 +6,9 @@ enum custom_keycodes { M_EXAMPLE1 = SAFE_RANGE, - M_EXAMPLE2, - DYNAMIC_MACRO_RANGE, + M_EXAMPLE2 }; -#include "dynamic_macro.h" - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -33,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QW] = LAYOUT( /* QWERTY */ - KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______,DYN_MACRO_PLAY1,DYN_MACRO_PLAY2,DYN_REC_STOP, KC_PSCR, KC_SLCK, KC_PAUS, MO(_FN), KC_MUTE, + KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_RSTP, KC_PSCR, KC_SLCK, KC_PAUS, MO(_FN), KC_MUTE, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_DEL , KC_HOME, KC_PGUP, KC_END , KC_INS , KC_NLCK, KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_PGDN, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_P7 , KC_P8 , KC_P9 , KC_PPLS, @@ -61,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = LAYOUT( /* Function */ - RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 ,DYN_REC_START1,DYN_REC_START2,DYN_REC_STOP, _______, _______, _______, MO(_FN), DEBUG, + RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , DM_REC1, DM_REC2, DM_RSTP, _______, _______, _______, MO(_FN), DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -72,9 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } if (record->event.pressed) { switch(keycode) { case M_EXAMPLE1: diff --git a/keyboards/handwired/daishi/rules.mk b/keyboards/handwired/daishi/rules.mk index dacecfb0b166..5e8cc85e6520 100644 --- a/keyboards/handwired/daishi/rules.mk +++ b/keyboards/handwired/daishi/rules.mk @@ -29,3 +29,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ENCODER_ENABLE = yes # Add rotary encoder support +DYNAMIC_MACRO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c index e7836353ecb6..8adb15cfdb50 100644 --- a/keyboards/handwired/space_oddity/keymaps/default/keymap.c +++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c @@ -24,9 +24,7 @@ enum custom_keycodes { PAIR_PR, PAIR_BR, PAIR_CB, - LAMBDA, - DYNAMIC_MACRO_RANGE, - + LAMBDA }; // Tap Dance initializer. @@ -36,8 +34,6 @@ enum { }; -#include "dynamic_macro.h" - // Tap dance actions - double tap for Caps Lock. qk_tap_dance_action_t tap_dance_actions[] = { @@ -71,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [0] = LAYOUT( \ - PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \ + PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DM_PLY1, DM_PLY2, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ @@ -105,8 +101,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [1] = LAYOUT( \ - LAMBDA, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, \ - DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, \ + LAMBDA, _______, _______, _______, _______, DM_REC1, DM_REC2, \ + DM_RSTP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, \ _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, \ KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, \ _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, _______, \ @@ -160,11 +156,6 @@ void matrix_scan_user(void) { // // Customize to your heart's content! bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - switch (keycode) { case PAIR_PR: diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk index 43fc1f34a3dc..a2e63690bd36 100644 --- a/keyboards/handwired/space_oddity/rules.mk +++ b/keyboards/handwired/space_oddity/rules.mk @@ -25,3 +25,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = no TAP_DANCE_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes \ No newline at end of file From 66177aa5e04bd4fbde758907412ce2c902430367 Mon Sep 17 00:00:00 2001 From: Brandon Schlack Date: Thu, 13 Feb 2020 22:22:31 -0800 Subject: [PATCH 277/331] Add community layout support to Mysterium (#8164) --- keyboards/coseyfannitutti/mysterium/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/coseyfannitutti/mysterium/rules.mk b/keyboards/coseyfannitutti/mysterium/rules.mk index 9c518e938dce..453aef8ab6e7 100644 --- a/keyboards/coseyfannitutti/mysterium/rules.mk +++ b/keyboards/coseyfannitutti/mysterium/rules.mk @@ -37,3 +37,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = tkl_ansi From 4eed0331bf0876db0d557f86c7d4ef599ff0e6c4 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 14 Feb 2020 00:42:57 -0800 Subject: [PATCH 278/331] Just60 Configurator layout support and thinxer keymap (#7761) * Just60 Configurator layout support * adds thinxer keymap, which is the default keymap with QMK DFU bootloader --- keyboards/just60/info.json | 77 ++++++++++++++++++++++ keyboards/just60/keymaps/thinxer/keymap.c | 50 ++++++++++++++ keyboards/just60/keymaps/thinxer/readme.md | 19 ++++++ keyboards/just60/keymaps/thinxer/rules.mk | 1 + 4 files changed, 147 insertions(+) create mode 100644 keyboards/just60/info.json create mode 100644 keyboards/just60/keymaps/thinxer/keymap.c create mode 100644 keyboards/just60/keymaps/thinxer/readme.md create mode 100644 keyboards/just60/keymaps/thinxer/rules.mk diff --git a/keyboards/just60/info.json b/keyboards/just60/info.json new file mode 100644 index 000000000000..6b42a2d58f98 --- /dev/null +++ b/keyboards/just60/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Just60", + "url": "", + "maintainer": "thinxer", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc/`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Fn", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.75}, + {"label":"Alt", "x":1.75, "y":4, "w":1.25}, + {"label":"GUI", "x":3, "y":4, "w":1.25}, + {"label":"Fn/Space", "x":4.25, "y":4, "w":1.25}, + {"label":"Space", "x":5.5, "y":4, "w":3}, + {"label":"GUI", "x":8.5, "y":4, "w":1.25}, + {"label":"Alt", "x":9.75, "y":4, "w":1.25}, + {"label":"Left", "x":11, "y":4}, + {"label":"Down", "x":12, "y":4}, + {"label":"Up", "x":13, "y":4}, + {"label":"Right", "x":14, "y":4} + ] + } + } +} diff --git a/keyboards/just60/keymaps/thinxer/keymap.c b/keyboards/just60/keymaps/thinxer/keymap.c new file mode 100644 index 000000000000..da034e0e447e --- /dev/null +++ b/keyboards/just60/keymaps/thinxer/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 Jianfei Wang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _COMMAND +}; + +#define FN_SPC LT(_FN, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, FN_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [_FN] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + KC_CAPS, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, MO(_COMMAND), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + [_COMMAND] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/just60/keymaps/thinxer/readme.md b/keyboards/just60/keymaps/thinxer/readme.md new file mode 100644 index 000000000000..9cd12c192f6c --- /dev/null +++ b/keyboards/just60/keymaps/thinxer/readme.md @@ -0,0 +1,19 @@ +# thinxer keymap for Just60 + +This is a duplicate of the default keymap, but for a Just60 with the QMK DFU bootloader. + +This layout is an ANSI layout with a Minila spacebar row. + +``` + +-------------------------------------------------------------------------+ + | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + +-------------------------------------------------------------------------+ + | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + +-------------------------------------------------------------------------+ + | FN | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | + +-------------------------------------------------------------------------+ + | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | + +-------------------------------------------------------------------------+ + | LCMD | LALT | LGUI | FN | SPACE | RGUI | RALT | LEFT | DOWN | UP | RGHT | + +-------------------------------------------------------------------------+ +``` diff --git a/keyboards/just60/keymaps/thinxer/rules.mk b/keyboards/just60/keymaps/thinxer/rules.mk new file mode 100644 index 000000000000..0613ea8667c0 --- /dev/null +++ b/keyboards/just60/keymaps/thinxer/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = qmk-dfu From eb1f99c5f971ce939d18e236ac85edaf0de00401 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Fri, 14 Feb 2020 11:03:35 -0800 Subject: [PATCH 279/331] [keymap] Update audio controls on community (#8163) * Update audio controls on community * Add rules for various boards * TKL support --- .../60_ansi_split_bs_rshift/yanfali/keymap.c | 2 +- layouts/community/60_hhkb/yanfali/keymap.c | 2 +- .../60_tsangan_hhkb/yanfali/keymap.c | 2 +- layouts/community/75_ansi/yanfali/keymap.c | 2 +- layouts/community/tkl_ansi/yanfali/keymap.c | 25 +++++++++++++++++++ users/yanfali/rules.mk | 15 +++++++++-- 6 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 layouts/community/tkl_ansi/yanfali/keymap.c diff --git a/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c b/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c index 5e5d16390923..49a906c273a0 100644 --- a/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c @@ -26,6 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, \ KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______), }; diff --git a/layouts/community/60_hhkb/yanfali/keymap.c b/layouts/community/60_hhkb/yanfali/keymap.c index 98649ca4b9f6..798f581e9621 100644 --- a/layouts/community/60_hhkb/yanfali/keymap.c +++ b/layouts/community/60_hhkb/yanfali/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ _______, RGB_TOG, KC_UP, RGB_RMOD, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, \ KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ - KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/layouts/community/60_tsangan_hhkb/yanfali/keymap.c b/layouts/community/60_tsangan_hhkb/yanfali/keymap.c index a6cd15f4e2e5..31f0a66f291e 100644 --- a/layouts/community/60_tsangan_hhkb/yanfali/keymap.c +++ b/layouts/community/60_tsangan_hhkb/yanfali/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/layouts/community/75_ansi/yanfali/keymap.c b/layouts/community/75_ansi/yanfali/keymap.c index 729e7d6acade..f63da237c157 100644 --- a/layouts/community/75_ansi/yanfali/keymap.c +++ b/layouts/community/75_ansi/yanfali/keymap.c @@ -20,6 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_INC, BL_DEC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, - VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, + VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END) }; diff --git a/layouts/community/tkl_ansi/yanfali/keymap.c b/layouts/community/tkl_ansi/yanfali/keymap.c new file mode 100644 index 000000000000..06c9507aff24 --- /dev/null +++ b/layouts/community/tkl_ansi/yanfali/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +enum _layer { + BASE, + FN +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_tkl_ansi( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + MT(MOD_LCTL, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RGUI,MO(FN) ,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT), + [FN] = LAYOUT_tkl_ansi( \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,EEP_RST, _______,_______,KC_VOLU, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, _______,_______,KC_VOLD, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,KC_MUTE,KC_VOLD,KC_VOLU,_______, _______, KC_MPLY, \ + _______,_______,_______, _______, _______,_______,MO(FN) ,_______, KC_MPRV,KC_MSTP,KC_MNXT) +}; +// clang-format on diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index c43f298588cb..a4f1092d0c74 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk @@ -3,14 +3,25 @@ DYNAMIC_KEYMAP_ENABLE = no CONSOLE_ENABLE = yes COMMAND_ENABLE = yes LINK_TIME_OPTIMIZATION_ENABLE = yes +AUDIO_ENABLE = no # only enable audio on specific boards ifeq ($(strip $(KEYBOARD)), maartenwut/plain60) AUDIO_ENABLE = yes -else - AUDIO_ENABLE = no +endif + +ifeq ($(strip $(KEYBOARD)), clueboard/60) + AUDIO_ENABLE = yes +endif + +ifeq ($(strip $(KEYBOARD)), hadron/ver3) + AUDIO_ENABLE = yes endif ifeq ($(strip $(KEYBOARD)), fruity60) COMMAND_ENABLE = no endif + +ifeq ($(strip $(KEYBOARD)), kbdfans/kbd75/rev1) + COMMAND_ENABLE = no +endif From 348266bd5b6c6c79c292e3df9442a19d99873b5c Mon Sep 17 00:00:00 2001 From: morbetter <60626808+morbetter@users.noreply.github.com> Date: Fri, 14 Feb 2020 11:31:48 -0800 Subject: [PATCH 280/331] Adding VIA support for 40percentclub/luddite (#8158) * Adding VIA support for 40percentclub/luddite * Update config.h * Update rules.mk * Delete config.h config.h was created to override the "default" of RGBLED_NUM 8 deleting the file to keep with defaults * Removing block and comment as suggested * Update PRODUCT_ID Changing from: #define PRODUCT_ID 0x0A0C To: #define PRODUCT_ID 0x4C55 // "LU" * Changing Vendor ID Changing Vendor ID from: #define VENDOR_ID 0xFEED To: #define VENDOR_ID 0x3430 // "40" --- keyboards/40percentclub/luddite/config.h | 4 +-- .../luddite/keymaps/via/keymap.c | 35 +++++++++++++++++++ .../luddite/keymaps/via/rules.mk | 2 ++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 keyboards/40percentclub/luddite/keymaps/via/keymap.c create mode 100644 keyboards/40percentclub/luddite/keymaps/via/rules.mk diff --git a/keyboards/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h index 005cb7a705e8..63158f6c41fc 100644 --- a/keyboards/40percentclub/luddite/config.h +++ b/keyboards/40percentclub/luddite/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0A0C +#define VENDOR_ID 0x3430 // "40" +#define PRODUCT_ID 0x4C55 // "LU" #define DEVICE_VER 0x1001 #define MANUFACTURER di0ib #define PRODUCT Luddite diff --git a/keyboards/40percentclub/luddite/keymaps/via/keymap.c b/keyboards/40percentclub/luddite/keymaps/via/keymap.c new file mode 100644 index 000000000000..df732befaa62 --- /dev/null +++ b/keyboards/40percentclub/luddite/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + LT(1,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT,KC_UP), + KC_LCTL, KC_LGUI, KC_LALT , KC_SPC, KC_RALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL,KC_RGHT) + ), + + [1] = LAYOUT_60_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_HOME, KC_END, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_INS, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MENU, KC_TRNS + ), + + [2] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_INC, BL_DEC, KC_TRNS, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/40percentclub/luddite/keymaps/via/rules.mk b/keyboards/40percentclub/luddite/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/40percentclub/luddite/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 409c610543ffb62677d1162be868a2e44913a943 Mon Sep 17 00:00:00 2001 From: Erovia Date: Tue, 8 Oct 2019 21:50:21 +0200 Subject: [PATCH 281/331] CLI: add support for list_keymaps List all the available keymaps for a given keyboard --- lib/python/qmk/cli/list/__init__.py | 1 + lib/python/qmk/cli/list/keymaps.py | 84 +++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 lib/python/qmk/cli/list/keymaps.py diff --git a/lib/python/qmk/cli/list/__init__.py b/lib/python/qmk/cli/list/__init__.py index c36ba69548ed..d83cd20b5b49 100644 --- a/lib/python/qmk/cli/list/__init__.py +++ b/lib/python/qmk/cli/list/__init__.py @@ -1 +1,2 @@ from . import keyboards +from . import keymaps diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py new file mode 100644 index 000000000000..709a5b9f907c --- /dev/null +++ b/lib/python/qmk/cli/list/keymaps.py @@ -0,0 +1,84 @@ +"""List the keymaps for a specific keyboard +""" +import os +import re +import glob +from bs4 import UnicodeDammit + +from milc import cli + +def unicode_text(filename): + """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. + """ + with open(filename, 'rb') as fd: + text = UnicodeDammit(fd.read()) + + if text.contains_replacement_characters: + log_warning('%s: Could not determine file encoding, some characters were replaced.' % (filename,)) + + return text.unicode_markup or '' + + +def unicode_lines(filename): + """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. + """ + return unicode_text(filename).split('\n') + +def parse_rules_mk(keyboard): + base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep + rules_mk_path_wildcard = os.path.join(base_path, "**", "rules.mk") + paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive=True) if "keymaps" not in path] + + rules_mk = list() + for file in paths: + rules_mk_content = unicode_lines(file) + parsed_file = dict() + for line in rules_mk_content: + found = re.search(r'^\s*(\w+)\s*=\s*((?:\s*\w+)+)', line) + if found: + parsed_file[found.group(1)] = found.group(2) + rules_mk.append(parsed_file) + return rules_mk + +@cli.argument('-kb', '--keyboard', help='Specify keyboard name. Example: 1upkeyboards/1up60hse') +@cli.subcommand("List the keymaps for a specific keyboard") +def list_keymaps(cli): + """List the keymaps for a specific keyboard + """ + # ask for user input if keyboard was not provided in the command line + keyboard = cli.config.list_keymaps.keyboard if cli.config.list_keymaps.keyboard else input("Keyboard Name: ") + + kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep + km_path_wildcard = os.path.join(kb_base_path, "**", "keymap.c") + + # find everywhere we have rules.mk where keymaps isn't in the path + km_paths = [path for path in glob.iglob(km_path_wildcard, recursive=True) if 'keymaps' in path] + + # replace the keyboard directory's path prefix with the keyboard's name and remove the keymap.c suffix + km_find_name = lambda path: path.replace(kb_base_path, keyboard + os.path.sep).replace("/keymaps/", ":").replace(os.path.sep + "keymap.c", "") + names = list(map(km_find_name, km_paths)) + + # get all the rules.mk files for the keyboard + rules_mk = parse_rules_mk(keyboard) + + # find all the supported layouts + all_supported_layouts = set() + for version in rules_mk: + if "LAYOUTS" in version: + for layout in version["LAYOUTS"].split(): + all_supported_layouts.add(layout) + + for layout in all_supported_layouts: + cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep + cl_path_wildcard = os.path.join(cl_base_path, "**", "keymap.c") + # find all the keymap.c files under the community layouts + cl_paths = [path for path in glob.iglob(cl_path_wildcard, recursive=True)] + # replace the community layouts directory's path with the keyboard's name and remove the keymap.c suffix + cl_find_name = lambda path: path.replace(cl_base_path, keyboard + ":").replace(os.path.sep + "keymap.c", "") + names = names + list(map(cl_find_name, cl_paths)) + + names.sort() + + for name in names: + # We echo instead of cli.log.info to allow easier piping of this output + cli.echo(name) From 1d3271999aa19fbde65ae39f8685511b70b2844d Mon Sep 17 00:00:00 2001 From: Erovia Date: Wed, 9 Oct 2019 08:10:59 +0200 Subject: [PATCH 282/331] Add bs4 to requirements.txt UnicodeDammit is needed from bs4 for reading files. --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 074b11a8ceed..bf4f411ede6c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,4 @@ hjson nose2 flake8 pep8-naming +bs4 From 057c7d0ffeae617ef8bf2e4ca083fed30e689f27 Mon Sep 17 00:00:00 2001 From: Erovia Date: Wed, 9 Oct 2019 10:14:53 +0200 Subject: [PATCH 283/331] Major update to work better with revisions Find the community keymaps supported by each revision. --- lib/python/qmk/cli/list/keymaps.py | 45 ++++++++++++++---------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index 709a5b9f907c..d55ff91fc3e3 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -29,7 +29,7 @@ def parse_rules_mk(keyboard): rules_mk_path_wildcard = os.path.join(base_path, "**", "rules.mk") paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive=True) if "keymaps" not in path] - rules_mk = list() + rules_mk = dict() for file in paths: rules_mk_content = unicode_lines(file) parsed_file = dict() @@ -37,9 +37,18 @@ def parse_rules_mk(keyboard): found = re.search(r'^\s*(\w+)\s*=\s*((?:\s*\w+)+)', line) if found: parsed_file[found.group(1)] = found.group(2) - rules_mk.append(parsed_file) + version = file.replace(base_path, "").replace(os.path.sep, "").replace("rules.mk", "") + rules_mk[version if version else "base"] = parsed_file return rules_mk +def find_keymaps(base_path, name_finder, community = False): + path_wildcard = os.path.join(base_path, "**", "keymap.c") + if community: + paths = [path for path in glob.iglob(path_wildcard, recursive=True)] + else: + paths = [path for path in glob.iglob(path_wildcard, recursive=True) if 'keymaps' in path] + return list(map(name_finder, paths)) + @cli.argument('-kb', '--keyboard', help='Specify keyboard name. Example: 1upkeyboards/1up60hse') @cli.subcommand("List the keymaps for a specific keyboard") def list_keymaps(cli): @@ -49,33 +58,21 @@ def list_keymaps(cli): keyboard = cli.config.list_keymaps.keyboard if cli.config.list_keymaps.keyboard else input("Keyboard Name: ") kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep - km_path_wildcard = os.path.join(kb_base_path, "**", "keymap.c") - - # find everywhere we have rules.mk where keymaps isn't in the path - km_paths = [path for path in glob.iglob(km_path_wildcard, recursive=True) if 'keymaps' in path] - - # replace the keyboard directory's path prefix with the keyboard's name and remove the keymap.c suffix km_find_name = lambda path: path.replace(kb_base_path, keyboard + os.path.sep).replace("/keymaps/", ":").replace(os.path.sep + "keymap.c", "") - names = list(map(km_find_name, km_paths)) + names = find_keymaps(kb_base_path, km_find_name) # get all the rules.mk files for the keyboard rules_mk = parse_rules_mk(keyboard) - # find all the supported layouts - all_supported_layouts = set() - for version in rules_mk: - if "LAYOUTS" in version: - for layout in version["LAYOUTS"].split(): - all_supported_layouts.add(layout) - - for layout in all_supported_layouts: - cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep - cl_path_wildcard = os.path.join(cl_base_path, "**", "keymap.c") - # find all the keymap.c files under the community layouts - cl_paths = [path for path in glob.iglob(cl_path_wildcard, recursive=True)] - # replace the community layouts directory's path with the keyboard's name and remove the keymap.c suffix - cl_find_name = lambda path: path.replace(cl_base_path, keyboard + ":").replace(os.path.sep + "keymap.c", "") - names = names + list(map(cl_find_name, cl_paths)) + for version, data in rules_mk.items(): + if "LAYOUTS" in data: + if version == "base": + cl_find_name = lambda path: path.replace(cl_base_path, keyboard + ":").replace(os.path.sep + "keymap.c", "") + else: + cl_find_name = lambda path: path.replace(cl_base_path, keyboard + os.path.sep + version + ":").replace(os.path.sep + "keymap.c", "") + for layout in data["LAYOUTS"].split(): + cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep + names = names + find_keymaps(cl_base_path, cl_find_name, community = True) names.sort() From 62c1bcba71245e64be9a4813d749c0f04805fbcb Mon Sep 17 00:00:00 2001 From: Erovia Date: Wed, 9 Oct 2019 20:53:18 +0200 Subject: [PATCH 284/331] Get all buildable keymaps for each revision The command now return all keymaps that's buildable for a keyboard/revision. If the base directory of a keyboard does not contain a 'rules.mk' file, nothing is returned. If the base directory contains a 'keymaps' directory, those keycaps will be returned for every revision. --- lib/python/qmk/cli/list/keymaps.py | 59 ++++++++++++++++-------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index d55ff91fc3e3..2f3014f46463 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -10,72 +10,77 @@ def unicode_text(filename): """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. """ - with open(filename, 'rb') as fd: + with open(filename, "rb") as fd: text = UnicodeDammit(fd.read()) if text.contains_replacement_characters: - log_warning('%s: Could not determine file encoding, some characters were replaced.' % (filename,)) + log_warning("%s: Could not determine file encoding, some characters were replaced." % (filename,)) - return text.unicode_markup or '' + return text.unicode_markup or "" def unicode_lines(filename): """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. """ - return unicode_text(filename).split('\n') + return unicode_text(filename).split("\n") -def parse_rules_mk(keyboard): +def parse_rules_mk(keyboard, revision = ""): base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep rules_mk_path_wildcard = os.path.join(base_path, "**", "rules.mk") - paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive=True) if "keymaps" not in path] + rules_mk_regex = re.compile(r"^" + base_path + "(?:" + revision + os.path.sep + ")?rules.mk") + paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive = True) if rules_mk_regex.search(path)] rules_mk = dict() - for file in paths: - rules_mk_content = unicode_lines(file) + config_regex = re.compile(r"^\s*(\S+)\s*=\s*((?:\s*\S+)+)") + for file_path in paths: + rules_mk_content = unicode_lines(file_path) parsed_file = dict() for line in rules_mk_content: - found = re.search(r'^\s*(\w+)\s*=\s*((?:\s*\w+)+)', line) + found = config_regex.search(line) if found: parsed_file[found.group(1)] = found.group(2) - version = file.replace(base_path, "").replace(os.path.sep, "").replace("rules.mk", "") + version = file_path.replace(base_path, "").replace(os.path.sep, "").replace("rules.mk", "") rules_mk[version if version else "base"] = parsed_file return rules_mk -def find_keymaps(base_path, name_finder, community = False): +def find_keymaps(base_path, revision = "", community = False): path_wildcard = os.path.join(base_path, "**", "keymap.c") if community: - paths = [path for path in glob.iglob(path_wildcard, recursive=True)] + path_regex = re.compile(r"^" + re.escape(base_path) + "(\S+)" + os.path.sep + "keymap\.c") + names = [revision + os.path.sep + path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True)] else: - paths = [path for path in glob.iglob(path_wildcard, recursive=True) if 'keymaps' in path] - return list(map(name_finder, paths)) + path_regex = re.compile(r"^" + re.escape(base_path) + "(?:" + re.escape(revision) + os.path.sep + ")?keymaps" + os.path.sep + "(\S+)" + os.path.sep + "keymap\.c") + names = [revision + os.path.sep + path_regex.sub(lambda name: name.group(1), path) if revision else path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True) if path_regex.search(path)] + return names -@cli.argument('-kb', '--keyboard', help='Specify keyboard name. Example: 1upkeyboards/1up60hse') +@cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse") +@cli.argument("-rv", "--revision", help="Specify the revison name. All revision if not specified. Example: rev6") @cli.subcommand("List the keymaps for a specific keyboard") def list_keymaps(cli): """List the keymaps for a specific keyboard """ # ask for user input if keyboard was not provided in the command line keyboard = cli.config.list_keymaps.keyboard if cli.config.list_keymaps.keyboard else input("Keyboard Name: ") - - kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep - km_find_name = lambda path: path.replace(kb_base_path, keyboard + os.path.sep).replace("/keymaps/", ":").replace(os.path.sep + "keymap.c", "") - names = find_keymaps(kb_base_path, km_find_name) + revision = cli.config.list_keymaps.revision if cli.config.list_keymaps.revision else "" # get all the rules.mk files for the keyboard - rules_mk = parse_rules_mk(keyboard) + rules_mk = parse_rules_mk(keyboard, revision) + + if "base" in rules_mk or revision: + keyboard_name = keyboard + os.path.sep + revision + kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep + names = find_keymaps(kb_base_path, revision) + else: + names = list() - for version, data in rules_mk.items(): + for rev, data in rules_mk.items(): if "LAYOUTS" in data: - if version == "base": - cl_find_name = lambda path: path.replace(cl_base_path, keyboard + ":").replace(os.path.sep + "keymap.c", "") - else: - cl_find_name = lambda path: path.replace(cl_base_path, keyboard + os.path.sep + version + ":").replace(os.path.sep + "keymap.c", "") for layout in data["LAYOUTS"].split(): cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep - names = names + find_keymaps(cl_base_path, cl_find_name, community = True) + names = names + find_keymaps(cl_base_path, rev, community = True) names.sort() for name in names: # We echo instead of cli.log.info to allow easier piping of this output - cli.echo(name) + cli.echo(keyboard + os.path.sep + name) From c3b168e6fd8d414f95401dba471bdf6c12240d89 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 10 Oct 2019 18:54:12 +0200 Subject: [PATCH 285/331] Fix help message. --- lib/python/qmk/cli/list/keymaps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index 2f3014f46463..6cb21593f4d6 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -54,7 +54,7 @@ def find_keymaps(base_path, revision = "", community = False): return names @cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse") -@cli.argument("-rv", "--revision", help="Specify the revison name. All revision if not specified. Example: rev6") +@cli.argument("-rv", "--revision", help="Specify the revison name. Example: rev6") @cli.subcommand("List the keymaps for a specific keyboard") def list_keymaps(cli): """List the keymaps for a specific keyboard From e46cc2db8c4668b05ed873f57a54785ed56e2415 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 10 Oct 2019 22:58:52 +0200 Subject: [PATCH 286/331] Try to figure out revision, drop -rv/--revision argument --- lib/python/qmk/cli/list/keymaps.py | 66 +++++++++++++++--------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index 6cb21593f4d6..f3a1f2a50f72 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -26,61 +26,63 @@ def unicode_lines(filename): def parse_rules_mk(keyboard, revision = ""): base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep - rules_mk_path_wildcard = os.path.join(base_path, "**", "rules.mk") - rules_mk_regex = re.compile(r"^" + base_path + "(?:" + revision + os.path.sep + ")?rules.mk") - paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive = True) if rules_mk_regex.search(path)] - rules_mk = dict() - config_regex = re.compile(r"^\s*(\S+)\s*=\s*((?:\s*\S+)+)") - for file_path in paths: - rules_mk_content = unicode_lines(file_path) - parsed_file = dict() - for line in rules_mk_content: - found = config_regex.search(line) - if found: - parsed_file[found.group(1)] = found.group(2) - version = file_path.replace(base_path, "").replace(os.path.sep, "").replace("rules.mk", "") - rules_mk[version if version else "base"] = parsed_file + if os.path.exists(base_path + os.path.sep + revision): + rules_mk_path_wildcard = os.path.join(base_path, "**", "rules.mk") + rules_mk_regex = re.compile(r"^" + base_path + "(?:" + revision + os.path.sep + ")?rules.mk") + paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive = True) if rules_mk_regex.search(path)] + + config_regex = re.compile(r"^\s*(\S+)\s*=\s*((?:\s*\S+)+)") + for file_path in paths: + rules_mk_content = unicode_lines(file_path) + parsed_file = dict() + for line in rules_mk_content: + found = config_regex.search(line) + if found: + parsed_file[found.group(1)] = found.group(2) + version = file_path.replace(base_path, "").replace(os.path.sep, "").replace("rules.mk", "") + rules_mk[version if version else "base"] = parsed_file return rules_mk def find_keymaps(base_path, revision = "", community = False): path_wildcard = os.path.join(base_path, "**", "keymap.c") if community: path_regex = re.compile(r"^" + re.escape(base_path) + "(\S+)" + os.path.sep + "keymap\.c") - names = [revision + os.path.sep + path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True)] else: path_regex = re.compile(r"^" + re.escape(base_path) + "(?:" + re.escape(revision) + os.path.sep + ")?keymaps" + os.path.sep + "(\S+)" + os.path.sep + "keymap\.c") - names = [revision + os.path.sep + path_regex.sub(lambda name: name.group(1), path) if revision else path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True) if path_regex.search(path)] + names = [path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True) if path_regex.search(path)] return names @cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse") -@cli.argument("-rv", "--revision", help="Specify the revison name. Example: rev6") @cli.subcommand("List the keymaps for a specific keyboard") def list_keymaps(cli): """List the keymaps for a specific keyboard """ # ask for user input if keyboard was not provided in the command line - keyboard = cli.config.list_keymaps.keyboard if cli.config.list_keymaps.keyboard else input("Keyboard Name: ") - revision = cli.config.list_keymaps.revision if cli.config.list_keymaps.revision else "" + keyboard_name = cli.config.list_keymaps.keyboard if cli.config.list_keymaps.keyboard else input("Keyboard Name: ") + if os.path.sep in keyboard_name: + keyboard, revision = os.path.split(os.path.normpath(keyboard_name)) + else: + keyboard = keyboard_name + revision = "" # get all the rules.mk files for the keyboard rules_mk = parse_rules_mk(keyboard, revision) + names = list() - if "base" in rules_mk or revision: - keyboard_name = keyboard + os.path.sep + revision - kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep - names = find_keymaps(kb_base_path, revision) - else: - names = list() + if rules_mk: + if "base" in rules_mk or revision: + kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep + names = find_keymaps(kb_base_path, revision) - for rev, data in rules_mk.items(): - if "LAYOUTS" in data: - for layout in data["LAYOUTS"].split(): - cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep - names = names + find_keymaps(cl_base_path, rev, community = True) + for rev, data in rules_mk.items(): + if "LAYOUTS" in data: + for layout in data["LAYOUTS"].split(): + cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep + names = names + find_keymaps(cl_base_path, rev, community = True) - names.sort() + names.sort() for name in names: # We echo instead of cli.log.info to allow easier piping of this output - cli.echo(keyboard + os.path.sep + name) + cli.echo(keyboard_name + os.path.sep + name) From f96085af3877a8c42d0767d13d47c239ce08ef0f Mon Sep 17 00:00:00 2001 From: Erovia Date: Fri, 11 Oct 2019 17:15:29 +0200 Subject: [PATCH 287/331] Fix output format --- lib/python/qmk/cli/list/keymaps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index f3a1f2a50f72..5aed37b817b5 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -85,4 +85,4 @@ def list_keymaps(cli): for name in names: # We echo instead of cli.log.info to allow easier piping of this output - cli.echo(keyboard_name + os.path.sep + name) + cli.echo(keyboard_name + ":" + name) From 26f53d38d932a21be9edfc3d55e585c21050c3a2 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 13 Oct 2019 19:07:22 +0200 Subject: [PATCH 288/331] Another major refactoring, add documentation Move all useful functions to the qmk module and use the cli subcommand as a wrapper around it. Add both inline comments and documentation. --- docs/cli.md | 10 ++++ lib/python/qmk/cli/list/keymaps.py | 84 +++--------------------------- lib/python/qmk/keymap.py | 59 +++++++++++++++++++++ lib/python/qmk/makefile.py | 77 +++++++++++++++++++++++++++ lib/python/qmk/path.py | 18 +++++++ 5 files changed, 172 insertions(+), 76 deletions(-) create mode 100644 lib/python/qmk/makefile.py diff --git a/docs/cli.md b/docs/cli.md index f1c158af44c3..f2b433fbbfdf 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -252,6 +252,16 @@ This command lists all the keyboards currently defined in `qmk_firmware` qmk list-keyboards ``` +## `qmk list_keymaps` + +This command lists all the keymaps for a specified keyboard (and revision). + +**Usage**: + +``` +qmk list_keymaps -kb planck/ez +``` + ## `qmk new-keymap` This command creates a new keymap based on a keyboard's existing default keymap. diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index 5aed37b817b5..494fe66a1214 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -1,57 +1,8 @@ """List the keymaps for a specific keyboard """ -import os -import re -import glob -from bs4 import UnicodeDammit - from milc import cli - -def unicode_text(filename): - """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. - """ - with open(filename, "rb") as fd: - text = UnicodeDammit(fd.read()) - - if text.contains_replacement_characters: - log_warning("%s: Could not determine file encoding, some characters were replaced." % (filename,)) - - return text.unicode_markup or "" - - -def unicode_lines(filename): - """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. - """ - return unicode_text(filename).split("\n") - -def parse_rules_mk(keyboard, revision = ""): - base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep - rules_mk = dict() - if os.path.exists(base_path + os.path.sep + revision): - rules_mk_path_wildcard = os.path.join(base_path, "**", "rules.mk") - rules_mk_regex = re.compile(r"^" + base_path + "(?:" + revision + os.path.sep + ")?rules.mk") - paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive = True) if rules_mk_regex.search(path)] - - config_regex = re.compile(r"^\s*(\S+)\s*=\s*((?:\s*\S+)+)") - for file_path in paths: - rules_mk_content = unicode_lines(file_path) - parsed_file = dict() - for line in rules_mk_content: - found = config_regex.search(line) - if found: - parsed_file[found.group(1)] = found.group(2) - version = file_path.replace(base_path, "").replace(os.path.sep, "").replace("rules.mk", "") - rules_mk[version if version else "base"] = parsed_file - return rules_mk - -def find_keymaps(base_path, revision = "", community = False): - path_wildcard = os.path.join(base_path, "**", "keymap.c") - if community: - path_regex = re.compile(r"^" + re.escape(base_path) + "(\S+)" + os.path.sep + "keymap\.c") - else: - path_regex = re.compile(r"^" + re.escape(base_path) + "(?:" + re.escape(revision) + os.path.sep + ")?keymaps" + os.path.sep + "(\S+)" + os.path.sep + "keymap\.c") - names = [path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True) if path_regex.search(path)] - return names +import qmk.keymap +from qmk.errors import NoSuchKeyboardError @cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse") @cli.subcommand("List the keymaps for a specific keyboard") @@ -60,29 +11,10 @@ def list_keymaps(cli): """ # ask for user input if keyboard was not provided in the command line keyboard_name = cli.config.list_keymaps.keyboard if cli.config.list_keymaps.keyboard else input("Keyboard Name: ") - if os.path.sep in keyboard_name: - keyboard, revision = os.path.split(os.path.normpath(keyboard_name)) - else: - keyboard = keyboard_name - revision = "" - - # get all the rules.mk files for the keyboard - rules_mk = parse_rules_mk(keyboard, revision) - names = list() - - if rules_mk: - if "base" in rules_mk or revision: - kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep - names = find_keymaps(kb_base_path, revision) - - for rev, data in rules_mk.items(): - if "LAYOUTS" in data: - for layout in data["LAYOUTS"].split(): - cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep - names = names + find_keymaps(cl_base_path, rev, community = True) - - names.sort() - for name in names: - # We echo instead of cli.log.info to allow easier piping of this output - cli.echo(keyboard_name + ":" + name) + try: + for name in qmk.keymap.list_keymaps(keyboard_name): + # We echo instead of cli.log.info to allow easier piping of this output + cli.echo(keyboard_name + ":" + name) + except NoSuchKeyboardError as e: + cli.echo("{fg_red}" + e.message) diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index f4a2893f3855..3927f791a6bd 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -1,8 +1,13 @@ """Functions that help you work with QMK keymaps. """ import os +from traceback import format_exc +import re +import glob import qmk.path +import qmk.makefile +from qmk.errors import NoSuchKeyboardError # The `keymap.c` template to use when a keyboard doesn't have its own DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H @@ -94,3 +99,57 @@ def write(keyboard, keymap, layout, layers): keymap_fd.write(keymap_c) return keymap_file + +def find_keymaps(base_path, revision = "", community = False): + """ Find the available keymaps for a keyboard and revision pair. + + Args: + base_path: The base path of the keyboard. + + revision: The keyboard's revision. + + community: Set to True for the layouts under layouts/community. + + Returns: + a list with whe keymaps's names + """ + path_wildcard = os.path.join(base_path, "**", "keymap.c") + if community: + path_regex = re.compile(r"^" + re.escape(base_path) + "(\S+)" + os.path.sep + "keymap\.c") + else: + path_regex = re.compile(r"^" + re.escape(base_path) + "(?:" + re.escape(revision) + os.path.sep + ")?keymaps" + os.path.sep + "(\S+)" + os.path.sep + "keymap\.c") + names = [path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True) if path_regex.search(path)] + return names + +def list_keymaps(keyboard_name): + """ List the available keymaps for a keyboard. + + Args: + keyboard_name: the keyboards full name with vendor and revision if necessary, example: clueboard/66/rev3 + + Returns: + a list with the names of the available keymaps + """ + if os.path.sep in keyboard_name: + keyboard, revision = os.path.split(os.path.normpath(keyboard_name)) + else: + keyboard = keyboard_name + revision = "" + + # parse all the rules.mk files for the keyboard + rules_mk = qmk.makefile.get_rules_mk(keyboard, revision) + names = list() + + if rules_mk: + # get the keymaps from the keyboard's directory + kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep + names = find_keymaps(kb_base_path, revision) + + # if community layouts are supported, get them + if "LAYOUTS" in rules_mk: + for layout in rules_mk["LAYOUTS"]["value"].split(): + cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep + names = names + find_keymaps(cl_base_path, revision, community = True) + + names.sort() + return names diff --git a/lib/python/qmk/makefile.py b/lib/python/qmk/makefile.py new file mode 100644 index 000000000000..ce64431f96f4 --- /dev/null +++ b/lib/python/qmk/makefile.py @@ -0,0 +1,77 @@ +""" Functions for working with Makefiles +""" +import os +import glob +import re + +import qmk.path +from qmk.errors import NoSuchKeyboardError + +def parse_rules_mk(file_path): + """ Parse a rules.mk file + + Args: + file_path: path to the rules.mk file + + Returns: + a dictionary with the file's content + """ + # regex to match lines with comment at the end + # group(1) = option's name + # group(2) = operator (eg.: '=', '+=') + # group(3) = value(s) + commented_regex = re.compile(r"^\s*(\w+)\s*([\:\+\-]?=)\s*(.*?)(?=\s*\#)") + # regex to match lines without comment at the end + # group(1) = option's name + # group(2) = operator (eg.: '=', '+=') + # group(3) = value(s) + uncommented_regex = re.compile(r"^\s*(\w+)\s*([\:\+\-]?=)\s*(.*?)(?=\s*$)") + mk_content = qmk.path.unicode_lines(file_path) + parsed_file = dict() + for line in mk_content: + found = commented_regex.search(line) if "#" in line else uncommented_regex.search(line) + if found: + parsed_file[found.group(1)] = dict(operator = found.group(2), value = found.group(3)) + return parsed_file + +def merge_rules_mk_files(base, revision): + """ Merge a keyboard revision's rules.mk file with + the 'base' rules.mk file + + Args: + base: the base rules.mk file's content as dictionary + revision: the revision's rules.mk file's content as dictionary + + Returns: + a dictionary with the merged content + """ + return {**base, **revision} + +def get_rules_mk(keyboard, revision = ""): + """ Get a rules.mk for a keyboard + + Args: + keyboard: name of the keyboard + revision: revision of the keyboard + + Returns: + a dictionary with the content of the rules.mk file + """ + base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep + rules_mk = dict() + if os.path.exists(base_path + os.path.sep + revision): + rules_mk_path_wildcard = os.path.join(base_path, "**", "rules.mk") + rules_mk_regex = re.compile(r"^" + base_path + "(?:" + revision + os.path.sep + ")?rules.mk") + paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive = True) if rules_mk_regex.search(path)] + for file_path in paths: + rules_mk[revision if revision in file_path else "base"] = parse_rules_mk(file_path) + else: + raise NoSuchKeyboardError("The requested keyboard and/or revision does not exist.") + + # if the base or the revision directory does not contain a rules.mk + if len(rules_mk) == 1: + rules_mk = rules_mk[revision] + # if both directories contain rules.mk files + elif len(rules_mk) == 2: + rules_mk = merge_rules_mk_files(rules_mk["base"], rules_mk[revision]) + return rules_mk diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index cf087265fbf8..e7e3ec53fa79 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -5,6 +5,7 @@ from qmk.errors import NoSuchKeyboardError +from bs4 import UnicodeDammit def keymap(keyboard): """Locate the correct directory for storing a keymap. @@ -33,3 +34,20 @@ def normpath(path): return os.path.normpath(path) return os.path.normpath(os.path.join(os.environ['ORIG_CWD'], path)) + +def unicode_text(filename): + """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. + """ + with open(filename, "rb") as fd: + text = UnicodeDammit(fd.read()) + + if text.contains_replacement_characters: + log_warning("%s: Could not determine file encoding, some characters were replaced." % (filename,)) + + return text.unicode_markup or "" + + +def unicode_lines(filename): + """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. + """ + return unicode_text(filename).split("\n") From f8002828cac83272e5804bf705e20d07ac64e7a0 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 13 Oct 2019 19:16:19 +0200 Subject: [PATCH 289/331] Add test for list_keymaps --- lib/python/qmk/tests/test_cli_commands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index f1a92d9a310d..7dc51d247097 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -54,3 +54,8 @@ def test_list_keyboards(): # check to see if a known keyboard is returned # this will fail if handwired/onekey/pytest is removed assert 'handwired/onekey/pytest' in result.stdout + +def test_list_keymaps(): + result = check_subcommand("list_keymaps", "-kb", "planck/ez") + assert result.returncode == 0 + assert "planck/ez:default" and "planck/ez:drashna" in result.stdout From d257a98cb80a90f116072c882753039b10a5e042 Mon Sep 17 00:00:00 2001 From: Erovia Date: Mon, 14 Oct 2019 18:35:12 +0200 Subject: [PATCH 290/331] Fix regex for parsing rules.mk files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don't know why it couldn't put it together before... ¯\_(ツ)_/¯ --- lib/python/qmk/makefile.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/python/qmk/makefile.py b/lib/python/qmk/makefile.py index ce64431f96f4..dc498adc8fba 100644 --- a/lib/python/qmk/makefile.py +++ b/lib/python/qmk/makefile.py @@ -16,20 +16,15 @@ def parse_rules_mk(file_path): Returns: a dictionary with the file's content """ - # regex to match lines with comment at the end + # regex to match lines uncommented lines and get the data # group(1) = option's name # group(2) = operator (eg.: '=', '+=') # group(3) = value(s) - commented_regex = re.compile(r"^\s*(\w+)\s*([\:\+\-]?=)\s*(.*?)(?=\s*\#)") - # regex to match lines without comment at the end - # group(1) = option's name - # group(2) = operator (eg.: '=', '+=') - # group(3) = value(s) - uncommented_regex = re.compile(r"^\s*(\w+)\s*([\:\+\-]?=)\s*(.*?)(?=\s*$)") + rules_mk_regex = re.compile(r"^\s*(\w+)\s*([\?\:\+\-]?=)\s*(\S.*?)(?=\s*(\#|$))") mk_content = qmk.path.unicode_lines(file_path) parsed_file = dict() for line in mk_content: - found = commented_regex.search(line) if "#" in line else uncommented_regex.search(line) + found = rules_mk_regex.search(line) if found: parsed_file[found.group(1)] = dict(operator = found.group(2), value = found.group(3)) return parsed_file From 3ed1223678d3ec40f4cceecd320dd1112cdfb157 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 24 Oct 2019 20:33:58 +0200 Subject: [PATCH 291/331] Drop bs4 dependency, update docs, minor improvements --- docs/cli.md | 4 ++-- lib/python/qmk/cli/list/keymaps.py | 11 +++++++---- lib/python/qmk/makefile.py | 2 +- lib/python/qmk/path.py | 23 ++++++++--------------- requirements.txt | 1 - 5 files changed, 18 insertions(+), 23 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index f2b433fbbfdf..8ee8ab0e8449 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -252,14 +252,14 @@ This command lists all the keyboards currently defined in `qmk_firmware` qmk list-keyboards ``` -## `qmk list_keymaps` +## `qmk list-keymaps` This command lists all the keymaps for a specified keyboard (and revision). **Usage**: ``` -qmk list_keymaps -kb planck/ez +qmk list-keymaps -kb planck/ez ``` ## `qmk new-keymap` diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index 494fe66a1214..a17c6a913070 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -10,11 +10,14 @@ def list_keymaps(cli): """List the keymaps for a specific keyboard """ # ask for user input if keyboard was not provided in the command line - keyboard_name = cli.config.list_keymaps.keyboard if cli.config.list_keymaps.keyboard else input("Keyboard Name: ") + if not cli.config.list_keymaps.keyboard: + cli.config.list_keymaps.keyboard = input("Keyboard Name: ") try: - for name in qmk.keymap.list_keymaps(keyboard_name): + for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard): # We echo instead of cli.log.info to allow easier piping of this output - cli.echo(keyboard_name + ":" + name) + cli.echo('%s:%s', cli.config.list_keymaps.keyboard, name) except NoSuchKeyboardError as e: - cli.echo("{fg_red}" + e.message) + cli.echo("{fg_red}%s: %s", cli.config.list_keymaps.keyboard, e.message) + except (FileNotFoundError, PermissionError) as e: + cli.echo("{fg_red}%s: %s", cli.config.list_keymaps.keyboard, e) diff --git a/lib/python/qmk/makefile.py b/lib/python/qmk/makefile.py index dc498adc8fba..6ed6b4b7023a 100644 --- a/lib/python/qmk/makefile.py +++ b/lib/python/qmk/makefile.py @@ -21,8 +21,8 @@ def parse_rules_mk(file_path): # group(2) = operator (eg.: '=', '+=') # group(3) = value(s) rules_mk_regex = re.compile(r"^\s*(\w+)\s*([\?\:\+\-]?=)\s*(\S.*?)(?=\s*(\#|$))") - mk_content = qmk.path.unicode_lines(file_path) parsed_file = dict() + mk_content = qmk.path.file_lines(file_path) for line in mk_content: found = rules_mk_regex.search(line) if found: diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index e7e3ec53fa79..0cdfe353c59d 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -5,8 +5,6 @@ from qmk.errors import NoSuchKeyboardError -from bs4 import UnicodeDammit - def keymap(keyboard): """Locate the correct directory for storing a keymap. @@ -35,19 +33,14 @@ def normpath(path): return os.path.normpath(os.path.join(os.environ['ORIG_CWD'], path)) -def unicode_text(filename): - """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. - """ - with open(filename, "rb") as fd: - text = UnicodeDammit(fd.read()) - - if text.contains_replacement_characters: - log_warning("%s: Could not determine file encoding, some characters were replaced." % (filename,)) - - return text.unicode_markup or "" +def file_lines(filename): + """ Return a files content, line by line + Args: + filename: path to the file -def unicode_lines(filename): - """Returns the contents of filename as a UTF-8 string. Tries to DTRT when it comes to encoding. + Returns: + an list, in which each item is a line of the file """ - return unicode_text(filename).split("\n") + with open(filename, "r") as fd: + return fd.readlines() diff --git a/requirements.txt b/requirements.txt index bf4f411ede6c..074b11a8ceed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,3 @@ hjson nose2 flake8 pep8-naming -bs4 From 4445e0a459ce891d6e51a252030f665fea355b41 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 24 Oct 2019 22:22:44 +0200 Subject: [PATCH 292/331] Return only the unique keymaps --- lib/python/qmk/keymap.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 3927f791a6bd..6ee60b8be16c 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -111,7 +111,7 @@ def find_keymaps(base_path, revision = "", community = False): community: Set to True for the layouts under layouts/community. Returns: - a list with whe keymaps's names + a set with the keymaps's names """ path_wildcard = os.path.join(base_path, "**", "keymap.c") if community: @@ -119,7 +119,7 @@ def find_keymaps(base_path, revision = "", community = False): else: path_regex = re.compile(r"^" + re.escape(base_path) + "(?:" + re.escape(revision) + os.path.sep + ")?keymaps" + os.path.sep + "(\S+)" + os.path.sep + "keymap\.c") names = [path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True) if path_regex.search(path)] - return names + return set(names) def list_keymaps(keyboard_name): """ List the available keymaps for a keyboard. @@ -128,7 +128,7 @@ def list_keymaps(keyboard_name): keyboard_name: the keyboards full name with vendor and revision if necessary, example: clueboard/66/rev3 Returns: - a list with the names of the available keymaps + a set with the names of the available keymaps """ if os.path.sep in keyboard_name: keyboard, revision = os.path.split(os.path.normpath(keyboard_name)) @@ -138,7 +138,7 @@ def list_keymaps(keyboard_name): # parse all the rules.mk files for the keyboard rules_mk = qmk.makefile.get_rules_mk(keyboard, revision) - names = list() + names = set() if rules_mk: # get the keymaps from the keyboard's directory @@ -151,5 +151,4 @@ def list_keymaps(keyboard_name): cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep names = names + find_keymaps(cl_base_path, revision, community = True) - names.sort() - return names + return sorted(names) From 8ff72d9517132fe82c6e2d1dc8fc56f7cab4b6a0 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 27 Oct 2019 19:38:17 +0100 Subject: [PATCH 293/331] Fix merging community and base keymaps --- lib/python/qmk/keymap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 6ee60b8be16c..1024f8fc6e7b 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -149,6 +149,6 @@ def list_keymaps(keyboard_name): if "LAYOUTS" in rules_mk: for layout in rules_mk["LAYOUTS"]["value"].split(): cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep - names = names + find_keymaps(cl_base_path, revision, community = True) + names = names.union(find_keymaps(cl_base_path, revision, community = True)) return sorted(names) From 988bfffca2715df3f227c462533d350ecbeac6c0 Mon Sep 17 00:00:00 2001 From: Erovia Date: Mon, 28 Oct 2019 09:23:06 +0100 Subject: [PATCH 294/331] Major rework, no regex/globbing, more walking Instead of using regexes and globbing to find the rules.mk and keymap.c files, walk the directory tree to find them. Also, do away with the concept of revision. --- lib/python/qmk/keymap.py | 52 +++++++-------------- lib/python/qmk/makefile.py | 94 +++++++++++++++++++++----------------- 2 files changed, 67 insertions(+), 79 deletions(-) diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 1024f8fc6e7b..113b885de320 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -2,8 +2,6 @@ """ import os from traceback import format_exc -import re -import glob import qmk.path import qmk.makefile @@ -100,27 +98,6 @@ def write(keyboard, keymap, layout, layers): return keymap_file -def find_keymaps(base_path, revision = "", community = False): - """ Find the available keymaps for a keyboard and revision pair. - - Args: - base_path: The base path of the keyboard. - - revision: The keyboard's revision. - - community: Set to True for the layouts under layouts/community. - - Returns: - a set with the keymaps's names - """ - path_wildcard = os.path.join(base_path, "**", "keymap.c") - if community: - path_regex = re.compile(r"^" + re.escape(base_path) + "(\S+)" + os.path.sep + "keymap\.c") - else: - path_regex = re.compile(r"^" + re.escape(base_path) + "(?:" + re.escape(revision) + os.path.sep + ")?keymaps" + os.path.sep + "(\S+)" + os.path.sep + "keymap\.c") - names = [path_regex.sub(lambda name: name.group(1), path) for path in glob.iglob(path_wildcard, recursive = True) if path_regex.search(path)] - return set(names) - def list_keymaps(keyboard_name): """ List the available keymaps for a keyboard. @@ -130,25 +107,28 @@ def list_keymaps(keyboard_name): Returns: a set with the names of the available keymaps """ - if os.path.sep in keyboard_name: - keyboard, revision = os.path.split(os.path.normpath(keyboard_name)) - else: - keyboard = keyboard_name - revision = "" - # parse all the rules.mk files for the keyboard - rules_mk = qmk.makefile.get_rules_mk(keyboard, revision) + rules_mk = qmk.makefile.get_rules_mk(keyboard_name) names = set() if rules_mk: - # get the keymaps from the keyboard's directory - kb_base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep - names = find_keymaps(kb_base_path, revision) + # qmk_firmware/keyboards + keyboards_dir = os.path.join(os.getcwd(), "keyboards") + # path to the keyboard's directory + kb_path = os.path.join(keyboards_dir, keyboard_name) + # walk up the directory tree until keyboards_dir + # and collect all directories' name with keymap.c file in it + while kb_path != keyboards_dir: + keymaps_dir = os.path.join(kb_path, "keymaps") + if os.path.exists(keymaps_dir): + names = names.union([keymap for keymap in os.listdir(keymaps_dir) if os.path.isfile(os.path.join(keymaps_dir, keymap, "keymap.c"))]) + kb_path = os.path.dirname(kb_path) # if community layouts are supported, get them if "LAYOUTS" in rules_mk: - for layout in rules_mk["LAYOUTS"]["value"].split(): - cl_base_path = os.path.join(os.getcwd(), "layouts", "community", layout) + os.path.sep - names = names.union(find_keymaps(cl_base_path, revision, community = True)) + for layout in rules_mk["LAYOUTS"].split(): + cl_path = os.path.join(os.getcwd(), "layouts", "community", layout) + if os.path.exists(cl_path): + names = names.union([keymap for keymap in os.listdir(cl_path) if os.path.isfile(os.path.join(cl_path, keymap, "keymap.c"))]) return sorted(names) diff --git a/lib/python/qmk/makefile.py b/lib/python/qmk/makefile.py index 6ed6b4b7023a..c53f12ac75e4 100644 --- a/lib/python/qmk/makefile.py +++ b/lib/python/qmk/makefile.py @@ -1,72 +1,80 @@ """ Functions for working with Makefiles """ import os -import glob -import re import qmk.path from qmk.errors import NoSuchKeyboardError -def parse_rules_mk(file_path): - """ Parse a rules.mk file +def parse_rules_mk_file(file, rules_mk=None): + """Turn a rules.mk file into a dictionary. Args: - file_path: path to the rules.mk file + file: path to the rules.mk file + rules_mk: already parsed rules.mk the new file should be merged with Returns: a dictionary with the file's content """ - # regex to match lines uncommented lines and get the data - # group(1) = option's name - # group(2) = operator (eg.: '=', '+=') - # group(3) = value(s) - rules_mk_regex = re.compile(r"^\s*(\w+)\s*([\?\:\+\-]?=)\s*(\S.*?)(?=\s*(\#|$))") - parsed_file = dict() - mk_content = qmk.path.file_lines(file_path) - for line in mk_content: - found = rules_mk_regex.search(line) - if found: - parsed_file[found.group(1)] = dict(operator = found.group(2), value = found.group(3)) - return parsed_file + if not rules_mk: + rules_mk = {} -def merge_rules_mk_files(base, revision): - """ Merge a keyboard revision's rules.mk file with - the 'base' rules.mk file + if os.path.exists(file): + rules_mk_lines = qmk.path.file_lines(file) - Args: - base: the base rules.mk file's content as dictionary - revision: the revision's rules.mk file's content as dictionary + for line in rules_mk_lines: + # Filter out comments + if line.strip().startswith("#"): + continue - Returns: - a dictionary with the merged content - """ - return {**base, **revision} + # Strip in-line comments + if '#' in line: + line = line[:line.index('#')].strip() + + if '=' in line: + # Append + if '+=' in line: + key, value = line.split('+=', 1) + if key.strip() not in rules_mk: + rules_mk[key.strip()] = value.strip() + else: + rules_mk[key.strip()] += ' ' + value.strip() + # Set if absent + elif "?=" in line: + key, value = line.split('?=', 1) + if key.strip() not in rules_mk: + rules_mk[key.strip()] = value.strip() + else: + if ":=" in line: + line.replace(":","") + key, value = line.split('=', 1) + rules_mk[key.strip()] = value.strip() -def get_rules_mk(keyboard, revision = ""): + return rules_mk + +def get_rules_mk(keyboard): """ Get a rules.mk for a keyboard Args: keyboard: name of the keyboard - revision: revision of the keyboard + + Raises: + NoSuchKeyboardError: when the keyboard does not exists Returns: a dictionary with the content of the rules.mk file """ - base_path = os.path.join(os.getcwd(), "keyboards", keyboard) + os.path.sep - rules_mk = dict() - if os.path.exists(base_path + os.path.sep + revision): - rules_mk_path_wildcard = os.path.join(base_path, "**", "rules.mk") - rules_mk_regex = re.compile(r"^" + base_path + "(?:" + revision + os.path.sep + ")?rules.mk") - paths = [path for path in glob.iglob(rules_mk_path_wildcard, recursive = True) if rules_mk_regex.search(path)] - for file_path in paths: - rules_mk[revision if revision in file_path else "base"] = parse_rules_mk(file_path) + # Start with qmk_firmware/keyboards + kb_path = os.path.join(os.getcwd(), "keyboards") + # walk down the directory tree + # and collect all rules.mk files + if os.path.exists(os.path.join(kb_path, keyboard)): + rules_mk = dict() + for directory in keyboard.split(os.path.sep): + kb_path = os.path.join(kb_path, directory) + rules_mk_path = os.path.join(kb_path, "rules.mk") + if os.path.exists(rules_mk_path): + rules_mk = parse_rules_mk_file(rules_mk_path, rules_mk) else: raise NoSuchKeyboardError("The requested keyboard and/or revision does not exist.") - # if the base or the revision directory does not contain a rules.mk - if len(rules_mk) == 1: - rules_mk = rules_mk[revision] - # if both directories contain rules.mk files - elif len(rules_mk) == 2: - rules_mk = merge_rules_mk_files(rules_mk["base"], rules_mk[revision]) return rules_mk From 8eeab1112aa1ca7336f88867a9a2ab680ae94b53 Mon Sep 17 00:00:00 2001 From: Erovia Date: Tue, 7 Jan 2020 21:54:21 +0100 Subject: [PATCH 295/331] Fix commandline parsing and flake8 findings, rebase Fixed commandline and config parsing. Thx @xplusplus. Rebased on master and fixed merge conflicts. --- lib/python/qmk/cli/list/keymaps.py | 5 ++++- lib/python/qmk/keymap.py | 3 +-- lib/python/qmk/makefile.py | 4 +++- lib/python/qmk/path.py | 2 ++ lib/python/qmk/tests/test_cli_commands.py | 9 ++++++++- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index a17c6a913070..aab97314059e 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -4,13 +4,16 @@ import qmk.keymap from qmk.errors import NoSuchKeyboardError + @cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse") @cli.subcommand("List the keymaps for a specific keyboard") def list_keymaps(cli): """List the keymaps for a specific keyboard """ # ask for user input if keyboard was not provided in the command line - if not cli.config.list_keymaps.keyboard: + if cli.args.keyboard: + cli.config.list_keymaps.keyboard = cli.args.keyboard + elif not cli.config.list_keymaps.keyboard: cli.config.list_keymaps.keyboard = input("Keyboard Name: ") try: diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 113b885de320..afb001f3e0e9 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -1,11 +1,9 @@ """Functions that help you work with QMK keymaps. """ import os -from traceback import format_exc import qmk.path import qmk.makefile -from qmk.errors import NoSuchKeyboardError # The `keymap.c` template to use when a keyboard doesn't have its own DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H @@ -98,6 +96,7 @@ def write(keyboard, keymap, layout, layers): return keymap_file + def list_keymaps(keyboard_name): """ List the available keymaps for a keyboard. diff --git a/lib/python/qmk/makefile.py b/lib/python/qmk/makefile.py index c53f12ac75e4..89494bbc02dd 100644 --- a/lib/python/qmk/makefile.py +++ b/lib/python/qmk/makefile.py @@ -5,6 +5,7 @@ import qmk.path from qmk.errors import NoSuchKeyboardError + def parse_rules_mk_file(file, rules_mk=None): """Turn a rules.mk file into a dictionary. @@ -45,12 +46,13 @@ def parse_rules_mk_file(file, rules_mk=None): rules_mk[key.strip()] = value.strip() else: if ":=" in line: - line.replace(":","") + line.replace(":", "") key, value = line.split('=', 1) rules_mk[key.strip()] = value.strip() return rules_mk + def get_rules_mk(keyboard): """ Get a rules.mk for a keyboard diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index 0cdfe353c59d..bb28049b9dbb 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -5,6 +5,7 @@ from qmk.errors import NoSuchKeyboardError + def keymap(keyboard): """Locate the correct directory for storing a keymap. @@ -33,6 +34,7 @@ def normpath(path): return os.path.normpath(os.path.join(os.environ['ORIG_CWD'], path)) + def file_lines(filename): """ Return a files content, line by line diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 7dc51d247097..d8843790350c 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -55,7 +55,14 @@ def test_list_keyboards(): # this will fail if handwired/onekey/pytest is removed assert 'handwired/onekey/pytest' in result.stdout + def test_list_keymaps(): - result = check_subcommand("list_keymaps", "-kb", "planck/ez") + result = check_subcommand("list-keymaps", "-kb", "planck/ez") assert result.returncode == 0 assert "planck/ez:default" and "planck/ez:drashna" in result.stdout + + +def test_list_keymaps_no_keyboard_found(): + result = check_subcommand("list-keymaps", "-kb", "asdfghjkl") + assert result.returncode == 0 + assert "does not exist" in result.stdout From 3db41817e0aa72e1406e29a4fb5f82db0c2a6cf1 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 12 Jan 2020 12:36:41 +0100 Subject: [PATCH 296/331] Code cleanup, use pathlib, use pytest keyboard Clean up checks and logics that are unnecessary due to MILC updates. Use pathlib instead of os.path for readability. Use the 'pytest' keyboard for the tests. Add community layout for 'handwired/onekey/pytest' so we can test community layouts. --- keyboards/handwired/onekey/rules.mk | 1 + layouts/community/ortho_1x1/layout.json | 1 + layouts/community/ortho_1x1/test/keymap.c | 12 ++++++++++++ lib/python/qmk/cli/list/keymaps.py | 10 +++------- lib/python/qmk/makefile.py | 21 +++++++++++---------- lib/python/qmk/path.py | 13 ------------- lib/python/qmk/tests/test_cli_commands.py | 4 ++-- 7 files changed, 30 insertions(+), 32 deletions(-) create mode 100644 layouts/community/ortho_1x1/layout.json create mode 100644 layouts/community/ortho_1x1/test/keymap.c diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk index 245f9025d77e..8ed255768383 100644 --- a/keyboards/handwired/onekey/rules.mk +++ b/keyboards/handwired/onekey/rules.mk @@ -20,3 +20,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) DEFAULT_FOLDER = handwired/onekey/promicro +LAYOUTS = ortho_1x1 diff --git a/layouts/community/ortho_1x1/layout.json b/layouts/community/ortho_1x1/layout.json new file mode 100644 index 000000000000..66a1e1856064 --- /dev/null +++ b/layouts/community/ortho_1x1/layout.json @@ -0,0 +1 @@ +[""] diff --git a/layouts/community/ortho_1x1/test/keymap.c b/layouts/community/ortho_1x1/test/keymap.c new file mode 100644 index 000000000000..6a186669b07e --- /dev/null +++ b/layouts/community/ortho_1x1/test/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +/* This keyboard/layout is used to test community layout discovery/compilation. */ + +#define _DEFAULT 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DEFAULT] = LAYOUT ( + KC_B +), +}; diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index aab97314059e..d199d29bc3d4 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -10,17 +10,13 @@ def list_keymaps(cli): """List the keymaps for a specific keyboard """ - # ask for user input if keyboard was not provided in the command line - if cli.args.keyboard: - cli.config.list_keymaps.keyboard = cli.args.keyboard - elif not cli.config.list_keymaps.keyboard: - cli.config.list_keymaps.keyboard = input("Keyboard Name: ") - try: for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard): # We echo instead of cli.log.info to allow easier piping of this output - cli.echo('%s:%s', cli.config.list_keymaps.keyboard, name) + cli.echo('%s', name) except NoSuchKeyboardError as e: cli.echo("{fg_red}%s: %s", cli.config.list_keymaps.keyboard, e.message) except (FileNotFoundError, PermissionError) as e: cli.echo("{fg_red}%s: %s", cli.config.list_keymaps.keyboard, e) + except TypeError: + cli.echo("{fg_red}Something went wrong. Did you specify a keyboard?") diff --git a/lib/python/qmk/makefile.py b/lib/python/qmk/makefile.py index 89494bbc02dd..8645056d2d31 100644 --- a/lib/python/qmk/makefile.py +++ b/lib/python/qmk/makefile.py @@ -1,8 +1,7 @@ """ Functions for working with Makefiles """ -import os +from pathlib import Path -import qmk.path from qmk.errors import NoSuchKeyboardError @@ -19,8 +18,9 @@ def parse_rules_mk_file(file, rules_mk=None): if not rules_mk: rules_mk = {} - if os.path.exists(file): - rules_mk_lines = qmk.path.file_lines(file) + file = Path(file) + if file.exists(): + rules_mk_lines = file.read_text().split("\n") for line in rules_mk_lines: # Filter out comments @@ -66,15 +66,16 @@ def get_rules_mk(keyboard): a dictionary with the content of the rules.mk file """ # Start with qmk_firmware/keyboards - kb_path = os.path.join(os.getcwd(), "keyboards") + kb_path = Path.cwd() / "keyboards" # walk down the directory tree # and collect all rules.mk files - if os.path.exists(os.path.join(kb_path, keyboard)): + kb_dir = kb_path / keyboard + if kb_dir.exists(): rules_mk = dict() - for directory in keyboard.split(os.path.sep): - kb_path = os.path.join(kb_path, directory) - rules_mk_path = os.path.join(kb_path, "rules.mk") - if os.path.exists(rules_mk_path): + for directory in Path(keyboard).parts: + kb_path = kb_path / directory + rules_mk_path = kb_path / "rules.mk" + if rules_mk_path.exists(): rules_mk = parse_rules_mk_file(rules_mk_path, rules_mk) else: raise NoSuchKeyboardError("The requested keyboard and/or revision does not exist.") diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index bb28049b9dbb..cf087265fbf8 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -33,16 +33,3 @@ def normpath(path): return os.path.normpath(path) return os.path.normpath(os.path.join(os.environ['ORIG_CWD'], path)) - - -def file_lines(filename): - """ Return a files content, line by line - - Args: - filename: path to the file - - Returns: - an list, in which each item is a line of the file - """ - with open(filename, "r") as fd: - return fd.readlines() diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index d8843790350c..bb77952faf68 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -57,9 +57,9 @@ def test_list_keyboards(): def test_list_keymaps(): - result = check_subcommand("list-keymaps", "-kb", "planck/ez") + result = check_subcommand("list-keymaps", "-kb", "handwired/onekey/pytest") assert result.returncode == 0 - assert "planck/ez:default" and "planck/ez:drashna" in result.stdout + assert "default" and "test" in result.stdout def test_list_keymaps_no_keyboard_found(): From 512261b3437820294dc2915dcb837bb488d53253 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sat, 25 Jan 2020 22:30:57 +0100 Subject: [PATCH 297/331] Pathlib-ify qmk.keymap.list_keymaps() --- lib/python/qmk/keymap.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index afb001f3e0e9..721a0deca056 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -1,6 +1,7 @@ """Functions that help you work with QMK keymaps. """ import os +from pathlib import Path import qmk.path import qmk.makefile @@ -112,22 +113,22 @@ def list_keymaps(keyboard_name): if rules_mk: # qmk_firmware/keyboards - keyboards_dir = os.path.join(os.getcwd(), "keyboards") + keyboards_dir = Path.cwd() / "keyboards" # path to the keyboard's directory - kb_path = os.path.join(keyboards_dir, keyboard_name) + kb_path = keyboards_dir / keyboard_name # walk up the directory tree until keyboards_dir # and collect all directories' name with keymap.c file in it while kb_path != keyboards_dir: - keymaps_dir = os.path.join(kb_path, "keymaps") - if os.path.exists(keymaps_dir): - names = names.union([keymap for keymap in os.listdir(keymaps_dir) if os.path.isfile(os.path.join(keymaps_dir, keymap, "keymap.c"))]) - kb_path = os.path.dirname(kb_path) + keymaps_dir = kb_path / "keymaps" + if keymaps_dir.exists(): + names = names.union([keymap for keymap in os.listdir(keymaps_dir) if (keymaps_dir / keymap / "keymap.c").is_file()]) + kb_path = kb_path.parent # if community layouts are supported, get them if "LAYOUTS" in rules_mk: for layout in rules_mk["LAYOUTS"].split(): - cl_path = os.path.join(os.getcwd(), "layouts", "community", layout) - if os.path.exists(cl_path): - names = names.union([keymap for keymap in os.listdir(cl_path) if os.path.isfile(os.path.join(cl_path, keymap, "keymap.c"))]) + cl_path = Path.cwd() / "layouts" / "community" / layout + if cl_path.exists(): + names = names.union([keymap for keymap in os.listdir(cl_path) if (cl_path / keymap / "keymap.c").is_file()]) return sorted(names) From 58101cbb73a16678280d8a0cea275d680b603e58 Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 15 Feb 2020 15:05:59 -0800 Subject: [PATCH 298/331] fix list_keymaps for python 3.5 --- lib/python/qmk/keymap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 721a0deca056..15a91a276bdf 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -121,7 +121,7 @@ def list_keymaps(keyboard_name): while kb_path != keyboards_dir: keymaps_dir = kb_path / "keymaps" if keymaps_dir.exists(): - names = names.union([keymap for keymap in os.listdir(keymaps_dir) if (keymaps_dir / keymap / "keymap.c").is_file()]) + names = names.union([keymap for keymap in os.listdir(str(keymaps_dir)) if (keymaps_dir / keymap / "keymap.c").is_file()]) kb_path = kb_path.parent # if community layouts are supported, get them @@ -129,6 +129,6 @@ def list_keymaps(keyboard_name): for layout in rules_mk["LAYOUTS"].split(): cl_path = Path.cwd() / "layouts" / "community" / layout if cl_path.exists(): - names = names.union([keymap for keymap in os.listdir(cl_path) if (cl_path / keymap / "keymap.c").is_file()]) + names = names.union([keymap for keymap in os.listdir(str(cl_path)) if (cl_path / keymap / "keymap.c").is_file()]) return sorted(names) From 89c3355fd8bbdc97f3b5fb67c54661de1e7f2307 Mon Sep 17 00:00:00 2001 From: spe2 Date: Sat, 15 Feb 2020 22:05:20 -0700 Subject: [PATCH 299/331] [Keyboard] Add configs for Centromere keyboard (#7467) * Create readme.md * Add files for Centromere * Add keymap files for Centromere * Add default keymap for Centromere * Create keymap directory * Add keymap files * keymap directory cleanup * Keyboard keymap directory cleanup * Update keyboards/centromere/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/centromere/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/centromere/config.h Co-Authored-By: Drashna Jaelre * Update keymap.c * Update keymap.c * Update centromere.c Changed LED control to GPIO functions * Update centromere.h * Update rules.mk * Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark * Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark * Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark * Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark * Update keyboards/centromere/keymaps/default_u2/keymap.c Co-Authored-By: fauxpark * Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark * Update keyboards/centromere/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark * Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark * Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark * Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark * Update keyboards/centromere/centromere.c Co-Authored-By: fauxpark * Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark * Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark * Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark * Apply suggestions from code review Co-Authored-By: fauxpark Co-authored-by: Drashna Jaelre Co-authored-by: fauxpark --- keyboards/centromere/centromere.c | 48 ++++++ keyboards/centromere/centromere.h | 47 ++++++ keyboards/centromere/config.h | 76 +++++++++ keyboards/centromere/keymaps/default/keymap.c | 69 ++++++++ .../centromere/keymaps/default_u2/keymap.c | 68 ++++++++ .../centromere/keymaps/default_u2/rules.mk | 12 ++ keyboards/centromere/matrix.c | 153 ++++++++++++++++++ keyboards/centromere/readme.md | 1 + keyboards/centromere/rules.mk | 42 +++++ 9 files changed, 516 insertions(+) create mode 100644 keyboards/centromere/centromere.c create mode 100644 keyboards/centromere/centromere.h create mode 100644 keyboards/centromere/config.h create mode 100644 keyboards/centromere/keymaps/default/keymap.c create mode 100644 keyboards/centromere/keymaps/default_u2/keymap.c create mode 100644 keyboards/centromere/keymaps/default_u2/rules.mk create mode 100644 keyboards/centromere/matrix.c create mode 100644 keyboards/centromere/readme.md create mode 100644 keyboards/centromere/rules.mk diff --git a/keyboards/centromere/centromere.c b/keyboards/centromere/centromere.c new file mode 100644 index 000000000000..8800e2ce6adc --- /dev/null +++ b/keyboards/centromere/centromere.c @@ -0,0 +1,48 @@ +#include "centromere.h" + +void uart_init(void) { + SERIAL_UART_INIT(); +} + +void led_init(void) { +#if MCU == atmega32u2 + setPinOutput(C4); // Set red LED pin as output + setPinOutput(C5); // Set blue LED pin as output + setPinOutput(D1); // Set green LED pin as output + + writePinHigh(C4); // Turn off red LED pin + writePinHigh(C5); // Turn off blue LED pin + writePinHigh(D1); // Turn off green LED pin + +#else + + setPinOutput(F4); // Set red LED pin as output + setPinOutput(F5); // Set blue LED pin as output + setPinOutput(D1); // Set green LED pin as output + + writePinHigh(F4); // Turn off red LED pin + writePinHigh(F5); // Turn off blue LED pin + writePinHigh(D1); // Turn off green LED pin + +#endif + +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + uart_init(); + led_init(); +} + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +{{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, +{{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, +{{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, +{{9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, +{{9, 4}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, +}; +#endif diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h new file mode 100644 index 000000000000..826e8dde4481 --- /dev/null +++ b/keyboards/centromere/centromere.h @@ -0,0 +1,47 @@ +#pragma once + +#include "quantum.h" + +#if MCU == atmega32u2 +#define red_led_off writePinHigh(C5) +#define red_led_on writePinLow(C5) +#define blu_led_off writePinHigh(C4) +#define blu_led_on writePinLow(C4) + +#else +#define red_led_off writePinHigh(F5) +#define red_led_on writePinLow(F5) +#define blu_led_off writePinHigh(F4) +#define blu_led_on writePinLow(F4) + +#endif + +#define grn_led_off writePinHigh(D1) +#define grn_led_on writePinLow(D1) + +#define set_led_off red_led_off; blu_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on +#define set_led_green red_led_off; grn_led_on; blu_led_off +#define set_led_yellow red_led_on; grn_led_on; blu_led_off +#define set_led_magenta red_led_on; grn_led_off; blu_led_on +#define set_led_cyan red_led_off; grn_led_on; blu_led_on +#define set_led_white red_led_on; grn_led_on; blu_led_on + + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k0a, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0b, \ + k1a, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b,\ + k2a, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2b,\ + k32, k33, k34, k35, k36, k37 \ +) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { KC_NO, KC_NO, k32, k33, k34, k35, k36, k37, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, k2a, k1a, k0a, k0b, k1b, k2b, KC_NO, KC_NO } \ + } diff --git a/keyboards/centromere/config.h b/keyboards/centromere/config.h new file mode 100644 index 000000000000..c051843c5013 --- /dev/null +++ b/keyboards/centromere/config.h @@ -0,0 +1,76 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Southpaw Design +#define PRODUCT centromere +#define DESCRIPTION Q.M.K. keyboard firmware for Centromere + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 10 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 500000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + } while(0) diff --git a/keyboards/centromere/keymaps/default/keymap.c b/keyboards/centromere/keymaps/default/keymap.c new file mode 100644 index 000000000000..ca235f61f5a9 --- /dev/null +++ b/keyboards/centromere/keymaps/default/keymap.c @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H + +enum centromere_layers +{ + _STD, + _NUM, + _FN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_STD] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(_FN), KC_SPC, KC_SPC,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + + ), + + + [_NUM] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(_FN), KC_SPC, KC_ENT,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + ), + + [_FN] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,\ + + KC_LGUI, MO(_FN), KC_SPC, KC_ENT,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + ), + +}; + +void matrix_scan_user(void) { + uint8_t layer = get_highest_layer(layer_state); + + switch (layer) { + case _STD: + set_led_off; + break; + case _FN: + set_led_blue; + break; + case _NUM: + set_led_red; + break; + default: + break; + } +}; diff --git a/keyboards/centromere/keymaps/default_u2/keymap.c b/keyboards/centromere/keymaps/default_u2/keymap.c new file mode 100644 index 000000000000..c704adc58cd6 --- /dev/null +++ b/keyboards/centromere/keymaps/default_u2/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +enum centromere_layers +{ + _STD, + _NUM, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_STD] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(_FN), KC_SPC, KC_SPC,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + + ), + + + [_NUM] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(_FN), KC_SPC, KC_ENT,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + ), + + [_FN] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,\ + + KC_LGUI, MO(_FN), KC_SPC, KC_ENT,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + ), + +}; + +void matrix_scan_user(void) { + uint8_t layer = get_highest_layer(layer_state); + + switch (layer) { + case _STD: + set_led_off; + break; + case _FN: + set_led_blue; + break; + case _NUM: + set_led_red; + break; + default: + break; + } +}; diff --git a/keyboards/centromere/keymaps/default_u2/rules.mk b/keyboards/centromere/keymaps/default_u2/rules.mk new file mode 100644 index 000000000000..5fdb02af5ac1 --- /dev/null +++ b/keyboards/centromere/keymaps/default_u2/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu diff --git a/keyboards/centromere/matrix.c b/keyboards/centromere/matrix.c new file mode 100644 index 000000000000..c5fc8db6ce94 --- /dev/null +++ b/keyboards/centromere/matrix.c @@ -0,0 +1,153 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + //the s character requests the RF remote slave to send the matrix information + SERIAL_UART_DATA = 's'; + + //trust the external keystates, erase the last set of data + uint8_t uart_data[11] = {0}; + + //there are 10 bytes corresponding to 1w columns, and an end byte + for (uint8_t i = 0; i < 11; i++) { + //wait for the serial data, timeout if it's been too long + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, the key state bytes use the LSBs, so 0xE0 + //will only show up here if the correct bytes were recieved + if (uart_data[10] == 0xE0) + { + //shifting and transferring the keystates to the QMK matrix variable + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5; + } + } + + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< Date: Sun, 16 Feb 2020 11:29:36 -0800 Subject: [PATCH 300/331] [Keyboard] Correct Chidori Configurator layout data (#8180) --- keyboards/chidori/info.json | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/keyboards/chidori/info.json b/keyboards/chidori/info.json index 49e8c5d40fbb..8a24d1a92687 100644 --- a/keyboards/chidori/info.json +++ b/keyboards/chidori/info.json @@ -1,24 +1,25 @@ { - "keyboard_name": "Chidori", - "url": "", - "maintainer": "ka2hiro", - "width": 12, - "height": 4, + "keyboard_name": "Chidori", + "url": "", + "maintainer": "ka2hiro", + "width": 13, + "height": 4, "layouts": { "LAYOUT": { "layout": [ - {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, - {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3} + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3} ] }, "LAYOUT_extended": { + "width": 20, "layout": [ - {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, - {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":15, "y":3} + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":19, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":19, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":19, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":19, "y":3} ] } } From 17ff5512757e05cd3b4e27066c24ac697fa8da9c Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 16 Feb 2020 19:37:21 +0000 Subject: [PATCH 301/331] Convert f072 backlight build error to message (#8177) --- docs/feature_backlight.md | 2 +- quantum/backlight/backlight_arm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 22abaa60a8fe..e74aab1e378d 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -167,7 +167,7 @@ BACKLIGHT_DRIVER = pwm Currently only hardware PWM is supported, not timer assisted, and does not provide automatic configuration. -?> STMF072 support is being investigated. +?> Backlight support for STMF072 has had limited testing, YMMV. If unsure, set `BACKLIGHT_ENABLE = no` in your rules.mk. ### ARM Configuration diff --git a/quantum/backlight/backlight_arm.c b/quantum/backlight/backlight_arm.c index f7065906f8b2..397a1ac1a8ab 100644 --- a/quantum/backlight/backlight_arm.c +++ b/quantum/backlight/backlight_arm.c @@ -7,7 +7,7 @@ #ifdef BACKLIGHT_PIN # if defined(STM32F0XX) || defined(STM32F0xx) -# error "Backlight support for STMF072 is not available. Please disable." +# pragma message("Backlight support for STMF072 has had limited testing, YMMV. If unsure, set 'BACKLIGHT_ENABLE = no' in your rules.mk") # endif // GPIOV2 && GPIOV3 From de462761c996eb83a447fb9f668cd254d4284849 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 16 Feb 2020 11:42:03 -0800 Subject: [PATCH 302/331] [Keyboard] VIA Support: DZ60RGB ANSI V1/V2 (#8159) * add dz60 via support * use the correct DZ vendor id dervied from dz60 * differentiate product ID of v2 board --- .../dztech/dz60rgb_ansi/keymaps/via/keymap.c | 33 +++++++++++++++++++ .../dztech/dz60rgb_ansi/keymaps/via/rules.mk | 2 ++ keyboards/dztech/dz60rgb_ansi/v1/config.h | 2 +- keyboards/dztech/dz60rgb_ansi/v2/config.h | 4 +-- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 keyboards/dztech/dz60rgb_ansi/keymaps/via/keymap.c create mode 100644 keyboards/dztech/dz60rgb_ansi/keymaps/via/rules.mk diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/via/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/via/keymap.c new file mode 100644 index 000000000000..9ad5872d4feb --- /dev/null +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/via/keymap.c @@ -0,0 +1,33 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_60_ansi( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/via/rules.mk b/keyboards/dztech/dz60rgb_ansi/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h index 050f66c6fc7c..fb76ee7df9a8 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h @@ -1,7 +1,7 @@ #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x445A #define PRODUCT_ID 0x1220 #define DEVICE_VER 0x0001 #define MANUFACTURER DZTECH diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h index b357ceefe789..3bd287b5f244 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h @@ -1,8 +1,8 @@ #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1220 +#define VENDOR_ID 0x445A +#define PRODUCT_ID 0x1221 #define DEVICE_VER 0x0002 #define MANUFACTURER DZTECH #define PRODUCT DZ60RGB_ANSI From e279b0a1a243638f811184284013288921e1a123 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 17 Feb 2020 06:45:42 +1100 Subject: [PATCH 303/331] Clean up some remaining rules.mk bootloader stuff (#8165) --- keyboards/dp60/keymaps/allleds/rules.mk | 39 +------------------ keyboards/handwired/dactyl_left/rules.mk | 5 +-- .../minorca/keymaps/ridingqwerty/rules.mk | 4 -- keyboards/handwired/owlet60/rules.mk | 21 +++------- keyboards/maartenwut/minitomic/rules.mk | 3 +- 5 files changed, 10 insertions(+), 62 deletions(-) diff --git a/keyboards/dp60/keymaps/allleds/rules.mk b/keyboards/dp60/keymaps/allleds/rules.mk index 746d0bcb6464..1e3cebb14515 100644 --- a/keyboards/dp60/keymaps/allleds/rules.mk +++ b/keyboards/dp60/keymaps/allleds/rules.mk @@ -1,38 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -RGBLIGHT_ENABLE = yes # Use RGB underglow light -RGB_MATRIX_ENABLE = yes # Use RGB matrix - -LAYOUTS = 60_ansi 60_hhkb 60_iso 60_ansi_split_bs_rshift - -CUSTOM_MATRIX = yes -SRC += matrix.c +RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/dactyl_left/rules.mk b/keyboards/handwired/dactyl_left/rules.mk index 61c123d03811..1ea1de18da1d 100644 --- a/keyboards/handwired/dactyl_left/rules.mk +++ b/keyboards/handwired/dactyl_left/rules.mk @@ -1,17 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = halfkay - # Build Options # change yes to no to disable # diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk index ac798576a5d1..c3cea9618ebf 100644 --- a/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk @@ -1,10 +1,6 @@ -MCU = atmega32u4 -BOOTLOADER = halfkay - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode Map diff --git a/keyboards/handwired/owlet60/rules.mk b/keyboards/handwired/owlet60/rules.mk index 6d8bdfd1c632..6c81dad09ce8 100644 --- a/keyboards/handwired/owlet60/rules.mk +++ b/keyboards/handwired/owlet60/rules.mk @@ -1,29 +1,16 @@ -SRC += matrix.c - # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # @@ -45,4 +32,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes -OLED_DRIVER_ENABLE = no \ No newline at end of file +OLED_DRIVER_ENABLE = no + +SRC += matrix.c \ No newline at end of file diff --git a/keyboards/maartenwut/minitomic/rules.mk b/keyboards/maartenwut/minitomic/rules.mk index d483b8db71d3..7af2b187037d 100644 --- a/keyboards/maartenwut/minitomic/rules.mk +++ b/keyboards/maartenwut/minitomic/rules.mk @@ -7,7 +7,8 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu # Build Options From eabdef3b4d304e668fcd9711c0e661a64cc96ba6 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 16 Feb 2020 12:14:19 -0800 Subject: [PATCH 304/331] [Keyboard] Add Panc40 by Panc Interactive (#8175) * Add Panc40 by Panc Interactive * Fix LAYOUT_sebright macro --- keyboards/panc40/config.h | 41 +++++ keyboards/panc40/info.json | 152 ++++++++++++++++++ keyboards/panc40/keymaps/default/keymap.c | 20 +++ keyboards/panc40/keymaps/default/readme.md | 33 ++++ .../panc40/keymaps/default_minorca/keymap.c | 19 +++ .../panc40/keymaps/default_minorca/readme.md | 15 ++ .../panc40/keymaps/default_sebright/keymap.c | 20 +++ .../panc40/keymaps/default_sebright/readme.md | 15 ++ keyboards/panc40/panc40.c | 1 + keyboards/panc40/panc40.h | 39 +++++ keyboards/panc40/readme.md | 15 ++ keyboards/panc40/rules.mk | 32 ++++ 12 files changed, 402 insertions(+) create mode 100644 keyboards/panc40/config.h create mode 100644 keyboards/panc40/info.json create mode 100644 keyboards/panc40/keymaps/default/keymap.c create mode 100644 keyboards/panc40/keymaps/default/readme.md create mode 100644 keyboards/panc40/keymaps/default_minorca/keymap.c create mode 100644 keyboards/panc40/keymaps/default_minorca/readme.md create mode 100644 keyboards/panc40/keymaps/default_sebright/keymap.c create mode 100644 keyboards/panc40/keymaps/default_sebright/readme.md create mode 100644 keyboards/panc40/panc40.c create mode 100644 keyboards/panc40/panc40.h create mode 100644 keyboards/panc40/readme.md create mode 100644 keyboards/panc40/rules.mk diff --git a/keyboards/panc40/config.h b/keyboards/panc40/config.h new file mode 100644 index 000000000000..8a5243a446dc --- /dev/null +++ b/keyboards/panc40/config.h @@ -0,0 +1,41 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Panc Interactive +#define PRODUCT Panc40 +#define DESCRIPTION QMK Firmware for Panc40 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F0, F1, F4, F5 } +#define MATRIX_COL_PINS { F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D0, D1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/panc40/info.json b/keyboards/panc40/info.json new file mode 100644 index 000000000000..dc6b9e152ffe --- /dev/null +++ b/keyboards/panc40/info.json @@ -0,0 +1,152 @@ +{ + "keyboard_name": "Panc40", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_all": { + "key_count": 45, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.25}, + {"label":"K11", "x":1.25, "y":1}, + {"label":"K12", "x":2.25, "y":1}, + {"label":"K13", "x":3.25, "y":1}, + {"label":"K14", "x":4.25, "y":1}, + {"label":"K15", "x":5.25, "y":1}, + {"label":"K16", "x":6.25, "y":1}, + {"label":"K17", "x":7.25, "y":1}, + {"label":"K18", "x":8.25, "y":1}, + {"label":"K19", "x":9.25, "y":1}, + {"label":"K1A", "x":10.25, "y":1, "w":1.75}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K21", "x":1.75, "y":2}, + {"label":"K22", "x":2.75, "y":2}, + {"label":"K23", "x":3.75, "y":2}, + {"label":"K24", "x":4.75, "y":2}, + {"label":"K25", "x":5.75, "y":2}, + {"label":"K26", "x":6.75, "y":2}, + {"label":"K27", "x":7.75, "y":2}, + {"label":"K28", "x":8.75, "y":2}, + {"label":"K29", "x":9.75, "y":2}, + {"label":"K2B", "x":10.75, "y":2, "w":1.25}, + {"label":"K30", "x":0, "y":3, "w":1.25}, + {"label":"K31", "x":1.25, "y":3, "w":1.25}, + {"label":"K32", "x":2.5, "y":3, "w":1.25}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":6.75, "y":3}, + {"label":"K37", "x":7.75, "y":3}, + {"label":"K38", "x":8.75, "y":3}, + {"label":"K39", "x":9.75, "y":3}, + {"label":"K3B", "x":10.75, "y":3, "w":1.25} + ] + }, + "LAYOUT_minorca": { + "key_count": 42, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.25}, + {"label":"K11", "x":1.25, "y":1}, + {"label":"K12", "x":2.25, "y":1}, + {"label":"K13", "x":3.25, "y":1}, + {"label":"K14", "x":4.25, "y":1}, + {"label":"K15", "x":5.25, "y":1}, + {"label":"K16", "x":6.25, "y":1}, + {"label":"K17", "x":7.25, "y":1}, + {"label":"K18", "x":8.25, "y":1}, + {"label":"K19", "x":9.25, "y":1}, + {"label":"K1A", "x":10.25, "y":1, "w":1.75}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K21", "x":1.75, "y":2}, + {"label":"K22", "x":2.75, "y":2}, + {"label":"K23", "x":3.75, "y":2}, + {"label":"K24", "x":4.75, "y":2}, + {"label":"K25", "x":5.75, "y":2}, + {"label":"K26", "x":6.75, "y":2}, + {"label":"K27", "x":7.75, "y":2}, + {"label":"K28", "x":8.75, "y":2}, + {"label":"K29", "x":9.75, "y":2}, + {"label":"K2B", "x":10.75, "y":2, "w":1.25}, + {"label":"K30", "x":0, "y":3, "w":1.25}, + {"label":"K31", "x":1.25, "y":3, "w":1.25}, + {"label":"K32", "x":2.5, "y":3, "w":1.25}, + {"label":"K34", "x":3.75, "y":3, "w":2.25}, + {"label":"K36", "x":6, "y":3, "w":2.25}, + {"label":"K38", "x":8.25, "y":3, "w":1.25}, + {"label":"K39", "x":9.5, "y":3}, + {"label":"K3B", "x":10.5, "y":3, "w":1.5} + ] + }, + "LAYOUT_sebright": { + "key_count": 41, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.25}, + {"label":"K11", "x":1.25, "y":1}, + {"label":"K12", "x":2.25, "y":1}, + {"label":"K13", "x":3.25, "y":1}, + {"label":"K14", "x":4.25, "y":1}, + {"label":"K15", "x":5.25, "y":1}, + {"label":"K16", "x":6.25, "y":1}, + {"label":"K17", "x":7.25, "y":1}, + {"label":"K18", "x":8.25, "y":1}, + {"label":"K19", "x":9.25, "y":1}, + {"label":"K1A", "x":10.25, "y":1, "w":1.75}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K21", "x":1.75, "y":2}, + {"label":"K22", "x":2.75, "y":2}, + {"label":"K23", "x":3.75, "y":2}, + {"label":"K24", "x":4.75, "y":2}, + {"label":"K25", "x":5.75, "y":2}, + {"label":"K26", "x":6.75, "y":2}, + {"label":"K27", "x":7.75, "y":2}, + {"label":"K28", "x":8.75, "y":2}, + {"label":"K29", "x":9.75, "y":2}, + {"label":"K2B", "x":10.75, "y":2, "w":1.25}, + {"label":"K31", "x":1.25, "y":3, "w":1.25}, + {"label":"K32", "x":2.5, "y":3, "w":1.25}, + {"label":"K33", "x":3.75, "y":3, "w":1.25}, + {"label":"K35", "x":5, "y":3, "w":2.75}, + {"label":"K37", "x":7.75, "y":3}, + {"label":"K38", "x":8.75, "y":3}, + {"label":"K39", "x":9.75, "y":3} + ] + } + } +} diff --git a/keyboards/panc40/keymaps/default/keymap.c b/keyboards/panc40/keymaps/default/keymap.c new file mode 100644 index 000000000000..95bfa32c75b7 --- /dev/null +++ b/keyboards/panc40/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, RGB_TOG + ), + + [1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + +}; diff --git a/keyboards/panc40/keymaps/default/readme.md b/keyboards/panc40/keymaps/default/readme.md new file mode 100644 index 000000000000..619243389e85 --- /dev/null +++ b/keyboards/panc40/keymaps/default/readme.md @@ -0,0 +1,33 @@ +# The default keymap for Panc40 + +Supports both Minorca and Sebright layouts with one firmware. + +## Minorca layout + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│Esc| Q | W | E | R | T | Y | U | I | O | P |BS │ +├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ +│Tab │ A | S | D | F | G | H | J | K | L | \ | │ +├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ +│Shift │ Z | X | C | V | B | N | M |, <│. >│Fn │ +├────┬─┴──┬┴───┼───┴───┴┬──┴───┴─┬─┴──┬┴──┬┴────┤ +│Ctrl│GUI │Alt │ Space | Space │GUI │Ctl│RGBTg| +└────┴────┴────┴────────┴────────┴────┴───┴─────┘ +``` + +## Sebright layout + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│Esc| Q | W | E | R | T | Y | U | I | O | P |BS │ +├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ +│Tab │ A | S | D | F | G | H | J | K | L | \ | │ +├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ +│Shift │ Z | X | C | V | B | N | M |, <│. >│Fn │ +└────┬─┴──┬┴───┼───┴┬──┴───┴───┼───┼───┼───┼────┘ + │GUI │Alt │Ent │ Space │Alt│GUI│Ctl│ + └────┴────┴────┴──────────┴───┴───┴───┘ +``` + +Both layouts use `Fn+Esc` to Reset. diff --git a/keyboards/panc40/keymaps/default_minorca/keymap.c b/keyboards/panc40/keymaps/default_minorca/keymap.c new file mode 100644 index 000000000000..76889bb7dc84 --- /dev/null +++ b/keyboards/panc40/keymaps/default_minorca/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_minorca( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, RGB_TOG + ), + + [1] = LAYOUT_minorca( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/panc40/keymaps/default_minorca/readme.md b/keyboards/panc40/keymaps/default_minorca/readme.md new file mode 100644 index 000000000000..224d011c88a8 --- /dev/null +++ b/keyboards/panc40/keymaps/default_minorca/readme.md @@ -0,0 +1,15 @@ +# default_minorca + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│Esc| Q | W | E | R | T | Y | U | I | O | P |BS │ +├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ +│Tab │ A | S | D | F | G | H | J | K | L | \ | │ +├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ +│Shift │ Z | X | C | V | B | N | M |, <│. >│Fn │ +├────┬─┴──┬┴───┼───┴───┴┬──┴───┴─┬─┴──┬┴──┬┴────┤ +│Ctrl│GUI │Alt │ Space | Space │GUI │Ctl│RGBTg| +└────┴────┴────┴────────┴────────┴────┴───┴─────┘ +``` + +`Fn+Esc` = `RESET` diff --git a/keyboards/panc40/keymaps/default_sebright/keymap.c b/keyboards/panc40/keymaps/default_sebright/keymap.c new file mode 100644 index 000000000000..f6ab057a9322 --- /dev/null +++ b/keyboards/panc40/keymaps/default_sebright/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_sebright( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), + KC_LGUI, KC_LALT, KC_ENT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_sebright( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + +}; diff --git a/keyboards/panc40/keymaps/default_sebright/readme.md b/keyboards/panc40/keymaps/default_sebright/readme.md new file mode 100644 index 000000000000..8d3de22e14ba --- /dev/null +++ b/keyboards/panc40/keymaps/default_sebright/readme.md @@ -0,0 +1,15 @@ +# default_sebright + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│Esc| Q | W | E | R | T | Y | U | I | O | P |BS │ +├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ +│Tab │ A | S | D | F | G | H | J | K | L | \ | │ +├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ +│Shift │ Z | X | C | V | B | N | M |, <│. >│Fn │ +└────┬─┴──┬┴───┼───┴┬──┴───┴───┼───┼───┼───┼────┘ + │GUI │Alt │Ent │ Space │Alt│GUI│Ctl│ + └────┴────┴────┴──────────┴───┴───┴───┘ +``` + +`Fn+Esc` = `RESET` diff --git a/keyboards/panc40/panc40.c b/keyboards/panc40/panc40.c new file mode 100644 index 000000000000..8f6bd92dfb4e --- /dev/null +++ b/keyboards/panc40/panc40.c @@ -0,0 +1 @@ +#include "panc40.h" diff --git a/keyboards/panc40/panc40.h b/keyboards/panc40/panc40.h new file mode 100644 index 000000000000..f1e317d4944e --- /dev/null +++ b/keyboards/panc40/panc40.h @@ -0,0 +1,39 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, KC_NO, K3B } \ +} + +#define LAYOUT_minorca( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2B, \ + K30, K31, K32, K34, K36, K38, K39, K3B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, K2B }, \ + { K30, K31, K32, KC_NO, K34, KC_NO, K36, KC_NO, K38, K39, KC_NO, K3B } \ +} + +#define LAYOUT_sebright( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2B, \ + K31, K32, K33, K35, K37, K38, K39 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, K2B }, \ + { KC_NO, K31, K32, K33, KC_NO, K35, KC_NO, K37, K38, K39, KC_NO, KC_NO } \ +} diff --git a/keyboards/panc40/readme.md b/keyboards/panc40/readme.md new file mode 100644 index 000000000000..2549906e157a --- /dev/null +++ b/keyboards/panc40/readme.md @@ -0,0 +1,15 @@ +# Panc40 + +![Panc40](https://www.panc.co/uploads/4/0/3/7/4037410/dsc-1460-orig_orig.jpg) + +A 40% keyboard by [Panc Interactive](https://panc.co/) featuring hotswap sockets, RGB underglow and USB-C. Supports the Minorca and Sebright layouts. + +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +* Hardware Supported: Panc40 PCB, ATmega32U4 +* Hardware Availability: [Reddit Group Buy](https://www.reddit.com/r/mechmarket/comments/cdi2y2/gb_panc40_40_keyboard_group_buy_update/) + +Make example for this keyboard (after setting up your build environment): + + make panc40:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/panc40/rules.mk b/keyboards/panc40/rules.mk new file mode 100644 index 000000000000..e8087f50f37e --- /dev/null +++ b/keyboards/panc40/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From bbe8180ad904cd432b6f97e9662231fa0548ad0e Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 17 Feb 2020 17:50:26 +0900 Subject: [PATCH 305/331] [Docs] add japanese translation (detail guide part) (#7722) * add detail-guide part * some updates for easy reading * some updates for easy reading * some updates for easy reading * some updates for easy reading * some updates for easy reading * some updates for easy reading * some updates for easy reading * some updates for easy reading * update file based on comment * update file based on comment * update file based on comment * update git command in header * update files based on comments, and update git command in header * update file based on comment * update file based on comment * update file based on comment * update file based on comment * update file based on comment * update file based on comment * update file based on comment * update file based on comment Co-Authored-By: shela Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> --- docs/ja/custom_quantum_functions.md | 518 +++++++++++++++++++++++++ docs/ja/flashing.md | 247 ++++++++++++ docs/ja/getting_started_build_tools.md | 146 +++++++ docs/ja/getting_started_make_guide.md | 153 ++++++++ docs/ja/getting_started_vagrant.md | 62 +++ docs/ja/keymap.md | 174 +++++++++ 6 files changed, 1300 insertions(+) create mode 100644 docs/ja/custom_quantum_functions.md create mode 100644 docs/ja/flashing.md create mode 100644 docs/ja/getting_started_build_tools.md create mode 100644 docs/ja/getting_started_make_guide.md create mode 100644 docs/ja/getting_started_vagrant.md create mode 100644 docs/ja/keymap.md diff --git a/docs/ja/custom_quantum_functions.md b/docs/ja/custom_quantum_functions.md new file mode 100644 index 000000000000..f49df8f65b6c --- /dev/null +++ b/docs/ja/custom_quantum_functions.md @@ -0,0 +1,518 @@ +# キーボードの挙動をカスタマイズする方法 + + + +多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。 + +このページでは、QMK に関する特別な知識は想定していませんが、[QMK の理解](ja/understanding_qmk.md)を読むとより根本的なレベルで何が起きているかを理解するのに役立ちます。 + +## コア、キーボード、キーマップ階層 :id=a-word-on-core-vs-keyboards-vs-keymap + +私たちは QMK を階層として構造化しました: + +* コア (`_quantum`) + * キーボード/リビジョン (`_kb`) + * キーマップ (`_user`) + +以下で説明される各関数は `_kb()` サフィックスあるいは `_user()` サフィックスを使って定義することができます。`_kb()` サフィックスはキーボード/リビジョンレベルで使うことを意図しており、一方で `_user()` サフィックスはキーマップレベルで使われるべきです。 + +キーボード/リビジョンレベルで関数を定義する場合、`_kb()` は他の何かを実行する前に `_user()` を呼び出すよう実装することが重要です。そうでなければ、キーマップレベル関数は呼ばれないでしょう。 + +# カスタムキーコード + +最も一般的なタスクは、既存のキーコードの挙動を変更するか、新しいキーコードを作成することです。コードの観点からは、それぞれの仕組みは非常に似ています。 + +## 新しいキーコードの定義 + +独自のカスタムキーコードを作成する最初のステップは、それらを列挙することです。これは、カスタムキーコードに名前を付け、そのキーコードにユニークな番号を割り当てることの両方を意味します。QMK は、カスタムキーコードを固定範囲の番号に制限するのではなく、`SAFE_RANGE` マクロを提供します。カスタムキーコードを列挙する時に `SAFE_RANGE` を使うと、ユニークな番号を取得することが保証されます。 + + +これは2つのキーコードを列挙する例です。このブロックを `keymap.c` に追加した後で、キーマップの中で `FOO` と `BAR` を使うことができます。 + +```c +enum my_keycodes { + FOO = SAFE_RANGE, + BAR +}; +``` + +## 任意のキーコードの挙動のプログラミング + +既存のキーの挙動を上書きしたい場合、あるいは新しいキーについて挙動を定義する場合、`process_record_kb()` および `process_record_user()` 関数を使うべきです。これらは実際のキーイベントが処理される前のキー処理中に QMK によって呼び出されます。これらの関数が `true` を返す場合、QMK はキーコードを通常通りに処理します。これは、キーを置き換えるのではなく、キーの機能を拡張するのに便利です。これらの関数が `false` を返す場合、QMK は通常のキー処理をスキップし、必要なキーのアップまたはダウンイベントを送信するのかはユーザ次第です。 + +これらの関数はキーが押されるか放されるたびに呼び出されます。 + +### `process_record_user()` の実装例 + +この例は2つの事を行います。`FOO` と呼ばれるカスタムキーコードの挙動を定義し、Enter キーが押されるたびに音を再生します。 + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FOO: + if (record->event.pressed) { + // 押された時に何かをします + } else { + // 放された時に何かをします + } + return false; // このキーの以降の処理をスキップします + case KC_ENTER: + // enter が押された時に音を再生します + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_qwerty); + } + return true; // QMK に enter のプレスまたはリリースイベントを送信させます + default: + return true; // 他の全てのキーコードを通常通りに処理します + } +} +``` + +### `process_record_*` 関数のドキュメント + +* キーボード/リビジョン: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` +* キーマップ: `bool process_record_user(uint16_t keycode, keyrecord_t *record)` + +`keycode` 引数はキーマップで定義されているものです。例えば `MO(1)`、`KC_L` など。これらのイベントを処理するには `switch...case` ブロックを使うべきです。 + +`record` 引数は実際のプレスに関する情報を含みます: + +```c +keyrecord_t record { + keyevent_t event { + keypos_t key { + uint8_t col + uint8_t row + } + bool pressed + uint16_t time + } +} +``` + +# LED 制御 + +QMK は HID 仕様で定義された5つの LED の読み取りメソッドを提供します: + +* Num Lock +* Caps Lock +* Scroll Lock +* Compose +* Kana + +ロック LED の状態を取得するには2つの方法があります: + +* `bool led_update_kb(led_t led_state)` あるいは `_user(led_t led_state)` を実装する、または +* `led_t host_keyboard_led_state()` を呼び出す + +!> `host_keyboard_led_state()` は `led_update_user()` が呼ばれる前に新しい値を既に反映している場合があります。 + +LED の状態を `uint8_t` として提供する2つの非推奨の関数があります: + +* `uint8_t led_set_kb(uint8_t usb_led)` と `_user(uint8_t usb_led)` +* `uint8_t host_keyboard_leds()` + +## `led_update_user()` + +この関数はこれら5つの LED のいずれかの状態が変化すると呼ばれます。LED の状態を構造体のパラメータとして受け取ります。 + +慣例により、`led_update_kb()` にそのコードを実行するようフックさせるために `led_update_user()` から `true` を返し、`led_update_kb()` でコードを実行したくない場合は `false` を返します。 + +以下はいくつかの例です: + +- レイヤー表示のような何かのために LED を使うために LED を上書きする + - `_kb()` 関数を実行したくないので、`false` を返します。これはレイヤーの挙動を上書きするためです。 +- LED がオンあるいはオフになった時に音楽を再生する。 + - `_kb` 関数を実行したいので、`true` を返します。これはデフォルトの LED の挙動に追加されます。 + +?> `led_set_*` 関数は `bool` の代わりに `void` を返すため、キーボードの LED 制御を上書きすることができません。従って、代わりに `led_update_*` を使うことをお勧めします。 + +### `led_update_kb()` の実装例 + +```c +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin は 1 でピンを high に、0 で low に設定します。 + // この例では、ピンは反転していて、 + // low/0 は LED がオンになり、high/1 は LED がオフになります。 + // この挙動は、LED がピンと VCC の間にあるか、ピンと GND の間にあるかどうかに依存します。 + writePin(B0, !led_state.num_lock); + writePin(B1, !led_state.caps_lock); + writePin(B2, !led_state.scroll_lock); + writePin(B3, !led_state.compose); + writePin(B4, !led_state.kana); + } + return res; +} +``` + +### `led_update_user()` の実装例 + +この不完全な例は Caps Lock がオンまたはオフになった場合に音を再生します。また LED の状態を保持する必要があるため、`true` を返します。 + +```c +#ifdef AUDIO_ENABLE + float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); + float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +#endif + +bool led_update_user(led_t led_state) { + #ifdef AUDIO_ENABLE + static uint8_t caps_state = 0; + if (caps_state != led_state.caps_lock) { + led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off); + caps_state = led_state.caps_lock; + } + #endif + return true; +} +``` + +### `led_update_*` 関数のドキュメント + +* キーボード/リビジョン: `bool led_update_kb(led_t led_state)` +* キーマップ: `bool led_update_user(led_t led_state)` + +## `host_keyboard_led_state()` + +最後に受信した LED の状態を `led_t` として取得するためにこの関数を呼びます。これは、`led_update_*` の外部から、例えば [`matrix_scan_user()`](#matrix-scanning-code) の中で LED の状態を読み取るのに便利です。 + +## 物理的な LED の状態の設定 + +一部のキーボードの実装は、物理的な LED の状態を設定するための便利なメソッドを提供しています。 + +### Ergodox キーボード + +Ergodox の実装は、個々の LED をオンあるいはオフにするために `ergodox_right_led_1`/`2`/`3_on`/`off()` と、インデックスによってそれらをオンあるいはオフにするために `ergodox_right_led_on`/`off(uint8_t led)` を提供します。 + +さらに、LED の明度を指定することができます。全ての LED に同じ明度を指定するなら `ergodox_led_all_set(uint8_t n)` を使い、個別の LED の明度を指定するなら `ergodox_right_led_1`/`2`/`3_set(uint8_t n)` を使い、LED のインデックスを指定して明度を指定するには `ergodox_right_led_set(uint8_t led, uint8_t n)` を使います。 + +Ergodox キーボードは、最低の明度として `LED_BRIGHTNESS_LO` を、最高の輝度(これはデフォルトです)として `LED_BRIGHTNESS_HI` も定義しています。 + +# キーボードの初期化コード + +キーボードの初期化プロセスには幾つかのステップがあります。何をしたいかによって、どの関数を使うべきかに影響します。 + +3つの主な初期化関数があり、呼び出される順番にリストされています。 + +* `keyboard_pre_init_*` - ほとんどのものが開始される前に起こります。非常に早くに実行したいハードウェアのセットアップに適しています。 +* `matrix_init_*` - ファームウェアのスタートアッププロセスの途中で起こります。ハードウェアは初期化されますが、機能はまだ初期化されていない場合があります。 +* `keyboard_post_init_*` - ファームウェアのスタートアッププロセスの最後に起こります。これはほとんどの場合、 "カスタマイズ"コードを配置する場所です。 + +!> ほとんどの人にとって、`keyboard_post_init_user` が呼び出したいものです。例えば、ここで RGB アンダーグローのセットアップを行います。 + +## キーボードの事前初期化コード + +これは USB さえ起動する前の、起動中の非常に早い段階で実行されます。 + +この直後にマトリックスが初期化されます。 + +これは主にハードウェア向きの初期化のためであるため、ほとんどのユーザは使うべきではありません。 + +ただし、初期化が必要なハードウェアがある場合には、これが最適な場所です (LED ピンの初期化など)。 + +### `keyboard_pre_init_user()` の実装例 + +この例は、キーボードレベルで、LED ピンとして B0、B1、B2、B3 および B4 をセットアップします。 + +```c +void keyboard_pre_init_user(void) { + // キーボードの事前初期コードを呼び出します。 + + // LED ピンを出力として設定します + setPinOutput(B0); + setPinOutput(B1); + setPinOutput(B2); + setPinOutput(B3); + setPinOutput(B4); +} +``` + +### `keyboard_pre_init_*` 関数のドキュメント + +* キーボード/リビジョン: `void keyboard_pre_init_kb(void)` +* キーマップ: `void keyboard_pre_init_user(void)` + +## マトリックスの初期化コード + +これは、マトリックスが初期化され、ハードウェアの一部がセットアップされた後で、ただし機能の多くが初期化される前に、呼び出されます。 + +他の場所で必要になるかもしれないものをセットアップするのに役立ちますが、ハードウェアに関連するものではなく、開始場所に依存するものでもありません。 + + +### `matrix_init_*` 関数のドキュメント + +* キーボード/リビジョン: `void matrix_init_kb(void)` +* キーマップ: `void matrix_init_user(void)` + + +## キーボードの事後初期化コード + +キーボードの初期化プロセスの極めて最後のタスクとして実行されます。この時点で初期化される必要があるような、特定の機能を変更したい場合に便利です。 + + +### `keyboard_post_init_user()` の実装例 + +この例は、他の全てのものが初期化された後で実行され、rgb アンダーグローの設定をセットアップします。 + +```c +void keyboard_post_init_user(void) { + // post init コードを呼びます + rgblight_enable_noeeprom(); // 設定を保存せずに Rgb を有効にします + rgblight_sethsv_noeeprom(180, 255, 255); // 保存せずに色を青緑/シアンに設定します + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // 保存せずにモードを高速なブリージングに設定します +} +``` + +### `keyboard_post_init_*` 関数のドキュメント + +* キーボード/リビジョン: `void keyboard_post_init_kb(void)` +* キーマップ: `void keyboard_post_init_user(void)` + +# マトリックススキャンコード :id=matrix-scanning-code + +可能であれば常に `process_record_*()` を使ってキーボードをカスタマイズし、その方法でイベントをフックし、コードがキーボードのパフォーマンスに悪影響を与えないようにします。ただし、まれにマトリックススキャンにフックする必要があります。これらの関数は1秒あたり少なくとも10回は呼び出されるため、これらの関数のコードのパフォーマンスに非常に注意してください。 + +### `matrix_scan_*` の実装例 + +この例は意図的に省略されています。このようなパフォーマンスに敏感な領域にフックする前に、例を使わずにこれを書くために、QMK 内部について十分理解する必要があります。助けが必要であれば、[issue を開く](https://github.com/qmk/qmk_firmware/issues/new) か [Discord で会話](https://discord.gg/Uq7gcHh)してください。 + +### `matrix_scan_*` 関数のドキュメント + +* キーボード/リビジョン: `void matrix_scan_kb(void)` +* キーマップ: `void matrix_scan_user(void)` + +この関数はマトリックススキャンのたびに呼び出されます。これは基本的に MCU が処理できる頻度です。大量に実行されるため、ここに何を置くかについては注意してください。 + +カスタムマトリックススキャンコードが必要な場合は、この関数を使う必要があります。また、カスタムステータス出力 (LED あるいはディスプレイなど)や、ユーザが入力していない場合でも定期的にトリガーするその他の機能のために使うことができます。 + + +# キーボードアイドリング/ウェイクコード + +キーボードがサポートしている場合、多くの機能を停止することで"アイドル"にすることができます。これの良い例は、RGB ライトあるいはバックライトです。これにより、電力消費を節約できるか、キーボードの動作が改善されるかもしれません。 + +これは2つの関数によって制御されます: `suspend_power_down_*` および `suspend_wakeup_init_*`。これらはシステムキーボードがアイドルになった時と、起動した時のそれぞれで呼ばれます。 + + +### suspend_power_down_user() と suspend_wakeup_init_user() の実装例 + + +```c +void suspend_power_down_user(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_user(void) { + rgb_matrix_set_suspend_state(false); +} +``` + +### キーボードサスペンド/ウェイク関数のドキュメント + +* キーボード/リビジョン : `void suspend_power_down_kb(void)` および `void suspend_wakeup_init_user(void)` +* キーマップ: `void suspend_power_down_kb(void)` および `void suspend_wakeup_init_user(void)` + +# レイヤー切り替えコード + +これはレイヤーが切り替えられるたびにコードを実行します。レイヤー表示あるいはカスタムレイヤー処理に役立ちます。 + +### `layer_state_set_*` の実装例 + +この例は、レイヤーに基づいて [RGB アンダーグロー](ja/feature_rgblight.md)を設定する方法を示していて、Planck を例として使っています。 + +```c +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _RAISE: + rgblight_setrgb (0x00, 0x00, 0xFF); + break; + case _LOWER: + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + case _PLOVER: + rgblight_setrgb (0x00, 0xFF, 0x00); + break; + case _ADJUST: + rgblight_setrgb (0x7A, 0x00, 0xFF); + break; + default: // 他の全てのレイヤーあるいはデフォルトのレイヤー + rgblight_setrgb (0x00, 0xFF, 0xFF); + break; + } + return state; +} +``` +### `layer_state_set_*` 関数のドキュメント + +* キーボード/リビジョン: `layer_state_t layer_state_set_kb(layer_state_t state)` +* キーマップ: `layer_state_t layer_state_set_user(layer_state_t state)` + + +[キーマップの概要](ja/keymap.md#keymap-layer-status)で説明されるように、`state` はアクティブなレイヤーのビットマスクです。 + + +# 永続的な設定 (EEPROM) + +これによりキーボードのための永続的な設定を設定することができます。これらの設定はコントローラの EEPROM に保存され、電源が落ちた後であっても保持されます。設定は `eeconfig_read_kb` および `eeconfig_read_user` を使って読み取ることができ、`eeconfig_update_kb` および `eeconfig_update_user` を使って書きこむことができます。これは切り替え可能な機能 (rgb レイヤーの表示の切り替えなど)に役立ちます。さらに、`eeconfig_init_kb` および `eeconfig_init_user` を使って EEPROM のデフォルト値を設定できます。 + +ここでの複雑な部分は、EEPROM を介してデータを保存およびアクセスできる方法がたくさんあり、これを行うための"正しい"方法が無いということです。ただし、各関数には DWORD (4 バイト)しかありません。 + +EEPROM の書き込み回数には制限があることに注意してください。これは非常に高い値ですが、EEPROM に書き込むのはこれだけではなく、もし頻繁に書き込むと、MCU の寿命を大幅に短くする可能性があります。 + +* この例を理解していない場合は、この機能はかなり複雑なため、この機能を使うことを避けても構いません。 + +### 実装例 + +これは、設定を追加し、読み書きする例です。この例では、ユーザキーマップを使っています。これは複雑な機能で、多くのことが行われています。実際、動作のために上記の多くの関数を使います! + + +keymap.c ファイルの中で、先頭にこれを追加します: +```c +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; +``` + +これは、設定をメモリ内に保存し、EEPROM に書き込むことができる32ビット構造体をセットアップします。これを使うと、この構造体に変数が定義されるため、変数を定義する必要が無くなります。`bool` (boolean) の値は1ビットを使い、`uint8_t` は8ビットを使い、`uint16_t` は16ビットを使うことに注意してください。組み合わせて使うことができますが、順番の変更は読み書きされる値が変更されるため、問題が発生するかもしれません。 + +`layer_state_set_*` 関数のために `rgb_layer_change` を使い、全てを設定するために `keyboard_post_init_user` および `process_record_user` を使います。 + +ここで、上の `keyboard_post_init_user` コードを使って、作成したばかりの構造体を設定するために `eeconfig_read_user()` を追加します。そして、この構造体をすぐに使ってキーマップの機能を制御することができます。それは以下のようになります: +```c +void keyboard_post_init_user(void) { + // キーマップレベルのマトリックスの初期化処理を呼びます + + // EEPROM からユーザ設定を読み込みます + user_config.raw = eeconfig_read_user(); + + // 有効な場合はデフォルトレイヤーを設定します + if (user_config.rgb_layer_change) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(1); + } +} +``` +上記の関数は読み取ったばかりの EEPROM 設定を使い、デフォルトのレイヤーの RGB 色を設定します。その「生の」値は、上で作成した「共用体」に基づいて使用可能な構造に変換されます。 + +```c +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _RAISE: + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); } + break; + case _LOWER: + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); } + break; + case _PLOVER: + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_green(); rgblight_mode_noeeprom(1); } + break; + case _ADJUST: + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); } + break; + default: // 他の全てのレイヤーあるいはデフォルトのレイヤー + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); } + break; + } + return state; +} +``` +これにより、値が有効になっていた場合のみ、RGB アンダーグローが変更されます。この値を設定するために、`RGB_LYR` と呼ばれる `process_record_user` 用の新しいキーコードを作成します。さらに、通常の RGB コードを使う場合、上記の例を使ってオフになることを確認します。以下のようになります: +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FOO: + if (record->event.pressed) { + // 押された時に何かをします + } else { + // 放された時に何かをします + } + return false; // このキーの以降の処理をスキップします + case KC_ENTER: + // enter が押された時に音を再生します + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_qwerty); + } + return true; // QMK に enter のプレスまたはリリースイベントを送信させます + case RGB_LYR: // これにより、アンダーグローをレイヤー表示として、あるいは通常通りに使うことができます。 + if (record->event.pressed) { + user_config.rgb_layer_change ^= 1; // 状態を切り替えます + eeconfig_update_user(user_config.raw); // 新しい状態を EEPROM に書き込みます + if (user_config.rgb_layer_change) { // レイヤーの状態表示が有効な場合 + layer_state_set(layer_state); // すぐにレイヤーの色を更新します + } + } + return false; break; + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // 任意の RGB コード に対して(quantum_keycodes.h を見てください。400行目参照) + if (record->event.pressed) { // これはレイヤー表示を無効にします。これを変更する場合は、無効にしたいだろうため。 + if (user_config.rgb_layer_change) { // 有効な場合のみ + user_config.rgb_layer_change = false; // 無効にします + eeconfig_update_user(user_config.raw); // 設定を EEPROM に書き込みます + } + } + return true; break; + default: + return true; // 他の全てのキーコードを通常通りに処理します + } +} +``` +最後に、`eeconfig_init_user` 関数を追加して、EEPROM がリセットされた時にデフォルト値、さらにはカスタムアクションを指定できるようにします。EEPROM を強制的にリセットするには、`EEP_RST` キーコードあるいは[ブートマジック](ja/feature_bootmagic.md)機能を使います。例えば、デフォルトで rgb レイヤー表示を設定し、デフォルト値を保存したい場合。 + +```c +void eeconfig_init_user(void) { // EEPROM がリセットされます! + user_config.raw = 0; + user_config.rgb_layer_change = true; // デフォルトでこれを有効にします + eeconfig_update_user(user_config.raw); // デフォルト値を EEPROM に書き込みます + + // これらの値も EEPROM に書き込むためには、noeeprom 以外のバージョンを使います + rgblight_enable(); // デフォルトで RGB を有効にします + rgblight_sethsv_cyan(); // デフォルトでシアンに設定します + rgblight_mode(1); // デフォルトでソリッドに設定します +} +``` + +これで完了です。RGB レイヤー表示は必要な場合にのみ機能します。キーボードを取り外した後でも保存されます。RGB コードのいずれかを使うと、レイヤー表示が無効になり、設定したモードと色がそのままになります。 + +### 'EECONFIG' 関数のドキュメント + +* キーボード/リビジョン: `void eeconfig_init_kb(void)`、`uint32_t eeconfig_read_kb(void)` および `void eeconfig_update_kb(uint32_t val)` +* キーマップ: `void eeconfig_init_user(void)`、`uint32_t eeconfig_read_user(void)` および `void eeconfig_update_user(uint32_t val)` + +`val` は EEPROM に書き込みたいデータの値です。`eeconfig_read_*` 関数は EEPROM から32ビット(DWORD) 値を返します。 + +# カスタムタッピング期間 + +デフォルトでは、タッピング期間はグローバルに設定されていて、キーでは設定することができません。ほとんどのユーザにとって、これは全然問題ありません。しかし、場合によっては、`LT` キーとは異なるタイムアウトによって、デュアルファンクションキーが大幅に改善されます。なぜなら、一部のキーは他のキーよりも押し続けやすいためです。それぞれにカスタムキーコードを使う代わりに、キーごとに設定可能な `TAPPING_TERM` を使用できます。 + +この機能を有効にするには、最初に `config.h` に `#define TAPPING_TERM_PER_KEY` を追加する必要があります。 + + +## `get_tapping_term` の実装例 + +キーコードに基づいて `TAPPING TERM` を変更するには、次のようなものを `keymap.c` ファイルに追加します: + +```c +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case SFT_T(KC_SPC): + return TAPPING_TERM + 1250; + case LT(1, KC_GRV): + return 130; + default: + return TAPPING_TERM; + } +} +``` + +### `get_tapping_term` 関数のドキュメント + +ここにある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。 diff --git a/docs/ja/flashing.md b/docs/ja/flashing.md new file mode 100644 index 000000000000..1118fb5e2f5d --- /dev/null +++ b/docs/ja/flashing.md @@ -0,0 +1,247 @@ +# 書き込みの手順とブートローダ情報 + + + +キーボードが使用するブートローダにはかなり多くの種類があり、ほぼ全てが異なる書き込みの方法を使います。幸いなことに、[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) のようなプロジェクトは、あまり深く考える必要無しに様々なタイプと互換性を持つことを目指していますが、この文章では様々なタイプのブートローダとそれらを書き込むために利用可能な方法について説明します。 + +`rules.mk` の `BOOTLOADER` 変数で選択されたブートローダがある場合、QMK は .hex ファイルがデバイスに書き込むのに適切なサイズかどうかを自動的に計算し、合計サイズをバイト単位で(最大値とともに)出力します。この処理を手動で実行するには、`check-size` を付けてコンパイルします。例えば、`make planck/rev4:default:check-size`。 + +## DFU + +Atmel の DFU ブートローダはデフォルトで全ての atmega32u4 チップに搭載されており、PCB (旧 OLKB キーボード、Clueboard) に独自の IC を持つ多くのキーボードで使われています。一部のキーボードは、LUFA の DFU ブートローダ(または QMK のフォーク) (新しい OLKB キーボード)を使う場合もあり、そのハードウェアに固有の追加機能が追加されます。 + +DFU ブートローダとの互換性を確保するために、以下のブロックが `rules.mk` にあることを確認してください(オプションとして代わりに `lufa-dfu` や `qmk-dfu` が使えます): + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu +``` + +互換性のあるフラッシャ: + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI) +* QMK の [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` (推奨のコマンドライン) +* [Atmel の Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (非推奨) + +書き込み手順: + +1. `RESET` キーコードを押すか、RESET ボタンをタップします(または RST を GND にショートします)。 +2. OS がデバイスを検知するのを待ちます。 +3. メモリを消去します(自動的に実行されるかもしれません) +4. .hex ファイルを書き込みます +5. デバイスをアプリケーションモードにリセットします(自動的に実行されるかもしれません) + +あるいは: + + make ::dfu + +### QMK DFU + +QMK には LUFA DFU ブートローダのフォークがあり、ブートローダを終了してアプリケーションに戻る時に単純なマトリックススキャンを行うことができます。また、何かが起きた時に、LED を点滅したり、スピーカーでカチカチ音をたてたりします。これらの機能を有効にするには、`config.h` で以下のブロックを有効にします (ブートローダを終了するキーは、ここで定義された INPUT と OUTPUT に接続する必要があります): + + #define QMK_ESC_OUTPUT F1 // 通常 COL + #define QMK_ESC_INPUT D5 // 通常 ROW + #define QMK_LED E6 + #define QMK_SPEAKER C6 + +製造元と製品名は `config.h` から自動的に取得され、製品に「Bootloader」が追加されます。 + +このブートローダを生成するには、`bootloader` ターゲット、例えば `make planck/rev4:default:bootloader` を使います。 + +実稼働対応の .hex ファイル(アプリケーションおよびブートローダを含む)を生成するには、`production` ターゲット、例えば `make planck/rev4:default:production` を使います。 + +### DFU コマンド + +ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:dfu` - これが通常のオプションで、DFU デバイスが使用可能になるまで待機したのちファームウェアを書き込みます。5秒ごとに、DFU デバイスが存在するかチェックしています。 +* `:dfu-ee` - 通常の hex ファイルの代わりに `eep` ファイルを書き込みます。これを使用するのはまれです。 +* `:dfu-split-left` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROM ファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ +* `:dfu-split-right` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」 EEPROM ファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_ + +## Caterina + +Arduino ボードとそのクローンは [Caterina ブートローダ](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (Pro Micro またはそのクローンで構築されたキーボード)を使用し、avr109 プロトコルを使って仮想シリアルを介して通信します。[A-Star](https://www.pololu.com/docs/0J61/9) のようなブートローダは Caterina に基づいています。 + +Caterina ブートローダとの互換性を確保するために、以下のブロックが `rules.mk` にあることを確認してください: + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina +``` + +互換性のあるフラッシャ: + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI) +* avr109 を使った [avrdude](http://www.nongnu.org/avrdude/) / `:avrdude` (推奨のコマンドライン) +* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS) + +書き込み手順: + +1. `RESET` キーコードを押すか、RST をすばやく GND にショートします (入力後7秒で書き込みます) +2. OS がデバイスを検知するのを待ちます。 +3. .hex ファイルを書き込みます +4. デバイスが自動的にリセットされるのを待ちます + +あるいは + + make ::avrdude + + +#### Caterina コマンド + +ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:avrdude` - これが通常のオプションで、Caterina デバイスが(新しい COM ポートを検出して)使用可能になるまで待機し、ファームウェアを書き込みます。 +* `:avrdude-loop` - これは `:avrdude` と同じコマンドを実行します。ただし書き込みが終了すると再び Caterina デバイスの書き込み待ちに戻ります。これは何台ものデバイスへ書き込むのに便利です。_Ctrl+C を押して、手動でこの繰り返しを終了させる必要があります。_ +* `:avrdude-split-left` - デフォルトオプション (`:avrdude`) と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROM ファイルも書き込まれます。_これは、Pro Micro ベースの分割キーボードに最適です。_ +* `:avrdude-split-right` - デフォルトオプション (`:avrdude`) と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」 EEPROM ファイルも書き込まれます。_これは、Pro Micro ベースの分割キーボードに最適です。_ + + + +## Halfkay + +Halfkay は PJRC によって開発された超スリムなプロトコルであり、HID を使用し、全ての Teensys (つまり 2.0)に搭載されています。 + +Halfkay ブートローダとの互換性を確保するために、以下のブロックが `rules.mk` にあることを確認してください: + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay +``` + +互換性のあるフラッシャ: + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI) +* [Teensy ローダー](https://www.pjrc.com/teensy/loader.html) +* [Teensy ローダーコマンドライン](https://www.pjrc.com/teensy/loader_cli.html) (推奨のコマンドライン) + +書き込み手順: + +1. `RESET` キーコードを押すか、RST をすばやく GND にショートします (入力後7秒で書き込みます) +2. OS がデバイスを検知するのを待ちます。 +3. .hex ファイルを書き込みます +4. デバイスをアプリケーションモードにリセットします(自動的に実行されるかもしれません) + +## USBasploader + +USBasploader は matrixstorm によって開発されたブートローダです。V-USB を実行する ATmega328P のような非 USB AVR チップで使われます。 + +USBasploader ブートローダとの互換性を確保するために、以下のブロックが `rules.mk` にあることを確認してください: + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp +``` + +互換性のあるフラッシャ: + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI) +* `usbasp` プログラマを使った [avrdude](http://www.nongnu.org/avrdude/) +* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS) + +書き込み手順: + +1. `RESET` キーコードを押すか、RST を GND にすばやくショートしながら、ブートピンを GND にショートしたままにします。 +2. OS がデバイスを検知するのを待ちます。 +3. .hex ファイルを書き込みます +4. デバイスをアプリケーションモードにリセットします(自動的に実行されるかもしれません) + +## BootloadHID + +BootloadHID は AVR マイクロコントローラ用の USB ブートローダです。アップローダーツールは Windows でカーネルレベルのドライバを必要としないため、DLL をインストールせずに実行することができます。 + +bootloadHID ブートローダとの互換性を確保するために、以下のブロックが `rules.mk` にあることを確認してください: + +```make +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID +``` + +互換性のあるフラッシャ: + +* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (推奨の Windows GUI) +* [bootloadhid コマンドライン](https://www.obdev.at/products/vusb/bootloadhid.html) / QMK の `:BootloadHID` (推奨のコマンドライン) + +書き込み手順: + +1. 以下のいずれかの方法を使ってブートローダに入ります: + * `RESET` キーコードをタップします (全てのデバイスでは動作しないかもしれません) + * キーボードを接続しながらソルトキーを押し続けます (通常はキーボードの readme に書かれています) +2. OS がデバイスを検知するのを待ちます。 +3. .hex ファイルを書き込みます +4. デバイスをアプリケーションモードにリセットします(自動的に実行されるかもしれません) + +あるいは: + + make ::bootloadHID + +## STM32 + +全ての STM32 チップには、変更も削除もできない工場出荷時のブートローダがプリロードされています。一部の STM32 チップには USB プログラミングが付属していないブートローダがありますが(例えば STM32F103)、プロセスは同じです。 + +現時点では、STM32 の `rules.mk` には、`BOOTLOADER` 変数は不要です。 + +互換性のあるフラッシャ: + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI) +* [dfu-util](https://github.com/Stefan-Schmidt/dfu-util) / `:dfu-util` (推奨のコマンドライン) + +書き込み手順: + +1. 以下のいずれかの方法を使ってブートローダに入ります: + * `RESET` キーコードをタップします (STM32F042 デバイスでは動作しないかもしれません) + * リセット回路が存在する場合、RESET ボタンをタップします + * それ以外の場合は、(BOOT0 ボタンあるいはブリッジ経由で)BOOT0 を VCC にブリッジし、(REEST ボタンあるいはブリッジ経由で)RESET を GND にショートし、BOOT0 ブリッジを放す必要があります。 +2. OS がデバイスを検知するのを待ちます。 +3. .bin ファイルを書き込みます + * DFU 署名に関する警告が表示されます; 無視してください +4. デバイスをアプリケーションモードにリセットします(自動的に実行されるかもしれません) + * コマンドラインからビルドする場合(例えば、`make planck/rev6:default:dfu-util`)、`rules.mk` の中で `:leave` が `DFU_ARGS` 変数に渡されるようにしてください (例えば、`DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`)。そうすれば、書き込みの後でデバイスがリセットされます + +### STM32 コマンド + +ファームウェアを STM32 デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 + +* `:dfu-util` - STM32 デバイスに書き込むためのデフォルトコマンドで、STM32 ブートローダデバイスが見つかるまで待機します。 +* `:dfu-util-split-left` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROM の設定も行われます。 +* `:dfu-util-split-right` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」 EEPROM の設定も行われます。 +* `:st-link-cli` - dfu-util ではなく、ST-LINK の CLI ユーティリティを介してファームウェアを書き込めます。 diff --git a/docs/ja/getting_started_build_tools.md b/docs/ja/getting_started_build_tools.md new file mode 100644 index 000000000000..1f7accb5502a --- /dev/null +++ b/docs/ja/getting_started_build_tools.md @@ -0,0 +1,146 @@ +# ビルドツールのインストール + + + +このページは QMK のためのビルド環境のセットアップを説明します。これらの手順は (atmega32u4 のような) AVR プロセッサを対象としてします。 + + + +**注意:** ここが初めての場合は、[QMK 初心者ガイド](ja/newbs.md)ページを調べてください。 + +続ける前に、`make git-submodule` を実行して、サブモジュール(サードパーティライブラリ)が最新であることを再確認してください。 + +## Linux + +常に最新の状態を保つためには、単に `sudo util/qmk_install.sh` を実行してください。全ての必要な依存関係が常にインストールされるはずです。**これは `apt-get upgrade` を実行します。** + +手動でインストールすることもできますが、このドキュメントは常に全ての要件を満たしているとは限りません。 + +現在の要件は以下の通りですが、何をしようとしているかによっては全てが必要とは限りません。また、一部のシステムではパッケージとして全ての依存関係が利用できるとは限らず、あるいは名前が異なる場合があるかもしれません。 + +``` +build-essential +gcc +unzip +wget +zip +gcc-avr +binutils-avr +avr-libc +dfu-programmer +dfu-util +gcc-arm-none-eabi +binutils-arm-none-eabi +libnewlib-arm-none-eabi +git +``` + +好みのパッケージマネージャを使って依存関係をインストールします。 + +Debian / Ubuntu の例: + + sudo apt-get update + sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi + +Fedora / Red Hat の例: + + sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib + +Arch / Manjaro の例: + + pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util + +## Nix + +[NixOS](https://nixos.org/) の場合、あるいは Linux または MacOS に Nix をインストールした場合は、ビルド環境を取得するためにリポジトリのルートで `nix-shell` を実行します。 + +デフォルトでは、これは AVR と ARM の両方のためのコンパイラをダウンロードします。両方が必要ではない場合は、`avr` あるいは `arm` 引数を無効にします。例えば: + + nix-shell --arg arm false + +## macOS +[Homebrew](http://brew.sh/) を使っている場合は、以下のコマンドを使うことができます: + + brew tap osx-cross/avr + brew tap osx-cross/arm + brew update + brew install avr-gcc@8 + brew link --force avr-gcc@8 + brew install dfu-programmer + brew install dfu-util + brew install arm-gcc-bin@8 + brew link --force arm-gcc-bin@8 + brew install avrdude + +これはお勧めの方法です。homebrew が無い場合は、[インストールしてください!](http://brew.sh/) コマンドラインで作業する人にとってとても価値があります。`avr-gcc@8` の homebrew でのインストール中、`make` と `make install` 部分は20分以上かかり、CPU使用率が高くなることに注意してください。 + +## msys2 を使った Windows (推奨) :id=windows-with-msys2-recommended + +Windows Vista 以降のバージョン(7および10でテスト済み)について、使用するのに最適な環境は [msys2](http://www.msys2.org) です。 + +* msys2 をダウンロードし、こちらの指示に従ってインストールしてください: http://www.msys2.org +* ``MSYS2 MingGW 64-bit`` のショートカットを開きます +* QMK リポジトリに移動します。例えば、c ドライブのルートにある場合: +* `$ cd /c/qmk_firmware` +* `util/qmk_install.sh` を実行し、指示に従います + +## Windows 10 (非推奨) +Windows 10 の古い手順です。[上記の概要のように MSYS2](#windows-with-msys2-recommended) を使うことをお勧めします。 + +### Creators Update +Creators Update 以降の Windows 10 の場合、ファームウェアを直接ビルドして書き込むことができます。Creators Update の前は、ビルドだけが可能でした。まだそうではないか、不明な場合は、[これらの指示](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update)に従ってください。 + +### Linux 用の Windows Subsystem +Creators Update に加えて、Linux 用の Windows 10 Subystem が必要ですので、[これらの指示](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/)に従ってインストールしてください。Anniversary update からの Linux 用の Windows 10 Subsystem が既にある場合、一部のキーボードは 14.04LTS に含まれるツールチェーンを使ってコンパイルしないため、16.04LTS に[アップグレード](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/)することをお勧めします。`sudo do-release-upgrade` メソッドを選択した場合は、自分が何をしているかを知る必要があることに注意してください。 + +### Git +すでに Windows ファイルシステムにリポジトリをクローンしている場合は、この章を無視することができます。 + +WSL Git では**なく**、Windows 用の通常の Git を使って Windows ファイルシステムにリポジトリをクローンする必要があります。以前に Git をインストールしたことが無ければ、[ダウンロード](https://git-scm.com/download/win)し、インストールしてください。次に[セットアップします](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)。特に貢献する予定がある場合は、eメールとユーザ名をセットアップすることが重要です。 + +Git がインストールされたら、Git Bash コマンドを開き、QMK をクローンしたい場所へディレクトリを変更します: スラッシュを使う必要があり、c ドライブは `/c/path/to/where/you/want/to/go` のようにアクセスされることに注意してください。次に、`git clone --recurse-submodules https://github.com/qmk/qmk_firmware` を実行します。これは現在のフォルダのサブディレクトリとして新しいフォルダ `qmk_firmware` を作成します。 + +### ツールチェーンのセットアップ +ツールチェーンのセットアップは Linux 用の Windows サブシステムを介して行われ、手順は完全に自動化されています。全てを手動で行いたい場合は、スクリプト以外の手順はありませんが、常に issue を開いて詳細情報を求めることができます。 + +1. スタートメニューから "Bash On Ubuntu On Windows" を開いてください。 +2. クローンした `qmk_firmware` ディレクトリに移動します。パスは WSL 内で `/mnt/` から始まることに注意してください。つまり、例えば `cd /mnt/c/path/to/qmk_firmware` と書く必要があります。 +3. `util/wsl_install.sh` を実行し、画面上の手順に従います。 +4. Bash コマンドウィンドウを閉じ、再び開きます。 +5. ファームウェアをコンパイルし書き込む準備ができました! + +### 心に留めておくべき幾つかの重要なこと +* 全ての最新の更新を取得するために `util/wsl_install.sh` を再実行することができます。 +* WSL は外部で実行可能ファイルを実行できないため、QMK リポジトリは Windows ファイルシステム上にある必要があります。 +* WSL Git は Windows の Git と互換性が**無い**ため、全ての Git 操作には、Windows Git Bash あるいは windows Git GUI を使ってください。 +* WSL 内あるいは普通に Windows を使ってファイルを編集できますが、makefile あるいはシェルスクリプトを編集する場合は、行末をUnix形式にしてファイルを保存するエディタを使うようにしてください。そうでなければコンパイルは機能しないかもしれません。 + +## Docker + +これが少し複雑な場合は、Docker があなたが必要とするすぐに使える解決法かもしれません。[Docker CE](https://docs.docker.com/install/#supported-platforms) をインストールした後で、キーボード/キーマップをビルドするために `qmk_firmware` ディレクトリから以下のコマンドを実行します: +```bash +util/docker_build.sh keyboard:keymap +# 例えば: util/docker_build.sh ergodox_ez:steno +``` +これは目的のキーボード/キーマップをコンパイルし、結果として書き込み用に `.hex` あるいは `.bin` ファイルを QMK ディレクトリの中に残します。`:keymap` が省略された場合は全てのキーマップが使われます。パラメータの形式は、`make` を使ってビルドする時と同じであることに注意してください。 + +スクリプトをパラメータ無しで開始することもできます。この場合、1つずつビルドパラメータを入力するように求められます。これが使いやすいと思うかもしれません: +```bash +util/docker_build.sh +# パラメータを入力として読み込みます (空白にすると全てのキーボード/キーマップ) +``` + +`target` を指定することで Docker から直接キーボードをビルドし_かつ_書き込むためのサポートもあります。 +```bash +util/docker_build.sh keyboard:keymap:target +# 例えば: util/docker_build.sh planck/rev6:default:flash +``` +Linux を使っている場合は、これはそのままで動作するはずです。Windows と macOS では、実行するのに [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) が必要です。これはセットアップが面倒なので、お勧めではありません: 代わりに [QMK Toolbox](https://github.com/qmk/qmk_toolbox) を使ってください。 + +!> Docker for Windows は[Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) を有効にする必要があります。これは、Windows 7、Windows 8 および **Windows 10 Home** のような Hyper-V を搭載していない Windows のバージョンでは機能しないことを意味します。 + +## Vagrant +ファームウェアをビルドするのに問題がある場合は、Vagrant と呼ばれるツールを試してみることができます。それは、ファームウェアをビルドする準備ができた既知の構成を搭載した仮想コンピュータをセットアップします。OLKB はこの仮想コンピュータのためのファイルをホストしません。Vagrant をセットアップする方法の詳細は、[vagrant ガイド](ja/getting_started_vagrant.md)にあります。 diff --git a/docs/ja/getting_started_make_guide.md b/docs/ja/getting_started_make_guide.md new file mode 100644 index 000000000000..d33485ce1114 --- /dev/null +++ b/docs/ja/getting_started_make_guide.md @@ -0,0 +1,153 @@ +# より詳細な `make` 手順 + + + +`make` コマンドの完全な構文は `::` です: + +* `` はキーボードのパスです。例えば、`planck` + * 全てのキーボードをコンパイルするには `all` を使います。 + * リビジョンを選択してコンパイルするためのパスを指定します。例えば `planck/rev4` あるいは `planck/rev3` + * キーボードにフォルダが無い場合は、省略することができます + * デフォルトのフォルダをコンパイルする場合は、省略することができます +* `` はキーマップの名前です。例えば、`algernon` + * 全てのキーマップをコンパイルするには `all` を使います。 +* `` の詳細は以下で説明します。 + +`` は以下を意味します +* target が指定されない場合は、以下の `all` と同じです +* `all` は指定されたキーボード/リビジョン/キーマップの可能な全ての組み合わせのコンパイルを行います。例えば、`make planck/rev4:default` は1つの .hex を生成しますが、`make planck/rev4:all` は planck で利用可能な全てのキーマップについて hex を生成します。 +* `flash`、`dfu`、`teensy`、`avrdude`、`dfu-util` または `bootloadHID` はファームウェアをコンパイルし、キーボードにアップロードします。コンパイルが失敗すると、何もアップロードされません。使用するプログラマはキーボードに依存します。ほとんどのキーボードでは `dfu` ですが、ChibiOS キーボードについては `dfu-util` 、標準的な Teensy については `teensy` を使います。キーボードに使うコマンドを見つけるには、キーボード固有の readme をチェックしてください。 +* **注意**: 一部のオペレーティングシステムではこれらのコマンドが機能するためには root アクセスが必要です。その場合、例えば `sudo make planck/rev4:default:flash` を実行する必要があります。 +* `clean` は、全てをゼロからビルドするためにビルド出力フォルダを掃除します。説明できない問題がある場合は、通常のコンパイルの前にこれを実行してください。 + +make コマンドの最後、つまり target の後に追加のオプションを追加することもできます + +* `make COLOR=false` - カラー出力をオフ +* `make SILENT=true` - エラー/警告以外の出力をオフ +* `make VERBOSE=true` - 全ての gcc のものを出力 (デバッグする必要が無い限り面白くありません) +* `make EXTRAFLAGS=-E` - コンパイルせずにコードを前処理 (#define コマンドをデバッグしようとする場合に便利) + +make コマンド自体にもいくつかの追加オプションがあります。詳細は `make --help` を入力してください。最も有用なのはおそらく `-jx` です。これは複数の CPU を使ってコンパイルしたいことを指定し、`x` は使用したい CPU の数を表します。設定すると、特に多くのキーボード/キーマップをコンパイルしている場合は、コンパイル時間を大幅に短縮することができます。通常は、コンパイル中に他の作業を行うための余裕をもたせるために、持っている CPU の数より1つ少ない値に設定します。全てのオペレーティングシステムと make バージョンがオプションをサポートしているわけではないことに注意してください。 + +コマンドの例を幾つか示します + +* `make all:all` は、全てをビルドします (全てのキーボードフォルダ、全てのキーマップ)。`root` から単に `make` を実行すると、これを実行します。 +* `make ergodox_infinity:algernon:clean` は、Ergodox Infinity キーボードのビルド出力を掃除します。 +* `make planck/rev4:default:flash COLOR=false` カラー出力なしでキーマップをビルドしアップロードします。 + +## `rules.mk` オプション + +無効にするにはこれらの変数を `no` に設定します。有効にするには `yes` に設定します。 + +`BOOTMAGIC_ENABLE` + +これにより、1つのキーとソルトキー(デフォルトではスペース)を押し続けることで、電力が失われても持続する様々な EEPROM 設定へアクセスできます。誤って設定が変更されることが多く、デバッグするのが難しい混乱した結果を生成するため、これを無効にしておくことをお勧めします。ヘルプセッションで発生する、より一般的な問題の1つです。 + +`MOUSEKEY_ENABLE` + +これにより、キーコード/カスタム関数を介して、カーソルの動きとクリックを制御することができます。 + +`EXTRAKEY_ENABLE` + +これにより、システムとオーディオ制御キーコードを使うことができます。 + +`CONSOLE_ENABLE` + +これにより、[`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html) を使って読むことができるメッセージを出力することができます。 + +デフォルトで、全てのデバッグ( *dprint* ) 出力 ( *print*、*xprintf* )、およびユーザ出力 ( *uprint* ) メッセージが有効になります。これにより、フラッシュメモリの大部分が消費され、キーボードの .hex ファイルが大きすぎてプログラムできなくなるかもしれません。 + +デバッグメッセージ( *dprint* ) を無効にし、.hex ファイルのサイズを小さくするには、`config.h` に `#define NO_DEBUG` を含めます。 + +出力メッセージ( *print*、*xprintf* )とユーザ出力( *uprint* ) を無効にし、.hex のファイルサイズを小さくするには、`config.h` に `#define NO_PRINT` を含めます。 + +出力メッセージ ( *print*、*xprintf* ) を無効にし、ユーザメッセージ ( *uprint* )を**そのままにする**には、`config.h` に `#define USER_PRINT` を含めます(この場合は、`#define NO_PRINT` も含めないでください)。 + +テキストを見るには、`hid_listen` を開き、出力メッセージを見るのを楽しんでください。 + +**注意:** キーマップコード以外の *uprint* メッセージを含めないでください。QMK システムフレームワーク内で使うべきではありません。さもないと、他の人の .hex ファイルが肥大化します。 + +`COMMAND_ENABLE` + +これはマジックコマンドを有効にし、通常はデフォルトのマジックキーの組み合わせ `LSHIFT+RSHIFT+KEY` で起動されます。マジックコマンドは、デバッグメッセージ (`MAGIC+D`) の有効化や NKRO の一時的な切り替え (`MAGIC+N`) を含みます。 + +`SLEEP_LED_ENABLE` + +コンピュータがスリープの間に LED がブレスできるようにします。ここでは Timer1 が使われます。この機能は大部分が未使用でテストされておらず、更新もしくは抽象化が必要です。 + +`NKRO_ENABLE` + +これにより、キーボードはホスト OS に最大 248 個のキーが同時に押されていることを伝えることができます (NKRO 無しのデフォルトは 6 です)。NKRO は、`NKRO_ENABLE` が設定されていたとしても、デフォルトではオフです。config.h に `#define FORCE_NKRO` を追加するか、`MAGIC_TOGGLE_NKRO` をキーにバインドしてキーを押すことで、NKRO を強制することができます。 + +`BACKLIGHT_ENABLE` + +これはスイッチ内の LED のバックライトを有効にします。`config.h` 内に以下を入れることでバックライトピンを指定することができます: + + #define BACKLIGHT_PIN B7 + +`MIDI_ENABLE` + +キーボードで MIDI の送受信を有効にします。MIDI 送信モードに入るためにキーコード `MI_ON` を使うことができ、オフにするために `MI_OFF` を使うことができます。これはほとんどテストされていない機能ですが、詳細については `quantum/quantum.c` ファイルで見つけることができます。 + +`UNICODE_ENABLE` + +これによりキーマップで `UC()` を使って Unicode 文字を送信することができます。`0x7FFF` までのコードポイントがサポートされます。これはほとんどの現代言語の文字と記号を対象にしますが、絵文字は対象外です。 + +`UNICODEMAP_ENABLE` + +これによりキーマップで `X()` を使って Unicode 文字を送信することができます。キーマップファイル内にマッピングテーブルを保持する必要があります。可能な全てのコードポイント( `0x10FFFF` まで)がサポートされます。 + +`UCIS_ENABLE` + +これにより、送信したい文字に対応するニーモニックを入力することで Unicode 文字を送信することができます。キーマップファイル内にマッピングテーブルを保持する必要があります。可能な全てのコードポイント( `0x10FFFF` まで)がサポートされます。 + +詳細と制限については、[Unicode ページ](ja/feature_unicode.md) を見てください。 + +`BLUETOOTH_ENABLE` + +これによりキーコードをワイヤレスで送信するために Bluefruit EZ-key と連動することができます。D2 と D3 ピンを使います。 + +`AUDIO_ENABLE` + +C6 ピン(抽象化が必要)でオーディオ出力できます。詳細は[オーディオページ](ja/feature_audio.md)を見てください。 + +`FAUXCLICKY_ENABLE` + +クリック音のあるスイッチをエミュレートするためにブザーを使います。Cherry社製の青軸スイッチの安っぽい模倣です。デフォルトでは、`AUDIO_ENABLE` と同じように C6 ピンを使います。 + +`VARIABLE_TRACE` + +これを使って変数の値の変更をデバッグします。詳細についてはユニットテストのページの[変数のトレース](ja/unit_testing.md#tracing-variables)のセクションを見てください。 + +`API_SYSEX_ENABLE` + +これにより Quantum SYSEX API を使って文字列を送信することができます (どこに?) + +`KEY_LOCK_ENABLE` + +これは [キーロック](ja/feature_key_lock.md) を有効にします。 + +`SPLIT_KEYBOARD` + +分割キーボード (let's split や bakingpy's boards のようなデュアル MCU) のサポートを有効にし、quantum/split_common にある全ての必要なファイルをインクルードします + +`SPLIT_TRANSPORT` + +ARM ベースの分割キーボード用の標準分割通信ドライバはまだ無いため、これらのために `SPLIT_TRANSPORT = custom` を使わなければなりません。カスタムの実装が使われるようにすることで、標準の分割キーボード通信コード(AVR 固有)が含まれないようにします。 + +`CUSTOM_MATRIX` + +デフォルトのマトリックス走査ルーチンを独自のコードで置き換えます。詳細については、[カスタムマトリックスページ](ja/custom_matrix.md) を見てください。 + +`DEBOUNCE_TYPE` + +デフォルトのキーデバウンスルーチンを別のものに置き換えます。`custom` の場合、独自の実装を提供する必要があります。 + +## キーマップごとに Makefile オプションをカスタマイズ + +あなたのキーマップディレクトリに `rules.mk` というファイルがある場合、そのファイルで設定した全てのオプションは、あなたのキーボードの他の `rules.mk` オプションよりも優先されます。 + +あなたのキーボードの `rules.mk` に `BACKLIGHT_ENABLE = yes` があるとします。あなたの特定のキーボードでバックライトが無いようにするには、`rules.mk` というファイルを作成し、`BACKLIGHT_ENABLE = no` を指定します。 diff --git a/docs/ja/getting_started_vagrant.md b/docs/ja/getting_started_vagrant.md new file mode 100644 index 000000000000..0bc5c4b798b4 --- /dev/null +++ b/docs/ja/getting_started_vagrant.md @@ -0,0 +1,62 @@ +# Vagrant クイックスタート + + + +このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる `Vagrantfile` を含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、ビルドのために Vagrantfile を使っている他のユーザと全く同じ環境を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。 + +## 必要事項 + +このリポジトリ内の `Vagrantfile` を使うには、[Vagrant](http://www.vagrantup.com/) およびサポートされるプロバイダがインストールされている必要があります: + +* [VirtualBox](https://www.virtualbox.org/) (バージョン 5.0.12 以降) + * 'Vagrant を使うために最もアクセスしやすいプラットフォーム' として販売 +* [VMware Workstation](https://www.vmware.com/products/workstation) および [Vagrant VMware プラグイン](http://www.vagrantup.com/vmware) + * (有料) VMware プラグインには、ライセンスされた VMware Workstation/Fusion のコピーが必要です。 +* [Docker](https://www.docker.com/) + +Vagrant 以外に、適切なプロバイダがインストールされ、その後におそらくコンピュータを再起動すると、このプロジェクトをチェックアウトしたフォルダ内の任意の場所で 'vagrant up' を単純に実行することができ、このプロジェクトをビルドするのに必要な全てのツールが含まれる環境(仮想マシンあるいはコンテナ)が開始されます。Vagrant をうまく始めるためのヒントの投稿がありますが、それ以外に、以下のビルドドキュメントを参照することもできます。 + +## ファームウェアの書き込み + +ファームウェアを書き込む"簡単"な方法は、ホスト OS からツールを使うことです: + +* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (推奨) +* [Teensy ローダー](https://www.pjrc.com/teensy/loader.html) +* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx) + +コマンドラインでプログラムしたい場合は、Vagranfile の ['modifyvm'] 行のコメントを解除して Linux への USB パススルーを有効にし、dfu-util/dfu-programmer のようなコマンドラインツールを使ってプログラムすることができます。あるいは Teensy CLI バージョンをインストールすることができます。 + +## Vagrantfile の概要 +開発環境は QMK Docker イメージ、`qmkfm/base_container` を実行するように設定されています。これはシステム間の予測可能性が保証されるだけでなく、CI 環境もミラーされます。 + +## FAQ + +### Virtualbox で問題が発生するのはなぜですか? +Virtualbox 5 の特定のバージョンはこの Vagrantfile のボックスにインストールされている Virtualbox の拡張機能と互換性が無いようです。/vagrant のマウントで問題が発生した場合は、Virtualbox のバージョンを少なくとも 5.0.12 にアップグレードしてください。**または、以下のコマンドを実行してみることができます:** + +```console +vagrant plugin install vagrant-vbguest +``` + +### 既存の環境を削除するにはどうすればいいですか? +あなたの環境での作業が完了しましたか?このプロジェクトをチェックアウトしたフォルダの中のどこからでも、以下を実行してください: + +```console +vagrant destroy +``` + +### Docker を直接使いたい場合はどうしますか? +仮想マシン無しで Vagrant のワークフローを活用したいですか?Vagrantfile は仮想マシンの実行をバイパスし、コンテナを直接実行するように設定されています。Docker を強制的に使うように環境を立ち上げる場合は、以下を実行してください: +```console +vagrant up --provider=docker +``` + +### Docker コンテナではなく仮想マシンにアクセスするにはどうすればいいですか? +以下を実行して、公式の QMK ビルダーイメージから直接起動する `vagrant` ユーザをバイパスするようにします: + +```console +vagrant ssh -c 'sudo -i' +``` diff --git a/docs/ja/keymap.md b/docs/ja/keymap.md new file mode 100644 index 000000000000..29eb1adc086b --- /dev/null +++ b/docs/ja/keymap.md @@ -0,0 +1,174 @@ +# キーマップの概要 + + + +QMK のキーマップは C のソースファイルの中で定義されます。そのデータ構造は配列の配列です。外側はレイヤーを要素とする配列で、レイヤーはキーを要素とする配列。ほとんどのキーボードは `LAYOUT()` マクロを定義して、この配列の配列を作成しやすくしています。 + + +## キーマップとレイヤー +QMKでは、**`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`**は、**アクションコード**を保持している **16 bit** データの中でキーマップ情報の複数の**レイヤー**を保持します。最大で**32個のレイヤー**を定義することができます。 + +普通のキー定義の場合、**アクションコード**の上位8ビットは全て0で、下位8ビットは**キーコード**としてキーによって生成された USB HID usage コードを保持します。 + +各レイヤーは同時に有効にできます。レイヤーには 0 から 31 までのインデックスが付けられ、上位のレイヤーが優先されます。 + + Keymap: 32 Layers Layer: action code matrix + ----------------- --------------------- + stack of layers array_of_action_code[row][column] + ____________ precedence _______________________ + / / | high / ESC / F1 / F2 / F3 .... + 31 /___________// | /-----/-----/-----/----- + 30 /___________// | / TAB / Q / W / E .... + 29 /___________/ | /-----/-----/-----/----- + : _:_:_:_:_:__ | : /LCtrl/ A / S / D .... + : / : : : : : / | : / : : : : + 2 /___________// | 2 `-------------------------- + 1 /___________// | 1 `-------------------------- + 0 /___________/ V low 0 `-------------------------- + + +TMK の歴史的経緯から、キーマップに保存されたアクションコードは、一部のドキュメントではキーコードと呼ばれる場合があります。 + +### キーマップレイヤーステータス +キーマップレイヤーの状態は、2つの32ビットパラメータによって決定されます。 + +* **`default_layer_state`** は、常に有効で参照される基本キーマップレイヤー (0-31) を示します (デフォルトレイヤー)。 +* **`layer_state`** は現在の各レイヤーのオン/オフの状態をビットで持ちます。 + +キーマップレイヤー '0' は通常 `default_layer` で、他のレイヤーはファームウェアの起動後に最初はオフになっていますが、これは `config.h` で異なる設定にすることが可能です。例えば Qwerty ではなく Colemak に切り替えるなど、キーレイアウトを完全に切り替える場合、`default_layer` を変更すると便利です。 + + Initial state of Keymap Change base layout + ----------------------- ------------------ + + 31 31 + 30 30 + 29 29 + : : + : : ____________ + 2 ____________ 2 / / + 1 / / ,->1 /___________/ + ,->0 /___________/ | 0 + | | + `--- default_layer = 0 `--- default_layer = 1 + layer_state = 0x00000001 layer_state = 0x00000002 + +一方、`layer_state` を変更して、基本レイヤーをナビゲーションキー、ファンクションキー (F1-F12)、メディアキー、特別なアクションなどの機能を持つ他のレイヤーでオーバーレイすることができます。 + + Overlay feature layer + --------------------- bit|status + ____________ ---+------ + 31 / / 31 | 0 + 30 /___________// -----> 30 | 1 + 29 /___________/ -----> 29 | 1 + : : | : + : ____________ : | : + 2 / / 2 | 0 + ,->1 /___________/ -----> 1 | 1 + | 0 0 | 0 + | + + `--- default_layer = 1 | + layer_state = 0x60000002 <-' + + + +### レイヤーの優先順位と透過性 +***上位のレイヤーはレイヤーのスタックでより高い優先順位を持つ***ことに注意してください。つまり、ファームウェアはキーコードを最上位から最下位まで検索します。レイヤーで **`KC_TRNS`**(透過)以外のキーコードを見つけると、検索を中止し、下位レイヤーは参照されません。 + +オーバーレイレイヤーに `KC_TRANS` を配置して、レイアウトの一部だけを変更して下位レイヤーまたは基本レイヤーにフォールバックすることができます。 +`KC_TRANS` (`KC_TRNS` と `_______` はエイリアス) のキーには独自のキーコードがなく、キーコードの有効な下位レイヤーを参照します。 + +## `keymap.c` の分析 + +この例では、[デフォルトの Clueboard 66% キーマップの古いバージョン](https://github.com/qmk/qmk_firmware/blob/ca01d94005f67ec4fa9528353481faa622d949ae/keyboards/clueboard/keymaps/default/keymap.c)を見ていきます。そのファイルを別のブラウザウィンドウで開くとコンテキスト内のすべてを見ることができるので便利です。 + +`keymap.c` ファイルには、あなたが関心があるであろう以下の2つの主要なセクションがあります: + +* [定義](#definitions) +* [レイヤー/キーマップデータ構造](#layers-and-keymaps) + +### 定義 :id=definitions + +ファイルの上部に以下のものがあります: + + #include QMK_KEYBOARD_H + + // 便利な定義 + #define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * KC_TRNS (透過) の代わりに _______ を使うことができます * + * あるいは、KC_NO (NOOP) として XXXXXXX を使うことができます * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + // 各レイヤーは読みやすいように名前を持ちます。 + // アンダースコアは何も意味を持ちません + // STUFF あるいは他の名前のレイヤーを持つことができます。 + // レイヤー名は全て同じ長さである必要はなく、 + // また名前を完全に省略して単に数字を使うことができます。 + #define _BL 0 + #define _FL 1 + #define _CL 2 + +これらはキーマップとカスタム関数を作成するときに使うことができる便利な定義です。`GRAVE_MODS` 定義は後でカスタム関数で使われ、その下の `_BL`、`_FL`、`_CL` 定義は各レイヤーを参照しやすくします。 + +注意: 古いキーマップファイルに `_______` および `XXXXXXX` の定義が含まれているかもしれません。これらはそれぞれ `KC_TRNS` および `KC_NO` の代わりに使うことができ、レイヤーがどのキーを上書きしているかを簡単に確認することができます。これらの定義はデフォルトで含まれるため、今では不要になりました。 + +### レイヤーとキーマップ :id=layers-and-keymaps + +このファイルの主要部分は `keymaps[]` 定義です。ここで、レイヤーとそれらの内容を列挙します。ファイルのこの部分は、以下の定義から始まります: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +この後で、LAYOUT() マクロのリストがあります。LAYOUT() は単一のレイヤーを定義するためのキーのリストです。通常、1つ以上の"基本レイヤー" (QWERTY、Dvorak、Colemak など)があり、その上に1つ以上の"機能"レイヤーを重ねます。レイヤーの処理方法により、"より上位"のレイヤーの上に"より下位"のレイヤーを重ねることはできません。 + +QMK の `keymaps[][MATRIX_ROWS][MATRIX_COLS]` は、16ビットのアクションコード( quantum キーコードとも呼ばれる)を保持します。一般的なキーを表すキーコードの場合、その上位バイトは0で、その下位バイトはキーボードの USB HID usage ID です。 + +> QMK のフォーク元の TMK は、代わりに `const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]` を使い、8ビットキーコードを保持します。一部のキーコード値は、`fn_actions[]` 配列を介して特定のアクションコードの実行を引き起こすために予約されています。 + +#### 基本レイヤー + +Clueboard の基本レイヤーの例です: + + /* Keymap _BL: Base Layer (Default Layer) + */ + [_BL] = LAYOUT( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + +これについて注意すべきいくつかの興味深いこと: + +* C ソースの観点からは、これは単一の配列に過ぎませんが、物理デバイス上の各キーがどこにあるかをより簡単に可視化するために、空白が埋め込まれています。 +* 単純なキーボードスキャンコードの先頭には KC_ が付いていますが、"特別な"キーには付いていません。 +* 左上のキーはカスタム機能 0 (`F(0)`) をアクティブにします。 +* "Fn" キーは `MO(_FL)` で定義され、そのキーが押されている間は `_FL` レイヤーに移動します。 + +#### 機能オーバーレイレイヤー + +機能レイヤーはコードの観点から基本レイヤーと違いはありません。ただし概念的には、置き換えの代わりにオーバーレイとしてそのレイヤーを構築します。多くの人にとってはこの区別は重要ではありませんが、より複雑なレイヤー設定を構築するにつれて、ますます重要になります。 + + [_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + +注意すべきいくつかの興味深いこと: + +* `_______` 定義を使って、`KC_TRNS` を `_______` に変換しました。これによりこのレイヤーで変更されたキーを簡単に見つけることができます。 +* このレイヤーで `_______` キーのいずれかを押すと、次の下位のアクティブなレイヤーのキーがアクティブになります。 + +# 核心となる詳細 + +これで独自のキーマップを作成するための基本的な概要が得られました。詳細は以下のリソースを見てください: + +* [キーコード](ja/keycodes.md) +* [キーマップ FAQ](ja/faq_keymap.md) + +これらのドキュメントの改善に積極的に取り組んでいます。それらを改善する方法について提案がある場合は、[issue を報告](https://github.com/qmk/qmk_firmware/issues/new)してください! From 5e79da9f321a7b50fc82201ad51b1f1bfa0e0114 Mon Sep 17 00:00:00 2001 From: shela Date: Mon, 17 Feb 2020 18:03:49 +0900 Subject: [PATCH 306/331] [Docs] Update Japanese translation (#8129) * Update Japanese translation * Update Japanese translation Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> --- docs/ja/cli.md | 71 ++++++++++++++++++++++++++++++++++++--- docs/ja/config_options.md | 9 +++-- 2 files changed, 72 insertions(+), 8 deletions(-) diff --git a/docs/ja/cli.md b/docs/ja/cli.md index ef3752873d82..a83ccdf378f9 100644 --- a/docs/ja/cli.md +++ b/docs/ja/cli.md @@ -1,8 +1,8 @@ # QMK CLI このページは QMK CLI のセットアップと使用方法について説明します。 @@ -86,7 +86,7 @@ qmk cformat [file1] [file2] [...] [fileN] ## `qmk compile` -このコマンドにより、任意のディレクトリからファームウェアをコンパイルすることができます。 からエクスポートした JSON をコンパイルするか、リポジトリ内でキーマップをコンパイルすることができます。 +このコマンドにより、任意のディレクトリからファームウェアをコンパイルすることができます。 からエクスポートした JSON をコンパイルするか、リポジトリ内でキーマップをコンパイルするか、現在の作業ディレクトリでキーボードをコンパイルすることができます。 **Configurator Exports での使い方**: @@ -100,6 +100,53 @@ qmk compile qmk compile -kb -km ``` +**キーボードディレクトリでの使い方**: + +default キーマップのあるキーボードディレクトリ、キーボードのキーマップディレクトリ、`--keymap ` で与えられるキーマップディレクトリにいなければなりません。 +``` +qmk compile +``` + +**例**: +``` +$ qmk config compile.keymap=default +$ cd ~/qmk_firmware/keyboards/planck/rev6 +$ qmk compile +Ψ Compiling keymap with make planck/rev6:default +... +``` +あるいはオプションのキーマップ引数を指定して + +``` +$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4 +$ qmk compile -km 66_iso +Ψ Compiling keymap with make clueboard/66/rev4:66_iso +... +``` +あるいはキーマップディレクトリで + +``` +$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak +$ qmk compile +Ψ Compiling keymap with make make gh60/satan:colemak +... +``` + +**レイアウトディレクトリでの使い方**: + +`qmk_firmware/layouts/` 以下のキーマップディレクトリにいなければなりません。 +``` +qmk compile -kb +``` + +**例**: +``` +$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi +$ qmk compile -kb dz60 +Ψ Compiling keymap with make dz60:mechmerlin-ansi +... +``` + ## `qmk flash` このコマンドは `qmk compile` に似ていますが、ブートローダを対象にすることもできます。ブートローダはオプションで、デフォルトでは `:flash` に設定されています。 @@ -146,14 +193,28 @@ qmk docs [-p PORT] ## `qmk doctor` -このコマンドは環境を調査し、潜在的なビルドあるいは書き込みの問題について警告します。 +このコマンドは環境を調査し、潜在的なビルドあるいは書き込みの問題について警告します。必要に応じてそれらの多くを修正できます。 **使用法**: ``` -qmk doctor +qmk doctor [-y] [-n] ``` +**例**: + +環境に問題がないか確認し、それらを修正するよう促します: + + qmk doctor + +環境を確認し、見つかった問題を自動的に修正します: + + qmk doctor -y + +環境を確認し、問題のみをレポートします: + + qmk doctor -n + ## `qmk json-keymap` QMK Configurator からエクスポートしたものから keymap.c を生成します。 diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index ca6ea5479fad..b994b1982c5a 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -1,8 +1,8 @@ # QMK の設定 QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。 @@ -274,9 +274,12 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * ARM についてはデフォルトの挙動 * AVR Teensy については必須 -* `#define SPLIT_USB_TIMEOUT 2500` +* `#define SPLIT_USB_TIMEOUT 2000` * `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合の最大タイムアウト +* `#define SPLIT_USB_TIMEOUT_POLL 10` + * `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合のポーリング頻度 + # `rules.mk` ファイル これは、トップレベルの `Makefile` から include される [make](https://www.gnu.org/software/make/manual/make.html) ファイルです。これは特定の機能を有効または無効にするだけでなく、コンパイルする MCU に関する情報を設定するために使われます。 From 79e6b7866988f3cfc1c5b6746e5f400b50704ce8 Mon Sep 17 00:00:00 2001 From: Jonas Avellana <14019120+ninjonas@users.noreply.github.com> Date: Mon, 17 Feb 2020 02:30:03 -0700 Subject: [PATCH 307/331] [Keymap] ninjonas keymap updates (#8170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [keymap] ninjonas keymap updates * [refactor(kyria)] updating keymap for numpad layer to be transparent rather than ignores * [keymap(lily58)] added numpad layer * [keymap(crkbd)] added numpad layer activated through tapdance * [fix(8170)] fixing code review changes requested by noroadsleft * [fix(8170)] updating comments and .md files to use 'Cmd' instead of  and ⌘ --- keyboards/crkbd/keymaps/ninjonas/README.md | 6 +- keyboards/crkbd/keymaps/ninjonas/config.h | 2 +- keyboards/crkbd/keymaps/ninjonas/keymap.c | 12 ++ keyboards/hotdox/keymaps/ninjonas/README.md | 2 +- keyboards/hotdox/keymaps/ninjonas/keymap.c | 6 +- keyboards/kyria/keymaps/ninjonas/README.md | 113 +++++++++++++++++++ keyboards/kyria/keymaps/ninjonas/config.h | 2 +- keyboards/kyria/keymaps/ninjonas/keymap.c | 19 +++- keyboards/kyria/keymaps/ninjonas/oled.c | 3 + keyboards/lily58/keymaps/ninjonas/README.md | 6 +- keyboards/lily58/keymaps/ninjonas/keymap.c | 112 ++++++++++++------ keyboards/pinky/3/keymaps/ninjonas/README.md | 6 +- keyboards/pinky/3/keymaps/ninjonas/config.h | 2 +- users/ninjonas/README.md | 27 +++-- users/ninjonas/config.h | 2 +- users/ninjonas/ninjonas.h | 18 ++- users/ninjonas/oled.c | 5 +- users/ninjonas/process_records.c | 6 +- users/ninjonas/tap_dances.c | 86 ++++++++++++++ users/ninjonas/tap_dances.h | 23 +++- 20 files changed, 378 insertions(+), 80 deletions(-) create mode 100644 keyboards/kyria/keymaps/ninjonas/README.md diff --git a/keyboards/crkbd/keymaps/ninjonas/README.md b/keyboards/crkbd/keymaps/ninjonas/README.md index 4d7434fa7a6f..08d694521d0e 100644 --- a/keyboards/crkbd/keymaps/ninjonas/README.md +++ b/keyboards/crkbd/keymaps/ninjonas/README.md @@ -14,7 +14,7 @@ More information about the crkbd keyboard can be found [here](https://thomasbaar //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| // LShift, Z, X, C, V, B, N, M, ,, ., /, = //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - // , Ctrl, Space, Enter, BackSP, Del + // Cmd, Ctrl, Space, Enter, BackSP, Del //`---------------------' `---------------------' ``` @@ -27,7 +27,7 @@ More information about the crkbd keyboard can be found [here](https://thomasbaar //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| // LShift, ;, Q, J, K, X, B, M, W, V, Z, = //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - // , Ctrl, Space, Enter, BackSP, Del + // Cmd, Ctrl, Space, Enter, BackSP, Del //`---------------------' `---------------------' ``` @@ -40,7 +40,7 @@ More information about the crkbd keyboard can be found [here](https://thomasbaar //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| // LShift, Z, X, C, V, B, K, M, ,, ., /, = //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| - // , Ctrl, Space, Enter, BackSP, Del + // Cmd, Ctrl, Space, Enter, BackSP, Del //`---------------------' `---------------------' ``` diff --git a/keyboards/crkbd/keymaps/ninjonas/config.h b/keyboards/crkbd/keymaps/ninjonas/config.h index 8a4ddad7482f..33fe4a5c9b92 100644 --- a/keyboards/crkbd/keymaps/ninjonas/config.h +++ b/keyboards/crkbd/keymaps/ninjonas/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #pragma once -#define TAPPING_TERM 200 +#define TAPPING_TERM 300 #define MASTER_LEFT diff --git a/keyboards/crkbd/keymaps/ninjonas/keymap.c b/keyboards/crkbd/keymaps/ninjonas/keymap.c index 57164441b6a7..57cc23226dc5 100644 --- a/keyboards/crkbd/keymaps/ninjonas/keymap.c +++ b/keyboards/crkbd/keymaps/ninjonas/keymap.c @@ -73,6 +73,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______,_______,_______ //`---------------------' `---------------------' ), + + [_NUMPAD] = LAYOUT_wrapper( \ + //,----------------------------------------------------. ,----------------------------------------------------. + _______, _______, _______, _______, _______, _______, _____________________NUMPAD_1_______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _______, _______, _______, _______, _______, _______, _____________________NUMPAD_2_______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _______, _______, _______, _______, _______, _______, _____________________NUMPAD_3_______________________, + //|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------| + _______,_______,_______, _______,_______,_______ + //`---------------------' `---------------------' + ), /* [_TEMPLATE] = LAYOUT_wrapper( \ //,----------------------------------------------------. ,----------------------------------------------------. diff --git a/keyboards/hotdox/keymaps/ninjonas/README.md b/keyboards/hotdox/keymaps/ninjonas/README.md index d761bf9c95e7..be733fde2dfd 100644 --- a/keyboards/hotdox/keymaps/ninjonas/README.md +++ b/keyboards/hotdox/keymaps/ninjonas/README.md @@ -43,7 +43,7 @@ This keymap is designed based off my typing habits and is subject to change. Inf * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * | | | Alt |  | Ctl | | BkSP | Del |LOWER | | | + * | | | Alt | Cmd | Ctl | | BkSP | Del |LOWER | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| diff --git a/keyboards/hotdox/keymaps/ninjonas/keymap.c b/keyboards/hotdox/keymaps/ninjonas/keymap.c index 6637eb3b334a..93c0b266b665 100644 --- a/keyboards/hotdox/keymaps/ninjonas/keymap.c +++ b/keyboards/hotdox/keymaps/ninjonas/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * | | | Alt |  | Ctl | | BkSP | Del |LOWER | | | + * | | | Alt | Cmd | Ctl | | BkSP | Del |LOWER | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * | | | Alt |  | Ctl | | BkSP | Del |LOWER | | | + * | | | Alt | Cmd | Ctl | | BkSP | Del |LOWER | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | = | * `--------+------+------+------+------+-------------' `--------------+------+------+------+------+--------' - * | | | Alt |  | Ctl | | BkSP | Del |LOWER | | | + * | | | Alt | Cmd | Ctl | | BkSP | Del |LOWER | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | Up | Down | | Left | Right| diff --git a/keyboards/kyria/keymaps/ninjonas/README.md b/keyboards/kyria/keymaps/ninjonas/README.md new file mode 100644 index 000000000000..5c8678659449 --- /dev/null +++ b/keyboards/kyria/keymaps/ninjonas/README.md @@ -0,0 +1,113 @@ +# ninjonas Keymap for [Kyria](https://github.com/splitkb/kyria) + +## Keymap +This keymap is designed based off my typing habits and is subject to change. Information about custom user macros and tap dances can be found [here](../../../../users/ninjonas). + +More information about the Kyria keyboard can be found [here](https://blog.splitkb.com/blog/introducing-the-kyria) + +### QWERTY +```c +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. +// Tab, Q, W, E, R, T, Y, U, I, O, P, \ +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| +// ESC, A, S, D, F, G, H, J, K, L, ;, ' +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| +// LShift, Z, X, C, V, B, ALT, NUMLK, N, M, ,, ., /, = +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' +// ALT, Cmd, Ctrl, Space, [, ], Enter, BackSP, Del, MUTE +// `----------------------------------------' `----------------------------------------' +``` + +### DVORAK +```c +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. +// Tab, ', ,, ., P, Y, F, G, C, R, L, \ +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| +// ESC, A, O, E, U, I, D, H, T, N, S, / +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| +// LShift, ;, Q, J, K, X, ALT, NUMLK, B, M, W, V, Z, = +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' +// ALT, Cmd, Ctrl, Space, [, ], Enter, BackSP, Del, MUTE +// `----------------------------------------' `----------------------------------------' +``` + +### COLEMAK +```c +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. +// Tab, Q, W, F, P, G, J, L, U, Y, ;, \ +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| +// ESC, A, R, S, T, D, H, N, E, I, O, ' +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| +// LShift, Z, X, C, V, B, ALT, NUMLK, K, M, ,, ., /, = +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' +// ALT, Cmd, Ctrl, Space, [, ], Enter, BackSP, Del, MUTE +// `----------------------------------------' `----------------------------------------' +``` + +### LOWER +```c +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. +// , , KC_BRIU, Play, Mute, K_CSCN, PgUp, Home, Up, End, , K_MDSH +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| +// , , KC_BRID, Next, VolUp, , PgDn, Left, Down, Right, K_LOCK, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| +// , , , Prev, VolDn, [, ], , , M_CODE, M_XXX1, M_PYNV, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' +// +// `----------------------------------------' `----------------------------------------' +``` + +### RAISE +```c +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. +// `, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, - +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| +// ~, !, @, #, $, %, ^, &, *, (, ), _ +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| +// F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12 +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' +// +// `----------------------------------------' `----------------------------------------' +``` + +### ADJUST +```c +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. +// M_MAKE, EEP_RST, , , , , RGB_TOG, , , COLEMAK, DVORAK, QWERTY, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| +// M_VRSN, M_MALL, , RGB_SAI, RGB_HUI,RGB_VAI, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| +// M_FLSH, , , RGB_SAD, RGB_HUD,RGB_VAD, RGB_M_P, RGB_M_B,RGB_M_SW, , , , +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' +// +// `----------------------------------------' `----------------------------------------' + +``` + +### NUMPAD +```c +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. +// , , , , , , , 7, 8, 9, +, /, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| +// , , , , , , , 4, 5, 6, -, *, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| +// , , , , , , , , , , 0, 1, 2, 3, ., :, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' +// +// `----------------------------------------' `----------------------------------------' +``` + + \ No newline at end of file diff --git a/keyboards/kyria/keymaps/ninjonas/config.h b/keyboards/kyria/keymaps/ninjonas/config.h index 5673e6c3d83d..dd919e382fda 100644 --- a/keyboards/kyria/keymaps/ninjonas/config.h +++ b/keyboards/kyria/keymaps/ninjonas/config.h @@ -16,7 +16,7 @@ #pragma once -#define TAPPING_TERM 200 +#define TAPPING_TERM 300 #ifdef OLED_DRIVER_ENABLE #define OLED_DISPLAY_128X64 diff --git a/keyboards/kyria/keymaps/ninjonas/keymap.c b/keyboards/kyria/keymaps/ninjonas/keymap.c index e6cde72d5f55..df492a466154 100644 --- a/keyboards/kyria/keymaps/ninjonas/keymap.c +++ b/keyboards/kyria/keymaps/ninjonas/keymap.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| _____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________, // |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| - _____________________QWERTY_L3______________________,XXXXXXX,KC_LALT, M_COPA,XXXXXXX,_____________________QWERTY_R3______________________, + _____________________QWERTY_L3______________________,XXXXXXX,KC_LALT, T_CPNU,XXXXXXX,_____________________QWERTY_R3______________________, // `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' _____________MOD_LEFT_____________,T_LBRC, T_RBRC,________MOD_RIGHT________,KC_MUTE // `----------------------------------------' `----------------------------------------' @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| _____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________, // |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| - _____________________DVORAK_L3______________________,XXXXXXX,KC_LALT, M_COPA,XXXXXXX,_____________________DVORAK_R3______________________, + _____________________DVORAK_L3______________________,XXXXXXX,KC_LALT, T_CPNU,XXXXXXX,_____________________DVORAK_R3______________________, // `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' _____________MOD_LEFT_____________,T_LBRC, T_RBRC,________MOD_RIGHT________,KC_MUTE // `----------------------------------------' `----------------------------------------' @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| _____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________, // |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| - _____________________COLEMAK_L3_____________________,XXXXXXX,KC_LALT, M_COPA,XXXXXXX,_____________________COLEMAK_R3_____________________, + _____________________COLEMAK_L3_____________________,XXXXXXX,KC_LALT, T_CPNU,XXXXXXX,_____________________COLEMAK_R3_____________________, // `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' _____________MOD_LEFT_____________,T_LBRC, T_RBRC,________MOD_RIGHT________,KC_MUTE // `----------------------------------------' `----------------------------------------' @@ -89,6 +89,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ // `----------------------------------------' `----------------------------------------' ), + + [_NUMPAD] = LAYOUT_wrapper( +// ,------—————————-------------------------------------. ,--------—————————-----------------------------------. + _______, _______, _______, _______, _______,_______, _____________________NUMPAD_1_______________________, +// |--------+-----——-+——------+-——-----+——------+——-----| |------—+——------+——------+——------+——------+--------| + _______, _______, _______, _______, _______,_______, _____________________NUMPAD_2_______________________, +// |--------+-----——-+——------+-——-----+——------+——-----+———-----------. ,——————————————+------—+——------+——------+——------+——------+--------| + _______, _______, _______, _______,_______,_______,_______,_______, _______,_______,_____________________NUMPAD_3_______________________, +// `--------------------------+--------+--------+-------+-------+------| |------+-------+-------+--------+--------+--------+--------+--------' + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ +// `----------------------------------------' `----------------------------------------' + ), + /* [_TEMPLATE] = LAYOUT_wrapper( // ,------—————————-------------------------------------. ,--------—————————-----------------------------------. diff --git a/keyboards/kyria/keymaps/ninjonas/oled.c b/keyboards/kyria/keymaps/ninjonas/oled.c index ff21b4885f22..419c1b72778d 100644 --- a/keyboards/kyria/keymaps/ninjonas/oled.c +++ b/keyboards/kyria/keymaps/ninjonas/oled.c @@ -127,6 +127,7 @@ static void render_layer_state(void) { bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); bool adjust = layer_state_is(_ADJUST); + bool numpad = layer_state_is(_NUMPAD); if(lower){ oled_write_P(PSTR(" Lower "), true); @@ -134,6 +135,8 @@ static void render_layer_state(void) { oled_write_P(PSTR(" Raise "), true); } else if(adjust){ oled_write_P(PSTR(" Adjust "), true); + } else if(numpad) { + oled_write_P(PSTR(" Numpad "), true); } else { oled_write_P(PSTR(" Default"), false); } diff --git a/keyboards/lily58/keymaps/ninjonas/README.md b/keyboards/lily58/keymaps/ninjonas/README.md index 862252840045..6ef9361f607a 100644 --- a/keyboards/lily58/keymaps/ninjonas/README.md +++ b/keyboards/lily58/keymaps/ninjonas/README.md @@ -17,7 +17,7 @@ More information about the Lily58 pro keyboard can be found [here](https://yuchi * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | = | * `-----------------------------------------/ / \ \-----------------------------------------' - * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | Alt | Cmd | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' */ @@ -35,7 +35,7 @@ More information about the Lily58 pro keyboard can be found [here](https://yuchi * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| * |LShift| ; | Q | J | K | X |-------| |-------| B | M | W | V | Z | = | * `-----------------------------------------/ / \ \-----------------------------------------' - * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | Alt | Cmd | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' */ @@ -53,7 +53,7 @@ More information about the Lily58 pro keyboard can be found [here](https://yuchi * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / | = | * `-----------------------------------------/ / \ \-----------------------------------------' - * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | Alt | Cmd | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' */ diff --git a/keyboards/lily58/keymaps/ninjonas/keymap.c b/keyboards/lily58/keymaps/ninjonas/keymap.c index 0bd330a7666b..2976f9eaf337 100644 --- a/keyboards/lily58/keymaps/ninjonas/keymap.c +++ b/keyboards/lily58/keymaps/ninjonas/keymap.c @@ -28,16 +28,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | = | * `-----------------------------------------/ / \ \-----------------------------------------' - * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | Alt | Cmd | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' */ [_QWERTY] = LAYOUT_wrapper( - _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \ - _____________________QWERTY_L1______________________, _____________________QWERTY_R1______________________, \ - _____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________, \ - _____________________QWERTY_L3______________________, T_LBRC, T_RBRC, _____________________QWERTY_R3______________________, \ - _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ \ + _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, + _____________________QWERTY_L1______________________, _____________________QWERTY_R1______________________, + _____________________QWERTY_L2______________________, _____________________QWERTY_R2______________________, + _____________________QWERTY_L3______________________, T_LBRC, T_RBRC, _____________________QWERTY_R3______________________, + _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ ), /* DVORAK @@ -50,16 +50,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| * |LShift| ; | Q | J | K | X |-------| |-------| B | M | W | V | Z | = | * `-----------------------------------------/ / \ \-----------------------------------------' - * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | Alt | Cmd | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' */ [_DVORAK] = LAYOUT_wrapper( - _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \ - _____________________DVORAK_L1______________________, _____________________DVORAK_R1______________________, \ - _____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________, \ - _____________________DVORAK_L3______________________, T_LBRC, T_RBRC, _____________________DVORAK_R3______________________, \ - _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ \ + _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, + _____________________DVORAK_L1______________________, _____________________DVORAK_R1______________________, + _____________________DVORAK_L2______________________, _____________________DVORAK_R2______________________, + _____________________DVORAK_L3______________________, T_LBRC, T_RBRC, _____________________DVORAK_R3______________________, + _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ ), /* COLEMAK @@ -72,16 +72,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / | = | * `-----------------------------------------/ / \ \-----------------------------------------' - * | Alt |  | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | + * | Alt | Cmd | Ctrl | /Space / \Enter \ |BackSP| Del |LOWER | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' */ [_COLEMAK] = LAYOUT_wrapper( - _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, \ - _____________________COLEMAK_L1_____________________, _____________________COLEMAK_R1_____________________, \ - _____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________, \ - _____________________COLEMAK_L3_____________________, T_LBRC, T_RBRC, _____________________COLEMAK_R3_____________________, \ - _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ \ + _____________________NUM_LEFT_______________________, _____________________NUM_RIGHT______________________, + _____________________COLEMAK_L1_____________________, _____________________COLEMAK_R1_____________________, + _____________________COLEMAK_L2_____________________, _____________________COLEMAK_R2_____________________, + _____________________COLEMAK_L3_____________________, T_LBRC, T_RBRC, _____________________COLEMAK_R3_____________________, + _____________MOD_LEFT_____________, _____________MOD_RIGHT____________ ), /* LOWER @@ -99,11 +99,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------' '------''--------------------' */ [_LOWER] = LAYOUT_wrapper( \ - _____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________, \ - _____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________, \ - _____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, \ - _____________________LOWER_L3_______________________, _______, _______, _____________________LOWER_R3_______________________, \ - __________________________________, _______, _______, M_CODE, _______ \ + _____________________FUNC_LEFT______________________, _____________________FUNC_RIGHT_____________________, + _____________________LOWER_L1_______________________, _____________________LOWER_R1_______________________, + _____________________LOWER_L2_______________________, _____________________LOWER_R2_______________________, + _____________________LOWER_L3_______________________, _______, _______, _____________________LOWER_R3_______________________, + __________________________________, _______, _______, M_CODE, _______ ), /* RAISE @@ -121,11 +121,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------' '------''--------------------' */ [_RAISE] = LAYOUT_wrapper( \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, _____________MOUSE_2______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ - __________________________________, __________________________________ \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, _____________MOUSE_1______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, _____________MOUSE_2______________, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + __________________________________, __________________________________ ), /* ADJUST @@ -143,10 +143,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------' '------''--------------------' */ [_ADJUST] = LAYOUT_wrapper( \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - _____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________, \ - _____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, \ - _____________________ADJUST_L3______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R3______________________,\ - __________________________________, __________________________________ \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _____________________ADJUST_L1______________________, _____________________ADJUST_R1______________________, + _____________________ADJUST_L2______________________, _____________________ADJUST_R2______________________, + _____________________ADJUST_L3______________________, XXXXXXX, XXXXXXX, _____________________ADJUST_R3______________________, + __________________________________, __________________________________ ), -}; \ No newline at end of file + /* TEMPLATE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | | | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_NUMPAD] = LAYOUT_wrapper( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _____________________NUMPAD_1_______________________, + _______, _______, _______, _______, _______, _______, _____________________NUMPAD_2_______________________, + _______, _______, _______, _______, _______, _______, _______, _______, _____________________NUMPAD_3_______________________, + __________________________________, __________________________________ + ), +}; + +/* TEMPLATE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | | | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + * +[_TEMPLATE] = LAYOUT_wrapper( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + __________________________________, __________________________________ + ), +*/ \ No newline at end of file diff --git a/keyboards/pinky/3/keymaps/ninjonas/README.md b/keyboards/pinky/3/keymaps/ninjonas/README.md index d47fdd995bb2..67314fa715c4 100644 --- a/keyboards/pinky/3/keymaps/ninjonas/README.md +++ b/keyboards/pinky/3/keymaps/ninjonas/README.md @@ -15,7 +15,7 @@ More information about the Pinky3 keyboard can be found [here](https://github.co |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| | Shift| Z| X| C| V| B| Spc/RAI| | Ent/LOW| N| M| ,| .| /| =| `---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' - | ALT| | CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| + | ALT| Cmd| CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| `---------------------------------------' `---------------------------------------' */ ``` @@ -30,7 +30,7 @@ More information about the Pinky3 keyboard can be found [here](https://github.co |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| | Shift| ;| Q| J| K| X| Spc/RAI| | Ent/LOW| B| M| W| V| Z| =| `---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' - | ALT| | CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| + | ALT| Cmd| CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| `---------------------------------------' `---------------------------------------' */ ``` @@ -45,7 +45,7 @@ More information about the Pinky3 keyboard can be found [here](https://github.co |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| | Shift| Z| X| C| V| B| Spc/RAI| | Ent/LOW| K| M| ,| .| /| =| `---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------' - | ALT| | CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| + | ALT| Cmd| CTRL| KC_LAPP| | KC_RAPP| BckSpace| Del| LOWER| `---------------------------------------' `---------------------------------------' */ ``` diff --git a/keyboards/pinky/3/keymaps/ninjonas/config.h b/keyboards/pinky/3/keymaps/ninjonas/config.h index 585bd8cb5d59..ff8cd8bb0989 100644 --- a/keyboards/pinky/3/keymaps/ninjonas/config.h +++ b/keyboards/pinky/3/keymaps/ninjonas/config.h @@ -27,5 +27,5 @@ #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD -#define TAPPING_TERM 200 +#define TAPPING_TERM 300 #define RETRO_TAPPPING \ No newline at end of file diff --git a/users/ninjonas/README.md b/users/ninjonas/README.md index 39d92cff35b9..f537373bcf67 100644 --- a/users/ninjonas/README.md +++ b/users/ninjonas/README.md @@ -17,17 +17,17 @@ See: https://docs.qmk.fm/#/feature_userspace - [Kyria](../../keyboards/kyria/keymaps/ninjonas) ## Features -### [Keys](ninjonas.h#L37) +### [Keys](ninjonas.h) |Code | Description | |---|---| -|K_LOCK | MacOS shortcut to execute lock command  + CTRL + Q | +|K_LOCK | MacOS shortcut to execute lock command Cmd + CTRL + Q | |K_CSCN | MacOS shortcut to copy a portion of the screen to the clipboard | |K_MDSH | MacOS shortcut to get em-dash `–` | |K_RAPP | MacOS shortcut to switch apps to the right | |K_LAPP | MacOS shortcut to switch apps to the left | -|K_CPRF |  + Shift + M. Used for switching Google Chrome profiles | +|K_CPRF | Cmd + Shift + M. Used for switching Google Chrome profiles | -### [Layers](ninjonas.h#L44) +### [Layers](ninjonas.h) |Code | Description | |---|---| |LT_LOW | Tap for ENTER, hold for RAISE | @@ -38,13 +38,13 @@ See: https://docs.qmk.fm/#/feature_userspace |LG_LOW | Press to toggle LOWER layer | |LG_RAI | Press to toggle RAISE layer | -### [Mod-Taps](ninjonas.h#L50) +### [Mod-Taps](ninjonas.h) |Code | Description | |---|---| -|MT_DEL | Tap for Delete, hold for  + ALT + SHIFT | +|MT_DEL | Tap for Delete, hold for Cmd + ALT + SHIFT | |MT_EQL | Tap for =, hold for ALT + SHIFT | -### [Layout Blocks](ninjonas.h#L54) +### [Layout Blocks](ninjonas.h) Predefined keyboard layout templates to speed up configuring split keyboards |Code | Description | @@ -59,6 +59,7 @@ Predefined keyboard layout templates to speed up configuring split keyboards |MOUSE | Mouse Cluster | |MEDIA | Media Cluster | |MOD | Modifier Cluster | +|NUMPAD | Numpad Cluster | ### [Macros](process_records.c) |Code | Description | @@ -68,7 +69,7 @@ Predefined keyboard layout templates to speed up configuring split keyboards |M_MALL | Macro to send QMK make command to all [ninjonas](#Supported%20Keyboards) keyboards | |M_FLSH | Macro to send QMK make command to compile keyboard with the correct bootloader | |M_VRSN | Macro to send QMK version | -|M_SHFT | Sends  + alt + shift to a keycode to activate [ShiftIt](https://github.com/fikovnik/ShiftIt) | +|M_SHFT | Sends Cmd + alt + shift to a keycode to activate [ShiftIt](https://github.com/fikovnik/ShiftIt) | |M_CODE | Opens [Visual Studio Code](https://code.visualstudio.com/) on current directory | |M_TERM | Launches Spotlight and calls Terminal | |M_COPA | Single key copy/paste | @@ -81,10 +82,12 @@ Predefined keyboard layout templates to speed up configuring split keyboards |T_LBRC | Tap once for [, double for back browser | |T_RBRC | Tap once for ], double for forward browser | |T_TAB | Tap once for TAB, double for CTRL + TAB | -|T_GRV | Tap once for GRV, double for  + GRV | -|T_GUI | Tap once for , double to open spotlight | -|T_W | Tap for W, double tap for  + W | -|T_Q | Tap for Q, double tap for  + Q | +|T_GRV | Tap once for GRV, double for Cmd + GRV | +|T_GUI | Tap once for Cmd, double to open spotlight | +|T_W | Tap for W, double tap for Cmd + W | +|T_Q | Tap for Q, double tap for Cmd + Q | +|T_CPNU | Tap for Cmd + V, hold for Cmd + C, double tap for NUMPAD layer | +|T_Y | Tap for Y, double tap for NUMPAD layer | ### Secrets There's times where you have macros you don't want to share like emails, an address you need but you always forget, passwords 😱, & and private strings. Based off [drashna's secret macros](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md), it's now possible to do this. All you need to do is create a `secrets.c` file. Below is an example of how this is used. diff --git a/users/ninjonas/config.h b/users/ninjonas/config.h index 1166939c658f..ae2370c5a16b 100644 --- a/users/ninjonas/config.h +++ b/users/ninjonas/config.h @@ -1,6 +1,6 @@ #ifdef TAPPING_TERM #undef TAPPING_TERM - #define TAPPING_TERM 200 + #define TAPPING_TERM 300 #endif // Mouse Settings: Smoothing out mouse movement on keypress diff --git a/users/ninjonas/ninjonas.h b/users/ninjonas/ninjonas.h index 6f79b262f60f..6772957e2709 100644 --- a/users/ninjonas/ninjonas.h +++ b/users/ninjonas/ninjonas.h @@ -33,20 +33,22 @@ #define _LOWER 3 #define _RAISE 4 #define _ADJUST 5 +#define _NUMPAD 6 // Shortcut Keys #define K_LOCK LGUI(LCTL(KC_Q)) // Locks screen on MacOS #define K_CSCN LGUI(LCTL(LSFT(KC_4))) // Copy a portion of the screen to the clipboard -#define K_CPRF LGUI(LSFT(KC_M)) //  + Shift + M. Used for switching Google Chrome profiles +#define K_CPRF LGUI(LSFT(KC_M)) // Cmd + Shift + M. Used for switching Google Chrome profiles #define K_MDSH LSFT(LALT(KC_MINS)) -#define K_LAPP SGUI(KC_TAB) //  + Shift + Tab -#define K_RAPP LGUI(KC_TAB) //  + Tab +#define K_LAPP SGUI(KC_TAB) // Cmd + Shift + Tab +#define K_RAPP LGUI(KC_TAB) // Cmd + Tab // Layer Keys #define LM_LOW MO(_LOWER) #define LM_RAI MO(_RAISE) #define LG_LOW TG(_LOWER) #define LG_RAI TG(_RAISE) +#define LG_NUM TG(_NUMPAD) #define LT_LOW LT(_LOWER, KC_ENT) #define LT_RAI LT(_RAISE, KC_SPC) @@ -59,7 +61,7 @@ #define _____________________QWERTY_L2______________________ T_ESC, KC_A, KC_S, KC_D, KC_F, KC_G #define _____________________QWERTY_L3______________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B -#define _____________________QWERTY_R1______________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS +#define _____________________QWERTY_R1______________________ T_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS #define _____________________QWERTY_R2______________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT #define _____________________QWERTY_R3______________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_EQL @@ -115,6 +117,10 @@ #endif #define _____________________ADJUST_R2______________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define _____________________NUMPAD_1_______________________ T_Y, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_PAST +#define _____________________NUMPAD_2_______________________ XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS +#define _____________________NUMPAD_3_______________________ KC_P0, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_COLN + #define _______________NAV_1______________ KC_PGUP, KC_HOME, KC_UP, KC_END #define _______________NAV_2______________ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT @@ -124,7 +130,7 @@ #define __________________________________ _______, _______, _______, _______ #define _____________MOD_LEFT_____________ KC_LALT, T_GUI, KC_LCTL, LT_RAI -#define _____________MOD_RIGHT____________ LT_LOW, KC_BSPC, MT_DEL, LM_LOW +#define _____________MOD_RIGHT____________ LT_LOW, KC_BSPC, MT_DEL, T_CPNU #define _________MEDIA_1_________ KC_BRIU, KC_MPLY, KC_MUTE #define _________MEDIA_2_________ KC_BRID, KC_MFFD, KC__VOLUP @@ -135,7 +141,7 @@ #define ________MOD_RIGHT________ LT_LOW, KC_BSPC, MT_DEL #else #define ________MOD_LEFT_________ KC_LALT, T_GUI, KC_LCTL - #define ________MOD_RIGHT________ KC_BSPC, MT_DEL, LM_LOW + #define ________MOD_RIGHT________ KC_BSPC, MT_DEL, T_CPNU #endif // Layout wrappers diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index 285b0364e5cc..ffb9eecbcb49 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c @@ -47,13 +47,16 @@ void render_layer_state(void) { bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); bool adjust = layer_state_is(_ADJUST); + bool numpad = layer_state_is(_NUMPAD); if(lower){ oled_write_P(PSTR(" Lower "), true); } else if(raise){ oled_write_P(PSTR(" Raise "), true); } else if(adjust){ - oled_write_P(PSTR(" Adjust "), true); + oled_write_P(PSTR(" Adjust "), true); + } else if(numpad) { + oled_write_P(PSTR(" Numpad "), true); } else { oled_write_P(PSTR(" Default"), false); } diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c index 5c6d98ec8fa4..b4a5e35d1375 100644 --- a/users/ninjonas/process_records.c +++ b/users/ninjonas/process_records.c @@ -23,7 +23,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; - // Sends  + alt + shift to a keycode to activate shiftit. See: https://github.com/fikovnik/ShiftIt + // Sends Cmd + alt + shift to a keycode to activate shiftit. See: https://github.com/fikovnik/ShiftIt case M_SHFT: if (record->event.pressed) { register_code(KC_LGUI); @@ -98,9 +98,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { copy_paste_timer = timer_read(); } else { if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { - tap_code16(LGUI(KC_C)); // Hold  + C + tap_code16(LGUI(KC_C)); // Hold Cmd + C } else { - tap_code16(LGUI(KC_V)); // Tap  + V + tap_code16(LGUI(KC_V)); // Tap Cmd + V } } diff --git a/users/ninjonas/tap_dances.c b/users/ninjonas/tap_dances.c index 0665a1607d81..ece95887a7f4 100644 --- a/users/ninjonas/tap_dances.c +++ b/users/ninjonas/tap_dances.c @@ -1,5 +1,87 @@ #include "ninjonas.h" +//// BEGIN: Advanced Tap Dances +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (!state->pressed) { + return SINGLE_TAP; + } else { + return SINGLE_HOLD; + } + } else if (state->count == 2) { + return DOUBLE_TAP; + } + else return 8; +} + +// BEGIN: Copy, Paste, NUMPAD +// https://beta.docs.qmk.fm/features/feature_tap_dance#example-6-using-tap-dance-for-momentary-layer-switch-and-layer-toggle-keys +static tap copy_paste_numpad_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void copy_paste_numpad_finished (qk_tap_dance_state_t *state, void *user_data) { + copy_paste_numpad_tap_state.state = cur_dance(state); + switch (copy_paste_numpad_tap_state.state) { + case SINGLE_TAP: + tap_code16(LGUI(KC_V)); // Tap Cmd + V + break; + case SINGLE_HOLD: + tap_code16(LGUI(KC_C)); // Hold Cmd + C + break; + case DOUBLE_TAP: + if (layer_state_is(_NUMPAD)) { + layer_off(_NUMPAD); + } else { + layer_on(_NUMPAD); + } + break; + } +} + +void copy_paste_numpad_reset (qk_tap_dance_state_t *state, void *user_data) { + copy_paste_numpad_tap_state.state = 0; +} +// END: Copy, Paste, NUMPAD + +// BEGIN: Y, NUMPAD +static tap y_numpad_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void y_numpad_finished (qk_tap_dance_state_t *state, void *user_data) { + y_numpad_tap_state.state = cur_dance(state); + switch (y_numpad_tap_state.state) { + case SINGLE_TAP: + tap_code(KC_Y); + break; + case SINGLE_HOLD: + register_code16(KC_Y); + break; + case DOUBLE_TAP: + if (layer_state_is(_NUMPAD)) { + layer_off(_NUMPAD); + } else { + layer_on(_NUMPAD); + } + break; + } +} + +void y_numpad_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (y_numpad_tap_state.state) { + case SINGLE_HOLD: + unregister_code16(KC_Y); + break; + } + y_numpad_tap_state.state = 0; +} +// END: Y, NUMPAD + +//// END: Advanced Tap Dances + qk_tap_dance_action_t tap_dance_actions[] = { [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS), [TD_LBRC_BACK] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, LGUI(KC_LBRC)), @@ -9,4 +91,8 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_GUI_GUISPC] = ACTION_TAP_DANCE_DOUBLE(KC_LGUI, LGUI(KC_SPC)), [TD_W_CTRLW] = ACTION_TAP_DANCE_DOUBLE(KC_W, LGUI(KC_W)), [TD_Q_GUIQ] = ACTION_TAP_DANCE_DOUBLE(KC_Q, LGUI(KC_Q)), + + // Advanced Tap Dances + [TD_COPY_PASTE_NUMPAD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, copy_paste_numpad_finished, copy_paste_numpad_reset), + [TD_Y_NUMPAD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, y_numpad_finished, y_numpad_reset), }; \ No newline at end of file diff --git a/users/ninjonas/tap_dances.h b/users/ninjonas/tap_dances.h index 0a781ce4ed99..f2f39108dc8a 100644 --- a/users/ninjonas/tap_dances.h +++ b/users/ninjonas/tap_dances.h @@ -1,6 +1,17 @@ #pragma once #include "ninjonas.h" +typedef struct { + bool is_press_action; + int state; +} tap; + +enum tapdance_types{ + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3 +}; + enum custom_tapdances{ TD_ESC_CAPS = 0, TD_LBRC_BACK, @@ -10,13 +21,17 @@ enum custom_tapdances{ TD_GUI_GUISPC, TD_W_CTRLW, TD_Q_GUIQ, + TD_COPY_PASTE_NUMPAD, + TD_Y_NUMPAD, }; #define T_ESC TD(TD_ESC_CAPS) // Tap for ESC, double tap for CAPSLOCK #define T_LBRC TD(TD_LBRC_BACK) // Tap for [, double tap for back browser #define T_RBRC TD(TD_RBRC_FWD) // Tap for ], double tap for forward browser #define T_TAB TD(TD_TAB_CTRLTAB) // Tap for TAB, double tap for CTRL + TAB -#define T_GRV TD(TD_GRV_CTRLGRV) // Tap for GRV, double tap for  + GRV -#define T_GUI TD(TD_GUI_GUISPC) // Tap for , double tap for  + Space -#define T_W TD(TD_W_CTRLW) // Tap for W, double tap for  + W -#define T_Q TD(TD_Q_GUIQ) // Tap for Q, double tap for  + Q \ No newline at end of file +#define T_GRV TD(TD_GRV_CTRLGRV) // Tap for GRV, double tap for Cmd + GRV +#define T_GUI TD(TD_GUI_GUISPC) // Tap for Cmd, double tap for Cmd + Space +#define T_W TD(TD_W_CTRLW) // Tap for W, double tap for Cmd + W +#define T_Q TD(TD_Q_GUIQ) // Tap for Q, double tap for Cmd + Q +#define T_CPNU TD(TD_COPY_PASTE_NUMPAD) // Tap for paste, hold for copy, double tap for NUMPAD +#define T_Y TD(TD_Y_NUMPAD) // Tap for Y, double tap for NUMPAD \ No newline at end of file From 0d3f0889c58e10f6c1e56d958e9ad85ea82d5a08 Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Mon, 17 Feb 2020 12:18:49 +0100 Subject: [PATCH 308/331] Fix os detection in OSX python 3.8 (#8187) * Fix os detection in osx python 3.8 * oops --- lib/python/qmk/cli/doctor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 0d6c1c5b0655..577588492db4 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -170,7 +170,7 @@ def doctor(cli): # Determine our OS and run platform specific tests OS = platform.platform().lower() # noqa (N806), uppercase name is ok in this instance - if 'darwin' in OS: + if 'darwin' or 'macos' in OS: if not os_test_macos(): ok = False elif 'linux' in OS: From e7e38fe80e78e0f68de50b06bb05d0a66322afae Mon Sep 17 00:00:00 2001 From: Mike Tsao Date: Mon, 17 Feb 2020 11:08:13 -0800 Subject: [PATCH 309/331] Conform Gherkin defaults to original TMK keymap (#8186) * Conform defaults to original TMK keymap * fix swapped PGUP/PGDN (thanks noroadsleft) * Another typo --- .../gherkin/keymaps/default/keymap.c | 45 ++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c index 9d1a67bd38ba..3394c9daee0d 100644 --- a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c @@ -1,21 +1,54 @@ #include QMK_KEYBOARD_H -#define FN1_Q LT(1, KC_Q) +#define FN1_SPC LT(1, KC_SPC) +#define FN2_BSPC LT(2, KC_BSPC) +#define FN3_C LT(3, KC_C) +#define FN4_V LT(4, KC_V) +#define FN5_B LT(5, KC_B) +#define CTL_Z CTL_T(KC_Z) +#define ALT_X ALT_T(KC_X) +#define ALT_N ALGR_T(KC_N) +#define CTL_M RCTL_T(KC_M) +#define SFT_ENT RSFT_T(KC_ENT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ortho_3x10( - FN1_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESC, - KC_Z, KC_X, KC_C, KC_V, KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT + CTL_Z, ALT_X, FN3_C, FN4_V, FN2_BSPC,FN1_SPC, FN5_B, ALT_N, CTL_M, SFT_ENT ), [1] = LAYOUT_ortho_3x10( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_INC, - _______, _______, _______, _______, _______, _______, RESET, _______, _______, BL_DEC + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ ), + [2] = LAYOUT_ortho_3x10( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_GRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_ortho_3x10( + _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TAB, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_SCLN, KC_QUOT, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [4] = LAYOUT_ortho_3x10( + _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TAB, _______, _______, _______, _______, KC_LABK, KC_RABK, KC_QUES, KC_COLN, KC_DQUO, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + [5] = LAYOUT_ortho_3x10( + KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______ + ) + }; void keyboard_pre_init_user(void) { From 58724f8dcb9eccb1c132b8ddab422790ddd26be0 Mon Sep 17 00:00:00 2001 From: shela Date: Tue, 18 Feb 2020 04:10:16 +0900 Subject: [PATCH 310/331] [Docs] Update Japanese translation of cli.md (#8188) --- docs/ja/cli.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/ja/cli.md b/docs/ja/cli.md index a83ccdf378f9..4b1f5da365ce 100644 --- a/docs/ja/cli.md +++ b/docs/ja/cli.md @@ -1,8 +1,8 @@ # QMK CLI このページは QMK CLI のセットアップと使用方法について説明します。 @@ -257,6 +257,16 @@ $ qmk kle2json -f kle.txt -f qmk list-keyboards ``` +## `qmk list-keymaps` + +このコマンドは指定されたキーボード(とリビジョン)の全てのキーマップをリスト化します。 + +**使用法**: + +``` +qmk list-keymaps -kb planck/ez +``` + ## `qmk new-keymap` このコマンドは、キーボードの既存のデフォルトのキーマップに基づいて新しいキーマップを作成します。 From c66930445f7d5941eb847568288046d51f853786 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Mon, 17 Feb 2020 11:42:11 -0800 Subject: [PATCH 311/331] Use pathlib everywhere we can (#7872) * Use pathlib everywhere we can * Update lib/python/qmk/path.py Co-Authored-By: Erovia * Update lib/python/qmk/path.py Co-Authored-By: Erovia * Improvements based on @erovia's feedback * rework qmk compile and qmk flash to use pathlib * style * Remove the subcommand_name argument from find_keyboard_keymap() Co-authored-by: Erovia --- lib/python/milc.py | 6 +- lib/python/qmk/cli/compile.py | 99 ++++----------------------- lib/python/qmk/cli/flash.py | 34 ++++----- lib/python/qmk/cli/json/keymap.py | 31 +++++---- lib/python/qmk/cli/list/keyboards.py | 1 + lib/python/qmk/cli/new/keymap.py | 26 ++++--- lib/python/qmk/commands.py | 96 +++++++++++++++++++++++--- lib/python/qmk/constants.py | 9 +++ lib/python/qmk/keymap.py | 18 ++--- lib/python/qmk/path.py | 57 ++++++++++++--- lib/python/qmk/tests/test_qmk_path.py | 5 +- 11 files changed, 213 insertions(+), 169 deletions(-) create mode 100644 lib/python/qmk/constants.py diff --git a/lib/python/milc.py b/lib/python/milc.py index 949bb0252a6a..83edfc7f5159 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -273,7 +273,7 @@ def __init__(self): self._inside_context_manager = False self.ansi = ansi_colors self.arg_only = [] - self.config = None + self.config = self.config_source = None self.config_file = None self.default_arguments = {} self.version = 'unknown' @@ -473,6 +473,7 @@ def read_config_file(self): """ self.acquire_lock() self.config = Configuration() + self.config_source = Configuration() self.config_file = self.find_config_file() if self.config_file and self.config_file.exists(): @@ -498,6 +499,7 @@ def read_config_file(self): value = int(value) self.config[section][option] = value + self.config_source[section][option] = 'config_file' self.release_lock() @@ -530,12 +532,14 @@ def merge_args_into_config(self): arg_value = getattr(self.args, argument) if arg_value is not None: self.config[section][argument] = arg_value + self.config_source[section][argument] = 'argument' else: if argument not in self.config[entrypoint_name]: # Check if the argument exist for this section arg = getattr(self.args, argument) if arg is not None: self.config[section][argument] = arg + self.config_source[section][argument] = 'argument' self.release_lock() diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 826b969ef608..3068c97d81e8 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py @@ -3,16 +3,12 @@ You can compile a keymap already in the repo or using a QMK Configurator export. """ import subprocess -import os from argparse import FileType from milc import cli -from qmk.commands import create_make_command -from qmk.commands import parse_configurator_json -from qmk.commands import compile_configurator_json -import qmk.keymap import qmk.path +from qmk.commands import compile_configurator_json, create_make_command, find_keyboard_keymap, parse_configurator_json @cli.argument('filename', nargs='?', arg_only=True, type=FileType('r'), help='The configurator export to compile') @@ -24,99 +20,28 @@ def compile(cli): If a Configurator export is supplied this command will create a new keymap, overwriting an existing keymap if one exists. - FIXME(skullydazed): add code to check and warn if the keymap already exists - - If --keyboard and --keymap are provided this command will build a firmware based on that. - + If a keyboard and keymap are provided this command will build a firmware based on that. """ - # Set CWD as directory command was issued from - cwd = os.environ['ORIG_CWD'] - qmk_path = os.getcwd() - current_folder = os.path.basename(cwd) - # Initialize boolean to check for being in a keyboard directory and initialize keyboard string - in_keyboard = False - in_layout = False - keyboard = "" - keymap = "" - user_keymap = "" - user_keyboard = "" - - # Set path for '/keyboards/' directory - keyboards_path = os.path.join(qmk_path, "keyboards") - layouts_path = os.path.join(qmk_path, "layouts") - - # If below 'keyboards' and not in 'keyboards' or 'keymaps', get current keyboard name - if cwd.startswith(keyboards_path): - if current_folder != "keyboards" and current_folder != "keymaps": - if os.path.basename(os.path.abspath(os.path.join(cwd, ".."))) == "keymaps": - # If in a keymap folder, set relative path, get everything before /keymaps, and the keymap name - relative_path = cwd[len(keyboards_path):][1:] - keyboard = str(relative_path).split("/keymaps", 1)[0] - keymap = str(relative_path.rsplit("/", 1)[-1]) - else: - keyboard = str(cwd[len(keyboards_path):])[1:] - - in_keyboard = True - - # If in layouts dir - if cwd.startswith(layouts_path): - if current_folder != "layouts": - in_layout = True - - # If user keyboard/keymap or compile keyboard/keymap are supplied, assign those - if cli.config.compile.keyboard: - user_keyboard = cli.config.compile.keyboard - if cli.config.compile.keymap and not in_layout: - user_keymap = cli.config.compile.keymap - if cli.args.filename: - # Parse the configurator json + # If a configurator JSON was provided skip straight to compiling it + # FIXME(skullydazed): add code to check and warn if the keymap already exists when compiling a json keymap. user_keymap = parse_configurator_json(cli.args.filename) - - # Generate the keymap keymap_path = qmk.path.keymap(user_keymap['keyboard']) - cli.log.info('Creating {fg_cyan}%s{style_reset_all} keymap in {fg_cyan}%s', user_keymap['keymap'], keymap_path) - - # Compile the keymap command = compile_configurator_json(user_keymap) cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap']) - elif user_keyboard and user_keymap: - # Generate the make command for a specific keyboard/keymap. - command = create_make_command(user_keyboard, user_keymap) - - elif in_keyboard: - keyboard = user_keyboard if user_keyboard else keyboard - keymap = user_keymap if user_keymap else keymap - - if not os.path.exists(os.path.join(keyboards_path, keyboard, "rules.mk")): - cli.log.error('This directory does not contain a rules.mk file. Change directory or supply --keyboard with optional --keymap') - return False - - # Get path for keyboard directory - keymap_path = qmk.path.keymap(keyboard) - - # Check for global keymap config first - if keymap: - command = create_make_command(keyboard, keymap) - - else: - # If no default keymap exists and none provided - cli.log.error('This directory does not contain a keymap. Set one with `qmk config` or supply `--keymap` ') - return False + else: + # Perform the action the user specified + user_keyboard, user_keymap = find_keyboard_keymap() + if user_keyboard and user_keymap: + # Generate the make command for a specific keyboard/keymap. + command = create_make_command(user_keyboard, user_keymap) - elif in_layout: - if user_keyboard: - keymap = current_folder - command = create_make_command(user_keyboard, keymap) else: - cli.log.error('You must supply a keyboard to compile a layout keymap. Set one with `qmk config` or supply `--keyboard` ') + cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') + cli.echo('usage: qmk compile [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [filename]') return False - else: - cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') - return False - cli.log.info('Compiling keymap with {fg_cyan}%s\n\n', ' '.join(command)) subprocess.run(command) diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index cc1e6235afa5..f669c3cb7e74 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py @@ -8,7 +8,7 @@ import qmk.path from milc import cli -from qmk.commands import compile_configurator_json, create_make_command, parse_configurator_json +from qmk.commands import compile_configurator_json, create_make_command, find_keyboard_keymap, parse_configurator_json def print_bootloader_help(): @@ -45,39 +45,31 @@ def flash(cli): If bootloader is omitted, the one according to the rules.mk will be used. """ - command = [] if cli.args.bootloaders: # Provide usage and list bootloaders cli.echo('usage: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]') print_bootloader_help() return False - elif cli.config.flash.keymap and not cli.config.flash.keyboard: - # If only a keymap was given but no keyboard, suggest listing keyboards - cli.echo('usage: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]') - cli.log.error('run \'qmk list_keyboards\' to find out the supported keyboards') - return False - - elif cli.args.filename: - # Get keymap path to log info + if cli.args.filename: + # Handle compiling a configurator JSON user_keymap = parse_configurator_json(cli.args.filename) keymap_path = qmk.path.keymap(user_keymap['keyboard']) - - cli.log.info('Creating {fg_cyan}%s{style_reset_all} keymap in {fg_cyan}%s', user_keymap['keymap'], keymap_path) - - # Convert the JSON into a C file and write it to disk. command = compile_configurator_json(user_keymap, cli.args.bootloader) cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap']) - elif cli.config.flash.keyboard and cli.config.flash.keymap: - # Generate the make command for a specific keyboard/keymap. - command = create_make_command(cli.config.flash.keyboard, cli.config.flash.keymap, cli.args.bootloader) - else: - cli.echo('usage: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]') - cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`. You can also specify a bootloader with --bootloader. Use --bootloaders to list the available bootloaders.') - return False + # Perform the action the user specified + user_keyboard, user_keymap = find_keyboard_keymap() + if user_keyboard and user_keymap: + # Generate the make command for a specific keyboard/keymap. + command = create_make_command(user_keyboard, user_keymap, cli.args.bootloader) + + else: + cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`.') + cli.echo('usage: qmk flash [-h] [-b] [-kb KEYBOARD] [-km KEYMAP] [-bl BOOTLOADER] [filename]') + return False cli.log.info('Flashing keymap with {fg_cyan}%s\n\n', ' '.join(command)) subprocess.run(command) diff --git a/lib/python/qmk/cli/json/keymap.py b/lib/python/qmk/cli/json/keymap.py index a030ab53d6ab..c2b7dde7ab43 100755 --- a/lib/python/qmk/cli/json/keymap.py +++ b/lib/python/qmk/cli/json/keymap.py @@ -1,14 +1,15 @@ """Generate a keymap.c from a configurator export. """ import json -import os +from pathlib import Path from milc import cli import qmk.keymap +import qmk.path -@cli.argument('-o', '--output', arg_only=True, help='File to write to') +@cli.argument('-o', '--output', arg_only=True, type=Path, help='File to write to') @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") @cli.argument('filename', arg_only=True, help='Configurator JSON file') @cli.subcommand('Creates a keymap.c from a QMK Configurator export.') @@ -17,13 +18,17 @@ def json_keymap(cli): This command uses the `qmk.keymap` module to generate a keymap.c from a configurator export. The generated keymap is written to stdout, or to a file if -o is provided. """ + cli.args.filename = qmk.path.normpath(cli.args.filename) + # Error checking - if cli.args.filename == ('-'): - cli.log.error('Reading from STDIN is not (yet) supported.') + if not cli.args.filename.exists(): + cli.log.error('JSON file does not exist!') cli.print_usage() exit(1) - if not os.path.exists(qmk.path.normpath(cli.args.filename)): - cli.log.error('JSON file does not exist!') + + if str(cli.args.filename) == '-': + # TODO(skullydazed/anyone): Read file contents from STDIN + cli.log.error('Reading from STDIN is not (yet) supported.') cli.print_usage() exit(1) @@ -32,21 +37,17 @@ def json_keymap(cli): cli.args.output = None # Parse the configurator json - with open(qmk.path.normpath(cli.args.filename), 'r') as fd: + with cli.args.filename.open('r') as fd: user_keymap = json.load(fd) # Generate the keymap keymap_c = qmk.keymap.generate(user_keymap['keyboard'], user_keymap['layout'], user_keymap['layers']) if cli.args.output: - output_dir = os.path.dirname(cli.args.output) - - if not os.path.exists(output_dir): - os.makedirs(output_dir) - - output_file = qmk.path.normpath(cli.args.output) - with open(output_file, 'w') as keymap_fd: - keymap_fd.write(keymap_c) + cli.args.output.parent.mkdir(parents=True, exist_ok=True) + if cli.args.output.exists(): + cli.args.output.replace(cli.args.output.name + '.bak') + cli.args.output.write_text(keymap_c) if not cli.args.quiet: cli.log.info('Wrote keymap to %s.', cli.args.output) diff --git a/lib/python/qmk/cli/list/keyboards.py b/lib/python/qmk/cli/list/keyboards.py index 76e7760e8405..ca0c5661a48c 100644 --- a/lib/python/qmk/cli/list/keyboards.py +++ b/lib/python/qmk/cli/list/keyboards.py @@ -1,5 +1,6 @@ """List the keyboards currently defined within QMK """ +# We avoid pathlib here because this is performance critical code. import os import glob diff --git a/lib/python/qmk/cli/new/keymap.py b/lib/python/qmk/cli/new/keymap.py index 96525e28e1b7..cbe50692ec0b 100755 --- a/lib/python/qmk/cli/new/keymap.py +++ b/lib/python/qmk/cli/new/keymap.py @@ -1,8 +1,9 @@ """This script automates the copying of the default keymap into your own keymap. """ -import os import shutil +from pathlib import Path +import qmk.path from milc import cli @@ -17,24 +18,27 @@ def new_keymap(cli): keymap = cli.config.new_keymap.keymap if cli.config.new_keymap.keymap else input("Keymap Name: ") # generate keymap paths - kb_path = os.path.join(os.getcwd(), "keyboards", keyboard) - keymap_path_default = os.path.join(kb_path, "keymaps/default") - keymap_path = os.path.join(kb_path, "keymaps/%s" % keymap) + kb_path = Path('keyboards') / keyboard + keymap_path = qmk.path.keymap(keyboard) + keymap_path_default = keymap_path / 'default' + keymap_path_new = keymap_path / keymap # check directories - if not os.path.exists(kb_path): + if not kb_path.exists(): cli.log.error('Keyboard %s does not exist!', kb_path) exit(1) - if not os.path.exists(keymap_path_default): + + if not keymap_path_default.exists(): cli.log.error('Keyboard default %s does not exist!', keymap_path_default) exit(1) - if os.path.exists(keymap_path): - cli.log.error('Keymap %s already exists!', keymap_path) + + if keymap_path_new.exists(): + cli.log.error('Keymap %s already exists!', keymap_path_new) exit(1) # create user directory with default keymap files - shutil.copytree(keymap_path_default, keymap_path, symlinks=True) + shutil.copytree(str(keymap_path_default), str(keymap_path_new), symlinks=True) # end message to user - cli.log.info("%s keymap directory created in: %s", keymap, keymap_path) - cli.log.info("Compile a firmware with your new keymap by typing: \n" + "qmk compile -kb %s -km %s", keyboard, keymap) + cli.log.info("%s keymap directory created in: %s", keymap, keymap_path_new) + cli.log.info("Compile a firmware with your new keymap by typing: \n\n\tqmk compile -kb %s -km %s\n", keyboard, keymap) diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 6067d49ae7c8..cdb8ee037ad2 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -1,13 +1,19 @@ -"""Functions that build make commands +"""Helper functions for commands. """ import json +from pathlib import Path + +from milc import cli + import qmk.keymap +from qmk.path import is_keyboard, is_keymap_dir, under_qmk_firmware def create_make_command(keyboard, keymap, target=None): """Create a make compile command Args: + keyboard The path of the keyboard, for example 'plank' @@ -18,24 +24,22 @@ def create_make_command(keyboard, keymap, target=None): Usually a bootloader. Returns: + A command that can be run to make the specified keyboard and keymap """ - if target is None: - return ['make', ':'.join((keyboard, keymap))] - return ['make', ':'.join((keyboard, keymap, target))] + make_args = [keyboard, keymap] + if target: + make_args.append(target) -def parse_configurator_json(configurator_file): - """Open and parse a configurator json export - """ - user_keymap = json.load(configurator_file) - return user_keymap + return ['make', ':'.join(make_args)] def compile_configurator_json(user_keymap, bootloader=None): """Convert a configurator export JSON file into a C file Args: + configurator_filename The configurator JSON export file @@ -43,6 +47,7 @@ def compile_configurator_json(user_keymap, bootloader=None): A bootloader to flash Returns: + A command to run to compile and flash the C file. """ # Write the keymap C file @@ -52,3 +57,76 @@ def compile_configurator_json(user_keymap, bootloader=None): if bootloader is None: return create_make_command(user_keymap['keyboard'], user_keymap['keymap']) return create_make_command(user_keymap['keyboard'], user_keymap['keymap'], bootloader) + + +def find_keyboard_keymap(): + """Returns `(keyboard_name, keymap_name)` based on the user's current environment. + + This determines the keyboard and keymap name using the following precedence order: + + * Command line flags (--keyboard and --keymap) + * Current working directory + * `keyboards/` + * `keyboards//keymaps/` + * `layouts/**/` + * `users/` + * Configuration + * cli.config..keyboard + * cli.config..keymap + """ + # Check to make sure their copy of MILC supports config_source + if not hasattr(cli, 'config_source'): + cli.log.error("Your QMK CLI is out of date. Please upgrade using pip3 or your package manager.") + exit(1) + + # State variables + relative_cwd = under_qmk_firmware() + keyboard_name = "" + keymap_name = "" + + # If the keyboard or keymap are passed as arguments use that in preference to anything else + if cli.config_source[cli._entrypoint.__name__]['keyboard'] == 'argument': + keyboard_name = cli.config[cli._entrypoint.__name__]['keyboard'] + if cli.config_source[cli._entrypoint.__name__]['keymap'] == 'argument': + keymap_name = cli.config[cli._entrypoint.__name__]['keymap'] + + if not keyboard_name or not keymap_name: + # If we don't have a keyboard_name and keymap_name from arguments try to derive one or both + if relative_cwd and relative_cwd.parts and relative_cwd.parts[0] == 'keyboards': + # Try to determine the keyboard and/or keymap name + current_path = Path('/'.join(relative_cwd.parts[1:])) + + if current_path.parts[-2] == 'keymaps': + if not keymap_name: + keymap_name = current_path.parts[-1] + if not keyboard_name: + keyboard_name = '/'.join(current_path.parts[:-2]) + elif not keyboard_name and is_keyboard(current_path): + keyboard_name = str(current_path) + + elif relative_cwd and relative_cwd.parts and relative_cwd.parts[0] == 'layouts': + # Try to determine the keymap name from the community layout + if is_keymap_dir(relative_cwd) and not keymap_name: + keymap_name = relative_cwd.name + + elif relative_cwd and relative_cwd.parts and relative_cwd.parts[0] == 'users': + # Try to determine the keymap name based on which userspace they're in + if not keymap_name and len(relative_cwd.parts) > 1: + keymap_name = relative_cwd.parts[1] + + # If we still don't have a keyboard and keymap check the config + if not keyboard_name and cli.config[cli._entrypoint.__name__]['keyboard']: + keyboard_name = cli.config[cli._entrypoint.__name__]['keyboard'] + + if not keymap_name and cli.config[cli._entrypoint.__name__]['keymap']: + keymap_name = cli.config[cli._entrypoint.__name__]['keymap'] + + return (keyboard_name, keymap_name) + + +def parse_configurator_json(configurator_file): + """Open and parse a configurator json export + """ + user_keymap = json.load(configurator_file) + + return user_keymap diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py new file mode 100644 index 000000000000..3e4709969da1 --- /dev/null +++ b/lib/python/qmk/constants.py @@ -0,0 +1,9 @@ +"""Information that should be available to the python library. +""" +from pathlib import Path + +# The root of the qmk_firmware tree. +QMK_FIRMWARE = Path.cwd() + +# This is the number of directories under `qmk_firmware/keyboards` that will be traversed. This is currently a limitation of our make system. +MAX_KEYBOARD_SUBFOLDERS = 5 diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 15a91a276bdf..b91ba89bedd6 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -31,11 +31,10 @@ def template(keyboard): keyboard The keyboard to return a template for. """ - template_name = 'keyboards/%s/templates/keymap.c' % keyboard + template_file = Path('keyboards/%s/templates/keymap.c' % keyboard) - if os.path.exists(template_name): - with open(template_name, 'r') as fd: - return fd.read() + if template_file.exists(): + return template_file.read_text() return DEFAULT_KEYMAP_C @@ -85,15 +84,10 @@ def write(keyboard, keymap, layout, layers): An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode. """ keymap_c = generate(keyboard, layout, layers) - keymap_path = qmk.path.keymap(keyboard) - keymap_dir = os.path.join(keymap_path, keymap) - keymap_file = os.path.join(keymap_dir, 'keymap.c') + keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.c' - if not os.path.exists(keymap_dir): - os.makedirs(keymap_dir) - - with open(keymap_file, 'w') as keymap_fd: - keymap_fd.write(keymap_c) + keymap_file.parent.mkdir(parents=True, exist_ok=True) + keymap_file.write_text(keymap_c) return keymap_file diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index cf087265fbf8..d16928afb5c1 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -2,34 +2,69 @@ """ import logging import os +from pathlib import Path +from qmk.constants import QMK_FIRMWARE, MAX_KEYBOARD_SUBFOLDERS from qmk.errors import NoSuchKeyboardError +def is_keymap_dir(keymap_path): + """Returns True if `keymap_path` is a valid keymap directory. + """ + keymap_path = Path(keymap_path) + keymap_c = keymap_path / 'keymap.c' + keymap_json = keymap_path / 'keymap.json' + + return any((keymap_c.exists(), keymap_json.exists())) + + +def is_keyboard(keyboard_name): + """Returns True if `keyboard_name` is a keyboard we can compile. + """ + keyboard_path = QMK_FIRMWARE / 'keyboards' / keyboard_name + rules_mk = keyboard_path / 'rules.mk' + return rules_mk.exists() + + +def under_qmk_firmware(): + """Returns a Path object representing the relative path under qmk_firmware, or None. + """ + cwd = Path(os.environ['ORIG_CWD']) + + try: + return cwd.relative_to(QMK_FIRMWARE) + except ValueError: + return None + + def keymap(keyboard): """Locate the correct directory for storing a keymap. Args: + keyboard The name of the keyboard. Example: clueboard/66/rev3 """ - for directory in ['.', '..', '../..', '../../..', '../../../..', '../../../../..']: - basepath = os.path.normpath(os.path.join('keyboards', keyboard, directory, 'keymaps')) + keyboard_folder = Path('keyboards') / keyboard + + for i in range(MAX_KEYBOARD_SUBFOLDERS): + if (keyboard_folder / 'keymaps').exists(): + return (keyboard_folder / 'keymaps').resolve() - if os.path.exists(basepath): - return basepath + keyboard_folder = keyboard_folder.parent - logging.error('Could not find keymaps directory!') + logging.error('Could not find the keymaps directory!') raise NoSuchKeyboardError('Could not find keymaps directory for: %s' % keyboard) def normpath(path): - """Returns the fully resolved absolute path to a file. + """Returns a `pathlib.Path()` object for a given path. - This function will return the absolute path to a file as seen from the - directory the script was called from. + This will use the path to a file as seen from the directory the script was called from. You should use this to normalize filenames supplied from the command line. """ - if path and path[0] == '/': - return os.path.normpath(path) + path = Path(path) + + if path.is_absolute(): + return Path(path) - return os.path.normpath(os.path.join(os.environ['ORIG_CWD'], path)) + return Path(os.environ['ORIG_CWD']) / path diff --git a/lib/python/qmk/tests/test_qmk_path.py b/lib/python/qmk/tests/test_qmk_path.py index d6961a0f652f..74db7b3e2699 100644 --- a/lib/python/qmk/tests/test_qmk_path.py +++ b/lib/python/qmk/tests/test_qmk_path.py @@ -1,13 +1,14 @@ import os +from pathlib import Path import qmk.path def test_keymap_onekey_pytest(): path = qmk.path.keymap('handwired/onekey/pytest') - assert path == 'keyboards/handwired/onekey/keymaps' + assert path.samefile('keyboards/handwired/onekey/keymaps') def test_normpath(): path = qmk.path.normpath('lib/python') - assert path == os.path.join(os.environ['ORIG_CWD'], 'lib/python') + assert path.samefile(Path(os.environ['ORIG_CWD']) / 'lib/python') From a2081171de25099b0e6be6faa08954ceff2a953b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 18 Feb 2020 00:54:15 +0000 Subject: [PATCH 312/331] [keyboard] Austin (#8176) * Add austin keyboard * Update to use spi ws2812 driver * remove rgb --- keyboards/acheron/austin/austin.c | 18 + keyboards/acheron/austin/austin.h | 21 + keyboards/acheron/austin/chconf.h | 520 ++++++++++++++++++ keyboards/acheron/austin/config.h | 71 +++ keyboards/acheron/austin/halconf.h | 354 ++++++++++++ keyboards/acheron/austin/info.json | 124 +++++ .../acheron/austin/keymaps/default/keymap.c | 28 + keyboards/acheron/austin/keymaps/via/keymap.c | 55 ++ keyboards/acheron/austin/keymaps/via/rules.mk | 1 + keyboards/acheron/austin/mcuconf.h | 176 ++++++ keyboards/acheron/austin/readme.md | 29 + keyboards/acheron/austin/rules.mk | 25 + 12 files changed, 1422 insertions(+) create mode 100644 keyboards/acheron/austin/austin.c create mode 100644 keyboards/acheron/austin/austin.h create mode 100644 keyboards/acheron/austin/chconf.h create mode 100644 keyboards/acheron/austin/config.h create mode 100644 keyboards/acheron/austin/halconf.h create mode 100755 keyboards/acheron/austin/info.json create mode 100755 keyboards/acheron/austin/keymaps/default/keymap.c create mode 100644 keyboards/acheron/austin/keymaps/via/keymap.c create mode 100644 keyboards/acheron/austin/keymaps/via/rules.mk create mode 100644 keyboards/acheron/austin/mcuconf.h create mode 100644 keyboards/acheron/austin/readme.md create mode 100644 keyboards/acheron/austin/rules.mk diff --git a/keyboards/acheron/austin/austin.c b/keyboards/acheron/austin/austin.c new file mode 100644 index 000000000000..347e7c0f1ae1 --- /dev/null +++ b/keyboards/acheron/austin/austin.c @@ -0,0 +1,18 @@ +#include "austin.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(A0); + setPinOutput(A1); + setPinOutput(A2); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(A2, led_state.num_lock); + writePin(A0, led_state.caps_lock); + writePin(A1, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/acheron/austin/austin.h b/keyboards/acheron/austin/austin.h new file mode 100644 index 000000000000..6c066eb0465e --- /dev/null +++ b/keyboards/acheron/austin/austin.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K5I, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K3I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, K4G, K4H, K4I, \ + K50, K51, K52, K55, K59, K5A, K5B, K5C, K5E, K5F, K5G, K5H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, ___ }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3E, K3F, K3G, K3H, K3I }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, ___, K4F, K4G, K4H, K4I }, \ + { K50, K51, K52, ___, ___, K55, ___, ___, ___, K59, K5A, K5B, K5C, ___, K5E, K5F, K5G, K5H, K5I } \ +} diff --git a/keyboards/acheron/austin/chconf.h b/keyboards/acheron/austin/chconf.h new file mode 100644 index 000000000000..89388dd5a3d1 --- /dev/null +++ b/keyboards/acheron/austin/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/acheron/austin/config.h b/keyboards/acheron/austin/config.h new file mode 100644 index 000000000000..859c9051cd93 --- /dev/null +++ b/keyboards/acheron/austin/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2015 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0159 +#define PRODUCT_ID 0xA71C +#define DEVICE_VER 0x0001 +#define MANUFACTURER DriftMechanics +#define PRODUCT Austin +#define DESCRIPTION Austin Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 19 + +#define MATRIX_COL_PINS { B10, B11, B12, B13, B14, B15, A8, A9, A10, A5, A15, B3, B4, B5, B8, A3, C15, C14, F1 } +#define MATRIX_ROW_PINS { C13, A4, A7, B0, B1, B2 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN A6 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_PAL_MODE 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/acheron/austin/halconf.h b/keyboards/acheron/austin/halconf.h new file mode 100644 index 000000000000..38743e0904fd --- /dev/null +++ b/keyboards/acheron/austin/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/acheron/austin/info.json b/keyboards/acheron/austin/info.json new file mode 100755 index 000000000000..af857f97390f --- /dev/null +++ b/keyboards/acheron/austin/info.json @@ -0,0 +1,124 @@ +{ + "keyboard_name": "Austin", + "url": "", + "maintainer": "qmk", + "width": 19.75, + "height": 5.25, + "layouts": { + "LAYOUT_all": { + "key_count": 105, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Print Screen", "x":14, "y":0}, + {"label":"Scroll Lock", "x":15.25, "y":0}, + {"label":"Pause", "x":16.5, "y":0}, + {"label":"Home", "x":17.5, "y":0}, + {"label":"End", "x":18.5, "y":0}, + {"label":"Delete", "x":19.5, "y":0}, + + {"label":"`", "x":0, "y":1.25}, + {"label":"1", "x":1, "y":1.25}, + {"label":"2", "x":2, "y":1.25}, + {"label":"3", "x":3, "y":1.25}, + {"label":"4", "x":4, "y":1.25}, + {"label":"5", "x":5, "y":1.25}, + {"label":"6", "x":6, "y":1.25}, + {"label":"7", "x":7, "y":1.25}, + {"label":"8", "x":8, "y":1.25}, + {"label":"9", "x":9, "y":1.25}, + {"label":"0", "x":10, "y":1.25}, + {"label":"-", "x":11, "y":1.25}, + {"label":"=", "x":12, "y":1.25}, + {"label":"Backspace", "x":13, "y":1.25}, + {"label":"Backspace", "x":14, "y":1.25}, + {"label":"Insert", "x":15.25, "y":1.25}, + {"label":"Num Lock", "x":16.5, "y":1.25}, + {"label":"/", "x":17.5, "y":1.25}, + {"label":"*", "x":18.5, "y":1.25}, + {"label":"-", "x":19.5, "y":1.25}, + + {"label":"Tab", "x":0, "y":2.25, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.25}, + {"label":"W", "x":2.5, "y":2.25}, + {"label":"E", "x":3.5, "y":2.25}, + {"label":"R", "x":4.5, "y":2.25}, + {"label":"T", "x":5.5, "y":2.25}, + {"label":"Y", "x":6.5, "y":2.25}, + {"label":"U", "x":7.5, "y":2.25}, + {"label":"I", "x":8.5, "y":2.25}, + {"label":"O", "x":9.5, "y":2.25}, + {"label":"P", "x":10.5, "y":2.25}, + {"label":"[", "x":11.5, "y":2.25}, + {"label":"]", "x":12.5, "y":2.25}, + {"label":"\\", "x":13.5, "y":2.25, "w":1.5}, + {"label":"Page Up", "x":15.25, "y":2.25}, + {"label":"7", "x":16.5, "y":2.25}, + {"label":"8", "x":17.5, "y":2.25}, + {"label":"9", "x":18.5, "y":2.25}, + {"label":"+", "x":19.5, "y":2.25, "h":2}, + + {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, + {"label":"A", "x":1.75, "y":3.25}, + {"label":"S", "x":2.75, "y":3.25}, + {"label":"D", "x":3.75, "y":3.25}, + {"label":"F", "x":4.75, "y":3.25}, + {"label":"G", "x":5.75, "y":3.25}, + {"label":"H", "x":6.75, "y":3.25}, + {"label":"J", "x":7.75, "y":3.25}, + {"label":"K", "x":8.75, "y":3.25}, + {"label":"L", "x":9.75, "y":3.25}, + {"label":";", "x":10.75, "y":3.25}, + {"label":"'", "x":11.75, "y":3.25}, + {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, + {"label":"Page Down", "x":15.25, "y":3.25}, + {"label":"4", "x":16.5, "y":3.25}, + {"label":"5", "x":17.5, "y":3.25}, + {"label":"6", "x":18.5, "y":3.25}, + + {"label":"Shift", "x":0, "y":4.25, "w":1.25}, + {"label":"ISO \\", "x":1.25, "y":4.25}, + {"label":"Z", "x":2.25, "y":4.25}, + {"label":"X", "x":3.25, "y":4.25}, + {"label":"C", "x":4.25, "y":4.25}, + {"label":"V", "x":5.25, "y":4.25}, + {"label":"B", "x":6.25, "y":4.25}, + {"label":"N", "x":7.25, "y":4.25}, + {"label":"M", "x":8.25, "y":4.25}, + {"label":",", "x":9.25, "y":4.25}, + {"label":".", "x":10.25, "y":4.25}, + {"label":"/", "x":11.25, "y":4.25}, + {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":14.25, "y":4.5}, + {"label":"1", "x":16.5, "y":4.25}, + {"label":"2", "x":17.5, "y":4.25}, + {"label":"3", "x":18.5, "y":4.25}, + {"label":"Enter", "x":19.5, "y":4.25, "h":2}, + + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.25, "w":6.25}, + {"label":"Alt", "x":10, "y":5.25, "w":1.5}, + {"label":"Ctrl", "x":11.5, "y":5.25, "w":1.5}, + {"label":"Left", "x":13.25, "y":5.5}, + {"label":"Down", "x":14.25, "y":5.5}, + {"label":"Right", "x":15.25, "y":5.5}, + {"label":"0", "x":16.5, "y":5.25}, + {"label":"0", "x":17.5, "y":5.25}, + {"label":".", "x":18.5, "y":5.25} + ] + } + } +} diff --git a/keyboards/acheron/austin/keymaps/default/keymap.c b/keyboards/acheron/austin/keymaps/default/keymap.c new file mode 100755 index 000000000000..0dd5531a20ed --- /dev/null +++ b/keyboards/acheron/austin/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUS, KC_HOME, KC_END , KC_DEL , + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_INS , KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_P7 , KC_P8 , KC_P9 , KC_PPLS, + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGDN, KC_P4 , KC_P5 , KC_P6 , + KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT + ) +}; diff --git a/keyboards/acheron/austin/keymaps/via/keymap.c b/keyboards/acheron/austin/keymaps/via/keymap.c new file mode 100644 index 000000000000..d745542e0d24 --- /dev/null +++ b/keyboards/acheron/austin/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUS, KC_HOME, KC_END , KC_DEL , + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_INS , KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_P7 , KC_P8 , KC_P9 , KC_PPLS, + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGDN, KC_P4 , KC_P5 , KC_P6 , + KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT + ), + + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/acheron/austin/keymaps/via/rules.mk b/keyboards/acheron/austin/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/acheron/austin/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/acheron/austin/mcuconf.h b/keyboards/acheron/austin/mcuconf.h new file mode 100644 index 000000000000..048eb4df650d --- /dev/null +++ b/keyboards/acheron/austin/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/acheron/austin/readme.md b/keyboards/acheron/austin/readme.md new file mode 100644 index 000000000000..7d7357fd3739 --- /dev/null +++ b/keyboards/acheron/austin/readme.md @@ -0,0 +1,29 @@ +# Acheron Aχξρων 1800CP-SM-S-STM32-MX-TH-WI (codename "Austin") QMK firmware + +

+ +

+ +## Introduction + +This is the QMK firmware repository for the Austin, updated until [revision Alpha](https://github.com/Gondolindrim/Austin/releases/tag/Alpha). + +The AustinPCB is an Open-Hardware guidelines compliant PCB which files can be found at [this link](https://github.com/Gondolindrim/Austin). Its designer and maintainer is [Gondolindrim](https://github.com/Gondolindrim). + +The Austin keyboard is a collaboration between Gondolindrim, DriftingBunnies from DriftMechanics and PheonixStarr from Nightingale Studios. + +See the [IC page](https://geekhack.org/index.php?topic=100883) and the [GB page](https://geekhack.org/index.php?topic=102542) for further information. The GB was the only known way to obtain an Austin from the official vendor. + +## PCB Documentation + +See the [AcheronDocs](https://gondolindrim.github.io/AcheronDocs/austin/intro.html) page for the AustinPCB full documentation. You can also check the KiCad PCB files at the [Austin GitHub repository](https://github.com/Gondolindrim/Austin). + +Before using the files for personal or commercial use, please read the [Acheron Open-Hardware License V1.2](https://gondolindrim.github.io/AcheronDocs/license/license.html) under which the Austin PCB is published. + +## How to compile + +After setting up your build environment, you can compile the Austin default keymap by using: + + make acheron/austin:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/acheron/austin/rules.mk b/keyboards/acheron/austin/rules.mk new file mode 100644 index 000000000000..17e589ad7cf0 --- /dev/null +++ b/keyboards/acheron/austin/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 79d5903b6c5fff57712f02bc6fee888fcde414ce Mon Sep 17 00:00:00 2001 From: Wilba Date: Tue, 18 Feb 2020 12:54:13 +1100 Subject: [PATCH 313/331] dynamic keymap sanity check (#8181) --- quantum/dynamic_keymap.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 0d8ea56b74d5..f4120b11841b 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -30,6 +30,14 @@ # define DYNAMIC_KEYMAP_MACRO_COUNT 16 #endif +// This is the default EEPROM max address to use for dynamic keymaps. +// The default is the ATmega32u4 EEPROM max address. +// Explicitly override it if the keyboard uses a microcontroller with +// more EEPROM *and* it makes sense to increase it. +#ifndef DYNAMIC_KEYMAP_EEPROM_MAX_ADDR +# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1023 +#endif + // If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h, // default it start after VIA_EEPROM_CUSTOM_ADDR+VIA_EEPROM_CUSTOM_SIZE #ifndef DYNAMIC_KEYMAP_EEPROM_ADDR @@ -45,11 +53,19 @@ # define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)) #endif -// Dynamic macro uses up all remaining memory -// Assumes 1K EEPROM on ATMega32U4 -// Override for anything different +// Sanity check that dynamic keymaps fit in available EEPROM +// If there's not 100 bytes available for macros, then something is wrong. +// The keyboard should override DYNAMIC_KEYMAP_LAYER_COUNT to reduce it, +// or DYNAMIC_KEYMAP_EEPROM_MAX_ADDR to increase it, *only if* the microcontroller has +// more than the default. +#if DYNAMIC_KEYMAP_EEPROM_MAX_ADDR - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR < 100 +# error Dynamic keymaps are configured to use more EEPROM than is available. +#endif + +// Dynamic macros are stored after the keymaps and use what is available +// up to and including DYNAMIC_KEYMAP_EEPROM_MAX_ADDR. #ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE -# define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR) +# define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + 1) #endif uint8_t dynamic_keymap_get_layer_count(void) { return DYNAMIC_KEYMAP_LAYER_COUNT; } From 675ac4ac4a8e9d4a53eb947628a034bc78fcc553 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 17 Feb 2020 18:04:43 -0800 Subject: [PATCH 314/331] Centromere Configurator layout support and readme update (#8190) * Add Configurator layout data * update readme --- keyboards/centromere/info.json | 55 ++++++++++++++++++++++++++++++++++ keyboards/centromere/readme.md | 16 +++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 keyboards/centromere/info.json diff --git a/keyboards/centromere/info.json b/keyboards/centromere/info.json new file mode 100644 index 000000000000..aa9bcdce103e --- /dev/null +++ b/keyboards/centromere/info.json @@ -0,0 +1,55 @@ +{ + "keyboard_name": "Centromere", + "url": "", + "maintainer": "spe2", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Tab", "x":0, "y":0.25}, + {"label":"Q", "x":1, "y":0.25}, + {"label":"W", "x":2, "y":0.125}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0.125}, + {"label":"T", "x":5, "y":0.25}, + {"label":"Y", "x":8, "y":0.25}, + {"label":"U", "x":9, "y":0.125}, + {"label":"I", "x":10, "y":0}, + {"label":"O", "x":11, "y":0.125}, + {"label":"P", "x":12, "y":0.25}, + {"label":"Backspace", "x":13, "y":0.25}, + {"label":"LCtrl", "x":0, "y":1.25}, + {"label":"A", "x":1, "y":1.25}, + {"label":"S", "x":2, "y":1.125}, + {"label":"D", "x":3, "y":1}, + {"label":"F", "x":4, "y":1.125}, + {"label":"G", "x":5, "y":1.25}, + {"label":"H", "x":8, "y":1.25}, + {"label":"J", "x":9, "y":1.125}, + {"label":"K", "x":10, "y":1}, + {"label":"L", "x":11, "y":1.125}, + {"label":";", "x":12, "y":1.25}, + {"label":"'", "x":13, "y":1.25}, + {"label":"Shift", "x":0, "y":2.25}, + {"label":"Z", "x":1, "y":2.25}, + {"label":"X", "x":2, "y":2.125}, + {"label":"C", "x":3, "y":2}, + {"label":"V", "x":4, "y":2.125}, + {"label":"B", "x":5, "y":2.25}, + {"label":"N", "x":8, "y":2.25}, + {"label":"M", "x":9, "y":2.125}, + {"label":",", "x":10, "y":2}, + {"label":".", "x":11, "y":2.125}, + {"label":"/", "x":12, "y":2.25}, + {"label":"Enter", "x":13, "y":2.25}, + {"label":"LGUI", "x":3.5, "y":3.125}, + {"label":"MO(_FN)", "x":4.5, "y":3.25}, + {"label":"Space", "x":5.5, "y":3.375}, + {"label":"Space", "x":7.5, "y":3.375}, + {"label":"MO(_NUM)", "x":8.5, "y":3.25}, + {"label":"RAlt", "x":9.5, "y":3.125} + ] + } + } +} diff --git a/keyboards/centromere/readme.md b/keyboards/centromere/readme.md index 547ea60ddb86..0667486e8472 100644 --- a/keyboards/centromere/readme.md +++ b/keyboards/centromere/readme.md @@ -1 +1,15 @@ -QMK Firmware for the Centromere keyboard. Centromere is a custom wireless ergonomic keyboard, with 6x3 columnar staggered keys and a 3 key thumb cluster. Centromere keyboards can utilize hot-swap Kailh sockets for MX switches, and either Choc or MX switches can be permanently soldered. There are two types of receiver that use two different MCU for the Centromere board, and you can define which one you are using by defining your rules.mk file appropriately, as shown in the default keymaps. +# Centromere + +![Centromere](https://i.redd.it/sg9unjs9y9041.jpg) + +Centromere is a custom wireless ergonomic keyboard, with 6x3 columnar staggered keys and a 3 key thumb cluster. Centromere keyboards can utilize hot-swap Kailh sockets for MX switches, and either Choc or MX switches can be permanently soldered. There are two types of receiver that use two different MCU for the Centromere board, and you can define which one you are using by defining your rules.mk file appropriately, as shown in the default keymaps. + +* Keyboard Maintainer: [spe2](https://github.com/spe2) +* Hardware Supported: Centromere PCBs +* Hardware Availability: [Southpaw Design](https://southpawdesign.net/products/centromere-group-buy) + +Make example for this keyboard (after setting up your build environment): + + make centromere:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From 0f500eb336690f5052cb76a7ee77c2c18c20a779 Mon Sep 17 00:00:00 2001 From: Jumail Mundekkat Date: Tue, 18 Feb 2020 14:05:22 +1100 Subject: [PATCH 315/331] MxSS RGB Handler Touchup (#8105) * Minor fix to improve front LED brightness config * Updated rgblight.c --- keyboards/mxss/mxss_frontled.c | 18 ++++++++++++++++-- keyboards/mxss/rgblight.c | 20 ++++++++++++++++++++ keyboards/mxss/rgblight.h | 6 ++++++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/keyboards/mxss/mxss_frontled.c b/keyboards/mxss/mxss_frontled.c index 3f19747d283f..3c4309f0702f 100644 --- a/keyboards/mxss/mxss_frontled.c +++ b/keyboards/mxss/mxss_frontled.c @@ -183,7 +183,14 @@ void fled_val_increase(void) // Update stored config fled_update_conf(); - rgblight_set(); + + // Update and set LED state + if (fled_mode == FLED_INDI) { + fled_layer_update(layer_state); + fled_lock_update(host_keyboard_led_state()); + } else { + rgblight_set(); + } } void fled_val_decrease(void) @@ -196,7 +203,14 @@ void fled_val_decrease(void) // Update stored config fled_update_conf(); - rgblight_set(); + + // Update and set LED state + if (fled_mode == FLED_INDI) { + fled_layer_update(layer_state); + fled_lock_update(host_keyboard_led_state()); + } else { + rgblight_set(); + } } void fled_layer_update(layer_state_t state) { diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index 9e17510b590a..ec4d70e17cd0 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -182,6 +182,10 @@ void eeconfig_update_rgblight(uint32_t val) { #endif } +void eeconfig_update_rgblight_current(void) { + eeconfig_update_rgblight(rgblight_config.raw); +} + void eeconfig_update_rgblight_default(void) { rgblight_config.enable = 1; rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; @@ -533,6 +537,22 @@ void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_ee void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); } +uint8_t rgblight_get_speed(void) { return rgblight_config.speed; } + +void rgblight_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { + rgblight_config.speed = speed; + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + dprintf("rgblight set speed [EEPROM]: %u\n", rgblight_config.speed); + } else { + dprintf("rgblight set speed [NOEEPROM]: %u\n", rgblight_config.speed); + } +} + +void rgblight_set_speed(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, true); } + +void rgblight_set_speed_noeeprom(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, false); } + uint8_t rgblight_get_hue(void) { return rgblight_config.hue; } uint8_t rgblight_get_sat(void) { return rgblight_config.sat; } diff --git a/keyboards/mxss/rgblight.h b/keyboards/mxss/rgblight.h index e3aa098e4db1..f6746e50ffb9 100644 --- a/keyboards/mxss/rgblight.h +++ b/keyboards/mxss/rgblight.h @@ -233,6 +233,11 @@ void rgblight_decrease_speed(void); void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); +/* effect speed */ +uint8_t rgblight_get_speed(void); +void rgblight_set_speed(uint8_t speed); +void rgblight_set_speed_noeeprom(uint8_t speed); + /* query */ uint8_t rgblight_get_mode(void); uint8_t rgblight_get_hue(void); @@ -245,6 +250,7 @@ uint32_t rgblight_read_dword(void); void rgblight_update_dword(uint32_t dword); uint32_t eeconfig_read_rgblight(void); void eeconfig_update_rgblight(uint32_t val); +void eeconfig_update_rgblight_current(void); void eeconfig_update_rgblight_default(void); void eeconfig_debug_rgblight(void); From 8225b172b984b18510e856c81f75ec137e0abc19 Mon Sep 17 00:00:00 2001 From: gtips <51393966+gtips@users.noreply.github.com> Date: Tue, 18 Feb 2020 13:34:23 +0900 Subject: [PATCH 316/331] Change the image photo of /keyboards/reviung41/readme.md (#8195) * Update readme.md Change the image photo of readme.md. --- keyboards/reviung41/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/reviung41/readme.md b/keyboards/reviung41/readme.md index 49b27bd94f0c..c8f51463850b 100644 --- a/keyboards/reviung41/readme.md +++ b/keyboards/reviung41/readme.md @@ -1,6 +1,6 @@ # reviung41 -![reviung41](https://github.com/gtips/reviung/blob/master/reviung41/image/REVIUNG41-prototype.jpg) +![reviung41](https://github.com/gtips/reviung/blob/master/reviung41/image/reviung41-01.jpg) The REVIUNG41 is 41-key column staggered keyboard. From 1566f0a9978b7799741d9499228d525aa5019258 Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Tue, 18 Feb 2020 21:05:20 +0100 Subject: [PATCH 317/331] Made windows driver installation accept y as All to allow CI (#8189) * Made windows driver installation accept y as all to allow CI * Fix some formatting * Made None default --- util/win_shared_install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/win_shared_install.sh b/util/win_shared_install.sh index 7ad000bfc40e..1265cb027f54 100755 --- a/util/win_shared_install.sh +++ b/util/win_shared_install.sh @@ -37,7 +37,7 @@ function install_utils { function install_drivers { pushd "$download_dir" cp -f "$dir/drivers.txt" . - echo + echo cmd.exe //c "qmk_driver_installer.exe $1 $2 drivers.txt" popd > /dev/null } @@ -62,19 +62,19 @@ fi while true; do echo echo "Which USB drivers do you want to install?" - echo "(A)all - All supported drivers will be installed" + echo "(A)ll - All supported drivers will be installed" echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode)" echo " will be installed" - echo "(F)force - Like all, but will also override existing drivers for connected" + echo "(F)orce - Like all, but will also override existing drivers for connected" echo " keyboards" echo "(N)one - No drivers will be installed," echo " flashing your keyboard will most likely not work" - read -p "(A/C/F/N)? " res + read -p "(a/c/f/N)? " res case $res in - [Aa]* ) install_drivers --all; break;; + [AaYy]* ) install_drivers --all; break;; [Cc]* ) install_drivers; break;; [Ff]* ) install_drivers --all --force; break;; - [Nn]* ) break;; + [Nn]* | "" ) break;; * ) echo "Invalid answer";; esac done From 419002a63b1824e6da61d802bcb6f6ab5b35def6 Mon Sep 17 00:00:00 2001 From: "Blake C. Lewis" Date: Wed, 19 Feb 2020 03:12:52 -0600 Subject: [PATCH 318/331] [Keyboard] KC60SE cleanup (#8171) * coding style cleanup, enable/disable misconfigured/broken features * add SCLN missing, compile with backlight PWM warning * edit json * new info.json from KLE * new info.json from KLE using QMK converter * changes notes * notes in pull request * missing line in comments * line wrap * Update keyboards/kc60se/config.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/keymaps/default/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * comment back in rules.mk * add 2 iso layouts and keymaps, 1 ansi kemap, compiled and tested * keymaps and info * Delete keymap.c not ready, I need to get a few iso characters corrected * Delete keymap.c not ready, need to get a few iso character define correctly * Update info.json Bspc to Backspace * no unicode * gui_on and gui_off in readme * Update keyboards/kc60se/rules.mk Co-Authored-By: fauxpark * remove is_command * Update keyboards/kc60se/config.h remove comment Co-Authored-By: fauxpark * Update keyboards/kc60se/config.h Co-Authored-By: fauxpark * Update keyboards/kc60se/readme.md Co-Authored-By: fauxpark * remove \\ in keymaps * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * set led pin b2 to output mode in matrix_init_kb(), toggle it in led_update_kb() * Update config.h I had commented FORCE_NKRO out.. WHy did it com back? Co-authored-by: Check your git settings! Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan --- keyboards/kc60se/config.h | 25 +++---- keyboards/kc60se/info.json | 74 ++++++++++++++----- keyboards/kc60se/kc60se.c | 20 ++++-- keyboards/kc60se/kc60se.h | 82 +++++++++++++--------- keyboards/kc60se/keymaps/60_ansi/keymap.c | 66 +++++++++++++++++ keyboards/kc60se/keymaps/default/config.h | 19 ----- keyboards/kc60se/keymaps/default/keymap.c | 50 ++++++------- keyboards/kc60se/keymaps/default/readme.md | 47 ++++++++++--- keyboards/kc60se/readme.md | 60 ++++++++++++++-- keyboards/kc60se/rules.mk | 15 ++-- 10 files changed, 314 insertions(+), 144 deletions(-) create mode 100644 keyboards/kc60se/keymaps/60_ansi/keymap.c delete mode 100644 keyboards/kc60se/keymaps/default/config.h diff --git a/keyboards/kc60se/config.h b/keyboards/kc60se/config.h index 5fffe6114510..6e23e2ce2ce1 100644 --- a/keyboards/kc60se/config.h +++ b/keyboards/kc60se/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -24,7 +23,7 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0000 #define DEVICE_VER 0x0001 -#define MANUFACTURER NPKC +#define MANUFACTURER Unknown #define PRODUCT kc60se #define DESCRIPTION A custom 60% keyboard @@ -32,32 +31,30 @@ along with this program. If not, see . #define MATRIX_ROWS 5 #define MATRIX_COLS 14 -/* - * Keyboard Matrix Assignments - */ - +/* * Keyboard Matrix Assignments */ #define UNUSED_PINS #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } + /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN F5 -// #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 6 +// #define BACKLIGHT_BREATHING + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE +// #define LOCKING_SUPPORT_ENABLE + /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +// #define LOCKING_RESYNC_ENABLE /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. * This is userful for the Windows task manager shortcut (ctrl+shift+esc). @@ -83,7 +80,7 @@ along with this program. If not, see . * power-up. * */ -//#define FORCE_NKRO +// #define FORCE_NKRO /* * Magic Key Options @@ -173,5 +170,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/kc60se/info.json b/keyboards/kc60se/info.json index 2951e45685fd..de61cb717aaf 100644 --- a/keyboards/kc60se/info.json +++ b/keyboards/kc60se/info.json @@ -1,20 +1,58 @@ { - "keyboard_name": "kc60se", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - - "LAYOUT_60_ansi_split_bs_rshift": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - - "LAYOUT_60_ansi": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - } - } + "keyboard_name": "kc60se", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "key_count": 65, + "layout": [ + {"label":"Esc", "x":0, "y":0},{"label":"!", "x":1, "y":0},{"label":"@", "x":2, "y":0},{"label":"#", "x":3, "y":0},{"label":"$", "x":4, "y":0},{"label":"%", "x":5, "y":0},{"label":"^", "x":6, "y":0},{"label":"&", "x":7, "y":0},{"label":"*", "x":8, "y":0},{"label":"(", "x":9, "y":0},{"label":")", "x":10, "y":0},{"label":"_", "x":11, "y":0},{"label":"+", "x":12, "y":0},{"label":"|", "x":13, "y":0},{"label":"~", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5},{"label":"Q", "x":1.5, "y":1},{"label":"W", "x":2.5, "y":1},{"label":"E", "x":3.5, "y":1},{"label":"R", "x":4.5, "y":1},{"label":"T", "x":5.5, "y":1},{"label":"Y", "x":6.5, "y":1},{"label":"U", "x":7.5, "y":1},{"label":"I", "x":8.5, "y":1},{"label":"O", "x":9.5, "y":1},{"label":"P", "x":10.5, "y":1},{"label":"{", "x":11.5, "y":1},{"label":"}", "x":12.5, "y":1},{"label":"Backspace", "x":13.5, "y":1, "w":1.5}, + {"label":"Control", "x":0, "y":2, "w":1.75},{"label":"A", "x":1.75, "y":2},{"label":"S", "x":2.75, "y":2},{"label":"D", "x":3.75, "y":2},{"label":"F", "x":4.75, "y":2},{"label":"G", "x":5.75, "y":2},{"label":"H", "x":6.75, "y":2},{"label":"J", "x":7.75, "y":2},{"label":"K", "x":8.75, "y":2},{"label":"L", "x":9.75, "y":2},{"label":";", "x":10.75, "y":2},{"label":"'", "x":11.75, "y":2},{"label":"#", "x":12.75, "y":2},{"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"Shift", "x":0, "y":3, "w":1.25},{"label":"|", "x":1.25, "y":3},{"label":"Z", "x":2.25, "y":3},{"label":"X", "x":3.25, "y":3},{"label":"C", "x":4.25, "y":3},{"label":"V", "x":5.25, "y":3},{"label":"B", "x":6.25, "y":3},{"label":"N", "x":7.25, "y":3},{"label":"M", "x":8.25, "y":3},{"label":"<", "x":9.25, "y":3},{"label":">", "x":10.25, "y":3},{"label":"?", "x":11.25, "y":3},{"label":"Shift", "x":12.25, "y":3, "w":1.75},{"label":"Fn", "x":14, "y":3}, + {"label":"Gui", "x":0, "y":4, "w":1.25},{"label":"Alt", "x":1.25, "y":4, "w":1.25},{"label":"Fn", "x":2.5, "y":4, "w":1.25},{"label":" ", "x":3.75, "y":4, "w":6.25},{"label":"Alt", "x":10, "y":4, "w":1.25},{"label":"Gui", "x":11.25, "y":4, "w":1.25},{"label":"Win", "x":12.5, "y":4, "w":1.25},{"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_ansi": { + "key_count": 61, + "layout": [ + {"label":"Esc", "x":0, "y":0},{"label":"!", "x":1, "y":0},{"label":"@", "x":2, "y":0},{"label":"#", "x":3, "y":0},{"label":"$", "x":4, "y":0},{"label":"%", "x":5, "y":0},{"label":"^", "x":6, "y":0},{"label":"&", "x":7, "y":0},{"label":"*", "x":8, "y":0},{"label":"(", "x":9, "y":0},{"label":")", "x":10, "y":0},{"label":"_", "x":11, "y":0},{"label":"+", "x":12, "y":0},{"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5},{"label":"Q", "x":1.5, "y":1},{"label":"W", "x":2.5, "y":1},{"label":"E", "x":3.5, "y":1},{"label":"R", "x":4.5, "y":1},{"label":"T", "x":5.5, "y":1},{"label":"Y", "x":6.5, "y":1},{"label":"U", "x":7.5, "y":1},{"label":"I", "x":8.5, "y":1},{"label":"O", "x":9.5, "y":1},{"label":"P", "x":10.5, "y":1},{"label":"{", "x":11.5, "y":1},{"label":"}", "x":12.5, "y":1},{"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"CapsLock", "x":0, "y":2, "w":1.75},{"label":"A", "x":1.75, "y":2},{"label":"S", "x":2.75, "y":2},{"label":"D", "x":3.75, "y":2},{"label":"F", "x":4.75, "y":2},{"label":"G", "x":5.75, "y":2},{"label":"H", "x":6.75, "y":2},{"label":"J", "x":7.75, "y":2},{"label":"K", "x":8.75, "y":2},{"label":"L", "x":9.75, "y":2},{"label":";", "x":10.75, "y":2},{"label":"'", "x":11.75, "y":2},{"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25},{"label":"Z", "x":2.25, "y":3},{"label":"X", "x":3.25, "y":3},{"label":"C", "x":4.25, "y":3},{"label":"V", "x":5.25, "y":3},{"label":"B", "x":6.25, "y":3},{"label":"N", "x":7.25, "y":3},{"label":"M", "x":8.25, "y":3},{"label":"<", "x":9.25, "y":3},{"label":">", "x":10.25, "y":3},{"label":"?", "x":11.25, "y":3},{"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25},{"label":"Gui", "x":1.25, "y":4, "w":1.25},{"label":"Alt", "x":2.5, "y":4, "w":1.25},{"label":" ", "x":3.75, "y":4, "w":6.25},{"label":"Alt", "x":10, "y":4, "w":1.25},{"label":"Gui", "x":11.25, "y":4, "w":1.25},{"label":"Win", "x":12.5, "y":4, "w":1.25},{"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso": { + "key_count": 62, + "layout": [ + {"label":"Esc", "x":0, "y":0},{"label":"!", "x":1, "y":0},{"label":"@", "x":2, "y":0},{"label":"#", "x":3, "y":0},{"label":"$", "x":4, "y":0},{"label":"%", "x":5, "y":0},{"label":"^", "x":6, "y":0},{"label":"&", "x":7, "y":0},{"label":"*", "x":8, "y":0},{"label":"(", "x":9, "y":0},{"label":")", "x":10, "y":0},{"label":"_", "x":11, "y":0},{"label":"+", "x":12, "y":0},{"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5},{"label":"Q", "x":1.5, "y":1},{"label":"W", "x":2.5, "y":1},{"label":"E", "x":3.5, "y":1},{"label":"R", "x":4.5, "y":1},{"label":"T", "x":5.5, "y":1},{"label":"Y", "x":6.5, "y":1},{"label":"U", "x":7.5, "y":1},{"label":"I", "x":8.5, "y":1},{"label":"O", "x":9.5, "y":1},{"label":"P", "x":10.5, "y":1},{"label":"{", "x":11.5, "y":1},{"label":"}", "x":12.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75},{"label":"A", "x":1.75, "y":2},{"label":"S", "x":2.75, "y":2},{"label":"D", "x":3.75, "y":2},{"label":"F", "x":4.75, "y":2},{"label":"G", "x":5.75, "y":2},{"label":"H", "x":6.75, "y":2},{"label":"J", "x":7.75, "y":2},{"label":"K", "x":8.75, "y":2},{"label":"L", "x":9.75, "y":2},{"label":":", "x":10.75, "y":2},{"label":"@", "x":11.75, "y":2},{"label":"#", "x":12.75, "y":2},{"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25},{"label":"|", "x":1.25, "y":3},{"label":"Z", "x":2.25, "y":3},{"label":"X", "x":3.25, "y":3},{"label":"C", "x":4.25, "y":3},{"label":"V", "x":5.25, "y":3},{"label":"B", "x":6.25, "y":3},{"label":"N", "x":7.25, "y":3},{"label":"M", "x":8.25, "y":3},{"label":"<", "x":9.25, "y":3},{"label":">", "x":10.25, "y":3},{"label":"?", "x":11.25, "y":3},{"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25},{"label":"Win", "x":1.25, "y":4, "w":1.25},{"label":"Alt", "x":2.5, "y":4, "w":1.25},{"x":3.75, "y":4, "w":6.25},{"label":"AltGr", "x":10, "y":4, "w":1.25},{"label":"Win", "x":11.25, "y":4, "w":1.25},{"label":"Menu", "x":12.5, "y":4, "w":1.25},{"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count": 63, + "layout": [ + {"label":"Esc~", "x":0, "y":0},{"label":"!", "x":1, "y":0},{"label":"@", "x":2, "y":0},{"label":"#", "x":3, "y":0},{"label":"$", "x":4, "y":0},{"label":"%", "x":5, "y":0},{"label":"^", "x":6, "y":0},{"label":"&", "x":7, "y":0},{"label":"*", "x":8, "y":0},{"label":"(", "x":9, "y":0},{"label":")", "x":10, "y":0},{"label":"_", "x":11, "y":0},{"label":"+", "x":12, "y":0},{"label":"|", "x":13, "y":0},{"label":"~", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5},{"label":"Q", "x":1.5, "y":1},{"label":"W", "x":2.5, "y":1},{"label":"E", "x":3.5, "y":1},{"label":"R", "x":4.5, "y":1},{"label":"T", "x":5.5, "y":1},{"label":"Y", "x":6.5, "y":1},{"label":"U", "x":7.5, "y":1},{"label":"I", "x":8.5, "y":1},{"label":"O", "x":9.5, "y":1},{"label":"P", "x":10.5, "y":1},{"label":" {", "x":11.5, "y":1},{"label":"}", "x":12.5, "y":1},{"label":"Backspace", "x":13.5, "y":1, "w":1.5}, + {"label":"Control", "x":0, "y":2, "w":1.75},{"label":"A", "x":1.75, "y":2},{"label":"S", "x":2.75, "y":2},{"label":"D", "x":3.75, "y":2},{"label":"F", "x":4.75, "y":2},{"label":"G", "x":5.75, "y":2},{"label":"H", "x":6.75, "y":2},{"label":"J", "x":7.75, "y":2},{"label":"K", "x":8.75, "y":2},{"label":"L", "x":9.75, "y":2},{"label":";", "x":10.75, "y":2},{"label":"'", "x":11.75, "y":2},{"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25},{"label":"Z", "x":2.25, "y":3},{"label":"X", "x":3.25, "y":3},{"label":"C", "x":4.25, "y":3},{"label":"V", "x":5.25, "y":3},{"label":"B", "x":6.25, "y":3},{"label":"N", "x":7.25, "y":3},{"label":"M", "x":8.25, "y":3},{"label":"<", "x":9.25, "y":3},{"label":">", "x":10.25, "y":3},{"label":"?", "x":11.25, "y":3},{"label":"Shift", "x":12.25, "y":3, "w":1.75},{"label":"Fn", "x":14, "y":3}, + {"label":"Gui", "x":0, "y":4, "w":1.25},{"label":"Alt", "x":1.25, "y":4, "w":1.25},{"label":"Fn", "x":2.5, "y":4, "w":1.25},{"label":" ", "x":3.75, "y":4, "w":6.25},{"label":"Alt", "x":10, "y":4, "w":1.25},{"label":"Gui", "x":11.25, "y":4, "w":1.25},{"label":"Win", "x":12.5, "y":4, "w":1.25},{"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "key_count": 64, + "layout": [ + {"label":"Esc", "x":0, "y":0},{"label":"!", "x":1, "y":0},{"label":"@", "x":2, "y":0},{"label":"#", "x":3, "y":0},{"label":"$", "x":4, "y":0},{"label":"%", "x":5, "y":0},{"label":"^", "x":6, "y":0},{"label":"&", "x":7, "y":0},{"label":"*", "x":8, "y":0},{"label":"(", "x":9, "y":0},{"label":")", "x":10, "y":0},{"label":"_", "x":11, "y":0},{"label":"+", "x":12, "y":0},{"label":"`", "x":13, "y":0},{"label":"Backspace", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5},{"label":"Q", "x":1.5, "y":1},{"label":"W", "x":2.5, "y":1},{"label":"E", "x":3.5, "y":1},{"label":"R", "x":4.5, "y":1},{"label":"T", "x":5.5, "y":1},{"label":"Y", "x":6.5, "y":1},{"label":"U", "x":7.5, "y":1},{"label":"I", "x":8.5, "y":1},{"label":"O", "x":9.5, "y":1},{"label":"P", "x":10.5, "y":1},{"label":"{", "x":11.5, "y":1},{"label":"}", "x":12.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75},{"label":"A", "x":1.75, "y":2},{"label":"S", "x":2.75, "y":2},{"label":"D", "x":3.75, "y":2},{"label":"F", "x":4.75, "y":2},{"label":"G", "x":5.75, "y":2},{"label":"H", "x":6.75, "y":2},{"label":"J", "x":7.75, "y":2},{"label":"K", "x":8.75, "y":2},{"label":"L", "x":9.75, "y":2},{"label":":", "x":10.75, "y":2},{"label":"@", "x":11.75, "y":2},{"label":"#", "x":12.75, "y":2},{"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25},{"label":"|", "x":1.25, "y":3},{"label":"Z", "x":2.25, "y":3},{"label":"X", "x":3.25, "y":3},{"label":"C", "x":4.25, "y":3},{"label":"V", "x":5.25, "y":3},{"label":"B", "x":6.25, "y":3},{"label":"N", "x":7.25, "y":3},{"label":"M", "x":8.25, "y":3},{"label":"<", "x":9.25, "y":3},{"label":">", "x":10.25, "y":3},{"label":"?", "x":11.25, "y":3},{"label":"Shift", "x":12.25, "y":3, "w":1.75},{"label":"Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25},{"label":"Win", "x":1.25, "y":4, "w":1.25},{"label":"Alt", "x":2.5, "y":4, "w":1.25},{"x":3.75, "y":4, "w":6.25},{"label":"AltGr", "x":10, "y":4, "w":1.25},{"label":"Win", "x":11.25, "y":4, "w":1.25},{"label":"Menu", "x":12.5, "y":4, "w":1.25},{"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } } diff --git a/keyboards/kc60se/kc60se.c b/keyboards/kc60se/kc60se.c index 2bf0b1b9252b..e484d74db8d6 100644 --- a/keyboards/kc60se/kc60se.c +++ b/keyboards/kc60se/kc60se.c @@ -13,12 +13,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "kc60se.h" -extern inline void kc60se_caps_led_on(void); -extern inline void kc60se_caps_led_off(void); +#include QMK_KEYBOARD_H + +void matrix_init_kb(void){ + setPinOutput(B2); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B2, !led_state.caps_lock); + } + return res; +} -void led_set_kb(uint8_t usb_led) { - (usb_led & (1<. */ -#ifndef KC60SE_H -#define KC60SE_H + +#pragma once #include "quantum.h" -// readability #define ___ KC_NO -inline void kc60se_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void kc60se_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } - -/* kc60se keymap definition macro - * K2C, K31 and K3C are keys for ISO - * This is the row/column wiring, which different from the physical layout. - */ -// All pads defined in logical layout. The ___ in this section are padless. -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +// clang-format off +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ @@ -43,13 +35,12 @@ inline void kc60se_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } { K40, K41, K42, ___, ___, K45, ___, ___, ___, K49, K4A, K4B, K4C, K4D } \ } -/* ANSI */ #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ @@ -58,17 +49,12 @@ inline void kc60se_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } { K40, K41, K42, ___, ___, K45, ___, ___, ___, ___, K4A, K4B, K4C, K4D } \ } -/* HHKB - * K2C & K31 are represented as ___, otherwise this is - * the best representation of the physical layout, (K49 on top right). - * The ___s on the space row do not have pads - */ #define LAYOUT_60_ansi_split_bs_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ @@ -76,6 +62,32 @@ inline void kc60se_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, ___, ___, K45, ___, ___, ___, K49, K4A, K4B, K4C, K4D } \ } +#define LAYOUT_60_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___ }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, ___, K3D }, \ + { K40, K41, K42, ___, ___, K45, ___, ___, ___, ___, K4A, K4B, K4C, K4D } \ +} - -#endif +#define LAYOUT_60_iso_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, k49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___ }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, ___, ___, K45, ___, ___, ___, k49, K4A, K4B, K4C, K4D } \ +} +#define LAYOUT LAYOUT_all +// clang-format on diff --git a/keyboards/kc60se/keymaps/60_ansi/keymap.c b/keyboards/kc60se/keymaps/60_ansi/keymap.c new file mode 100644 index 000000000000..d59a8b95d209 --- /dev/null +++ b/keyboards/kc60se/keymaps/60_ansi/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2020 Blake C. Lewis + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +/* ANSI */ + +enum my_layers { _BL, _FL }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [_BL] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT, MO(_FL), KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [_FL] = LAYOUT_60_ansi( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, _______, _______, _______, _______, BL_ON, BL_STEP, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, KC_END, KC_PGDN, KC_DOWN, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) + // clang-format on +}; + +/* BL + *.--------------------------------------------------------------------------. + *| esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |backspace| + *|--------------------------------------------------------------------------| + *| tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | + *|--------------------------------------------------------------------------| + *| caps | a | s | d | f | g | h | j | k | l | ; | ' | enter | + *|--------------------------------------------------------------------------| + *| lshift | z | x | c | v | b | n | m | , | . | / | rshift | + *|--------------------------------------------------------------------------| + *| lgui| lalt|mo(FL)| space |ralt |rgui | app |rctl | + *'--------------------------------------------------------------------------' + * FL + *.--------------------------------------------------------------------------. + *| | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10| f11| f12| del | + *|--------------------------------------------------------------------------| + *| | | | | | |blon|blup| psc|slck|paus| up | |insert | + *|--------------------------------------------------------------------------| + *| | | | | | | | |home|pgup|left|rght| | + *|--------------------------------------------------------------------------| + *| |vol-|vol+|mute| | |NKRO| |end |pgdn|down| | + *|--------------------------------------------------------------------------| + *| | | | | | | | | + *'--------------------------------------------------------------------------' + */ diff --git a/keyboards/kc60se/keymaps/default/config.h b/keyboards/kc60se/keymaps/default/config.h deleted file mode 100644 index 4496c5910061..000000000000 --- a/keyboards/kc60se/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/kc60se/keymaps/default/keymap.c b/keyboards/kc60se/keymaps/default/keymap.c index aecf0b5a1637..77ac63aee9d7 100644 --- a/keyboards/kc60se/keymaps/default/keymap.c +++ b/keyboards/kc60se/keymaps/default/keymap.c @@ -13,16 +13,34 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#define _DEFAULT 0 -#define _FN 1 +/* Happy Hacker Keyboard */ + +enum layer_names { _BL, _FL }; -#define xxxxxx KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* hhkb - layer 0 - * split_bs/split_rshift/+ctrl-caplock +// clang-format off + [_BL] = LAYOUT_60_ansi_split_bs_rshift( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), + KC_NO, KC_LALT, MO(_FL), KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_NO + ), + [_FL] = LAYOUT_60_ansi_split_bs_rshift( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_INS, + KC_CAPS, BL_ON, BL_STEP, _______, _______, NK_TOGG, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_DEL, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, KC_MSTP, _______, _______ + ) +// clang-format on +}; + +/* BL *,--------------------------------------------------------------------------. *| esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | *|--------------------------------------------------------------------------+ @@ -34,21 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { *|--------------------------------------------------------------------------+ * |lalt| fn1 | space | rgui |ralt| * `-----------------------------------------------------------' - */ - [_DEFAULT] = LAYOUT_60_ansi_split_bs_rshift( /* Basic QWERTY */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \ - xxxxxx, KC_LALT, MO(_FN), KC_SPC, xxxxxx, KC_RGUI, KC_RALT, xxxxxx \ - ), - -/* split_bs/split_rshift/+ctrl-caplock - Layer 1 - * + * FL *,--------------------------------------------------------------------------. *| | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10| f11| f12| | ins| *|--------------------------------------------------------------------------+ - *| caps |blon|blup| | | | | | psc|slck|paus| up | | del | + *| caps |blon|blup| | |NKRO| | | psc|slck|paus| up | | del | *|--------------------------------------------------------------------------+ *| |vol-|vol+|mute| | | * | / |home|pgup|left|rght| penter | *|--------------------------------------------------------------------------+ @@ -57,11 +65,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | stop | | * `----------------------------------------------------------' */ - [_FN] = LAYOUT_60_ansi_split_bs_rshift( /* Layer 1 */ - xxxxxx, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, xxxxxx,KC_INS, \ - KC_CAPS, BL_ON, BL_STEP, xxxxxx, xxxxxx, xxxxxx, xxxxxx, xxxxxx, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, xxxxxx, KC_DEL, \ - xxxxxx, KC_VOLD, KC_VOLU, KC_MUTE, xxxxxx, xxxxxx, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,xxxxxx, \ - xxxxxx, KC_MPRV, KC_MPLY, KC_MNXT, xxxxxx, xxxxxx, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, xxxxxx, xxxxxx, \ - xxxxxx, xxxxxx, xxxxxx, xxxxxx, xxxxxx, KC_MSTP, xxxxxx, xxxxxx \ - ) -}; diff --git a/keyboards/kc60se/keymaps/default/readme.md b/keyboards/kc60se/keymaps/default/readme.md index 901428686c09..85b8d0147b94 100644 --- a/keyboards/kc60se/keymaps/default/readme.md +++ b/keyboards/kc60se/keymaps/default/readme.md @@ -1,9 +1,32 @@ -# The default keymap for kc60se +# HHKB: The default keymap for KC60SE -# hhkb-qwerty-wkl -======================== - ### layer 0 - default - ``` +## Happy Hacker Keyboard (US layout): +* [Esc] moves down replacing [ ~ ] +* 2u [Backspace] split into [ \ ] and [ ~ ] +* move [Backspace] down a row to replace [ \ ] +* a dip switch toggles the default: Delete or Backspace, [Fn ] invokes non-default +* 2.75u [ Shift ] split into 1.75u [Shift] & [Fn ] +* Control replaces Caplock, [FN ] [ Tab ] toggles Caplock, led under Control toggles w/Caplock +* the botom row is configurable, the Meta key could be assigned a few values with dip switches, +* HHKB Lite2 + +``` + |Fn |Alt |Meta| Space |Meta|Alt | + |Fn |Meta|Alt | Space |ALt |Meta| +``` +* HHKB Professional2 + +``` + |Alt |Fn | Space |Meta|Alt | + |Meta|Alt | Space |Alt |Meta| + |Fn |Alt | Space |Alt |Meta| +``` +* this PCB and keymap will support up to 8 keys on the bottom row with minimal editing. + + +## Base Layer + +``` ,--------------------------------------------------------------------------. | esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | |--------------------------------------------------------------------------| @@ -15,13 +38,16 @@ `--------------------------------------------------------------------------' |lalt| fn0 | space | rgui |ralt| `------------------------------------------------------------' - ``` - ### layer 1 - Q/W backlight controls: BL_ON & BL_STEP - ``` +``` +## Function Layer +* Extra keys: (mprv, mply, mnxt) +* I think the number pad * / - and + did not come on the Professional, but did on Lite + +``` ,--------------------------------------------------------------------------. | | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10| f11| f12| | ins| |--------------------------------------------------------------------------| - | caps |blon|blup| | | | | | psc|slck|paus| up | | del | + | caps |blon|blup| | |NKRO| | | psc|slck|paus| up | | del | |--------------------------------------------------------------------------| | |vol-|vol+|mute| | | * | / |home|pgup|left|rght| penter | |--------------------------------------------------------------------------| @@ -29,4 +55,5 @@ `--------------------------------------------------------------------------' | | | | mstop | | `-----------------------------------------------------------' - ``` \ No newline at end of file +``` + diff --git a/keyboards/kc60se/readme.md b/keyboards/kc60se/readme.md index d6edbdb351c7..55583d81db8a 100644 --- a/keyboards/kc60se/readme.md +++ b/keyboards/kc60se/readme.md @@ -1,15 +1,61 @@ # kc60se -![kc60se](imgur.com image replace me!) +* Keyboard Maintainer: [Blake C. Lewis](https://github.com/BlakeCLewis), [MechMerlin](https://www.github.com/mechmerlin) +* Hardware Supported: KC60SE +* Hardware Availability: PCB is no longer available -A short description of the keyboard/project +## Description: + * 60% keyboard PCB; + * supports ANSI, ISO, and HHKB layouts. -Keyboard Maintainer: [Blake C. Lewis](https://github.com/BlakeCLewis), [MechMerlin](https://www.github.com/mechmerlin) -Hardware Supported: KC60 SE -Hardware Availability: [Aliexpress](https://www.aliexpress.com/store/product/Free-shipping-GH60-PCB-KC60-SE-Fully-Programmable-For-DIY-Mechanical-Keyboard-Poker-Faceu-HHKB-Support/429151_32799437588.html?spm=2114.12010608.0.0.2995e5c0hNRgMH) -Make example for this keyboard (after setting up your build environment): +### Enter the Bootloader + * As delivered, BOOTMAGIC_ENABLE = yes: + * unplug keyboard; + * while holding down 'Space' 'B', plug in USB cable and continue to hold for 8 seconds; + * 'lsusb' should report 'Atmel Corp. atmega32u4 DFU bootloader' instead of 'feed 6060'; + * in bootloader LEDs are off & keyboard does not work. + * New firmware, BOOTMAGIC_ENABLE = lite: + * holding down esc while pluging in usb. + * Hardware way: + * momentary jump pads 5 & 6 to enter bootloader; +### Compile the default keymap: make kc60se:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +### NKRO + * N or 6 Key Rollover NKRO/6KRO + * navigating bios of computer may require 6KRO + * default keymap has fn(T) mapped to toggle NKRO/6KRO + * test: press 8 keys at same time, if 6, then 6KRO, if 8, then NKRO + +### DIP switches enable/disable GUI keys, the second keys from the ends on the bottom row: + * K41/K4C are WIN/GUI and will disrupt games; + * Add keycodes GUI_ON and GUI_OFF to your function layer to switch on/off GUI keys. It is eaier than flipping the dip switches; + + ``` + dip keys + #1 #2 K41 K4C + 1 1 1 1 both keys enabled + 1 0 0 1 + 0 1 1 0 + 0 0 0 0 both keys disabled + ``` +### ISP header next to the ATmega32U4: + * if you can't get into bootloader, while keyboard is on, momentary jump pad 5 to pad 6 + + ``` + 2 4 6 + : : : + 1 3 5 + ``` + ``` + 1 - B3 MISO, column 13, square pad + 2 - VCC + 3 - B1 SCLK, column 7 + 4 - B2 MOSI, caplock led + 5 - Reset | momentary jump 5 and 6 + 6 - Ground | to enter Bootloader + ``` diff --git a/keyboards/kc60se/rules.mk b/keyboards/kc60se/rules.mk index 0432d8032452..2ad661e363ec 100644 --- a/keyboards/kc60se/rules.mk +++ b/keyboards/kc60se/rules.mk @@ -13,21 +13,20 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys +BOOTMAGIC_ENABLE = lite # plugin usb while holding down Esc, will toggle on NKRO and change will persist +MOUSEKEY_ENABLE = no # default keymap does not map mouse EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift From 443bd9804110e0babc361f1014cd25e64cbb40c6 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Wed, 19 Feb 2020 07:45:13 -0600 Subject: [PATCH 319/331] Move Grave/Tilde and some lesser used keys on my ergo boards (#8200) * Move Grave/Tilde keys to more convenient places * Move Ins/Del and some other keys around * Update KLE images --- keyboards/crkbd/keymaps/bcat/keymap.c | 14 +++++++------- keyboards/crkbd/keymaps/bcat/readme.md | 6 +++--- keyboards/lily58/keymaps/bcat/keymap.c | 14 +++++++------- keyboards/lily58/keymaps/bcat/readme.md | 6 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index c9df7a1e31ee..57fd2606565b 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -23,23 +23,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ [LAYER_LOWER] = LAYOUT( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_DEL, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, - _______, _______, _______, _______, _______, KC_APP, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_APP, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______ ), /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7 */ [LAYER_RAISE] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, _______, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */ [LAYER_ADJUST] = LAYOUT( - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______, _______, _______, _______, KC_MUTE, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______, _______, _______, _______, RGB_TOG, _______, _______ diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md index e378f64cddb3..71a9d93c9547 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -13,18 +13,18 @@ more details on the principles that went into the layout. ## Lower layer -![Lower layer layout](https://i.imgur.com/v4DjXM6.png) +![Lower layer layout](https://i.imgur.com/rDlSmrA.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) ## Raise layer -![Raise layer layout](https://i.imgur.com/Wr6Ptyy.png) +![Raise layer layout](https://i.imgur.com/cVoKygg.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/9OtGLCT.png) +![Adjust layer layout](https://i.imgur.com/LEHM4DU.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee)) diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index b0378d19a765..fac14782abb3 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -25,25 +25,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_DEL, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, - _______, _______, _______, _______, _______, KC_APP, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_APP, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823 */ [LAYER_RAISE] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, _______, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7 */ [LAYER_ADJUST] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index fd3ba9b8ec5a..389def1432b6 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -53,18 +53,18 @@ They're positioned below the parens on the Raise layer for easy recall. ## Lower layer -![Lower layer layout](https://i.imgur.com/6ms2ll7.png) +![Lower layer layout](https://i.imgur.com/d0J2lum.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) ## Raise layer -![Raise layer layout](https://i.imgur.com/HBowZ0w.png) +![Raise layer layout](https://i.imgur.com/Ue8tu1v.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823)) ## Adjust layer -![Adjust layer layout](https://i.imgur.com/udhzfON.png) +![Adjust layer layout](https://i.imgur.com/Rv6jQtC.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7)) From c4dce3b5a7528594d02339887c85c19ba14e93e9 Mon Sep 17 00:00:00 2001 From: asymy Date: Wed, 19 Feb 2020 13:50:25 +0000 Subject: [PATCH 320/331] Add VIA support for kbd8x mk2 (#8168) * added via keymap for kbd8x mkii * adding via to kbd8x mk2 * modified via kbd8x mk2 keymap * enable LTO kbd8x mk2 via keymap Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * removed backticks kbd8x mk2 via keymap Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- .../kbdfans/kbd8x_mk2/keymaps/via/keymap.c | 59 +++++++++++++++++++ .../kbdfans/kbd8x_mk2/keymaps/via/readme.md | 3 + .../kbdfans/kbd8x_mk2/keymaps/via/rules.mk | 2 + 3 files changed, 64 insertions(+) create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/via/keymap.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/via/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/via/rules.mk diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/via/keymap.c b/keyboards/kbdfans/kbd8x_mk2/keymaps/via/keymap.c new file mode 100644 index 000000000000..054ef04954a9 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Layer Zero */ + + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( /* Layer One */ + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( /* Layer Two */ + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT( /* Layer Three */ + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/via/readme.md b/keyboards/kbdfans/kbd8x_mk2/keymaps/via/readme.md new file mode 100644 index 000000000000..52c06a3108bb --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# Via keymap for VIA + +Based on the default keymap. diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/via/rules.mk b/keyboards/kbdfans/kbd8x_mk2/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 19c91414739191158fa0ecdb29f06a99e49f55dc Mon Sep 17 00:00:00 2001 From: buzzlighter1 Date: Wed, 19 Feb 2020 22:08:21 +0300 Subject: [PATCH 321/331] [Keymap] Keymap for XD75 with 7U spacebar EN-RU gamers (#8184) * Create readme.md * Create keymap.c * Create config.h * Create rules.mk * Create layers.json * Update keyboards/xd75/keymaps/buzzlighter1/keymap.c * Update keyboards/xd75/keymaps/buzzlighter1/keymap.c * Delete layers.json --- keyboards/xd75/keymaps/buzzlighter1/config.h | 5 + keyboards/xd75/keymaps/buzzlighter1/keymap.c | 111 ++++++++++++++++++ keyboards/xd75/keymaps/buzzlighter1/readme.md | 41 +++++++ keyboards/xd75/keymaps/buzzlighter1/rules.mk | 4 + 4 files changed, 161 insertions(+) create mode 100644 keyboards/xd75/keymaps/buzzlighter1/config.h create mode 100644 keyboards/xd75/keymaps/buzzlighter1/keymap.c create mode 100644 keyboards/xd75/keymaps/buzzlighter1/readme.md create mode 100644 keyboards/xd75/keymaps/buzzlighter1/rules.mk diff --git a/keyboards/xd75/keymaps/buzzlighter1/config.h b/keyboards/xd75/keymaps/buzzlighter1/config.h new file mode 100644 index 000000000000..84f050577ca8 --- /dev/null +++ b/keyboards/xd75/keymaps/buzzlighter1/config.h @@ -0,0 +1,5 @@ + +#pragma once + +#define FORCE_NKRO +#define RGBLIGHT_SLEEP diff --git a/keyboards/xd75/keymaps/buzzlighter1/keymap.c b/keyboards/xd75/keymaps/buzzlighter1/keymap.c new file mode 100644 index 000000000000..f96edce013e2 --- /dev/null +++ b/keyboards/xd75/keymaps/buzzlighter1/keymap.c @@ -0,0 +1,111 @@ +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _QW 0 +#define _FN 1 + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Del | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Mute | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | TT(1) | A | S | D | F | G | H | J | K | L | ; | ' | Vol- | Vol+ | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | Home | PGUP | UP | PGDWN | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | Prev | Next | LALT | SPACE | End | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_MUTE, + TT(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_VOLD, KC_VOLU, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_HOME, KC_PGUP, KC_UP, KC_PGDN, + KC_LCTL, KC_MPRV, KC_MNXT, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_END, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | XXXXXXX| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | _______| _______| + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | P* | P7 | P8 | P9 | + | NumLk | PR SCR | SCR LK | PAUSE | XXXXXXX| XXXXXXX| BL_DEC | BL_INC | RGB HD | RGB HI | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | _______| P4 | P5 | P6 | PENT | CALC | XXXXXXX| POWER | XXXXXXX| RESET | XXXXXXX| BL_BRTG| BL_STEP| RGB SD | RGB SI | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | P/ | P1 | P2 | P3 | - | OS | XXXXXXX| XXXXXXX| XXXXXXX| XXXXXXX| XXXXXXX| BL_OFF | BL_ON | RGB VD | RGB VI | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | CPSLCK | P0 | P. | _______| SPACE | BL_TOGG| RGB TG | RGB RMD| RGB MD | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + KC_PAST, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NLCK, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, + _______, KC_P4, KC_P5, KC_P6, KC_PENT, KC_CALC, XXXXXXX, KC_PWR, XXXXXXX, RESET, XXXXXXX, BL_BRTG, BL_STEP, RGB_SAD, RGB_SAI, + KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_LWIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_OFF, BL_ON, RGB_VAD, RGB_VAI, + KC_CAPS, KC_P0, KC_PDOT, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, RGB_TOG, RGB_RMOD,RGB_MOD + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1< Date: Wed, 19 Feb 2020 13:12:11 -0600 Subject: [PATCH 322/331] Merge /prime_l and /prime_l_v2 (#8194) * correct indicator light states. function of indicator lights was inverted. these changes correct that. * flesh out keymaps pre production * Enable extrakey in rules * Prime_BLE initial commit * Initial commit for Prime_L V2 * Update info.json correct key spacing. * update copyright * Update readme.md * Inital commit * updates before PR into QMK master * Drop Prime_EXL Plus from PR. Make requested changes to Prime_L V2 * Rename keyboards/primekb/Prime_l_v2/config.h to keyboards/primekb/prime_l_v2/config.h * Rename keyboards/primekb/prime_l_v2/config.h to keyboards/primekb/Prime_l_v2/config.h * remove directory Prime_l_v2 * re-submit with proper folder name. * Restructure /primekb directory to merge /prime_l and /prime_l_v2 * made changes requested by QMK reviewers * Update keyboards/primekb/prime_l/v1/readme.md * Update keyboards/primekb/prime_l/v1/readme.md * Update keyboards/primekb/prime_l/v1/readme.md --- keyboards/primekb/prime_l/config.h | 12 +----- .../primekb/prime_l/keymaps/default/config.h | 19 --------- .../primekb/prime_l/keymaps/default/keymap.c | 40 ------------------- keyboards/primekb/prime_l/prime_l.c | 30 +------------- keyboards/primekb/prime_l/prime_l.h | 23 ++++------- keyboards/primekb/prime_l/readme.md | 14 +++---- keyboards/primekb/prime_l/rules.mk | 12 +++--- keyboards/primekb/prime_l/v1/config.h | 34 ++++++++++++++++ keyboards/primekb/prime_l/v1/info.json | 12 ++++++ keyboards/primekb/prime_l/v1/readme.md | 15 +++++++ keyboards/primekb/prime_l/v1/rules.mk | 1 + keyboards/primekb/prime_l/v1/v1.h | 33 +++++++++++++++ .../{prime_l_v2 => prime_l/v2}/config.h | 22 ++-------- .../{prime_l_v2 => prime_l/v2}/info.json | 0 .../{prime_l_v2 => prime_l/v2}/readme.md | 8 ++-- keyboards/primekb/prime_l/v2/rules.mk | 1 + .../prime_l_v2.h => prime_l/v2/v2.h} | 2 +- .../prime_l_v2/keymaps/default/keymap.c | 34 ---------------- .../prime_l_v2/keymaps/default/readme.md | 1 - keyboards/primekb/prime_l_v2/prime_l_v2.c | 16 -------- keyboards/primekb/prime_l_v2/rules.mk | 33 --------------- 21 files changed, 129 insertions(+), 233 deletions(-) delete mode 100644 keyboards/primekb/prime_l/keymaps/default/config.h create mode 100644 keyboards/primekb/prime_l/v1/config.h create mode 100644 keyboards/primekb/prime_l/v1/info.json create mode 100644 keyboards/primekb/prime_l/v1/readme.md create mode 100644 keyboards/primekb/prime_l/v1/rules.mk create mode 100644 keyboards/primekb/prime_l/v1/v1.h rename keyboards/primekb/{prime_l_v2 => prime_l/v2}/config.h (62%) rename keyboards/primekb/{prime_l_v2 => prime_l/v2}/info.json (100%) rename keyboards/primekb/{prime_l_v2 => prime_l/v2}/readme.md (79%) create mode 100644 keyboards/primekb/prime_l/v2/rules.mk rename keyboards/primekb/{prime_l_v2/prime_l_v2.h => prime_l/v2/v2.h} (98%) delete mode 100644 keyboards/primekb/prime_l_v2/keymaps/default/keymap.c delete mode 100644 keyboards/primekb/prime_l_v2/keymaps/default/readme.md delete mode 100644 keyboards/primekb/prime_l_v2/prime_l_v2.c delete mode 100644 keyboards/primekb/prime_l_v2/rules.mk diff --git a/keyboards/primekb/prime_l/config.h b/keyboards/primekb/prime_l/config.h index 786ceb59cdaa..33048ef50440 100644 --- a/keyboards/primekb/prime_l/config.h +++ b/keyboards/primekb/prime_l/config.h @@ -1,5 +1,6 @@ /* Copyright 2018 Jumail Mundekkat +Copyright 2020 Holten Campbell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,27 +23,16 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x4024 -#define DEVICE_VER 0x0001 #define MANUFACTURER PrimeKB -#define PRODUCT Prime_L #define DESCRIPTION Custom layout keyboard /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 16 -/* Keyboard Matrix Assignments */ -#define MATRIX_ROW_PINS { D1, D0, B7, B3, B2 } -#define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B5, C7, C6, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN B6 -/*#define BACKLIGHT_BREATHING*/ -#define BACKLIGHT_LEVELS 4 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/primekb/prime_l/keymaps/default/config.h b/keyboards/primekb/prime_l/keymaps/default/config.h deleted file mode 100644 index 95917a65cd43..000000000000 --- a/keyboards/primekb/prime_l/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2018 Jumail Mundekkat - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/primekb/prime_l/keymaps/default/keymap.c b/keyboards/primekb/prime_l/keymaps/default/keymap.c index 8a044b955680..dbaf5224559f 100644 --- a/keyboards/primekb/prime_l/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_l/keymaps/default/keymap.c @@ -15,12 +15,6 @@ */ #include QMK_KEYBOARD_H -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_ESC, KC_HOME, KC_END, KC_PSCR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGUP, KC_BSPC, @@ -38,37 +32,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS ) }; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; -} - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/primekb/prime_l/prime_l.c b/keyboards/primekb/prime_l/prime_l.c index 844407a10d0a..5a7a0a10083d 100644 --- a/keyboards/primekb/prime_l/prime_l.c +++ b/keyboards/primekb/prime_l/prime_l.c @@ -1,4 +1,5 @@ /* Copyright 2018 Jumail Mundekkat + * Copyright 2020 Holten Campbell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,31 +14,4 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "prime_l.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} +#include "prime_l.h" \ No newline at end of file diff --git a/keyboards/primekb/prime_l/prime_l.h b/keyboards/primekb/prime_l/prime_l.h index b50898b28b3e..10b587b6a017 100644 --- a/keyboards/primekb/prime_l/prime_l.h +++ b/keyboards/primekb/prime_l/prime_l.h @@ -1,4 +1,5 @@ /* Copyright 2018 Jumail Mundekkat + * Copyright 2020 Holten Campbell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,23 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PRIME_L_H -#define PRIME_L_H -#include "quantum.h" +#pragma once -#define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215 , \ - K300, K301, K302, K303, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ - K400, K401, K402, K403, K405, K406, K407, K408, K410, K412, K413, K414, K415 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ - { K300, K301, K302, K303, KC_NO, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ - { K400, K401, K402, K403, KC_NO, K405, K406, K407, K408, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ -} +#include "quantum.h" +#if defined(KEYBOARD_primekb_prime_l_v1) + #include "v1.h" +#elif defined(KEYBOARD_primekb_prime_l_v2) + #include "v2.h" #endif diff --git a/keyboards/primekb/prime_l/readme.md b/keyboards/primekb/prime_l/readme.md index 3f760a4cc547..fb04e1d39bb0 100644 --- a/keyboards/primekb/prime_l/readme.md +++ b/keyboards/primekb/prime_l/readme.md @@ -1,15 +1,15 @@ # Prime_L -![Prime_L](https://i.imgur.com/jUWhjOD.jpg) +A compact layout with the footprint of your typical 65% board, featuring a left mini-numpad. -A compact layout with the footprint of your typical 65% board, featuring a left mini-numpad. Pre-drilled and counter sunk holes for use with optional feet for a slight tilt. Switches are oriented so that back light LEDs are on the top of the switch. - -Keyboard Maintainer: [MxBlue](https://github.com/MxBlu) -Hardware Supported: Prime_L PCBs, ATMega32u4 -Hardware Availability: [Store Link](https://www.primekb.com/collections/keyboards/products/bundle-save) +* Hardware Supported: + * [Prime_L V1](v1/) PCBs, ATmega32U4 (supports in-switch LEDs) + * [Prime_L V2](v2/) PCBs, ATmega32U4 (no in-switch LED supports) +* Hardware Availability: [Store Link](https://www.primekb.com) Make example for this keyboard (after setting up your build environment): - make primekb/prime_l:default + make primekb/prime_l/v1:default + make primekb/prime_l/v2:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/primekb/prime_l/rules.mk b/keyboards/primekb/prime_l/rules.mk index f6979a626f53..3030b50f0630 100644 --- a/keyboards/primekb/prime_l/rules.mk +++ b/keyboards/primekb/prime_l/rules.mk @@ -14,16 +14,16 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode @@ -31,3 +31,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +DEFAULT_FOLDER = primekb/prime_l/v1 \ No newline at end of file diff --git a/keyboards/primekb/prime_l/v1/config.h b/keyboards/primekb/prime_l/v1/config.h new file mode 100644 index 000000000000..b9ca56364529 --- /dev/null +++ b/keyboards/primekb/prime_l/v1/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Jumail Mundekkat +Copyright 2020 Holten Campbell + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0001 +#define PRODUCT Prime_L V1 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { D1, D0, B7, B3, B2 } +#define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B5, C7, C6, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 +/*#define BACKLIGHT_BREATHING*/ +#define BACKLIGHT_LEVELS 4 \ No newline at end of file diff --git a/keyboards/primekb/prime_l/v1/info.json b/keyboards/primekb/prime_l/v1/info.json new file mode 100644 index 000000000000..8a407fd3eb2e --- /dev/null +++ b/keyboards/primekb/prime_l/v1/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Prime_L", + "url": "https://www.primekb.com", + "maintainer": "MxBlu", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "w":1.25}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2, "w":1.75}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "w":1.75}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3}, {"x":14.75, "y":3, "w":1.25}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4, "w":1.25}, {"x":4.25, "y":4, "w":1.25}, {"x":5.5, "y":4}, {"x":6.5, "y":4}, {"x":7.5, "y":4, "w":2}, {"x":9.5, "y":4, "w":2.25}, {"x":11.75, "y":4}, {"x":12.75, "y":4}, {"x":13.75, "y":4}, {"x":14.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/primekb/prime_l/v1/readme.md b/keyboards/primekb/prime_l/v1/readme.md new file mode 100644 index 000000000000..665ad09a07af --- /dev/null +++ b/keyboards/primekb/prime_l/v1/readme.md @@ -0,0 +1,15 @@ +# Prime_L V1 + +![Prime_L V1](https://i.imgur.com/jUWhjOD.jpg) + +A compact layout with the footprint of your typical 65% board, featuring a left mini-numpad. Pre-drilled and counter sunk holes for use with optional feet for a slight tilt. Switches are oriented so that back light LEDs are on the top of the switch. + +* Keyboard Maintainer: [MxBlue](https://github.com/MxBlu) +* Hardware Supported: Prime_L V1 PCBs, ATmega32u4 +* Hardware Availability: V1 PCB no longer produced + +Make example for this keyboard (after setting up your build environment): + + make primekb/prime_l/v1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/primekb/prime_l/v1/rules.mk b/keyboards/primekb/prime_l/v1/rules.mk new file mode 100644 index 000000000000..54a2685bf634 --- /dev/null +++ b/keyboards/primekb/prime_l/v1/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/primekb/prime_l/v1/v1.h b/keyboards/primekb/prime_l/v1/v1.h new file mode 100644 index 000000000000..bb82bacf5b0c --- /dev/null +++ b/keyboards/primekb/prime_l/v1/v1.h @@ -0,0 +1,33 @@ +/* Copyright 2018 Jumail Mundekkat + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "prime_l.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215 , \ + K300, K301, K302, K303, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ + K400, K401, K402, K403, K405, K406, K407, K408, K410, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, KC_NO, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ + { K400, K401, K402, K403, KC_NO, K405, K406, K407, K408, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} diff --git a/keyboards/primekb/prime_l_v2/config.h b/keyboards/primekb/prime_l/v2/config.h similarity index 62% rename from keyboards/primekb/prime_l_v2/config.h rename to keyboards/primekb/prime_l/v2/config.h index 63ef3e51693a..9a3a05d72ec2 100644 --- a/keyboards/primekb/prime_l_v2/config.h +++ b/keyboards/primekb/prime_l/v2/config.h @@ -20,12 +20,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x4024 -#define DEVICE_VER 0x0001 -#define MANUFACTURER PrimeKB -#define PRODUCT Prime_L_V2 -#define DESCRIPTION Custom layout keyboard + +#define DEVICE_VER 0x0002 +#define PRODUCT Prime_L V2 /* key matrix size */ #define MATRIX_ROWS 5 @@ -34,15 +31,4 @@ along with this program. If not, see . /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { E6, B2, B1, B0, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D4, D0, D1, D2, D3, D5, B7, B3 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +#define UNUSED_PINS \ No newline at end of file diff --git a/keyboards/primekb/prime_l_v2/info.json b/keyboards/primekb/prime_l/v2/info.json similarity index 100% rename from keyboards/primekb/prime_l_v2/info.json rename to keyboards/primekb/prime_l/v2/info.json diff --git a/keyboards/primekb/prime_l_v2/readme.md b/keyboards/primekb/prime_l/v2/readme.md similarity index 79% rename from keyboards/primekb/prime_l_v2/readme.md rename to keyboards/primekb/prime_l/v2/readme.md index 22696dbe2204..d72c17dc1bd0 100644 --- a/keyboards/primekb/prime_l_v2/readme.md +++ b/keyboards/primekb/prime_l/v2/readme.md @@ -1,15 +1,15 @@ -# Prime_L_V2 +# Prime_L V2 -![Prime_L_V2](https://i.imgur.com/P3P6GUu.jpg) +![Prime_L V2](https://i.imgur.com/P3P6GUu.jpg) A compact layout with the footprint of your typical 65% board, featuring a left mini-numpad. * Keyboard Maintainer: [HoltenC](https://github.com/HoltenC) -* Hardware Supported: Prime_L_V2 PCBs, ATMega32u4 +* Hardware Supported: Prime_L V2 PCBs, ATmega32u4 * Hardware Availability: [Store Link](https://www.primekb.com) Make example for this keyboard (after setting up your build environment): - make primekb/prime_l_v2:default + make primekb/prime_l/v2:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/primekb/prime_l/v2/rules.mk b/keyboards/primekb/prime_l/v2/rules.mk new file mode 100644 index 000000000000..f845616741c2 --- /dev/null +++ b/keyboards/primekb/prime_l/v2/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/primekb/prime_l_v2/prime_l_v2.h b/keyboards/primekb/prime_l/v2/v2.h similarity index 98% rename from keyboards/primekb/prime_l_v2/prime_l_v2.h rename to keyboards/primekb/prime_l/v2/v2.h index b0924d5d79bc..ebac56e76c3a 100644 --- a/keyboards/primekb/prime_l_v2/prime_l_v2.h +++ b/keyboards/primekb/prime_l/v2/v2.h @@ -16,7 +16,7 @@ #pragma once -#include "quantum.h" +#include "prime_l.h" #define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ diff --git a/keyboards/primekb/prime_l_v2/keymaps/default/keymap.c b/keyboards/primekb/prime_l_v2/keymaps/default/keymap.c deleted file mode 100644 index 0e8e15195b64..000000000000 --- a/keyboards/primekb/prime_l_v2/keymaps/default/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 Holten Campbell - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_HOME, KC_END, KC_PSCR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGUP, KC_BSPC, - KC_P7, KC_P8, KC_P9, KC_NLCK, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PGDN, KC_BSLS, - KC_P4, KC_P5, KC_P6, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, - KC_P1, KC_P2, KC_P3, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_ENT, KC_PDOT, KC_P0, KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, MO(1), KC_SPC, KC_MINS, KC_EQL, KC_RGUI, KC_RCTL - ), - - [1] = LAYOUT( - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS - ) -}; \ No newline at end of file diff --git a/keyboards/primekb/prime_l_v2/keymaps/default/readme.md b/keyboards/primekb/prime_l_v2/keymaps/default/readme.md deleted file mode 100644 index f2f4348c2d68..000000000000 --- a/keyboards/primekb/prime_l_v2/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for prime_l_v2 \ No newline at end of file diff --git a/keyboards/primekb/prime_l_v2/prime_l_v2.c b/keyboards/primekb/prime_l_v2/prime_l_v2.c deleted file mode 100644 index 50e7a5e3f758..000000000000 --- a/keyboards/primekb/prime_l_v2/prime_l_v2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2020 Holten Campbell - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "prime_l_v2.h" diff --git a/keyboards/primekb/prime_l_v2/rules.mk b/keyboards/primekb/prime_l_v2/rules.mk deleted file mode 100644 index 674751489d55..000000000000 --- a/keyboards/primekb/prime_l_v2/rules.mk +++ /dev/null @@ -1,33 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file From 7707724dc4864cb4ede738ee9e2c3568df99ced2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 21 Feb 2020 03:49:33 +0000 Subject: [PATCH 323/331] Allow 30us matrix delay to be keyboard/user overridable (#8216) * Allow 30us matrix delay to be configurable via define * Move wait logic to matrix_common * Move wait logic to matrix_common - fix wait includes --- docs/config_options.md | 2 ++ quantum/matrix.c | 5 ++--- quantum/matrix_common.c | 7 +++++++ quantum/split_common/matrix.c | 5 ++--- tmk_core/common/matrix.h | 2 ++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 5344fe851f45..d048d176787d 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -53,6 +53,8 @@ This is a C header file that is one of the first things included, and will persi * pins of the rows, from top to bottom * `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }` * pins of the columns, from left to right +* `#define MATRIX_IO_DELAY 30` + * the delay in microseconds when between changing matrix pin state and reading values * `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }` * pins unused by the keyboard for reference * `#define MATRIX_HAS_GHOST` diff --git a/quantum/matrix.c b/quantum/matrix.c index 6bd604bb79c6..67d8af6ee8a3 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include #include -#include "wait.h" #include "util.h" #include "matrix.h" #include "debounce.h" @@ -94,7 +93,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Select row and wait for row selecton to stabilize select_row(current_row); - wait_us(30); + matrix_io_delay(); // For each col... for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { @@ -138,7 +137,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) // Select col and wait for col selecton to stabilize select_col(current_col); - wait_us(30); + matrix_io_delay(); // For each row... for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index c326e59ca382..de62b8070565 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -1,8 +1,13 @@ #include "matrix.h" #include "debounce.h" +#include "wait.h" #include "print.h" #include "debug.h" +#ifndef MATRIX_IO_DELAY +# define MATRIX_IO_DELAY 30 +#endif + /* matrix state(1:on, 0:off) */ matrix_row_t raw_matrix[MATRIX_ROWS]; matrix_row_t matrix[MATRIX_ROWS]; @@ -78,6 +83,8 @@ uint8_t matrix_key_count(void) { return count; } +__attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); } + // CUSTOM MATRIX 'LITE' __attribute__((weak)) void matrix_init_custom(void) {} diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 2c0e028f7da0..a82334128b87 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include #include -#include "wait.h" #include "util.h" #include "matrix.h" #include "debounce.h" @@ -111,7 +110,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Select row and wait for row selecton to stabilize select_row(current_row); - wait_us(30); + matrix_io_delay(); // For each col... for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { @@ -155,7 +154,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) // Select col and wait for col selecton to stabilize select_col(current_col); - wait_us(30); + matrix_io_delay(); // For each row... for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) { diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index a2fedf5ff0b0..78506059e6ac 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h @@ -66,6 +66,8 @@ bool matrix_is_on(uint8_t row, uint8_t col); matrix_row_t matrix_get_row(uint8_t row); /* print matrix for debug */ void matrix_print(void); +/* delay between changing matrix pin state and reading values */ +void matrix_io_delay(void); /* power control */ void matrix_power_up(void); From 81423cc8178e760a641655ec8d82ebf78c41c9ef Mon Sep 17 00:00:00 2001 From: swanmatch Date: Fri, 21 Feb 2020 14:59:36 +0900 Subject: [PATCH 324/331] [New keyboard]silverbullet44 (#7950) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make silverbullet44 * comment edit * venderID * Fix parentheses in macros, and in general clean up quantum.h (#5021) * Fix up GPIO macros * Fix up send string macros `string` arguments must not be parenthesized * Fix up miscellaneous macros * Make indentation uniform (4 spaces) * Make #ifdef vs #if defined usage consistent * Reorder standard includes * Revert indentation changes as per review comments * Revert #if defined(__AVR__) → #ifdef __AVR__ change * Change 2 space indent to 4 spaces on a couple of lines * Replace include guard with #pragma once * alt+tab * copy from master:silverbullet44 * adjust for pull request * clang-format * create info.json * Delete new_project.sh * Update keyboards/silverbullet44/keymaps/default/config.h Co-Authored-By: Max Rumpf * Update keyboards/silverbullet44/silverbullet44.c Co-Authored-By: Max Rumpf * Update keyboards/silverbullet44/silverbullet44.h Co-Authored-By: Max Rumpf * Apply suggestions from Maxr1998 * format default keymap * Apply suggestions from Maxr1998 (#2) * Apply suggestions from fauxpark * fix readme.md * Apply suggestion from Maxr1998. (custom_keycode to MO(_ADJUST)) * I became a tricky! Hahaha!! * Add original keymap made by FKML * deleated at config.h * Changed Copyright * Delete // Defines the keycodes used by our macros in process_record_user //enum custom_keycodes { // QMKBEST = SAFE_RANGE, // QMKURL //}; * Delete bool alt_pressed = false; * Delete ADJUST * Delete / * Delete void matrix_scan_user(void) { } void led_set_user(uint8_t usb_led) { } * Change Copyright's year. * Delete adjust * Delete adjust * Delete adjust * 列挙型に変更 * Enclose keymap with ```. * Delete #define _______ KC_TRNS #define XXXXXXX KC_NO * Fix indentation. * Delete some rows. * Aligned columns of ''readme.md''. * I got god's keymap...hahaha:) * Update keyboards/silverbullet44/readme.md Co-Authored-By: fauxpark * Update keyboards/silverbullet44/rules.mk Co-Authored-By: fauxpark Co-authored-by: Konstantin Đorđević Co-authored-by: Max Rumpf Co-authored-by: Ryan --- keyboards/silverbullet44/config.h | 294 ++++++++++++++++++ keyboards/silverbullet44/info.json | 64 ++++ .../silverbullet44/keymaps/FKML/keymap.c | 144 +++++++++ .../silverbullet44/keymaps/FKML/readme.md | 47 +++ .../silverbullet44/keymaps/default/keymap.c | 203 ++++++++++++ .../silverbullet44/keymaps/default/readme.md | 51 +++ keyboards/silverbullet44/readme.md | 18 ++ keyboards/silverbullet44/rules.mk | 36 +++ keyboards/silverbullet44/silverbullet44.c | 45 +++ keyboards/silverbullet44/silverbullet44.h | 43 +++ 10 files changed, 945 insertions(+) create mode 100644 keyboards/silverbullet44/config.h create mode 100644 keyboards/silverbullet44/info.json create mode 100644 keyboards/silverbullet44/keymaps/FKML/keymap.c create mode 100644 keyboards/silverbullet44/keymaps/FKML/readme.md create mode 100644 keyboards/silverbullet44/keymaps/default/keymap.c create mode 100644 keyboards/silverbullet44/keymaps/default/readme.md create mode 100644 keyboards/silverbullet44/readme.md create mode 100644 keyboards/silverbullet44/rules.mk create mode 100644 keyboards/silverbullet44/silverbullet44.c create mode 100644 keyboards/silverbullet44/silverbullet44.h diff --git a/keyboards/silverbullet44/config.h b/keyboards/silverbullet44/config.h new file mode 100644 index 000000000000..6872f5fb4470 --- /dev/null +++ b/keyboards/silverbullet44/config.h @@ -0,0 +1,294 @@ +/* +Copyright 2019 SwanMatch + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x16C0 +#define PRODUCT_ID 0x27DB +#define DEVICE_VER 0x0001 +#define MANUFACTURER SwanMatch +#define PRODUCT SilverBullet44 +#define DESCRIPTION Metalical Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 +#define MASTER_RIGHT + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + //#define RGBLIGHT_SPLIT + #define RGBLED_SPLIT {26, 26} + #define RGBLED_NUM 52 + #ifdef RGB_MATRIX_ENABLE + #define DRIVER_LED_TOTAL 52 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 + + #define RGB_MATRIX_HUE_STEP 8 + #define RGB_MATRIX_SAT_STEP 8 + #define RGB_MATRIX_VAL_STEP 8 + #define RGB_MATRIX_SPD_STEP 8 + + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses + + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP + #else + #define RGBLIGHT_LED_MAP { 0,1,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,3,4,5,6, \ + 26,27,28,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,29,30,31,32 } + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */ + //#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + #define RGBLIGHT_EFFECT_BREATHE_CENTER 2 // 1 to 2.7 + #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +/*== customize snake effect ==*/ + #define RGBLIGHT_EFFECT_SNAKE_LENGTH RGBLED_NUM +/*== customize knight effect ==*/ + #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 6 + #endif +#endif + +/* Audio */ +#ifdef AUDIO_ENABLE + #define B6_AUDIO + #define STARTUP_SONG SONG(STARTUP_SOUND) + #define AUDIO_CLICKY + #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 10 + +//#define RETRO_TAPPING + +#ifdef MOUSEKEY_ENABLE + #define MOUSEKEY_INTERVAL 20 + #define MOUSEKEY_MAX_SPEED 5 + #define MOUSEKEY_TIME_TO_MAX 60 +#endif + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/silverbullet44/info.json b/keyboards/silverbullet44/info.json new file mode 100644 index 000000000000..65c54e538fc4 --- /dev/null +++ b/keyboards/silverbullet44/info.json @@ -0,0 +1,64 @@ +{ + "keyboard_name": "SilverBullet44", + "url": "https://swanmatch.booth.pm/items/1561270", + "maintainer": "swanmatch", + "width": 18, + "height": 4.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Tab", "x":0, "y":1.375}, + {"label":"Q", "x":1, "y":0.75}, + {"label":"W", "x":2, "y":0.25}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0.25}, + {"label":"T", "x":5, "y":0.5}, + + {"label":"Y", "x":12, "y":0.5}, + {"label":"U", "x":13, "y":0.25}, + {"label":"I", "x":14, "y":0}, + {"label":"O", "x":15, "y":0.25}, + {"label":"P", "x":16, "y":0.75}, + {"label":"=", "x":17, "y":1.375}, + + {"label":"Shift", "x":0, "y":2.375}, + {"label":"A", "x":1, "y":1.75}, + {"label":"S", "x":2, "y":1.25}, + {"label":"D", "x":3, "y":1}, + {"label":"F", "x":4, "y":1.25}, + {"label":"G", "x":5, "y":1.5}, + + {"label":"H", "x":12, "y":1.5}, + {"label":"J", "x":13, "y":1.25}, + {"label":"K", "x":14, "y":1}, + {"label":"L", "x":15, "y":1.25}, + {"label":":", "x":16, "y":1.75}, + {"label":"'", "x":17, "y":2.375}, + + {"label":"N", "x":12, "y":2.5}, + {"label":"M", "x":13, "y":2.25}, + {"label":"<", "x":14, "y":2}, + {"label":">", "x":15, "y":2.25}, + {"label":"?", "x":16, "y":2.75}, + {"label":"-", "x":17, "y":3.375}, + + {"label":"Ctrl", "x":0, "y":3.375}, + {"label":"Z", "x":1, "y":2.75}, + {"label":"X", "x":2, "y":2.25}, + {"label":"C", "x":3, "y":2}, + {"label":"V", "x":4, "y":2.25}, + {"label":"B", "x":5, "y":2.5}, + + {"label":"Alt", "x":4, "y":3.25, "h":1.25}, + {"label":"BS", "x":5, "y":3.5}, + {"label":"Space", "x":-0.5, "y":3.5, "h":1.5}, + {"label":"Num", "x":7, "y":3.25, "h":1.5}, + + {"label":"Cursol", "x":-3.0, "y":3.5, "h":1.5}, + {"label":"Enter", "x":-2, "y":3.5, "h":1.5}, + {"label":"Del", "x":12, "y":3.5}, + {"label":"Win", "x":13, "y":3.25, "w":1.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/silverbullet44/keymaps/FKML/keymap.c b/keyboards/silverbullet44/keymaps/FKML/keymap.c new file mode 100644 index 000000000000..5b6be1813d8a --- /dev/null +++ b/keyboards/silverbullet44/keymaps/FKML/keymap.c @@ -0,0 +1,144 @@ +/* Copyright 2020 FKML + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layer { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | CMD | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | - | + * `-----------------------------------------/ / / \ \ \-----------------------------------------' + * | CAPS | LOWER| Space/ Bcsp / \ . \ Ent | RAISE|LEDOff| + * `----------------------------' '--------------------------' + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCMD, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_CLCK, LOWER, KC_SPC, KC_BSPC, KC_DOT, KC_ENT, RAISE, RGB_TOG + ), + +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | 4 | 5 | | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | | | |-------.-------. ,---------------| 6 | 7 | 8 | 9 | 0 | | + * `-----------------------------------------/ / / \ \ \-----------------------------------------' + * | | | / / \ \ | | | + * `---------------------------' '--------------------------' + */ + [_LOWER] = LAYOUT( + KC_GRV , KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, + _______, _______, _______, _______, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | | | - | + | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | | | | | | [ | ] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F11 | F12 | | | |-------.-------. ,---------------| | | Left | Up | Down |Right | + * `-----------------------------------------/ / / \ \ \-----------------------------------------' + * | | | / / \ \ | | | + * `---------------------------' '--------------------------' + */ + [_RAISE] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, KC_MINS, KC_PLUS, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_LBRC, KC_RBRC, + _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | |FrqRst| | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |Music |FrqUp |Sound | | | SPD+ | MOD+ | VAL+ | SAD+ | HUE+ | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |Scale |FrqDwn| | |-------.-------. ,---------------| SPD- | SPD- | VAL- | SAD- | HUE- | | + * `-----------------------------------------/ / / \ \ \-----------------------------------------' + * | | | / / \ \ | | | + * `---------------------------' '--------------------------' + */ + + [_ADJUST] = LAYOUT( + _______, XXXXXXX, XXXXXXX, CK_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, MU_TOG, CK_UP, AU_TOG, XXXXXXX, RGB_SPI, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, XXXXXXX, + XXXXXXX, XXXXXXX, MU_MOD, CK_DOWN, XXXXXXX, XXXXXXX, RGB_SPD, RGB_RMOD, RGB_VAD, RGB_SAD, RGB_HUD, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +int RGB_current_mode; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { +#ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; +#endif +} diff --git a/keyboards/silverbullet44/keymaps/FKML/readme.md b/keyboards/silverbullet44/keymaps/FKML/readme.md new file mode 100644 index 000000000000..c9c4c133eb37 --- /dev/null +++ b/keyboards/silverbullet44/keymaps/FKML/readme.md @@ -0,0 +1,47 @@ +# The default keymap for silverbullet44 + +``` +QWERTY +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | = | +|------+------+------+------+------+------| |------+------+------+------+------+------| +|Shift | A | S | D | F | G | | H | J | K | L | ; | ' | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| CMD | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | - | +`-----------------------------------------/ / / \ \ \-----------------------------------------' + | CAPS | LOWER| Space/ Bcsp / \ . \ Ent | RAISE|LEDOff| + `---------------------------' '--------------------------' + +LOWER + ,-----------------------------------------. ,-----------------------------------------. + | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | 1 | 2 | 3 | 4 | 5 | | + |------+------+------+------+------+------+ +------+------+------+------+------+------| + | | | | | | |-------.-------. ,---------------| 6 | 7 | 8 | 9 | 0 | | + `-----------------------------------------/ / / \ \ \-----------------------------------------' + | | | / / \ \ | | | + `---------------------------' '--------------------------' + + RAISE + ,-----------------------------------------. ,-----------------------------------------. + | | F1 | F2 | F3 | F4 | F5 | | | | | | - | + | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F6 | F7 | F8 | F9 | F10 | | | | | | [ | ] | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F11 | F12 | | | |-------.-------. ,---------------| | | Left | Up | Down |Right | + `-----------------------------------------/ / / \ \ \-----------------------------------------' + | | | / / \ \ | | | + `---------------------------' '--------------------------' + +ADJUST +,-----------------------------------------. ,-----------------------------------------. +| | | |FrqRst| | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | |Music |FrqUp |Sound | | | SPD+ | MOD+ | VAL+ | SAD+ | HUE+ | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | |Scale |FrqDwn| | |-------.-------. ,---------------| SPD- | SPD- | VAL- | SAD- | HUE- | | +`-----------------------------------------/ / / \ \ \-----------------------------------------' + | | | / / \ \ | | | + `---------------------------' '--------------------------' +``` \ No newline at end of file diff --git a/keyboards/silverbullet44/keymaps/default/keymap.c b/keyboards/silverbullet44/keymaps/default/keymap.c new file mode 100644 index 000000000000..af8078608dbc --- /dev/null +++ b/keyboards/silverbullet44/keymaps/default/keymap.c @@ -0,0 +1,203 @@ +/* Copyright 2019 SwanMatch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +//enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +//}; +enum layer { + _QWERTY, + _CURSOL, + _CALC, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + KC_00, + ALTAB +}; +#define CALC LT(_CALC, KC_ESC) +#define CUSL LT(_CURSOL, KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * |TabMOS| Q | W | E | R | T | | Y | U | I | O | P | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | - | + * `-----------------------------------------/ / / \ \ \----------------------------------------' + * | Alt | Bksp | / Shift / Calc / \ Cursol\ Ctrl | Del | App | + * | F5 | |/ Space / Esc / \ Tab \ Enter\ | F12 | + * `-----------------------------' '---------------------------' + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + LALT_T(KC_F5), KC_BSPC, LSFT_T(KC_SPC), CALC, CUSL, LCTL_T(KC_ENT), KC_DEL, GUI_T(KC_F12) + ), + +/* Cursol + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | PgUp | F4 | F5 | | F6 | F7 | Up | F9 | F10 |PrtSc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ~ | Home | PgDw | End | ( | | ) | Left | Down |Right | F8 | F11 | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | ` | CLft | F3 | CRgt |SALTAB|-------.-------. ,---------------|ALTTAB| OSL | F8 | OSR | | | + * `-----------------------------------------/ / / \ \ \----------------------------------------' + * | | | / / / \ \ \ | | | + * | | |/ / / \ \ \ | | | + * `-----------------------------' '-----------------------------' + */ + [_CURSOL] = LAYOUT( + RESET , KC_F1, KC_F2, KC_PGUP, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, RESET, + _______, KC_TILD, KC_HOME, KC_PGDN, KC_END, KC_LPRN, KC_RPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_PIPE, KC_F11, + _______, KC_GRV, C(KC_LEFT), KC_F3, C(KC_RGHT), S(ALTAB), ALTAB, LCA(KC_LEFT), KC_F8, LCA(KC_RGHT), KC_BSLS, RGBRST, + _______, _______, C(KC_SPC), MO(_ADJUST), _______, _______, _______, _______ + ), + +/* Calculater + * ,-----------------------------------------. ,-----------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | @ | # | $ | % | [ | | ] | 4 | 5 | 6 | + | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ^ | & | * | ! | { |-------.-------. ,---------------| } | 1 | 2 | 3 | = | | + * `-----------------------------------------/ / / \ \ \----------------------------------------' + * | | | / / / \ \ \ | | | + * | | |/ / / \ \ 0 \ | 00 | . | + * `-----------------------------' '------------------------------' + */ + [_CALC] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, _______, + _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_EXLM, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, KC_PEQL, _______, + _______, _______, _______, _______, MO(_ADJUST), KC_0, KC_00, KC_PDOT + ), + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | |FrqRst| | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |Music |FrqUp |Sound | | | SPD+ | MOD+ | VAL+ | SAD+ | HUE+ | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |Scale |FrqDwn| | |-------.-------. ,---------------| SPD- | SPD- | VAL- | SAD- | HUE- | | + * `-----------------------------------------/ / / \ \ \----------------------------------------' + * | | | / / / \ \ \ | | | + * | | |/ / / \ \ \ | | | + * `-----------------------------' '------------------------------' +*/ + + [_ADJUST] = LAYOUT( + _______, XXXXXXX, XXXXXXX, CK_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, MU_TOG, CK_UP, AU_TOG, XXXXXXX, RGB_SPI, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, XXXXXXX, + XXXXXXX, XXXXXXX, MU_MOD, CK_DOWN, XXXXXXX, XXXXXXX, RGB_SPD, RGB_RMOD, RGB_VAD, RGB_SAD, RGB_HUD, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +#ifdef RGBLIGHT_ENABLE +// Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +int RGB_current_mode; +bool alt_pressed = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef RGBLIGHT_ENABLE + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; +#endif + case KC_SCLN: + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + if (record->event.pressed) { + unregister_code(KC_LSFT); + tap_code16(keycode); + register_code(KC_LSFT); + } + /* } else if (keyboard_report->mods & MOD_BIT(KC_RSFT)) { + if (record->event.pressed) { + unregister_code(KC_RSFT); + tap_code16(keycode); + register_code(KC_RSFT); + } */ + } else { + if (record->event.pressed) { + tap_code16(S(keycode)); + } + } + return false; + break; + case KC_00: + if (record->event.pressed) { + tap_code(KC_0); + register_code(KC_0); + } else { + unregister_code(KC_0); + } + return false; + break; + case S(ALTAB): + case ALTAB: + if (record->event.pressed) { + if (!alt_pressed) { + alt_pressed = true; + register_code(KC_LALT); + } + if (keycode == S(ALTAB)) { + register_code(KC_LSFT); + } + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + if (keycode == S(ALTAB)) { + unregister_code(KC_LSFT); + } + } + return false; + break; + default: + if (alt_pressed) { + alt_pressed = false; + unregister_code(KC_LALT); + if (record->event.pressed) { + return false; + } + } + break; + } + return true; +} + +void matrix_init_user(void) { +#ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; +#endif +} + diff --git a/keyboards/silverbullet44/keymaps/default/readme.md b/keyboards/silverbullet44/keymaps/default/readme.md new file mode 100644 index 000000000000..01f4e6d23435 --- /dev/null +++ b/keyboards/silverbullet44/keymaps/default/readme.md @@ -0,0 +1,51 @@ +# The default keymap for silverbullet44 + +``` +QWERTY +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | = | +|------+------+------+------+------+------| |------+------+------+------+------+------| +|LShift| A | S | D | F | G | | H | J | K | L | ; | ' | +|------+------+------+------+------+------| |------+------+------+------+------+------| +|LCTRL | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | - | +`-----------------------------------------/ / / \ \ \----------------------------------------' + | Alt | Bksp | / Shift / Calc / \ Cursol\ CTRL | Del | App | + | F5 | |/ Space / Esc / \ Tab \ Enter\ | F12 | + `-----------------------------' '---------------------------' + +Cursol +,-----------------------------------------. ,-----------------------------------------. +| | F1 | F2 | PgUp | F4 | F5 | | F6 | F7 | Up | F9 | F10 |PrtSc | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | ~ | Home | PgDw | End | ( | | ) | Left | Down |Right | F8 | F11 | +|------+------+------+------+------+------+ +------+------+------+------+------+------| +| | ` | CLft | F3 | CRgt |SALTAB|-------.-------. ,---------------|ALTTAB| OSL | F8 | OSR | | | +`-----------------------------------------/ / / \ \ \----------------------------------------' + | | | / / / \ \ \ | | | + | | |/ / / \ \ \ | | | + `-----------------------------' '-----------------------------' + +Calculater +,-----------------------------------------. ,-----------------------------------------. +| | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | @ | # | $ | % | [ | | ] | 4 | 5 | 6 | + | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | ^ | & | * | ! | { |-------.-------. ,---------------| } | 1 | 2 | 3 | = | | +`-----------------------------------------/ / / \ \ \----------------------------------------' + | | | / / / \ \ \ | | | + | | |/ / / \ \ 0 \ | 00 | . | + `-----------------------------' '------------------------------' + +ADJUST +,-----------------------------------------. ,-----------------------------------------. +| | | |FrqRst| | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | |Music |FrqUp |Sound | | | SPD+ | MOD+ | VAL+ | SAD+ | HUE+ | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | |Scale |FrqDwn| | |-------.-------. ,---------------| SPD- | SPD- | VAL- | SAD- | HUE- | | +`-----------------------------------------/ / / \ \ \----------------------------------------' + | | | / / / \ \ \ | | | + | | |/ / / \ \ \ | | | + `-----------------------------' '------------------------------' +``` diff --git a/keyboards/silverbullet44/readme.md b/keyboards/silverbullet44/readme.md new file mode 100644 index 000000000000..3de46ee6825d --- /dev/null +++ b/keyboards/silverbullet44/readme.md @@ -0,0 +1,18 @@ +# silverbullet44 + +![silverbullet44](https://cdn-ak.f.st-hatena.com/images/fotolife/s/swan_match/20191017/20191017020317.jpg) + +A hard keyboard with a hard keystroke that uses aluminum PCB for the top plate. +Upgradable from sandwich mount to top mount by using optional parts. + +* Keyboard Maintainer: [swan_match](https://github.com/swanmatch/) +* Hardware Supported: The PCBs, ProMicro +* Hardware Availability: [PCB & Case Data](https://github.com/swanmatch/silverbullet44), [Booth Shop](https://swanmatch.booth.pm/items/1561270) + +Make example for this keyboard (after setting up your build environment): + + make silverbullet44:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +[Build guide](https://swanmatch.github.io/silverbullet44/) diff --git a/keyboards/silverbullet44/rules.mk b/keyboards/silverbullet44/rules.mk new file mode 100644 index 000000000000..39c5a0451edc --- /dev/null +++ b/keyboards/silverbullet44/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +#RGB_MATRIX_ENABLE = WS2812 +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port B6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +SPLIT_KEYBOARD = yes +LTO_ENABLE = yes diff --git a/keyboards/silverbullet44/silverbullet44.c b/keyboards/silverbullet44/silverbullet44.c new file mode 100644 index 000000000000..7ae7a1269ed2 --- /dev/null +++ b/keyboards/silverbullet44/silverbullet44.c @@ -0,0 +1,45 @@ +/* Copyright 2019 SwanMatch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "silverbullet44.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 18, 7, 6, 0, 1, 2}, + { 19, 17, 8, 5, 4, 3}, + { 21, 20, 16, 9, 10, 11}, + { NO_LED, NO_LED, 15, 14, 13, 12}, +}, { + { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, + { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, + { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, + { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 }, + { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 }, + { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 }, + { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 }, + { 16, 24 }, { 16, 7 }, { 0, 7 } +}, { + 2, 2, 2, 2, 2, 2, 1, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 1, 4, + 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 1 +} }; + +#endif diff --git a/keyboards/silverbullet44/silverbullet44.h b/keyboards/silverbullet44/silverbullet44.h new file mode 100644 index 000000000000..7746a554c6a6 --- /dev/null +++ b/keyboards/silverbullet44/silverbullet44.h @@ -0,0 +1,43 @@ +/* Copyright 2019 SwanMatch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L32, L33, L34, L35, R35, R34, R33, R32 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { KC_NO, KC_NO, R32, R33, R34, R35 } \ +} From 66d7fc34b2214282fd822f66abca0905ec5a1ffe Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 21 Feb 2020 17:12:15 +1100 Subject: [PATCH 325/331] Add Arm Teensys to mcu_selection.mk (#8026) * Add Arm Teensys to mcu_selection.mk * Roll back halfkeyboard keymap changes * Remove extra newline --- keyboards/ergodox_infinity/rules.mk | 44 ++-------- keyboards/handwired/onekey/teensy_32/rules.mk | 44 +--------- keyboards/handwired/onekey/teensy_lc/rules.mk | 44 +--------- keyboards/infinity60/rules.mk | 36 ++------ keyboards/k_type/rules.mk | 43 +--------- keyboards/whitefox/rules.mk | 40 ++------- quantum/mcu_selection.mk | 82 +++++++++++++++++++ 7 files changed, 109 insertions(+), 224 deletions(-) diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 329ea8b9888d..31bc20454c30 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -1,15 +1,5 @@ -# project specific files -SRC = matrix.c \ - led.c - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -# - For Infinity KB, SERIES = K20x -MCU_FAMILY = KINETIS -MCU_SERIES = K20x +# MCU name +MCU = MK20DX256 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ @@ -23,32 +13,6 @@ MCU_SERIES = K20x # - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader MCU_LDSCRIPT = MK20DX256BLDR8 -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 and Infinity 60% -# - k20x7 for Teensy 3.1, 3.2 and Infinity ErgoDox -MCU_STARTUP = k20x7 - -# Board: it should exist either in /os/hal/boards/ -# or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -# - MCHCK_K20 for Infinity KB -#BOARD = MCHCK_K20 -BOARD = PJRC_TEENSY_3_1 - -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 7 - # Vector table for application # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB @@ -92,4 +56,8 @@ LED_DRIVER = is31fl3731c LED_WIDTH = 7 LED_HEIGHT = 7 +# project specific files +SRC = matrix.c \ + led.c + LAYOUTS = ergodox diff --git a/keyboards/handwired/onekey/teensy_32/rules.mk b/keyboards/handwired/onekey/teensy_32/rules.mk index 2c411c0eb6e4..c1b90d0d2bf7 100644 --- a/keyboards/handwired/onekey/teensy_32/rules.mk +++ b/keyboards/handwired/onekey/teensy_32/rules.mk @@ -1,45 +1,5 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -MCU_FAMILY = KINETIS -MCU_SERIES = K20x - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -MCU_LDSCRIPT = MK20DX256 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = k20x7 - -# Board: it should exist either in /os/hal/boards/ -# or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -BOARD = PJRC_TEENSY_3_1 - -# Cortex version -# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4 -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 7 - +# MCU name +MCU = MK20DX256 # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/teensy_lc/rules.mk b/keyboards/handwired/onekey/teensy_lc/rules.mk index 32ab07d9c1f2..c30730725275 100644 --- a/keyboards/handwired/onekey/teensy_lc/rules.mk +++ b/keyboards/handwired/onekey/teensy_lc/rules.mk @@ -1,45 +1,5 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -MCU_FAMILY = KINETIS -MCU_SERIES = KL2x - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -MCU_LDSCRIPT = MKL26Z64 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = kl2x - -# Board: it should exist either in /os/hal/boards/ -# or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -BOARD = PJRC_TEENSY_LC - -# Cortex version -# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4 -MCU = cortex-m0plus - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 6 - +# MCU name +MCU = MKL26Z64 # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index f93766af97c7..579eab0f3fa2 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -1,16 +1,5 @@ -# project specific files -SRC = matrix.c \ - led.c \ - led_controller.c - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -# - For Infinity KB, SERIES = K20x -MCU_FAMILY = KINETIS -MCU_SERIES = K20x +# MCU name +MCU = MK20DX128 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ @@ -23,14 +12,6 @@ MCU_SERIES = K20x # - MK20DX128BLDR4 for Infinity with Kiibohd bootloader MCU_LDSCRIPT = MK20DX128BLDR4 -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 and Infinity KB -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = k20x5 - # Board: it should exist either in /os/hal/boards/ # or /boards # - BOARD = @@ -40,14 +21,6 @@ MCU_STARTUP = k20x5 # - MCHCK_K20 for Infinity KB BOARD = MCHCK_K20 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 7 - # Vector table for application # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB @@ -72,6 +45,11 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file +# project specific files +SRC = matrix.c \ + led.c \ + led_controller.c + LAYOUTS = 60_ansi_split_bs_rshift diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index e53f316b99a7..56c4c606e3f3 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -1,14 +1,5 @@ -# project specific files -SRC = matrix.c - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -# - For Infinity KB, SERIES = K20x -MCU_FAMILY = KINETIS -MCU_SERIES = K20x +# MCU name +MCU = MK20DX256 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ @@ -22,40 +13,12 @@ MCU_SERIES = K20x # - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader MCU_LDSCRIPT = MK20DX256BLDR8 -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 and Infinity KB -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = k20x7 - # Board: it should exist either in /os/hal/boards/ # or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -# - MCHCK_K20 for Infinity KB - # This board was copied from PJRC_TEENSY_3_1. The only difference should be a # hack to ensure the watchdog has started before trying to disable it. BOARD = IC_TEENSY_3_1 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 7 - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootloader.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -#OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000 -OPT_DEFS = - DFU_ARGS = -d 1c11:b007 DFU_SUFFIX_ARGS = -p b007 -v 1c11 @@ -75,6 +38,8 @@ NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file DEBUG_ENABLE = yes +# project specific files +SRC = matrix.c # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 27c3c31416bf..14507e9dd279 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -1,15 +1,5 @@ -# project specific files -SRC = matrix.c \ - led.c - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -# - For Infinity KB, SERIES = K20x -MCU_FAMILY = KINETIS -MCU_SERIES = K20x +# MCU name +MCU = MK20DX256 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ @@ -23,14 +13,6 @@ MCU_SERIES = K20x # - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader MCU_LDSCRIPT = MK20DX256BLDR8 -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 and Infinity KB -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = k20x7 - # Board: it should exist either in /os/hal/boards/ # or /boards # - BOARD = @@ -40,20 +22,6 @@ MCU_STARTUP = k20x7 # - MCHCK_K20 for Infinity KB BOARD = IC_TEENSY_3_1 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 7 - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -#OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 -OPT_DEFS = - DFU_ARGS = -d 1c11:b007 DFU_SUFFIX_ARGS = -p b007 -v 1c11 @@ -75,6 +43,10 @@ BACKLIGHT_ENABLE = yes BACKLIGHT_DRIVER = custom VISUALIZER_ENABLE = yes +# project specific files +SRC = matrix.c \ + led.c + LED_DRIVER = is31fl3731c LED_WIDTH = 16 LED_HEIGHT = 5 diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index f41a9e8215d7..f15a4f58c08f 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -1,3 +1,85 @@ +ifneq ($(findstring MKL26Z64, $(MCU)),) + # Cortex version + MCU = cortex-m0plus + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 6 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = KL2x + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + # - NOTE: a custom ld script is needed for EEPROM on Teensy LC + MCU_LDSCRIPT ?= MKL26Z64 + + # Startup code to use + # - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= kl2x + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_LC +endif + +ifneq ($(findstring MK20DX128, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = K20x + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= MK20DX128 + + # Startup code to use + # - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= k20x5 + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_3 +endif + +ifneq ($(findstring MK20DX256, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = K20x + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= MK20DX256 + + # Startup code to use + # - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= k20x7 + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_3_1 +endif + ifneq ($(findstring STM32F303, $(MCU)),) # Cortex version MCU = cortex-m4 From 562482c234d464df6bedfaf9eb91ddc516e77ea3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 21 Feb 2020 18:21:38 +1100 Subject: [PATCH 326/331] Add Turkish keymap aliases and sendstring LUT (#7676) * Add Turkish keymap aliases and sendstring LUT * Split into F and Q layouts --- quantum/keymap_extras/keymap_turkish_f.h | 197 +++++++++++++++++++ quantum/keymap_extras/keymap_turkish_q.h | 156 +++++++++++++++ quantum/keymap_extras/sendstring_turkish_f.h | 99 ++++++++++ quantum/keymap_extras/sendstring_turkish_q.h | 99 ++++++++++ 4 files changed, 551 insertions(+) create mode 100644 quantum/keymap_extras/keymap_turkish_f.h create mode 100644 quantum/keymap_extras/keymap_turkish_q.h create mode 100644 quantum/keymap_extras/sendstring_turkish_f.h create mode 100644 quantum/keymap_extras/sendstring_turkish_q.h diff --git a/quantum/keymap_extras/keymap_turkish_f.h b/quantum/keymap_extras/keymap_turkish_f.h new file mode 100644 index 000000000000..acb130c838b9 --- /dev/null +++ b/quantum/keymap_extras/keymap_turkish_f.h @@ -0,0 +1,197 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "keymap.h" + +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ + │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ / │ - │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ F │ G │ Ğ │ I │ O │ D │ R │ N │ H │ P │ Q │ W │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ U │ İ │ E │ A │ Ü │ T │ K │ M │ L │ Y │ Ş │ X │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ < │ J │ Ö │ V │ C │ Ç │ Z │ S │ B │ . │ , │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define TR_PLUS KC_GRV // + +#define TR_1 KC_1 // 1 +#define TR_2 KC_2 // 2 +#define TR_3 KC_3 // 3 +#define TR_4 KC_4 // 4 +#define TR_5 KC_5 // 5 +#define TR_6 KC_6 // 6 +#define TR_7 KC_7 // 7 +#define TR_8 KC_8 // 8 +#define TR_9 KC_9 // 9 +#define TR_0 KC_0 // 0 +#define TR_SLSH KC_MINS // / +#define TR_MINS KC_EQL // - +// Row 2 +#define TR_F KC_Q // F +#define TR_G KC_W // G +#define TR_GBRV KC_E // Ğ +#define TR_I KC_R // I +#define TR_O KC_T // O +#define TR_D KC_Y // D +#define TR_R KC_U // R +#define TR_N KC_I // N +#define TR_H KC_O // H +#define TR_P KC_P // P +#define TR_Q KC_LBRC // Q +#define TR_W KC_RBRC // W +// Row 3 +#define TR_U KC_A // U +#define TR_IDOT KC_S // İ +#define TR_E KC_D // E +#define TR_A KC_F // A +#define TR_UDIA KC_G // Ü +#define TR_T KC_H // T +#define TR_K KC_J // K +#define TR_M KC_K // M +#define TR_L KC_L // L +#define TR_Y KC_SCLN // Y +#define TR_SCED KC_QUOT // Ş +#define TR_X KC_NUHS // X +// Row 4 +#define TR_LABK KC_NUBS // < +#define TR_J KC_Z // J +#define TR_ODIA KC_X // Ö +#define TR_V KC_C // V +#define TR_C KC_V // C +#define TR_CCED KC_B // Ç +#define TR_Z KC_N // Z +#define TR_S KC_M // S +#define TR_B KC_COMM // B +#define TR_DOT KC_DOT // . +#define TR_COMM KC_SLSH // , + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ * │ ! │ " │ ^ │ $ │ % │ & │ ' │ ( │ ) │ = │ ? │ _ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ > │   │   │   │   │   │   │   │   │ : │ ; │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define TR_ASTR S(TR_PLUS) // * +#define TR_EXLM S(TR_1) // ! +#define TR_DQUO S(TR_2) // " +#define TR_CIRC S(TR_3) // ^ (dead) +#define TR_DLR S(TR_4) // $ +#define TR_PERC S(TR_5) // % +#define TR_AMPR S(TR_6) // & +#define TR_QUOT S(TR_7) // ' +#define TR_LPRN S(TR_8) // ( +#define TR_RPRN S(TR_9) // ) +#define TR_EQL S(TR_0) // = +#define TR_QUES S(TR_ASTR) // ? +#define TR_UNDS S(TR_MINS) // _ +// Row 4 +#define TR_RABK S(TR_LABK) // > +#define TR_COLN S(TR_DOT) // : +#define TR_SCLN S(TR_COMM) // ; + +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ¬ │ ¹ │ ² │ # │ ¼ │ ½ │ ¾ │ { │ [ │ ] │ } │ \ │ | │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ @ │   │   │ ¶ │   │ ¥ │   │   │ Ø │ £ │ ¨ │ ~ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ Æ │ ß │ € │   │   │ ₺ │   │   │   │ ´ │   │ ` │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │ « │ » │ ¢ │   │   │   │ µ │ × │ ÷ │ - │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define TR_NOT ALGR(TR_PLUS) // ¬ +#define TR_SUP1 ALGR(TR_1) // ¹ +#define TR_SUP2 ALGR(TR_2) // ² +#define TR_HASH ALGR(TR_3) // # +#define TR_QRTR ALGR(TR_4) // ¼ +#define TR_HALF ALGR(TR_5) // ½ +#define TR_TQTR ALGR(TR_6) // ¾ +#define TR_LCBR ALGR(TR_7) // { +#define TR_LBRC ALGR(TR_8) // [ +#define TR_RBRC ALGR(TR_9) // ] +#define TR_RCBR ALGR(TR_0) // } +#define TR_BSLS ALGR(TR_SLSH) // (backslash) +#define TR_PIPE ALGR(TR_MINS) // | +// Row 2 +#define TR_AT ALGR(TR_F) // @ +#define TR_PILC ALGR(TR_I) // ¶ +#define TR_YEN ALGR(TR_D) // ¥ +#define TR_OSTR ALGR(TR_H) // Ø +#define TR_PND ALGR(TR_P) // £ +#define TR_DIAE ALGR(TR_Q) // ¨ (dead) +#define TR_TILD ALGR(TR_W) // ~ (dead) +// Row 3 +#define TR_AE ALGR(TR_U) // Æ +#define TR_SS ALGR(TR_IDOT) // ß +#define TR_EURO ALGR(TR_E) // € +#define TR_LIRA ALGR(TR_T) // ₺ +#define TR_ACUT ALGR(TR_Y) // ´ (dead) +#define TR_GRV ALGR(TR_X) // ` (dead) +// Row 4 +#define TR_LDAQ ALGR(TR_J) // « +#define TR_RDAQ ALGR(TR_ODIA) // » +#define TR_CENT ALGR(TR_V) // ¢ +#define TR_MICR ALGR(TR_S) // µ +#define TR_MUL ALGR(TR_B) // × +#define TR_DIV ALGR(TR_DOT) // ÷ +#define TR_SHYP ALGR(TR_COMM) // (soft hyphen) + +/* Shift+AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │   │   │   │ ³ │ ¤ │   │   │   │   │   │   │ ¿ │   │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │ ® │   │   │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │ § │   │ ª │   │   │   │   │   │   │   │   │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ ¦ │   │   │ © │   │   │   │ º │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define TR_SUP3 S(ALGR(TR_3)) // ³ +#define TR_CURR S(ALGR(TR_4)) // ¤ +#define TR_IQUE S(ALGR(TR_SLSH)) // ¿ +// Row 2 +#define TR_REGD S(ALGR(TR_I) // ® +// Row 3 +#define TR_SECT S(ALGR(TR_IDOT)) // § +#define TR_FORD S(ALGR(TR_A)) // ª +// Row 4 +#define TR_BRKP S(ALGR(TR_LABK)) // ¦ +#define TR_COPY S(ALGR(TR_V)) // © +#define TR_MORD S(ALGR(TR_S)) // º diff --git a/quantum/keymap_extras/keymap_turkish_q.h b/quantum/keymap_extras/keymap_turkish_q.h new file mode 100644 index 000000000000..738718d2d4a5 --- /dev/null +++ b/quantum/keymap_extras/keymap_turkish_q.h @@ -0,0 +1,156 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "keymap.h" + +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ " │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ * │ - │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Ğ │ Ü │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ş │ İ │ , │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ < │ Z │ X │ C │ V │ B │ N │ M │ Ö │ Ç │ . │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define TR_DQUO KC_GRV // " +#define TR_1 KC_1 // 1 +#define TR_2 KC_2 // 2 +#define TR_3 KC_3 // 3 +#define TR_4 KC_4 // 4 +#define TR_5 KC_5 // 5 +#define TR_6 KC_6 // 6 +#define TR_7 KC_7 // 7 +#define TR_8 KC_8 // 8 +#define TR_9 KC_9 // 9 +#define TR_0 KC_0 // 0 +#define TR_ASTR KC_MINS // * +#define TR_MINS KC_EQL // - +// Row 2 +#define TR_Q KC_Q // Q +#define TR_W KC_W // W +#define TR_E KC_E // E +#define TR_R KC_R // R +#define TR_T KC_T // T +#define TR_Y KC_Y // Y +#define TR_U KC_U // U +#define TR_I KC_I // I +#define TR_O KC_O // O +#define TR_P KC_P // P +#define TR_GBRV KC_LBRC // Ğ +#define TR_UDIA KC_RBRC // Ü +// Row 3 +#define TR_A KC_A // A +#define TR_S KC_S // S +#define TR_D KC_D // D +#define TR_F KC_F // F +#define TR_G KC_G // G +#define TR_H KC_H // H +#define TR_J KC_J // J +#define TR_K KC_K // K +#define TR_L KC_L // L +#define TR_SCED KC_SCLN // Ş +#define TR_IDOT KC_QUOT // İ +#define TR_COMM KC_NUHS // , +// Row 4 +#define TR_LABK KC_NUBS // < +#define TR_Z KC_Z // Z +#define TR_X KC_X // X +#define TR_C KC_C // C +#define TR_V KC_V // V +#define TR_B KC_B // B +#define TR_N KC_N // N +#define TR_M KC_M // M +#define TR_ODIA KC_COMM // Ö +#define TR_CCED KC_DOT // Ç +#define TR_DOT KC_SLSH // . + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ é │ ! │ ' │ ^ │ + │ % │ & │ / │ ( │ ) │ = │ ? │ _ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │   │ ; │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ > │   │   │   │   │   │   │   │   │   │ : │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define TR_EACU S(TR_DQUO) // é +#define TR_EXLM S(TR_1) // ! +#define TR_QUOT S(TR_2) // ' +#define TR_CIRC S(TR_3) // ^ (dead) +#define TR_PLUS S(TR_4) // + +#define TR_PERC S(TR_5) // % +#define TR_AMPR S(TR_6) // & +#define TR_SLSH S(TR_7) // / +#define TR_LPRN S(TR_8) // ( +#define TR_RPRN S(TR_9) // ) +#define TR_EQL S(TR_0) // = +#define TR_QUES S(TR_ASTR) // ? +#define TR_UNDS S(TR_MINS) // _ +// Row 3 +#define TR_SCLN S(TR_COMM) // ; +// Row 4 +#define TR_RABK S(TR_LABK) // > +#define TR_COLN S(TR_DOT) // : + +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │   │   │ £ │ # │ $ │ ½ │   │ { │ [ │ ] │ } │ \ │ | │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ @ │   │ € │   │ ₺ │   │   │   │   │   │ ¨ │ ~ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ Æ │ ß │   │   │   │   │   │   │   │ ´ │   │ ` │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define TR_PND ALGR(TR_2) // £ +#define TR_HASH ALGR(TR_3) // # +#define TR_DLR ALGR(TR_4) // $ +#define TR_HALF ALGR(TR_5) // ½ +#define TR_LCBR ALGR(TR_7) // { +#define TR_LBRC ALGR(TR_8) // [ +#define TR_RBRC ALGR(TR_9) // ] +#define TR_RCBR ALGR(TR_0) // } +#define TR_BSLS ALGR(TR_ASTR) // (backslash) +#define TR_PIPE ALGR(TR_MINS) // | +// Row 2 +#define TR_AT ALGR(TR_Q) // @ +#define TR_EURO ALGR(TR_E) // € +#define TR_LIRA ALGR(TR_T) // ₺ +#define TR_DIAE ALGR(TR_GBRV) // ¨ (dead) +#define TR_TILD ALGR(TR_UDIA) // ~ (dead) +// Row 3 +#define TR_AE ALGR(TR_A) // Æ +#define TR_SS ALGR(TR_S) // ß +#define TR_ACUT ALGR(TR_SCED) // ´ (dead) +#define TR_GRV ALGR(TR_COMM) // ` (dead) diff --git a/quantum/keymap_extras/sendstring_turkish_f.h b/quantum/keymap_extras/sendstring_turkish_f.h new file mode 100644 index 000000000000..82dbbdbcb447 --- /dev/null +++ b/quantum/keymap_extras/sendstring_turkish_f.h @@ -0,0 +1,99 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for Turkish F layouts + +#pragma once + +#include "keymap_turkish_f.h" + +// clang-format off + +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const bool ascii_to_altgr_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7, + // ( ) * + , - . / + TR_8, TR_9, TR_PLUS, TR_PLUS, TR_COMM, TR_MINS, TR_DOT, TR_SLSH, + // 0 1 2 3 4 5 6 7 + TR_0, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7, + // 8 9 : ; < = > ? + TR_8, TR_9, TR_DOT, TR_COMM, TR_LABK, TR_0, TR_LABK, TR_SLSH, + // @ A B C D E F G + TR_F, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G, + // H I J K L M N O + TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O, + // P Q R S T U V W + TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W, + // X Y Z [ \ ] ^ _ + TR_X, TR_Y, TR_Z, TR_8, TR_SLSH, TR_9, TR_3, TR_MINS, + // ` a b c d e f g + TR_X, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G, + // h i j k l m n o + TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O, + // p q r s t u v w + TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W, + // x y z { | } ~ DEL + TR_X, TR_Y, TR_Z, TR_7, TR_MINS, TR_0, TR_W, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_turkish_q.h b/quantum/keymap_extras/sendstring_turkish_q.h new file mode 100644 index 000000000000..58505b84966d --- /dev/null +++ b/quantum/keymap_extras/sendstring_turkish_q.h @@ -0,0 +1,99 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for Turkish Q layouts + +#pragma once + +#include "keymap_turkish_q.h" + +// clang-format off + +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 0, 0, 0, 1, 1, 1, + 1, 1, 0, 1, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const bool ascii_to_altgr_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, TR_1, TR_DQUO, TR_3, TR_4, TR_5, TR_6, TR_2, + // ( ) * + , - . / + TR_8, TR_9, TR_ASTR, TR_4, TR_COMM, TR_MINS, TR_DOT, TR_7, + // 0 1 2 3 4 5 6 7 + TR_0, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7, + // 8 9 : ; < = > ? + TR_8, TR_9, TR_DOT, TR_COMM, TR_LABK, TR_0, TR_LABK, TR_ASTR, + // @ A B C D E F G + TR_Q, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G, + // H I J K L M N O + TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O, + // P Q R S T U V W + TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W, + // X Y Z [ \ ] ^ _ + TR_X, TR_Y, TR_Z, TR_8, TR_ASTR, TR_9, TR_3, TR_MINS, + // ` a b c d e f g + TR_COMM, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G, + // h i j k l m n o + TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O, + // p q r s t u v w + TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W, + // x y z { | } ~ DEL + TR_X, TR_Y, TR_Z, TR_7, TR_MINS, TR_0, TR_UDIA, KC_DEL +}; From 67ee050a0e80359b5b58ea1767adfb96b5bdace5 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Fri, 21 Feb 2020 05:25:17 -0500 Subject: [PATCH 327/331] S75 Encoder Fixes (#7758) * S75 Encoder Fixes * Flip encoder pins vs using setting --- keyboards/cannonkeys/satisfaction75/config.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 69d02806e20d..49ed407b3ba0 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -35,8 +35,10 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 } #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A { B9 } -#define ENCODERS_PAD_B { B8 } +#define ENCODERS_PAD_A { B8 } +#define ENCODERS_PAD_B { B9 } + +#define ENCODER_RESOLUTION 2 //LEDS A6, RGB B15 #define BACKLIGHT_LEVELS 24 From 1751c3cc25ecc1734976d9790598d64133ee306d Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 21 Feb 2020 02:32:30 -0800 Subject: [PATCH 328/331] uart.c fix from TMK (#7628) * uart.c fix from TMK Backport from tmk/tmk_keyboard@c41e48a0ab0712d2667feb6b5dd8a4d5491cfcc5 * Avoid deadlock when uart.c is usind in ISR Backport from tmk/tmk_keyboard@55443fabb731459e21b45781c6d951edac5d75f4 --- tmk_core/common/uart.c | 54 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/tmk_core/common/uart.c b/tmk_core/common/uart.c index f2e4bc4f34e9..412fcf8e1ae8 100644 --- a/tmk_core/common/uart.c +++ b/tmk_core/common/uart.c @@ -31,9 +31,41 @@ #include "uart.h" +#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__) +# define UDRn UDR0 +# define UBRRn UBRR0 +# define UCSRnA UCSR0A +# define UCSRnB UCSR0B +# define UCSRnC UCSR0C +# define U2Xn U2X0 +# define RXENn RXEN0 +# define TXENn TXEN0 +# define RXCIEn RXCIE0 +# define UCSZn1 UCSZ01 +# define UCSZn0 UCSZ00 +# define UDRIEn UDRIE0 +# define UDRE_vect USART_UDRE_vect +# define RX_vect USART_RX_vect +#elif defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega32U2__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) +# define UDRn UDR1 +# define UBRRn UBRR1 +# define UCSRnA UCSR1A +# define UCSRnB UCSR1B +# define UCSRnC UCSR1C +# define U2Xn U2X1 +# define RXENn RXEN1 +# define TXENn TXEN1 +# define RXCIEn RXCIE1 +# define UCSZn1 UCSZ11 +# define UCSZn0 UCSZ10 +# define UDRIEn UDRIE1 +# define UDRE_vect USART1_UDRE_vect +# define RX_vect USART1_RX_vect +#endif + // These buffers may be any size from 2 to 256 bytes. #define RX_BUFFER_SIZE 64 -#define TX_BUFFER_SIZE 40 +#define TX_BUFFER_SIZE 256 static volatile uint8_t tx_buffer[TX_BUFFER_SIZE]; static volatile uint8_t tx_buffer_head; @@ -45,10 +77,10 @@ static volatile uint8_t rx_buffer_tail; // Initialize the UART void uart_init(uint32_t baud) { cli(); - UBRR0 = (F_CPU / 4 / baud - 1) / 2; - UCSR0A = (1 << U2X0); - UCSR0B = (1 << RXEN0) | (1 << TXEN0) | (1 << RXCIE0); - UCSR0C = (1 << UCSZ01) | (1 << UCSZ00); + UBRRn = (F_CPU / 4 / baud - 1) / 2; + UCSRnA = (1 << U2Xn); + UCSRnB = (1 << RXENn) | (1 << TXENn) | (1 << RXCIEn); + UCSRnC = (1 << UCSZn1) | (1 << UCSZn0); tx_buffer_head = tx_buffer_tail = 0; rx_buffer_head = rx_buffer_tail = 0; sei(); @@ -60,12 +92,14 @@ void uart_putchar(uint8_t c) { i = tx_buffer_head + 1; if (i >= TX_BUFFER_SIZE) i = 0; + // return immediately to avoid deadlock when interrupt is disabled(called from ISR) + if (tx_buffer_tail == i && (SREG & (1<= TX_BUFFER_SIZE) i = 0; @@ -110,10 +144,10 @@ ISR(USART_UDRE_vect) { } // Receive Interrupt -ISR(USART_RX_vect) { +ISR(RX_vect) { uint8_t c, i; - c = UDR0; + c = UDRn; i = rx_buffer_head + 1; if (i >= RX_BUFFER_SIZE) i = 0; if (i != rx_buffer_tail) { From a7d859dab86ee0d741559da68eee14949116fe16 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Fri, 21 Feb 2020 11:04:05 +0000 Subject: [PATCH 329/331] format code according to conventions [skip ci] --- tmk_core/common/uart.c | 62 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/tmk_core/common/uart.c b/tmk_core/common/uart.c index 412fcf8e1ae8..ccf7f7ff01e8 100644 --- a/tmk_core/common/uart.c +++ b/tmk_core/common/uart.c @@ -32,35 +32,35 @@ #include "uart.h" #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__) -# define UDRn UDR0 -# define UBRRn UBRR0 -# define UCSRnA UCSR0A -# define UCSRnB UCSR0B -# define UCSRnC UCSR0C -# define U2Xn U2X0 -# define RXENn RXEN0 -# define TXENn TXEN0 -# define RXCIEn RXCIE0 -# define UCSZn1 UCSZ01 -# define UCSZn0 UCSZ00 -# define UDRIEn UDRIE0 -# define UDRE_vect USART_UDRE_vect -# define RX_vect USART_RX_vect +# define UDRn UDR0 +# define UBRRn UBRR0 +# define UCSRnA UCSR0A +# define UCSRnB UCSR0B +# define UCSRnC UCSR0C +# define U2Xn U2X0 +# define RXENn RXEN0 +# define TXENn TXEN0 +# define RXCIEn RXCIE0 +# define UCSZn1 UCSZ01 +# define UCSZn0 UCSZ00 +# define UDRIEn UDRIE0 +# define UDRE_vect USART_UDRE_vect +# define RX_vect USART_RX_vect #elif defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega32U2__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) -# define UDRn UDR1 -# define UBRRn UBRR1 -# define UCSRnA UCSR1A -# define UCSRnB UCSR1B -# define UCSRnC UCSR1C -# define U2Xn U2X1 -# define RXENn RXEN1 -# define TXENn TXEN1 -# define RXCIEn RXCIE1 -# define UCSZn1 UCSZ11 -# define UCSZn0 UCSZ10 -# define UDRIEn UDRIE1 -# define UDRE_vect USART1_UDRE_vect -# define RX_vect USART1_RX_vect +# define UDRn UDR1 +# define UBRRn UBRR1 +# define UCSRnA UCSR1A +# define UCSRnB UCSR1B +# define UCSRnC UCSR1C +# define U2Xn U2X1 +# define RXENn RXEN1 +# define TXENn TXEN1 +# define RXCIEn RXCIE1 +# define UCSZn1 UCSZ11 +# define UCSZn0 UCSZ10 +# define UDRIEn UDRIE1 +# define UDRE_vect USART1_UDRE_vect +# define RX_vect USART1_RX_vect #endif // These buffers may be any size from 2 to 256 bytes. @@ -92,14 +92,14 @@ void uart_putchar(uint8_t c) { i = tx_buffer_head + 1; if (i >= TX_BUFFER_SIZE) i = 0; - // return immediately to avoid deadlock when interrupt is disabled(called from ISR) - if (tx_buffer_tail == i && (SREG & (1< Date: Sat, 22 Feb 2020 00:40:28 +1100 Subject: [PATCH 330/331] Add Danish keymap and sendstring LUT (#8218) --- quantum/keymap_extras/keymap_danish.h | 153 ++++++++++++++++++++++ quantum/keymap_extras/sendstring_danish.h | 99 ++++++++++++++ 2 files changed, 252 insertions(+) create mode 100644 quantum/keymap_extras/keymap_danish.h create mode 100644 quantum/keymap_extras/sendstring_danish.h diff --git a/quantum/keymap_extras/keymap_danish.h b/quantum/keymap_extras/keymap_danish.h new file mode 100644 index 000000000000..618e42ccf1e4 --- /dev/null +++ b/quantum/keymap_extras/keymap_danish.h @@ -0,0 +1,153 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "keymap.h" + +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ½ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Æ │ Ø │ ' │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DK_HALF KC_GRV // ½ +#define DK_1 KC_1 // 1 +#define DK_2 KC_2 // 2 +#define DK_3 KC_3 // 3 +#define DK_4 KC_4 // 4 +#define DK_5 KC_5 // 5 +#define DK_6 KC_6 // 6 +#define DK_7 KC_7 // 7 +#define DK_8 KC_8 // 8 +#define DK_9 KC_9 // 9 +#define DK_0 KC_0 // 0 +#define DK_PLUS KC_MINS // + +#define DK_ACUT KC_EQL // ´ (dead) +// Row 2 +#define DK_Q KC_Q // Q +#define DK_W KC_W // W +#define DK_E KC_E // E +#define DK_R KC_R // R +#define DK_T KC_T // T +#define DK_Y KC_Y // Y +#define DK_U KC_U // U +#define DK_I KC_I // I +#define DK_O KC_O // O +#define DK_P KC_P // P +#define DK_ARNG KC_LBRC // Å +#define DK_DIAE KC_RBRC // ¨ (dead) +// Row 3 +#define DK_A KC_A // A +#define DK_S KC_S // S +#define DK_D KC_D // D +#define DK_F KC_F // F +#define DK_G KC_G // G +#define DK_H KC_H // H +#define DK_J KC_J // J +#define DK_K KC_K // K +#define DK_L KC_L // L +#define DK_AE KC_SCLN // Æ +#define DK_OSTR KC_QUOT // Ø +#define DK_QUOT KC_NUHS // ' +// Row 4 +#define DK_LABK KC_NUBS // < +#define DK_Z KC_Z // Z +#define DK_X KC_X // X +#define DK_C KC_C // C +#define DK_V KC_V // V +#define DK_B KC_B // B +#define DK_N KC_N // N +#define DK_M KC_M // M +#define DK_COMM KC_COMM // , +#define DK_DOT KC_DOT // . +#define DK_MINS KC_SLSH // - + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ § │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │ ^ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │   │ * │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DK_SECT S(DK_HALF) // § +#define DK_EXLM S(DK_1) // ! +#define DK_DQUO S(DK_2) // " +#define DK_HASH S(DK_3) // # +#define DK_CURR S(DK_4) // ¤ +#define DK_PERC S(DK_5) // % +#define DK_AMPR S(DK_6) // & +#define DK_SLSH S(DK_7) // / +#define DK_LPRN S(DK_8) // ( +#define DK_RPRN S(DK_9) // ) +#define DK_EQL S(DK_0) // = +#define DK_QUES S(DK_PLUS) // ? +#define DK_GRV S(DK_ACUT) // ` (dead) +// Row 2 +#define DK_CIRC S(DK_DIAE) // ^ (dead) +// Row 3 +#define DK_ASTR S(DK_QUOT) // * +// Row 4 +#define DK_RABK S(DK_LABK) // > +#define DK_SCLN S(DK_COMM) // ; +#define DK_COLN S(DK_DOT) // : +#define DK_UNDS S(DK_MINS) // _ + +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │   │   │ @ │ £ │ $ │ € │   │ { │ [ │ ] │ } │   │ | │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │ ~ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ \ │   │   │   │   │   │   │ µ │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DK_AT ALGR(DK_2) // @ +#define DK_PND ALGR(DK_3) // £ +#define DK_DLR ALGR(DK_4) // $ +#define DK_EURO ALGR(DK_5) // € +#define DK_LCBR ALGR(DK_7) // { +#define DK_LBRC ALGR(DK_8) // [ +#define DK_RBRC ALGR(DK_9) // ] +#define DK_RCBR ALGR(DK_0) // } +#define DK_PIPE ALGR(DK_ACUT) // | +// Row 2 +#define DK_TILD ALGR(DK_DIAE) // ~ (dead) +// Row 4 +#define DK_BSLS ALGR(DK_LABK) // (backslash) +#define DK_MICR ALGR(DK_M) // µ diff --git a/quantum/keymap_extras/sendstring_danish.h b/quantum/keymap_extras/sendstring_danish.h new file mode 100644 index 000000000000..3505a076bd30 --- /dev/null +++ b/quantum/keymap_extras/sendstring_danish.h @@ -0,0 +1,99 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for Danish layouts + +#pragma once + +#include "keymap_danish.h" + +// clang-format off + +const bool ascii_to_shift_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 1, 1, 0, 1, 1, 0, + 1, 1, 1, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const bool ascii_to_altgr_lut[128] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, DK_1, DK_2, DK_3, DK_4, DK_5, DK_6, DK_QUOT, + // ( ) * + , - . / + DK_8, DK_9, DK_QUOT, DK_PLUS, DK_COMM, DK_MINS, DK_DOT, DK_7, + // 0 1 2 3 4 5 6 7 + DK_0, DK_1, DK_2, DK_3, DK_4, DK_5, DK_6, DK_7, + // 8 9 : ; < = > ? + DK_8, DK_9, DK_DOT, DK_COMM, DK_LABK, DK_0, DK_LABK, DK_PLUS, + // @ A B C D E F G + DK_2, DK_A, DK_B, DK_C, DK_D, DK_E, DK_F, DK_G, + // H I J K L M N O + DK_H, DK_I, DK_J, DK_K, DK_L, DK_M, DK_N, DK_O, + // P Q R S T U V W + DK_P, DK_Q, DK_R, DK_S, DK_T, DK_U, DK_V, DK_W, + // X Y Z [ \ ] ^ _ + DK_X, DK_Y, DK_Z, DK_8, DK_LABK, DK_9, DK_DIAE, DK_MINS, + // ` a b c d e f g + DK_ACUT, DK_A, DK_B, DK_C, DK_D, DK_E, DK_F, DK_G, + // h i j k l m n o + DK_H, DK_I, DK_J, DK_K, DK_L, DK_M, DK_N, DK_O, + // p q r s t u v w + DK_P, DK_Q, DK_R, DK_S, DK_T, DK_U, DK_V, DK_W, + // x y z { | } ~ DEL + DK_X, DK_Y, DK_Z, DK_7, DK_ACUT, DK_0, DK_DIAE, KC_DEL +}; From 35fe1c452ba12544ab10bbe7beca3bf0d58ed939 Mon Sep 17 00:00:00 2001 From: Luc Lebel Date: Tue, 25 Feb 2020 10:27:36 -0500 Subject: [PATCH 331/331] helix like crkbd --- keyboards/helix/rev2/keymaps/nesth/keymap.c | 51 ++++++++++++++------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/keyboards/helix/rev2/keymaps/nesth/keymap.c b/keyboards/helix/rev2/keymaps/nesth/keymap.c index daeae0206cbf..bc7e03fa1568 100644 --- a/keyboards/helix/rev2/keymaps/nesth/keymap.c +++ b/keyboards/helix/rev2/keymaps/nesth/keymap.c @@ -31,6 +31,10 @@ enum layer_number { _ADJUST }; +// Custom keycodes for layer keys +// Dual function escape with left command +#define KC_LGESC LGUI_T(KC_ESC) + enum custom_keycodes { QWERTY = SAFE_RANGE, LOWER, @@ -38,7 +42,8 @@ enum custom_keycodes { FUNC, ADJUST, BACKLIT, - RGBRST + RGBRST, + KC_RACL // right alt / colon }; enum macro_keycodes { @@ -67,8 +72,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ FUNC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ - KC_LCTL, KC_LCTL, KC_LALT, ADJUST, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LCTL, KC_LALT, ADJUST, KC_LGESC,LOWER, KC_SPC , KC_ENT, RAISE, KC_RACL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower @@ -85,11 +90,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, KC_RSFT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_LCTL, KC_NO, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_NO, KC_NO, \ + KC_LSFT, KC_NO, KC_BTN2, KC_WH_D, KC_WH_U, KC_BTN1,KC_LPRN,KC_RPRN,KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_LGESC,LOWER, KC_SPC, KC_ENT, RAISE, KC_RACL, KC_NO, KC_NO, KC_NO, KC_NO \ ), /* Raise @@ -106,11 +111,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_LCTL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, \ + KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, \ + _______, _______, _______, _______, KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Function @@ -149,10 +154,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ + RESET, RGBRST, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, KC_DEL, \ + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, KC_PAUSE, KC__VOLUP, _______, _______, _______, _______, \ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, \ + _______, _______, _______, _______, KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT, _______, _______, _______, _______ \ ) }; @@ -192,6 +197,7 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t my_colon_timer; switch (keycode) { case QWERTY: if (record->event.pressed) { @@ -275,6 +281,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif return false; break; + case KC_RACL: + if (record->event.pressed) { + my_colon_timer = timer_read(); + register_code(KC_RALT); + } else { + unregister_code(KC_RALT); + if (timer_elapsed(my_colon_timer) < TAPPING_TERM) { + SEND_STRING(":"); // Change the character(s) to be sent on tap here + } + } + return false; case RGBRST: #ifdef RGBLIGHT_ENABLE if (record->event.pressed) {