From 156fd4e9693e05fb12933bddb49e1a387fa1fab3 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 20 Apr 2019 12:09:47 -0700 Subject: [PATCH 001/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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/973] 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 25d1901d7a275e05b29630b877f0fa41224a91db Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 29 Oct 2019 23:57:21 +0000 Subject: [PATCH 016/973] Update software backlight to precalculated duty patterns --- quantum/backlight/backlight_soft.c | 37 ++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/quantum/backlight/backlight_soft.c b/quantum/backlight/backlight_soft.c index a6aba7782cba..f481dbae890b 100644 --- a/quantum/backlight/backlight_soft.c +++ b/quantum/backlight/backlight_soft.c @@ -20,6 +20,7 @@ { BACKLIGHT_PIN } #endif +static uint16_t s_duty_pattern = 0; static const pin_t backlight_pins[] = BACKLIGHT_PIN_INIT; #define BACKLIGHT_LED_COUNT (sizeof(backlight_pins) / sizeof(pin_t)) @@ -46,21 +47,43 @@ void backlight_off(pin_t backlight_pin) { } 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);) + // Setup backlight pin as output and output to off state. + FOR_EACH_LED(setPinOutput(backlight_pin); backlight_off(backlight_pin);) } +// clang-format off + +/** \brief PWM duty patterns + * + * We scale the current backlight level to an index within this array. This allows + * backlight_task to focus on just switching LEDs on/off, and we can predict the duty pattern + */ +static uint16_t backlight_duty_table[] = { + 0b0000000000000000, + 0b1000000000000000, + 0b1000000010000000, + 0b1000001000010000, + 0b1000100010001000, + 0b1001001001001000, + 0b1010101010101010, + 0b1110111011101110, + 0b1111111111111111, +}; +#define backlight_duty_table_size (sizeof(backlight_duty_table) / sizeof(backlight_duty_table[0])) + +// clang-format on + +static uint8_t scale_backlight(uint8_t v) { return v * (backlight_duty_table_size - 1) / BACKLIGHT_LEVELS; } + +void backlight_set(uint8_t level) { s_duty_pattern = backlight_duty_table[scale_backlight(level)]; } + void backlight_task(void) { static uint8_t backlight_tick = 0; - if ((0xFFFF >> (get_backlight_level() * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { + if (s_duty_pattern & ((uint16_t)1 << backlight_tick)) { FOR_EACH_LED(backlight_on(backlight_pin);) } else { FOR_EACH_LED(backlight_off(backlight_pin);) } backlight_tick = (backlight_tick + 1) % 16; } - -void backlight_set(uint8_t level) { - // noop as backlight_task uses get_backlight_level() -} From 6bcaf01c3f4625c536f25ca5ab75fa0e136a598d Mon Sep 17 00:00:00 2001 From: William Chang Date: Wed, 20 Nov 2019 23:03:47 -0800 Subject: [PATCH 017/973] 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 018/973] 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 019/973] 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 020/973] 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 021/973] 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 022/973] 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 023/973] 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 024/973] 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 025/973] 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 10e8ed7430653a50a9859301f1ac25894341c197 Mon Sep 17 00:00:00 2001 From: Igor Hideki Trindade Date: Tue, 10 Dec 2019 14:19:12 -0400 Subject: [PATCH 026/973] [Docs] add README translation in portuguese (#7016) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add README translation in portuguese * add lang in menu * Update docs/pt-br/README.md * Update docs/pt-br/README.md * Update docs/pt-br/README.md * Update docs/pt-br/README.md * Update docs/pt-br/README.md * Update docs/pt-br/README.md * Update docs/pt-br/README.md * Update docs/pt-br/_summary.md * Update sumary links * Update README Co-Authored-By: Álvaro A. Volpato --- docs/_langs.md | 1 + docs/index.html | 2 + docs/pt-br/README.md | 31 +++++++++++ docs/pt-br/_summary.md | 121 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+) create mode 100644 docs/pt-br/README.md create mode 100644 docs/pt-br/_summary.md diff --git a/docs/_langs.md b/docs/_langs.md index 7fb4a29d33f5..f7b375fb9452 100644 --- a/docs/_langs.md +++ b/docs/_langs.md @@ -4,5 +4,6 @@ - [:es: Español](/es/) - [:fr: Français](/fr-fr/) - [:he: עברית](/he-il/) + - [:brazil: Português](/pt-br/) - [:ru: Русский](/ru-ru/) - [:jp: 日本語](/ja/) diff --git a/docs/index.html b/docs/index.html index 5ca0fa6fab53..20614c0812c4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -60,12 +60,14 @@ '/es/': 'Buscar', '/zh-cn/': '搜索', '/ja/': '検索', + '/pt-br/': 'Busca', '/': 'Search' }, noData: { '/es/': '¡Ningún resultado!', '/zh-cn/': '没有结果!', '/ja/': '見つかりません!', + '/pt-br/': 'Nenhum resultado!', '/': 'No results!' }, depth: 6 diff --git a/docs/pt-br/README.md b/docs/pt-br/README.md new file mode 100644 index 000000000000..7cff6ce621fb --- /dev/null +++ b/docs/pt-br/README.md @@ -0,0 +1,31 @@ +# Quantum Mechanical Keyboard Firmware + +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## O que é o firmware QMK? +QMK (*Quantum Mechanical Keyboard*) é uma comunidade de código aberto que mantém o QMK Firmware, o QMK Toolbox, qmk.fm e suas documentações. O QMK Firmware é um software embarcado ("firmware") de teclado baseado no [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) com alguns recursos úteis para os controladores Atmel AVR e, mais especificamente, na [linha de produtos OLKB](http://olkb.com), o teclado [ErgoDox EZ](http://www.ergodox-ez.com) e a [linha de produtos Clueboard](http://clueboard.co/). Também foi portado para chips ARM usando o ChibiOS. Você pode usá-lo no seu próprio teclado com fio ou personalizado. + +## Como obter e usar o QMK + +Se você planeja contribuir com um _keymap_ ("mapa de teclas"), teclado ou recursos para o QMK, o jeito mais fácil é [percorrer o repositório através do Github](https://github.com/qmk/qmk_firmware#fork-destination-box) e clonar seu repositório localmente para fazer suas alterações, dê um _push_ nelas e abra uma [_Pull request_](https://github.com/qmk/qmk_firmware/pulls) no seu fork. + +Caso contrário, você pode cloná-lo diretamente com `git clone https://github.com/qmk/qmk_firmware`. Não faça o download dos arquivos zip ou tar; é necessário um repositório git para baixar os submódulos para compilar. + +## Como compilar + +Antes de compilar, você precisará [instalar um ambiente específico](getting_started_build_tools.md) para o desenvolvimento em plataforma AVR e/ou ARM; vez que isto for feito, você usará o comando `make` para criar um teclado e um mapa de teclas com a seguinte notação: + + make planck/rev4:default + +Isso compilaria a revisão `rev4` do teclado ` planck` com o mapa de teclas `default`. Nem todos os teclados têm revisões (também chamadas de _subprojects_ ou _folders_); nesse caso, a revisão pode ser omitida: + + make preonic:default + +## Como personalizar + +O QMK tem muitos [recursos](features.md) para explorar e uma boa quantidade de [documentação de referência](http://docs.qmk.fm) para explorar. A maioria dos recursos é aproveitada modificando seu [keymap](keymap.md) e alterando os [keycodes](keycodes.md). diff --git a/docs/pt-br/_summary.md b/docs/pt-br/_summary.md new file mode 100644 index 000000000000..27efd73ab222 --- /dev/null +++ b/docs/pt-br/_summary.md @@ -0,0 +1,121 @@ +* [Complete Newbs Guide](pt-br/newbs.md) + * [Getting Started](pt-br/newbs_getting_started.md) + * [Building Your First Firmware](pt-br/newbs_building_firmware.md) + * [Flashing Firmware](pt-br/newbs_flashing.md) + * [Testing and Debugging](pt-br/newbs_testing_debugging.md) + * [Git Best Practices](pt-br/newbs_best_practices.md) + * [Learning Resources](pt-br/newbs_learn_more_resources.md) + +* [QMK Basics](pt-br/README.md) + * [QMK Introduction](pt-br/getting_started_introduction.md) + * [QMK CLI](pt-br/cli.md) + * [QMK CLI Config](pt-br/cli_configuration.md) + * [Contributing to QMK](pt-br/contributing.md) + * [How to Use Github](pt-br/getting_started_github.md) + * [Getting Help](pt-br/getting_started_getting_help.md) + +* [Breaking Changes](pt-br/breaking_changes.md) + * [2019 Aug 30](pt-br/ChangeLog/20190830.md) + +* [FAQ](faq.md) + * [General FAQ](pt-br/faq_general.md) + * [Build/Compile QMK](pt-br/faq_build.md) + * [Debugging/Troubleshooting QMK](pt-br/faq_debug.md) + * [Keymap](pt-br/faq_keymap.md) + * [Driver Installation with Zadig](pt-br/driver_installation_zadig.md) + +* Detailed Guides + * [Install Build Tools](pt-br/getting_started_build_tools.md) + * [Vagrant Guide](pt-br/getting_started_vagrant.md) + * [Build/Compile Instructions](pt-br/getting_started_make_guide.md) + * [Flashing Firmware](pt-br/flashing.md) + * [Customizing Functionality](pt-br/custom_quantum_functions.md) + * [Keymap Overview](pt-br/keymap.md) + +* [Hardware](hardware.md) + * [AVR Processors](pt-br/hardware_avr.md) + * [Drivers](pt-br/hardware_drivers.md) + +* Reference + * [Keyboard Guidelines](pt-br/hardware_keyboard_guidelines.md) + * [Config Options](pt-br/config_options.md) + * [Keycodes](pt-br/keycodes.md) + * [Coding Conventions - C](pt-br/coding_conventions_c.md) + * [Coding Conventions - Python](pt-br/coding_conventions_python.md) + * [Documentation Best Practices](pt-br/documentation_best_practices.md) + * [Documentation Templates](pt-br/documentation_templates.md) + * [Glossary](pt-br/reference_glossary.md) + * [Unit Testing](pt-br/unit_testing.md) + * [Useful Functions](pt-br/ref_functions.md) + * [Configurator Support](pt-br/reference_configurator_support.md) + * [info.json Format](pt-br/reference_info_json.md) + * [Python CLI Development](pt-br/cli_development.md) + +* [Features](pt-br/features.md) + * [Basic Keycodes](pt-br/keycodes_basic.md) + * [US ANSI Shifted Keys](pt-br/keycodes_us_ansi_shifted.md) + * [Quantum Keycodes](pt-br/quantum_keycodes.md) + * [Advanced Keycodes](pt-br/feature_advanced_keycodes.md) + * [Audio](pt-br/feature_audio.md) + * [Auto Shift](pt-br/feature_auto_shift.md) + * [Backlight](pt-br/feature_backlight.md) + * [Bluetooth](pt-br/feature_bluetooth.md) + * [Bootmagic](pt-br/feature_bootmagic.md) + * [Combos](pt-br/feature_combo.md) + * [Command](pt-br/feature_command.md) + * [Debounce API](pt-br/feature_debounce_type.md) + * [DIP Switch](pt-br/feature_dip_switch.md) + * [Dynamic Macros](pt-br/feature_dynamic_macros.md) + * [Encoders](pt-br/feature_encoders.md) + * [Grave Escape](pt-br/feature_grave_esc.md) + * [Haptic Feedback](pt-br/feature_haptic_feedback.md) + * [HD44780 LCD Controller](pt-br/feature_hd44780.md) + * [Key Lock](pt-br/feature_key_lock.md) + * [Layouts](pt-br/feature_layouts.md) + * [Leader Key](pt-br/feature_leader_key.md) + * [LED Matrix](pt-br/feature_led_matrix.md) + * [Macros](pt-br/feature_macros.md) + * [Mouse Keys](pt-br/feature_mouse_keys.md) + * [OLED Driver](pt-br/feature_oled_driver.md) + * [One Shot Keys](pt-br/feature_advanced_keycodes.md#one-shot-keys) + * [Pointing Device](pt-br/feature_pointing_device.md) + * [PS/2 Mouse](pt-br/feature_ps2_mouse.md) + * [RGB Lighting](pt-br/feature_rgblight.md) + * [RGB Matrix](pt-br/feature_rgb_matrix.md) + * [Space Cadet](pt-br/feature_space_cadet.md) + * [Split Keyboard](pt-br/feature_split_keyboard.md) + * [Stenography](pt-br/feature_stenography.md) + * [Swap Hands](pt-br/feature_swap_hands.md) + * [Tap Dance](pt-br/feature_tap_dance.md) + * [Terminal](pt-br/feature_terminal.md) + * [Thermal Printer](pt-br/feature_thermal_printer.md) + * [Unicode](pt-br/feature_unicode.md) + * [Userspace](pt-br/feature_userspace.md) + * [Velocikey](pt-br/feature_velocikey.md) + +* For Makers and Modders + * [Hand Wiring Guide](pt-br/hand_wire.md) + * [ISP Flashing Guide](pt-br/isp_flashing_guide.md) + * [ARM Debugging Guide](pt-br/arm_debugging.md) + * [I2C Driver](pt-br/i2c_driver.md) + * [GPIO Controls](pt-br/internals_gpio_control.md) + * [Proton C Conversion](pt-br/proton_c_conversion.md) + +* For a Deeper Understanding + * [How Keyboards Work](pt-br/how_keyboards_work.md) + * [Understanding QMK](pt-br/understanding_qmk.md) + +* Other Topics + * [Using Eclipse with QMK](pt-br/other_eclipse.md) + * [Using VSCode with QMK](pt-br/other_vscode.md) + * [Support](pt-br/support.md) + * [How to add translations](pt-br/translating.md) + +* QMK Internals (In Progress) + * [Defines](pt-br/internals_defines.md) + * [Input Callback Reg](pt-br/internals_input_callback_reg.md) + * [Midi Device](pt-br/internals_midi_device.md) + * [Midi Device Setup Process](pt-br/internals_midi_device_setup_process.md) + * [Midi Util](pt-br/internals_midi_util.md) + * [Send Functions](pt-br/internals_send_functions.md) + * [Sysex Tools](pt-br/internals_sysex_tools.md) From a8153774b52382c50673b62c8be06d0ee07c8ba2 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 11 Dec 2019 09:27:40 +1100 Subject: [PATCH 027/973] [Docs] Fix docs fallback for pt-br (#7602) --- docs/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/index.html b/docs/index.html index 20614c0812c4..8d03c6edef5a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -35,6 +35,7 @@ '/fr-fr/': '/#/fr-fr/', '/he-il/': '/#/he-il/', '/ja/': '/#/ja/', + '/pt-br/': '/#/pt-br/', '/ru-ru/': '/#/ru-ru/', '/zh-cn/': '/#/zh-cn/', '/': '/#/' @@ -50,6 +51,7 @@ 'fr-fr', 'he-il', 'ja', + 'pt-br', 'ru-ru', 'zh-cn' ], From 1af31a0523b3fd4c82f27bd07b130a8f4669049a Mon Sep 17 00:00:00 2001 From: Duncan Elliot <42836473+dmelliot@users.noreply.github.com> Date: Wed, 11 Dec 2019 10:31:39 +1100 Subject: [PATCH 028/973] Update feature support for Proton C (#7596) Added a couple of entries for some features not currently supported on Proton C. --- docs/proton_c_conversion.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md index 8014a35e04cb..dc0a3f484918 100644 --- a/docs/proton_c_conversion.md +++ b/docs/proton_c_conversion.md @@ -29,3 +29,5 @@ These are defaults based on what has been implemented for ARM boards. | [Audio](feature_audio.md) | Enabled | | [RGB Lighting](feature_rgblight.md) | Disabled | | [Backlight](feature_backlight.md) | Forces [task driven PWM](feature_backlight.md#software-pwm-driver) until ARM can provide automatic configuration | +| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | +| [Split keyboards](feature_split_keyboard.md) | Not supported yet | From 698d0dbda8a4b081103b4a382baa1f99e3f77ceb Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 11 Dec 2019 12:26:40 +1100 Subject: [PATCH 029/973] Use `clock_prescale_set()` from avr-libc (#7540) * Use `clock_prescale_set()` from avr-libc * Remove outdated FAQ info --- docs/faq_build.md | 15 --------------- docs/fr-fr/faq_build.md | 15 --------------- docs/zh-cn/faq_build.md | 15 --------------- tmk_core/protocol/lufa/lufa.c | 7 ++----- 4 files changed, 2 insertions(+), 50 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 023eab01fa59..4c91cb28b150 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -111,21 +111,6 @@ https://github.com/tmk/tmk_keyboard/issues/212 https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef https://developer.mbed.org/forum/mbed/topic/5205/ -## `clock_prescale_set` and `clock_div_1` Not Available -Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2. - -``` -Compiling C: ../../tmk_core/protocol/lufa/lufa.c -avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o -../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu': -../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set' -../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function) -../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once -../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.) -make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1 -``` - - ## BOOTLOADER_SIZE for AVR Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment. diff --git a/docs/fr-fr/faq_build.md b/docs/fr-fr/faq_build.md index 774bf6880f00..6fba1e4304e9 100644 --- a/docs/fr-fr/faq_build.md +++ b/docs/fr-fr/faq_build.md @@ -112,21 +112,6 @@ https://github.com/tmk/tmk_keyboard/issues/212 https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef https://developer.mbed.org/forum/mbed/topic/5205/ -## `clock_prescale_set` and `clock_div_1` Not Available - -Votre chaîne d'outils (Toolchain) est trop vieille pour supporter le MCU. Par exemple, WinAVR 20100110 ne supporte pas ATMega32u2. - -``` -Compiling C: ../../tmk_core/protocol/lufa/lufa.c -avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o -../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu': -../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set' -../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function) -../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once -../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.) -make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1 -``` - ## BOOTLOADER_SIZE pour AVR Notez que la taille du bootloader pour les Teensy2.0++ est de 2048bytes. Quelques Makefiles peuvent contenir une erreur et avoir le mauvais commentaire. diff --git a/docs/zh-cn/faq_build.md b/docs/zh-cn/faq_build.md index 8fb449db3046..2f33fbca970d 100644 --- a/docs/zh-cn/faq_build.md +++ b/docs/zh-cn/faq_build.md @@ -81,21 +81,6 @@ https://github.com/tmk/tmk_keyboard/issues/212 https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef https://developer.mbed.org/forum/mbed/topic/5205/ -## `clock_prescale_set` and `clock_div_1` Not Available -你的工具链太旧了不支持MCU。比如WinAVR 20100110就不支持ATMega32u2. - -``` -Compiling C: ../../tmk_core/protocol/lufa/lufa.c -avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o -../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu': -../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set' -../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function) -../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once -../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.) -make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1 -``` - - ## AVR的BOOTLOADER_SIZE 注意Teensy2.0++ bootloader的大小是2048字节。有些Makefile注释错了。 diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index eb166c828e51..8319b34e94dd 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -914,14 +914,11 @@ void virtser_send(const uint8_t byte) { */ static void setup_mcu(void) { /* Disable watchdog if enabled by bootloader/fuses */ - MCUSR &= ~(1 << WDRF); + MCUSR &= ~_BV(WDRF); wdt_disable(); /* Disable clock division */ - // clock_prescale_set(clock_div_1); - - CLKPR = (1 << CLKPCE); - CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0); + clock_prescale_set(clock_div_1); } /** \brief Setup USB From ccda62616d422ae6df810b6fd68fc8e61002e278 Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Thu, 12 Dec 2019 03:40:00 +0900 Subject: [PATCH 030/973] [Keyboard] update angel64 (#7545) * add angel64 rev1 * update angel64 * fix keymap.c --- .../angel64/{angel64.c => alpha/alpha.c} | 2 +- .../angel64/{angel64.h => alpha/alpha.h} | 0 keyboards/angel64/{ => alpha}/config.h | 2 +- keyboards/angel64/{ => alpha}/info.json | 2 +- .../{ => alpha}/keymaps/default/config.h | 0 .../angel64/alpha/keymaps/default/keymap.c | 60 ++++ .../{ => alpha}/keymaps/default/readme.md | 0 keyboards/angel64/{ => alpha}/matrix.c | 0 keyboards/angel64/alpha/readme.md | 15 + keyboards/angel64/alpha/rules.mk | 0 keyboards/angel64/keymaps/default/keymap.c | 58 ---- keyboards/angel64/readme.md | 8 +- keyboards/angel64/rev1/config.h | 242 +++++++++++++++ keyboards/angel64/rev1/info.json | 12 + .../angel64/rev1/keymaps/default/config.h | 19 ++ .../angel64/rev1/keymaps/default/keymap.c | 34 +++ .../angel64/rev1/keymaps/default/readme.md | 1 + .../angel64/rev1/keymaps/kakunpc/config.h | 19 ++ .../angel64/rev1/keymaps/kakunpc/keymap.c | 195 ++++++++++++ .../angel64/rev1/keymaps/kakunpc/readme.md | 1 + keyboards/angel64/rev1/matrix.c | 287 ++++++++++++++++++ keyboards/angel64/rev1/readme.md | 15 + keyboards/angel64/rev1/rev1.c | 51 ++++ keyboards/angel64/rev1/rev1.h | 48 +++ keyboards/angel64/rev1/rules.mk | 0 keyboards/angel64/rules.mk | 3 + 26 files changed, 1009 insertions(+), 65 deletions(-) rename keyboards/angel64/{angel64.c => alpha/alpha.c} (98%) rename keyboards/angel64/{angel64.h => alpha/alpha.h} (100%) rename keyboards/angel64/{ => alpha}/config.h (99%) rename keyboards/angel64/{ => alpha}/info.json (98%) rename keyboards/angel64/{ => alpha}/keymaps/default/config.h (100%) create mode 100644 keyboards/angel64/alpha/keymaps/default/keymap.c rename keyboards/angel64/{ => alpha}/keymaps/default/readme.md (100%) rename keyboards/angel64/{ => alpha}/matrix.c (100%) create mode 100644 keyboards/angel64/alpha/readme.md create mode 100644 keyboards/angel64/alpha/rules.mk delete mode 100644 keyboards/angel64/keymaps/default/keymap.c create mode 100644 keyboards/angel64/rev1/config.h create mode 100644 keyboards/angel64/rev1/info.json create mode 100644 keyboards/angel64/rev1/keymaps/default/config.h create mode 100644 keyboards/angel64/rev1/keymaps/default/keymap.c create mode 100644 keyboards/angel64/rev1/keymaps/default/readme.md create mode 100644 keyboards/angel64/rev1/keymaps/kakunpc/config.h create mode 100644 keyboards/angel64/rev1/keymaps/kakunpc/keymap.c create mode 100644 keyboards/angel64/rev1/keymaps/kakunpc/readme.md create mode 100644 keyboards/angel64/rev1/matrix.c create mode 100644 keyboards/angel64/rev1/readme.md create mode 100644 keyboards/angel64/rev1/rev1.c create mode 100644 keyboards/angel64/rev1/rev1.h create mode 100644 keyboards/angel64/rev1/rules.mk diff --git a/keyboards/angel64/angel64.c b/keyboards/angel64/alpha/alpha.c similarity index 98% rename from keyboards/angel64/angel64.c rename to keyboards/angel64/alpha/alpha.c index d26c3608bcb1..3d2d1de77905 100644 --- a/keyboards/angel64/angel64.c +++ b/keyboards/angel64/alpha/alpha.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "angel64.h" +#include "alpha.h" // Optional override functions below. // You can leave any or all of these undefined. diff --git a/keyboards/angel64/angel64.h b/keyboards/angel64/alpha/alpha.h similarity index 100% rename from keyboards/angel64/angel64.h rename to keyboards/angel64/alpha/alpha.h diff --git a/keyboards/angel64/config.h b/keyboards/angel64/alpha/config.h similarity index 99% rename from keyboards/angel64/config.h rename to keyboards/angel64/alpha/config.h index fb683bc15321..f10f9b0910c6 100644 --- a/keyboards/angel64/config.h +++ b/keyboards/angel64/alpha/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define PRODUCT_ID 0x0A64 #define DEVICE_VER 0x0001 #define MANUFACTURER kakunpc #define PRODUCT angel64 diff --git a/keyboards/angel64/info.json b/keyboards/angel64/alpha/info.json similarity index 98% rename from keyboards/angel64/info.json rename to keyboards/angel64/alpha/info.json index 2bcd0c9ea1f2..3d1d85b36483 100644 --- a/keyboards/angel64/info.json +++ b/keyboards/angel64/alpha/info.json @@ -1,5 +1,5 @@ { - "keyboard_name": "angel64", + "keyboard_name": "angel64_alpha", "url": "https://kakunpc.booth.pm/", "maintainer": "kakunpc", "width": 14, diff --git a/keyboards/angel64/keymaps/default/config.h b/keyboards/angel64/alpha/keymaps/default/config.h similarity index 100% rename from keyboards/angel64/keymaps/default/config.h rename to keyboards/angel64/alpha/keymaps/default/config.h diff --git a/keyboards/angel64/alpha/keymaps/default/keymap.c b/keyboards/angel64/alpha/keymaps/default/keymap.c new file mode 100644 index 000000000000..7e880e18c626 --- /dev/null +++ b/keyboards/angel64/alpha/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2019 kakunpc + * + * 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 layers{ + BASE = 0, + COMMAND +}; + +#define KC_COMMAND LT(COMMAND,KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = 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, + 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, + LCTL_T(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, KC_RSFT, + KC_TAB, KC_LALT, KC_LGUI, KC_COMMAND, KC_SPC, KC_COMMAND, KC_APP, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL), + [COMMAND] = 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_BSPC, + KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, 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), +}; + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMAND\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 + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} +#endif diff --git a/keyboards/angel64/keymaps/default/readme.md b/keyboards/angel64/alpha/keymaps/default/readme.md similarity index 100% rename from keyboards/angel64/keymaps/default/readme.md rename to keyboards/angel64/alpha/keymaps/default/readme.md diff --git a/keyboards/angel64/matrix.c b/keyboards/angel64/alpha/matrix.c similarity index 100% rename from keyboards/angel64/matrix.c rename to keyboards/angel64/alpha/matrix.c diff --git a/keyboards/angel64/alpha/readme.md b/keyboards/angel64/alpha/readme.md new file mode 100644 index 000000000000..d646edeb7eee --- /dev/null +++ b/keyboards/angel64/alpha/readme.md @@ -0,0 +1,15 @@ +# angel64 + +![angel64](https://i.gyazo.com/6e2ea6c58d3253c496dc0518f2641ff9.jpg) + +Keyboard for tablets. + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: angel64_alpha, promicro +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make angel64/alpha: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/angel64/alpha/rules.mk b/keyboards/angel64/alpha/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/angel64/keymaps/default/keymap.c b/keyboards/angel64/keymaps/default/keymap.c deleted file mode 100644 index 50ca64fdec40..000000000000 --- a/keyboards/angel64/keymaps/default/keymap.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright 2019 kakunpc - * - * 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 layers{ - BASE = 0, - COMMAND -}; - -#define KC_COMMAND LT(COMMAND,KC_SPC) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = 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 , - 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_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, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, KC_COMMAND, KC_SPC, KC_COMMAND, KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL - ), - [COMMAND] = 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_BSPC , - KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RIGHT, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - ) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} - -void keyboard_post_init_user(void) { -} diff --git a/keyboards/angel64/readme.md b/keyboards/angel64/readme.md index b56592cbbcd1..791620144e24 100644 --- a/keyboards/angel64/readme.md +++ b/keyboards/angel64/readme.md @@ -1,12 +1,12 @@ # angel64 -![angel64](https://i.gyazo.com/6e2ea6c58d3253c496dc0518f2641ff9.jpg) +![angel64](https://i.gyazo.com/d114d4b1789009dbe8c910eaeb3295c5.jpg) Keyboard for tablets. -Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) -Hardware Supported: angel64_alpha, promicro -Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: angel64_alpha, angel64_rev1, promicro +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/angel64/rev1/config.h b/keyboards/angel64/rev1/config.h new file mode 100644 index 000000000000..f10f9b0910c6 --- /dev/null +++ b/keyboards/angel64/rev1/config.h @@ -0,0 +1,242 @@ +/* +Copyright 2019 kakunpc + +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 0x0A64 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel64 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define UNUSED_PINS + +/* + * 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 D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 64 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 25 /* 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 + * + * 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/angel64/rev1/info.json b/keyboards/angel64/rev1/info.json new file mode 100644 index 000000000000..34378f813e58 --- /dev/null +++ b/keyboards/angel64/rev1/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "angel64_rev1", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "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, "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":2}, {"label":"A", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":":", "x":11, "y":2}, {"label":"\"", "x":12, "y":2}, {"label":"Enter", "x":13, "y":2, "w":2}, {"label":"Shift", "x":0, "y":3, "w":2.5}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":"<", "x":9.5, "y":3}, {"label":">", "x":10.5, "y":3}, {"label":"?", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.5}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Alt", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4}, {"x":5.25, "y":4, "w":1.5}, {"x":6.75, "y":4, "w":1.5}, {"x":8.25, "y":4, "w":1.5}, {"x":9.75, "y":4}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/angel64/rev1/keymaps/default/config.h b/keyboards/angel64/rev1/keymaps/default/config.h new file mode 100644 index 000000000000..bf1149ebc632 --- /dev/null +++ b/keyboards/angel64/rev1/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 kakunpc + * + * 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/angel64/rev1/keymaps/default/keymap.c b/keyboards/angel64/rev1/keymaps/default/keymap.c new file mode 100644 index 000000000000..905387ac9be8 --- /dev/null +++ b/keyboards/angel64/rev1/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 kakunpc + * + * 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_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, + 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_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL), +}; + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + // Host Keyboard LED Status + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} +#endif diff --git a/keyboards/angel64/rev1/keymaps/default/readme.md b/keyboards/angel64/rev1/keymaps/default/readme.md new file mode 100644 index 000000000000..f4cd48f2ef97 --- /dev/null +++ b/keyboards/angel64/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for angel64 \ No newline at end of file diff --git a/keyboards/angel64/rev1/keymaps/kakunpc/config.h b/keyboards/angel64/rev1/keymaps/kakunpc/config.h new file mode 100644 index 000000000000..bf1149ebc632 --- /dev/null +++ b/keyboards/angel64/rev1/keymaps/kakunpc/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 kakunpc + * + * 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/angel64/rev1/keymaps/kakunpc/keymap.c b/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c new file mode 100644 index 000000000000..6f70dd72c391 --- /dev/null +++ b/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c @@ -0,0 +1,195 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#define USE_LED_RIPPLE_EFFECT +// #define RANDOM_RIPPLE_EFFECT + +#include QMK_KEYBOARD_H +#include "lufa.h" + +#ifdef USE_LED_RIPPLE_EFFECT +struct keybuf { + char col, row; + char frame; +}; +struct keybuf keybufs[256]; +unsigned char keybuf_begin, keybuf_end; + +unsigned char r = 0; +unsigned char g = 112; +unsigned char b = 255; +int col, row; +#endif + + +enum layers{ + BASE = 0, + COMMAND +}; + +#define KC_COMMAND_NUM LT(COMMAND,KC_F13) +#define KC_COMMAND_KANA LT(COMMAND,KC_F14) +#define KC_COMMAND LT(COMMAND,KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = 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, 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_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_LCTL, KC_LALT, KC_LGUI, KC_COMMAND_NUM, KC_SPC, KC_SPC, KC_SPC, KC_COMMAND_KANA, KC_RALT, MO(COMMAND),KC_RCTL), + [COMMAND] = 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_BSPC, + KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_NO, KC_NO, _______, KC_NO, RGB_MOD, KC_NO, _______, KC_NO, _______, KC_NO), +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef USE_LED_RIPPLE_EFFECT + col = record->event.key.col; + row = record->event.key.row; + if (record->event.pressed) { + int end = keybuf_end; + keybufs[end].col = col; + keybufs[end].row = row; + keybufs[end].frame = 0; + keybuf_end ++; + } +#endif + return true; +} + +void keyboard_post_init_user(void) { +#ifdef USE_LED_RIPPLE_EFFECT + rgblight_enable_noeeprom(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); +#endif +} + +#ifdef USE_LED_RIPPLE_EFFECT +int scan_count = -10; +int keys[] = { 14, 14, 13, 12, 11 }; +int keys_sum[] = { 0, 14, 28, 41, 53 }; +unsigned char rgb[14][5][3]; +int row_max = 12; +int ToIndex(char _col, char _row) { + return (_col * row_max) + _row; +} + +void led_ripple_effect(void){ + if (scan_count == -1) { + rgblight_enable_noeeprom(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + } else if (scan_count >= 0 && scan_count < 5) { + for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) { + int i = c; + // FIXME: + + int index = ToIndex(keybufs[i].col,keybufs[i].row); + int coll = 0; + for(int s = 4; s >= 0; --s){ + if( index >= keys_sum[s]){ + coll = s; + break; + } + } + int roww = MAX(0,index - keys_sum[coll]); + + int y = scan_count; + int dist_y = abs(y - coll); + for (int x=0; x= 6 && scan_count <= 10) { + int y = scan_count - 6; + for (int x=0; x= 12) { scan_count = 0; } +} + +#endif + +void matrix_scan_user(void) { +#ifdef USE_LED_RIPPLE_EFFECT +#ifdef RANDOM_RIPPLE_EFFECT + static int timer = 0; + static int timeout = 300; + timer++; + if(timer > timeout){ + int end = keybuf_end; + col = rand() % 6; + row = rand() % 12; + keybufs[end].col = col; + keybufs[end].row = row; + keybufs[end].frame = 0; + keybuf_end ++; + timer = rand() % timeout; + } +#endif + led_ripple_effect(); +#endif +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMAND\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 + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} +#endif diff --git a/keyboards/angel64/rev1/keymaps/kakunpc/readme.md b/keyboards/angel64/rev1/keymaps/kakunpc/readme.md new file mode 100644 index 000000000000..ca7d7961fc6c --- /dev/null +++ b/keyboards/angel64/rev1/keymaps/kakunpc/readme.md @@ -0,0 +1 @@ +# The kakunpc keymap for angel64 diff --git a/keyboards/angel64/rev1/matrix.c b/keyboards/angel64/rev1/matrix.c new file mode 100644 index 000000000000..e06fc15dc4fb --- /dev/null +++ b/keyboards/angel64/rev1/matrix.c @@ -0,0 +1,287 @@ +/* +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" + +#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 + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* 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<. + */ +#include "rev1.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. + +/* + +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/angel64/rev1/rev1.h b/keyboards/angel64/rev1/rev1.h new file mode 100644 index 000000000000..f4335601a93d --- /dev/null +++ b/keyboards/angel64/rev1/rev1.h @@ -0,0 +1,48 @@ +/* Copyright 2019 kakunpc + * + * 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( \ + 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\ +) \ +{ \ + { k01, k13, k25, k37, k49, k61 }, \ + { k02, k14, k26, k38, k50, k62 }, \ + { k03, k15, k27, k39, k51, k63 }, \ + { k04, k16, k28, k40, k52, k64 }, \ + { k05, k17, k29, k41, k53, KC_NO }, \ + { k06, k18, k30, k42, k54, KC_NO }, \ + { k07, k19, k31, k43, k55, KC_NO }, \ + { k08, k20, k32, k44, k56, KC_NO }, \ + { k09, k21, k33, k45, k57, KC_NO }, \ + { k10, k22, k34, k46, k58, KC_NO }, \ + { k11, k23, k35, k47, k59, KC_NO }, \ + { k12, k24, k36, k48, k60, KC_NO } \ +} diff --git a/keyboards/angel64/rev1/rules.mk b/keyboards/angel64/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/angel64/rules.mk b/keyboards/angel64/rules.mk index 4242ac2eee68..0f2b29096d40 100644 --- a/keyboards/angel64/rules.mk +++ b/keyboards/angel64/rules.mk @@ -31,6 +31,9 @@ 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) +OLED_DRIVER_ENABLE = yes CUSTOM_MATRIX = yes SRC += matrix.c + +DEFAULT_FOLDER = angel64/rev1 From 770a4ee7291095aaa6548d3e988633bf2ae6e6c0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 12 Dec 2019 06:33:10 +1100 Subject: [PATCH 031/973] [Docs] Remove some outdated FAQ items (#7607) --- docs/faq_build.md | 4 --- docs/faq_debug.md | 68 -------------------------------------- docs/faq_keymap.md | 63 +---------------------------------- docs/fr-fr/faq_build.md | 4 --- docs/fr-fr/faq_debug.md | 71 ---------------------------------------- docs/fr-fr/faq_keymap.md | 67 +------------------------------------ docs/zh-cn/faq_build.md | 5 --- docs/zh-cn/faq_debug.md | 68 -------------------------------------- docs/zh-cn/faq_keymap.md | 63 +---------------------------------- 9 files changed, 3 insertions(+), 410 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 4c91cb28b150..b2e448306a7b 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -87,10 +87,6 @@ Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_fi If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig.md) for more detailed information. -## WINAVR is Obsolete -It is no longer recommended and may cause some problem. -See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). - ## USB VID and PID You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product. diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 1e0cdc82bf91..6c66defbd447 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -112,56 +112,6 @@ In C `1` means one of [int] type which is [16 bit] in case of AVR so you can't s http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 - -## Bootloader Jump Doesn't Work -Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**. -``` -# Size of Bootloaders in bytes: -# Atmel DFU loader(ATmega32U4) 4096 -# Atmel DFU loader(AT90USB128) 8192 -# LUFA bootloader(ATmega32U4) 4096 -# Arduino Caterina(ATmega32U4) 4096 -# USBaspLoader(ATmega***) 2048 -# Teensy halfKay(ATmega32U4) 512 -# Teensy++ halfKay(AT90USB128) 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -``` -AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet. -Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**. - -AVR Boot section is located at end of Flash memory like the followings. -``` -byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-4KB | | 128KB-8KB -0x6000 +---------------+ 0x1E000 +---------------+ - | Bootloader | 4KB | Bootloader | 8KB -0x7FFF +---------------+ 0x1FFFF +---------------+ - - -byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-512B | | 128KB-2KB -0x7E00 +---------------+ 0x1FC00 +---------------+ - | Bootloader | 512B | Bootloader | 2KB -0x7FFF +---------------+ 0x1FFFF +---------------+ -``` - -And see this discussion for further reference. -https://github.com/tmk/tmk_keyboard/issues/179 - -If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem. - ## Special Extra Key Doesn't Work (System, Audio Control Keys) You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK. @@ -194,24 +144,6 @@ If you would like to keep JTAG enabled, just add the following to your `config.h #define NO_JTAG_DISABLE ``` -## Adding LED Indicators of Lock Keys -You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post. - -http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560 - -## Program Arduino Micro/Leonardo -Push reset button and then run command like this within 8 seconds. - -``` -avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0 -``` - -Device name will vary depending on your system. - -http://arduino.cc/en/Main/ArduinoBoardMicro -https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867 - - ## USB 3 Compatibility I heard some people have a problem with USB 3 port, try USB 2 port. diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index 84d8548d465a..2d00e8bef958 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -67,24 +67,8 @@ After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in y Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.*** ## Input Special Characters Other Than ASCII like Cédille 'Ç' -NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout. -See this post for example **MACRO** code. - -http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 - -On **Windows** you can use `AltGr` key or **Alt code**. -* http://en.wikipedia.org/wiki/AltGr_key -* http://en.wikipedia.org/wiki/Alt_code - -On **Mac** OS defines `Option` key combinations. -* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input - -On **Xorg** you can use `compose` key, instead. -* http://en.wikipedia.org/wiki/Compose_key - -And see this for **Unicode** input. -* http://en.wikipedia.org/wiki/Unicode_input +See the [Unicode](feature_unicode.md) feature. ## `Fn` Key on macOS @@ -130,51 +114,6 @@ https://github.com/tekezo/Karabiner/issues/403 See the [Grave Escape](feature_grave_esc.md) feature. -## Arrow on Right Modifier Keys with Dual-Role -This turns right modifier keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**. -``` - -#include "keymap_common.h" - - -/* Arrow keys on right modifier keys with TMK dual role feature - * - * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role - * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys - */ -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - [0] = LAYOUT( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ - FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), - [1] = LAYOUT( \ - GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8), -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), - [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), - [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), - [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), - [4] = ACTION_LAYER_MOMENTARY(1), - [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP), - [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN), - [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME), - [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END), -}; - -``` - -Dual-role key: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys - - ## Eject on Mac OSX `KC_EJCT` keycode works on OSX. https://github.com/tmk/tmk_keyboard/issues/250 It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mapping by default. diff --git a/docs/fr-fr/faq_build.md b/docs/fr-fr/faq_build.md index 6fba1e4304e9..448ff01aabe6 100644 --- a/docs/fr-fr/faq_build.md +++ b/docs/fr-fr/faq_build.md @@ -86,10 +86,6 @@ Relancer le script d'installation de QMK (`./util/qmk_install.sh` situé dans r Si vous rencontrez toujours des problèmes, essayez de télécharger et lancer Zadig. Voir [Installation du driver du bootloader avec Zadig](driver_installation_zadig.md) pour plus d'informations. -## WINAVR est obsolète - -Il n'est plus recommandé et peut causer des problèmes. Voir [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). - ## USB VID et PID Vous pouvez utiliser l'ID de votre choix en modifier `config.h`. Il y a peu de chance de conflit avec d'autres produits. diff --git a/docs/fr-fr/faq_debug.md b/docs/fr-fr/faq_debug.md index 7a85fd1f249a..754c79921cba 100644 --- a/docs/fr-fr/faq_debug.md +++ b/docs/fr-fr/faq_debug.md @@ -104,58 +104,6 @@ En C, `1` implique un type [int] qui est [16 bits] pour les AVR, ce qui implique http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 -## Bootloader Jump ne fonctionne pas - -Configurez correctement la taille du bootloader dans le **Makefile**. Une mauvaise taille de section du bootloader empêchera probablement le démarrage avec **Magic command** et **Boot Magic**. - -``` -# Size of Bootloaders in bytes: -# Atmel DFU loader(ATmega32U4) 4096 -# Atmel DFU loader(AT90USB128) 8192 -# LUFA bootloader(ATmega32U4) 4096 -# Arduino Caterina(ATmega32U4) 4096 -# USBaspLoader(ATmega***) 2048 -# Teensy halfKay(ATmega32U4) 512 -# Teensy++ halfKay(AT90USB128) 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -``` - -La taille de la section de démarrage de AVR est définie par l'option **BOOTSZ** fuse. Vérifiez la fiche technique du MCU. Veuilez noter que les tailles et adresses sont définies en **Word** (2 octets) dans la fiche technique alors que TMK utilise des **Byte**. - -La section de boot AVR se trouve à la fin de la mémoire flash, comme suit. - -``` -byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-4KB | | 128KB-8KB -0x6000 +---------------+ 0x1E000 +---------------+ - | Bootloader | 4KB | Bootloader | 8KB -0x7FFF +---------------+ 0x1FFFF +---------------+ - - -byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-512B | | 128KB-2KB -0x7E00 +---------------+ 0x1FC00 +---------------+ - | Bootloader | 512B | Bootloader | 2KB -0x7FFF +---------------+ 0x1FFFF +---------------+ -``` - -Référez-vous à cette discussion pour plus de référence. -https://github.com/tmk/tmk_keyboard/issues/179 - -Si vous utilisez un TeensyUSB, il y a un [bug connu](https://github.com/qmk/qmk_firmware/issues/164) qui fait que le bouton reset matériel empêche la touche RESET de fonctionner. Débrancher et rebrancher le clavier devrait résoudre le problème. - ## Les touches spéciales ne fonctionnent pas (Touche Système, Touches de contrôle du son) Vous devez définir `EXTRAKEY_ENABLE` dans le fichier `rules.mk` pour les utiliser dans QMK. @@ -189,25 +137,6 @@ Si vous voulez garder JTAG activé, ajoutez la ligne suivante à votre fichier ` #define NO_JTAG_DISABLE ``` -## Adding LED Indicators of Lock Keys - -Si vous souhaitez votre propre indicateur LED pour CapsLock, ScrollLock et NumLock alors lisez ce post. - -http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560 - -## Programmer Arduino Micro/Leonardo - -Appuyez sur le bouton reset puis lancez la commande suivante dans les 8 secondes. - -``` -avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0 -``` - -Le nom du périphérique peut varier en fonction de votre système. - -http://arduino.cc/en/Main/ArduinoBoardMicro -https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867 - ## Compatibilité USB 3 Il semble que certaines personnes ont eu des problèmes avec les ports USB 3, essayez un port USB 2. diff --git a/docs/fr-fr/faq_keymap.md b/docs/fr-fr/faq_keymap.md index 8244d4225fc2..2cbbe9308294 100644 --- a/docs/fr-fr/faq_keymap.md +++ b/docs/fr-fr/faq_keymap.md @@ -72,24 +72,7 @@ Des vieux claviers mécaniques ont parfois des touches à verrouillage, mais les ## Ajouter des caractères spéciaux autres que ASCII comme la cédille 'Ç' -IL N'EXISTE AUCUNE METHODE UNIVERSELLE POUR LES AJOUTER QUI FONCTIONNE SUR TOUS LES SYSTEMES. Vous devez définir une **MACRO** d'une manière spécifique à votre OS ou layout. - -Voir ce post pour un exemple de code **MACRO**. - -http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 - -Sous **Windows** vous pouvez utiliser la touche `AltGr` ou **Alt code**. -* http://en.wikipedia.org/wiki/AltGr_key -* http://en.wikipedia.org/wiki/Alt_code - -Sous **Mac OS** définissez une combinaison de touche `Option`. -* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input - -Sous **Xorg** vous pouvez utiliser une touche `compose` à la place. -* http://en.wikipedia.org/wiki/Compose_key - -Et voir ceci pour une entrée **Unicode**. -* http://en.wikipedia.org/wiki/Unicode_input +Voir la fonctionnalité [Unicode](feature_unicode.md). ## Touche `Fn` sur macOS @@ -144,54 +127,6 @@ Cette fonctionnalité permet d'utiliser une touche à la fois comme touche Écha Voir la fonctionnalité [Grave Escape](feature_grave_esc.md). -## Avoir les touches modificatrices qui ont double usage en flèches directionnelles. - -Ceci transforme les touches "modificateur droit" en touches fléchées lorsque les touches sont seulement "tapées" tout en restant des modificateurs lorsqu'elles sont maintenues. - -Dans TMK la fonction double rôle s'appelle **TAP**. - -```C - -#include "keymap_common.h" - - -/* Arrow keys on right modifier keys with TMK dual role feature - * - * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role - * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys - */ -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - [0] = LAYOUT( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ - FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), - [1] = LAYOUT( \ - GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8), -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), - [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), - [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), - [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), - [4] = ACTION_LAYER_MOMENTARY(1), - [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP), - [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN), - [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME), - [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END), -}; - -``` - -Touches double rôle : https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys - ## Eject sur Mac OSX Le keycode`KC_EJCT` fonctionne sous OSX. https://github.com/tmk/tmk_keyboard/issues/250 diff --git a/docs/zh-cn/faq_build.md b/docs/zh-cn/faq_build.md index 2f33fbca970d..82d0697a865e 100644 --- a/docs/zh-cn/faq_build.md +++ b/docs/zh-cn/faq_build.md @@ -56,11 +56,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" ?> 事实上没有一个驱动的最佳选择,有些选项就是和某些系统相辅相成。但libUSB和WinUSB似乎也算是这里的最佳选择了。 如果bootloader在设备列表中没有显示,你可能要使能 "List all devices"选项在选项菜单中`Options`,然后找到有问题的bootloader设备。(译者注:在win10中可能为 查看-显示隐藏的设备) - -## WINAVR已淘汰 -不再推荐使用WINAVR,使用可能会导致问题 -详情请见[TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). - ## USB VID 和 PID 你可以在编辑`config.h`时使用任何你想用的ID值。实际上,使用任何可能未使用的ID都没有问题,除了有极低的与其他产品发生冲突的可能性。 diff --git a/docs/zh-cn/faq_debug.md b/docs/zh-cn/faq_debug.md index a3cc7c510ca2..7eff7f2651c4 100644 --- a/docs/zh-cn/faq_debug.md +++ b/docs/zh-cn/faq_debug.md @@ -101,56 +101,6 @@ https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switc http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 - -## Bootloader跳转不好用 -在**Makefile**中正确配置**Makefile**大小。如果分区大小不正确,引导加载程序可能无法从**Magic command**和**Boot Magic**加载。 -``` -# bootloader字节数: -# Atmel DFU loader(ATmega32U4) 4096 -# Atmel DFU loader(AT90USB128) 8192 -# LUFA bootloader(ATmega32U4) 4096 -# Arduino Caterina(ATmega32U4) 4096 -# USBaspLoader(ATmega***) 2048 -# Teensy halfKay(ATmega32U4) 512 -# Teensy++ halfKay(AT90USB128) 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -``` -AVR引导大小是通过**BOOTSZ**熔丝位来设置的。查阅你单片机的datasheet。 -记住,datasheet用的是**Word**(2字节)表示大小和地址,TMK用的是**Byte**。 - -AVR引导部分位于闪存的末尾,如下所示(Application是应用区,Bootloader是引导区)。 -``` -byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-4KB | | 128KB-8KB -0x6000 +---------------+ 0x1E000 +---------------+ - | Bootloader | 4KB | Bootloader | 8KB -0x7FFF +---------------+ 0x1FFFF +---------------+ - - -byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-512B | | 128KB-2KB -0x7E00 +---------------+ 0x1FC00 +---------------+ - | Bootloader | 512B | Bootloader | 2KB -0x7FFF +---------------+ 0x1FFFF +---------------+ -``` - -详情请见下方issue。 -https://github.com/tmk/tmk_keyboard/issues/179 - -如果你使用TeensyUSB, 有一个[已知bug](https://github.com/qmk/qmk_firmware/issues/164)硬件重置按钮阻止软件定义重置键工作。重新插拔键盘就好了。 - ## 特殊额外键不起作用(系统,音频控制键) 你要在`rules.mk`定义`EXTRAKEY_ENABLE`在QMK中使用它们。 @@ -173,24 +123,6 @@ EXTRAKEY_ENABLE = yes # 音频控制和系统控制 Arduino Leonardo和micro使用**ATMega32U4**,该芯片TMK可用,但Arduino的bootloader会导致问题。 -## 为锁定键添加指示灯 -你要自制CapsLock, ScrollLock 和 NumLock指示灯?见下文。 - -http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560 - -## 为Arduino Micro/Leonardo编程 -按下重置键然后在8秒内运行下方这样的命令。 - -``` -avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0 -``` - -设备名称因系统而异。 - -http://arduino.cc/en/Main/ArduinoBoardMicro -https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867 - - ## USB 3 兼容性 据传说有些人用USB3接口会有问题,用USB2的试试。 diff --git a/docs/zh-cn/faq_keymap.md b/docs/zh-cn/faq_keymap.md index ee8e3c06bfe1..7fb434b4c89a 100644 --- a/docs/zh-cn/faq_keymap.md +++ b/docs/zh-cn/faq_keymap.md @@ -66,24 +66,8 @@ https://github.com/tmk/tmk_keyboard/issues/67 远古机械键盘偶尔会有自锁机械开关,现在几乎没有了。***大多数情况下你不需要使用该功能,且要使用`KC_CAPS`, `KC_NLCK`和`KC_SLCK`这三个键码。*** ## 输入ASCII之外的特殊字符比如Cédille 'Ç' -没有在所有系统中输入这个的通用方法。你要定义针对你的特定操作系统或布局的**宏**。 -比如看这个**宏**代码的文章。 - -http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 - -在**Windows**上,可以用`AltGr`键或**Alt码**。 -* http://en.wikipedia.org/wiki/AltGr_key -* https://zh.wikipedia.org/wiki/Alt%E7%A0%81 - -在**Mac OS**定义`Option`键组合。 -* https://zh.wikipedia.org/wiki/Option%E9%94%AE#%E6%9B%BF%E4%BB%A3%E9%94%AE%E7%9B%98%E8%BE%93%E5%85%A5 - -在**Xorg**可以改用`compose`键。 -* http://en.wikipedia.org/wiki/Compose_key - -下方链接查看**Unicode**输入。 -* http://en.wikipedia.org/wiki/Unicode_input +请见[Unicode](feature_unicode.md)功能。 ## macOS上的`Fn` @@ -136,51 +120,6 @@ https://github.com/tekezo/Karabiner/issues/403 请见[Grave Escape](feature_grave_esc.md)功能。 -## 右侧双角色修改键(诸如Shift、Alt等有修改其他键作用的键)变箭头键 -右侧修改键单击时会变为箭头键,长按就还是修改键。在TMK中双角色键称之为**TAP**. -``` - -#include "keymap_common.h" - - -/* 用TMK双角色键功能实现右侧修改键改箭头键 - * - * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role - * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys - */ -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - [0] = LAYOUT( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ - FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), - [1] = LAYOUT( \ - GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8), -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), - [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), - [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), - [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), - [4] = ACTION_LAYER_MOMENTARY(1), - [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP), - [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN), - [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME), - [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END), -}; - -``` - -双角色键说明: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys - - ## Mac OSX的弹出键 `KC_EJCT` 键码在OSX可以使用 https://github.com/tmk/tmk_keyboard/issues/250 似乎Windows10会忽略该键码,Linux/Xorg可以识别该键码但默认不映射。 From 071eb2478f039e21effb981a8a98e6181238b53b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 11 Dec 2019 19:36:00 +0000 Subject: [PATCH 032/973] Remove mbed files (#7605) * Remove mbed files * Remove mbed files - fix comment * Remove mbed logic blocks --- docs/faq_build.md | 8 - docs/fr-fr/faq_build.md | 9 - docs/zh-cn/faq_build.md | 8 - doxygen-todo | 1 - tmk_core/common/mbed/bootloader.c | 3 - tmk_core/common/mbed/suspend.c | 5 - tmk_core/common/mbed/timer.c | 23 --- tmk_core/common/mbed/xprintf.cpp | 50 ----- tmk_core/common/mbed/xprintf.h | 16 -- tmk_core/common/print.h | 33 +--- tmk_core/common/wait.h | 2 - tmk_core/protocol/mbed/HIDKeyboard.cpp | 260 ------------------------- tmk_core/protocol/mbed/HIDKeyboard.h | 32 --- tmk_core/protocol/mbed/mbed_driver.cpp | 21 -- tmk_core/protocol/mbed/mbed_driver.h | 3 - tmk_core/protocol/ps2_io_mbed.c | 51 ----- 16 files changed, 1 insertion(+), 524 deletions(-) delete mode 100644 tmk_core/common/mbed/bootloader.c delete mode 100644 tmk_core/common/mbed/suspend.c delete mode 100644 tmk_core/common/mbed/timer.c delete mode 100644 tmk_core/common/mbed/xprintf.cpp delete mode 100644 tmk_core/common/mbed/xprintf.h delete mode 100644 tmk_core/protocol/mbed/HIDKeyboard.cpp delete mode 100644 tmk_core/protocol/mbed/HIDKeyboard.h delete mode 100644 tmk_core/protocol/mbed/mbed_driver.cpp delete mode 100644 tmk_core/protocol/mbed/mbed_driver.h delete mode 100644 tmk_core/protocol/ps2_io_mbed.c diff --git a/docs/faq_build.md b/docs/faq_build.md index b2e448306a7b..618ae40f3b16 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -99,14 +99,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person - http://www.obdev.at/products/vusb/license.html - http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 -## Cortex: `cstddef: No such file or directory` -GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA. -https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded - -https://github.com/tmk/tmk_keyboard/issues/212 -https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef -https://developer.mbed.org/forum/mbed/topic/5205/ - ## BOOTLOADER_SIZE for AVR Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment. diff --git a/docs/fr-fr/faq_build.md b/docs/fr-fr/faq_build.md index 448ff01aabe6..84d88afcd8bf 100644 --- a/docs/fr-fr/faq_build.md +++ b/docs/fr-fr/faq_build.md @@ -99,15 +99,6 @@ Vous pouvez acheter un VID:PID unique ici. Je ne pense pas que ce soit nécessai - http://www.obdev.at/products/vusb/license.html - http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 -## Cortex: `cstddef: No such file or directory` - -Ce problème existait avec le GCC 4.8 d'Ubuntu 14.04, la solution a nécessité de mettre à jour vers 4.9 avec ce PPA. -https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded - -https://github.com/tmk/tmk_keyboard/issues/212 -https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef -https://developer.mbed.org/forum/mbed/topic/5205/ - ## BOOTLOADER_SIZE pour AVR Notez que la taille du bootloader pour les Teensy2.0++ est de 2048bytes. Quelques Makefiles peuvent contenir une erreur et avoir le mauvais commentaire. diff --git a/docs/zh-cn/faq_build.md b/docs/zh-cn/faq_build.md index 82d0697a865e..0d9047bc59a0 100644 --- a/docs/zh-cn/faq_build.md +++ b/docs/zh-cn/faq_build.md @@ -68,14 +68,6 @@ https://github.com/tmk/tmk_keyboard/issues/150 - http://www.obdev.at/products/vusb/license.html - http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 -## Cortex: `cstddef: No such file or directory` -在Ubuntu 14.04上的GCC 4.8 会出现这种问题需要用这个PPA升级到4.9。 -https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded - -https://github.com/tmk/tmk_keyboard/issues/212 -https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef -https://developer.mbed.org/forum/mbed/topic/5205/ - ## AVR的BOOTLOADER_SIZE 注意Teensy2.0++ bootloader的大小是2048字节。有些Makefile注释错了。 diff --git a/doxygen-todo b/doxygen-todo index d5ae84058a23..0f3010ffafcc 100644 --- a/doxygen-todo +++ b/doxygen-todo @@ -3,7 +3,6 @@ tmk_core/protocol/bluefruit tmk_core/protocol/chibios tmk_core/protocol/iwrap tmk_core/protocol/lufa -tmk_core/protocol/mbed tmk_core/protocol/midi tmk_core/protocol/midi/bytequeue tmk_core/protocol/midi/Config diff --git a/tmk_core/common/mbed/bootloader.c b/tmk_core/common/mbed/bootloader.c deleted file mode 100644 index 88945eb05054..000000000000 --- a/tmk_core/common/mbed/bootloader.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "bootloader.h" - -void bootloader_jump(void) {} diff --git a/tmk_core/common/mbed/suspend.c b/tmk_core/common/mbed/suspend.c deleted file mode 100644 index 3d0554f87bd3..000000000000 --- a/tmk_core/common/mbed/suspend.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void suspend_power_down(void) {} -bool suspend_wakeup_condition(void) { return true; } -void suspend_wakeup_init(void) {} diff --git a/tmk_core/common/mbed/timer.c b/tmk_core/common/mbed/timer.c deleted file mode 100644 index 7e4070af2933..000000000000 --- a/tmk_core/common/mbed/timer.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "cmsis.h" -#include "timer.h" - -/* Mill second tick count */ -volatile uint32_t timer_count = 0; - -/* Timer interrupt handler */ -void SysTick_Handler(void) { timer_count++; } - -void timer_init(void) { - timer_count = 0; - SysTick_Config(SystemCoreClock / 1000); /* 1ms tick */ -} - -void timer_clear(void) { timer_count = 0; } - -uint16_t timer_read(void) { return (uint16_t)(timer_count & 0xFFFF); } - -uint32_t timer_read32(void) { return timer_count; } - -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); } diff --git a/tmk_core/common/mbed/xprintf.cpp b/tmk_core/common/mbed/xprintf.cpp deleted file mode 100644 index 184b7fa7a0a2..000000000000 --- a/tmk_core/common/mbed/xprintf.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include -//#include -#include "mbed.h" -#include "mbed/xprintf.h" - -#define STRING_STACK_LIMIT 120 - -// TODO -int __xprintf(const char* format, ...) { return 0; } - -#if 0 -/* mbed Serial */ -Serial ser(UART_TX, UART_RX); - -/* TODO: Need small implementation for embedded */ -int xprintf(const char* format, ...) -{ - /* copy from mbed/common/RawSerial.cpp */ - std::va_list arg; - va_start(arg, format); - int len = vsnprintf(NULL, 0, format, arg); - if (len < STRING_STACK_LIMIT) { - char temp[STRING_STACK_LIMIT]; - vsprintf(temp, format, arg); - ser.puts(temp); - } else { - char *temp = new char[len + 1]; - vsprintf(temp, format, arg); - ser.puts(temp); - delete[] temp; - } - va_end(arg); - return len; - -/* Fail: __builtin_va_arg_pack? - * https://gcc.gnu.org/onlinedocs/gcc-4.3.5/gcc/Constructing-Calls.html#Constructing-Calls - void *arg = __builtin_apply_args(); - void *ret = __builtin_apply((void*)(&(ser.printf)), arg, 100); - __builtin_return(ret) -*/ -/* Fail: varargs can not be passed to printf - //int r = ser.printf("test %i\r\n", 123); - va_list arg; - va_start(arg, format); - int r = ser.printf(format, arg); - va_end(arg); - return r; -*/ -} -#endif diff --git a/tmk_core/common/mbed/xprintf.h b/tmk_core/common/mbed/xprintf.h deleted file mode 100644 index e27822d3a8eb..000000000000 --- a/tmk_core/common/mbed/xprintf.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef XPRINTF_H -#define XPRINTF_H - -//#define xprintf(format, ...) __xprintf(format, ##__VA_ARGS__) - -#ifdef __cplusplus -extern "C" { -#endif - -int __xprintf(const char *format, ...); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/tmk_core/common/print.h b/tmk_core/common/print.h index 20189838feeb..04ca558109dc 100644 --- a/tmk_core/common/print.h +++ b/tmk_core/common/print.h @@ -128,38 +128,7 @@ extern "C" # endif /* USER_PRINT / NORMAL PRINT */ -# elif defined(__arm__) /* __arm__ */ - -# include "mbed/xprintf.h" - -# ifdef USER_PRINT /* USER_PRINT */ - -// Remove normal print defines -# define print(s) -# define println(s) -# define xprintf(fmt, ...) - -// Create user print defines -# define uprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__) -# define uprint(s) xprintf(s) -# define uprintln(s) xprintf(s "\r\n") - -# else /* NORMAL PRINT */ - -// Create user & normal print defines -# define xprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__) -# define print(s) xprintf(s) -# define println(s) xprintf(s "\r\n") -# define uprint(s) print(s) -# define uprintln(s) println(s) -# define uprintf(fmt, ...) xprintf(fmt, ##__VA_ARGS__) - -# endif /* USER_PRINT / NORMAL PRINT */ - -/* TODO: to select output destinations: UART/USBSerial */ -# define print_set_sendchar(func) - -# endif /* __AVR__ / PROTOCOL_CHIBIOS / PROTOCOL_ARM_ATSAM / __arm__ */ +# endif /* __AVR__ / PROTOCOL_CHIBIOS / PROTOCOL_ARM_ATSAM */ // User print disables the normal print messages in the body of QMK/TMK code and // is meant as a lightweight alternative to NOPRINT. Use it when you only want to do diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index cb1f386a6169..c82cd2d65a29 100644 --- a/tmk_core/common/wait.h +++ b/tmk_core/common/wait.h @@ -33,8 +33,6 @@ extern "C" { # include "clks.h" # define wait_ms(ms) CLK_delay_ms(ms) # define wait_us(us) CLK_delay_us(us) -#elif defined(__arm__) -# include "wait_api.h" #else // Unit tests void wait_ms(uint32_t ms); # define wait_us(us) wait_ms(us / 1000) diff --git a/tmk_core/protocol/mbed/HIDKeyboard.cpp b/tmk_core/protocol/mbed/HIDKeyboard.cpp deleted file mode 100644 index dbaf108fa186..000000000000 --- a/tmk_core/protocol/mbed/HIDKeyboard.cpp +++ /dev/null @@ -1,260 +0,0 @@ -#include -#include "USBHID.h" -#include "USBHID_Types.h" -#include "USBDescriptor.h" -#include "HIDKeyboard.h" - -#define DEFAULT_CONFIGURATION (1) - -HIDKeyboard::HIDKeyboard(uint16_t vendor_id, uint16_t product_id, uint16_t product_release) : USBDevice(vendor_id, product_id, product_release) { USBDevice::connect(); } - -bool HIDKeyboard::sendReport(report_keyboard_t report) { - USBDevice::write(EP1IN, report.raw, sizeof(report), MAX_PACKET_SIZE_EP1); - return true; -} - -uint8_t HIDKeyboard::leds() { return led_state; } - -bool HIDKeyboard::USBCallback_setConfiguration(uint8_t configuration) { - if (configuration != DEFAULT_CONFIGURATION) { - return false; - } - - // Configure endpoints > 0 - addEndpoint(EPINT_IN, MAX_PACKET_SIZE_EPINT); - // addEndpoint(EPINT_OUT, MAX_PACKET_SIZE_EPINT); - - // We activate the endpoint to be able to recceive data - // readStart(EPINT_OUT, MAX_PACKET_SIZE_EPINT); - return true; -} - -uint8_t *HIDKeyboard::stringImanufacturerDesc() { - static uint8_t stringImanufacturerDescriptor[] = { - 0x18, /*bLength*/ - STRING_DESCRIPTOR, /*bDescriptorType 0x03*/ - 't', - 0, - 'm', - 0, - 'k', - 0, - '-', - 0, - 'k', - 0, - 'b', - 0, - 'd', - 0, - '.', - 0, - 'c', - 0, - 'o', - 0, - 'm', - 0 /*bString iManufacturer*/ - }; - return stringImanufacturerDescriptor; -} - -uint8_t *HIDKeyboard::stringIproductDesc() { - static uint8_t stringIproductDescriptor[] = { - 0x0a, /*bLength*/ - STRING_DESCRIPTOR, /*bDescriptorType 0x03*/ - 'm', - 0, - 'b', - 0, - 'e', - 0, - 'd', - 0 /*bString iProduct*/ - }; - return stringIproductDescriptor; -} - -uint8_t *HIDKeyboard::stringIserialDesc() { - static uint8_t stringIserialDescriptor[] = { - 0x04, /*bLength*/ - STRING_DESCRIPTOR, /*bDescriptorType 0x03*/ - '0', 0 /*bString iSerial*/ - }; - return stringIserialDescriptor; -} - -uint8_t *HIDKeyboard::reportDesc() { - static uint8_t reportDescriptor[] = { - USAGE_PAGE(1), 0x01, // Generic Desktop - USAGE(1), 0x06, // Keyboard - COLLECTION(1), 0x01, // Application - - USAGE_PAGE(1), 0x07, // Key Codes - USAGE_MINIMUM(1), 0xE0, USAGE_MAXIMUM(1), 0xE7, LOGICAL_MINIMUM(1), 0x00, LOGICAL_MAXIMUM(1), 0x01, REPORT_SIZE(1), 0x01, REPORT_COUNT(1), 0x08, INPUT(1), 0x02, // Data, Variable, Absolute - - REPORT_COUNT(1), 0x01, REPORT_SIZE(1), 0x08, INPUT(1), 0x01, // Constant - - REPORT_COUNT(1), 0x05, REPORT_SIZE(1), 0x01, USAGE_PAGE(1), 0x08, // LEDs - USAGE_MINIMUM(1), 0x01, USAGE_MAXIMUM(1), 0x05, OUTPUT(1), 0x02, // Data, Variable, Absolute - - REPORT_COUNT(1), 0x01, REPORT_SIZE(1), 0x03, OUTPUT(1), 0x01, // Constant - - REPORT_COUNT(1), 0x06, REPORT_SIZE(1), 0x08, LOGICAL_MINIMUM(1), 0x00, LOGICAL_MAXIMUM(1), 0xFF, USAGE_PAGE(1), 0x07, // Key Codes - USAGE_MINIMUM(1), 0x00, USAGE_MAXIMUM(1), 0xFF, INPUT(1), 0x00, // Data, Array - END_COLLECTION(0), - }; - reportLength = sizeof(reportDescriptor); - return reportDescriptor; -} - -uint16_t HIDKeyboard::reportDescLength() { - reportDesc(); - return reportLength; -} - -#define TOTAL_DESCRIPTOR_LENGTH ((1 * CONFIGURATION_DESCRIPTOR_LENGTH) + (1 * INTERFACE_DESCRIPTOR_LENGTH) + (1 * HID_DESCRIPTOR_LENGTH) + (1 * ENDPOINT_DESCRIPTOR_LENGTH)) -uint8_t *HIDKeyboard::configurationDesc() { - static uint8_t configurationDescriptor[] = { - CONFIGURATION_DESCRIPTOR_LENGTH, // bLength - CONFIGURATION_DESCRIPTOR, // bDescriptorType - LSB(TOTAL_DESCRIPTOR_LENGTH), // wTotalLength (LSB) - MSB(TOTAL_DESCRIPTOR_LENGTH), // wTotalLength (MSB) - 0x01, // bNumInterfaces - DEFAULT_CONFIGURATION, // bConfigurationValue - 0x00, // iConfiguration - C_RESERVED | C_REMOTE_WAKEUP, // bmAttributes - C_POWER(100), // bMaxPowerHello World from Mbed - - INTERFACE_DESCRIPTOR_LENGTH, // bLength - INTERFACE_DESCRIPTOR, // bDescriptorType - 0x00, // bInterfaceNumber - 0x00, // bAlternateSetting - 0x01, // bNumEndpoints - HID_CLASS, // bInterfaceClass - 1, // bInterfaceSubClass (boot) - 1, // bInterfaceProtocol (keyboard) - 0x00, // iInterface - - HID_DESCRIPTOR_LENGTH, // bLength - HID_DESCRIPTOR, // bDescriptorType - LSB(HID_VERSION_1_11), // bcdHID (LSB) - MSB(HID_VERSION_1_11), // bcdHID (MSB) - 0x00, // bCountryCode - 0x01, // bNumDescriptors - REPORT_DESCRIPTOR, // bDescriptorType - (uint8_t)(LSB(reportDescLength())), // wDescriptorLength (LSB) - (uint8_t)(MSB(reportDescLength())), // wDescriptorLength (MSB) - - ENDPOINT_DESCRIPTOR_LENGTH, // bLength - ENDPOINT_DESCRIPTOR, // bDescriptorType - PHY_TO_DESC(EP1IN), // bEndpointAddress - E_INTERRUPT, // bmAttributes - LSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (LSB) - MSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (MSB) - 1, // bInterval (milliseconds) - }; - return configurationDescriptor; -} - -#if 0 -uint8_t * HIDKeyboard::deviceDesc() { - static uint8_t deviceDescriptor[] = { - DEVICE_DESCRIPTOR_LENGTH, /* bLength */ - DEVICE_DESCRIPTOR, /* bDescriptorType */ - LSB(USB_VERSION_2_0), /* bcdUSB (LSB) */ - MSB(USB_VERSION_2_0), /* bcdUSB (MSB) */ - 0x00, /* bDeviceClass */ - 0x00, /* bDeviceSubClass */ - 0x00, /* bDeviceprotocol */ - MAX_PACKET_SIZE_EP0, /* bMaxPacketSize0 */ - (uint8_t)(LSB(0xfeed)), /* idVendor (LSB) */ - (uint8_t)(MSB(0xfeed)), /* idVendor (MSB) */ - (uint8_t)(LSB(0x1bed)), /* idProduct (LSB) */ - (uint8_t)(MSB(0x1bed)), /* idProduct (MSB) */ - (uint8_t)(LSB(0x0002)), /* bcdDevice (LSB) */ - (uint8_t)(MSB(0x0002)), /* bcdDevice (MSB) */ - 0, /* iManufacturer */ - 0, /* iProduct */ - 0, /* iSerialNumber */ - 0x01 /* bNumConfigurations */ - }; - return deviceDescriptor; -} -#endif - -bool HIDKeyboard::USBCallback_request() { - bool success = false; - CONTROL_TRANSFER *transfer = getTransferPtr(); - uint8_t * hidDescriptor; - - // Process additional standard requests - - if ((transfer->setup.bmRequestType.Type == STANDARD_TYPE)) { - switch (transfer->setup.bRequest) { - case GET_DESCRIPTOR: - switch (DESCRIPTOR_TYPE(transfer->setup.wValue)) { - case REPORT_DESCRIPTOR: - if ((reportDesc() != NULL) && (reportDescLength() != 0)) { - transfer->remaining = reportDescLength(); - transfer->ptr = reportDesc(); - transfer->direction = DEVICE_TO_HOST; - success = true; - } - break; - case HID_DESCRIPTOR: - // Find the HID descriptor, after the configuration descriptor - hidDescriptor = findDescriptor(HID_DESCRIPTOR); - if (hidDescriptor != NULL) { - transfer->remaining = HID_DESCRIPTOR_LENGTH; - transfer->ptr = hidDescriptor; - transfer->direction = DEVICE_TO_HOST; - success = true; - } - break; - - default: - break; - } - break; - default: - break; - } - } - - // Process class-specific requests - if (transfer->setup.bmRequestType.Type == CLASS_TYPE) { - switch (transfer->setup.bRequest) { - case SET_REPORT: - // LED indicator - // TODO: check Interface and Report length? - // if (transfer->setup.wIndex == INTERFACE_KEYBOAD) { } - // if (transfer->setup.wLength == 1) - - transfer->remaining = 1; - // transfer->ptr = ?? what ptr should be set when OUT(not used?) - transfer->direction = HOST_TO_DEVICE; - transfer->notify = true; /* notify with USBCallback_requestCompleted */ - success = true; - default: - break; - } - } - - return success; -} - -void HIDKeyboard::USBCallback_requestCompleted(uint8_t *buf, uint32_t length) { - if (length > 0) { - CONTROL_TRANSFER *transfer = getTransferPtr(); - if (transfer->setup.bmRequestType.Type == CLASS_TYPE) { - switch (transfer->setup.bRequest) { - case SET_REPORT: - led_state = buf[0]; - break; - default: - break; - } - } - } -} diff --git a/tmk_core/protocol/mbed/HIDKeyboard.h b/tmk_core/protocol/mbed/HIDKeyboard.h deleted file mode 100644 index e8ff10869928..000000000000 --- a/tmk_core/protocol/mbed/HIDKeyboard.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef HIDKEYBOARD_H - -# include "stdint.h" -# include "stdbool.h" -# include "USBHID.h" -# include "report.h" - -class HIDKeyboard : public USBDevice { - public: - HIDKeyboard(uint16_t vendor_id = 0xFEED, uint16_t product_id = 0xabed, uint16_t product_release = 0x0001); - - bool sendReport(report_keyboard_t report); - uint8_t leds(void); - - protected: - uint16_t reportLength; - virtual bool USBCallback_setConfiguration(uint8_t configuration); - virtual uint8_t* stringImanufacturerDesc(); - virtual uint8_t* stringIproductDesc(); - virtual uint8_t* stringIserialDesc(); - virtual uint16_t reportDescLength(); - virtual uint8_t* reportDesc(); - virtual uint8_t* configurationDesc(); - // virtual uint8_t * deviceDesc(); - virtual bool USBCallback_request(); - virtual void USBCallback_requestCompleted(uint8_t* buf, uint32_t length); - - private: - uint8_t led_state; -}; - -#endif diff --git a/tmk_core/protocol/mbed/mbed_driver.cpp b/tmk_core/protocol/mbed/mbed_driver.cpp deleted file mode 100644 index 83086499c77a..000000000000 --- a/tmk_core/protocol/mbed/mbed_driver.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "HIDKeyboard.h" -#include "host.h" -#include "host_driver.h" -#include "mbed_driver.h" - -HIDKeyboard keyboard; - -/* 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); - -host_driver_t mbed_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; - -static uint8_t keyboard_leds(void) { return keyboard.leds(); } -static void send_keyboard(report_keyboard_t *report) { keyboard.sendReport(*report); } -static void send_mouse(report_mouse_t *report) {} -static void send_system(uint16_t data) {} -static void send_consumer(uint16_t data) {} diff --git a/tmk_core/protocol/mbed/mbed_driver.h b/tmk_core/protocol/mbed/mbed_driver.h deleted file mode 100644 index dd1153b43a94..000000000000 --- a/tmk_core/protocol/mbed/mbed_driver.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "host_driver.h" - -extern host_driver_t mbed_driver; diff --git a/tmk_core/protocol/ps2_io_mbed.c b/tmk_core/protocol/ps2_io_mbed.c deleted file mode 100644 index 9cec3dfbb43c..000000000000 --- a/tmk_core/protocol/ps2_io_mbed.c +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include "ps2_io.h" -#include "gpio_api.h" - -static gpio_t clock; -static gpio_t data; - -/* - * Clock - */ -void clock_init(void) { - gpio_init(&clock, P0_9); - gpio_mode(&clock, OpenDrain | PullNone); -} - -void clock_lo(void) { - gpio_dir(&clock, PIN_OUTPUT); - gpio_write(&clock, 0); -} -void clock_hi(void) { - gpio_dir(&clock, PIN_OUTPUT); - gpio_write(&clock, 1); -} - -bool clock_in(void) { - gpio_dir(&clock, PIN_INPUT); - return gpio_read(&clock); -} - -/* - * Data - */ -void data_init(void) { - gpio_init(&data, P0_8); - gpio_mode(&data, OpenDrain | PullNone); -} - -void data_lo(void) { - gpio_dir(&data, PIN_OUTPUT); - gpio_write(&data, 0); -} - -void data_hi(void) { - gpio_dir(&data, PIN_OUTPUT); - gpio_write(&data, 1); -} - -bool data_in(void) { - gpio_dir(&data, PIN_INPUT); - return gpio_read(&data); -} From efb21c00ce8090303456dc9c22665a69c3fc298a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 11 Dec 2019 19:39:30 +0000 Subject: [PATCH 033/973] Fix FORCE_NKRO handling (#7601) --- quantum/process_keycode/process_magic.c | 242 ++++++++++++------------ tmk_core/common/keyboard.c | 1 + 2 files changed, 123 insertions(+), 120 deletions(-) diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c index 9668a50f7f19..44dd5f057955 100644 --- a/quantum/process_keycode/process_magic.c +++ b/quantum/process_keycode/process_magic.c @@ -39,138 +39,140 @@ float cg_swap_song[][2] = CG_SWAP_SONG; */ bool process_magic(uint16_t keycode, keyrecord_t *record) { // skip anything that isn't a keyup - if (!record->event.pressed) { - return true; - } - - /* keymap config */ - keymap_config.raw = eeconfig_read_keymap(); - switch (keycode) { - case MAGIC_SWAP_CONTROL_CAPSLOCK: - keymap_config.swap_control_capslock = true; - break; - case MAGIC_CAPSLOCK_TO_CONTROL: - keymap_config.capslock_to_control = true; - break; - case MAGIC_SWAP_LALT_LGUI: - keymap_config.swap_lalt_lgui = true; - break; - case MAGIC_SWAP_RALT_RGUI: - keymap_config.swap_ralt_rgui = true; - break; - case MAGIC_SWAP_LCTL_LGUI: - keymap_config.swap_lctl_lgui = true; - break; - case MAGIC_SWAP_RCTL_RGUI: - keymap_config.swap_rctl_rgui = true; - break; - case MAGIC_NO_GUI: - keymap_config.no_gui = true; - break; - case MAGIC_SWAP_GRAVE_ESC: - keymap_config.swap_grave_esc = true; - break; - case MAGIC_SWAP_BACKSLASH_BACKSPACE: - keymap_config.swap_backslash_backspace = true; - break; - case MAGIC_HOST_NKRO: - clear_keyboard(); // clear first buffer to prevent stuck keys - keymap_config.nkro = true; - break; - case MAGIC_SWAP_ALT_GUI: - keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true; + if (record->event.pressed) { + switch (keycode) { + case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_ALT_GUI: + case MAGIC_SWAP_LCTL_LGUI ... MAGIC_EE_HANDS_RIGHT: + /* keymap config */ + keymap_config.raw = eeconfig_read_keymap(); + switch (keycode) { + case MAGIC_SWAP_CONTROL_CAPSLOCK: + keymap_config.swap_control_capslock = true; + break; + case MAGIC_CAPSLOCK_TO_CONTROL: + keymap_config.capslock_to_control = true; + break; + case MAGIC_SWAP_LALT_LGUI: + keymap_config.swap_lalt_lgui = true; + break; + case MAGIC_SWAP_RALT_RGUI: + keymap_config.swap_ralt_rgui = true; + break; + case MAGIC_SWAP_LCTL_LGUI: + keymap_config.swap_lctl_lgui = true; + break; + case MAGIC_SWAP_RCTL_RGUI: + keymap_config.swap_rctl_rgui = true; + break; + case MAGIC_NO_GUI: + keymap_config.no_gui = true; + break; + case MAGIC_SWAP_GRAVE_ESC: + keymap_config.swap_grave_esc = true; + break; + case MAGIC_SWAP_BACKSLASH_BACKSPACE: + keymap_config.swap_backslash_backspace = true; + break; + case MAGIC_HOST_NKRO: + clear_keyboard(); // clear first buffer to prevent stuck keys + keymap_config.nkro = true; + break; + case MAGIC_SWAP_ALT_GUI: + keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true; #ifdef AUDIO_ENABLE - PLAY_SONG(ag_swap_song); + PLAY_SONG(ag_swap_song); #endif - break; - case MAGIC_SWAP_CTL_GUI: - keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = true; + break; + case MAGIC_SWAP_CTL_GUI: + keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = true; #ifdef AUDIO_ENABLE - PLAY_SONG(cg_swap_song); + PLAY_SONG(cg_swap_song); #endif - break; - case MAGIC_UNSWAP_CONTROL_CAPSLOCK: - keymap_config.swap_control_capslock = false; - break; - case MAGIC_UNCAPSLOCK_TO_CONTROL: - keymap_config.capslock_to_control = false; - break; - case MAGIC_UNSWAP_LALT_LGUI: - keymap_config.swap_lalt_lgui = false; - break; - case MAGIC_UNSWAP_RALT_RGUI: - keymap_config.swap_ralt_rgui = false; - break; - case MAGIC_UNSWAP_LCTL_LGUI: - keymap_config.swap_lctl_lgui = false; - break; - case MAGIC_UNSWAP_RCTL_RGUI: - keymap_config.swap_rctl_rgui = false; - break; - case MAGIC_UNNO_GUI: - keymap_config.no_gui = false; - break; - case MAGIC_UNSWAP_GRAVE_ESC: - keymap_config.swap_grave_esc = false; - break; - case MAGIC_UNSWAP_BACKSLASH_BACKSPACE: - keymap_config.swap_backslash_backspace = false; - break; - case MAGIC_UNHOST_NKRO: - clear_keyboard(); // clear first buffer to prevent stuck keys - keymap_config.nkro = false; - break; - case MAGIC_UNSWAP_ALT_GUI: - keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false; + break; + case MAGIC_UNSWAP_CONTROL_CAPSLOCK: + keymap_config.swap_control_capslock = false; + break; + case MAGIC_UNCAPSLOCK_TO_CONTROL: + keymap_config.capslock_to_control = false; + break; + case MAGIC_UNSWAP_LALT_LGUI: + keymap_config.swap_lalt_lgui = false; + break; + case MAGIC_UNSWAP_RALT_RGUI: + keymap_config.swap_ralt_rgui = false; + break; + case MAGIC_UNSWAP_LCTL_LGUI: + keymap_config.swap_lctl_lgui = false; + break; + case MAGIC_UNSWAP_RCTL_RGUI: + keymap_config.swap_rctl_rgui = false; + break; + case MAGIC_UNNO_GUI: + keymap_config.no_gui = false; + break; + case MAGIC_UNSWAP_GRAVE_ESC: + keymap_config.swap_grave_esc = false; + break; + case MAGIC_UNSWAP_BACKSLASH_BACKSPACE: + keymap_config.swap_backslash_backspace = false; + break; + case MAGIC_UNHOST_NKRO: + clear_keyboard(); // clear first buffer to prevent stuck keys + keymap_config.nkro = false; + break; + case MAGIC_UNSWAP_ALT_GUI: + keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false; #ifdef AUDIO_ENABLE - PLAY_SONG(ag_norm_song); + PLAY_SONG(ag_norm_song); #endif - break; - case MAGIC_UNSWAP_CTL_GUI: - keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = false; + break; + case MAGIC_UNSWAP_CTL_GUI: + keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = false; #ifdef AUDIO_ENABLE - PLAY_SONG(cg_norm_song); + PLAY_SONG(cg_norm_song); #endif - break; - case MAGIC_TOGGLE_ALT_GUI: - keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui; - keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui; + break; + case MAGIC_TOGGLE_ALT_GUI: + keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui; + keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui; #ifdef AUDIO_ENABLE - if (keymap_config.swap_ralt_rgui) { - PLAY_SONG(ag_swap_song); - } else { - PLAY_SONG(ag_norm_song); - } + if (keymap_config.swap_ralt_rgui) { + PLAY_SONG(ag_swap_song); + } else { + PLAY_SONG(ag_norm_song); + } #endif - break; - case MAGIC_TOGGLE_CTL_GUI: - keymap_config.swap_lctl_lgui = !keymap_config.swap_lctl_lgui; - keymap_config.swap_rctl_rgui = keymap_config.swap_lctl_lgui; + break; + case MAGIC_TOGGLE_CTL_GUI: + keymap_config.swap_lctl_lgui = !keymap_config.swap_lctl_lgui; + keymap_config.swap_rctl_rgui = keymap_config.swap_lctl_lgui; #ifdef AUDIO_ENABLE - if (keymap_config.swap_rctl_rgui) { - PLAY_SONG(cg_swap_song); - } else { - PLAY_SONG(cg_norm_song); - } + if (keymap_config.swap_rctl_rgui) { + PLAY_SONG(cg_swap_song); + } else { + PLAY_SONG(cg_norm_song); + } #endif - break; - case MAGIC_TOGGLE_NKRO: - clear_keyboard(); // clear first buffer to prevent stuck keys - keymap_config.nkro = !keymap_config.nkro; - break; - case MAGIC_EE_HANDS_LEFT: - eeconfig_update_handedness(true); - break; - case MAGIC_EE_HANDS_RIGHT: - eeconfig_update_handedness(false); - break; - default: - // Not a magic keycode so continue processing - return true; - } + break; + case MAGIC_TOGGLE_NKRO: + clear_keyboard(); // clear first buffer to prevent stuck keys + keymap_config.nkro = !keymap_config.nkro; + break; + case MAGIC_EE_HANDS_LEFT: + eeconfig_update_handedness(true); + break; + case MAGIC_EE_HANDS_RIGHT: + eeconfig_update_handedness(false); + break; + } - eeconfig_update_keymap(keymap_config.raw); - clear_keyboard(); // clear to prevent stuck keys + eeconfig_update_keymap(keymap_config.raw); + clear_keyboard(); // clear to prevent stuck keys + + return false; + } + } - return false; + // Not a magic keycode so continue processing + return true; } diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 63ace9793cfa..125f00ccf7e1 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -254,6 +254,7 @@ void keyboard_init(void) { #endif #if defined(NKRO_ENABLE) && defined(FORCE_NKRO) keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); #endif keyboard_post_init_kb(); /* Always keep this last */ } From bbad6e1ae7c68b4bf19c9d13f7347ce2b664fed6 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Thu, 12 Dec 2019 04:39:04 +0100 Subject: [PATCH 034/973] [Keyboard][Phoebe] Update default keymap, fix LAYOUT macro (#7604) * fix LAYOUT macro * Phoebe: Update default keymap * Replace XXXXXXX macro with the previous key instead --- .../maxr1998/phoebe/keymaps/default/keymap.c | 28 +++++++++---------- keyboards/maxr1998/phoebe/phoebe.h | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c index 1bf6f291dc8a..2d25d85e6c92 100644 --- a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c +++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c @@ -18,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwertz * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ? | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Grv | Q | W | E | R | T | Z | U | I | O | P | Enter| + * | ^ ° | Q | W | E | R | T | Z | U | I | O | P | Bspc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | +* ~ | ? | + * | Tab | A | S | D | F | G | H | J | K | L | +* ~ | Enter| * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -30,9 +30,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTZ] = LAYOUT( - KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, KC_BSPC, - KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, DE_QST, + 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_LCTL, KC_LGUI, KC_LALT, KC_LALT, KC_SC, KC_SPC, KC_ALGR, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT ), @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | ´ ` | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | #' | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SC] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + DE_ACUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______, _______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______ @@ -60,11 +60,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer * ,-----------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Ü | | Ö | F11 | | + * | | | | | | | | Ü | F9 | Ö | | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Lock | Ä | ß | | | GAME | | RGBS | RGBB | RGBS | F12 | | + * | Lock | Ä | ß | | | GAME | | RGBS | RGBB | RGBS | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -72,9 +72,9 @@ 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_F9, KC_F10, KC_DEL, - _______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, KC_F11, _______, - KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,KC_F12, _______, + _______, 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,_______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END ), diff --git a/keyboards/maxr1998/phoebe/phoebe.h b/keyboards/maxr1998/phoebe/phoebe.h index 2bf5a2d7990b..f3e61756a3c4 100644 --- a/keyboards/maxr1998/phoebe/phoebe.h +++ b/keyboards/maxr1998/phoebe/phoebe.h @@ -14,5 +14,5 @@ { 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 }, \ - { k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b } \ + { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \ } From 45e71aedf030d80e62c491c4a906fdf88ccaec0c Mon Sep 17 00:00:00 2001 From: Ethan Beyer Date: Thu, 12 Dec 2019 05:53:39 -0500 Subject: [PATCH 035/973] [Keymap] My DZ60 Layout and files (#7537) * I don't know if this is how my keyboard is laid out or not * testing, still broken * name change * I think this is the layout I will try to use to start * it compiles! * added norman layout! * media keys * Moved backlight functions to KEYB Moved Delete off of Backspace and to the < key * more changes to layout, move Norman to 1 so it was moddable by FCTN * swapped volume and media, I use volume a lot more than media * Eh, it's still all in flux. * I don't want the entire function layer full of dead keys, after all... * moves escape to the caps lock key and caps lock to the functions layer * update my readme for posterity * Updates bonfire dz60 for better escape control * WIP commit -- this is not working yet * updates keymap for GAME layer adds info to README adds visual keyboard layout map in json and jpg for reference * updates readme for visual keymap insertion * removes my layout from the parent folder and keeps it localized * updates the C code to be more readable * finished the HELD_ESCAPE code * finishes v6.1.0 * updates layout names to match repo code style per @mechmerlin Apply suggestions from code review * updates to code style per suggestions by @mechmerlin * Update global-functions.c updates some personal documentation * updates hold time for escape on gaming layer * updates several aspects of the code based on PR requests * moves a variable --- keyboards/dz60/keymaps/_bonfire/README.md | 16 + .../dz60/keymaps/_bonfire/dz60-v6-1-0.json | 1160 +++++++++++++++++ .../dz60/keymaps/_bonfire/keymap-parts/defs.c | 29 + .../keymaps/_bonfire/keymap-parts/functions.c | 34 + .../keymaps/_bonfire/keymap-parts/layers.c | 115 ++ keyboards/dz60/keymaps/_bonfire/keymap.c | 12 + .../_bonfire/not-in-use/super-alt-tab.c | 37 + keyboards/dz60/keymaps/_bonfire/rules.mk | 3 + .../dz60/keymaps/_bonfire/scratchpad.txt | 7 + 9 files changed, 1413 insertions(+) create mode 100644 keyboards/dz60/keymaps/_bonfire/README.md create mode 100644 keyboards/dz60/keymaps/_bonfire/dz60-v6-1-0.json create mode 100644 keyboards/dz60/keymaps/_bonfire/keymap-parts/defs.c create mode 100644 keyboards/dz60/keymaps/_bonfire/keymap-parts/functions.c create mode 100644 keyboards/dz60/keymaps/_bonfire/keymap-parts/layers.c create mode 100644 keyboards/dz60/keymaps/_bonfire/keymap.c create mode 100644 keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c create mode 100644 keyboards/dz60/keymaps/_bonfire/rules.mk create mode 100644 keyboards/dz60/keymaps/_bonfire/scratchpad.txt diff --git a/keyboards/dz60/keymaps/_bonfire/README.md b/keyboards/dz60/keymaps/_bonfire/README.md new file mode 100644 index 000000000000..9fe4c5a2da4a --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/README.md @@ -0,0 +1,16 @@ +# Docs + +1. https://docs.qmk.fm/#/ +2. To build, run: `make dz60:_bonfire` + +## Map of Layers + +http://www.keyboard-layout-editor.com/#/gists/b19ee1c251c908d9b5ef76965d588937 + +![Visual Keymap](https://i.imgur.com/DuiUo0W.jpg) + +### Todo +- lighting effects based on layer in use + - https://github.com/DanDobrick/qmk_firmware/blob/danDobrick-v60r-layout/keyboards/v60_type_r/keymaps/danDobrick/keymap.c#L140 + +- rewrite the mod-tap functions to use the non-deprecated way of instancing them diff --git a/keyboards/dz60/keymaps/_bonfire/dz60-v6-1-0.json b/keyboards/dz60/keymaps/_bonfire/dz60-v6-1-0.json new file mode 100644 index 000000000000..42625f7e2c0f --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/dz60-v6-1-0.json @@ -0,0 +1,1160 @@ +[ + { + "name": "DZ60 v6.1.0", + "author": "Bonf1re" + }, + [ + { + "c": "#454545", + "a": 7, + "f": 2, + "w": 1.75 + }, + "NOTHING", + { + "c": "#fc8e28", + "w": 1.25 + }, + "HELD", + { + "c": "#7afff6", + "w2": 2 + }, + "Function Layer", + { + "x": 1, + "c": "#c47aff", + "w2": 2 + }, + "Keyboard Layer" + ], + [ + { + "y": 0.75, + "c": "#cccccc", + "f": 3, + "w": 3 + }, + "[BASE]" + ], + [ + { + "a": 5 + }, + "~\n`", + "!\n1", + "@\n2", + "#\n3", + "$\n4", + "%\n5", + "^\n6", + "&\n7", + "*\n8", + "(\n9", + ")\n0", + "_\n-", + "+\n=", + { + "a": 7, + "w": 2 + }, + "Backspace" + ], + [ + { + "w": 1.5 + }, + "Tab", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + { + "a": 5 + }, + "{\n[", + "}\n]", + { + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "a": 7, + "w": 1.75 + }, + "Escape", + "A", + "S", + "D", + { + "n": true + }, + "F", + "G", + "H", + { + "n": true + }, + "J", + "K", + "L", + { + "a": 5 + }, + ":\n;", + "\"\n'", + { + "a": 7, + "w": 2.25 + }, + "Enter" + ], + [ + { + "w": 2.25 + }, + "Shift", + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + { + "a": 5 + }, + "<\n,", + ">\n.", + "?\n/", + { + "w": 1.75 + }, + "Up\nShift", + { + "c": "#7afff6", + "a": 7, + "fa": [ + 2 + ] + }, + "HACK" + ], + [ + { + "c": "#cccccc", + "f": 3, + "w": 1.25 + }, + "Ctrl", + { + "f": 3, + "w": 1.25 + }, + "Sys", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "w": 6.25 + }, + "", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "a": 5, + "f": 3, + "w": 1.25 + }, + "Left\nSys", + { + "f": 3, + "w": 1.25 + }, + "Down\nCtrl", + { + "f": 3, + "w": 1.25 + }, + "Right\nHYPER" + ], + [ + { + "y": 0.25, + "a": 7, + "f": 3, + "w": 3 + }, + "[NRMN]" + ], + [ + { + "c": "#aaaaaa", + "g": true, + "a": 5, + "f": 3 + }, + "~\n`", + { + "f": 3 + }, + "!\n1", + { + "f": 3 + }, + "@\n2", + { + "f": 3 + }, + "#\n3", + { + "f": 3 + }, + "$\n4", + { + "f": 3 + }, + "%\n5", + { + "f": 3 + }, + "^\n6", + { + "f": 3 + }, + "&\n7", + { + "f": 3 + }, + "*\n8", + { + "f": 3 + }, + "(\n9", + { + "f": 3 + }, + ")\n0", + { + "f": 3 + }, + "_\n-", + { + "f": 3 + }, + "+\n=", + { + "a": 7, + "f": 3, + "w": 2 + }, + "Backspace" + ], + [ + { + "f": 3, + "w": 1.5 + }, + "Tab", + { + "c": "#cccccc", + "g": false, + "f": 3 + }, + "Q", + { + "f": 3 + }, + "W", + { + "f": 3 + }, + "D", + { + "f": 3 + }, + "F", + { + "f": 3 + }, + "K", + { + "f": 3 + }, + "J", + { + "f": 3 + }, + "U", + { + "f": 3 + }, + "R", + { + "f": 3 + }, + "L", + { + "a": 5, + "f": 3 + }, + ":\n;", + { + "c": "#aaaaaa", + "g": true, + "f": 3 + }, + "{\n[", + { + "f": 3 + }, + "}\n]", + { + "f": 3, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "a": 7, + "f": 3, + "w": 1.75 + }, + "Escape", + { + "c": "#cccccc", + "g": false, + "f": 3 + }, + "A", + { + "f": 3 + }, + "S", + { + "f": 3 + }, + "E", + { + "f": 3, + "n": true + }, + "T", + { + "f": 3 + }, + "G", + { + "f": 3 + }, + "Y", + { + "f": 3, + "n": true + }, + "N", + { + "f": 3 + }, + "I", + { + "f": 3 + }, + "O", + { + "f": 3 + }, + "H", + { + "c": "#aaaaaa", + "g": true, + "a": 5 + }, + "\n'\n\n\n\n\n\"", + { + "a": 7, + "f": 3, + "w": 2.25 + }, + "Enter" + ], + [ + { + "f": 3, + "w": 2.25 + }, + "Shift", + { + "c": "#cccccc", + "g": false, + "f": 3 + }, + "Z", + { + "f": 3 + }, + "X", + { + "f": 3 + }, + "C", + { + "f": 3 + }, + "V", + { + "f": 3 + }, + "B", + { + "f": 3 + }, + "P", + { + "f": 3 + }, + "M", + { + "c": "#aaaaaa", + "g": true, + "a": 5, + "f": 3 + }, + "<\n,", + { + "f": 3 + }, + ">\n.", + { + "f": 3 + }, + "?\n/", + { + "f": 3, + "w": 1.75 + }, + "Up\nShift", + { + "a": 7, + "f": 3 + }, + "HACK" + ], + [ + { + "f": 3, + "w": 1.25 + }, + "Ctrl", + { + "f": 3, + "w": 1.25 + }, + "Sys", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "w": 6.25 + }, + "", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "a": 5, + "f": 3, + "w": 1.25 + }, + "Left\nSys", + { + "f": 3, + "w": 1.25 + }, + "Down\nCtrl", + { + "f": 3, + "w": 1.25 + }, + "Right\nHYPER" + ], + [ + { + "y": 0.25, + "c": "#cccccc", + "g": false, + "a": 7, + "f": 3, + "w": 3 + }, + "[GAME]" + ], + [ + { + "c": "#aaaaaa", + "g": true + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 2 + }, + "" + ], + [ + { + "w": 1.5 + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 1.5 + }, + "" + ], + [ + { + "c": "#cccccc", + "g": false, + "f": 3, + "w": 1.75 + }, + "Held Esc", + { + "c": "#aaaaaa", + "g": true + }, + "", + "", + "", + { + "n": true + }, + "", + "", + "", + { + "n": true + }, + "", + "", + "", + "", + "", + { + "w": 2.25 + }, + "" + ], + [ + { + "w": 2.25 + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 1.75 + }, + "", + "" + ], + [ + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 6.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "" + ], + [ + { + "y": 0.25, + "c": "#cccccc", + "g": false, + "a": 5, + "fa": [ + 2, + 1 + ], + "w": 3 + }, + "\nHACK is held\n\n\n\n\n[FCTN]" + ], + [ + { + "c": "#7afff6", + "a": 7, + "f": 3 + }, + "ESC", + { + "f": 3 + }, + "F1", + { + "f": 3 + }, + "F2", + { + "f": 3 + }, + "F3", + { + "f": 3 + }, + "F4", + { + "f": 3 + }, + "F5", + { + "f": 3 + }, + "F6", + { + "f": 3 + }, + "F7", + { + "f": 3 + }, + "F8", + { + "f": 3 + }, + "F9", + { + "f": 3 + }, + "F10", + { + "f": 3 + }, + "F11", + { + "f": 3 + }, + "F12", + { + "c": "#aaaaaa", + "g": true, + "f": 3, + "w": 2 + }, + "Backspace" + ], + [ + { + "f": 3, + "w": 1.5 + }, + "Tab", + { + "c": "#7afff6", + "g": false, + "f": 3 + }, + "Mute", + { + "a": 5, + "f": 3 + }, + "\nDown\n\n\n\n\nVolume", + { + "f": 3 + }, + "\nUp\n\n\n\n\nVolume", + { + "c": "#aaaaaa", + "g": true, + "a": 7, + "f": 3 + }, + "R", + { + "f": 3 + }, + "T", + { + "f": 3 + }, + "Y", + { + "f": 3 + }, + "U", + { + "f": 3 + }, + "I", + { + "f": 3 + }, + "O", + { + "c": "#7afff6", + "g": false, + "a": 5, + "f": 3 + }, + "\nScreen\n\n\n\n\nPrint", + { + "f": 3 + }, + "\nLock\n\n\n\n\nScroll", + { + "a": 7, + "f": 3 + }, + "Pause", + { + "c": "#aaaaaa", + "g": true, + "a": 5, + "f": 3, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "c": "#7afff6", + "g": false, + "a": 7, + "f": 3, + "w": 1.75 + }, + "Caps Lock", + { + "a": 5, + "f": 3 + }, + "\nPrev\n\n\n\n\nMedia", + { + "f": 3 + }, + "\nPlay\n\n\n\n\nMedia", + { + "f": 3 + }, + "\nNext\n\n\n\n\nMedia", + { + "c": "#aaaaaa", + "g": true, + "a": 7, + "f": 3, + "n": true + }, + "F", + { + "f": 3 + }, + "G", + { + "f": 3 + }, + "H", + { + "f": 3, + "n": true + }, + "J", + { + "f": 3 + }, + "K", + { + "c": "#7afff6", + "g": false, + "f": 3 + }, + "Insert", + { + "f": 3 + }, + "Home", + { + "a": 5, + "f": 3 + }, + "\nUp\n\n\n\n\nPage", + { + "c": "#aaaaaa", + "g": true, + "a": 7, + "f": 3, + "w": 2.25 + }, + "Enter" + ], + [ + { + "f": 3, + "w": 2.25 + }, + "Shift", + { + "c": "#7afff6", + "g": false, + "f": 3 + }, + "Sleep", + { + "f": 3 + }, + "Wake", + { + "c": "#aaaaaa", + "g": true, + "f": 3 + }, + "C", + { + "f": 3 + }, + "V", + { + "f": 3 + }, + "B", + { + "f": 3 + }, + "N", + { + "f": 3 + }, + "M", + { + "c": "#7afff6", + "g": false, + "f": 3 + }, + "Delete", + { + "f": 3 + }, + "End", + { + "a": 5, + "f": 3 + }, + "\nDown\n\n\n\n\nPage", + { + "c": "#aaaaaa", + "g": true, + "f": 3, + "w": 1.75 + }, + "Up\nShift", + { + "c": "#fc8e28", + "g": false, + "a": 7, + "f": 3 + }, + "HACK" + ], + [ + { + "c": "#aaaaaa", + "g": true, + "f": 3, + "w": 1.25 + }, + "Ctrl", + { + "f": 3, + "w": 1.25 + }, + "Sys", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "w": 6.25 + }, + "", + { + "f": 3, + "w": 1.25 + }, + "Alt", + { + "c": "#c47aff", + "g": false, + "a": 5, + "f": 3, + "w": 1.25 + }, + "\n[KEYB]\n\n\n\n\nTo", + { + "c": "#aaaaaa", + "g": true, + "f": 3, + "w": 1.25 + }, + "Down\nCtrl", + { + "f": 3, + "w": 1.25 + }, + "Right\nHYPER" + ], + [ + { + "y": 0.25, + "c": "#cccccc", + "g": false, + "f": 3, + "w": 3 + }, + "\nHACK + SYS Held\n\n\n\n\n[KEYB]" + ], + [ + { + "c": "#c47aff", + "f": 2 + }, + "\n[BASE]\n\n\n\n\nReset", + { + "a": 7 + }, + "[NRMN]", + "[GAME]", + { + "c": "#454545", + "f": 3 + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "c": "#c47aff", + "f": 2, + "w": 2 + }, + "QMK FLASH" + ], + [ + { + "c": "#454545", + "f": 3, + "w": 1.5 + }, + "", + { + "c": "#c47aff", + "a": 5, + "f": 2 + }, + "\nToggle\n\n\n\n\nRGB", + "\nMode\n\n\n\n\nRGB", + "RGB\nUp\n\n\n\n\nHue", + "RGB\nDown\n\n\n\n\nHue", + "RGB\nDown\n\n\n\n\nSat", + "RGB\nUp\n\n\n\n\nSat", + "RGB\nDown\n\n\n\n\nValue", + "RGB\nUp\n\n\n\n\nValue", + { + "c": "#454545", + "a": 7, + "f": 3 + }, + "", + "", + "", + "", + { + "w": 1.5 + }, + "" + ], + [ + { + "w": 1.75 + }, + "", + { + "c": "#c47aff", + "a": 5, + "f": 2 + }, + "\nDown\n\n\n\n\nBacklight", + "\nToggle\n\n\n\n\nBacklight", + "\nUp\n\n\n\n\nBacklight", + { + "n": true + }, + "\nStep\n\n\n\n\nBacklight", + { + "c": "#454545", + "a": 7, + "f": 3 + }, + "", + "", + { + "n": true + }, + "", + "", + "", + "", + "", + { + "w": 2.25 + }, + "" + ], + [ + { + "w": 2.25 + }, + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 1.75 + }, + "", + { + "c": "#fc8e28", + "fa": [ + 2 + ] + }, + "HACK" + ], + [ + { + "c": "#454545", + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 6.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "c": "#fc8e28", + "a": 5, + "w": 1.25 + }, + "\n[KEYB]\n\n\n\n\nTo", + { + "c": "#454545", + "a": 7, + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "" + ] +] diff --git a/keyboards/dz60/keymaps/_bonfire/keymap-parts/defs.c b/keyboards/dz60/keymaps/_bonfire/keymap-parts/defs.c new file mode 100644 index 000000000000..95351b43ba37 --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/keymap-parts/defs.c @@ -0,0 +1,29 @@ +/** + * Variables + * + */ +int held_esc_threshold = 230; +bool is_esc_held = false; +uint16_t held_esc_timer = 0; + +/** + * Define Layers + */ +enum layers { + BASE = 0, + NRMN, + GAME, + FCTN, + KEYB +}; + +/** + * Define Custom Keycodes + */ +enum custom_keycodes { + HLD_ESC = SAFE_RANGE, + MOD_UP = MT(MOD_RSFT, KC_UP), + MOD_RT = MT(MOD_HYPR, KC_RIGHT), + MOD_DN = MT(MOD_RCTL, KC_DOWN), + MOD_LT = MT(MOD_RGUI, KC_LEFT) +}; diff --git a/keyboards/dz60/keymaps/_bonfire/keymap-parts/functions.c b/keyboards/dz60/keymaps/_bonfire/keymap-parts/functions.c new file mode 100644 index 000000000000..fd4d168227b4 --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/keymap-parts/functions.c @@ -0,0 +1,34 @@ +/** + * Custom Keycodes + * https://beta.docs.qmk.fm/detailed-guides/custom_quantum_functions#custom-keycodes + * + */ + +// Called on every keyup and keydown +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case HLD_ESC: + if(record->event.pressed) { + is_esc_held = true; + held_esc_timer = timer_read(); + } else { + is_esc_held = false; + unregister_code(KC_ESC); + } + return true; + break; + + default: + return true; + break; + } +} + +// checking the held escape timer +void matrix_scan_user(void) +{ + if(is_esc_held && timer_elapsed(held_esc_timer) > held_esc_threshold) { + register_code(KC_ESC); + } +} diff --git a/keyboards/dz60/keymaps/_bonfire/keymap-parts/layers.c b/keyboards/dz60/keymaps/_bonfire/keymap-parts/layers.c new file mode 100644 index 000000000000..9a44730b1479 --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/keymap-parts/layers.c @@ -0,0 +1,115 @@ +#pragma once +#include "quantum.h" + +/* + * LAYOUT_bonfire Row Keys + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │ 0e │ 14 + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ 14 + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ 13 + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ 13 + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │40 │41 │43 │ 46 │4a │4b │4d │4e │ 8 + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + * +*/ +#define LAYOUT_bonfire( \ + 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, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k46, k4a, k4b, 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, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \ +} + +/** + * XXXXXXX = Key does nothing. + * _______ = Key that allows the uppermost exposed key in a layer below it. + * + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /** + * Layer 0 + * + * QWERTY and basic modifiers. + * Upper layers are toggled or accessed through the "HACK" key: last key on fourth row. + */ + [BASE] = LAYOUT_bonfire( + 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, + 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, MOD_UP, MO(FCTN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MOD_LT, MOD_DN, MOD_RT + ), + + /** + * Layer 1 + * + * NORMAN Key layout. + * All that's changed is the position of A-Z and a few punctuation keys. + */ + [NRMN] = LAYOUT_bonfire( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______, + _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /** + * Layer 2 + * + * Moves the escape key from the left to the right side of the keyboard for gaming. + */ + [GAME] = LAYOUT_bonfire( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + HLD_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /** + * Layer 3 + * + * Function layer. + * This layer is accessed when "HACK" is held down. + * Modifiers and such to basic keys, but with basic key functions. + */ + [FCTN] = LAYOUT_bonfire( + 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_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, + _______, KC_SLEP, KC_WAKE, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, + _______, _______, _______, _______, _______, MO(KEYB), _______, _______ + ), + + /** + * Layer 4 + * + * This is the KEYB/System layer. + * Other keymaps call this a NAV layer, but it's more than just NAV-ing the board's layers. + * This Layer currently handles RGB and puts the board into RESET for flashing. + * + * ~ key resets board to [BASE]. + * 1 key toggles [NRMN]. + * 2 key toggles [GAME]. + * BACKSPACE puts board into reset. + */ + [KEYB] = LAYOUT_bonfire( + TO(BASE), TG(NRMN), TO(GAME), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, 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 + ) +}; diff --git a/keyboards/dz60/keymaps/_bonfire/keymap.c b/keyboards/dz60/keymaps/_bonfire/keymap.c new file mode 100644 index 000000000000..a6b55105c2fd --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +/** + * Bonfire Layout + * v6.1.0 + * + * @author Ethan Beyer + * + */ +#include "keymap-parts/defs.c" +#include "keymap-parts/layers.c" +#include "keymap-parts/functions.c" diff --git a/keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c b/keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c new file mode 100644 index 000000000000..1d951b1bcf7d --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c @@ -0,0 +1,37 @@ +/** + * Cool Function where a single key does ALT+TAB + * From: https://beta.docs.qmk.fm/features/feature_macros#super-alt-tab + */ +bool is_alt_tab_active = false; // ADD this near the begining of keymap.c +uint16_t alt_tab_timer = 0; // we will be using them soon. + +enum custom_keycodes { // Make sure have the awesome keycode ready + ALT_TAB = SAFE_RANGE, +}; + +// key processing +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { // This will do most of the grunt work with the keycodes. + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +// The very important timer. +void matrix_scan_user(void) { + if (is_alt_tab_active && timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } +} \ No newline at end of file diff --git a/keyboards/dz60/keymaps/_bonfire/rules.mk b/keyboards/dz60/keymaps/_bonfire/rules.mk new file mode 100644 index 000000000000..84550c22bfbf --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = no + +# CONSOLE_ENABLE = yes diff --git a/keyboards/dz60/keymaps/_bonfire/scratchpad.txt b/keyboards/dz60/keymaps/_bonfire/scratchpad.txt new file mode 100644 index 000000000000..48ed72c55066 --- /dev/null +++ b/keyboards/dz60/keymaps/_bonfire/scratchpad.txt @@ -0,0 +1,7 @@ +[NAME] = LAYOUT_bonfire( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) From df78593b1ba800223c049f3f61df6ad4bf4abe7c Mon Sep 17 00:00:00 2001 From: Lukas Alexandre Date: Thu, 12 Dec 2019 20:45:56 +0100 Subject: [PATCH 036/973] [Keyboard] Added Lex60 keyboard (#7600) --- keyboards/gami_studio/lex60/config.h | 53 +++++++++++++++++++ .../lex60/keymaps/default/keymap.c | 42 +++++++++++++++ keyboards/gami_studio/lex60/lex60.c | 1 + keyboards/gami_studio/lex60/lex60.h | 21 ++++++++ keyboards/gami_studio/lex60/readme.md | 12 +++++ keyboards/gami_studio/lex60/rules.mk | 32 +++++++++++ 6 files changed, 161 insertions(+) create mode 100644 keyboards/gami_studio/lex60/config.h create mode 100644 keyboards/gami_studio/lex60/keymaps/default/keymap.c create mode 100644 keyboards/gami_studio/lex60/lex60.c create mode 100644 keyboards/gami_studio/lex60/lex60.h create mode 100644 keyboards/gami_studio/lex60/readme.md create mode 100644 keyboards/gami_studio/lex60/rules.mk diff --git a/keyboards/gami_studio/lex60/config.h b/keyboards/gami_studio/lex60/config.h new file mode 100644 index 000000000000..8a038ccce7f8 --- /dev/null +++ b/keyboards/gami_studio/lex60/config.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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7353 +#define PRODUCT_ID 0x0160 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Lex60 +#define DESCRIPTION A 60% PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {D5,D4,B0,D2,D3} +#define MATRIX_COL_PINS {B7,F7,C7,E6,C6,F0,B6,F1,B5,F4,B4,F5,D7,F6,D6} + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define QMK_ESC_OUTPUT B7 // usually COL +#define QMK_ESC_INPUT D5 // usually ROW + +#define RGB_DI_PIN D1 +#define RGBLED_NUM 12 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/gami_studio/lex60/keymaps/default/keymap.c b/keyboards/gami_studio/lex60/keymaps/default/keymap.c new file mode 100644 index 000000000000..039eb93b3a44 --- /dev/null +++ b/keyboards/gami_studio/lex60/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +#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 { + _BASE, + _GAMING, + _FUNCTION, + _FIRMWARE +}; + +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_BSLS, 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, \ + 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_BSLS, 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_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_ENT), KC_RGUI, KC_RALT, KC_APP, KC_RCTRL), + + [_GAMING] = 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_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_LCTL, 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_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(2), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, KC_RGUI, KC_RALT, KC_APP, KC_RCTRL), + + [_FUNCTION] = 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_BSLS, KC_DEL,\ + KC_TAB, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LCTL, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_ENT), KC_RGUI, KC_RALT, KC_APP, KC_RCTRL), + + [_FIRMWARE] = LAYOUT( + RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_DEC, BL_TOGG, BL_INC, XXXXXXX, XXXXXXX, TG(1),\ + 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, XXXXXXX), +}; diff --git a/keyboards/gami_studio/lex60/lex60.c b/keyboards/gami_studio/lex60/lex60.c new file mode 100644 index 000000000000..939d6c5589a6 --- /dev/null +++ b/keyboards/gami_studio/lex60/lex60.c @@ -0,0 +1 @@ +#include "lex60.h" diff --git a/keyboards/gami_studio/lex60/lex60.h b/keyboards/gami_studio/lex60/lex60.h new file mode 100644 index 000000000000..eea7a454b653 --- /dev/null +++ b/keyboards/gami_studio/lex60/lex60.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + 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, \ + 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, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {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, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ + {k40, k41, k42, XXX, XXX, k45, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} diff --git a/keyboards/gami_studio/lex60/readme.md b/keyboards/gami_studio/lex60/readme.md new file mode 100644 index 000000000000..2724719c0f49 --- /dev/null +++ b/keyboards/gami_studio/lex60/readme.md @@ -0,0 +1,12 @@ +# Gami Studio Lex60 + +A 60% with split space bars made by Gami Studio. + +* Keyboard Maintainer: [Gami Studio](https://github.com/GamiStudio) +* Hardware Supported: Lex60 powered by the ATmega32U4 + +Make example for this keyboard (after setting up your build environment): + + make gami_studio/lex60:default # postfix with `:flash` to load the firmware into the board + +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/gami_studio/lex60/rules.mk b/keyboards/gami_studio/lex60/rules.mk new file mode 100644 index 000000000000..3b7f4dbd51eb --- /dev/null +++ b/keyboards/gami_studio/lex60/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 = 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 = 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 a037cedfdc0bdb5737586ab4b4ef7086e53029b7 Mon Sep 17 00:00:00 2001 From: yulei Date: Fri, 13 Dec 2019 09:20:04 +0800 Subject: [PATCH 037/973] fixed I2C driver support for stm32f4 (#7526) * correct i2c driver for stm32f4 * update pin mode definitions * update macro definition --- drivers/arm/i2c_master.c | 2 +- drivers/arm/i2c_master.h | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index 2a43ba23931c..b9eff0ad2e8b 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -62,7 +62,7 @@ __attribute__((weak)) void i2c_init(void) { palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); chThdSleepMilliseconds(10); -#ifdef USE_I2CV1 +#if defined(USE_GPIOV1) palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); #else diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index efe3909a6610..31cbfb9774a7 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -27,7 +27,7 @@ #include "ch.h" #include -#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32L0xx) || defined(STM32L1xx) +#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32F4XX) || defined(STM32L0xx) || defined(STM32L1xx) # define USE_I2CV1 #endif @@ -51,6 +51,20 @@ # define I2C1_SDA 7 #endif +#if defined(STM32F1XX) || defined(STM32F1xx) +# define USE_GPIOV1 +#endif + +#ifndef USE_GPIOV1 +// The default PAL alternate modes are used to signal that the pins are used for I2C +# ifndef I2C1_SCL_PAL_MODE +# define I2C1_SCL_PAL_MODE 4 +# endif +# ifndef I2C1_SDA_PAL_MODE +# define I2C1_SDA_PAL_MODE 4 +# endif +#endif + #ifdef USE_I2CV1 # ifndef I2C1_OPMODE # define I2C1_OPMODE OPMODE_I2C @@ -62,14 +76,6 @@ # define I2C1_DUTY_CYCLE STD_DUTY_CYCLE /* FAST_DUTY_CYCLE_2 */ # endif #else -// The default PAL alternate modes are used to signal that the pins are used for I2C -# ifndef I2C1_SCL_PAL_MODE -# define I2C1_SCL_PAL_MODE 4 -# endif -# ifndef I2C1_SDA_PAL_MODE -# define I2C1_SDA_PAL_MODE 4 -# endif - // The default timing values below configures the I2C clock to 400khz assuming a 72Mhz clock // For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html # ifndef I2C1_TIMINGR_PRESC From 77efa1c620251c9c151dd89d9d0bd256fd146d71 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 12 Dec 2019 18:12:44 -0800 Subject: [PATCH 038/973] [Keyboard] Fluorite: add Configurator layout data (#7612) --- keyboards/fluorite/info.json | 160 +++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 keyboards/fluorite/info.json diff --git a/keyboards/fluorite/info.json b/keyboards/fluorite/info.json new file mode 100644 index 000000000000..46f726ed80d7 --- /dev/null +++ b/keyboards/fluorite/info.json @@ -0,0 +1,160 @@ +{ + "keyboard_name": "fluorite", + "url": "", + "maintainer": "ihotsuno, qmk", + "width": 24, + "height": 9, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"F1", "x":3.5, "y":0}, + {"label":"F2", "x":4.5, "y":0}, + {"label":"F3", "x":5.5, "y":0}, + {"label":"F4", "x":6.5, "y":0}, + {"label":"Print Screen", "x":7.5, "y":1}, + {"label":"*", "x":8.5, "y":1}, + {"label":"/", "x":9.5, "y":1}, + {"label":"0", "x":10.5, "y":1}, + {"label":"Num Lock", "x":12.5, "y":1}, + {"label":"/", "x":13.5, "y":1}, + {"label":"*", "x":14.5, "y":1}, + {"label":"Backspace", "x":15.5, "y":1}, + {"label":"F1", "x":16.5, "y":0}, + {"label":"F2", "x":17.5, "y":0}, + {"label":"F3", "x":18.5, "y":0}, + {"label":"F4", "x":19.5, "y":0}, + + {"label":"F5", "x":3.25, "y":1}, + {"label":"F6", "x":4.25, "y":1}, + {"label":"F7", "x":5.25, "y":1}, + {"label":"F8", "x":6.25, "y":1}, + {"label":"-", "x":7.5, "y":2}, + {"label":"7", "x":8.5, "y":2}, + {"label":"8", "x":9.5, "y":2}, + {"label":"9", "x":10.5, "y":2}, + {"label":"7", "x":12.5, "y":2}, + {"label":"8", "x":13.5, "y":2}, + {"label":"9", "x":14.5, "y":2}, + {"label":"-", "x":15.5, "y":2}, + {"label":"F5", "x":16.75, "y":1}, + {"label":"F6", "x":17.75, "y":1}, + {"label":"F7", "x":18.75, "y":1}, + {"label":"F8", "x":19.75, "y":1}, + + {"label":"GUI", "x":1.5, "y":2}, + {"label":"F9", "x":3, "y":2}, + {"label":"F10", "x":4, "y":2}, + {"label":"F11", "x":5, "y":2}, + {"label":"F12", "x":6, "y":2}, + {"label":"+", "x":7.5, "y":3}, + {"label":"4", "x":8.5, "y":3}, + {"label":"5", "x":9.5, "y":3}, + {"label":"6", "x":10.5, "y":3}, + {"label":"4", "x":12.5, "y":3}, + {"label":"5", "x":13.5, "y":3}, + {"label":"6", "x":14.5, "y":3}, + {"label":"+", "x":15.5, "y":3}, + {"label":"F9", "x":17, "y":2}, + {"label":"F10", "x":18, "y":2}, + {"label":"F11", "x":19, "y":2}, + {"label":"F12", "x":20, "y":2}, + {"label":"GUI", "x":21.5, "y":2}, + + {"label":"1", "x":1.5, "y":3}, + {"label":"2", "x":2.5, "y":3}, + {"label":"3", "x":3.5, "y":3}, + {"label":"4", "x":4.5, "y":3}, + {"label":"5", "x":5.5, "y":3}, + {"label":"Esc", "x":7.5, "y":4}, + {"label":"1", "x":8.5, "y":4}, + {"label":"2", "x":9.5, "y":4}, + {"label":"3", "x":10.5, "y":4}, + {"label":"1", "x":12.5, "y":4}, + {"label":"2", "x":13.5, "y":4}, + {"label":"3", "x":14.5, "y":4}, + {"label":"Tab", "x":15.5, "y":4}, + {"label":"6", "x":17.5, "y":3}, + {"label":"7", "x":18.5, "y":3}, + {"label":"8", "x":19.5, "y":3}, + {"label":"9", "x":20.5, "y":3}, + {"label":"0", "x":21.5, "y":3}, + + {"label":"Q", "x":1.75, "y":4}, + {"label":"W", "x":2.75, "y":4}, + {"label":"E", "x":3.75, "y":4}, + {"label":"R", "x":4.75, "y":4}, + {"label":"T", "x":5.75, "y":4}, + {"label":"Backspace", "x":7.5, "y":5}, + {"label":"Y", "x":8.5, "y":5}, + {"label":"Insert", "x":9.5, "y":5}, + {"label":".", "x":10.5, "y":5}, + {"label":"0", "x":12.5, "y":5}, + {"label":".", "x":13.5, "y":5}, + {"label":"Page Up", "x":14.5, "y":5}, + {"label":"Home", "x":15.5, "y":5}, + {"label":"Y", "x":17.25, "y":4}, + {"label":"U", "x":18.25, "y":4}, + {"label":"I", "x":19.25, "y":4}, + {"label":"O", "x":20.25, "y":4}, + {"label":"P", "x":21.25, "y":4}, + + {"label":"A", "x":2, "y":5}, + {"label":"S", "x":3, "y":5}, + {"label":"D", "x":4, "y":5}, + {"label":"F", "x":5, "y":5}, + {"label":"G", "x":6, "y":5}, + {"label":"Delete", "x":7.5, "y":6}, + {"label":"N", "x":8.5, "y":6}, + {"label":"Up", "x":9.5, "y":6}, + {"label":"PEnter", "x":10.5, "y":6}, + {"label":"PEnter", "x":12.5, "y":6}, + {"label":"Up", "x":13.5, "y":6}, + {"label":"Page Down", "x":14.5, "y":6}, + {"label":"End", "x":15.5, "y":6}, + {"label":"H", "x":17, "y":5}, + {"label":"J", "x":18, "y":5}, + {"label":"K", "x":19, "y":5}, + {"label":"L", "x":20, "y":5}, + {"label":"-", "x":21, "y":5}, + + {"label":"Z", "x":2.25, "y":6}, + {"label":"X", "x":3.25, "y":6}, + {"label":"C", "x":4.25, "y":6}, + {"label":"V", "x":5.25, "y":6}, + {"label":"B", "x":6.25, "y":6}, + {"label":"Shift", "x":7.25, "y":7, "w":1.25}, + {"label":"Left", "x":8.5, "y":7}, + {"label":"Down", "x":9.5, "y":7}, + {"label":"Right", "x":10.5, "y":7}, + {"label":"Left", "x":12.5, "y":7}, + {"label":"Down", "x":13.5, "y":7}, + {"label":"Right", "x":14.5, "y":7}, + {"label":"Shift", "x":15.5, "y":7, "w":1.25}, + {"label":"N", "x":16.75, "y":6}, + {"label":"M", "x":17.75, "y":6}, + {"label":",", "x":18.75, "y":6}, + {"label":".", "x":19.75, "y":6}, + {"label":"/", "x":20.75, "y":6}, + + {"label":"`", "x":0.25, "y":3}, + {"label":"Tab", "x":0.25, "y":4, "w":1.5}, + {"label":"Shift", "x":0.5, "y":5, "w":1.5}, + {"label":"Ctrl", "x":1, "y":6}, + {"label":"TT(3)", "x":0, "y":6}, + {"label":"Space", "x":4.625, "y":7, "w":1.25}, + {"label":"MO(1)", "x":5.875, "y":7}, + {"label":"Ctrl", "x":9.25, "y":8, "w":1.25}, + {"label":"Alt", "x":10.5, "y":8}, + {"label":"Alt", "x":12.5, "y":8}, + {"label":"Ctrl", "x":13.5, "y":8, "w":1.25}, + {"label":"MO(2)", "x":17.125, "y":7}, + {"label":"Enter", "x":18.125, "y":7, "w":1.25}, + {"label":"Esc", "x":23, "y":6}, + {"label":"Menu", "x":22, "y":6}, + {"label":"\"", "x":22, "y":5, "w":1.5}, + {"label":"=", "x":22.25, "y":4, "w":1.5}, + {"label":"Backspace", "x":22.5, "y":3, "w":1.5} + ] + } + } +} From f5638e54f51360095640fff621315997e23be30d Mon Sep 17 00:00:00 2001 From: yulei Date: Fri, 13 Dec 2019 10:44:14 +0800 Subject: [PATCH 039/973] update dp60 configuration (#7561) * update dp60 configuration * disable rgb underglow to avoid firmware overflow * cleanup rules.mk * Update keyboards/dp60/keymaps/allleds/rules.mk Co-Authored-By: fauxpark * Update keyboards/dp60/keymaps/allleds/rules.mk Co-Authored-By: fauxpark * Update keyboards/dp60/keymaps/allleds/rules.mk Co-Authored-By: fauxpark * Update keyboards/dp60/keymaps/allleds/rules.mk Co-Authored-By: fauxpark * Update keyboards/dp60/keymaps/allleds/rules.mk Co-Authored-By: fauxpark * cleanup all rules.mk --- keyboards/dp60/config.h | 19 ++----------- keyboards/dp60/dp60.c | 26 ++++++++++++++++- keyboards/dp60/keymaps/allleds/keymap.c | 17 +++++++++++ keyboards/dp60/keymaps/allleds/rules.mk | 38 +++++++++++++++++++++++++ keyboards/dp60/keymaps/default/keymap.c | 10 +++---- keyboards/dp60/keymaps/via/readme.md | 1 - keyboards/dp60/keymaps/via/rules.mk | 36 +++++++++-------------- keyboards/dp60/rules.mk | 19 +++++-------- 8 files changed, 108 insertions(+), 58 deletions(-) create mode 100644 keyboards/dp60/keymaps/allleds/keymap.c create mode 100644 keyboards/dp60/keymaps/allleds/rules.mk delete mode 100644 keyboards/dp60/keymaps/via/readme.md diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index 7303631115ff..87eebbe1974c 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -13,7 +13,6 @@ #define MANUFACTURER astro #define PRODUCT Dumplings #define DESCRIPTION 60% rgb keyboard with ble extension -#define LANDING_PAGE yulei.github.io/qmk_webusb_tool/60_wkl.json /* key matrix size */ #define MATRIX_ROWS 5 @@ -35,13 +34,6 @@ /* 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 - //rgb light setting #define RGBLED_NUM 18 #define RGB_DI_PIN D7 @@ -56,16 +48,9 @@ #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL - -// tapping setting -//#define TAPPING_TERM 200 -//#define RETRO_TAPPING -//#define PERMISSIVE_HOLD +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#if defined(WEBUSB_ENABLE) || defined(RAW_ENABLE) -#define WEBUSB_KEYCOUNT 61 -#define WEBUSB_LAYERCOUNT 2 +#if defined(RAW_ENABLE) //VIA #define DYNAMIC_KEYMAP_LAYER_COUNT 2 // EEPROM usage diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c index b4a07bf1cdd5..3e4780246356 100644 --- a/keyboards/dp60/dp60.c +++ b/keyboards/dp60/dp60.c @@ -159,4 +159,28 @@ webusb_pos_t webusb_keymap[] = { {4, 0}, {4, 1}, {4, 2}, {4, 6}, {4, 10}, {4, 11}, {4, 12}, {4, 13}, }; -#endif \ No newline at end of file +#endif + +#ifndef RAW_ENABLE +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { +#else +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#endif + if (record->event.pressed) { + switch(keycode) { + #ifdef RGBLIGHT_ENABLE + #ifdef RGB_MATRIX_ENABLE + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + #endif + #endif + default: + break; + } + } + return true; +} diff --git a/keyboards/dp60/keymaps/allleds/keymap.c b/keyboards/dp60/keymaps/allleds/keymap.c new file mode 100644 index 000000000000..f3862c38fb84 --- /dev/null +++ b/keyboards/dp60/keymaps/allleds/keymap.c @@ -0,0 +1,17 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_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_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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1), KC_RCTL), + + [1] = 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_PSCR, + RESET, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,TG(0),_______), +}; diff --git a/keyboards/dp60/keymaps/allleds/rules.mk b/keyboards/dp60/keymaps/allleds/rules.mk new file mode 100644 index 000000000000..746d0bcb6464 --- /dev/null +++ b/keyboards/dp60/keymaps/allleds/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 = 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 diff --git a/keyboards/dp60/keymaps/default/keymap.c b/keyboards/dp60/keymaps/default/keymap.c index 2e2694326c3c..f3862c38fb84 100644 --- a/keyboards/dp60/keymaps/default/keymap.c +++ b/keyboards/dp60/keymaps/default/keymap.c @@ -2,16 +2,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = 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_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_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_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_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, MO(1), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1), KC_RCTL), - + [1] = 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_PSCR, - RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + RESET, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______,_______,TG(0),_______), -}; \ No newline at end of file +}; diff --git a/keyboards/dp60/keymaps/via/readme.md b/keyboards/dp60/keymaps/via/readme.md deleted file mode 100644 index 88851fb13c27..000000000000 --- a/keyboards/dp60/keymaps/via/readme.md +++ /dev/null @@ -1 +0,0 @@ -At this point, September 2019, this requires a custom version of VIA in order for VIA enabled keymaps to work. \ No newline at end of file diff --git a/keyboards/dp60/keymaps/via/rules.mk b/keyboards/dp60/keymaps/via/rules.mk index 27d6223baea7..6d2a73864342 100644 --- a/keyboards/dp60/keymaps/via/rules.mk +++ b/keyboards/dp60/keymaps/via/rules.mk @@ -1,47 +1,39 @@ # MCU name MCU = atmega32u4 -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 +# 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 = 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 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -#RGBLIGHT_ENABLE = yes # Use RGB bottom light +RGBLIGHT_ENABLE = yes # Use RGB bottom light RGB_MATRIX_ENABLE = yes # Use RGB matrix RAW_ENABLE = yes -#WEBUSB_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes CUSTOM_MATRIX = yes SRC += matrix.c keyboards/wilba_tech/wt_main.c -#keyboards/stm60/webusb.c diff --git a/keyboards/dp60/rules.mk b/keyboards/dp60/rules.mk index 0f998746fbf7..015e4fddb929 100644 --- a/keyboards/dp60/rules.mk +++ b/keyboards/dp60/rules.mk @@ -11,33 +11,28 @@ MCU = atmega32u4 # 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(+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 = 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 -#RGBLIGHT_ENABLE = yes # Use RGB bottom light +#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 +SRC += matrix.c From ab78386e021037bda9855bae444564a8ceff8404 Mon Sep 17 00:00:00 2001 From: Bart Riemens Date: Fri, 13 Dec 2019 04:18:53 +0100 Subject: [PATCH 040/973] [Keyboard] Add Exclusive E7-V1 SE keyboard and keymaps (#7598) * Updated based on feeback in PR #7598 --- keyboards/exclusive/e7v1se/config.h | 252 ++++++++++++++++++ keyboards/exclusive/e7v1se/e7v1se.c | 50 ++++ keyboards/exclusive/e7v1se/e7v1se.h | 43 +++ keyboards/exclusive/e7v1se/info.json | 95 +++++++ .../exclusive/e7v1se/keymaps/default/keymap.c | 35 +++ .../e7v1se/keymaps/default/readme.md | 17 ++ .../exclusive/e7v1se/keymaps/mac/keymap.c | 35 +++ .../exclusive/e7v1se/keymaps/mac/readme.md | 17 ++ keyboards/exclusive/e7v1se/readme.md | 15 ++ keyboards/exclusive/e7v1se/rules.mk | 32 +++ 10 files changed, 591 insertions(+) create mode 100644 keyboards/exclusive/e7v1se/config.h create mode 100644 keyboards/exclusive/e7v1se/e7v1se.c create mode 100644 keyboards/exclusive/e7v1se/e7v1se.h create mode 100644 keyboards/exclusive/e7v1se/info.json create mode 100644 keyboards/exclusive/e7v1se/keymaps/default/keymap.c create mode 100644 keyboards/exclusive/e7v1se/keymaps/default/readme.md create mode 100644 keyboards/exclusive/e7v1se/keymaps/mac/keymap.c create mode 100644 keyboards/exclusive/e7v1se/keymaps/mac/readme.md create mode 100644 keyboards/exclusive/e7v1se/readme.md create mode 100644 keyboards/exclusive/e7v1se/rules.mk diff --git a/keyboards/exclusive/e7v1se/config.h b/keyboards/exclusive/e7v1se/config.h new file mode 100644 index 000000000000..f11a70092042 --- /dev/null +++ b/keyboards/exclusive/e7v1se/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2019 Bart Riemens + +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 0x7051 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Exclusive / E-Team +#define PRODUCT E7-V1 SE +#define DESCRIPTION E7-V1 SE + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * 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 { E6, B0, B1, B2, B3, F0 } +#define MATRIX_COL_PINS { D5, D3, D2, D1, D0, D7, D6, D4, B4, B5, B6, C6, C7, F7, F6, 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 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/exclusive/e7v1se/e7v1se.c b/keyboards/exclusive/e7v1se/e7v1se.c new file mode 100644 index 000000000000..36cfccc2f58b --- /dev/null +++ b/keyboards/exclusive/e7v1se/e7v1se.c @@ -0,0 +1,50 @@ +/* Copyright 2019 Bart Riemens + * + * 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 "e7v1se.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. + +/* +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); +} + +bool led_update_kb(led_t led_state) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + return led_update_user(led_state); +} +*/ diff --git a/keyboards/exclusive/e7v1se/e7v1se.h b/keyboards/exclusive/e7v1se/e7v1se.h new file mode 100644 index 000000000000..c36072dc0a62 --- /dev/null +++ b/keyboards/exclusive/e7v1se/e7v1se.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Bart Riemens + * + * 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( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K11, 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, K2E, K2F, \ + K30, 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, K4E, \ + K50, K51, K52, K56, K5A, K5B, K5D, K5E, K5F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, K11, 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, K2E, K2F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, KC_NO }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, KC_NO, K5D, K5E, K5F } \ +} diff --git a/keyboards/exclusive/e7v1se/info.json b/keyboards/exclusive/e7v1se/info.json new file mode 100644 index 000000000000..fd9fe0a680bc --- /dev/null +++ b/keyboards/exclusive/e7v1se/info.json @@ -0,0 +1,95 @@ +{ + "keyboard_name": "e7v1se", + "url": "https://geekhack.org/index.php?topic=101363", + "maintainer": "Bart Riemens", + "width": 16.25, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "K00", "x": 0, "y": 0, "w": 1 }, + { "label": "K01", "x": 1.25, "y": 0, "w": 1 }, + { "label": "K02", "x": 2.25, "y": 0, "w": 1 }, + { "label": "K03", "x": 3.25, "y": 0, "w": 1 }, + { "label": "K04", "x": 4.25, "y": 0, "w": 1 }, + { "label": "K05", "x": 5.5, "y": 0, "w": 1 }, + { "label": "K06", "x": 6.5, "y": 0, "w": 1 }, + { "label": "K07", "x": 7.5, "y": 0, "w": 1 }, + { "label": "K08", "x": 8.5, "y": 0, "w": 1 }, + { "label": "K09", "x": 9.75, "y": 0, "w": 1 }, + { "label": "K0a", "x": 10.75, "y": 0, "w": 1 }, + { "label": "K0b", "x": 11.75, "y": 0, "w": 1 }, + { "label": "K0c", "x": 12.75, "y": 0, "w": 1 }, + { "label": "K0e", "x": 14, "y": 0, "w": 1 }, + { "label": "K0f", "x": 15.25, "y": 0, "w": 1 }, + { "label": "K10", "x": 0, "y": 1, "w": 1 }, + { "label": "K11", "x": 1, "y": 1, "w": 1 }, + { "label": "K12", "x": 2, "y": 1, "w": 1 }, + { "label": "K13", "x": 3, "y": 1, "w": 1 }, + { "label": "K14", "x": 4, "y": 1, "w": 1 }, + { "label": "K15", "x": 5, "y": 1, "w": 1 }, + { "label": "K16", "x": 6, "y": 1, "w": 1 }, + { "label": "K17", "x": 7, "y": 1, "w": 1 }, + { "label": "K18", "x": 8, "y": 1, "w": 1 }, + { "label": "K19", "x": 9, "y": 1, "w": 1 }, + { "label": "K1a", "x": 10, "y": 1, "w": 1 }, + { "label": "K1b", "x": 11, "y": 1, "w": 1 }, + { "label": "K1c", "x": 12, "y": 1, "w": 1 }, + { "label": "K1d", "x": 13, "y": 1, "w": 1 }, + { "label": "K1e", "x": 14, "y": 1, "w": 1 }, + { "label": "K1f", "x": 15.25, "y": 1, "w": 1 }, + { "label": "K20", "x": 0, "y": 2, "w": 1.5 }, + { "label": "K22", "x": 1.5, "y": 2, "w": 1 }, + { "label": "K23", "x": 2.5, "y": 2, "w": 1 }, + { "label": "K24", "x": 3.5, "y": 2, "w": 1 }, + { "label": "K25", "x": 4.5, "y": 2, "w": 1 }, + { "label": "K26", "x": 5.5, "y": 2, "w": 1 }, + { "label": "K27", "x": 6.5, "y": 2, "w": 1 }, + { "label": "K28", "x": 7.5, "y": 2, "w": 1 }, + { "label": "K29", "x": 8.5, "y": 2, "w": 1 }, + { "label": "K2a", "x": 9.5, "y": 2, "w": 1 }, + { "label": "K2b", "x": 10.5, "y": 2, "w": 1 }, + { "label": "K2c", "x": 11.5, "y": 2, "w": 1 }, + { "label": "K2d", "x": 12.5, "y": 2, "w": 1 }, + { "label": "K2e", "x": 13.5, "y": 2, "w": 1.5 }, + { "label": "K2f", "x": 15.25, "y": 2, "w": 1 }, + { "label": "K30", "x": 0, "y": 3, "w": 1.75 }, + { "label": "K32", "x": 1.75, "y": 3, "w": 1 }, + { "label": "K33", "x": 2.75, "y": 3, "w": 1 }, + { "label": "K34", "x": 3.75, "y": 3, "w": 1 }, + { "label": "K35", "x": 4.75, "y": 3, "w": 1 }, + { "label": "K36", "x": 5.75, "y": 3, "w": 1 }, + { "label": "K37", "x": 6.75, "y": 3, "w": 1 }, + { "label": "K38", "x": 7.75, "y": 3, "w": 1 }, + { "label": "K39", "x": 8.75, "y": 3, "w": 1 }, + { "label": "K3a", "x": 9.75, "y": 3, "w": 1 }, + { "label": "K3b", "x": 10.75, "y": 3, "w": 1 }, + { "label": "K3c", "x": 11.75, "y": 3, "w": 1 }, + { "label": "K3d", "x": 12.75, "y": 3, "w": 2.25 }, + { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41", "x": 1.25, "y": 4, "w": 1 }, + { "label": "K42", "x": 2.25, "y": 4, "w": 1 }, + { "label": "K43", "x": 3.25, "y": 4, "w": 1 }, + { "label": "K44", "x": 4.25, "y": 4, "w": 1 }, + { "label": "K45", "x": 5.25, "y": 4, "w": 1 }, + { "label": "K46", "x": 6.25, "y": 4, "w": 1 }, + { "label": "K47", "x": 7.25, "y": 4, "w": 1 }, + { "label": "K48", "x": 8.25, "y": 4, "w": 1 }, + { "label": "K49", "x": 9.25, "y": 4, "w": 1 }, + { "label": "K4a", "x": 10.25, "y": 4, "w": 1 }, + { "label": "K4b", "x": 11.25, "y": 4, "w": 1 }, + { "label": "K4d", "x": 12.25, "y": 4, "w": 1.75 }, + { "label": "K4e", "x": 14.25, "y": 4.25, "w": 1 }, + { "label": "K50", "x": 0, "y": 5, "w": 1.25 }, + { "label": "K51", "x": 1.25, "y": 5, "w": 1.25 }, + { "label": "K52", "x": 2.5, "y": 5, "w": 1.25 }, + { "label": "K56", "x": 3.75, "y": 5, "w": 6.25 }, + { "label": "K5a", "x": 10, "y": 5, "w": 1.25 }, + { "label": "K5b", "x": 11.25, "y": 5, "w": 1.25 }, + { "label": "K5d", "x": 13.25, "y": 5.25, "w": 1 }, + { "label": "K5e", "x": 14.25, "y": 5.25, "w": 1 }, + { "label": "K5f", "x": 15.25, "y": 5.25, "w": 1 } + ] + } + } +} diff --git a/keyboards/exclusive/e7v1se/keymaps/default/keymap.c b/keyboards/exclusive/e7v1se/keymaps/default/keymap.c new file mode 100644 index 000000000000..376b4c950982 --- /dev/null +++ b/keyboards/exclusive/e7v1se/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +/* + * ,---------------------------------------------------------------------| + * |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del| + * |---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace|▓PgU | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ |▓PgDn| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +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_INS, 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_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_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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, AG_TOGG, _______, _______, MO(1), RGB_MOD, RGB_VAD, RGB_HUD), +}; diff --git a/keyboards/exclusive/e7v1se/keymaps/default/readme.md b/keyboards/exclusive/e7v1se/keymaps/default/readme.md new file mode 100644 index 000000000000..2b7a5c71ccf5 --- /dev/null +++ b/keyboards/exclusive/e7v1se/keymaps/default/readme.md @@ -0,0 +1,17 @@ +# The default keymap for e7v1se + +``` + ,---------------------------------------------------------------------| + |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del| + |---------------------------------------------------------------------| + |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace|▓PgU | + |---------------------------------------------------------------------| + |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ |▓PgDn| + |---------------------------------------------------------------------| + |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + |---------------------------------------------------------------------| + |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + |---------------------------------------------------------------------| + |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt | + `---------------------------------------------------------------------|' +``` diff --git a/keyboards/exclusive/e7v1se/keymaps/mac/keymap.c b/keyboards/exclusive/e7v1se/keymaps/mac/keymap.c new file mode 100644 index 000000000000..ab863fcafdf3 --- /dev/null +++ b/keyboards/exclusive/e7v1se/keymaps/mac/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +/* + * ,---------------------------------------------------------------------| + * |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del| + * |---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace|▓PgU | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ |▓PgDn| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + * |---------------------------------------------------------------------| + * |Ctrl|Alt |GUI| Space |Alt |Fn |▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +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_INS, 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_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_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_UP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, AG_TOGG , _______, _______, MO(1), RGB_MOD, RGB_VAD, RGB_HUD), +}; diff --git a/keyboards/exclusive/e7v1se/keymaps/mac/readme.md b/keyboards/exclusive/e7v1se/keymaps/mac/readme.md new file mode 100644 index 000000000000..54ea48c6d036 --- /dev/null +++ b/keyboards/exclusive/e7v1se/keymaps/mac/readme.md @@ -0,0 +1,17 @@ +# The MacOS keymap for e7v1se + +``` + ,---------------------------------------------------------------------| + |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del| + |---------------------------------------------------------------------| + |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace|▓PgU | + |---------------------------------------------------------------------| + |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ |▓PgDn| + |---------------------------------------------------------------------| + |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + |---------------------------------------------------------------------| + |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + |---------------------------------------------------------------------| + |Ctrl|Alt |GUI| Space |Alt |Fn |▓|Lt |Dn |Rt | + `---------------------------------------------------------------------|' +``` diff --git a/keyboards/exclusive/e7v1se/readme.md b/keyboards/exclusive/e7v1se/readme.md new file mode 100644 index 000000000000..7c17589bd331 --- /dev/null +++ b/keyboards/exclusive/e7v1se/readme.md @@ -0,0 +1,15 @@ +# E7-V1 SE + +![e7v1se](https://i.imgur.com/ksbDEYh.jpg) + +A 75% keyboard made by Exclusive and run in a Geekhack group buy. + +- Keyboard Maintainer: [Bart Riemens](https://github.com/briemens) +- Hardware Supported: E7-V1 SE +- Hardware Availability: [Geekhack](https://geekhack.org/index.php?topic=101363) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e7v1se: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/exclusive/e7v1se/rules.mk b/keyboards/exclusive/e7v1se/rules.mk new file mode 100644 index 000000000000..c9e41ede4be4 --- /dev/null +++ b/keyboards/exclusive/e7v1se/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 = full # 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 +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 4fbb53e817b82e2bd3d699ca27766b4d4af0112a Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Fri, 13 Dec 2019 13:56:17 +0900 Subject: [PATCH 041/973] [Keyboard][angel64] fix info.json (#7615) --- keyboards/angel64/rev1/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/angel64/rev1/info.json b/keyboards/angel64/rev1/info.json index 34378f813e58..7006c0c7a9b0 100644 --- a/keyboards/angel64/rev1/info.json +++ b/keyboards/angel64/rev1/info.json @@ -5,7 +5,7 @@ "width": 15, "height": 5, "layouts": { - "LAYOUT": { + "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, "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":2}, {"label":"A", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":":", "x":11, "y":2}, {"label":"\"", "x":12, "y":2}, {"label":"Enter", "x":13, "y":2, "w":2}, {"label":"Shift", "x":0, "y":3, "w":2.5}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":"<", "x":9.5, "y":3}, {"label":">", "x":10.5, "y":3}, {"label":"?", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.5}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Alt", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4}, {"x":5.25, "y":4, "w":1.5}, {"x":6.75, "y":4, "w":1.5}, {"x":8.25, "y":4, "w":1.5}, {"x":9.75, "y":4}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] } } From 627d6c154c1bbcdefcd88aaa912fe9cde1817256 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Fri, 13 Dec 2019 05:56:35 +0100 Subject: [PATCH 042/973] [Keyboard][Phoebe] Send backslash on AltGr + ? (#7616) --- .../maxr1998/phoebe/keymaps/default/keymap.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c index 2d25d85e6c92..da179c8f2721 100644 --- a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c +++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c @@ -100,3 +100,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC, XXXXXXX, _______, _______, _______, _______, _______, G_0, _______, _______, _______ ) }; + +#define MODS_ALGR_MASK (MOD_BIT(KC_ALGR)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DE_QST: + if (get_mods() & MODS_ALGR_MASK) { + if (record->event.pressed) { + register_code(DE_SS); + } else { + unregister_code(DE_SS); + } + return false; + } + break; + } + return true; +}; From 58b2c72d53649afc02e15077e827aa0926a09b40 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Thu, 12 Dec 2019 20:58:06 -0800 Subject: [PATCH 043/973] [Keyboard] add kbd67mkiirgb v2 keyboard (#7618) --- .../kbdfans/kbd67/mkiirgb/{ => v1}/config.h | 0 .../kbdfans/kbd67/mkiirgb/{ => v1}/rules.mk | 0 keyboards/kbdfans/kbd67/mkiirgb/v2/config.h | 48 +++++++++++++++++++ keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk | 33 +++++++++++++ 4 files changed, 81 insertions(+) rename keyboards/kbdfans/kbd67/mkiirgb/{ => v1}/config.h (100%) rename keyboards/kbdfans/kbd67/mkiirgb/{ => v1}/rules.mk (100%) create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/v2/config.h create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk diff --git a/keyboards/kbdfans/kbd67/mkiirgb/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h similarity index 100% rename from keyboards/kbdfans/kbd67/mkiirgb/config.h rename to keyboards/kbdfans/kbd67/mkiirgb/v1/config.h diff --git a/keyboards/kbdfans/kbd67/mkiirgb/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk similarity index 100% rename from keyboards/kbdfans/kbd67/mkiirgb/rules.mk rename to keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h new file mode 100644 index 000000000000..bd6827ab05a2 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h @@ -0,0 +1,48 @@ +#pragma once +#include "config_common.h" +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1224 +#define DEVICE_VER 0x0002 +#define MANUFACTURER KBDfans +#define PRODUCT kbd67mkiirgb +#define DESCRIPTION kbd67mkii rgb keyboard + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS {F0, F1, F4, E6, C6 } +#define MATRIX_COL_PINS {F7, F6, F5, C7, B0, B1, B2, B3, B4, D7, D6, D4, D5, D3, D2} +#define DIODE_DIRECTION COL2ROW +#ifdef RGB_MATRIX_ENABLE +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DEBOUNCE 3 +#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_KEYPRESSES +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_BAND_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#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 +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +#define DISABLE_RGB_MATRIX_CYCLE_ALL +#define DISABLE_RGB_MATRIX_RAINDROPS +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#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) +#endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk new file mode 100644 index 000000000000..e10c4010a597 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/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 = 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 +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 +RGB_MATRIX_ENABLE = yes # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in From 09c7304bd98fcf39deddbabc16f6a3f0b5391b9c Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 13 Dec 2019 13:59:00 +0900 Subject: [PATCH 044/973] [Docs] update git command and directory name of documents (#7619) --- docs/getting_started_github.md | 2 +- docs/getting_started_introduction.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md index aeb8738b772b..629f4ece26aa 100644 --- a/docs/getting_started_github.md +++ b/docs/getting_started_github.md @@ -19,7 +19,7 @@ And be sure to select "HTTPS", and select the link and copy it: From here, enter `git clone ` into the command line, and then paste your link: ``` -user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git Cloning into 'qmk_firmware'... remote: Counting objects: 46625, done. remote: Compressing objects: 100% (2/2), done. diff --git a/docs/getting_started_introduction.md b/docs/getting_started_introduction.md index e183d77eeb57..6dc51b82b735 100644 --- a/docs/getting_started_introduction.md +++ b/docs/getting_started_introduction.md @@ -4,7 +4,7 @@ This page attempts to explain the basic information you need to know to work wit ## Basic QMK Structure -QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders. +QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk_core` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders. ### Userspace Structure From a1b53b45ca266c720756c0be87aeab6b5dec7915 Mon Sep 17 00:00:00 2001 From: nrtkbb Date: Fri, 13 Dec 2019 16:28:45 +0900 Subject: [PATCH 045/973] [Keyboard] Add uzu42 info.json (#7617) * Add uzu42 info.json * Made corrections provided by noroadsleft. --- keyboards/uzu42/info.json | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 keyboards/uzu42/info.json diff --git a/keyboards/uzu42/info.json b/keyboards/uzu42/info.json new file mode 100644 index 000000000000..817d764fbd8e --- /dev/null +++ b/keyboards/uzu42/info.json @@ -0,0 +1,55 @@ +{ + "keyboard_name": "uzu42", + "url": "https://github.com/nrtkbb/Keyboards/tree/master/uzu42", + "maintainer": "nrtkbb", + "width": 13, + "height": 4.43, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Q", "x":0.375, "y":0}, + {"label":"W", "x":1.375, "y":0}, + {"label":"E", "x":2.375, "y":0}, + {"label":"R", "x":3.375, "y":0.125}, + {"label":"T", "x":4.375, "y":0.25}, + {"label":"Y", "x":7.625, "y":0.25}, + {"label":"U", "x":8.625, "y":0.125}, + {"label":"I", "x":9.625, "y":0}, + {"label":"O", "x":10.625, "y":0}, + {"label":"P", "x":11.625, "y":0}, + {"label":"A", "x":0.25, "y":1}, + {"label":"S", "x":1.25, "y":1}, + {"label":"D", "x":2.25, "y":1}, + {"label":"F", "x":3.25, "y":1.125}, + {"label":"G", "x":4.25, "y":1.25}, + {"label":"H", "x":7.75, "y":1.25}, + {"label":"J", "x":8.75, "y":1.125}, + {"label":"K", "x":9.75, "y":1}, + {"label":"L", "x":10.75, "y":1}, + {"label":"Ent", "x":11.75, "y":1}, + {"label":"Z", "x":0.125, "y":2}, + {"label":"X", "x":1.125, "y":2}, + {"label":"C", "x":2.125, "y":2}, + {"label":"V", "x":3.125, "y":2.125}, + {"label":"B", "x":4.125, "y":2.25}, + {"label":"N", "x":7.875, "y":2.25}, + {"label":"M", "x":8.875, "y":2.125}, + {"label":",", "x":9.875, "y":2}, + {"label":".", "x":10.875, "y":2}, + {"label":"/", "x":11.875, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Space", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3.05}, + {"label":"GUI", "x":3, "y":3.18}, + {"label":"Lower", "x":4, "y":3.3}, + {"label":"Esc", "x":5, "y":3.43}, + {"label":"Space", "x":7, "y":3.43}, + {"label":"Raise", "x":8, "y":3.3}, + {"label":"BkSpc", "x":9, "y":3.18}, + {"label":"Ctrl", "x":10, "y":3.05}, + {"label":"GUI", "x":11, "y":3}, + {"label":"No", "x":12, "y":3} + ] + } + } +} From e4818cf7323bb8f437db625903ebe471deaab335 Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Fri, 13 Dec 2019 04:32:06 -0500 Subject: [PATCH 046/973] [Keymap] Personal keymap for the E6.5 (#7623) * add new layout mirroring all my other layouts * add rgb and other keys on fnm layer --- .../exclusive/e65/keymaps/madhatter/keymap.c | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 keyboards/exclusive/e65/keymaps/madhatter/keymap.c diff --git a/keyboards/exclusive/e65/keymaps/madhatter/keymap.c b/keyboards/exclusive/e65/keymaps/madhatter/keymap.c new file mode 100644 index 000000000000..f8617f3ef4b7 --- /dev/null +++ b/keyboards/exclusive/e65/keymaps/madhatter/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _QWERTY, + _FNM +}; + +#define FNM MO(_FNM) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_65_ansi_7u_wk_splitbs( + 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, 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_BSPC,KC_PGUP, + KC_TILD, 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_LALT, KC_LGUI, KC_SPC, FNM, KC_LEFT,KC_DOWN,KC_RGHT + ), + + [_FNM] = LAYOUT_65_ansi_7u_wk_splitbs( + 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_MPLY, + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, RESET, KC_VOLU, + AG_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_MNXT, + _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), +}; From 2d1c985ff44ecfe54fe82021e0326b3c7b07db9f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 13 Dec 2019 03:36:37 -0800 Subject: [PATCH 047/973] core: Fix build config in protocol.mk (#7620) Backports commits from tmk_keyboard --- tmk_core/protocol.mk | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk index 78b9deb2971d..0c41642b9be8 100644 --- a/tmk_core/protocol.mk +++ b/tmk_core/protocol.mk @@ -1,58 +1,57 @@ PROTOCOL_DIR = protocol - -ifdef PS2_MOUSE_ENABLE +ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes) SRC += $(PROTOCOL_DIR)/ps2_mouse.c OPT_DEFS += -DPS2_MOUSE_ENABLE OPT_DEFS += -DMOUSE_ENABLE endif -ifdef PS2_USE_BUSYWAIT +ifeq ($(strip $(PS2_USE_BUSYWAIT)), yes) SRC += protocol/ps2_busywait.c SRC += protocol/ps2_io_avr.c OPT_DEFS += -DPS2_USE_BUSYWAIT endif -ifdef PS2_USE_INT +ifeq ($(strip $(PS2_USE_INT)), yes) SRC += protocol/ps2_interrupt.c SRC += protocol/ps2_io_avr.c OPT_DEFS += -DPS2_USE_INT endif -ifdef PS2_USE_USART +ifeq ($(strip $(PS2_USE_USART)), yes) SRC += protocol/ps2_usart.c SRC += protocol/ps2_io_avr.c OPT_DEFS += -DPS2_USE_USART endif -ifdef SERIAL_MOUSE_MICROSOFT_ENABLE +ifeq ($(strip $(SERIAL_MOUSE_MICROSOFT_ENABLE)), yes) SRC += $(PROTOCOL_DIR)/serial_mouse_microsoft.c OPT_DEFS += -DSERIAL_MOUSE_ENABLE -DSERIAL_MOUSE_MICROSOFT \ -DMOUSE_ENABLE endif -ifdef SERIAL_MOUSE_MOUSESYSTEMS_ENABLE +ifeq ($(strip $(SERIAL_MOUSE_MOUSESYSTEMS_ENABLE)), yes) SRC += $(PROTOCOL_DIR)/serial_mouse_mousesystems.c OPT_DEFS += -DSERIAL_MOUSE_ENABLE -DSERIAL_MOUSE_MOUSESYSTEMS \ -DMOUSE_ENABLE endif -ifdef SERIAL_MOUSE_USE_SOFT +ifeq ($(strip $(SERIAL_MOUSE_USE_SOFT)), yes) SRC += $(PROTOCOL_DIR)/serial_soft.c endif -ifdef SERIAL_MOUSE_USE_UART +ifeq ($(strip $(SERIAL_MOUSE_USE_UART)), yes) SRC += $(PROTOCOL_DIR)/serial_uart.c endif -ifdef ADB_MOUSE_ENABLE - OPT_DEFS += -DADB_MOUSE_ENABLE -DMOUSE_ENABLE +ifeq ($(strip $(ADB_MOUSE_ENABLE)), yes) + OPT_DEFS += -DADB_MOUSE_ENABLE -DMOUSE_ENABLE endif -ifdef XT_ENABLE - SRC += $(PROTOCOL_DIR)/xt_interrupt.c - OPT_DEFS += -DXT_ENABLE +ifeq ($(strip $(XT_ENABLE)), yes) + SRC += $(PROTOCOL_DIR)/xt_interrupt.c + OPT_DEFS += -DXT_ENABLE endif # Search Path From 20d3a979f1999fcc27a47e4f32533fb8e8b633a0 Mon Sep 17 00:00:00 2001 From: Noan Mousy <4sstylz@protonmail.ch> Date: Fri, 13 Dec 2019 15:39:10 +0100 Subject: [PATCH 048/973] Adding Backlight on the handwired AEK64 keyboard (#7629) * Implementing backlight with breathing * Rework of my personal keymap and adding some macros. --- keyboards/handwired/aek64/config.h | 34 ++------ .../aek64/keymaps/4sstylz/keycodes.h | 85 +++++++++++++++++++ .../handwired/aek64/keymaps/4sstylz/keymap.c | 33 ++++--- keyboards/handwired/aek64/rules.mk | 1 + 4 files changed, 116 insertions(+), 37 deletions(-) create mode 100644 keyboards/handwired/aek64/keymaps/4sstylz/keycodes.h diff --git a/keyboards/handwired/aek64/config.h b/keyboards/handwired/aek64/config.h index 45ce6665bceb..7d235358c3dc 100644 --- a/keyboards/handwired/aek64/config.h +++ b/keyboards/handwired/aek64/config.h @@ -27,27 +27,21 @@ along with this program. If not, see . #define PRODUCT AEK64 #define DESCRIPTION QMK keyboard firmware for AEK64 handwired +/* Define the backlight */ +/*#define BACKLIGHT_ON_STATE 1*/ + /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 // Originally made for a Teensy 2++ -#define MATRIX_COL_PINS { F0, E6, E7, B0, B1, B2, B3, B4, B5, B6, B7, D0, D1, D2 } +#define MATRIX_COL_PINS { F0, E6, E7, B0, B1, B2, B3, B4, B5, B6, D3, D0, D1, D2 } #define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 } #define UNUSED_PINS -/* 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 - /* Enable the space-cadet options */ #define RSPC_KEYS KC_RSFT, KC_TRNS, KC_PGUP #define RCPC_KEYS KC_RCTL, KC_TRNS, KC_PGDOWN @@ -59,20 +53,6 @@ along with this program. If not, see . #define COMBO_COUNT 1 -/* - * 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 BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 diff --git a/keyboards/handwired/aek64/keymaps/4sstylz/keycodes.h b/keyboards/handwired/aek64/keymaps/4sstylz/keycodes.h new file mode 100644 index 000000000000..9898fe0df365 --- /dev/null +++ b/keyboards/handwired/aek64/keymaps/4sstylz/keycodes.h @@ -0,0 +1,85 @@ +/* + * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + * Version 2, December 2004 + * + * Copyright (C) 2019 4sStylZ <4sstylz@protonmail.ch> + * + * Everyone is permitted to copy and distribute verbatim or modified + * copies of this license document, and changing it is allowed as long + * as the name is changed. + * + * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + * + * 0. You just DO WHAT THE FUCK YOU WANT TO. + */ +#include QMK_KEYBOARD_H + +/** + * Macro for selecting all the text in the document. + * Usual shortcut : Ctrl+A. + * + * @param keyrecord_t *record + * + * @return void + */ +void select_all(keyrecord_t *record) { + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_A); + unregister_code(KC_LCTL); + } +} + +/** + * Macro for selecting the current row. + * + * @param keyrecord_t *record + * + * @return void + */ +void select_row(keyrecord_t *record) { + if (record->event.pressed) { + tap_code(KC_HOME); + register_code(KC_LSFT); + tap_code(KC_END); + unregister_code(KC_LSFT); + } +} + +/** + * Macro for selecting the current word. + * Usage : You need to have the cursor into the word or directly at the right. + * + * + * Usual shortcut : Ctrl+A. + * + * @param keyrecord_t *record + * + * @return void + */ +void select_word(keyrecord_t *record) { + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_LEFT); + register_code(KC_LSFT); + tap_code(KC_RIGHT); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + } +} + +/** + * Macro for inserting two 0 with keypad. + * Be carefull to have the keypad lock enabled + * + * @param keyrecord_t *record + * + * @return void + */ +void insert_00(keyrecord_t *record) { + if (record->event.pressed) { + tap_code(KC_P0); + tap_code(KC_P0); + } +} diff --git a/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c b/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c index 65f8354aabee..cb62fb001caf 100644 --- a/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c +++ b/keyboards/handwired/aek64/keymaps/4sstylz/keymap.c @@ -1,4 +1,5 @@ #include QMK_KEYBOARD_H +#include // Implement Super-alt↯tab // See https://docs.qmk.fm/#/feature_macros?id=super-alt↯tab @@ -7,7 +8,10 @@ uint16_t alt_tab_timer = 0; // Defining all the custom keycodes. enum custom_keycodes { - ALT_TAB = SAFE_RANGE + ALT_TAB = SAFE_RANGE, + SLC_ROW, + SLC_ALL, + SLC_WRD }; const uint16_t PROGMEM lock_combo[] = {KC_J, KC_K, KC_L, KC_SCLN, COMBO_END}; @@ -18,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐ * │ ` Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ - * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ + * ├──────┴──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ Enter│ * │ Layer 2 │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ @@ -40,14 +44,14 @@ 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, 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_NUHS, KC_ENT , KC_LSPO , KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC , - KC_LCPO , KC_LALT, ALT_TAB, KC_SPC, KC_LGUI, KC_RALT, KC_RCPC + KC_LCPO , KC_LGUI, KC_LALT, KC_SPC, KC_APP , KC_RALT, KC_RCPC ), /* 1: second layer for media keys and many advanced features ç * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐ * │Alt F4│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ - * │ │ │ │PrtScn│ Brt+ │ Brt- │Ctrl A│ Home │ Up │ End │ ‽  │ ↑     │ ⸮   │ │ │ + * ├──────┴──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤ + * │ │ │PrtScn│ Brt+ │ Brt- │Ctrl A│ Home │ Up │ End │ ‽  │ ↑     │ ⸮   │ │ │ * ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ │ * │ │ Cut │ Copy │Paste │ Del │ Del │ Left │ Down │Right │ ← │ ↓ │ → │ │ │ * ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤ @@ -57,11 +61,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘ */ [1] = LAYOUT( \ - LALT(KC_F4), 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_BRIU , KC_BRID, LCTL(KC_A), KC_HOME, KC_UP , KC_END , UC(0x203D) , UC(0x8593), UC(0x2E2E), - _______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_DEL , KC_LEFT, KC_DOWN, KC_RIGHT, UC(0x8592) , UC(0x8595), UC(0x8594), _______, - _______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , _______, _______ , _______, _______, _______ , _______ , RESET , _______ , - _______ , _______ , _______ , _______, _______ , _______ , _______ + LALT(KC_F4), 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 , + _______ , _______ , SLC_ALL , SLC_ROW , SLC_WRD , _______, KC_BSPC, KC_HOME, KC_UP , KC_END , KC_BRIU, KC_BRID , KC_PSCR, + _______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_ENT , KC_LEFT, KC_DOWN, KC_RIGHT, BL_TOGG, BL_STEP , BL_BRTG, _______, + _______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , ALT_TAB, _______, _______, _______, _______ , _______, RESET , _______ , + _______ , _______ , _______ , _______, _______ , _______, _______ ) }; @@ -88,6 +92,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { unregister_code(KC_TAB); } break; + case SLC_ALL: + select_all(record); + break; + case SLC_ROW: + select_row(record); + break; + case SLC_WRD: + select_word(record); + break; } return true; } diff --git a/keyboards/handwired/aek64/rules.mk b/keyboards/handwired/aek64/rules.mk index c02af3dd6c8b..52c306130687 100644 --- a/keyboards/handwired/aek64/rules.mk +++ b/keyboards/handwired/aek64/rules.mk @@ -25,3 +25,4 @@ UNICODE_ENABLE = yes # Enable support for arrow keys icon on the second layer. COMBO_ENABLE = yes # Enable combo for special function when using multiple keys at once. TAP_DANCE_ENABLE = no # Enable use multiple tap NKRO_ENABLE = yes +BACKLIGHT_ENABLE = yes From ba13127c045d653929b554d2444ce31caba59502 Mon Sep 17 00:00:00 2001 From: starcalleramethyst <58349097+starcalleramethyst@users.noreply.github.com> Date: Fri, 13 Dec 2019 11:12:45 -0600 Subject: [PATCH 049/973] New RGBKB Zen Rev1 keymap (#7609) * adding my zen 1 keymap updated layers and custom keycodes * added slack + paste defined custom keycode S_H_P and added to layer 3 * added custom keycodes defined and inserted T_H_B and T_H_T * enabled tap dance adjusted rules to include tap dance * tap dance enumeration and timing added a TD key to send space on press and . on double tap. added tapping term to set tap detection time. * added custom keycode added E_SS to print string * added mouskey + enum keycode added in mousekey to rules. added custom code DC_C to double click and copy. * updated custom keycode string added a space into the output string for S_H_P * removed colemak layer colemak commented out, started adjusting MOs * added 1 key copy paste used from https://github.com/qmk/qmk_firmware/blob/master/users/drashna/process_records.c#L116-L130 * updated rgb and copyright line * updated tapcode KC_CCCV * Update keyboards/rgbkb/zen/rev1/keymaps/starcaller_v1.1/config.h Co-Authored-By: Drashna Jaelre * updated keymap folder name to my username --- .../rev1/keymaps/starcalleramethyst/config.h | 38 +++++ .../rev1/keymaps/starcalleramethyst/keymap.c | 148 ++++++++++++++++++ .../rev1/keymaps/starcalleramethyst/rules.mk | 3 + 3 files changed, 189 insertions(+) create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/keymap.c create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/rules.mk diff --git a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h new file mode 100644 index 000000000000..d3d1a60ca97b --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2019 starcalleramethyst + +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 RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define TAPPING_TERM 200 diff --git a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/keymap.c new file mode 100644 index 000000000000..b9b21102b147 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/keymap.c @@ -0,0 +1,148 @@ +#include QMK_KEYBOARD_H + +uint16_t copy_paste_timer; + +enum custom_keycodes { + S_H = SAFE_RANGE, // slack here + S_H_P, // slack here + paste + T_H_B, // ticket header bike + T_H_T, // ticket header tread + E_OP, // email open + E_CL, // email close + E_FU, // email follow up + E_SS, // email service schedule + SCRN_C, // screen clip + DC_C, // double click + copy + KC_CCCV, // one key copy/paste + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + case S_H: + if (record->event.pressed) { + SEND_STRING("@HERE"); + } + break; + + case S_H_P: + if (record->event.pressed) { + SEND_STRING("@HERE" SS_TAP(X_SPC) SS_LCTL("v")); + } + break; + + case T_H_B: + if (record->event.pressed) { + SEND_STRING("Your Peloton Bike - "); + } + break; + + case T_H_T: + if (record->event.pressed) { + SEND_STRING("Your Peloton Tread - "); + } + break; + + case E_OP: + if (record->event.pressed) { + // when keycode E_OP is pressed + SEND_STRING("Hi , "SS_TAP(X_ENTER)SS_TAP(X_ENTER)"Thank you for contacting Peloton."SS_TAP(X_ENTER)SS_TAP(X_ENTER)); + } +break; + + case E_CL: + if (record->event.pressed) { + SEND_STRING("Please let me know if you have any other questions."SS_TAP(X_ENTER)SS_TAP(X_ENTER)"Thank you for being the best part of Peloton."); + } +break; + + case E_FU: + if (record->event.pressed) { + SEND_STRING("I will be personally watching this issue and will reach out to you after this is complete to make sure everything went smoothly."SS_TAP(X_ENTER)SS_TAP(X_ENTER)); + } +break; + + case E_SS: + if (record->event.pressed) { + SEND_STRING("Please click here to schedule your service."SS_TAP(X_ENTER)SS_TAP(X_ENTER)); + } +break; + + case SCRN_C: + if (record->event.pressed) { + tap_code16(C(S(KC_F5))); + } +break; + + case DC_C: + if (record->event.pressed) { + tap_code(KC_BTN1); + tap_code(KC_BTN1); + tap_code16(C(KC_C)); + } +break; + + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + tap_code16(C(KC_C)); + } else { // Tap, paste + tap_code16(C(KC_V)); + } + } +break; + + } + return true; +}; + +//Tap Dance Declarations +enum { + TD_SPC_DOT = 0 +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_SPC_DOT] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_PDOT) +// Other declarations would go here, separated by commas, if you have them +}; + + + +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_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_SFTENT, +KC_CCCV, KC_LGUI, KC_LALT, RGB_TOG, MO(1), TD(TD_SPC_DOT), KC_BSPC, KC_ENT, TD(TD_SPC_DOT), MO(2), KC_MINS, KC_EQL, KC_PGUP, KC_PGDN), + + [1] = 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_TRNS, RGB_SAI, RGB_VAI, RGB_SAD, RESET, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME, +KC_CAPS, RGB_HUD, RGB_VAD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END, +KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, +KC_NO, KC_LGUI, KC_LALT, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, KC_VOLD), + +/* [2] = LAYOUT( +KC_GESC, 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_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, +KC_LCTL, KC_LGUI, KC_LALT, KC_NO, TO(0), KC_SPC, KC_BSPC, KC_ENT, KC_SPC, TO(0), KC_MINS, KC_EQL, KC_PGUP, KC_PGDN), +*/ + [2] = LAYOUT( +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, S_H_P, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +KC_NO, E_CL, E_FU, E_OP, S_H, SCRN_C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +KC_NO, DC_C, E_SS, T_H_T, T_H_B, 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_TRNS, KC_NO, KC_NO, KC_NO, KC_NO) + +}; + + diff --git a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/rules.mk new file mode 100644 index 000000000000..8e3e21514283 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes \ No newline at end of file From 707d449ba0f69acbc0580e6f898fa2203ec992ba Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Fri, 13 Dec 2019 12:14:11 -0500 Subject: [PATCH 050/973] Project Keyboard Alice PCB - Indicator LEDs and keymap update (#7442) * allow main functions to be overridden * update keymap to toggle keys and cleanup a bit * allow main functions to be overridden * update keymap to toggle keys and cleanup a bit * get them lights working with the new setup * disable console on my keymap, cause ARM and Linux, for now * update keymap * add home and end to the navigation * thought this was redundant - update keyboards/projectkb/alice/alice.c Co-Authored-By: fauxpark --- keyboards/projectkb/alice/alice.c | 24 +++------- .../alice/keymaps/madhatter/keymap.c | 48 ++++++++++++++----- .../alice/keymaps/madhatter/rules.mk | 1 + 3 files changed, 44 insertions(+), 29 deletions(-) diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c index fada4368110f..ca0c7da2be2e 100644 --- a/keyboards/projectkb/alice/alice.c +++ b/keyboards/projectkb/alice/alice.c @@ -6,22 +6,12 @@ void matrix_init_board(void){ setPinOutput(A2); } - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(A0); - } else { - writePinHigh(A0); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(A1); - } else { - writePinHigh(A1); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(A2); - } else { - writePinHigh(A2); +bool led_update_kb(led_t led_state) { + bool runDefault = led_update_user(led_state); + if (runDefault) { + writePin(A0, !led_state.num_lock); + writePin(A1, !led_state.caps_lock); + writePin(A2, !led_state.scroll_lock); } - led_set_user(usb_led); + return runDefault; } diff --git a/keyboards/projectkb/alice/keymaps/madhatter/keymap.c b/keyboards/projectkb/alice/keymaps/madhatter/keymap.c index bac44f0b3e49..4965947e937d 100644 --- a/keyboards/projectkb/alice/keymaps/madhatter/keymap.c +++ b/keyboards/projectkb/alice/keymaps/madhatter/keymap.c @@ -23,17 +23,16 @@ enum my_layers { }; #define FNMS MO(_FNMS) -#define SPCNAV LT(_NAVMED, KC_SPC) -#define CAPSTL CTL_T(KC_CAPS) -#define CMDENT CMD_T(KC_ENT) +#define NAVMED MO(_NAVMED) +#define CAP_CTL CTL_T(KC_CAPS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_default( - KC_GESC, 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_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, 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_GESC, 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_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, CAP_CTL, 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, FNMS, - KC_LCTL, KC_LALT, CMDENT, FNMS, SPCNAV, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LCMD, NAVMED, KC_SPC, KC_RALT, KC_RCTL ), [_FNMS] = LAYOUT_default( @@ -41,15 +40,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, RESET, VLK_TOG, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN2, _______, _______, _______, BL_INC, BL_DEC, BL_TOGG, BL_BRTG, _______, RGB_SAI, RGB_HUI, RGB_VAI, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, - _______, _______, _______, _______, _______, _______, _______ + AG_TOGG, _______, _______, _______, _______, _______, _______ ), [_NAVMED] = LAYOUT_default( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, _______, KC_UP, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, EEP_RST, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______ + KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, RESET, + KC_END, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ ) }; +static uint8_t top = 0; +static uint8_t middle = 0; +static uint8_t bottom = 1; + +layer_state_t layer_state_set_user(layer_state_t state) { + top = middle = bottom = 0; + switch (get_highest_layer(state)) { + case _NAVMED: + top = 1; + break; + case _FNMS: + middle = 1; + break; + default: + break; + } + return state; +} + +bool led_update_user(led_t usb_led) { + writePin(A0, !top); + writePin(A1, !middle); + writePin(A2, !bottom); + return false; +} diff --git a/keyboards/projectkb/alice/keymaps/madhatter/rules.mk b/keyboards/projectkb/alice/keymaps/madhatter/rules.mk index 1b0f198d06c1..99cbe88b7076 100644 --- a/keyboards/projectkb/alice/keymaps/madhatter/rules.mk +++ b/keyboards/projectkb/alice/keymaps/madhatter/rules.mk @@ -1 +1,2 @@ VELOCIKEY_ENABLE = yes +CONSOLE_ENABLE = no From 80c2e2674181191a41c4ca2c774d1a95b8a75838 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 14 Dec 2019 01:29:54 +0000 Subject: [PATCH 051/973] Fix ChibiOS USB config for chips which support OTGv1 (#7564) * Align endpoint config as per rest of file (fixes #4783) * Add comments about explicit order use * Update tmk_core/protocol/chibios/usb_main.c Co-Authored-By: fauxpark --- tmk_core/protocol/chibios/usb_main.c | 124 +++++++++++++++------------ 1 file changed, 69 insertions(+), 55 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index b90bcd037298..740763de2f4a 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -15,6 +15,16 @@ * GPL v2 or later. */ +/* + * Implementation notes: + * + * USBEndpointConfig - Configured using explicit order instead of struct member name. + * This is due to ChibiOS hal LLD differences, which is dependent on hardware, + * "USBv1" devices have `ep_buffers` and "OTGv1" have `in_multiplier`. + * Given `USBv1/hal_usb_lld.h` marks the field as "not currently used" this code file + * makes the assumption this is safe to avoid littering with preprocessor directives. + */ + #include "ch.h" #include "hal.h" @@ -98,7 +108,7 @@ static const USBDescriptor *usb_get_descriptor_cb(USBDriver *usbp, uint8_t dtype #ifndef KEYBOARD_SHARED_EP /* keyboard endpoint state structure */ static USBInEndpointState kbd_ep_state; -/* keyboard endpoint initialization structure (IN) */ +/* keyboard endpoint initialization structure (IN) - see USBEndpointConfig comment at top of file */ static const USBEndpointConfig kbd_ep_config = { USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ NULL, /* SETUP packet notification callback */ @@ -117,7 +127,7 @@ static const USBEndpointConfig kbd_ep_config = { /* mouse endpoint state structure */ static USBInEndpointState mouse_ep_state; -/* mouse endpoint initialization structure (IN) */ +/* mouse endpoint initialization structure (IN) - see USBEndpointConfig comment at top of file */ static const USBEndpointConfig mouse_ep_config = { USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ NULL, /* SETUP packet notification callback */ @@ -136,7 +146,7 @@ static const USBEndpointConfig mouse_ep_config = { /* shared endpoint state structure */ static USBInEndpointState shared_ep_state; -/* shared endpoint initialization structure (IN) */ +/* shared endpoint initialization structure (IN) - see USBEndpointConfig comment at top of file */ static const USBEndpointConfig shared_ep_config = { USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ NULL, /* SETUP packet notification callback */ @@ -164,58 +174,62 @@ typedef struct { QMKUSBDriver driver; } usb_driver_config_t; -#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \ - { \ - .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \ - .in_ep_config = {.ep_mode = stream##_IN_MODE, \ - .setup_cb = NULL, \ - .in_cb = qmkusbDataTransmitted, \ - .out_cb = NULL, \ - .in_maxsize = stream##_EPSIZE, \ - .out_maxsize = 0, /* The pointer to the states will be filled during initialization */ \ - .in_state = NULL, \ - .out_state = NULL, \ - .ep_buffers = 2, \ - .setup_buf = NULL}, \ - .out_ep_config = \ - { \ - .ep_mode = stream##_OUT_MODE, \ - .setup_cb = NULL, \ - .in_cb = NULL, \ - .out_cb = qmkusbDataReceived, \ - .in_maxsize = 0, \ - .out_maxsize = stream##_EPSIZE, /* The pointer to the states will be filled during initialization */ \ - .in_state = NULL, \ - .out_state = NULL, \ - .ep_buffers = 2, \ - .setup_buf = NULL, \ - }, \ - .int_ep_config = \ - { \ - .ep_mode = USB_EP_MODE_TYPE_INTR, \ - .setup_cb = NULL, \ - .in_cb = qmkusbInterruptTransmitted, \ - .out_cb = NULL, \ - .in_maxsize = CDC_NOTIFICATION_EPSIZE, \ - .out_maxsize = 0, /* The pointer to the states will be filled during initialization */ \ - .in_state = NULL, \ - .out_state = NULL, \ - .ep_buffers = 2, \ - .setup_buf = NULL, \ - }, \ - .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 = (uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \ - .ob = (uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \ - } \ +/* 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, \ + .ib = (uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \ + .ob = (uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \ + } \ } typedef struct { From 1f26101f0e5a9377a5016a0e49e46b6dae465fed Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 13 Dec 2019 18:06:18 -0800 Subject: [PATCH 052/973] remove SERIAL_SOFT_DEBUG macro (#7625) SERIAL_SOFT_DEBUG can be defined in the `config.h` Backported from tmk/tmk_keyboard@c74eee6327c5995456ba004d70b9663cf485d9f8 x --- tmk_core/protocol/serial_soft.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tmk_core/protocol/serial_soft.c b/tmk_core/protocol/serial_soft.c index b4090799547a..8624ef733c79 100644 --- a/tmk_core/protocol/serial_soft.c +++ b/tmk_core/protocol/serial_soft.c @@ -68,7 +68,6 @@ POSSIBILITY OF SUCH DAMAGE. #endif /* debug for signal timing, see debug pin with oscilloscope */ -#define SERIAL_SOFT_DEBUG #ifdef SERIAL_SOFT_DEBUG # define SERIAL_SOFT_DEBUG_INIT() (DDRD |= 1 << 7) # define SERIAL_SOFT_DEBUG_TGL() (PORTD ^= 1 << 7) @@ -169,7 +168,7 @@ void serial_send(uint8_t data) { /* detect edge of start bit */ ISR(SERIAL_SOFT_RXD_VECT) { SERIAL_SOFT_DEBUG_TGL(); - SERIAL_SOFT_RXD_INT_ENTER() + SERIAL_SOFT_RXD_INT_ENTER(); uint8_t data = 0; From d4c23d881fcd9fafcd3ea678614f006203b64e71 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 5 Nov 2019 23:44:43 +0000 Subject: [PATCH 053/973] Convert backlight to follow driver rules pattern --- common_features.mk | 15 ++++++++------- quantum/stm32/proton_c.mk | 4 +--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/common_features.mk b/common_features.mk index 1c814286c76a..9b60eeed03af 100644 --- a/common_features.mk +++ b/common_features.mk @@ -231,15 +231,16 @@ endif # backward compat ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) - BACKLIGHT_ENABLE = custom + BACKLIGHT_DRIVER = custom endif -VALID_BACKLIGHT_TYPES := yes software custom +VALID_BACKLIGHT_TYPES := pwm software custom BACKLIGHT_ENABLE ?= no -ifneq ($(strip $(BACKLIGHT_ENABLE)), no) - ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),) - $(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type) +BACKLIGHT_DRIVER ?= pwm +ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) + ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),) + $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) endif ifeq ($(strip $(VISUALIZER_ENABLE)), yes) @@ -250,10 +251,10 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no) SRC += $(QUANTUM_DIR)/backlight/backlight.c OPT_DEFS += -DBACKLIGHT_ENABLE - ifeq ($(strip $(BACKLIGHT_ENABLE)), software) + ifeq ($(strip $(BACKLIGHT_DRIVER)), software) SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c else - ifeq ($(strip $(BACKLIGHT_ENABLE)), custom) + ifeq ($(strip $(BACKLIGHT_DRIVER)), custom) OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk index ff28a4cb5d58..b25b5550458e 100644 --- a/quantum/stm32/proton_c.mk +++ b/quantum/stm32/proton_c.mk @@ -5,9 +5,7 @@ AUDIO_ENABLE = yes WS2812_DRIVER = bitbang # Force task driven PWM until ARM can provide automatic configuration -ifneq ($(strip $(BACKLIGHT_ENABLE)), no) - BACKLIGHT_ENABLE = software -endif +BACKLIGHT_DRIVER = software # The rest of these settings shouldn't change From 3d54b1adf072938c46efba89e31b2afef407db85 Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 6 Nov 2019 00:06:36 +0000 Subject: [PATCH 054/973] Convert backlight to follow driver rules pattern - update docs --- docs/feature_backlight.md | 52 ++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 71f375594c4e..22abaa60a8fe 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -6,16 +6,14 @@ QMK is able to control the brightness of these LEDs by switching them on and off The MCU can only supply so much current to its GPIO pins. Instead of powering the backlight directly from the MCU, the backlight pin is connected to a transistor or MOSFET that switches the power to the LEDs. -## Driver configuration +## Feature Configuration Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following: ```makefile -BACKLIGHT_ENABLE = software # Valid driver values are 'yes,software,no' +BACKLIGHT_ENABLE = yes ``` -See below for help on individual drivers. - ## Keycodes Once enabled the following keycodes below can be used to change the backlight level. @@ -51,6 +49,16 @@ Once enabled the following keycodes below can be used to change the backlight le |`breathing_enable()` |Turns on backlight breathing | |`breathing_disable()` |Turns off backlight breathing | +## Driver Configuration + +To select which driver to use, configure your `rules.mk` with the following: + +```makefile +BACKLIGHT_DRIVER = software # Valid driver values are 'pwm,software,no' +``` + +See below for help on individual drivers. + ## Common Driver Configuration To change the behavior of the backlighting, `#define` these in your `config.h`: @@ -72,9 +80,9 @@ This functionality is configured at the keyboard level with the `BACKLIGHT_ON_ST ## AVR driver -On AVR boards, the default driver currently sniffs the configuration to pick the best scenario. To enable it, add this to your rules.mk: +On AVR boards, the default driver currently sniffs the configuration to pick the best scenario. The driver is configured by default, however the equivalent setting within rules.mk would be: ```makefile -BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = pwm ``` ### Caveats @@ -150,9 +158,9 @@ The breathing effect is the same as in the hardware PWM implementation. ## ARM Driver -While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. To enable it, add this to your rules.mk: +While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The driver is configured by default, however the equivalent setting within rules.mk would be: ```makefile -BACKLIGHT_ENABLE = yes +BACKLIGHT_DRIVER = pwm ``` ### Caveats @@ -176,7 +184,7 @@ To change the behavior of the backlighting, `#define` these in your `config.h`: Emulation of PWM while running other keyboard tasks, it offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your rules.mk: ```makefile -BACKLIGHT_ENABLE = software +BACKLIGHT_DRIVER = software ``` ### Software PWM Configuration @@ -200,3 +208,29 @@ To activate multiple backlight pins, you need to add something like this to your #undef BACKLIGHT_PIN #define BACKLIGHT_PINS { F5, B2 } ``` + +## Custom Driver + +To enable, add this to your rules.mk: + +```makefile +BACKLIGHT_DRIVER = custom +``` + +When implementing the custom driver API, the provided keyboard hooks are as follows: + +```c +void backlight_init_ports(void) { + // Optional - Run on startup + // - usually you want to configure pins here +} +void backlight_set(uint8_t level) { + // Optional - Run on level change + // - usually you want to respond to the new value +} + +void backlight_task(void) { + // Optional - Run periodically + // - long running actions here can cause performance issues +} +``` From 037467781422b8a7c021d4f17d7bcce14aec57b7 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 14 Dec 2019 04:00:09 -0800 Subject: [PATCH 055/973] core: Fix variable init and header include (#7626) tmk backport from tmk/tmk_keyboard@325a99acd9c81f60519b6e594b2bf5d1e478ac56 --- quantum/keymap_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 5877273931aa..c82c44639937 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -48,7 +48,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) { // keycode remapping keycode = keycode_config(keycode); - action_t action; + action_t action = {}; uint8_t action_layer, when, mod; switch (keycode) { From f6b9604f4a9e7a97ce2ce06a151c46f577b4133c Mon Sep 17 00:00:00 2001 From: zvecr Date: Sat, 14 Dec 2019 17:24:17 +0000 Subject: [PATCH 056/973] Update default backlight state to match avr pwm --- quantum/backlight/backlight_soft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/backlight/backlight_soft.c b/quantum/backlight/backlight_soft.c index f481dbae890b..2bcecef94795 100644 --- a/quantum/backlight/backlight_soft.c +++ b/quantum/backlight/backlight_soft.c @@ -10,7 +10,7 @@ #endif #ifndef BACKLIGHT_ON_STATE -# define BACKLIGHT_ON_STATE 0 +# define BACKLIGHT_ON_STATE 1 #endif #ifdef BACKLIGHT_PINS From 94e2a39d7257357f432a323674d4ed405856c3ae Mon Sep 17 00:00:00 2001 From: zvecr Date: Sat, 14 Dec 2019 17:25:32 +0000 Subject: [PATCH 057/973] Move function to make diff look nicer --- quantum/backlight/backlight_soft.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/backlight/backlight_soft.c b/quantum/backlight/backlight_soft.c index 2bcecef94795..096b41d91075 100644 --- a/quantum/backlight/backlight_soft.c +++ b/quantum/backlight/backlight_soft.c @@ -75,8 +75,6 @@ static uint16_t backlight_duty_table[] = { static uint8_t scale_backlight(uint8_t v) { return v * (backlight_duty_table_size - 1) / BACKLIGHT_LEVELS; } -void backlight_set(uint8_t level) { s_duty_pattern = backlight_duty_table[scale_backlight(level)]; } - void backlight_task(void) { static uint8_t backlight_tick = 0; @@ -87,3 +85,5 @@ void backlight_task(void) { } backlight_tick = (backlight_tick + 1) % 16; } + +void backlight_set(uint8_t level) { s_duty_pattern = backlight_duty_table[scale_backlight(level)]; } From b54722cc639c5c1c6a4ed8e09e881a1c7a2806a2 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 15 Dec 2019 03:16:31 +0900 Subject: [PATCH 058/973] Change newbs.md to link to the new newbs_git_best_practices.md instead of newbs_best_practices.md. (#7633) --- docs/newbs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/newbs.md b/docs/newbs.md index 904a52945513..775bba2caaca 100644 --- a/docs/newbs.md +++ b/docs/newbs.md @@ -13,7 +13,7 @@ There are 7 main sections to this guide: * [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md) * [Flashing Firmware](newbs_flashing.md) * [Testing and Debugging](newbs_testing_debugging.md) -* [Git Best Practices](newbs_best_practices.md) +* [Best Git Practices](newbs_git_best_practices.md) * [Learn More with these Resources](newbs_learn_more_resources.md) This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md). From 876e5444331be78637497903ba31a03b29de8b1d Mon Sep 17 00:00:00 2001 From: Zach Date: Sun, 15 Dec 2019 14:27:42 -0500 Subject: [PATCH 059/973] [Keyboard] Add ymd67 keyboard (#7631) * [Keyboard] Add ymd67 keyboard * Apply suggestions from code review * Apply more suggestions from code review --- keyboards/ymdk/ymd67/config.h | 46 +++++++++++ keyboards/ymdk/ymd67/info.json | 81 +++++++++++++++++++ keyboards/ymdk/ymd67/keymaps/default/keymap.c | 17 ++++ .../ymdk/ymd67/keymaps/default/readme.md | 5 ++ keyboards/ymdk/ymd67/readme.md | 15 ++++ keyboards/ymdk/ymd67/rules.mk | 26 ++++++ keyboards/ymdk/ymd67/ymd67.c | 1 + keyboards/ymdk/ymd67/ymd67.h | 17 ++++ 8 files changed, 208 insertions(+) create mode 100644 keyboards/ymdk/ymd67/config.h create mode 100644 keyboards/ymdk/ymd67/info.json create mode 100644 keyboards/ymdk/ymd67/keymaps/default/keymap.c create mode 100644 keyboards/ymdk/ymd67/keymaps/default/readme.md create mode 100644 keyboards/ymdk/ymd67/readme.md create mode 100644 keyboards/ymdk/ymd67/rules.mk create mode 100644 keyboards/ymdk/ymd67/ymd67.c create mode 100644 keyboards/ymdk/ymd67/ymd67.h diff --git a/keyboards/ymdk/ymd67/config.h b/keyboards/ymdk/ymd67/config.h new file mode 100644 index 000000000000..05963e57eadc --- /dev/null +++ b/keyboards/ymdk/ymd67/config.h @@ -0,0 +1,46 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER YMDK +#define PRODUCT YMD67 +#define DESCRIPTION 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, F7, B5, B4, D7, D6, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#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 + +/* prevent stuck modifiers */ + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/ymdk/ymd67/info.json b/keyboards/ymdk/ymd67/info.json new file mode 100644 index 000000000000..e027b173c493 --- /dev/null +++ b/keyboards/ymdk/ymd67/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "ymd67", + "url": "https://www.aliexpress.com/item/4000311811121.html", + "maintainer": "SwiftLawnGnome", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "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": "Bs", "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}, + {"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}, + {"label": "Up", "x": 13, "y": 3}, + {"label": "Del", "x": 14, "y": 3}, + {"label": "Ctrl", "x": 0, "y": 4, "w": 1.75}, + {"label": "Win", "x": 1.75, "y": 4, "w": 1.25}, + {"label": "Alt", "x": 3, "y": 4, "w": 1.25}, + {"x": 4.25, "y": 4, "w": 1.25}, + {"x": 5.5, "y": 4, "w": 3}, + {"label": "Alt", "x": 8.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "x": 9.75, "y": 4, "w": 1.25}, + {"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/ymdk/ymd67/keymaps/default/keymap.c b/keyboards/ymdk/ymd67/keymaps/default/keymap.c new file mode 100644 index 000000000000..7ce144d62cb9 --- /dev/null +++ b/keyboards/ymdk/ymd67/keymaps/default/keymap.c @@ -0,0 +1,17 @@ +#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_GRV, 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_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, KC_RCTL, 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, KC_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, 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) + +}; diff --git a/keyboards/ymdk/ymd67/keymaps/default/readme.md b/keyboards/ymdk/ymd67/keymaps/default/readme.md new file mode 100644 index 000000000000..511cc94dd1ee --- /dev/null +++ b/keyboards/ymdk/ymd67/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default YMD67 layout + +![YMD67 layout image](https://i.imgur.com/YghD1LH.png) + +This is the default layout the keyboard comes with. diff --git a/keyboards/ymdk/ymd67/readme.md b/keyboards/ymdk/ymd67/readme.md new file mode 100644 index 000000000000..f8c10168ec2d --- /dev/null +++ b/keyboards/ymdk/ymd67/readme.md @@ -0,0 +1,15 @@ +# YMD67 + +![YMD67](https://ae01.alicdn.com/kf/Hbb4b59f9ab94484ab396a8e0200968ecd.jpg) + +A low-profile minila keyboard kit by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm). Available in multiple colors and has RGB side-lighting. + +* Keyboard Maintainer: [Zach Shaftel](https://github.com/swiftlawngnome) +* Hardware Supported: YMD67 +* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/4000311811121.html) + +Make example for this keyboard (after setting up your build environment): + + make ymdk/ymd67: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/ymdk/ymd67/rules.mk b/keyboards/ymdk/ymd67/rules.mk new file mode 100644 index 000000000000..891c7739a91f --- /dev/null +++ b/keyboards/ymdk/ymd67/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 = 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 = 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/ymdk/ymd67/ymd67.c b/keyboards/ymdk/ymd67/ymd67.c new file mode 100644 index 000000000000..f6d40ea0c341 --- /dev/null +++ b/keyboards/ymdk/ymd67/ymd67.c @@ -0,0 +1 @@ +#include "ymd67.h" diff --git a/keyboards/ymdk/ymd67/ymd67.h b/keyboards/ymdk/ymd67/ymd67.h new file mode 100644 index 000000000000..5e7d846694fe --- /dev/null +++ b/keyboards/ymdk/ymd67/ymd67.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + 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, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K43, K47, K48, K49, K4A, K4B, K4C, K4D \ +) { \ + { 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, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO } \ +} From ad7ba08ac830a793b6a1aaefb2d420dd140de2e6 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Sun, 15 Dec 2019 16:47:32 -0500 Subject: [PATCH 060/973] update default h88 keymap (#7646) --- keyboards/hineybush/h88/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/hineybush/h88/keymaps/default/keymap.c b/keyboards/hineybush/h88/keymaps/default/keymap.c index 17035b4725f0..2e0251ee2eb2 100644 --- a/keyboards/hineybush/h88/keymaps/default/keymap.c +++ b/keyboards/hineybush/h88/keymaps/default/keymap.c @@ -23,7 +23,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_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, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + 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, From 3eb82e047079230e55d3aeff901c4d0dce69fb3a Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Sun, 15 Dec 2019 14:03:23 -0800 Subject: [PATCH 061/973] [keyboard] Plain60 cleanups (#7644) * Change plain60 to bootmagic lite - it's easier to reset and maintain a keyboard with lite - remove obsolete size comments * Add RESET on a layer to default keymap * Use _FN * Maintain compatibility with keymap * Fix thinko --- .../maartenwut/plain60/keymaps/default/keymap.c | 16 +++++++++++++--- keyboards/maartenwut/plain60/rules.mk | 12 ++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/keyboards/maartenwut/plain60/keymaps/default/keymap.c b/keyboards/maartenwut/plain60/keymaps/default/keymap.c index 7e8cfff3541c..2e23dece01d9 100644 --- a/keyboards/maartenwut/plain60/keymaps/default/keymap.c +++ b/keyboards/maartenwut/plain60/keymaps/default/keymap.c @@ -4,7 +4,10 @@ // 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 +enum _layer { + _MA, + _FN +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -12,6 +15,13 @@ 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_MINS, KC_EQL, KC_BSLS, 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_BSLS, 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_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL) + 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, LT(_FN, KC_UP), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(_FN, KC_APP), KC_RCTRL), + +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______) }; diff --git a/keyboards/maartenwut/plain60/rules.mk b/keyboards/maartenwut/plain60/rules.mk index 77b5a3eb95f3..398b59227dc9 100644 --- a/keyboards/maartenwut/plain60/rules.mk +++ b/keyboards/maartenwut/plain60/rules.mk @@ -14,14 +14,14 @@ 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 = 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 # 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 = no # Unicode From 74dc65ab2efd315eaf1b954b782289d5be3c0721 Mon Sep 17 00:00:00 2001 From: randlor <57689764+randlor@users.noreply.github.com> Date: Mon, 16 Dec 2019 05:33:04 +0000 Subject: [PATCH 062/973] [Keyboard] XD68 65% ATMega32U4 based (#7395) * First working draft * Updated readme.md * Fixed url * Typo fix * RGB + Backlight working * Fixed matrix for ISO NUHS * ISO matrix working * Adding ANSI default layout * First release commit * Removed reference to deprecated layout * Changes from PR #7395 review * Additional changes as requested for PR #7395 * Additional changes from @noroadsleft review * Replaced ifndef/endif with pragma * Adding yanfali's recommended changes --- keyboards/xd68/config.h | 110 +++++++++++++++++++ keyboards/xd68/keymaps/default/config.h | 5 + keyboards/xd68/keymaps/default/keymap.c | 48 ++++++++ keyboards/xd68/keymaps/default/readme.md | 5 + keyboards/xd68/keymaps/default_iso/config.h | 4 + keyboards/xd68/keymaps/default_iso/keymap.c | 48 ++++++++ keyboards/xd68/keymaps/default_iso/readme.md | 5 + keyboards/xd68/readme.md | 53 +++++++++ keyboards/xd68/rules.mk | 32 ++++++ keyboards/xd68/xd68.c | 22 ++++ keyboards/xd68/xd68.h | 69 ++++++++++++ 11 files changed, 401 insertions(+) create mode 100644 keyboards/xd68/config.h create mode 100644 keyboards/xd68/keymaps/default/config.h create mode 100644 keyboards/xd68/keymaps/default/keymap.c create mode 100644 keyboards/xd68/keymaps/default/readme.md create mode 100644 keyboards/xd68/keymaps/default_iso/config.h create mode 100644 keyboards/xd68/keymaps/default_iso/keymap.c create mode 100644 keyboards/xd68/keymaps/default_iso/readme.md create mode 100644 keyboards/xd68/readme.md create mode 100644 keyboards/xd68/rules.mk create mode 100755 keyboards/xd68/xd68.c create mode 100755 keyboards/xd68/xd68.h diff --git a/keyboards/xd68/config.h b/keyboards/xd68/config.h new file mode 100644 index 000000000000..41ede7b6c08e --- /dev/null +++ b/keyboards/xd68/config.h @@ -0,0 +1,110 @@ +/* +Copyright 2019 Michael 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 0xCDCD +#define PRODUCT_ID 0x6868 +#define DEVICE_VER 0x0001 +#define MANUFACTURER xiudi +#define PRODUCT XD68 +#define DESCRIPTION XD68 65pc keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * 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, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 6 + +/* 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 + +/* + * 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 + +/* + * 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 + +// ws2812 options +#define RGB_DI_PIN F6 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 12 // 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) diff --git a/keyboards/xd68/keymaps/default/config.h b/keyboards/xd68/keymaps/default/config.h new file mode 100644 index 000000000000..9ff66e3cf664 --- /dev/null +++ b/keyboards/xd68/keymaps/default/config.h @@ -0,0 +1,5 @@ + +#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 new file mode 100644 index 000000000000..5ce09cde535d --- /dev/null +++ b/keyboards/xd68/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#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 _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 +), +}; diff --git a/keyboards/xd68/keymaps/default/readme.md b/keyboards/xd68/keymaps/default/readme.md new file mode 100644 index 000000000000..f26e1bd63f7b --- /dev/null +++ b/keyboards/xd68/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# XD68 layout for Default ANSI + +``` +make xd68:default +``` diff --git a/keyboards/xd68/keymaps/default_iso/config.h b/keyboards/xd68/keymaps/default_iso/config.h new file mode 100644 index 000000000000..0d063653618e --- /dev/null +++ b/keyboards/xd68/keymaps/default_iso/config.h @@ -0,0 +1,4 @@ +#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 new file mode 100644 index 000000000000..6edcf748f1f4 --- /dev/null +++ b/keyboards/xd68/keymaps/default_iso/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#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 _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/keymaps/default_iso/readme.md b/keyboards/xd68/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..d61877e77eb3 --- /dev/null +++ b/keyboards/xd68/keymaps/default_iso/readme.md @@ -0,0 +1,5 @@ +# XD68 layout for Default ISO + +``` +make xd68:default_iso +``` diff --git a/keyboards/xd68/readme.md b/keyboards/xd68/readme.md new file mode 100644 index 000000000000..a62d9c7c56db --- /dev/null +++ b/keyboards/xd68/readme.md @@ -0,0 +1,53 @@ +# XD68 + +![Kitteh](https://i.imgur.com/qkA5Of5.jpg) + +65% board with USB-C, RGB underglow and backlight. Powered by ATM32U4. + +![Top View of XD68 Keyboard](https://i.imgur.com/OLkQQ17.jpg) + +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD68 +* Hardware Availability: [KPRepublic on AliExpress](http://kprepublic.com/products/xiudi-xd68-pcb-65-custom-mechanical-keyboard-support-tkg-tools-underglow-rgb-pcb-programmed-kle-lots-of-layouts) + +Make example for this keyboard (after setting up your build environment): + + make xd68:default + make xd68:default_iso # default ISO UK layout + +## Layouts + +### ANSI + +``` +,----------------------------------------------------------------. +|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 | +`----------------------------------------------------------------' +``` + +### ISO-UK + +``` +,----------------------------------------------------------------. +|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 |Alt| FN|Ctrl|Lef|Dow|Rig | +`----------------------------------------------------------------' +``` + +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/xd68/rules.mk b/keyboards/xd68/rules.mk new file mode 100644 index 000000000000..91f9a48f3d84 --- /dev/null +++ b/keyboards/xd68/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 + +# 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 +# +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 +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 +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 diff --git a/keyboards/xd68/xd68.c b/keyboards/xd68/xd68.c new file mode 100755 index 000000000000..2a5a52bdae2f --- /dev/null +++ b/keyboards/xd68/xd68.c @@ -0,0 +1,22 @@ +#include "xd68.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(B2); + writePinHigh(B2); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B2, !led_state.caps_lock); + } + return true; +} + diff --git a/keyboards/xd68/xd68.h b/keyboards/xd68/xd68.h new file mode 100755 index 000000000000..2916d72d401e --- /dev/null +++ b/keyboards/xd68/xd68.h @@ -0,0 +1,69 @@ + +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +/* XD68 ANSI layout + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e | + * |----------------------------------------------------------------| + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | 2e | + * |----------------------------------------------------------------| + * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 48| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#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, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k45, 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, XXX, k2d, k2e}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, k4b, XXX, k48, k4a, k4c, k4d, k4e} \ +} + +/* XD68 ISO layout + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| | 1e | + * |------------------------------------------------------. -----| + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c| 2d| 2e | + * |----------------------------------------------------------------| + * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 48| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_65_iso( \ + 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, 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, k45, 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, XXX, 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, XXX, XXX, k45, XXX, XXX, k4b, XXX, k48, k4a, k4c, k4d, k4e} \ +} From 853b99954ed021d52ae4d7afe17651437fce4df9 Mon Sep 17 00:00:00 2001 From: Boy_314 <32818287+Boy-314@users.noreply.github.com> Date: Mon, 16 Dec 2019 02:27:10 -0500 Subject: [PATCH 063/973] [Keymap] boy_314's satisfaction75 layout (#7638) * added boy_314's satisfaction75 layout * added readme * updated NKRO toggle, removed unecessary code * Update keyboards/cannonkeys/satisfaction75/keymaps/boy_314/config.h Co-Authored-By: Drashna Jaelre --- .../satisfaction75/keymaps/boy_314/config.h | 3 ++ .../satisfaction75/keymaps/boy_314/keymap.c | 37 +++++++++++++++++++ .../satisfaction75/keymaps/boy_314/readme.md | 3 ++ .../satisfaction75/keymaps/boy_314/rules.mk | 4 ++ 4 files changed, 47 insertions(+) create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/boy_314/config.h create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/boy_314/readme.md create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/config.h b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/config.h new file mode 100644 index 000000000000..4af97ded2b17 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define ENCODER_RESOLUTION 2 diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c new file mode 100644 index 000000000000..1680f90dc9c2 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2019 Boy_314 + +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 keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_2x2( + 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_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_NO, ENC_PRESS, + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_END, + 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_DEL, + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_2x2( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + NK_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, RESET, CLOCK_SET, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, + _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/readme.md b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/readme.md new file mode 100644 index 000000000000..65984873c476 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/readme.md @@ -0,0 +1,3 @@ +# Boy_314's Satisfaction75 Layout + +This is Boy_314's Satisfaction75 Layout. It can be used on VIA. It features a QWERTY layout on the base, along with missing TKL keys on layer 1. Right side 3 keys from top down are: Home, End, Delete. The encoder resolution has been reduced from the default of 4 down to 2 so that it no longer needs to click twice, but now only once, before triggering an action. diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk new file mode 100644 index 000000000000..0dcaa7318373 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk @@ -0,0 +1,4 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes From 85f4c3ebb456c2d6feebf8934ab014436d7f8f17 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 16 Dec 2019 08:31:59 -0800 Subject: [PATCH 064/973] [Core] Optimize matrix processing (#7621) Backport of tmk/tmk_keyboard@ad6059adc7039a54d1db75da783068654906a679 --- tmk_core/common/keyboard.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 125f00ccf7e1..af2b2fd48b4f 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -297,13 +297,14 @@ void keyboard_task(void) { } #endif if (debug_matrix) matrix_print(); - for (uint8_t c = 0; c < MATRIX_COLS; c++) { - if (matrix_change & ((matrix_row_t)1 << c)) { + matrix_row_t col_mask = 1; + for (uint8_t c = 0; c < MATRIX_COLS; c++, col_mask <<= 1) { + if (matrix_change & col_mask) { action_exec((keyevent_t){ - .key = (keypos_t){.row = r, .col = c}, .pressed = (matrix_row & ((matrix_row_t)1 << c)), .time = (timer_read() | 1) /* time should not be 0 */ + .key = (keypos_t){.row = r, .col = c}, .pressed = (matrix_row & col_mask), .time = (timer_read() | 1) /* time should not be 0 */ }); // record a processed key - matrix_prev[r] ^= ((matrix_row_t)1 << c); + matrix_prev[r] ^= col_mask; #ifdef QMK_KEYS_PER_SCAN // only jump out if we have processed "enough" keys. if (++keys_processed >= QMK_KEYS_PER_SCAN) From f3bf301825db5fd8bfa369d26584a64f5d640ecb Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 16 Dec 2019 16:33:48 +0000 Subject: [PATCH 065/973] Disable usb on slave half to resolve random 'lockup' (#7649) --- quantum/split_common/split_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 9366c3297a37..076f186649b0 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -33,9 +33,11 @@ bool waitForUsb(void) { wait_ms(100); } -#if defined(__AVR__) // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow +#if defined(__AVR__) (USBCON &= ~(_BV(USBE) | _BV(OTGPADE))); +#else + usbStop(&USBD1); #endif return false; From 7cddcce23798937bf7373c7cb289a0a510fb1232 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 16 Dec 2019 19:20:33 +0000 Subject: [PATCH 066/973] Remove QMK_KEYBOARD_CONFIG_H from boards (#7635) --- keyboards/7skb/rev1/config.h | 2 -- keyboards/fortitude60/rev1/config.h | 2 -- keyboards/keebio/iris/rev1/config.h | 2 -- keyboards/keebio/iris/rev1_led/config.h | 2 -- keyboards/keebio/iris/rev2/config.h | 2 -- keyboards/keebio/iris/rev3/config.h | 2 -- keyboards/keebio/levinson/rev1/config.h | 2 -- keyboards/keebio/levinson/rev2/config.h | 2 -- keyboards/keebio/quefrency/rev1/config.h | 2 -- keyboards/keebio/rorschach/rev1/config.h | 2 -- keyboards/naked48/rev1/config.h | 2 -- 11 files changed, 22 deletions(-) diff --git a/keyboards/7skb/rev1/config.h b/keyboards/7skb/rev1/config.h index 529c3e72c762..01b1ef4a1cc3 100644 --- a/keyboards/7skb/rev1/config.h +++ b/keyboards/7skb/rev1/config.h @@ -18,8 +18,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3060 diff --git a/keyboards/fortitude60/rev1/config.h b/keyboards/fortitude60/rev1/config.h index ad4407a11163..98f610461c90 100644 --- a/keyboards/fortitude60/rev1/config.h +++ b/keyboards/fortitude60/rev1/config.h @@ -18,8 +18,6 @@ along with this program. If not, see . #ifndef REV1_CONFIG_H #define REV1_CONFIG_H -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1156 diff --git a/keyboards/keebio/iris/rev1/config.h b/keyboards/keebio/iris/rev1/config.h index 12b4e098b369..7b88fe5de722 100644 --- a/keyboards/keebio/iris/rev1/config.h +++ b/keyboards/keebio/iris/rev1/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1256 diff --git a/keyboards/keebio/iris/rev1_led/config.h b/keyboards/keebio/iris/rev1_led/config.h index 3b3c999b82a2..ec78ef67f4b0 100644 --- a/keyboards/keebio/iris/rev1_led/config.h +++ b/keyboards/keebio/iris/rev1_led/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1256 diff --git a/keyboards/keebio/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h index 938ff05f09a0..500b0fcbd1f7 100644 --- a/keyboards/keebio/iris/rev2/config.h +++ b/keyboards/keebio/iris/rev2/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1256 diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index 6576ff68386e..eeb999ad4f76 100644 --- a/keyboards/keebio/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1256 diff --git a/keyboards/keebio/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h index 52cf7baf7a12..a34c8bdcc557 100644 --- a/keyboards/keebio/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -19,8 +19,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1146 diff --git a/keyboards/keebio/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h index 1365ae792c1f..9d694712538c 100644 --- a/keyboards/keebio/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -19,8 +19,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1146 diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index 9778ef470954..1d726a0fc320 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -18,8 +18,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1257 diff --git a/keyboards/keebio/rorschach/rev1/config.h b/keyboards/keebio/rorschach/rev1/config.h index bcfce2bee8ef..4dae31f8c5e6 100644 --- a/keyboards/keebio/rorschach/rev1/config.h +++ b/keyboards/keebio/rorschach/rev1/config.h @@ -17,8 +17,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1246 diff --git a/keyboards/naked48/rev1/config.h b/keyboards/naked48/rev1/config.h index 0d0390366f27..d770fefb498f 100644 --- a/keyboards/naked48/rev1/config.h +++ b/keyboards/naked48/rev1/config.h @@ -18,8 +18,6 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3060 From 0082ecf1f3328eb45a865bf50d3f44ca632d9f7b Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 16 Dec 2019 11:26:02 -0800 Subject: [PATCH 067/973] Move kwerdenker's personal keymap from RGB (#7645) * Move kwerdenker's personal keymap from RGB Talked to Maartenwut about making RGB an actual template instead of kwerdenker's keymap. Free'd up B7 so it can be used for audio in agreement with MW. He's considering adding a speaker footprint to next rev of plain60, and only B7 can be used with Audio. RGB uses bitbang driver so it doesn't really make any difference if it's pin B0. - RGB should be a template for other people to modify, not a personal keymap - change default pin to B0 to free up B7 for audio use - rename RGB to kwerdenker * Add RGB keycodes to FN layer * don't use uppercase in keymap names - doesn't work properly on MacOS or Windows * Add an audio specific keymap * Enum instead of define * Suggested change to keymap - maintain compatibility with old keymap --- .../maartenwut/plain60/keymaps/audio/config.h | 3 +++ .../maartenwut/plain60/keymaps/audio/keymap.c | 27 +++++++++++++++++++ .../maartenwut/plain60/keymaps/audio/rules.mk | 4 +++ .../keymaps/{RGB => kwerdenker}/config.h | 0 .../keymaps/{RGB => kwerdenker}/keymap.c | 0 .../keymaps/{RGB => kwerdenker}/rules.mk | 0 .../maartenwut/plain60/keymaps/rgb/config.h | 8 ++++++ .../maartenwut/plain60/keymaps/rgb/keymap.c | 27 +++++++++++++++++++ .../maartenwut/plain60/keymaps/rgb/rules.mk | 3 +++ 9 files changed, 72 insertions(+) create mode 100644 keyboards/maartenwut/plain60/keymaps/audio/config.h create mode 100644 keyboards/maartenwut/plain60/keymaps/audio/keymap.c create mode 100644 keyboards/maartenwut/plain60/keymaps/audio/rules.mk rename keyboards/maartenwut/plain60/keymaps/{RGB => kwerdenker}/config.h (100%) rename keyboards/maartenwut/plain60/keymaps/{RGB => kwerdenker}/keymap.c (100%) rename keyboards/maartenwut/plain60/keymaps/{RGB => kwerdenker}/rules.mk (100%) create mode 100644 keyboards/maartenwut/plain60/keymaps/rgb/config.h create mode 100644 keyboards/maartenwut/plain60/keymaps/rgb/keymap.c create mode 100644 keyboards/maartenwut/plain60/keymaps/rgb/rules.mk diff --git a/keyboards/maartenwut/plain60/keymaps/audio/config.h b/keyboards/maartenwut/plain60/keymaps/audio/config.h new file mode 100644 index 000000000000..9a43b7fbe346 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/audio/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define B7_AUDIO diff --git a/keyboards/maartenwut/plain60/keymaps/audio/keymap.c b/keyboards/maartenwut/plain60/keymaps/audio/keymap.c new file mode 100644 index 000000000000..91ac37501ca7 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/audio/keymap.c @@ -0,0 +1,27 @@ +#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 { + _MA, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = 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_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_BSLS, 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, LT(_FN, KC_UP), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(_FN, KC_APP), KC_RCTRL), + +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + AU_TOG, MU_TOG, MU_MOD, CK_TOGG, _______, _______, _______, _______) +}; diff --git a/keyboards/maartenwut/plain60/keymaps/audio/rules.mk b/keyboards/maartenwut/plain60/keymaps/audio/rules.mk new file mode 100644 index 000000000000..600978d17e67 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/audio/rules.mk @@ -0,0 +1,4 @@ +AUDIO_ENABLE = yes +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no + diff --git a/keyboards/maartenwut/plain60/keymaps/RGB/config.h b/keyboards/maartenwut/plain60/keymaps/kwerdenker/config.h similarity index 100% rename from keyboards/maartenwut/plain60/keymaps/RGB/config.h rename to keyboards/maartenwut/plain60/keymaps/kwerdenker/config.h diff --git a/keyboards/maartenwut/plain60/keymaps/RGB/keymap.c b/keyboards/maartenwut/plain60/keymaps/kwerdenker/keymap.c similarity index 100% rename from keyboards/maartenwut/plain60/keymaps/RGB/keymap.c rename to keyboards/maartenwut/plain60/keymaps/kwerdenker/keymap.c diff --git a/keyboards/maartenwut/plain60/keymaps/RGB/rules.mk b/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk similarity index 100% rename from keyboards/maartenwut/plain60/keymaps/RGB/rules.mk rename to keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk diff --git a/keyboards/maartenwut/plain60/keymaps/rgb/config.h b/keyboards/maartenwut/plain60/keymaps/rgb/config.h new file mode 100644 index 000000000000..8426938120a4 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/rgb/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define RGB_DI_PIN B0 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 // limit to 20 otherwise brownouts +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/maartenwut/plain60/keymaps/rgb/keymap.c b/keyboards/maartenwut/plain60/keymaps/rgb/keymap.c new file mode 100644 index 000000000000..abfb5f6b1587 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/rgb/keymap.c @@ -0,0 +1,27 @@ +#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 { + _MA, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = 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_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_BSLS, 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, LT(_FN, KC_UP), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(_FN, KC_APP), KC_RCTRL), + +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/maartenwut/plain60/keymaps/rgb/rules.mk b/keyboards/maartenwut/plain60/keymaps/rgb/rules.mk new file mode 100644 index 000000000000..b6cd87b7d4e9 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/rgb/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no From ae40fc498b185d3d23908780a3d3425eb5ff05b5 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 16 Dec 2019 20:27:53 +0000 Subject: [PATCH 068/973] Relocate RGB keycode processing (#7508) * Move rgb keycode logic to process_keycode * Fixes for rgb matrix * Fixes for mxss * Fix inc/dec logic, add comments * Fix return RAINBOW_SWIRL logic * stop external use of rgb helper functions * merge fix * Fix 'defined but not used' when all animations are disabled --- common_features.mk | 6 + keyboards/mxss/rules.mk | 1 + quantum/process_keycode/process_rgb.c | 141 +++++++++++++++++++++ quantum/process_keycode/process_rgb.h | 20 +++ quantum/quantum.c | 168 ++------------------------ quantum/quantum.h | 4 + quantum/rgb_matrix.h | 40 +++--- 7 files changed, 199 insertions(+), 181 deletions(-) create mode 100644 quantum/process_keycode/process_rgb.c create mode 100644 quantum/process_keycode/process_rgb.h diff --git a/common_features.mk b/common_features.mk index 9b60eeed03af..640539fd6f41 100644 --- a/common_features.mk +++ b/common_features.mk @@ -109,6 +109,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += $(QUANTUM_DIR)/rgblight.c CIE1931_CURVE = yes LED_BREATHING_TABLE = yes + RGB_KEYCODES_ENABLE = yes ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER else @@ -147,6 +148,7 @@ endif SRC += $(QUANTUM_DIR)/rgb_matrix.c SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c CIE1931_CURVE = yes + RGB_KEYCODES_ENABLE = yes endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) @@ -187,6 +189,10 @@ ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes) OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER endif +ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c +endif + ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) OPT_DEFS += -DTAP_DANCE_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk index 7df8517583d7..f9210319e334 100644 --- a/keyboards/mxss/rules.mk +++ b/keyboards/mxss/rules.mk @@ -32,6 +32,7 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches # 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 += ws2812.c CIE1931_CURVE = yes diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c new file mode 100644 index 000000000000..c76166342f19 --- /dev/null +++ b/quantum/process_keycode/process_rgb.c @@ -0,0 +1,141 @@ +/* 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 "process_rgb.h" +#include "rgb.h" + +typedef void (*rgb_func_pointer)(void); + +/** + * Wrapper for inc/dec rgb keycode + * + * 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) { + dec_func(); + } else { + inc_func(); + } +} + +/** + * 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) + */ +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 { + rgblight_mode(start); + } +} + +/** + * Handle keycodes for both rgblight and rgbmatrix + */ +bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { +#ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +#else + // Split keyboards need to trigger on key-up for edge-case issue + if (!record->event.pressed) { +#endif + uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); + switch (keycode) { + case RGB_TOG: + rgblight_toggle(); + return false; + case RGB_MODE_FORWARD: + handleKeycodeRGB(shifted, rgblight_step, rgblight_step_reverse); + return false; + case RGB_MODE_REVERSE: + handleKeycodeRGB(shifted, rgblight_step_reverse, rgblight_step); + return false; + case RGB_HUI: + handleKeycodeRGB(shifted, rgblight_increase_hue, rgblight_decrease_hue); + return false; + case RGB_HUD: + handleKeycodeRGB(shifted, rgblight_decrease_hue, rgblight_increase_hue); + return false; + case RGB_SAI: + handleKeycodeRGB(shifted, rgblight_increase_sat, rgblight_decrease_sat); + return false; + case RGB_SAD: + handleKeycodeRGB(shifted, rgblight_decrease_sat, rgblight_increase_sat); + return false; + case RGB_VAI: + handleKeycodeRGB(shifted, rgblight_increase_val, rgblight_decrease_val); + return false; + case RGB_VAD: + handleKeycodeRGB(shifted, rgblight_decrease_val, rgblight_increase_val); + return false; + case RGB_SPI: + handleKeycodeRGB(shifted, rgblight_increase_speed, rgblight_decrease_speed); + return false; + case RGB_SPD: + handleKeycodeRGB(shifted, rgblight_decrease_speed, rgblight_increase_speed); + return false; + case RGB_MODE_PLAIN: + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + return false; + case RGB_MODE_BREATHE: +#ifdef RGBLIGHT_EFFECT_BREATHING + handleKeycodeRGBMode(RGBLIGHT_MODE_BREATHING, RGBLIGHT_MODE_BREATHING_end); +#endif + return false; + case RGB_MODE_RAINBOW: +#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD + handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_MOOD, RGBLIGHT_MODE_RAINBOW_MOOD_end); +#endif + return false; + case RGB_MODE_SWIRL: +#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL + handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_SWIRL, RGBLIGHT_MODE_RAINBOW_SWIRL_end); +#endif + return false; + case RGB_MODE_SNAKE: +#ifdef RGBLIGHT_EFFECT_SNAKE + handleKeycodeRGBMode(RGBLIGHT_MODE_SNAKE, RGBLIGHT_MODE_SNAKE_end); +#endif + return false; + case RGB_MODE_KNIGHT: +#ifdef RGBLIGHT_EFFECT_KNIGHT + handleKeycodeRGBMode(RGBLIGHT_MODE_KNIGHT, RGBLIGHT_MODE_KNIGHT_end); +#endif + return false; + case RGB_MODE_XMAS: +#ifdef RGBLIGHT_EFFECT_CHRISTMAS + rgblight_mode(RGBLIGHT_MODE_CHRISTMAS); +#endif + return false; + case RGB_MODE_GRADIENT: +#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT + handleKeycodeRGBMode(RGBLIGHT_MODE_STATIC_GRADIENT, RGBLIGHT_MODE_STATIC_GRADIENT_end); +#endif + return false; + case RGB_MODE_RGBTEST: +#ifdef RGBLIGHT_EFFECT_RGB_TEST + rgblight_mode(RGBLIGHT_MODE_RGB_TEST); +#endif + return false; + } + } + + return true; +} diff --git a/quantum/process_keycode/process_rgb.h b/quantum/process_keycode/process_rgb.h new file mode 100644 index 000000000000..26aca46896bc --- /dev/null +++ b/quantum/process_keycode/process_rgb.h @@ -0,0 +1,20 @@ +/* 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 "quantum.h" + +bool process_rgb(const uint16_t keycode, const keyrecord_t *record); diff --git a/quantum/quantum.c b/quantum/quantum.c index 2def99ac8465..4c501785c0eb 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -16,10 +16,6 @@ #include "quantum.h" -#if !defined(RGBLIGHT_ENABLE) && !defined(RGB_MATRIX_ENABLE) -# include "rgb.h" -#endif - #ifdef PROTOCOL_LUFA # include "outputselect.h" #endif @@ -253,6 +249,9 @@ bool process_record_quantum(keyrecord_t *record) { #endif #ifdef MAGIC_KEYCODE_ENABLE process_magic(keycode, record) && +#endif +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + process_rgb(keycode, record) && #endif true)) { return false; @@ -293,176 +292,24 @@ bool process_record_quantum(keyrecord_t *record) { return false; #endif #ifdef BLUETOOTH_ENABLE - case OUT_AUTO: + case OUT_AUTO: set_output(OUTPUT_AUTO); return false; - case OUT_USB: + case OUT_USB: set_output(OUTPUT_USB); return false; - case OUT_BT: + case OUT_BT: set_output(OUTPUT_BLUETOOTH); return false; #endif #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_BREATHING) - case BL_BRTG: + case BL_BRTG: backlight_toggle_breathing(); return false; #endif } } -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - // Split keyboards need to trigger on key-up for edge-case issue - if (!record->event.pressed) { -# endif - uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); - switch (keycode) { - case RGB_TOG: - rgblight_toggle(); - return false; - case RGB_MODE_FORWARD: - if (shifted) { - rgblight_step_reverse(); - } else { - rgblight_step(); - } - return false; - case RGB_MODE_REVERSE: - if (shifted) { - rgblight_step(); - } else { - rgblight_step_reverse(); - } - return false; - case RGB_HUI: - if (shifted) { - rgblight_decrease_hue(); - } else { - rgblight_increase_hue(); - } - return false; - case RGB_HUD: - if (shifted) { - rgblight_increase_hue(); - } else { - rgblight_decrease_hue(); - } - return false; - case RGB_SAI: - if (shifted) { - rgblight_decrease_sat(); - } else { - rgblight_increase_sat(); - } - return false; - case RGB_SAD: - if (shifted) { - rgblight_increase_sat(); - } else { - rgblight_decrease_sat(); - } - return false; - case RGB_VAI: - if (shifted) { - rgblight_decrease_val(); - } else { - rgblight_increase_val(); - } - return false; - case RGB_VAD: - if (shifted) { - rgblight_increase_val(); - } else { - rgblight_decrease_val(); - } - return false; - case RGB_SPI: - if (shifted) { - rgblight_decrease_speed(); - } else { - rgblight_increase_speed(); - } - return false; - case RGB_SPD: - if (shifted) { - rgblight_increase_speed(); - } else { - rgblight_decrease_speed(); - } - return false; - case RGB_MODE_PLAIN: - rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); - return false; - case RGB_MODE_BREATHE: -# ifdef RGBLIGHT_EFFECT_BREATHING - if ((RGBLIGHT_MODE_BREATHING <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_BREATHING_end)) { - rgblight_step(); - } else { - rgblight_mode(RGBLIGHT_MODE_BREATHING); - } -# endif - return false; - case RGB_MODE_RAINBOW: -# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD - if ((RGBLIGHT_MODE_RAINBOW_MOOD <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_RAINBOW_MOOD_end)) { - rgblight_step(); - } else { - rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - } -# endif - case RGB_MODE_SWIRL: -# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - if ((RGBLIGHT_MODE_RAINBOW_SWIRL <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_RAINBOW_SWIRL_end)) { - rgblight_step(); - } else { - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); - } -# endif - return false; - case RGB_MODE_SNAKE: -# ifdef RGBLIGHT_EFFECT_SNAKE - if ((RGBLIGHT_MODE_SNAKE <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_SNAKE_end)) { - rgblight_step(); - } else { - rgblight_mode(RGBLIGHT_MODE_SNAKE); - } -# endif - return false; - case RGB_MODE_KNIGHT: -# ifdef RGBLIGHT_EFFECT_KNIGHT - if ((RGBLIGHT_MODE_KNIGHT <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_KNIGHT_end)) { - rgblight_step(); - } else { - rgblight_mode(RGBLIGHT_MODE_KNIGHT); - } -# endif - return false; - case RGB_MODE_XMAS: -# ifdef RGBLIGHT_EFFECT_CHRISTMAS - rgblight_mode(RGBLIGHT_MODE_CHRISTMAS); -# endif - return false; - case RGB_MODE_GRADIENT: -# ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT - if ((RGBLIGHT_MODE_STATIC_GRADIENT <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_STATIC_GRADIENT_end)) { - rgblight_step(); - } else { - rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT); - } -# endif - return false; - case RGB_MODE_RGBTEST: -# ifdef RGBLIGHT_EFFECT_RGB_TEST - rgblight_mode(RGBLIGHT_MODE_RGB_TEST); -# endif - return false; - } - } -#endif - // keycodes that depend on both pressed and non-pressed state switch (keycode) { case GRAVE_ESC: { @@ -513,7 +360,6 @@ bool process_record_quantum(keyrecord_t *record) { send_keyboard_report(); return false; } - } return process_action_kb(record); diff --git a/quantum/quantum.h b/quantum/quantum.h index 2ee261e60d6b..b9e7eea24b2c 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -137,6 +137,10 @@ extern layer_state_t layer_state; # include "process_magic.h" #endif +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +# include "process_rgb.h" +#endif + #ifdef HD44780_ENABLE # include "hd44780.h" #endif diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 16ec96f03684..96494836ee42 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -128,26 +128,26 @@ void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val); void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); #ifndef RGBLIGHT_ENABLE -# define rgblight_toggle() rgb_matrix_toggle() -# define rgblight_enable() rgb_matrix_enable() -# define rgblight_enable_noeeprom() rgb_matrix_enable_noeeprom() -# define rgblight_disable() rgb_matrix_disable() -# define rgblight_disable_noeeprom() rgb_matrix_disable_noeeprom() -# define rgblight_step() rgb_matrix_step() -# define rgblight_sethsv(hue, sat, val) rgb_matrix_sethsv(hue, sat, val) -# define rgblight_sethsv_noeeprom(hue, sat, val) rgb_matrix_sethsv_noeeprom(hue, sat, val) -# define rgblight_step_reverse() rgb_matrix_step_reverse() -# define rgblight_increase_hue() rgb_matrix_increase_hue() -# define rgblight_decrease_hue() rgb_matrix_decrease_hue() -# define rgblight_increase_sat() rgb_matrix_increase_sat() -# define rgblight_decrease_sat() rgb_matrix_decrease_sat() -# define rgblight_increase_val() rgb_matrix_increase_val() -# define rgblight_decrease_val() rgb_matrix_decrease_val() -# define rgblight_increase_speed() rgb_matrix_increase_speed() -# define rgblight_decrease_speed() rgb_matrix_decrease_speed() -# define rgblight_mode(mode) rgb_matrix_mode(mode) -# define rgblight_mode_noeeprom(mode) rgb_matrix_mode_noeeprom(mode) -# define rgblight_get_mode() rgb_matrix_get_mode() +# define rgblight_toggle rgb_matrix_toggle +# define rgblight_enable rgb_matrix_enable +# define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom +# define rgblight_disable rgb_matrix_disable +# define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom +# define rgblight_step rgb_matrix_step +# define rgblight_sethsv rgb_matrix_sethsv +# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom +# define rgblight_step_reverse rgb_matrix_step_reverse +# define rgblight_increase_hue rgb_matrix_increase_hue +# define rgblight_decrease_hue rgb_matrix_decrease_hue +# define rgblight_increase_sat rgb_matrix_increase_sat +# define rgblight_decrease_sat rgb_matrix_decrease_sat +# define rgblight_increase_val rgb_matrix_increase_val +# define rgblight_decrease_val rgb_matrix_decrease_val +# define rgblight_increase_speed rgb_matrix_increase_speed +# define rgblight_decrease_speed rgb_matrix_decrease_speed +# define rgblight_mode rgb_matrix_mode +# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom +# define rgblight_get_mode rgb_matrix_get_mode #endif typedef struct { From 98c8a307645c8661db97f22b192adb3f26752d2b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 17 Dec 2019 10:50:26 +1100 Subject: [PATCH 069/973] Tidy up dztech rules.mk --- keyboards/dztech/dz60rgb/v1/rules.mk | 32 ++++++++++++++-------- keyboards/dztech/dz60rgb/v2/rules.mk | 33 +++++++++++++++-------- keyboards/dztech/dz60rgb_ansi/v1/rules.mk | 32 ++++++++++++++-------- keyboards/dztech/dz60rgb_ansi/v2/rules.mk | 33 +++++++++++++++-------- keyboards/dztech/dz60rgb_wkl/v1/rules.mk | 32 ++++++++++++++-------- keyboards/dztech/dz60rgb_wkl/v2/rules.mk | 33 +++++++++++++++-------- keyboards/dztech/dz65rgb/v1/rules.mk | 29 +++++++++++++------- keyboards/dztech/dz65rgb/v2/rules.mk | 32 +++++++++++----------- 8 files changed, 165 insertions(+), 91 deletions(-) diff --git a/keyboards/dztech/dz60rgb/v1/rules.mk b/keyboards/dztech/dz60rgb/v1/rules.mk index 4f2073e6fad7..c06ab43338d5 100644 --- a/keyboards/dztech/dz60rgb/v1/rules.mk +++ b/keyboards/dztech/dz60rgb/v1/rules.mk @@ -1,14 +1,24 @@ # MCU name MCU = STM32F303 -BACKLIGHT_ENABLE = no -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 = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +# 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 +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/dztech/dz60rgb/v2/rules.mk b/keyboards/dztech/dz60rgb/v2/rules.mk index 9dda31a1bd26..ed91876fbf14 100644 --- a/keyboards/dztech/dz60rgb/v2/rules.mk +++ b/keyboards/dztech/dz60rgb/v2/rules.mk @@ -1,3 +1,4 @@ +# MCU name MCU = atmega32u4 # Bootloader selection @@ -10,14 +11,24 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BACKLIGHT_ENABLE = no -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 = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +# 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 +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk index 4f2073e6fad7..c06ab43338d5 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk @@ -1,14 +1,24 @@ # MCU name MCU = STM32F303 -BACKLIGHT_ENABLE = no -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 = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +# 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 +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/dztech/dz60rgb_ansi/v2/rules.mk b/keyboards/dztech/dz60rgb_ansi/v2/rules.mk index 9dda31a1bd26..ed91876fbf14 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v2/rules.mk @@ -1,3 +1,4 @@ +# MCU name MCU = atmega32u4 # Bootloader selection @@ -10,14 +11,24 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BACKLIGHT_ENABLE = no -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 = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +# 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 +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/dztech/dz60rgb_wkl/v1/rules.mk b/keyboards/dztech/dz60rgb_wkl/v1/rules.mk index 24bb30c02ca7..be72ca4fb61b 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v1/rules.mk @@ -1,16 +1,26 @@ # MCU name MCU = STM32F303 -BACKLIGHT_ENABLE = no -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 = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +# 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 +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/dztech/dz60rgb_wkl/v2/rules.mk b/keyboards/dztech/dz60rgb_wkl/v2/rules.mk index 5bcd7620f409..76117e7ea910 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v2/rules.mk @@ -1,3 +1,4 @@ +# MCU name MCU = atmega32u4 # Bootloader selection @@ -10,16 +11,26 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BACKLIGHT_ENABLE = no -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 = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +# 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 +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/dztech/dz65rgb/v1/rules.mk b/keyboards/dztech/dz65rgb/v1/rules.mk index 6e80abf472d7..9175430052fb 100644 --- a/keyboards/dztech/dz65rgb/v1/rules.mk +++ b/keyboards/dztech/dz65rgb/v1/rules.mk @@ -1,14 +1,25 @@ # MCU name MCU = STM32F303 -BACKLIGHT_ENABLE = no -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 # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = yes # Use RGB matrix +# 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 +RGB_MATRIX_ENABLE = IS31FL3731 # Use RGB matrix LAYOUTS = 65_ansi diff --git a/keyboards/dztech/dz65rgb/v2/rules.mk b/keyboards/dztech/dz65rgb/v2/rules.mk index b0b41a88d627..118087e2ffe2 100644 --- a/keyboards/dztech/dz65rgb/v2/rules.mk +++ b/keyboards/dztech/dz65rgb/v2/rules.mk @@ -14,22 +14,22 @@ 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 +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 +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 -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 -RGB_MATRIX_ENABLE = yes # Use RGB matrix -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +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 +RGB_MATRIX_ENABLE = IS31FL3731 # Use RGB matrix -LAYOUTS = 65_ansi \ No newline at end of file +LAYOUTS = 65_ansi From a860da891497afc536d6248fad35dff5fb782472 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Tue, 17 Dec 2019 14:01:46 +0900 Subject: [PATCH 070/973] [Docs] add japanese translation (basic part) (#7461) * add basic part * update cli * update cli * correct links to ja document * update files based on comments * update for a postpositional particle * update for a punctuation * update files based on comments * update files based on comments * update files based on comments * update files based on comments * update files based on comments * update files based on comments * update files based on comments Co-Authored-By: shela Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> --- docs/ja/cli.md | 227 ++++++++++++++++++++++++ docs/ja/cli_configuration.md | 126 +++++++++++++ docs/ja/contributing.md | 173 ++++++++++++++++++ docs/ja/getting_started_getting_help.md | 20 +++ docs/ja/getting_started_github.md | 64 +++++++ docs/ja/getting_started_introduction.md | 65 +++++++ 6 files changed, 675 insertions(+) create mode 100644 docs/ja/cli.md create mode 100644 docs/ja/cli_configuration.md create mode 100644 docs/ja/contributing.md create mode 100644 docs/ja/getting_started_getting_help.md create mode 100644 docs/ja/getting_started_github.md create mode 100644 docs/ja/getting_started_introduction.md diff --git a/docs/ja/cli.md b/docs/ja/cli.md new file mode 100644 index 000000000000..3cc58e1f05ef --- /dev/null +++ b/docs/ja/cli.md @@ -0,0 +1,227 @@ +# QMK CLI + + + +このページは QMK CLI のセットアップと使用方法について説明します。 + +# 概要 + +QMK CLI を使用すると QMK キーボードの構築と作業が簡単になります。QMK ファームウェアの取得とコンパイル、キーマップの作成などのようなタスクを簡素化し合理化するためのコマンドを多く提供します。 + +* [グローバル CLI](#global-cli) +* [ローカル CLI](#local-cli) +* [CLI コマンド](#cli-commands) + +# 必要事項 + +CLI は Python 3.5 以上を必要とします。我々は必要事項の数を少なくしようとしていますが、[`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) にリストされているパッケージもインストールする必要があります。 + +# グローバル CLI :id=global-cli + +QMK は、QMK ビルド環境のセットアップ、QMK の操作、および `qmk_firmware` の複数のコピーの操作を容易にできるインストール可能な CLI を提供します。これを定期的にインストールおよび更新することをお勧めします。 + +## Homebrew を使ったインストール (macOS、いくつかの Linux) + +[Homebrew](https://brew.sh) をインストールしている場合は、タップして QMK をインストールすることができます: + +``` +brew tap qmk/qmk +brew install qmk +export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を設定します +qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします +``` + +## easy_install あるいは pip を使ってインストール + +上のリストにあなたのシステムがない場合は、QMK を手動でインストールすることができます。最初に、python 3.5 (以降)をインストールしていて、pip をインストールしていることを確認してください。次に以下のコマンドを使って QMK をインストールします: + +``` +pip3 install qmk +export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を設定します +qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします +``` + +## 他のオペレーティングシステムのためのパッケージ + +より多くのオペレーティングシステム用に `qmk` パッケージを作成および保守する人を探しています。OS 用のパッケージを作成する場合は、以下のガイドラインに従ってください: + +* これらのガイドラインと矛盾する場合は、OS のベストプラクティスに従ってください + * 逸脱する場合は、理由をコメントに文章化してください。 +* virtualenv を使ってインストールしてください +* 環境変数 `QMK_HOME` を設定して、ファームウェアソースを `~/qmk_firmware` 以外のどこかにチェックアウトするようにユーザに指示してください。 + +# ローカル CLI :id=local-cli + +グローバル CLI を使いたくない場合は、`qmk_firmware` に付属のローカル CLI があります。`qmk_firmware/bin/qmk` で見つけることができます。任意のディレクトリから `qmk` コマンドを実行でき、常に `qmk_firmware` のコピー上で動作します。 + +**例**: + +``` +$ ~/qmk_firmware/bin/qmk hello +Ψ Hello, World! +``` + +## ローカル CLI の制限 + +グローバル CLI と比較して、ローカル CLI には幾つかの制限があります: + +* ローカル CLI は `qmk setup` あるいは `qmk clone` をサポートしません。 +* 複数のリポジトリがクローンされている場合でも、ローカル CLI は常に `qmk_firmware` ツリー上で動作します。 +* ローカル CLI は virtualenv で動作しません。そのため依存関係が競合する可能性があります + +# CLI コマンド :id=cli-commands + +## `qmk cformat` + +このコマンドは clang-format を使って C コードを整形します。引数無しで実行して全てのコアコードを整形するか、コマンドラインでファイル名を渡して特定のファイルに対して実行します。 + +**使用法**: + +``` +qmk cformat [file1] [file2] [...] [fileN] +``` + +## `qmk compile` + +このコマンドにより、任意のディレクトリからファームウェアをコンパイルすることができます。 からエクスポートした JSON をコンパイルするか、リポジトリ内でキーマップをコンパイルすることができます。 + +**Configurator Exports での使い方**: + +``` +qmk compile +``` + +**キーマップでの使い方**: + +``` +qmk compile -kb -km +``` + +## `qmk flash` + +このコマンドは `qmk compile` に似ていますが、ブートローダを対象にすることもできます。ブートローダはオプションで、デフォルトでは `:flash` に設定されています。 +違うブートローダを指定するには、`-bl ` を使ってください。利用可能なブートローダの詳細については、 +を見てください。 + +**Configurator Exports での使い方**: + +``` +qmk flash -bl +``` + +**キーマップでの使い方**: + +``` +qmk flash -kb -km -bl +``` + +**ブートローダのリスト** + +``` +qmk flash -b +``` + +## `qmk config` + +このコマンドにより QMK の挙動を設定することができます。完全な `qmk config` のドキュメントについては、[CLI 設定](ja/cli_configuration.md)を見てください。 + +**使用法**: + +``` +qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] +``` + +## `qmk docs` + +このコマンドは、ドキュメントを参照または改善するために使うことができるローカル HTTP サーバを起動します。デフォルトのポートは 8936 です。 + +**使用法**: + +``` +qmk docs [-p PORT] +``` + +## `qmk doctor` + +このコマンドは環境を調査し、潜在的なビルドあるいは書き込みの問題について警告します。 + +**使用法**: + +``` +qmk doctor +``` + +## `qmk json-keymap` + +QMK Configurator からエクスポートしたものから keymap.c を生成します。 + +**使用法**: + +``` +qmk json-keymap [-o OUTPUT] filename +``` + +## `qmk kle2json` + +このコマンドにより、生の KLE データから QMK Configurator の JSON へ変換することができます。絶対パスあるいは現在のディレクトリ内のファイル名のいずれかを受け取ります。デフォルトでは、`info.json` が既に存在している場合は上書きしません。上書きするには、`-f` あるいは `--force` フラグを使ってください。 + +**使用法**: + +``` +qmk kle2json [-f] +``` + +**例**: + +``` +$ qmk kle2json kle.txt +☒ File info.json already exists, use -f or --force to overwrite. +``` + +``` +$ qmk kle2json -f kle.txt -f +Ψ Wrote out to info.json +``` + +## `qmk list-keyboards` + +このコマンドは現在 `qmk_firmware` で定義されている全てのキーボードをリスト化します。 + +**使用法**: + +``` +qmk list-keyboards +``` + +## `qmk new-keymap` + +このコマンドは、キーボードの既存のデフォルトのキーマップに基づいて新しいキーマップを作成します。 + +**使用法**: + +``` +qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] +``` + +## `qmk pyformat` + +このコマンドは `qmk_firmware` 内の python コードを整形します。 + +**使用法**: + +``` +qmk pyformat +``` + +## `qmk pytest` + +このコマンドは python のテストスィートを実行します。python コードに変更を加えた場合、これの実行が成功することを確認する必要があります。 + +**使用法**: + +``` +qmk pytest +``` diff --git a/docs/ja/cli_configuration.md b/docs/ja/cli_configuration.md new file mode 100644 index 000000000000..ce9746479c92 --- /dev/null +++ b/docs/ja/cli_configuration.md @@ -0,0 +1,126 @@ +# QMK CLI 設定 + + + +このドキュメントは `qmk config` がどのように動作するかを説明します。 + +# はじめに + +QMK CLI の設定はキーバリューシステムです。各キーはピリオドで区切られたサブコマンドと引数名で構成されます。これにより、設定キーと設定された引数の間で簡単かつ直接的な変換が可能になります。 + +## 簡単な例 + +例として、`qmk compile --keyboard clueboard/66/rev4 --keymap default` コマンドを見てみましょう。 + +設定から読み取ることができる2つのコマンドライン引数があります: + +* `compile.keyboard` +* `compile.keymap` + +これらを設定してみましょう: + +``` +$ qmk config compile.keyboard=clueboard/66/rev4 compile.keymap=default +compile.keyboard: None -> clueboard/66/rev4 +compile.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +これで、毎回キーボードとキーマップを設定することなく、`qmk compile` を実行することができます。 + +## ユーザデフォルトの設定 + +複数のコマンド間で設定を共有したい場合があります。例えば、いくつかのコマンドは引数 `--keyboard` を受け取ります。全てのコマンドでこの値を設定する代わりに、その引数を受け取る全てのコマンドで使われるユーザ値を設定することができます。 + +例: + +``` +$ qmk config user.keyboard=clueboard/66/rev4 user.keymap=default +user.keyboard: None -> clueboard/66/rev4 +user.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +# CLI ドキュメント (`qmk config`) + +`qmk config` コマンドは基礎となる設定とやり取りするために使われます。引数無しで実行すると、現在の設定を表示します。引数が指定された場合、それらは設定トークンと見なされます。設定トークンは以下の形式の空白を含まない文字列です: + + [.][=] + +## 設定値の設定 + +設定キーに等号 (=) を入れることで、設定値を設定することができます。キーは常に完全な `
.` 形式である必要があります。 + +例: + +``` +$ qmk config default.keymap=default +default.keymap: None -> default +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +## 設定値の読み込み + +設定全体、単一のキー、あるいはセクション全体の設定値を読み取ることができます。1つ以上の値を表示するために複数のキーを指定することができます。 + +### 全体の構成例 + + qmk config + +### セクション全体の例 + + qmk config compile + +### 単一キーの例 + + qmk config compile.keyboard + +### 複数キーの例 + + qmk config user compile.keyboard compile.keymap + +## 設定値の削除 + +設定値を特別な文字列 `None` に設定することで、設定値を削除することができます。 + +例: + +``` +$ qmk config default.keymap=None +default.keymap: default -> None +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +## 複数の操作 + +複数の読み込みおよび書き込み操作を1つのコマンドに組み合わせることができます。それらは順番に実行および表示されます: + +``` +$ qmk config compile default.keymap=default compile.keymap=None +compile.keymap=skully +compile.keyboard=clueboard/66_hotswap/gen1 +default.keymap: None -> default +compile.keymap: skully -> None +Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini' +``` + +# ユーザ設定オプション + +| キー | デフォルト値 | 説明 | +|-----|---------------|-------------| +| user.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) | +| user.keymap | None | キーマップ名 (例: `default`) | +| user.name | None | ユーザの github のユーザ名。 | + +# 全ての設定オプション + +| キー | デフォルト値 | 説明 | +|-----|---------------|-------------| +| compile.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) | +| compile.keymap | None | キーマップ名 (例: `default`) | +| hello.name | None | 実行時の挨拶の名前 | +| new_keyboard.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) | +| new_keyboard.keymap | None | キーマップ名 (例: `default`) | diff --git a/docs/ja/contributing.md b/docs/ja/contributing.md new file mode 100644 index 000000000000..d1b28b1f5892 --- /dev/null +++ b/docs/ja/contributing.md @@ -0,0 +1,173 @@ +# 貢献方法 + + + +👍🎉 まず、これを読み貢献する時間を作ってくれてありがとうございます!🎉👍 + +サードパーティの貢献は、QMK の成長と改善に役立ちます。プルリクエストと貢献プロセスを貢献者とメンテナの両方にとって便利で簡単なものにしたいです。この目的のために、大きな変更をせずにプルリクエストが受け入れられるように貢献者向けのガイドラインをまとめました。 + +* [プロジェクトの概要](#project-overview) +* [コーディング規約](#coding-conventions) +* [一般的なガイドライン](#general-guidelines) +* [行動規範は私にとって何を意味しますか?](#what-does-the-code-of-conduct-mean-for-me) + +## この全てを読みたくはありません!単純に質問があります! + +QMK について質問したい場合は、[OLKB Subreddit](https://reddit.com/r/olkb) あるいは [Discord](https://discord.gg/Uq7gcHh) ですることができます。 + +以下の事を覚えておいてください: + +* 誰かがあなたの質問に答えるのに数時間掛かるかもしれません。しばらくお待ちください! +* QMK に関わる全ての人が彼らの時間とエネルギーを提供しています。QMK に関する作業や質問への回答に対する報酬はありません。 +* できるだけ簡単に答えられるように質問してみてください。その方法が分からない場合は、以下に幾つかの良いガイドがあります: + * https://opensource.com/life/16/10/how-ask-technical-questions + * http://www.catb.org/esr/faqs/smart-questions.html + +# プロジェクトの概要 :id=project-overview + +QMK は主に C で書かれており、特定の機能と部品は C++ で書かれています。QMK は、キーボードの中の組み込みプロセッサ、特に AVR ([LUFA](http://www.fourwalledcubicle.com/LUFA.php)) と ARM ([ChibiOS](http://www.chibios.com)) を対象にしています。すでに Arduino プログラミングに精通している場合は、多くの概念と制限がおなじみのものです。QMK に貢献するには Arduino を使用した経験は必要ありません。 + + + +# どこで助けを得られますか? + +助けが必要であれば、[issue を開く](https://github.com/qmk/qmk_firmware/issues) か [Discord で会話する](https://discord.gg/Uq7gcHh)ことができます。 + +# どうやって貢献することができますか? + +以前にオープンソースに貢献したことはありませんか? QMK で貢献がどのように機能するかが疑問ですか? ここに簡単な説明があります! + +0. [GitHub](https://github.com) アカウントにサインアップします。 +1. 貢献するためのキーマップをまとめるか、解決に興味がある[問題を見つける](https://github.com/qmk/qmk_firmware/issues)、あるいは追加したい[機能](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)を見つけます。 +2. 問題に関連付けられているリポジトリをあなたの GitHub アカウントにフォークします。これは、`GitHub上のあなたのユーザー名/qmk_firmware` の下にリポジトリのコピーを持つことを意味します。 +3. `git clone https://github.com/GitHub上のあなたのユーザー名/repository-name.git` を使ってローカルマシンにリポジトリをクローンします。 +4. 新しい機能に取り組んでいる場合は、issue を開きこれから行う作業について話し合うことを検討してください。 +5. `git checkout -b branch-name-here` を使って修正用の新しいブランチを作成します。 +6. 解決しようとしている問題、あるいは追加したい機能について適切な変更を加えます。 +7. `git add insert-paths-of-changed-files-here` を使って変更されたファイルの内容を git がプロジェクトの状態を管理するために使用する "snapshot"、インデックスとしても知られている、に追加します。 +8. `git commit -m "Insert a short message of the changes made here"` を使って、説明的なメッセージとともにインデックスの内容を保存します。 +9. `git push origin branch-name-here` を使って GitHub 上のリポジトリに変更をプッシュします。 +10. プルリクエストを [QMK Firmware](https://github.com/qmk/qmk_firmware/pull/new/master) にサブミットします。 +11. 行われた変更の簡単な説明と、変更に関する問題またはバグ番号を使って、プルリクエストにタイトルを付けます。例えば、issue に "Added more log outputting to resolve #4352" のようなタイトルをつけることができます。 +12. プルリクエストの説明では、行った変更、行ったプルリクエストに存在すると思われる問題、およびメンテナに対する質問を説明します。プルリクエストが完ぺきではない場合(プルリクエストが無い場合)でも問題ありません。レビュワーが問題の修正と改善を手伝います。 +13. プルリクエストがメンテナによってレビューされるのを待ちます。 +14. レビューをしているメンテナが変更を推奨する場合は、プルリクエストに変更を加えます。 +15. プルリクエストがマージされた後で成功を祝います! + +# コーディング規約 :id=coding-conventions + +私たちのスタイルのほとんどは簡単に理解できます。C あるいは Python のいずれかに精通している場合は、ローカルスタイルにそれほど問題はないはずです。 + +* [コーディング規約 - C](ja/coding_conventions_c.md) +* [コーディング規約 - Python](ja/coding_conventions_python.md) + +# 一般的なガイドライン :id=general-guidelines + +QMK には幾つかの異なるタイプの変更があり、それぞれ異なるレベルの厳密さが必要です。どのような種類の変更を行っても、次のガイドラインに留意してください。 + +* PR を論理単位に分割します。例えば、2つの個別の機能をカバーする1つの PR を送信するのではなく、代わりに機能ごとに個別の PR をサブミットします。 +* コミットする前に、`git diff --check` を使って不要な空白を確認します。 +* コードの変更が実際にコンパイルされることを確認してください。 + * キーマップ: `make keyboard:your_new_keymap` がエラーを返さないことを確認してください。 + * キーボード: `make keyboard:all` がエラーを返さないことを確認してください。 + * コア: `make all` がエラーを返さないことを確認してください。 +* コミットメッセージがそれ自体で理解できることを確認してください。最初の行に短い説明(70文字以内)を入れ、2行目は空にし、3行目以降では必要に応じてコミットを詳細に説明する必要があります。例: + +``` +kerpleplork の fronzlebop を調整します + +kerpleplork はエラーコード 23 で連続的に失敗していました。根本的な原因は fronzlebop 設定で、これにより kerpleplork はN回の繰り返しごとにアクティブになります。 + +私が使用できるデバイスの限られた実験では、kerpleplork の混乱を避けるために 7 は十分高い値であることを示していますが、念のため ARM デバイスを持つ人たちからフィードバックを得たいです。 +``` + +!> **重要:** デフォルト以外のキーマップ、ユーザスペースおよびレイアウトのようなユーザコードへのバグ修正あるいは改善に貢献したい場合は、PR にコードの元の提出者にタグをつけてください。Git と GitHub のスキルレベルに関係なく、多くのユーザは知らないうちにコードが変更されることに混乱したりイライラしたりするかもしれません。 + +## ドキュメント + +ドキュメントは QMK への貢献を始める最も簡単な方法の1つです。ドキュメントが間違っているか不完全な場所を見つけ、これらを修正するのは簡単です!私たちもドキュメントを編集する人を非常に必要としています。編集するスキルがあるが、どこにどのように飛び乗ればいいのか分からない場合は、[助けをもとめて](#where-can-i-go-for-help)ください! + +全てのドキュメントは `qmk_firmware/docs` ディレクトリの中にあります。あるいは web ベースのワークフローを使いたい場合は、http://docs.qmk.fm/ の各ページの上部にある "Suggest An Edit" をクリックすることができます。 + +ドキュメントの中にコードの例を提供する場合は、ドキュメント内の他の場所で使用されている命名規則を順守してください。例えば、一貫性を保つために、`my_layers` あるいは `my_keycodes` として列挙型を標準化します: + +```c +enum my_layers { + _FIRST_LAYER, + _SECOND_LAYER +}; + +enum my_keycodes { + FIRST_LAYER = SAFE_RANGE, + SECOND_LAYER +}; +``` + +### ドキュメントのプレビュー + +開発環境をセットアップした場合は、プルリクエストを開く前に以下のコマンドを `qmk_firmware/` フォルダから実行することで、あなたの変更をプレビューすることができます: + + ./bin/qmk docs + +または、Python 3 のみがインストールされている場合: + + python3 -m http.server 8936 + +その後、ウェブブラウザで、`http://localhost:8936/` を表示します。 + +## キーマップ + +ほとんどの初めての QMK 貢献者は、個人のキーマップから始めます。キーマップの標準はかなりカジュアルなものにしようとしています(キーマップは結局のところ作成者の性格を反映しています)が、他の人があなたのキーマップを簡単に見つけて学ぶことができるように、これらのガイドラインに従うようにお願いします。 + +* [the template](documentation_templates.md) を使って `readme.md` を書きます。 +* 全てのキーマップの PR は squash されるため、コミットがどのように squash されるかを気にする場合は、自分で行う必要があります。 +* キーマップの PR に機能をまとめないでください。最初に機能をサブミットし、次にキーマップのための2つ目の PR をサブミットします。 +* `Makefile` をキーマップフォルダに含めないでください(もう使われていません)。 +* ファイルヘッダの著作権を更新します (`%YOUR_NAME%` を探します) + +## キーボード + +キーボードは QMK の存在理由です。一部のキーボードはコミュニティによって管理されていますが、他のキーボードはそれぞれのキーボードを作成する責任者によって管理されています。`readme.md` を見るとそのキーボードを管理しているのが誰かが分かります。特定のキーボードに関する質問がある場合、[Issue を開いて](https://github.com/qmk/qmk_firmware/issues)質問にメンテナをタグ付けしてください。(訳注: タグ付け は [メンションする](https://help.github.com/ja/github/writing-on-github/basic-writing-and-formatting-syntax#mentioning-people-and-teams) という意味です。) + +また以下のガイドラインに従うことをお願いします: + +* [the template](ja/documentation_templates.md) を使って `readme.md` を書きます。 +* コミットの数を適切に保ってください。そうでなければあなたの PR を squash します。 +* コア機能を新しいキーボードにまとめないでください。最初に機能をサブミットし、次にキーボード用に別の PR をサブミットしてください。 +* `.c`/`.h` ファイルにすぐ上の親フォルダに従って名前を付けます。例えば、`/keyboards///.[ch]` +* `Makefile` をキーボードフォルダに含めないでください(もう使われていません) +* ファイルヘッダの著作権を更新します (`%YOUR_NAME%` を探します) + +## Quantum/TMK コア + +新しい機能をビルドするために多くの作業を行う前に、最適な方法で実装していることを確認する必要があります。[QMK の理解](ja/understanding_qmk.md)を読むことで、QMK の基本的な理解を得ることができます。これはあなたを QMK のプログラムフローのツアーに連れて行きます。ここから、あなたのアイデアを実装するための最良の方法の感覚をつかむために、私たちと話す必要があります。これを行うには主に2つの方法があります: + +* [Discord でのチャット](https://discord.gg/Uq7gcHh) +* [Issue を開く](https://github.com/qmk/qmk_firmware/issues/new) + +機能とバグ修正の PR は全てのキーボードに影響します。また、私たちは QMK の再編も進めています。このため、実装が行われる前に特に重要な変更について議論することが特に重要です。最初に私たちと話をせずに PR を開いた場合、あなたの選択が私たちの計画した方向とうまく合わない場合は幾つかの大きな再作業を行う覚悟をしてください。 + +機能やバグの修正に取り組む時に留意すべき幾つかの事があります。 + +* **デフォルトで無効** - QMK がサポートするほとんどのチップでメモリがかなり制限されており、現在のキーマップが壊れていないことが重要です。ですので、あなたの機能をオフにするのではなく**オン**にするようにしてください。デフォルトでオンにすべき場合、あるいはコードのサイズを小さくする必要がある場合は、相談してください。 +* **サブミットする前にローカルでコンパイル** - これが明白であることを願っていますが、コンパイルする必要があります。私たちの Travis システムは全ての問題をキャッチしますが、結果が返ってくるのを待つ代わりに幾つかのキーボードをローカルでコンパイルする方が一般的に速いです。 +* **リビジョンと異なるチップベースを考慮** - 僅かに異なる設定、さらには異なるチップベースを可能にするリビジョンを持つキーボードが幾つかあります。ARM および AVR でサポートされる機能を作成する、あるいは動作しないプラットフォームでは自動的に無効化するようにしてください。 +* **機能の説明** - 新しいファイルあるいは既存のファイルの一部として、`docs/` の中に文章化します。文章化しないと、他の人はあなたの苦労から利益を得ることができません。 + +また以下のガイドラインに従うことをお願いします: + +* コミットの数を適切に保ってください。そうでなければあなたの PR を squash します。 +* キーボードあるいはキーマップをコアの変更にまとめないでください。コアの変更を最初にサブミットしてください。 +* 機能のための[ユニット テスト](ja/unit_testing.md)を書いてください。 +* 編集しているファイルのスタイルに従ってください。スタイルが明確でないか、スタイルが混在している場合は、上記の[コーディング規約](#coding-conventions)に準拠する必要があります。 + +## リファクタリング + +QMK で物事がどのようにレイアウトされるかについて明確なビジョンを維持するために、私たちはリファクタリングを詳細に計画し、変更をする協力者がいます。リファクタリングのアイデアあるいは提案がある場合は、[issue を開いてください](https://github.com/qmk/qmk_firmware/issues)。QMK を改善する方法についてお話ししたいと思います。 + +# 行動規範は私にとって何を意味しますか? :id=what-does-the-code-of-conduct-mean-for-me + +私たちの[行動規範](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md)は、身元に関係なくあなたがプロジェクトの全員を敬意と礼儀を持って扱う責任があることを意味します。あなたが行動規範に記載されている不適切な行動やコメントの被害者である場合は、私たちはあなたのためにここにおり、私たちのコードに従って虐待者が適切に懲戒されるように最善を尽くします。 diff --git a/docs/ja/getting_started_getting_help.md b/docs/ja/getting_started_getting_help.md new file mode 100644 index 000000000000..83fbdc7bdead --- /dev/null +++ b/docs/ja/getting_started_getting_help.md @@ -0,0 +1,20 @@ +# 助けを得る + + + +QMK に関して助けを得るための多くのリソースがあります。 + +## リアルタイム チャット + +メインの [Discord server](https://discord.gg/Uq7gcHh) で QMK の開発者とユーザを見つけることができます。サーバには、ファームウェア、Toolbox、ハードウェアおよび Configurator についてチャットするための特定のチャンネルがあります。 + +## OLKB Subreddit + +公式の QMK フォーラムは [reddit.com](https://reddit.com) の [/r/olkb](https://reddit.com/r/olkb) です。 + +## Github Issues + +[GitHub で issue](https://github.com/qmk/qmk_firmware/issues) を開くことができます。issue が長期的な議論あるいはデバッグを必要とする場合は、特に便利です。 diff --git a/docs/ja/getting_started_github.md b/docs/ja/getting_started_github.md new file mode 100644 index 000000000000..e7af36efa4f1 --- /dev/null +++ b/docs/ja/getting_started_github.md @@ -0,0 +1,64 @@ +# QMK で Github を使う方法 + + + +Github は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。 + +?> このガイドでは、あなたがコマンドラインでの実行にある程度慣れており、システムに git がインストールされていることを前提にしています。 + +[QMK Github ページ](https://github.com/qmk/qmk_firmware)を開くと、右上に "Fork" というボタンが見えます: + +![Git でのフォーク](http://i.imgur.com/8Toomz4.jpg) + +あなたが組織の一員である場合は、どのアカウントにフォークするかを選択する必要があります。ほとんどの場合、あなたの個人のアカウントにフォークしたいでしょう。フォークが完了したら(しばらく時間が掛かる場合があります)、"Clone or Download" ボタンをクリックします: + +![Git からダウンロード](http://i.imgur.com/N1NYcSz.jpg) + +必ず "HTTPS" を選択し、リンクを選択してコピーします: + +![HTTPS リンク](http://i.imgur.com/eGO0ohO.jpg) + +ここから、`git clone` をコマンドラインに入力し、リンクを貼り付けます: + +``` +user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +ローカルマシンに QMK のフォークができるので、キーマップの追加、コンパイル、キーボードへの書き込みができます。変更に満足したら、以下のようにそれらをフォークへ追加、コミットおよびプッシュすることができます: + +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +あなたの変更は今では Github 上のフォークにあります - フォーク (`https://github.com//qmk_firmware`)に戻ると、"New Pull Request" ボタンをクリックすることで新しいプルリクエストを作成することができます: + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +ここでは、コミットした内容を正確に確認することができます - 全て良いように見える場合は、"Create Pull Request" をクリックすることで最終的に承認することができます: + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +サブミットの後で、私たちはあなたの変更について話し、変更を依頼し、最終的にそれを受け入れるでしょう!QMK に貢献してくれてありがとう :) diff --git a/docs/ja/getting_started_introduction.md b/docs/ja/getting_started_introduction.md new file mode 100644 index 000000000000..2752ea6a21d4 --- /dev/null +++ b/docs/ja/getting_started_introduction.md @@ -0,0 +1,65 @@ +# はじめに + + + +このページでは、QMK プロジェクトで作業するために知っておくべき基本的な情報について説明しようと思います。Unix シェルの操作に精通していることを前提としていますが、C について、または make を使ったコンパイルについて精通しているとは想定していません。 + +## 基本的な QMK の構造 + +QMK は [Jun Wako](https://github.com/tmk) の [tmk_keyboard](https://github.com/tmk/tmk_keyboard) プロジェクトのフォークです。変更された元の TMK コードは、`tmk_core` フォルダで見つけることができます。プロジェクトへの QMK の追加は、`quantum` フォルダで見つけることができます。キーボードプロジェクトは `handwired` および `keyboard` フォルダで見つけることができます。 + +### ユーザスペースの構造 + +`users` フォルダ内は各ユーザのためのディレクトリです。これはユーザがキーボード間で使うかもしれないコードを置くためのフォルダです。詳細は[ユーザスペース機能](ja/feature_userspace.md) のドキュメントを見てください。 + +### キーボードプロジェクトの構造 + +`keyboards` フォルダ、そのサブフォルダ `handwired`、ベンダと製品のサブディレクトリ (例えば、`clueboard`) の中には、各キーボードプロジェクトのためのディレクトリ (例えば `qmk_firmware/keyboards/clueboard/2x1800`) があります。その中には、以下の構造があります: + +* `keymaps/`: ビルドできる様々なキーマップ +* `rules.mk`: デフォルトの "make" オプションを設定するファイル。このファイルを直接編集しないでください。代わりにキーマップ固有の `rules.mk` を使ってください。 +* `config.h`: デフォルトのコンパイル時のオプションを設定するファイル。このファイルを直接編集しないでください。代わりにキーマップ固有の `config.h` を使ってください。 +* `info.json`: QMK Configurator のためのレイアウトの設定に使われるファイル。詳細は [Configurator サポート](ja/reference_configurator_support.md)を見てください。 +* `readme.md`: キーボードの簡単な概要 +* `.h`: このファイルは、キーボードのスイッチマトリックスに対してキーボードレイアウトが定義されるファイルです。 +* `.c`: このファイルには、キーボードのためのカスタムコードがあります。 + +プロジェクトの構造についての詳細は、[QMK キーボードガイドライン](ja/hardware_keyboard_guidelines.md)を見てください。 + +### キーマップ構造 + +全てのキーマップフォルダには、以下のファイルがあります。`keymap.c` だけが必須で、残りのファイルが見つからない場合は、デフォルトのオプションが選択されます。 + +* `config.h`: キーマップを設定するためのオプション +* `keymap.c`: 全てのキーマップコード。必須 +* `rules.mk`: 有効になっている QMK の機能 +* `readme.md`: キーマップの説明。他の人が使う方法および機能の説明。imgur のようなサービスに画像をアップロードしてください。 + +# `config.h` ファイル + +3つの `config.h` の場所が考えられます: + +* キーボード (`/keyboards//config.h`) +* ユーザスペース (`/users//config.h`) +* キーマップ (`/keyboards//keymaps//config.h`) + +ビルドシステムは自動的に上の順に config ファイルを取得します。前の `config.h` で設定された設定を上書きしたい場合は、変更したい設定の準備のために最初に定型コードを置く必要があります。 + +``` +#pragma once +``` + +次に、前の `config.h` ファイルの設定を上書きするために、設定を `#undef` し再び `#define` する必要があります。 + +定型コードと設定は、以下のようになります: + +``` +#pragma once + +// ここに上書きします! +#undef MY_SETTING +#define MY_SETTING 4 +``` From 4ebecc424e7f4beeb6985faf0ed9199823fa648f Mon Sep 17 00:00:00 2001 From: Dmitry Nosachev Date: Tue, 17 Dec 2019 08:42:03 +0300 Subject: [PATCH 071/973] [Keyboard] Magnavox Videowriter conversion with Pro Micro (#7634) * Magnavox Videowriter convertion * Magnavox Videowriter: readme, images * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/README.md * Update keyboards/handwired/videowriter/README.md * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/info.json * Update keyboards/handwired/videowriter/info.json * suggested changes * suggested changes * fix comment symbol * Update keyboards/handwired/videowriter/rules.mk * Update keyboards/handwired/videowriter/rules.mk * Update keyboards/handwired/videowriter/rules.mk --- keyboards/handwired/videowriter/README.md | 61 ++++++++ keyboards/handwired/videowriter/config.h | 140 ++++++++++++++++++ keyboards/handwired/videowriter/info.json | 20 +++ .../videowriter/keymaps/default/keymap.c | 107 +++++++++++++ .../videowriter/keymaps/default/readme.md | 1 + .../videowriter/keymaps/oleg/config.h | 20 +++ .../videowriter/keymaps/oleg/keymap.c | 108 ++++++++++++++ .../videowriter/keymaps/oleg/rules.mk | 4 + keyboards/handwired/videowriter/rules.mk | 32 ++++ keyboards/handwired/videowriter/videowriter.c | 17 +++ keyboards/handwired/videowriter/videowriter.h | 59 ++++++++ 11 files changed, 569 insertions(+) create mode 100644 keyboards/handwired/videowriter/README.md create mode 100644 keyboards/handwired/videowriter/config.h create mode 100644 keyboards/handwired/videowriter/info.json create mode 100644 keyboards/handwired/videowriter/keymaps/default/keymap.c create mode 100644 keyboards/handwired/videowriter/keymaps/default/readme.md create mode 100644 keyboards/handwired/videowriter/keymaps/oleg/config.h create mode 100644 keyboards/handwired/videowriter/keymaps/oleg/keymap.c create mode 100644 keyboards/handwired/videowriter/keymaps/oleg/rules.mk create mode 100644 keyboards/handwired/videowriter/rules.mk create mode 100644 keyboards/handwired/videowriter/videowriter.c create mode 100644 keyboards/handwired/videowriter/videowriter.h diff --git a/keyboards/handwired/videowriter/README.md b/keyboards/handwired/videowriter/README.md new file mode 100644 index 000000000000..ef8471aa91ea --- /dev/null +++ b/keyboards/handwired/videowriter/README.md @@ -0,0 +1,61 @@ +# QMK-based firmware for Magnavox Videowriter keyboard +Matrix layout is based on info from this [article](https://deskthority.net/workshop-f7/magnavox-videowriter-keyboard-cleanup-and-conversion-t19687.html). + +![Videowriter](https://i.imgur.com/zNTHmZa.jpg) + +Magnavox Videowriter keyboard conversion project: direct connection of Pro Micro to the matrix. + +* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev) +* Hardware Supported: Alps-based [Magnavox Videowriter keyboard](https://deskthority.net/wiki/Magnavox_VideoWriter), Pro Micro 16MHz 5V MCU board (you can use any MCU which is supported by QMK and has 18 or more IO). + +Make example for this keyboard (after setting up your build environment): + + make handwired/videowriter: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). + +# Modding + +## Matrix + +Videowriter has 8x10 matrix: + +| col/row | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | +|---------|----------|-----------|-----------|-----------|----------|-----------|-----------|---------| +| 0 | | | | | | | 51 LShift | 39 Caps | +| 1 | 08 Copy | 07 Find | 06 Split | 05 Center | 04 Page | 03 Spell | 02 Print | 01 Menu | +| 2 | 16 5 | 15 4 | 14 3 | 13 2 | 12 1 | 11 Delete | 10 GoTo | 09 Move | +| 3 | 24 BkSpc | 23 Equals | 22 Minus | 21 0 | 20 9 | 19 8 | 18 7 | 17 6 | +| 4 | 32 U | 31 Y | 30 T | 29 R | 28 E | 27 W | 26 Q | 25 Tab | +| 5 | 41 S | 40 A | 38 Return | 37 ] | 36 [ | 35 P | 34 O | 33 I | +| 6 | 49 ; | 48 L | 47 K | 46 J | 45 H | 44 G | 43 F | 42 D | +| 7 | 58 M | 57 N | 56 B | 55 V | 54 C | 53 X | 52 Z | 50 " | +| 8 | 67 Left | 66 Up | 65 Insert | 64 Space | 63 Style | 61 / | 60 . | 59 , | +| 9 | | | 62 RShift | 72 Undo | 71 Help | 70 Do | 69 Right | 68 Down | + +## Separating Shift keys +Initially left and right Shift keys are connected in parrallel. You need to cut the traces from right Shift (switch 62) and wire it to column 2 (switch 65, right pin) and row 9 (switch 71, bottom pin). + +![Right shift](https://i.imgur.com/ttdTVtC.jpg) + +## Stock components removal +SN74LS145N IC (BCD-to-decimal decoder, drives matrix rows), NEC D8049HC IC (MCU, drives matrix columns) and resistor array need to be desoldered from the PCB. You need to shorten the 4 diodes (D2–D5) in the bottom right corner of the PCB (solder a wire between their pins). +I've also removed two electrolytic capacitors and some ceramic capacitors just to free an additional space. + +Optional: add diodes between each switch and corresponding row for NKRO. If you choose not to add them, create `config.h` file in your personal keymap folder and add `#define MATRIX_HAS_GHOST` to it. + +## Pro Micro +Suggested mount position for the Pro Micro: + +![PCB bottom side](https://i.imgur.com/bb7zZD0.jpg) + +1. Solder two 8-pin headers to the Pro Micro (pin D1-B5 on the left side and pins F4-B6 on the right side). +2. Solder the Pro Micro to the Videowriter's PCB. +3. Solder 6 wire bridges (pink color on the photo). +4. By this point rows 0-4 and all columns will be already in place. +5. Connect rows 5-9 (see right side of the PCB) to the corresponding pins of the Pro Micro using additional wires. +6. Optional: connect a push button between Reset and Ground pins. + +![PCB top side](https://i.imgur.com/PVEXIxj.jpg) + +Compile and flash the firmware. Use matrix [debug mode](https://docs.qmk.fm/#/feature_command) if something is wrong. diff --git a/keyboards/handwired/videowriter/config.h b/keyboards/handwired/videowriter/config.h new file mode 100644 index 000000000000..d392564eb9e2 --- /dev/null +++ b/keyboards/handwired/videowriter/config.h @@ -0,0 +1,140 @@ +/* +Copyright 2019 DmNosachev + +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 Magnavox +#define PRODUCT Videowriter +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#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 { D7, C6, D1, D0, D4, D2, D3, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Uncomment this if you didn't install diodes */ +//#define MATRIX_HAS_GHOST + +/* 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 + + +/* + * 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/handwired/videowriter/info.json b/keyboards/handwired/videowriter/info.json new file mode 100644 index 000000000000..194b558bef55 --- /dev/null +++ b/keyboards/handwired/videowriter/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "videowriter", + "url": "https://deskthority.net/viewtopic.php?f=7&t=20210", + "maintainer": "DmNosachev", + "width": 16, + "height": 7.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"menu", "x":1, "y":1, "h":0.75}, {"label":"print", "x":2, "y":1, "h":0.75}, {"label":"spell", "x":3, "y":1, "h":0.75}, {"label":"page", "x":4.5, "y":1, "h":0.75}, {"label":"center", "x":5.5, "y":1, "h":0.75}, {"label":"split", "x":6.5, "y":1, "h":0.75}, {"label":"find", "x":7.5, "y":1, "h":0.75}, {"label":"copy", "x":9, "y":1, "h":0.75}, {"label":"move", "x":10, "y":1, "h":0.75}, {"label":"go to", "x":11, "y":1, "h":0.75}, + {"label":"left", "x":13, "y":0.5}, {"label":"down", "x":14, "y":1}, {"label":"up", "x":14, "y":0}, {"label":"right", "x":15, "y":0.5}, + {"label":"del", "x":0, "y":2.5}, {"label":"1", "x":1, "y":2.5}, {"label":"2", "x":2, "y":2.5}, {"label":"3", "x":3, "y":2.5}, {"label":"4", "x":4, "y":2.5}, {"label":"5", "x":5, "y":2.5}, {"label":"6", "x":6, "y":2.5}, {"label":"7", "x":7, "y":2.5}, {"label":"8", "x":8, "y":2.5}, {"label":"9", "x":9, "y":2.5}, {"label":"0", "x":10, "y":2.5}, {"label":"-", "x":11, "y":2.5}, {"label":"=", "x":12, "y":2.5}, {"label":"backspace", "x":13, "y":2.5, "w":1.5}, {"label":"do", "x":15, "y":2.5, "h":1.33}, + {"label":"tab", "x":0, "y":3.5, "w":1.5}, {"label":"Q", "x":1.5, "y":3.5}, {"label":"W", "x":2.5, "y":3.5}, {"label":"E", "x":3.5, "y":3.5}, {"label":"R", "x":4.5, "y":3.5}, {"label":"T", "x":5.5, "y":3.5}, {"label":"Y", "x":6.5, "y":3.5}, {"label":"U", "x":7.5, "y":3.5}, {"label":"I", "x":8.5, "y":3.5}, {"label":"O", "x":9.5, "y":3.5}, {"label":"P", "x":10.5, "y":3.5}, {"label":"[", "x":11.5, "y":3.5}, {"label":"]", "x":12.5, "y":3.5}, {"label":"help", "x":15, "y":3.833, "h":1.33}, + {"label":"caps lock", "x":0, "y":4.5, "w":1.75}, {"label":"A", "x":1.75, "y":4.5}, {"label":"S", "x":2.75, "y":4.5}, {"label":"D", "x":3.75, "y":4.5}, {"label":"F", "x":4.75, "y":4.5}, {"label":"G", "x":5.75, "y":4.5}, {"label":"H", "x":6.75, "y":4.5}, {"label":"J", "x":7.75, "y":4.5}, {"label":"K", "x":8.75, "y":4.5}, {"label":"L", "x":9.75, "y":4.5}, {"label":";", "x":10.75, "y":4.5}, {"label":"'", "x":11.75, "y":4.5}, {"label":"return", "x":12.75, "y":4.5, "w":1.75}, {"label":"undo", "x":15, "y":5.167, "h":1.33}, + {"label":"shift", "x":0, "y":5.5, "w":2.25}, {"label":"Z", "x":2.25, "y":5.5}, {"label":"X", "x":3.25, "y":5.5}, {"label":"C", "x":4.25, "y":5.5}, {"label":"V", "x":5.25, "y":5.5}, {"label":"B", "x":6.25, "y":5.5}, {"label":"N", "x":7.25, "y":5.5}, {"label":"M", "x":8.25, "y":5.5}, {"label":"<", "x":9.25, "y":5.5}, {"label":">", "x":10.25, "y":5.5}, {"label":"?", "x":11.25, "y":5.5}, {"label":"shift", "x":12.25, "y":5.5, "w":2.25}, + {"label":"style", "x":1.25, "y":6.5, "w":1.5}, {"label":"space", "x":2.75, "y":6.5, "w":9}, {"label":"insert", "x":11.75, "y":6.5, "w":1.5} + ] + } + } +} diff --git a/keyboards/handwired/videowriter/keymaps/default/keymap.c b/keyboards/handwired/videowriter/keymaps/default/keymap.c new file mode 100644 index 000000000000..527ee6fffc9a --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/default/keymap.c @@ -0,0 +1,107 @@ +/* Copyright 2019 DmNosachev + * + * 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, + _FN1 +}; + +// Example of custom keycodes used by macros in process_record_user +/* +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |vol- |vol+| mute| | prev| play| stop| next| |prsc|scrlk|ins| |left|down|right| + * |---------------------------------------------------------------------------------------| + * | ~`| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| fn1 | + * |---------------------------------------------------------------------------------------| + * |Tab/fn1| Q | W | E | R | T | Y | U | I | O | P | [ | ] | | menu| + * |---------------------------------------------------------------------------------------| + * |Ctrl | A | S | D | F | G | H | J | K | L | ; | " | enter ||\ctrl| + * |---------------------------------------------------------------------------------------' + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | + * `---------------------------------------------------------------------------------' + * | Alt | Space | Caps | + * `------------------------------------------------------------------' + */ + [_BASE] = LAYOUT( + KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, KC_PSCR, KC_SLCK, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + 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_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_PGDN, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, RCTL_T(KC_BSLS), + 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_SPC, KC_RALT), +/* + * + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. |pgup| | + * | | | | | | | | |sect| | |reset|pause| |home|pgdn| end | + * |---------------------------------------------------------------------------------------| + * |Esc| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | del | | + * |---------------------------------------------------------------------------------------| + * | | mlb | mup | mrb | ms+ | | | | up | | | | | | gui | + * |---------------------------------------------------------------------------------------| + * | | ml | mdn | mr | ms- | | | left| down|right| | | | | + * |---------------------------------------------------------------------------------------' + * | | | | | | | | | | | | | + * `---------------------------------------------------------------------------------' + * | | | | + * `------------------------------------------------------------------' + */ + [_FN1] = 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_HOME, + _______, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; + +/* macros template (example) +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/\n"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +*/ + diff --git a/keyboards/handwired/videowriter/keymaps/default/readme.md b/keyboards/handwired/videowriter/keymaps/default/readme.md new file mode 100644 index 000000000000..05b0f039f9db --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for videowriter diff --git a/keyboards/handwired/videowriter/keymaps/oleg/config.h b/keyboards/handwired/videowriter/keymaps/oleg/config.h new file mode 100644 index 000000000000..3f2896a66983 --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/oleg/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 DmNosachev + * + * 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 + +// Have't added any diodes in this particular convertion project +#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/videowriter/keymaps/oleg/keymap.c b/keyboards/handwired/videowriter/keymaps/oleg/keymap.c new file mode 100644 index 000000000000..76587f6f733a --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/oleg/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2019 DmNosachev + * + * 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, + _FN1 +}; + +// Example of custom keycodes used by macros in process_record_user +/* +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |vol- |vol+| mute| | prev| play| stop| next| |prsc|scrlk|ins| |left|down|right| + * |---------------------------------------------------------------------------------------| + * | ~`| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| fn1 | + * |---------------------------------------------------------------------------------------| + * |Tab/fn1| Q | W | E | R | T | Y | U | I | O | P | [ | ] | | menu| + * |---------------------------------------------------------------------------------------| + * |Ctrl | A | S | D | F | G | H | J | K | L | ; | " | enter ||\ctrl| + * |---------------------------------------------------------------------------------------' + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | + * `---------------------------------------------------------------------------------' + * | Alt | Space | Caps | + * `------------------------------------------------------------------' + */ + + [_BASE] = LAYOUT( + KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, KC_PSCR, KC_SLCK, KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + 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, MO(_FN1), + LT(_FN1, 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_APP, + 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, RCTL_T(KC_BSLS), + 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_LALT, KC_SPC, KC_CAPS + ), + +/* + * sect = section sign, Unicode 0x00A7 + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. |pgup| | + * | | | | | | | | |sect| | |reset|pause| |home|pgdn| end | + * |---------------------------------------------------------------------------------------| + * |Esc| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | del | | + * |---------------------------------------------------------------------------------------| + * | | mlb | mup | mrb | ms+ | | | | up | | | | | | gui | + * |---------------------------------------------------------------------------------------| + * | | ml | mdn | mr | ms- | | | left| down|right| | | | | + * |---------------------------------------------------------------------------------------' + * | | | | | | | | | | | | | + * `---------------------------------------------------------------------------------' + * | | | | + * `------------------------------------------------------------------' + */ + + [_FN1] = LAYOUT( + _______, _______, _______, _______, _______, _______, UC(0x00A7), _______, RESET, KC_PAUS, KC_HOME, KC_PGDN, KC_PGUP, 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, _______, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U ,_______, _______, _______, KC_UP, _______, _______, _______, _______, KC_RGUI, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ + ) +}; + +/* macros template (example) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case USECT: + if (record->event.pressed) { + // when keycode USECT is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode USECT is released + } + break; + } + return true; +} +*/ + + +void matrix_init_user(void) { + set_unicode_input_mode(UC_WIN); +} + diff --git a/keyboards/handwired/videowriter/keymaps/oleg/rules.mk b/keyboards/handwired/videowriter/keymaps/oleg/rules.mk new file mode 100644 index 000000000000..0065be986b07 --- /dev/null +++ b/keyboards/handwired/videowriter/keymaps/oleg/rules.mk @@ -0,0 +1,4 @@ +# this particular convertion project uses Pro Micro with DFU bootloader instead of Caterina +BOOTLOADER = lufa-dfu + +UNICODE_ENABLE = yes diff --git a/keyboards/handwired/videowriter/rules.mk b/keyboards/handwired/videowriter/rules.mk new file mode 100644 index 000000000000..7b326cc31948 --- /dev/null +++ b/keyboards/handwired/videowriter/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 = 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 diff --git a/keyboards/handwired/videowriter/videowriter.c b/keyboards/handwired/videowriter/videowriter.c new file mode 100644 index 000000000000..5f0f3d7122cd --- /dev/null +++ b/keyboards/handwired/videowriter/videowriter.c @@ -0,0 +1,17 @@ +/* Copyright 2019 DmNosachev + * + * 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 "videowriter.h" diff --git a/keyboards/handwired/videowriter/videowriter.h b/keyboards/handwired/videowriter/videowriter.h new file mode 100644 index 000000000000..f06a5d50aad7 --- /dev/null +++ b/keyboards/handwired/videowriter/videowriter.h @@ -0,0 +1,59 @@ +/* Copyright 2019 DmNosachev + * + * 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 + +/* + * ,---------------------------------------------------------------------------------------. + * | ,----------------. ,-----------------------. ,--------------. | up | | + * | |menu|print|spell| |page|center|split|find | |copy|move|goto| |left|down|right| + * |---------------------------------------------------------------------------------------| + * |del| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSp| do | + * |---------------------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | help| + * |-----------------------------------------------------------------------------' |-----| + * |Caps | A | S | D | F | G | H | J | K | L | ; | " | return | undo| + * |---------------------------------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | < | > | ? | Shift | | + * '---------------------------------------------------------------------------------------' + * | style| Space | insert| + * '------------------------------------------------------------------' + */ + +#define LAYOUT( \ + K17, K16, K15, K14, K13, K12, K11, K10, K27, K26, K80, K97, K81, K96, \ + K25, K24, K23, K22, K21, K20, K37, K36, K35, K34, K33, K32, K31, K30, K95, \ + K47, K46, K45, K44, K43, K42, K41, K40, K57, K56, K55, K54, K53, K94, \ + K07, K51, K50, K67, K66, K65, K64, K63, K62, K61, K60, K77, K52, K93, \ + K06, K76, K75, K74, K73, K72, K71, K70, K87, K86, K85, K92, \ + K84, K83, K82 \ +) \ +{ \ + { XXX, XXX, XXX, XXX, XXX, XXX, 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, K37 }, \ + { K40, K41, 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, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { XXX, XXX, K92, K93, K94, K95, K96, K97 } \ +} From 67054fc3806953feb34adbf9a272fcfcaace6d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Wilhelmsen?= <46304257+oeywil@users.noreply.github.com> Date: Tue, 17 Dec 2019 23:06:48 +0100 Subject: [PATCH 072/973] Ported J80 to QMK (#7488) * ported J80 to QMK * added default ISO layout * removed optional override functions * set bootmagic to lite * removed comment * added tkl_ansi and tkl_iso layouts * updated vendor and device name * set ANSI layout as default and split iso to separate folder * removed empty file * Update keyboards/J80/info.json Added comma Co-Authored-By: fauxpark * Update keyboards/J80/keymaps/default/keymap.c Removed backslash Co-Authored-By: fauxpark * Update keyboards/J80/keymaps/default/keymap.c Removed backslash. Co-Authored-By: fauxpark * removed comments and backslash, fixed JSON formatting * Rename J80.h to j80.h * Rename keyboards/J80 to keyboards/j80 * renamed folder to lowercase * added key definition for reset key * added define for KC_NO to underscores * Added backlight and lock LED support * Fixed BACKLIGHT_PIN * Fixed typo * Added define for bootmagic lite and description in readme * Update keyboards/j80/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/j80.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/j80.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/j80/keymaps/default/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Apply suggestions from code review Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Added full right shift layouts --- keyboards/j80/config.h | 55 +++ keyboards/j80/info.json | 397 ++++++++++++++++++++ keyboards/j80/j80.c | 26 ++ keyboards/j80/j80.h | 115 ++++++ keyboards/j80/keymaps/default/keymap.c | 59 +++ keyboards/j80/keymaps/default/readme.md | 1 + keyboards/j80/keymaps/default_iso/keymap.c | 59 +++ keyboards/j80/keymaps/default_iso/readme.md | 1 + keyboards/j80/readme.md | 21 ++ keyboards/j80/rules.mk | 25 ++ keyboards/j80/usbconfig.h | 373 ++++++++++++++++++ 11 files changed, 1132 insertions(+) create mode 100644 keyboards/j80/config.h create mode 100644 keyboards/j80/info.json create mode 100644 keyboards/j80/j80.c create mode 100644 keyboards/j80/j80.h create mode 100644 keyboards/j80/keymaps/default/keymap.c create mode 100644 keyboards/j80/keymaps/default/readme.md create mode 100644 keyboards/j80/keymaps/default_iso/keymap.c create mode 100644 keyboards/j80/keymaps/default_iso/readme.md create mode 100644 keyboards/j80/readme.md create mode 100644 keyboards/j80/rules.mk create mode 100644 keyboards/j80/usbconfig.h diff --git a/keyboards/j80/config.h b/keyboards/j80/config.h new file mode 100644 index 000000000000..3a5328ac412d --- /dev/null +++ b/keyboards/j80/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2019 JER + +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" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0001 +#define MANUFACTURER JER +#define PRODUCT J80 + +#define MATRIX_ROWS 7 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B1, B2, B3, B5, B6, B7, B0 } +#define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, A0 } +#define UNUSED_PINS { B4, C1, C0, D0, D1, D2, D3, D4, D5, D6, D7 } + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN D4 + +#define NO_UART 1 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif + +/* 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) + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/j80/info.json b/keyboards/j80/info.json new file mode 100644 index 000000000000..b31b443ede5a --- /dev/null +++ b/keyboards/j80/info.json @@ -0,0 +1,397 @@ +{ + "keyboard_name": "J80", + "url": "", + "maintainer": "oeywil", + "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}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"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.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"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.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"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_ansi_split_rshift": { + "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.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.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"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.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"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":1.75}, + {"x":14, "y":4.25}, + {"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_iso": { + "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.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.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"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":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"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}, + {"x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"x":0, "y":4.25, "w":1.25}, + {"x":1.25, "y":4.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_iso_split_rshift": { + "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.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.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"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":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"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}, + {"x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"x":0, "y":4.25, "w":1.25}, + {"x":1.25, "y":4.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":1.75}, + {"x":14, "y":4.25}, + {"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} + ] + } + } +} diff --git a/keyboards/j80/j80.c b/keyboards/j80/j80.c new file mode 100644 index 000000000000..4ac0200a28ac --- /dev/null +++ b/keyboards/j80/j80.c @@ -0,0 +1,26 @@ +/* Copyright 2019 JER + * + * 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 "j80.h" + +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(D6, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/j80/j80.h b/keyboards/j80/j80.h new file mode 100644 index 000000000000..a528c70c7dc3 --- /dev/null +++ b/keyboards/j80/j80.h @@ -0,0 +1,115 @@ +/* Copyright 2019 JER + * + * 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 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, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0D, k0C, k01, k61, k62, k6D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1C, k66, k65, k64, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2C, k6C, k68, k67, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k3C, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4C, \ + k50, k51, k52, k54, k58, k59, k5A, k5B, k5D, k5C, k57 \ + ){ \ + { k00, k01, k02, k03, k04, k05, ____, 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, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { k50, k51, k52, ____, k54, ____, ____, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { ____, k61, k62, ____, k64, k65, k66, k67, k68, ____, ____, ____, k6C, k6D }, \ + } + + #define LAYOUT_tkl_iso( \ + k00, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0D, k0C, k01, k61, k62, k6D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1C, k66, k65, k64, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k6C, k68, k67, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k2C, k3D, \ + k40, k3C, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, \ + k50, k51, k52, k54, k58, k59, k5A, k5B, k5D, k5C, k57 \ + ){ \ + { k00, k01, k02, k03, k04, k05, ____, 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, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, ____ }, \ + { k50, k51, k52, ____, k54, ____, ____, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { ____, k61, k62, ____, k64, k65, k66, k67, k68, ____, ____, ____, k6C, k6D }, \ + } + +#define LAYOUT_tkl_iso_split_rshift( \ + k00, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0D, k0C, k01, k61, k62, k6D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1C, k66, k65, k64, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k6C, k68, k67, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k2C, k3D, \ + k40, k3C, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4C, \ + k50, k51, k52, k54, k58, k59, k5A, k5B, k5D, k5C, k57 \ +){ \ + { k00, k01, k02, k03, k04, k05, ____, 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, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { k50, k51, k52, ____, k54, ____, ____, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { ____, k61, k62, ____, k64, k65, k66, k67, k68, ____, ____, ____, k6C, k6D }, \ +} + +#define LAYOUT_tkl_ansi( \ + k00, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0D, k0C, k01, k61, k62, k6D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1C, k66, k65, k64, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2C, k6C, k68, k67, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, \ + k50, k51, k52, k54, k58, k59, k5A, k5B, k5D, k5C, k57 \ +){ \ + { k00, k01, k02, k03, k04, k05, ____, 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, ____, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, ____ }, \ + { k50, k51, k52, ____, k54, ____, ____, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { ____, k61, k62, ____, k64, k65, k66, k67, k68, ____, ____, ____, k6C, k6D }, \ +} + +#define LAYOUT_tkl_ansi_split_rshift( \ + k00, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0D, k0C, k01, k61, k62, k6D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1C, k66, k65, k64, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2C, k6C, k68, k67, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4C, \ + k50, k51, k52, k54, k58, k59, k5A, k5B, k5D, k5C, k57 \ +){ \ + { k00, k01, k02, k03, k04, k05, ____, 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, ____, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { k50, k51, k52, ____, k54, ____, ____, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { ____, k61, k62, ____, k64, k65, k66, k67, k68, ____, ____, ____, k6C, k6D }, \ +} diff --git a/keyboards/j80/keymaps/default/keymap.c b/keyboards/j80/keymaps/default/keymap.c new file mode 100644 index 000000000000..6926da8ea1ce --- /dev/null +++ b/keyboards/j80/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 JER + * + * 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 +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT_tkl_ansi_split_rshift( + 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, MO(_FN), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[_FN] = LAYOUT_tkl_ansi_split_rshift( + 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, QMKBEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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; + } + return true; +} diff --git a/keyboards/j80/keymaps/default/readme.md b/keyboards/j80/keymaps/default/readme.md new file mode 100644 index 000000000000..21ad7d5aba91 --- /dev/null +++ b/keyboards/j80/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for J80 diff --git a/keyboards/j80/keymaps/default_iso/keymap.c b/keyboards/j80/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..4253454f79d6 --- /dev/null +++ b/keyboards/j80/keymaps/default_iso/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 JER + * + * 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 +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT_tkl_iso_split_rshift( + 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_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_BSLS, 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(_FN), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[_FN] = LAYOUT_tkl_iso_split_rshift( + 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, QMKBEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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; + } + return true; +} diff --git a/keyboards/j80/keymaps/default_iso/readme.md b/keyboards/j80/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..db7bdb41578d --- /dev/null +++ b/keyboards/j80/keymaps/default_iso/readme.md @@ -0,0 +1 @@ +# The default ISO keymap for J80 diff --git a/keyboards/j80/readme.md b/keyboards/j80/readme.md new file mode 100644 index 000000000000..44ed46fe4507 --- /dev/null +++ b/keyboards/j80/readme.md @@ -0,0 +1,21 @@ +# J80 + +JER PLANT - J80 (JER-A06) Round 2 +The J80 is a OG Cherry style(no plate) custom 80% kit. +It is characterized by the fact that the hoisting PCB has no steel plate and can fully reflect the elasticity of the linear shaft. Tested by the buyer, its feel and typing sound are different from other custom keyboards and are satisfactory. It has a simple and elegant original cherry-like shape, the author's original intention is to start from the touching feel, let everyone have a comfortable tapping experience. The light stick module in the upper right corner is detachable, it could be switches (3 keys) or the light stick module. When using light stick module, PrtScr Scrolllock and Pause are achieved by pressing FN+ Insert / Home / Page Up. + +* Keyboard Maintainer: [oeywil](https://github.com/oeywil) +* Hardware Supported: J80 PCB (atmega32a) +* Hardware Availability: [J80 R2 GB](https://geekhack.org/index.php?topic=101401.0) + +Make example for this keyboard (after setting up your build environment): + + make j80:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make j80:default:flash + +**Reset Key**: Hold down the key located at *TOP RIGHT*, commonly programmed as *PAUSE* while plugging in the keyboard. The key definition for the reset key is k6D. Bootmagic Lite is enabled so holding down Escape while plugging in the keyboard will also jump to bootloader, after QMK is flashed. + +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/j80/rules.mk b/keyboards/j80/rules.mk new file mode 100644 index 000000000000..1ceafc9c0179 --- /dev/null +++ b/keyboards/j80/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32a + +# 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 + +# 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow + +OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/j80/usbconfig.h b/keyboards/j80/usbconfig.h new file mode 100644 index 000000000000..0c377f4b7e55 --- /dev/null +++ b/keyboards/j80/usbconfig.h @@ -0,0 +1,373 @@ +#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 1 +/* 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 'J', 'E', 'R' +#define USB_CFG_VENDOR_NAME_LEN 3 +/* 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 'J', '8', '0' +#define USB_CFG_DEVICE_NAME_LEN 3 +/* 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 1646717b4b11141dd75367751421269c5df5c600 Mon Sep 17 00:00:00 2001 From: Nygel Lyndley Date: Tue, 17 Dec 2019 22:38:22 +0000 Subject: [PATCH 073/973] [Keyboard] Added Filco Majestouch TKL Pegasus Hoof ISO Layout (#7647) * [keymap] Added Filco Majestouch TKL Pegasus Hoof ISO Layout * - add rules definition * Revert "- add rules definition" This reverts commit 59bfbe83883fbf2337b9541aa2875e935064a1f4. * - fixed incorrect variable naming --- keyboards/bpiphany/pegasushoof/2015/2015.h | 16 ++++ keyboards/bpiphany/pegasushoof/info.json | 92 ++++++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/keyboards/bpiphany/pegasushoof/2015/2015.h b/keyboards/bpiphany/pegasushoof/2015/2015.h index 18bfc46b8149..8a0084d4053a 100644 --- a/keyboards/bpiphany/pegasushoof/2015/2015.h +++ b/keyboards/bpiphany/pegasushoof/2015/2015.h @@ -56,6 +56,22 @@ along with this program. If not, see . KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ ) +#define LAYOUT_tkl_iso( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB3, KB1, \ + KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ + ) LAYOUT( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KI6 ,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ + ) + #define LAYOUT_tkl_jis( \ KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB5, KB2, KL4, KO4, KQ4, \ diff --git a/keyboards/bpiphany/pegasushoof/info.json b/keyboards/bpiphany/pegasushoof/info.json index 0fb9f4a746c1..9243e0c083ed 100644 --- a/keyboards/bpiphany/pegasushoof/info.json +++ b/keyboards/bpiphany/pegasushoof/info.json @@ -188,6 +188,98 @@ {"label":"Right", "x":17.25, "y":5.5} ] }, + "LAYOUT_tkl_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"Print Screen", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"`", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"-", "x":11, "y":1.5}, + {"label":"=", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "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":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"Page Down", "x":17.25, "y":2.5}, + {"label":"Caps Lock", "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":"#", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"\\", "x":1.25, "y":4.5}, + {"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":2.75}, + {"label":"↑", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "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":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"GUI", "x":11.25, "y":5.5, "w":1.25}, + {"label":"App", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"←", "x":15.25, "y":5.5}, + {"label":"↓", "x":16.25, "y":5.5}, + {"label":"→", "x":17.25, "y":5.5} + ] + }, "LAYOUT_tkl_jis": { "layout": [ {"label":"Esc", "x":0, "y":0}, From 78ffc4f7fe1b9e86398d1eb8d95f23316a87b1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20K=C4=B1l=C4=B1=C3=A7da=C4=9F=C4=B1?= Date: Wed, 18 Dec 2019 01:41:41 +0300 Subject: [PATCH 074/973] Heisenberg handwired keyboard added (#7643) * Chotanck keyboard added * Chotanck renamed to Heisenberg * Further updates to Heisenberg Keyboard done * Update keyboards/handwired/heisenberg/info.json Co-Authored-By: fauxpark * Update keyboards/handwired/heisenberg/rules.mk Co-Authored-By: fauxpark * Update keyboards/handwired/heisenberg/readme.md Co-Authored-By: fauxpark --- keyboards/handwired/heisenberg/config.h | 262 ++++++++++++++++++ keyboards/handwired/heisenberg/heisenberg.c | 16 ++ keyboards/handwired/heisenberg/heisenberg.h | 39 +++ keyboards/handwired/heisenberg/info.json | 62 +++++ .../heisenberg/keymaps/default/keymap.c | 168 +++++++++++ .../heisenberg/keymaps/default/readme.md | 1 + .../heisenberg/keymaps/turkishish/config.h | 24 ++ .../heisenberg/keymaps/turkishish/keymap.c | 232 ++++++++++++++++ .../heisenberg/keymaps/turkishish/readme.md | 5 + keyboards/handwired/heisenberg/readme.md | 14 + keyboards/handwired/heisenberg/rules.mk | 35 +++ 11 files changed, 858 insertions(+) create mode 100644 keyboards/handwired/heisenberg/config.h create mode 100644 keyboards/handwired/heisenberg/heisenberg.c create mode 100644 keyboards/handwired/heisenberg/heisenberg.h create mode 100644 keyboards/handwired/heisenberg/info.json create mode 100644 keyboards/handwired/heisenberg/keymaps/default/keymap.c create mode 100644 keyboards/handwired/heisenberg/keymaps/default/readme.md create mode 100644 keyboards/handwired/heisenberg/keymaps/turkishish/config.h create mode 100644 keyboards/handwired/heisenberg/keymaps/turkishish/keymap.c create mode 100644 keyboards/handwired/heisenberg/keymaps/turkishish/readme.md create mode 100644 keyboards/handwired/heisenberg/readme.md create mode 100644 keyboards/handwired/heisenberg/rules.mk diff --git a/keyboards/handwired/heisenberg/config.h b/keyboards/handwired/heisenberg/config.h new file mode 100644 index 000000000000..9fe57cbeba55 --- /dev/null +++ b/keyboards/handwired/heisenberg/config.h @@ -0,0 +1,262 @@ +/* +Copyright 2019 Arda Kilicdagi + +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 Ardakilic +#define PRODUCT Heisenberg +#define DESCRIPTION A handwired 40% ortholinear keyboard + +/* 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 \ + { D3, D2, D1, D0 } +#define MATRIX_COL_PINS \ + { C6, D7, E6, B4, B6, B2, 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 D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D4 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 +// #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 + + +/** + * Heisenberg-specific definitions + */ +#define B5_AUDIO +/** + * Heisenberg-specific definitions END + */ + + +#define TAPPING_TERM 200 +/* 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/handwired/heisenberg/heisenberg.c b/keyboards/handwired/heisenberg/heisenberg.c new file mode 100644 index 000000000000..54c8bdae95b0 --- /dev/null +++ b/keyboards/handwired/heisenberg/heisenberg.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 "heisenberg.h" \ No newline at end of file diff --git a/keyboards/handwired/heisenberg/heisenberg.h b/keyboards/handwired/heisenberg/heisenberg.h new file mode 100644 index 000000000000..df887c2c56ca --- /dev/null +++ b/keyboards/handwired/heisenberg/heisenberg.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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_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, k36, k37, k38, k39, k3a \ +) \ +{ \ + { 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, KC_NO, k35, k36, k37, k38, k39, k3a } \ +} diff --git a/keyboards/handwired/heisenberg/info.json b/keyboards/handwired/heisenberg/info.json new file mode 100644 index 000000000000..88e0f7ce471f --- /dev/null +++ b/keyboards/handwired/heisenberg/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "Heisenberg", + "keyboard_folder": "handwired/heisenberg", + "url": "https://github.com/Ardakilic", + "maintainer": "Arda Kilicdagi", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_mit": { + "key_count": 47, + "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 } + ] + } + } +} diff --git a/keyboards/handwired/heisenberg/keymaps/default/keymap.c b/keyboards/handwired/heisenberg/keymaps/default/keymap.c new file mode 100644 index 000000000000..03c2a21b3b78 --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/default/keymap.c @@ -0,0 +1,168 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 heisenberg_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _SPACE, + _SODA, + _NUMPAD +}; + + +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NPdESC| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |SftEtr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | PWR | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LT(_SODA, KC_POWER), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), LT(_SPACE, KC_SPC), MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_mit( + 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_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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_mit( + 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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Soda Layer + * Keys that I mostly use when while chilling or taking a break :) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SODA] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Space Layer (Space Bar Layer Tap) + * ,-----------------------------------------------------------------------------------. + * | |CMD+1 |CMD+2 |CMD+3 |CMD+4 |CMD+5 |CMD+6 |CMD+7 |CMD+8 |CMD+9 |CMD+0 |LCKOSX| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Up | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down | Right| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SPACE] = LAYOUT_planck_mit( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Numpad Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 1 | 2 | 3 | + | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 0 | . | , | = | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|EEPRst| RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_mit( + _______, RESET, EEP_RST, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +// Enable the adjust layer when both lower and +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} \ No newline at end of file diff --git a/keyboards/handwired/heisenberg/keymaps/default/readme.md b/keyboards/handwired/heisenberg/keymaps/default/readme.md new file mode 100644 index 000000000000..7ab5d474ef22 --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Heisenberg diff --git a/keyboards/handwired/heisenberg/keymaps/turkishish/config.h b/keyboards/handwired/heisenberg/keymaps/turkishish/config.h new file mode 100644 index 000000000000..0810a3b23f0a --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/turkishish/config.h @@ -0,0 +1,24 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 RETRO_TAPPING +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD \ No newline at end of file diff --git a/keyboards/handwired/heisenberg/keymaps/turkishish/keymap.c b/keyboards/handwired/heisenberg/keymaps/turkishish/keymap.c new file mode 100644 index 000000000000..2581e01bf84e --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/turkishish/keymap.c @@ -0,0 +1,232 @@ +/* Copyright 2019 Arda Kilicdagi + * + * 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 heisenberg_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _SPACE, + _SODA, + _NUMPAD +}; + +//KC_NONUS_BSLASH (\|) is equivalent to ["é] key in Turkish keyboards. +//KC_GRV (~ `) is equivalent to [<>|] key in Turkish keyboards. +// KC_SCLN is Turkish s [şŞ] key +// KC_QUOT is Turkish i [iİ] key +// KC_COMM is Turkish o [öÖ] key +// KC_DOT is Turkish c [çÇ] key + +// Custom shortcuts specific to Turkish layout +#define CURLY_OPEN RALT(KC_7) +#define CURLY_CLOSE RALT(KC_0) +#define SQUARE_OPEN RALT(KC_8) +#define SQUARE_CLOSE RALT(KC_9) +#define DOLLAR_SIGN RALT(KC_4) +#define BACKSLASH RALT(KC_MINS) +#define VERTICAL_PIPE RALT(KC_EQL) +#define BACKTICK RALT(KC_BSLS) +#define TILDE RALT(KC_RBRC) +#define NUMBER_SIGN RALT(KC_3) +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +/* +// Unicode Turkish characters, in case it's needed +enum { + TR_C, // ç + TR_C_L, // Ç + TR_I, // ı + TR_I_L, // İ + TR_G, // ğ + TR_G_L, // Ğ + TR_S, // ş + TR_S_L, // Ş + TR_U, // ü + TR_U_L, // Ü + TR_O, // ö + TR_O_L, // Ö +}; + +// clang-format off +const uint32_t PROGMEM unicode_map[] = { + [TR_C] = 0x00c7, + [TR_C_L] = 0x00e7, + [TR_I] = 0x0130, + [TR_I_L] = 0x0131, + [TR_G] = 0x011e, + [TR_G_L] = 0x011f, + [TR_S] = 0x015e, + [TR_S_L] = 0x015f, + [TR_U] = 0x00dc, + [TR_U_L] = 0x00fc, + [TR_O] = 0x00d6, + [TR_O_L] = 0x00f6, +}; +// clang-format on +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |NPdEsc| A | S | D | F | G | H | J | K | L | Ş | İ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |SftCps| Z | X | C | V | B | N | M | Ö | Ç | . |SftEtr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Sda|<>| Ctrl | Alt | OS |Lowr|,| Space* |Rise|"| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LT(_SODA, KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_BSLS), LT(_SPACE, KC_SPC), LT(_RAISE, KC_NONUS_BSLASH), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | > | ! | ' | ^ | + | % | & | / | ( | ) | = | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | ? | _ | Ğ | Ü | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | "$" | "{" | "}" | < | ">" | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | "[" | "]" | ' | " | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_mit( + 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_EQL, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DOLLAR_SIGN, CURLY_OPEN, CURLY_CLOSE, KC_GRV, LSFT(KC_GRV), + _______, _______, _______, _______, _______, _______, _______, SQUARE_OPEN, SQUARE_CLOSE, LSFT(KC_2), KC_NONUS_BSLASH +), + + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | <>| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | * | - | "\" | "|" | , | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | # | " | "~" | "`" | <>| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_mit( + 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, BACKSLASH, VERTICAL_PIPE, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMBER_SIGN, KC_NUBS, TILDE, BACKTICK, KC_GRV, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Soda Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SODA] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + +/* Space Layer (Space Bar Layer Tap) + * ,-----------------------------------------------------------------------------------. + * | |CMD+1 |CMD+2 |CMD+3 |CMD+4 |CMD+5 |CMD+6 |CMD+7 |CMD+8 |CMD+9 |CMD+0 |LCKOSX| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Up | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Left | Down |Right | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |Brght▼|Brght▲| + * `-----------------------------------------------------------------------------------' + */ +[_SPACE] = LAYOUT_planck_mit( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU +), + + +/* Numpad Layer + * KC_PDOT is comma on the Turkish layout ¯\_(ツ)_/¯ + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Enter| 1 | 2 | 3 | + | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 0 | . | , | = | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_SLSH, KC_PDOT, KC_PEQL +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|EEPRom| RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_mit( + _______, RESET, EEP_RST, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +// Enable the adjust layer when both lower and +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +// I like greenish cyan for my single colored animations +//extern rgblight_config_t rgblight_config; +void keyboard_post_init_user(void) { + //rgblight_config.hue = 100; + //rgblight_config.sat = 255; + //rgblight_config.val = 255; + rgblight_enable_noeeprom(); // enables Rgb, without saving settings + rgblight_sethsv_noeeprom(100, 255, 255); // sets the color to greenish without saving + //rgblight_sethsv_noeeprom_turquoise(); + +} \ No newline at end of file diff --git a/keyboards/handwired/heisenberg/keymaps/turkishish/readme.md b/keyboards/handwired/heisenberg/keymaps/turkishish/readme.md new file mode 100644 index 000000000000..d994401bbd58 --- /dev/null +++ b/keyboards/handwired/heisenberg/keymaps/turkishish/readme.md @@ -0,0 +1,5 @@ +# The Turkishish keymap for Heisenberg + +You can flash the "turkishish" layout (which I'm currently using) like: + + make handwired/heisenberg:turkishish \ No newline at end of file diff --git a/keyboards/handwired/heisenberg/readme.md b/keyboards/handwired/heisenberg/readme.md new file mode 100644 index 000000000000..bb3bca090dad --- /dev/null +++ b/keyboards/handwired/heisenberg/readme.md @@ -0,0 +1,14 @@ +# Heisenberg + +![heisenberg](https://i.imgur.com/BthPF7A.png) + +A handwired 40% ortholinear keyboard with underglow LEDs and a passive buzzer. + +* Keyboard Maintainer: [Arda Kilicdagi](https://github.com/ardakilic) +* Hardware Supported: Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make handwired/heisenberg: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/heisenberg/rules.mk b/keyboards/handwired/heisenberg/rules.mk new file mode 100644 index 000000000000..2fd710029c05 --- /dev/null +++ b/keyboards/handwired/heisenberg/rules.mk @@ -0,0 +1,35 @@ +# 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 = 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 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = planck_mit From 1ac99586a6035bb36fd8a9479b443e636a3abf87 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 18 Dec 2019 10:15:47 +1100 Subject: [PATCH 075/973] Tidy up dztech default keymaps and info.json (#7608) --- keyboards/dztech/dz60rgb/info.json | 71 ++++++++++++++- .../dztech/dz60rgb/keymaps/default/keymap.c | 84 ++++++++--------- keyboards/dztech/dz60rgb_ansi/info.json | 81 +++++++++++++++-- .../dz60rgb_ansi/keymaps/default/keymap.c | 57 +++++------- keyboards/dztech/dz60rgb_wkl/info.json | 79 ++++++++++++++-- .../dz60rgb_wkl/keymaps/default/keymap.c | 58 +++++------- keyboards/dztech/dz65rgb/info.json | 91 +++++++++++++++++-- .../dztech/dz65rgb/keymaps/default/keymap.c | 44 +++------ 8 files changed, 395 insertions(+), 170 deletions(-) diff --git a/keyboards/dztech/dz60rgb/info.json b/keyboards/dztech/dz60rgb/info.json index b82ba5d4c83e..0f03fa9f7ead 100644 --- a/keyboards/dztech/dz60rgb/info.json +++ b/keyboards/dztech/dz60rgb/info.json @@ -6,8 +6,75 @@ "height": 5, "layouts": { "LAYOUT": { - "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, "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":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"\u2191", "x":13, "y":3},{"label":"?", "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}, {"label":"Ctrl", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] + "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, "w":2}, + + {"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, "w":1.75}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] } } } diff --git a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c index 56c9577af36a..4bffe50db85f 100644 --- a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c @@ -1,49 +1,39 @@ #include QMK_KEYBOARD_H -#define _LAYER0 0 -#define _LAYER1 1 -#define _LAYER2 2 -#define _LAYER3 3 -#define _LAYER4 4 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = 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_BSLASH,\ - 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, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\ - KC_LCTL, KC_LGUI, LM(1, MOD_LALT), KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), - [_LAYER1] = LAYOUT( /* FN */ - TO(3), 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_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_VOLU, KC_MUTE,\ - KC_TRNS, KC_TRNS, KC_TRNS, TO(4), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [_LAYER2] = LAYOUT( /* LIGHT */ - 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_DEL ,\ - KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_LAYER3] = LAYOUT( /* NUMPAD */ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS,\ - KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, TO(0),\ - KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_PENT,\ - KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS), - [_LAYER4] = LAYOUT( /* SWITCH LALT AND LGUI */ - 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,\ - 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, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, TO(0), KC_LEFT, KC_DOWN, KC_RIGHT), - }; -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; - } +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_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, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL), + KC_LCTL, KC_LGUI, LM(1, MOD_LALT), KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + TO(3), 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, EEP_RST, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_VOLU, KC_MUTE, + _______, _______, _______, TO(4), _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + [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, KC_DEL, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, _______, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, _______, + _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, TO(0), + _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_PENT, + _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, + _______, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, _______, _______, _______ + ), + [4] = 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, + 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, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, TO(0), KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/keyboards/dztech/dz60rgb_ansi/info.json b/keyboards/dztech/dz60rgb_ansi/info.json index 8e449be1df81..3e55011c1d9c 100644 --- a/keyboards/dztech/dz60rgb_ansi/info.json +++ b/keyboards/dztech/dz60rgb_ansi/info.json @@ -1,13 +1,78 @@ { - "keyboard_name": "dz60rgb_ansi", - "url": "", - "maintainer": "dztch", - "width": 14, - "height": 5, - "layouts": { + "keyboard_name": "dz60rgb_ansi", + "url": "", + "maintainer": "dztech", + "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": [ + {"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, "w":2}, + + {"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":2.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] } } } diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/default/keymap.c index a7b6e820d25f..12a2a1a145d8 100644 --- a/keyboards/dztech/dz60rgb_ansi/keymaps/default/keymap.c +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/default/keymap.c @@ -1,36 +1,25 @@ #include QMK_KEYBOARD_H -#define _LAYER0 0 -#define _LAYER1 1 -#define _LAYER2 2 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_60_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_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,\ - 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), - [_LAYER1] = LAYOUT_60_ansi( /* FN */ - 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_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS,\ - KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_LAYER2] = LAYOUT_60_ansi( /* FN2 */ - 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_DEL ,\ - KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 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; - } +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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/dztech/dz60rgb_wkl/info.json b/keyboards/dztech/dz60rgb_wkl/info.json index 522860d3ca14..2e4923ab05ee 100644 --- a/keyboards/dztech/dz60rgb_wkl/info.json +++ b/keyboards/dztech/dz60rgb_wkl/info.json @@ -1,12 +1,79 @@ { - "keyboard_name": "dz60rgb_wkl", - "url": "", - "maintainer": "dztech", - "width": 15, - "height": 5, + "keyboard_name": "dz60rgb_wkl", + "url": "", + "maintainer": "dztech", + "width": 15, + "height": 5, "layouts": { "LAYOUT_60_tsangan_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}] + "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/dztech/dz60rgb_wkl/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c index 2a4539c55743..a881a2376212 100644 --- a/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c +++ b/keyboards/dztech/dz60rgb_wkl/keymaps/default/keymap.c @@ -1,37 +1,25 @@ #include QMK_KEYBOARD_H -#define _LAYER0 0 -#define _LAYER1 1 -#define _LAYER2 2 -#define _LAYER3 3 -#define _LAYER4 4 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_60_tsangan_hhkb( /* 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_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, - 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, MO(2), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_RCTL), - [_LAYER1] = LAYOUT_60_tsangan_hhkb( /* FN */ - KC_GRAVE, 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, - KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_LAYER2] = LAYOUT_60_tsangan_hhkb( /* FN2 */ - 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_DEL ,KC_TRNS, - KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 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; - } +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_tsangan_hhkb( + 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, + 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, + 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, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL + ), + [1] = LAYOUT_60_tsangan_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_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_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_DEL, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/dztech/dz65rgb/info.json b/keyboards/dztech/dz65rgb/info.json index fe61e5d9733e..66ed072af3bc 100644 --- a/keyboards/dztech/dz65rgb/info.json +++ b/keyboards/dztech/dz65rgb/info.json @@ -1,12 +1,85 @@ { - "keyboard_name": "dz65rgb", - "url": "", - "maintainer": "dztch", - "width": 15, - "height": 5, - "layouts": { + "keyboard_name": "dz65rgb", + "url": "", + "maintainer": "dztech", + "width": 16, + "height": 5, + "layouts": { "LAYOUT_65_ansi": { - "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, "w":2},{"x":15, "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":15, "y":1}, {"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":15, "y":2}, {"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":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - } - } + "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, "w":2}, + {"x":15, "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":15, "y":1}, + + {"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":15, "y":2}, + + {"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":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } } diff --git a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c index 149ec0a930df..70151e45bccd 100644 --- a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c @@ -1,32 +1,18 @@ #include QMK_KEYBOARD_H -#define _LAYER0 0 -#define _LAYER1 1 + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT_65_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_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,\ - 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_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_RIGHT), - [_LAYER1] = LAYOUT_65_ansi( /* FN */ - 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,\ - CTL_T(KC_CAPS),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, NK_TOGG, 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_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + [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_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, + 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_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 + ), + [1] = LAYOUT_65_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_HOME, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP, + CTL_T(KC_CAPS), RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, KC_PGDN, + KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) }; - -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; -} From d23e81b1f00e2a98b2543d0340870efb835d643b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 18 Dec 2019 10:23:26 +1100 Subject: [PATCH 076/973] Tidy up dztech config.h --- keyboards/dztech/dz60rgb/config.h | 3 +- keyboards/dztech/dz60rgb/v1/config.h | 58 ++++++++++----- keyboards/dztech/dz60rgb/v2/config.h | 76 +++++++++++++------- keyboards/dztech/dz60rgb_ansi/config.h | 1 + keyboards/dztech/dz60rgb_ansi/v1/config.h | 58 ++++++++++----- keyboards/dztech/dz60rgb_ansi/v2/config.h | 76 +++++++++++++------- keyboards/dztech/dz60rgb_wkl/config.h | 3 +- keyboards/dztech/dz60rgb_wkl/v1/config.h | 52 +++++++++----- keyboards/dztech/dz60rgb_wkl/v2/config.h | 70 +++++++++++------- keyboards/dztech/dz65rgb/config.h | 3 +- keyboards/dztech/dz65rgb/v1/config.h | 87 ++++++++++++++--------- keyboards/dztech/dz65rgb/v2/config.h | 87 ++++++++++++++--------- 12 files changed, 369 insertions(+), 205 deletions(-) diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index 434b6c5916e4..b8c5759db6b6 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -1,2 +1,3 @@ #pragma once -#include "config_common.h" \ No newline at end of file + +#include "config_common.h" diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h index d0358a243479..b22b8f5dcb9d 100644 --- a/keyboards/dztech/dz60rgb/v1/config.h +++ b/keyboards/dztech/dz60rgb/v1/config.h @@ -1,36 +1,56 @@ #pragma once + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1219 #define DEVICE_VER 0x0001 #define MANUFACTURER DZTECH - #define PRODUCT DZ60RGB #define DESCRIPTION DZ60 ARM RGB 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, B10, B11, B14, B12 } -#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } - -/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/ +#define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } +#define UNUSED_PINS +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + #ifdef RGB_MATRIX_ENABLE -#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_KEYPRESSES -#define RGB_MATRIX_LED_PROCESS_LIMIT 4 -#define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL -#endif \ No newline at end of file +# 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_KEYPRESSES +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# define DISABLE_RGB_MATRIX_SPLASH +# define DISABLE_RGB_MATRIX_MULTISPLASH +# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 63 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#endif diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h index ed1056ca90de..c145cf03bc22 100644 --- a/keyboards/dztech/dz60rgb/v2/config.h +++ b/keyboards/dztech/dz60rgb/v2/config.h @@ -1,44 +1,66 @@ #pragma once + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1219 #define DEVICE_VER 0x0002 #define MANUFACTURER DZTECH - #define PRODUCT DZ60RGB #define DESCRIPTION DZ60 AVR RGB keyboard + +/* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 -#define MATRIX_ROW_PINS {F5, F4, F1, B3, B2 } -#define MATRIX_COL_PINS {C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } +/* + * 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 { F5, F4, F1, B3, B2 } +#define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } #define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + #ifdef RGB_MATRIX_ENABLE -#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_KEYPRESSES -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#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 DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# 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_KEYPRESSES +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# 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 DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 63 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #endif diff --git a/keyboards/dztech/dz60rgb_ansi/config.h b/keyboards/dztech/dz60rgb_ansi/config.h index e38246b228f7..b8c5759db6b6 100644 --- a/keyboards/dztech/dz60rgb_ansi/config.h +++ b/keyboards/dztech/dz60rgb_ansi/config.h @@ -1,2 +1,3 @@ #pragma once + #include "config_common.h" diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h index bd9d6e848ce5..050f66c6fc7c 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h @@ -1,36 +1,56 @@ #pragma once + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1220 #define DEVICE_VER 0x0001 #define MANUFACTURER DZTECH - #define PRODUCT DZ60RGB_ANSI #define DESCRIPTION DZ60 ARM RGB 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, B10, B11, B14, B12 } -#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } - -/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/ +#define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } +#define UNUSED_PINS +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + #ifdef RGB_MATRIX_ENABLE -#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_KEYPRESSES -#define RGB_MATRIX_LED_PROCESS_LIMIT 4 -#define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 61 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL -#endif \ No newline at end of file +# 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_KEYPRESSES +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# define DISABLE_RGB_MATRIX_SPLASH +# define DISABLE_RGB_MATRIX_MULTISPLASH +# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 61 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#endif diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h index b963fa2bebcc..b357ceefe789 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h @@ -1,44 +1,66 @@ #pragma once + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1220 #define DEVICE_VER 0x0002 #define MANUFACTURER DZTECH - #define PRODUCT DZ60RGB_ANSI #define DESCRIPTION DZ60 AVR RGB keyboard + +/* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 -#define MATRIX_ROW_PINS {F5, F4, F1, B3, B2 } -#define MATRIX_COL_PINS {C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } +/* + * 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 { F5, F4, F1, B3, B2 } +#define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } #define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + #ifdef RGB_MATRIX_ENABLE -#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_KEYPRESSES -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#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 DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 61 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# 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_KEYPRESSES +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# 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 DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 61 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #endif diff --git a/keyboards/dztech/dz60rgb_wkl/config.h b/keyboards/dztech/dz60rgb_wkl/config.h index 434b6c5916e4..b8c5759db6b6 100644 --- a/keyboards/dztech/dz60rgb_wkl/config.h +++ b/keyboards/dztech/dz60rgb_wkl/config.h @@ -1,2 +1,3 @@ #pragma once -#include "config_common.h" \ No newline at end of file + +#include "config_common.h" diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h index 97dd46c5f924..363f463ec0b5 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h @@ -1,36 +1,50 @@ #pragma once + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1221 #define DEVICE_VER 0x0001 #define MANUFACTURER DZTECH - #define PRODUCT DZ60RGB_WKL #define DESCRIPTION DZ60 ARM RGB 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, B10, B11, B14, B12 } -#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } - -/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/ +#define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } +#define UNUSED_PINS +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 + #ifdef RGB_MATRIX_ENABLE -#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_KEYPRESSES -#define RGB_MATRIX_LED_PROCESS_LIMIT 4 -#define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 62 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL -#endif \ No newline at end of file +# 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_KEYPRESSES +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# define DISABLE_RGB_MATRIX_SPLASH +# define DISABLE_RGB_MATRIX_MULTISPLASH +# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 62 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#endif diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h index e2b29d2f84fd..a180e7714109 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h @@ -1,44 +1,60 @@ #pragma once + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1221 #define DEVICE_VER 0x0002 #define MANUFACTURER DZTECH - #define PRODUCT DZ60RGB_WKL #define DESCRIPTION DZ60 AVR RGB keyboard + +/* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 14 -#define MATRIX_ROW_PINS {F5, F4, F1, B3, B2 } -#define MATRIX_COL_PINS {C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } +/* + * 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 { F5, F4, F1, B3, B2 } +#define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } #define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 + #ifdef RGB_MATRIX_ENABLE -#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_KEYPRESSES -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#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 DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 62 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# 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_KEYPRESSES +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# 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 DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 62 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #endif diff --git a/keyboards/dztech/dz65rgb/config.h b/keyboards/dztech/dz65rgb/config.h index 434b6c5916e4..b8c5759db6b6 100644 --- a/keyboards/dztech/dz65rgb/config.h +++ b/keyboards/dztech/dz65rgb/config.h @@ -1,2 +1,3 @@ #pragma once -#include "config_common.h" \ No newline at end of file + +#include "config_common.h" diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h index 361c27df3683..cc40fdc5a0af 100644 --- a/keyboards/dztech/dz65rgb/v1/config.h +++ b/keyboards/dztech/dz65rgb/v1/config.h @@ -1,4 +1,6 @@ #pragma once + +/* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1222 #define DEVICE_VER 0x0001 @@ -6,40 +8,61 @@ #define PRODUCT DZ65RGB #define DESCRIPTION DZ65 ARM RGB keyboard +/* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 + +/* + * 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, B10, B11, B14, B12 } -#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14, C15 } +#define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14, C15 } + +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + #ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_LED_PROCESS_LIMIT 4 -#define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DEBOUNCE 3 -#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_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#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 -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DRIVER_ADDR_1 0b1110100 -#define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 35 -#define DRIVER_2_LED_TOTAL 33 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#endif \ No newline at end of file +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# define DEBOUNCE 3 +# 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_KEYPRESSES +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# 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 +# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +# define DRIVER_ADDR_1 0b1110100 +# define DRIVER_ADDR_2 0b1110111 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 35 +# define DRIVER_2_LED_TOTAL 33 +# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#endif diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h index 44bf0b7348c1..778d43df95b8 100644 --- a/keyboards/dztech/dz65rgb/v2/config.h +++ b/keyboards/dztech/dz65rgb/v2/config.h @@ -1,4 +1,6 @@ #pragma once + +/* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1222 #define DEVICE_VER 0x0002 @@ -6,40 +8,61 @@ #define PRODUCT DZ65RGB #define DESCRIPTION DZ65 AVR RGB keyboard +/* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 -#define MATRIX_ROW_PINS {F0, F1, F4, E6, C6 } -#define MATRIX_COL_PINS {F7, F6, F5, C7, B0, B1, B2, B3, B4, D7, D6, D4, D5, D3, D2} + +/* + * 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, E6, C6 } +#define MATRIX_COL_PINS { F7, F6, F5, C7, B0, B1, B2, B3, B4, D7, D6, D4, D5, D3, D2 } + +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + #ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_LED_PROCESS_LIMIT 4 -#define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DEBOUNCE 3 -#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_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#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 -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DRIVER_ADDR_1 0b1110100 -#define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 35 -#define DRIVER_2_LED_TOTAL 33 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# define DEBOUNCE 3 +# 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_KEYPRESSES +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# 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 +# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +# define DRIVER_ADDR_1 0b1110100 +# define DRIVER_ADDR_2 0b1110111 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 35 +# define DRIVER_2_LED_TOTAL 33 +# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #endif From 3c190f8927f8676febb5e247908d2bdfd574a54b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 18 Dec 2019 14:01:13 +1100 Subject: [PATCH 077/973] Improve docs "Edit Document" footer --- docs/contributing.md | 2 +- docs/index.html | 4 ++-- readme.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 7c365b418632..c4d5057a07a0 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -85,7 +85,7 @@ Limited experimentation on the devices I have available shows that 7 is high eno Documentation is one of the easiest ways to get started contributing to QMK. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren't sure where or how to jump in please [reach out for help](#where-can-i-go-for-help)! -You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/. +You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click the "Edit this page" link at the bottom of each page on https://docs.qmk.fm/. When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency: diff --git a/docs/index.html b/docs/index.html index 8d03c6edef5a..9b33cd263a46 100644 --- a/docs/index.html +++ b/docs/index.html @@ -82,9 +82,9 @@ .replace('raw.githubusercontent.com', 'github.com') .replace(/\/master/, '/blob/master') } else { - url = 'https://github.com/qmk/qmk_firmware/blob/master/docs/' + vm.route.file + url = 'https://github.com/qmk/qmk_firmware/edit/master/docs/' + vm.route.file } - var editHtml = '[:memo: Edit Document](' + url + ')\n' + var editHtml = ':pencil2: [Edit this page](' + url + ')\n' return html + '\n\n----\n\n' + editHtml diff --git a/readme.md b/readme.md index 5a9166c04426..6092f209be1a 100644 --- a/readme.md +++ b/readme.md @@ -15,7 +15,7 @@ This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github The docs are powered by [Docsify](https://docsify.js.org/) and hosted on [GitHub](/docs/). They are also viewable offline; see [Previewing the Documentation](https://docs.qmk.fm/#/contributing?id=previewing-the-documentation) for more details. -You can request changes by making a fork and opening a [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit Document" link at the bottom of any page. +You can request changes by making a fork and opening a [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit this page" link at the bottom of any page. ## Supported Keyboards From 7048b9403472464e3b2c9eea4ffbaf5be9538785 Mon Sep 17 00:00:00 2001 From: x1 Date: Wed, 18 Dec 2019 17:02:57 +0900 Subject: [PATCH 078/973] [Keymap] Add pico 70 keys keymap (#7654) * Move pico/rev1 to pico/65keys. * Add pico/70keys. * Remove unneeded codes. * Modified valid 70 keys keymap for jis. --- .../pico/{rev1/rev1.c => 65keys/65keys.c} | 0 .../pico/{rev1/rev1.h => 65keys/65keys.h} | 0 keyboards/pico/{rev1 => 65keys}/config.h | 0 keyboards/pico/{ => 65keys}/info.json | 0 .../{ => 65keys}/keymaps/default/config.h | 0 .../{ => 65keys}/keymaps/default/keymap.c | 0 .../{ => 65keys}/keymaps/default/readme.md | 0 .../pico/{ => 65keys}/keymaps/jis/config.h | 0 .../pico/{ => 65keys}/keymaps/jis/keymap.c | 0 .../pico/{ => 65keys}/keymaps/jis/readme.md | 0 keyboards/pico/{rev1 => 65keys}/rules.mk | 0 keyboards/pico/70keys/70keys.c | 0 keyboards/pico/70keys/70keys.h | 24 +++++ keyboards/pico/70keys/config.h | 91 +++++++++++++++++++ keyboards/pico/70keys/info.json | 81 +++++++++++++++++ .../pico/70keys/keymaps/default/keymap.c | 46 ++++++++++ .../pico/70keys/keymaps/default/readme.md | 3 + keyboards/pico/70keys/keymaps/jis/keymap.c | 47 ++++++++++ keyboards/pico/70keys/keymaps/jis/readme.md | 3 + keyboards/pico/70keys/rules.mk | 0 keyboards/pico/pico.h | 7 +- keyboards/pico/readme.md | 17 +++- keyboards/pico/rules.mk | 2 +- 23 files changed, 313 insertions(+), 8 deletions(-) rename keyboards/pico/{rev1/rev1.c => 65keys/65keys.c} (100%) rename keyboards/pico/{rev1/rev1.h => 65keys/65keys.h} (100%) rename keyboards/pico/{rev1 => 65keys}/config.h (100%) rename keyboards/pico/{ => 65keys}/info.json (100%) rename keyboards/pico/{ => 65keys}/keymaps/default/config.h (100%) rename keyboards/pico/{ => 65keys}/keymaps/default/keymap.c (100%) rename keyboards/pico/{ => 65keys}/keymaps/default/readme.md (100%) rename keyboards/pico/{ => 65keys}/keymaps/jis/config.h (100%) rename keyboards/pico/{ => 65keys}/keymaps/jis/keymap.c (100%) rename keyboards/pico/{ => 65keys}/keymaps/jis/readme.md (100%) rename keyboards/pico/{rev1 => 65keys}/rules.mk (100%) create mode 100644 keyboards/pico/70keys/70keys.c create mode 100644 keyboards/pico/70keys/70keys.h create mode 100644 keyboards/pico/70keys/config.h create mode 100644 keyboards/pico/70keys/info.json create mode 100644 keyboards/pico/70keys/keymaps/default/keymap.c create mode 100644 keyboards/pico/70keys/keymaps/default/readme.md create mode 100644 keyboards/pico/70keys/keymaps/jis/keymap.c create mode 100644 keyboards/pico/70keys/keymaps/jis/readme.md create mode 100644 keyboards/pico/70keys/rules.mk diff --git a/keyboards/pico/rev1/rev1.c b/keyboards/pico/65keys/65keys.c similarity index 100% rename from keyboards/pico/rev1/rev1.c rename to keyboards/pico/65keys/65keys.c diff --git a/keyboards/pico/rev1/rev1.h b/keyboards/pico/65keys/65keys.h similarity index 100% rename from keyboards/pico/rev1/rev1.h rename to keyboards/pico/65keys/65keys.h diff --git a/keyboards/pico/rev1/config.h b/keyboards/pico/65keys/config.h similarity index 100% rename from keyboards/pico/rev1/config.h rename to keyboards/pico/65keys/config.h diff --git a/keyboards/pico/info.json b/keyboards/pico/65keys/info.json similarity index 100% rename from keyboards/pico/info.json rename to keyboards/pico/65keys/info.json diff --git a/keyboards/pico/keymaps/default/config.h b/keyboards/pico/65keys/keymaps/default/config.h similarity index 100% rename from keyboards/pico/keymaps/default/config.h rename to keyboards/pico/65keys/keymaps/default/config.h diff --git a/keyboards/pico/keymaps/default/keymap.c b/keyboards/pico/65keys/keymaps/default/keymap.c similarity index 100% rename from keyboards/pico/keymaps/default/keymap.c rename to keyboards/pico/65keys/keymaps/default/keymap.c diff --git a/keyboards/pico/keymaps/default/readme.md b/keyboards/pico/65keys/keymaps/default/readme.md similarity index 100% rename from keyboards/pico/keymaps/default/readme.md rename to keyboards/pico/65keys/keymaps/default/readme.md diff --git a/keyboards/pico/keymaps/jis/config.h b/keyboards/pico/65keys/keymaps/jis/config.h similarity index 100% rename from keyboards/pico/keymaps/jis/config.h rename to keyboards/pico/65keys/keymaps/jis/config.h diff --git a/keyboards/pico/keymaps/jis/keymap.c b/keyboards/pico/65keys/keymaps/jis/keymap.c similarity index 100% rename from keyboards/pico/keymaps/jis/keymap.c rename to keyboards/pico/65keys/keymaps/jis/keymap.c diff --git a/keyboards/pico/keymaps/jis/readme.md b/keyboards/pico/65keys/keymaps/jis/readme.md similarity index 100% rename from keyboards/pico/keymaps/jis/readme.md rename to keyboards/pico/65keys/keymaps/jis/readme.md diff --git a/keyboards/pico/rev1/rules.mk b/keyboards/pico/65keys/rules.mk similarity index 100% rename from keyboards/pico/rev1/rules.mk rename to keyboards/pico/65keys/rules.mk diff --git a/keyboards/pico/70keys/70keys.c b/keyboards/pico/70keys/70keys.c new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/pico/70keys/70keys.h b/keyboards/pico/70keys/70keys.h new file mode 100644 index 000000000000..67f7161ca54f --- /dev/null +++ b/keyboards/pico/70keys/70keys.h @@ -0,0 +1,24 @@ +#pragma once + +#include "pico.h" +#include "quantum.h" + +#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, L36, R30, R31, R32, R33, R34, R35, R36, \ + 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, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/pico/70keys/config.h b/keyboards/pico/70keys/config.h new file mode 100644 index 000000000000..4e5ba0db4c30 --- /dev/null +++ b/keyboards/pico/70keys/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo + * + * 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 0x9692 +#define DEVICE_VER 0x0101 +#define MANUFACTURER Kumao Kobo +#define PRODUCT Pico Keyboard +#define DESCRIPTION Split row staggered 5x7 keyboard (using kailh mid-height) + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#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 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 + +/* 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 D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * 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 MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/pico/70keys/info.json b/keyboards/pico/70keys/info.json new file mode 100644 index 000000000000..4c87ab36919e --- /dev/null +++ b/keyboards/pico/70keys/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "Pico Keyboard", + "url": "https://github.com/kumaokobo/pico-keyboard/", + "maintainer": "Kumao Kobo", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"~", "x":1, "y":0}, + {"label":"1", "x":2, "y":0}, + {"label":"2", "x":3, "y":0}, + {"label":"3", "x":4, "y":0}, + {"label":"4", "x":5, "y":0}, + {"label":"5", "x":6, "y":0}, + {"label":"6", "x":9, "y":0}, + {"label":"7", "x":10, "y":0}, + {"label":"8", "x":11, "y":0}, + {"label":"9", "x":12, "y":0}, + {"label":"0", "x":13, "y":0}, + {"label":"-", "x":14, "y":0}, + {"label":"\u2190", "x":15, "y":0}, + {"label":"Tab", "x":0.25, "y":1}, + {"label":"Tab", "x":1.25, "y":1}, + {"label":"Q", "x":2.25, "y":1}, + {"label":"W", "x":3.25, "y":1}, + {"label":"E", "x":4.25, "y":1}, + {"label":"R", "x":5.25, "y":1}, + {"label":"T", "x":6.25, "y":1}, + {"label":"Y", "x":9.25, "y":1}, + {"label":"U", "x":10.25, "y":1}, + {"label":"I", "x":11.25, "y":1}, + {"label":"O", "x":12.25, "y":1}, + {"label":"P", "x":13.25, "y":1}, + {"label":"[", "x":14.25, "y":1}, + {"label":"]", "x":15.25, "y":1}, + {"label":"Ctrl", "x":0.5, "y":2}, + {"label":"Ctrl", "x":1.5, "y":2}, + {"label":"A", "x":2.5, "y":2}, + {"label":"S", "x":3.5, "y":2}, + {"label":"D", "x":4.5, "y":2}, + {"label":"F", "x":5.5, "y":2}, + {"label":"G", "x":6.5, "y":2}, + {"label":"H", "x":9.5, "y":2}, + {"label":"J", "x":10.5, "y":2}, + {"label":"K", "x":11.5, "y":2}, + {"label":"L", "x":12.5, "y":2}, + {"label":";", "x":13.5, "y":2}, + {"label":"'", "x":14.5, "y":2}, + {"label":"Enter", "x":15.5, "y":2}, + {"label":"Shift", "x":0.75, "y":3}, + {"label":"Shift", "x":1.75, "y":3}, + {"label":"Z", "x":2.75, "y":3}, + {"label":"X", "x":3.75, "y":3}, + {"label":"C", "x":4.75, "y":3}, + {"label":"V", "x":5.75, "y":3}, + {"label":"B", "x":6.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":",", "x":11.75, "y":3}, + {"label":".", "x":12.75, "y":3}, + {"label":"/", "x":13.75, "y":3}, + {"label":"\u2191", "x":14.75, "y":3}, + {"label":"Shift", "x":15.75, "y":3}, + {"label":"Alt", "x":1, "y":4}, + {"label":"Alt", "x":2, "y":4}, + {"label":"Enter", "x":3, "y":4}, + {"label":"Del", "x":4, "y":4}, + {"label":"GUI", "x":5, "y":4}, + {"label":"LANG2", "x":6, "y":4}, + {"label":"Space", "x":7, "y":4}, + {"label":"Space", "x":10, "y":4}, + {"label":"LANG1", "x":11, "y":4}, + {"label":"GUI", "x":12, "y":4}, + {"label":"Del", "x":13, "y":4}, + {"label":"\u2190", "x":14, "y":4}, + {"label":"\u2193", "x":15, "y":4}, + {"label":"\u2192", "x":16, "y":4} + ] + } + } +} diff --git a/keyboards/pico/70keys/keymaps/default/keymap.c b/keyboards/pico/70keys/keymaps/default/keymap.c new file mode 100644 index 000000000000..9b9ae30dab1f --- /dev/null +++ b/keyboards/pico/70keys/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#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 _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) +#define KC_ALES LALT_T(KC_ESC) +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = 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_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,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_LCTL ,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_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_UP ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_ALES ,KC_ENT ,KC_DEL ,KC_LGUI ,KC_L2SYM,KC_SPC , KC_SPC ,KC_L1SYM,KC_RGUI ,KC_DEL ,KC_LEFT ,KC_DOWN ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = 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_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_JYEN ,KC_BSLS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_GRV ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LCBR ,KC_RCBR ,_______ ,_______ ,_______ ,KC_CIRC ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/pico/70keys/keymaps/default/readme.md b/keyboards/pico/70keys/keymaps/default/readme.md new file mode 100644 index 000000000000..0b9a978d7d72 --- /dev/null +++ b/keyboards/pico/70keys/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Pico Keyboard 70 keys + +![Pico Layout Image](https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-layout-70keys.png) diff --git a/keyboards/pico/70keys/keymaps/jis/keymap.c b/keyboards/pico/70keys/keymaps/jis/keymap.c new file mode 100644 index 000000000000..73109245e96c --- /dev/null +++ b/keyboards/pico/70keys/keymaps/jis/keymap.c @@ -0,0 +1,47 @@ +#include QMK_KEYBOARD_H +#include"keymap_jp.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 _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) +#define KC_ALES LALT_T(KC_ESC) +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = 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_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,JP_AT ,JP_CIRC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,JP_COLN ,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_UP ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_ALES ,KC_ENT ,KC_DEL ,KC_LGUI ,KC_L2SYM,KC_SPC , KC_SPC ,KC_L1SYM,KC_RGUI ,KC_DEL ,KC_LEFT ,KC_DOWN ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = 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_LPRN ,KC_RPRN ,KC_PIPE ,JP_YEN ,JP_TILD ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,JP_GRV ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LCBR ,KC_RCBR ,_______ ,_______ ,_______ ,JP_UNDS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,KC_LT ,_______ ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/pico/70keys/keymaps/jis/readme.md b/keyboards/pico/70keys/keymaps/jis/readme.md new file mode 100644 index 000000000000..dda39dfb8287 --- /dev/null +++ b/keyboards/pico/70keys/keymaps/jis/readme.md @@ -0,0 +1,3 @@ +# The JIS-like keymap for Pico Keyboard 70 keys + +![Pico JIS like Layout Image](https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-jis-like-layout-70keys.png) diff --git a/keyboards/pico/70keys/rules.mk b/keyboards/pico/70keys/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/pico/pico.h b/keyboards/pico/pico.h index 246ed8755847..72024efd80ea 100644 --- a/keyboards/pico/pico.h +++ b/keyboards/pico/pico.h @@ -16,8 +16,11 @@ #pragma once -#ifdef KEYBOARD_pico_rev1 - #include "rev1.h" +#ifdef KEYBOARD_pico_65keys + #include "65keys.h" +#endif +#ifdef KEYBOARD_pico_70keys + #include "70keys.h" #endif #include "quantum.h" diff --git a/keyboards/pico/readme.md b/keyboards/pico/readme.md index 26bbf1da2e1b..891bb174fe69 100644 --- a/keyboards/pico/readme.md +++ b/keyboards/pico/readme.md @@ -1,9 +1,5 @@ # Pico keyboard -

- Pico Keyboard rev1.0 -

- A split keyboard kit designed for small hands. Pico adopted the footprint for [Kailh Mid-Height](http://www.kailh.com/en/Products/Ks/KHS/) smaller than Cherry MX compatible switches. @@ -12,6 +8,17 @@ Pico adopted the footprint for [Kailh Mid-Height](http://www.kailh.com/en/Produc Make example for this keyboard (after setting up your build environment): - make pico/rev1:default + make pico/65keys:default + +## 65 keys +

+ Pico Keyboard 65 keys +

+ +## 70 keys +

+ Pico Keyboard 70 keys +

+ 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/pico/rules.mk b/keyboards/pico/rules.mk index fc6ad1e7ebda..0e044b676ba5 100644 --- a/keyboards/pico/rules.mk +++ b/keyboards/pico/rules.mk @@ -33,4 +33,4 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = pico/rev1 +DEFAULT_FOLDER = pico/65keys From 3415dcef6fbd7e3ed96159747e2b428780642b3a Mon Sep 17 00:00:00 2001 From: Lucas Moreira Date: Wed, 18 Dec 2019 03:37:56 -0500 Subject: [PATCH 079/973] [Keymap] CRKBD Custom Keymap - KidBrazil (#7630) * 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 --- keyboards/crkbd/keymaps/kidbrazil/README.md | 52 ++++ keyboards/crkbd/keymaps/kidbrazil/config.h | 100 +++++++ keyboards/crkbd/keymaps/kidbrazil/glcdfont.c | 243 ++++++++++++++++++ keyboards/crkbd/keymaps/kidbrazil/keymap.c | 214 +++++++++++++++ .../crkbd/keymaps/kidbrazil/kidbrazil.json | 1 + .../crkbd/keymaps/kidbrazil/logo_reader.c | 11 + keyboards/crkbd/keymaps/kidbrazil/rules.mk | 17 ++ 7 files changed, 638 insertions(+) create mode 100644 keyboards/crkbd/keymaps/kidbrazil/README.md create mode 100644 keyboards/crkbd/keymaps/kidbrazil/config.h create mode 100644 keyboards/crkbd/keymaps/kidbrazil/glcdfont.c create mode 100644 keyboards/crkbd/keymaps/kidbrazil/keymap.c create mode 100644 keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json create mode 100644 keyboards/crkbd/keymaps/kidbrazil/logo_reader.c create mode 100644 keyboards/crkbd/keymaps/kidbrazil/rules.mk diff --git a/keyboards/crkbd/keymaps/kidbrazil/README.md b/keyboards/crkbd/keymaps/kidbrazil/README.md new file mode 100644 index 000000000000..28414860c3b8 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/README.md @@ -0,0 +1,52 @@ +# KidBrazil's custom CRKBD Layout + +![Crkbd](https://user-images.githubusercontent.com/736191/40575636-6fba63a4-6123-11e8-9ca0-3f990f1f9f4c.jpg) + +This is a simple layout that I use for both programming and gaming. It is very +closely based on the original CRKBD layout with some modifications to the +position of CTRL and SHIFT. + +## Layers +This keymap includes a total of 4 Layers: +- QWERTY +- NUMBERS +- SYMBOLS +- GAMING +- WEAPONS + +The first three layers are pretty self explanatory and follow closely the +default keymap for this keyboard. The magic really starts to happen with the +gaming layer. + +### Gaming Layer +The gaming layer can be toggled on/off from the SYMBOLS layer. Once on the +gaming layer it will stay there until you toggle it off again. The gaming layer +includes normal WASD and most of the keys FPS games use on the left hand. On the +right hand we have F1-F12 and a few other special keys for games that require +it. + +### Weapon +The weapon layer is a momentary layer that can only be reached from the gaming +layer. This layer preserves the left hand almost unchanged, except for when the +layer is activated the top row becomes NUM 1 - 6 for wepon selection. The right +hand is KC_TRNS the whole way so basically it is still the gaming layer. + +## Custom Font +This keymap includes a custom font for my LooseTransistor logo. It is fine if +you want to use it I certainly don't mind but if you want your own, just replace +the glcdfont file here and you should be fine. + +Alternatively you could remove the font config line from the config.h file so it +will use the default QMK one. + +## OLED +This Keymap is setup to use the newer OLED API. Some work has been done to +customize this with showing layer and USB information. I also tried my best to +get a dormant / sleep state going but it is hit or miss and often only works on +the master hand. + +### TODO +- Fix OLED and Backlight so they turn off when the computer sleeps, currently + only the left hand does that and the LEDs still stay on. +- Wait for Spit_common to be implemented in CRKBD and revisit the special color + layers and animations diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h new file mode 100644 index 000000000000..dd3f1a0307c4 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -0,0 +1,100 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2019 Lucas Moreira + +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 150 +#undef PRODUCT +#define PRODUCT CRKBD Loose Transistor Ed. + +#ifdef RGBLIGHT_ENABLE + //#undef RGBLED_NUM + //#define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLED_NUM 27 + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#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 + +/* 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 +#endif +#define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c" +#define OLED_DISABLE_TIMEOUT diff --git a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c new file mode 100644 index 000000000000..a67c329242ed --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, + 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00, + 0xFC, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0x02, 0xF9, 0x01, 0x01, 0x05, 0x09, + 0x11, 0x22, 0x06, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0x46, 0x46, + 0x44, 0x44, 0x45, 0x44, 0x29, 0x28, + 0x2A, 0x28, 0x11, 0x13, 0x05, 0x07, + 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, + 0xE5, 0xE7, 0xE5, 0x07, 0x05, 0x07, + 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, + 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, + 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07, + 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, + 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07, + 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, + 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x07, + 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, + 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 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, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xE3, 0xC1, 0xC1, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0xFF, 0x00, 0x00, 0x80, 0x00, + 0x1C, 0x3E, 0x7F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x08, 0x08, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xBE, + 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x81, 0xBD, + 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x8F, 0x9F, 0x9C, 0x9C, 0x9C, 0x9C, + 0x9C, 0x9C, 0x9C, 0xFC, 0xF8, 0x00, + 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0x9C, + 0x9C, 0x9C, 0x9C, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 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, 0x01, 0x03, 0x07, 0x0F, + 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, + 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x20, 0x47, 0x48, 0x50, 0x40, 0x41, + 0x42, 0x24, 0x30, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x31, 0x31, + 0x11, 0x51, 0x11, 0x11, 0x4A, 0x0A, + 0x2A, 0x0A, 0x44, 0x64, 0x50, 0x70, + 0x50, 0x70, 0x50, 0x70, 0x50, 0x70, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x70, + 0x50, 0x71, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x71, 0x50, 0x70, + 0x50, 0x71, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x71, 0x50, 0x70, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x73, 0x51, 0x70, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x73, 0x53, 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, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c new file mode 100644 index 000000000000..1086cce3acc6 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -0,0 +1,214 @@ +#include QMK_KEYBOARD_H + +// [Init Variables] ----------------------------------------------------------// +extern uint8_t is_master; +// Oled timer similar to Drashna's +static uint32_t oled_timer = 0; +// Boolean to store +bool eeprom_oled_enabled = false; + +// [CRKBD layers Init] -------------------------------------------------------// +enum crkbd_layers { + _QWERTY, + _NUM, + _SYM, + _GAME, + _WEAPON +}; + +// [Keymaps] -----------------------------------------------------------------// +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = 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, + LSFT_T(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_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + LGUI_T(KC_PGUP), MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), LALT_T(KC_PGDN) + ), + + [_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_DEL, + LSFT_T(KC_TAB), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F12, KC_NO, + KC_LCTL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_F11, KC_NO, + LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN) + ), + + [_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, + LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN) + ), + + [_GAME] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, KC_NO, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, KC_PGUP, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, MO(_WEAPON), KC_SPC, KC_ENT, KC_TRNS, KC_NO + ), + + [_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_TAB, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +//int RGB_current_mode; + +// [Process User Input] ------------------------------------------------------// +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Use process_record_keymap to reset timer on keypress + if (record->event.pressed) { + #ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + #endif + // Restore LEDs if they are enabled in eeprom + rgb_matrix_enable_noeeprom(); + } + return true; +} + +// [OLED Configuration] ------------------------------------------------------// +#ifdef OLED_DRIVER_ENABLE + +// Init Oled and Rotate.... +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!has_usb()) + return OLED_ROTATION_180; // flips the display 180 to see it from my side + return rotation; +} + +// Read logo from font file +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); +} + +// Master OLED Screen (Left Hand ) +void render_master_oled(void) { + // Switch display based on Layer + switch (get_highest_layer(layer_state)){ + case _GAME: + render_separator(); + render_layer_state(); + render_separator(); + render_separator(); + break; + case _WEAPON: + render_separator(); + render_separator(); + render_layer_state(); + render_separator(); + break; + default: + render_separator(); + render_layer_state(); + render_separator(); + render_usb_state(); + } +} + +// lave OLED scren (Right Hand) +void render_slave_oled(void) { + render_logo(); +} + +// {OLED Task} -----------------------------------------------// +void oled_task_user(void) { + // Drashna style timeout for LED and OLED Roughly 8mins + if (timer_elapsed32(oled_timer) > 480000) { + oled_off(); + rgb_matrix_disable_noeeprom(); + return; + } + else { + oled_on(); + } + // Show logo when USB dormant + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + case DEVICE_STATE_Powered: + case DEVICE_STATE_Suspended: + render_logo(); + break; + default: + if (is_master) { + render_master_oled(); + } else { + render_slave_oled(); + } + } +} +#endif diff --git a/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json b/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json new file mode 100644 index 000000000000..dd9895cce97c --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json @@ -0,0 +1 @@ +{"keyboard":"crkbd/rev1","keymap":"kidbrazil","layout":"LAYOUT","layers":[["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSPC","LCTL_T(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_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","LGUI_T(KC_PGUP)","MO(1)","KC_SPC","KC_ENT","MO(2)","LALT_T(KC_PGDN)"],["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_DEL","LCTL_T(KC_TAB)","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_LEFT","KC_UP","KC_DOWN","KC_RGHT","KC_F12","KC_NO","KC_LSFT","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_PGUP","KC_PGDN","KC_HOME","KC_END","KC_F11","KC_NO","LGUI_T(KC_PGUP)","KC_TRNS","KC_SPC","KC_ENT","KC_TRNS","LALT_T(KC_PGDN)"],["KC_ESC","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_BSPC","LCTL_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_LSFT","RGB_VAD","RGB_RMOD","RGB_HUD","RGB_SAD","TG(3)","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)"],["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_LSFT","KC_A","KC_S","KC_D","KC_F","KC_G","KC_F7","KC_F8","KC_F9","KC_F10","KC_NO","KC_NO","KC_LCTL","KC_Z","KC_X","KC_C","KC_V","KC_TRNS","KC_PGUP","KC_PGDN","KC_NO","KC_NO","KC_NO","KC_NO","KC_TAB","MO(4)","KC_SPC","KC_ENT","KC_TRNS","KC_NO"],["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_TAB","KC_TRNS","KC_SPC","KC_TRNS","KC_TRNS","KC_TRNS"]],"author":"","notes":""} \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c b/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c new file mode 100644 index 000000000000..1bc1503a6042 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c @@ -0,0 +1,11 @@ +#include "crkbd.h" + +const char *read_logo(void) { + static char 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}; + + return logo; +} diff --git a/keyboards/crkbd/keymaps/kidbrazil/rules.mk b/keyboards/crkbd/keymaps/kidbrazil/rules.mk new file mode 100644 index 000000000000..ad03b86bfcfa --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/rules.mk @@ -0,0 +1,17 @@ +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +MOUSEKEY_ENABLE = no +RGBLIGHT_ENABLE = no +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 \ From b2405fccce1d9dd33e72d2b43a941e9b6bbd1f0d Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Wed, 18 Dec 2019 08:46:49 +0000 Subject: [PATCH 080/973] [Keymap] Custom user keymap for Think6.5 with LED range control (#7603) * ISO layout for the soldered Think6.5 PCB * Think6.5 personal layout readme * Add personal Think6.5 user map with LED group cycling * Add default case to process_record_user * Make the ASCII diagram match the layer properly * Relocate KC_NUHS to the home row for consistency * Add LAYOUT_65_iso_badge to info.json * Wire up the badge LEDs as capslock LEDs * Remove unused keymap variable --- .../gray_studio/think65/solder/info.json | 74 ++++- .../think65/solder/keymaps/rys/keymap.c | 271 ++++++++++++++++++ .../think65/solder/keymaps/rys/readme.md | 11 + keyboards/gray_studio/think65/solder/solder.h | 16 +- 4 files changed, 369 insertions(+), 3 deletions(-) create mode 100644 keyboards/gray_studio/think65/solder/keymaps/rys/keymap.c create mode 100644 keyboards/gray_studio/think65/solder/keymaps/rys/readme.md diff --git a/keyboards/gray_studio/think65/solder/info.json b/keyboards/gray_studio/think65/solder/info.json index 0be5042538c9..cc87af41bba1 100644 --- a/keyboards/gray_studio/think65/solder/info.json +++ b/keyboards/gray_studio/think65/solder/info.json @@ -77,7 +77,77 @@ {"label":"K4F (E6,F6)", "x":15, "y":4} ] }, - + "LAYOUT_65_iso_badge": { + "key_count": 66, + "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":"K0C", "x":12, "y":0}, + {"label":"K0D", "x":13, "y":0, "w":2}, + {"label":"K0F", "x":15, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K12", "x":1.5, "y":1}, + {"label":"K13", "x":2.5, "y":1}, + {"label":"K14", "x":3.5, "y":1}, + {"label":"K15", "x":4.5, "y":1}, + {"label":"K16", "x":5.5, "y":1}, + {"label":"K17", "x":6.5, "y":1}, + {"label":"K18", "x":7.5, "y":1}, + {"label":"K19", "x":8.5, "y":1}, + {"label":"K1A", "x":9.5, "y":1}, + {"label":"K1B", "x":10.5, "y":1}, + {"label":"K1C", "x":11.5, "y":1}, + {"label":"K1D", "x":12.5, "y":1}, + {"label":"K1F", "x":15, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K22", "x":1.75, "y":2}, + {"label":"K23", "x":2.75, "y":2}, + {"label":"K24", "x":3.75, "y":2}, + {"label":"K25", "x":4.75, "y":2}, + {"label":"K26", "x":5.75, "y":2}, + {"label":"K27", "x":6.75, "y":2}, + {"label":"K28", "x":7.75, "y":2}, + {"label":"K29", "x":8.75, "y":2}, + {"label":"K2A", "x":9.75, "y":2}, + {"label":"K2B", "x":10.75, "y":2}, + {"label":"K2C", "x":11.75, "y":2}, + {"label":"K1E", "x":12.75, "y":2}, + {"label":"K2D", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"K30", "x":0, "y":3, "w":1.25}, + {"label":"K31", "x":1.25, "y":3}, + {"label":"K32", "x":2.25, "y":3}, + {"label":"K33", "x":3.25, "y":3}, + {"label":"K34", "x":4.25, "y":3}, + {"label":"K35", "x":5.25, "y":3}, + {"label":"K36", "x":6.25, "y":3}, + {"label":"K37", "x":7.25, "y":3}, + {"label":"K38", "x":8.25, "y":3}, + {"label":"K39", "x":9.25, "y":3}, + {"label":"K3A", "x":10.25, "y":3}, + {"label":"K3B", "x":11.25, "y":3}, + {"label":"K3D", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E", "x":14, "y":3}, + {"label":"K40", "x":0, "y":4, "w":1.25}, + {"label":"K41", "x":1.25, "y":4, "w":1.25}, + {"label":"K43", "x":2.5, "y":4, "w":1.25}, + {"label":"K46", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A", "x":10, "y":4, "w":1.25}, + {"label":"K4B", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D", "x":13, "y":4}, + {"label":"K4E", "x":14, "y":4}, + {"label":"K4F", "x":15, "y":4} + ] + }, "LAYOUT_all": { "key_count": 69, "layout": [ @@ -154,4 +224,4 @@ } } ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" -} \ No newline at end of file +} diff --git a/keyboards/gray_studio/think65/solder/keymaps/rys/keymap.c b/keyboards/gray_studio/think65/solder/keymaps/rys/keymap.c new file mode 100644 index 000000000000..658798ed6774 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/rys/keymap.c @@ -0,0 +1,271 @@ +/* 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 + +/* + * LED ranges + * ┌─────────────┬─────────────┬───────────────────────────────────────────┐ + * │ 00 01 02 03 │ 04 05 06 07 │ 08 09 10 11 12 13 14 15 16 17 18 19 20 21 │ + * │   escape    │    badge    │              underglow                    │ + * └─────────────┴─────────────┴───────────────────────────────────────────┘ + */ + +// Define the LED ranges start, end +#define THINK65_LED_RANGE_OFF 0, 0 +#define THINK65_LED_RANGE_ESC 0, 4 +#define THINK65_LED_RANGE_BADGE 4, 8 +#define THINK65_LED_RANGE_UNDERGLOW 8, 22 +#define THINK65_LED_RANGE_ALL 0, 22 + +// Turn the LEDs off by setting HSV to 0, 0, 0 +#define THINK65_LEDS_OFF 0, 0, 0 + +// There are 3 ranges, so we can store all combinations in 2^3 values +// Define all of them to make it easier to write the cycling code +#define THINK65_LED_STATE_OFF 0x0 // 0b00000000 +#define THINK65_LED_STATE_ESC 0x1 // 0b00000001 +#define THINK65_LED_STATE_BADGE 0x2 // 0b00000010 +#define THINK65_LED_STATE_UNDERGLOW 0x4 // 0b00000100 +#define THINK65_LED_STATE_ESC_AND_BADGE 0x3 // 0b00000011 +#define THINK65_LED_STATE_ESC_AND_UNDERGLOW 0x5 // 0b00000101 +#define THINK65_LED_STATE_BADGE_AND_UNDERGLOW 0x6 // 0b00000110 +#define THINK65_LED_STATE_ON 0x7 // 0b00000111 + +// Define each LED range as a bit flag +#define THINK65_LED_ESC_RANGE_BIT 0 +#define THINK65_LED_BADGE_RANGE_BIT 1 +#define THINK65_LED_UNDERGLOW_RANGE_BIT 2 + +// Setup some keycodes to control cycling and range toggling +enum rys_keycodes { + CYC_LED = SAFE_RANGE, + TOG_ESC, + TOG_BDG, + TOG_UGL +}; + +// setup the user EEPROM space we need +typedef union { + uint8_t raw; + struct { + uint8_t current_led_state:8; + }; +} user_config_t; + +user_config_t user_config; + +// toggle one of the range flag bits +void toggle_led_state(unsigned int led_range) { + if (led_range >= THINK65_LED_ESC_RANGE_BIT && led_range <= THINK65_LED_UNDERGLOW_RANGE_BIT) { + user_config.current_led_state ^= 1 << led_range; + } +} + +// set one of the range flag bits +void set_led_state(unsigned int led_range) { + if (led_range >= THINK65_LED_ESC_RANGE_BIT && led_range <= THINK65_LED_UNDERGLOW_RANGE_BIT) { + user_config.current_led_state |= 1 << led_range; + } +} + +// clear one of the range flag bits +void clear_led_state(unsigned int led_range) { + if (led_range >= THINK65_LED_ESC_RANGE_BIT && led_range <= THINK65_LED_UNDERGLOW_RANGE_BIT) { + user_config.current_led_state &= ~(1 << led_range); + } +} + +// cycle LED states: Off -> Esc -> Badge -> Underglow -> Esc+Badge -> Esc+Underglow -> Badge+Underglow -> All +void cycle_led_state(void) { + switch(user_config.current_led_state) { + case THINK65_LED_STATE_OFF: + user_config.current_led_state = THINK65_LED_STATE_ESC; + break; + case THINK65_LED_STATE_ESC: + user_config.current_led_state = THINK65_LED_STATE_BADGE; + break; + case THINK65_LED_STATE_BADGE: + user_config.current_led_state = THINK65_LED_STATE_UNDERGLOW; + break; + case THINK65_LED_STATE_UNDERGLOW: + user_config.current_led_state = THINK65_LED_STATE_ESC_AND_BADGE; + break; + case THINK65_LED_STATE_ESC_AND_BADGE: + user_config.current_led_state = THINK65_LED_STATE_ESC_AND_UNDERGLOW; + break; + case THINK65_LED_STATE_ESC_AND_UNDERGLOW: + user_config.current_led_state = THINK65_LED_STATE_BADGE_AND_UNDERGLOW; + break; + case THINK65_LED_STATE_BADGE_AND_UNDERGLOW: + user_config.current_led_state = THINK65_LED_STATE_ON; + break; + case THINK65_LED_STATE_ON: + user_config.current_led_state = THINK65_LED_STATE_OFF; + break; + default: + break; + } +} + +void apply_led_state(void) { + uint8_t h = rgblight_get_hue(); + uint8_t s = rgblight_get_sat(); + uint8_t v = rgblight_get_val(); + + // Set the RGB ranges based on the current state + switch(user_config.current_led_state) { + case THINK65_LED_STATE_OFF: + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_ALL); + break; + case THINK65_LED_STATE_ESC: + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_BADGE: + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_UNDERGLOW: + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_ESC_AND_BADGE: + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_ESC_AND_UNDERGLOW: + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_BADGE_AND_UNDERGLOW: + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_ON: + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_ALL); + break; + default: + break; + } +} + +void keyboard_post_init_user(void) { + user_config.raw = eeconfig_read_user(); + + if (user_config.current_led_state >= THINK65_LED_STATE_OFF && user_config.current_led_state <= THINK65_LED_STATE_ON) { + // If the current state read from user EEPROM is valid, apply it + apply_led_state(); + } else { + // Setup a new default state of off + user_config.current_led_state = THINK65_LED_STATE_OFF; + apply_led_state(); + eeconfig_update_user(user_config.raw); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CYC_LED: + if (record->event.pressed) { + cycle_led_state(); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + case TOG_ESC: + if (record->event.pressed) { + toggle_led_state(THINK65_LED_ESC_RANGE_BIT); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + case TOG_BDG: + if (record->event.pressed) { + toggle_led_state(THINK65_LED_BADGE_RANGE_BIT); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + case TOG_UGL: + if (record->event.pressed) { + toggle_led_state(THINK65_LED_UNDERGLOW_RANGE_BIT); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + case KC_CAPS: + if (!record->event.pressed) { + // connect capslock LED control to the badge LEDs + host_keyboard_led_state().caps_lock ? set_led_state(THINK65_LED_BADGE_RANGE_BIT) : clear_led_state(THINK65_LED_BADGE_RANGE_BIT); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + default: + break; + } + return true; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_badge( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │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 │ ; │ ' │ # │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤   │ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│LAlt│GUI │      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_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_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_badge( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │RST│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ TOG │PLN│MOD│HU+│HU-│SA+│SA-│VA+│VA-│   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤   │ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │CYC│   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │ESC│BDG│UGL│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CYC_LED, + _______, _______, _______, _______, _______, _______, TOG_ESC, TOG_BDG, TOG_UGL + ), + +}; diff --git a/keyboards/gray_studio/think65/solder/keymaps/rys/readme.md b/keyboards/gray_studio/think65/solder/keymaps/rys/readme.md new file mode 100644 index 000000000000..ed73e306472f --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/rys/readme.md @@ -0,0 +1,11 @@ +# Personal keymap for the Think 6.5 with compatible soldered PCB + +The layout is UK ISO with some small personal tweaks. + +The LED cycling code is based on code posted to the Gray Studio Discord by `MudkipMao` on Nov 22nd 2019. Thanks! + +## LED cycling + +This map saves and restores your current active LED group choice to user EEPROM and restores it on keyboard init, which you can cycle through all combinations of, or toggle individually. + +The cycle is `Off -> Esc -> Badge -> Underglow -> Esc+Badge -> Esc+Underglow -> Badge+Underglow -> All`. Look at the keymap for the controls on layer 1. diff --git a/keyboards/gray_studio/think65/solder/solder.h b/keyboards/gray_studio/think65/solder/solder.h index b77cc578b110..19ee551258ef 100644 --- a/keyboards/gray_studio/think65/solder/solder.h +++ b/keyboards/gray_studio/think65/solder/solder.h @@ -45,5 +45,19 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ } +#define LAYOUT_65_iso_badge( \ + 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, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K43, K46, 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, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, KC_NO }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} + // 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/ From f42dd61b8d29f71af2ce479064c64c96fef55ad4 Mon Sep 17 00:00:00 2001 From: Eric Defore Date: Wed, 18 Dec 2019 03:59:12 -0500 Subject: [PATCH 081/973] [Keymap] Added userspace for d4mation. Included their keymap for the Atreus62 (#7483) * Added userspace for d4mation. Included their keymap for the Atreus62 * Do not assign layer numbers manually * Remove some unneeded things per @drashna's recommendation * Fix some single line comments I missed * Update unicode macros to use send_unicode_hex_string() instead of process_unicode() * OBetter check for Unicode Enabled. Moved some checks into macros.c * Use eeconfig_init_user() to set default unicode input mode --- keyboards/atreus62/keymaps/d4mation/keymap.c | 196 ++++++++++++++++++ keyboards/atreus62/keymaps/d4mation/readme.md | 40 ++++ keyboards/atreus62/keymaps/d4mation/rules.mk | 2 + users/d4mation/config.h | 1 + users/d4mation/d4mation.c | 37 ++++ users/d4mation/d4mation.h | 17 ++ users/d4mation/macros.c | 160 ++++++++++++++ users/d4mation/macros.h | 23 ++ users/d4mation/rules.mk | 15 ++ users/d4mation/tap-dance.c | 6 + users/d4mation/tap-dance.h | 7 + users/d4mation/tap-hold.c | 28 +++ users/d4mation/tap-hold.h | 5 + users/d4mation/zalgo.c | 21 ++ users/d4mation/zalgo.h | 5 + 15 files changed, 563 insertions(+) create mode 100644 keyboards/atreus62/keymaps/d4mation/keymap.c create mode 100644 keyboards/atreus62/keymaps/d4mation/readme.md create mode 100644 keyboards/atreus62/keymaps/d4mation/rules.mk create mode 100644 users/d4mation/config.h create mode 100644 users/d4mation/d4mation.c create mode 100644 users/d4mation/d4mation.h create mode 100644 users/d4mation/macros.c create mode 100644 users/d4mation/macros.h create mode 100644 users/d4mation/rules.mk create mode 100644 users/d4mation/tap-dance.c create mode 100644 users/d4mation/tap-dance.h create mode 100644 users/d4mation/tap-hold.c create mode 100644 users/d4mation/tap-hold.h create mode 100644 users/d4mation/zalgo.c create mode 100644 users/d4mation/zalgo.h diff --git a/keyboards/atreus62/keymaps/d4mation/keymap.c b/keyboards/atreus62/keymaps/d4mation/keymap.c new file mode 100644 index 000000000000..63b9d6142d29 --- /dev/null +++ b/keyboards/atreus62/keymaps/d4mation/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H +#include "d4mation.h" + +enum layer_names { + _DVR, + _QWR, + _LOWER, + _RAISE, + _NUM, + _ADJUST +}; + +enum keymap_custom_keycodes { + LOWER = NEW_SAFE_RANGE, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Default/Dvorak layer + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | / | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I |,------.,------.| D | H | T | N | S | - | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * |Shift | ; | Q | J | K | X ||Super ||Enter || B | M | W | V | Z | \ | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | NUM | Alt | Home | End |Lower | Bksp |`------'`------'|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_DVR] = LAYOUT( + _GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + TD(SHIFT_CAPS), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSLS, + TG(_NUM), KC_RALT, KC_HOME, KC_END, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + /* Qwerty layer, more "standard" for other people who may need to use my keyboard or for games where using Qwerty is just easier + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G |,------.,------.| H | J | K | L | ; | ' | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * |Shift | Z | X | C | V | B ||Super ||Enter || N | M | , | . | / | = | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | NUM | Alt | Home | End |Lower | Bksp |`------'`------'|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_QWR] = LAYOUT( + _GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + TD(SHIFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL, + TG(_NUM), KC_RALT, KC_HOME, KC_END, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + /* "Lower" layer + * ,-----------------------------------------. ,-----------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | |SLEEP | | | | | SCRGB| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |,------.,------.| | | | { | } | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | | | | | || || || | Mute | VolD | VolU | | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | |PageUp|PgDown| | Del |`------'`------'| Ins | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_LOWER] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, + _______, _______, _______, _______, SLEEP, _______, _______, _______, SCRGB, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, KC_PGUP, KC_PGDN, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______, _______ + ), + + /* "Raise" layer + * ,-----------------------------------------. ,-----------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | || ?> | | | |ZALGO | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Shrug|Lenny |Magic |Disfac| |,------.,------.| | | | [ | ] | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | Ameno| Tflip| Tput | | || || || | Prev | Play | Next | | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | |PageUp|PgDown| | Del |`------'`------'| Ins | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_RAISE] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, + _______, _______, PHPOPEN, PHPCLSE, _______, _______, ZALGO, _______, _______, _______, _______, _______, + _______, SHRUG, LENNY, MAGIC, DISFACE, _______, _______, _______, _______, KC_LBRC, KC_RBRC,_______, + _______, AMENO, TFLIP, TPUT, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + _______, _______, KC_PGUP, KC_PGDN, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______, _______ + ), + + /* "Numpad" layer + * ,-----------------------------------------. ,-----------------------------------------. + * | | | / | * | - | | | | | / | * | - | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 7 | 8 | 9 | + | | | | 7 | 8 | 9 | + | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | |,------.,------.| | 4 | 5 | 6 | + | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | 1 | 2 | 3 | Enter| || || || | 1 | 2 | 3 | Enter| | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | 0 | 0 | . | Enter| |`------'`------'| | 0 | 0 | . | Enter| | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_NUM] = LAYOUT( + _______, _______, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, + _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, + _______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______ + ), + + /* "Adjust" layer, only active if both "Lower" and "Raise" are active at the same time + * All unused keys are blanked out for this layer + * ,-----------------------------------------. ,-----------------------------------------. + * | NO | NO | NO | NO | NO | NO | | NO | NO | NO | NO | NO | NO | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | NO |RESET | NO | NO | NO | NO | | NO | NO | NO | NO | NO | NO | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | NO | NO | NO |UC WIN|UC OSX| NO |,------.,------.| NO |Dvorak|Qwerty| NO | NO | NO | + * |------+------+------+------+------+------|| Swap || ||------+------+------+------+------+------| + * | NO | NO | NO | NO | NO | NO || to || Swap || NO | NO | NO | NO | NO | NO | + * |------+------+------+------+------+------|| Ctrl || Back ||------+------+------+------+------+------| + * | NO | NO | NO | NO | | NO |`------'`------'| NO | | NO | NO | NO | NO | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, UC_M_WI, UC_M_OS, XXXXXXX, XXXXXXX, DF(_DVR),DF(_QWR),XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, CG_SWAP, CG_NORM, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + +}; + +/* Runs just one time when the keyboard initializes. */ +void eeconfig_init_keymap( void ) { + set_unicode_input_mode( UC_OSX ); +}; + +bool process_record_keymap( 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; + +}; \ No newline at end of file diff --git a/keyboards/atreus62/keymaps/d4mation/readme.md b/keyboards/atreus62/keymaps/d4mation/readme.md new file mode 100644 index 000000000000..5642e8e43289 --- /dev/null +++ b/keyboards/atreus62/keymaps/d4mation/readme.md @@ -0,0 +1,40 @@ +# d4mation's keymap for the Atreus62 + +This is a bit of a work in-progress, but for the most part I like what I have done here. + +I switched to Dvorak some time ago and software-based support in most OS's for Dvorak isn't very great, so this keymap by default is set to Dvorak. + +## Table of Contents + +* [Layers](#layers) + - [Base layer](#base) + - [Num](#num) + - [Lower](#lower) + - [Raise](#raise) + - [Adjust](#adjust) + +# Layers + +## Base + +* By default, this layer is Dvorak. But using the Adjust layer you can switch to Qwerty +* Double-tapping Shift enables and disables Caps Lock +* Quickly tapping the Grave accent key will output a Grave Accent, but holding it for 200ms will output the ESC key instead + +## Num + +This layer gets toggled off and on to place a numpad on both the left and right sides of the keyboard. + +## Lower + +This layer holds some handy shortcuts that I use often, like the screen grab shortcut and sleep shortcut in OS X. + +It also has quick access to {} as they are inaccessible in the base layer + +## Raise + +Aside from quick access to [] and Play/Pause/Next/Previous, this layer is mostly just goofy things I decided to program into the keyboard because I could. There's a bunch of [kaomoji](https://en.wikipedia.org/wiki/Emoticon#Japanese_style_(kaomoji))/"unicode smileys" and I added a toggle switch to enable a [Zalgo Text](https://zalgo.org/) mode. + +## Adjust + +This layer is a "here be dragons" layer. It can only be accessed by holding down the keys for Lower and Raise at the same time. I added exclusively keys that drastically transformed the keyboard's layout or function on this layer. The ability to switch to Qwerty is on this layer, a way to switch CTRL and CMD back and forth is on this layer, and a hotkey to enter bootloader mode also exists. diff --git a/keyboards/atreus62/keymaps/d4mation/rules.mk b/keyboards/atreus62/keymaps/d4mation/rules.mk new file mode 100644 index 000000000000..517f2700e142 --- /dev/null +++ b/keyboards/atreus62/keymaps/d4mation/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/users/d4mation/config.h b/users/d4mation/config.h new file mode 100644 index 000000000000..3140a036f718 --- /dev/null +++ b/users/d4mation/config.h @@ -0,0 +1 @@ +#define FORCE_NKRO \ No newline at end of file diff --git a/users/d4mation/d4mation.c b/users/d4mation/d4mation.c new file mode 100644 index 000000000000..5aa58a9f0d76 --- /dev/null +++ b/users/d4mation/d4mation.c @@ -0,0 +1,37 @@ +#include "d4mation.h" + +__attribute__ ((weak)) +bool process_record_keymap( uint16_t keycode, keyrecord_t *record ) { + /* If you want macros specific to your keymap, you need to define this function in your keymap */ + return true; +} + +__attribute__ ((weak)) +void matrix_init_keymap() { + /* If you want a matrix init specific to your keymap, you need to define this function in your keymap */ +} + +__attribute__ ((weak)) +void matrix_scan_keymap() { + /* If you want a matrix scan specific to your keymap, you need to define this function in your keymap */ +} + +__attribute__((weak)) +void eeconfig_init_keymap( void ) {} + +/* process_record_user() is called in macros.c */ + +void matrix_init_user( void ) { + matrix_init_keymap(); +} + +void matrix_scan_user( void ) { + matrix_scan_keymap(); +} + +void eeconfig_init_user( void ) { + + eeconfig_init_keymap(); + keyboard_init(); + +} \ No newline at end of file diff --git a/users/d4mation/d4mation.h b/users/d4mation/d4mation.h new file mode 100644 index 000000000000..94c63526dbda --- /dev/null +++ b/users/d4mation/d4mation.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#ifdef UNICODE_ENABLE +#include "macros.h" +#endif + +#ifdef TAP_DANCE_ENABLE +#include "tap-dance.h" +#endif + +bool process_record_keymap( uint16_t keycode, keyrecord_t *record ); + +void matrix_init_keymap( void ); + +void matrix_scan_keymap( void ); \ No newline at end of file diff --git a/users/d4mation/macros.c b/users/d4mation/macros.c new file mode 100644 index 000000000000..3c115d7ead55 --- /dev/null +++ b/users/d4mation/macros.c @@ -0,0 +1,160 @@ +#include "d4mation.h" +#include "tap-hold.h" +#include "zalgo.h" +#include "macros.h" + +bool zalgo_enabled = false; + +bool process_record_user( uint16_t keycode, keyrecord_t *record ) { + + switch ( keycode ) { + + case _GRAVE_ESC: + + /* Send ` on Tap, Esc on Hold */ + tap_or_hold( record, KC_GRAVE, KC_ESC ); + + return false; + break; + + case PHPOPEN: + + if ( record->event.pressed ) { + + tap_code16( S( KC_COMMA ) ); + tap_code16( S( KC_SLASH ) ); + + tap_code( KC_P ); + tap_code( KC_H ); + tap_code( KC_P ); + + } + + return false; + break; + + case PHPCLSE: + + if ( record->event.pressed ) { + tap_code16( S( KC_SLASH ) ); + tap_code16( S( KC_DOT ) ); + } + + return false; + break; + + #ifdef UNICODE_ENABLE + + case AMENO: /* ༼ つ ◕_◕ ༽つ */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "0F3C 0020 3064 0020 25D5 005F 25D5 0020 0F3D 3064" ); + + } + + return false; + break; + + case MAGIC: /* (∩ ͡° ͜ʖ ͡°)⊃━☆゚. * */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "0028 2229 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029 2283 2501 2606 FF9F 002E 0020 002A" ); + + } + + return false; + break; + + case LENNY: /* ( ͡° ͜ʖ ͡°) */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "0028 0020 0361 00B0 0020 035C 0296 0020 0361 00b0 0029" ); + + } + + return false; + break; + + case DISFACE: /* ಠ_ಠ */ + + if ( record->event.pressed ) { + send_unicode_hex_string( "0CA0 005F 0CA0" ); + } + + return false; + break; + + case TFLIP: /* (╯°□°)╯ ︵ ┻━┻ */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "0028 256F 00b0 25A1 00B0 0029 256F FE35 253B 2501 253B" ); + + } + + return false; + break; + + case TPUT: /* ┬──┬ ノ( ゜-゜ノ) */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "252C 2500 2500 252C 0020 30CE 0028 0020 309C 002D 309C 30CE 0029" ); + + } + + return false; + break; + + case SHRUG: /* ¯\_(ツ)_/¯ */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "00AF 005C 005F 0028 30C4 0029 005F 002F 00AF" ); + + } + + return false; + break; + + case ZALGO: /* Toggles Zalgo Text mode */ + + if ( record->event.pressed ) { + zalgo_enabled = ! zalgo_enabled; + } + + return false; + break; + + #endif + + default: + + #ifdef UNICODE_ENABLE + + if ( zalgo_enabled ) { + + if ( keycode < KC_A || ( keycode > KC_0 && keycode < KC_MINUS ) || keycode > KC_SLASH ) { + process_record_keymap( keycode, record ); + return true; + } + + if ( record->event.pressed ) { + zalgo_text( keycode ); + } + + return false; + } + + #endif + + break; + } + + process_record_keymap( keycode, record ); + return true; + +}; \ No newline at end of file diff --git a/users/d4mation/macros.h b/users/d4mation/macros.h new file mode 100644 index 000000000000..e69d30dec27b --- /dev/null +++ b/users/d4mation/macros.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" +#include "tap-hold.h" +#include "zalgo.h" + +#define SCRGB LCTL( LSFT( LGUI( KC_4 ) ) ) /* Mac Screen Area Grab shortcut (Puts into Clipboard) */ +#define SLEEP LALT( LGUI( KC_SYSTEM_POWER ) ) /* Instant sleep on Mac, rather than having to hold down the button */ + +enum custom_keycodes { + _GRAVE_ESC = SAFE_RANGE, /* Prefixed with underscore to prevent conflicts */ + PHPOPEN, /* */ + AMENO, + MAGIC, + LENNY, + DISFACE, + TFLIP, + TPUT, + SHRUG, + ZALGO, + NEW_SAFE_RANGE +}; \ No newline at end of file diff --git a/users/d4mation/rules.mk b/users/d4mation/rules.mk new file mode 100644 index 000000000000..3d65a2242b90 --- /dev/null +++ b/users/d4mation/rules.mk @@ -0,0 +1,15 @@ +SRC += d4mation.c \ + tap-hold.c \ + macros.c + +BOOTMAGIC_ENABLE = no +LTO_ENABLE = yes +MOUSEKEY_ENABLE = no + +ifeq ($(strip $(UNICODE_ENABLE)), yes) + SRC += zalgo.c +endif + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap-dance.c +endif \ No newline at end of file diff --git a/users/d4mation/tap-dance.c b/users/d4mation/tap-dance.c new file mode 100644 index 000000000000..46f2274f5f08 --- /dev/null +++ b/users/d4mation/tap-dance.c @@ -0,0 +1,6 @@ +#include "tap-dance.h" + +qk_tap_dance_action_t tap_dance_actions[] = { + /* Tap once/hold for Shift, tap twice for Caps Lock */ + [SHIFT_CAPS] = ACTION_TAP_DANCE_DOUBLE( KC_LSHIFT, KC_CAPS ) +}; \ No newline at end of file diff --git a/users/d4mation/tap-dance.h b/users/d4mation/tap-dance.h new file mode 100644 index 000000000000..0087c4a6e7a8 --- /dev/null +++ b/users/d4mation/tap-dance.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +enum tap_dance { + SHIFT_CAPS = 0 +}; \ No newline at end of file diff --git a/users/d4mation/tap-hold.c b/users/d4mation/tap-hold.c new file mode 100644 index 000000000000..0c5119f995dd --- /dev/null +++ b/users/d4mation/tap-hold.c @@ -0,0 +1,28 @@ +#include "tap-hold.h" + +#ifndef TAP_HOLD_TIME +#define TAP_HOLD_TIME 200 +#endif + +uint16_t tap_hold_timer; + +void tap_or_hold( keyrecord_t *record, uint16_t tap, uint16_t hold ) { + + if ( record->event.pressed ) { + tap_hold_timer = timer_read(); + } else { + + if ( tap_hold_timer && + timer_elapsed( tap_hold_timer ) > TAP_HOLD_TIME ) { + /* Held down then released */ + tap_code( hold ); + } else { + /* Quickly Tapped */ + tap_code( tap ); + } + + tap_hold_timer = 0; + + } + +} \ No newline at end of file diff --git a/users/d4mation/tap-hold.h b/users/d4mation/tap-hold.h new file mode 100644 index 000000000000..52dc0830f8b5 --- /dev/null +++ b/users/d4mation/tap-hold.h @@ -0,0 +1,5 @@ +#pragma once + +#include "quantum.h" + +void tap_or_hold( keyrecord_t *record, uint16_t tap, uint16_t hold ); \ No newline at end of file diff --git a/users/d4mation/zalgo.c b/users/d4mation/zalgo.c new file mode 100644 index 000000000000..3a1688e05385 --- /dev/null +++ b/users/d4mation/zalgo.c @@ -0,0 +1,21 @@ +#include "zalgo.h" + +void zalgo_text( uint16_t keycode ) { + + tap_code( keycode ); + + int number = ( rand() % ( 8 + 1 - 2 ) ) + 2; + unsigned int index; + + unicode_input_start(); + + for ( index = 0; index < number; index++ ) { + + uint16_t hex = ( rand() % ( 0x036F + 1 - 0x0300 ) ) + 0x0300; + register_hex( hex ); + + } + + unicode_input_finish(); + +} \ No newline at end of file diff --git a/users/d4mation/zalgo.h b/users/d4mation/zalgo.h new file mode 100644 index 000000000000..f59fc035b9e1 --- /dev/null +++ b/users/d4mation/zalgo.h @@ -0,0 +1,5 @@ +#pragma once + +#include "quantum.h" + +void zalgo_text( uint16_t keycode ); \ No newline at end of file From 593bfc86a10f8a5e59465eb4440ecc2c9cee66b7 Mon Sep 17 00:00:00 2001 From: ihotsuno <52576847+ihotsuno@users.noreply.github.com> Date: Thu, 19 Dec 2019 03:13:27 +0900 Subject: [PATCH 082/973] I corrected my name. --- keyboards/fluorite/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/fluorite/readme.md b/keyboards/fluorite/readme.md index 959b2443f445..d55252c94a8b 100644 --- a/keyboards/fluorite/readme.md +++ b/keyboards/fluorite/readme.md @@ -6,7 +6,7 @@ Fluorite is a chaotic keyboard consisting of staggered rows, staggered columns, and ortholinear. -* Keyboard Maintainer: [mahuyu ihotsuno](https://github.com/ihotsuno) [@ihotsuno](https://twitter.com/ihotsuno) +* Keyboard Maintainer: [mafuyu ihotsuno](https://github.com/ihotsuno) [@ihotsuno](https://twitter.com/ihotsuno) * Hardware Supported: fluorite CXL PCB, ProMicro * Hardware Availability: [ten key](https://tenkey.connpass.com/), [booth.pm](https://ihotsuno.booth.pm/) From 3f696664d67c96e5e39d426c1a10feba9fe2e3d4 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 19 Dec 2019 08:30:51 +1100 Subject: [PATCH 083/973] Missed these LTO blocks --- keyboards/dztech/dz60rgb_wkl/v1/config.h | 6 ++++++ keyboards/dztech/dz60rgb_wkl/v2/config.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h index 363f463ec0b5..f7195a1c7dbd 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h @@ -32,6 +32,12 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + #ifdef RGB_MATRIX_ENABLE # 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 diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h index a180e7714109..7dace7b1e871 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h @@ -32,6 +32,12 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE +# define NO_ACTION_MACRO +# define NO_ACTION_FUNCTION +#endif + #ifdef RGB_MATRIX_ENABLE # 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 From adf4acf5967e9dd50eac1583ead1fa796487882c Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Thu, 19 Dec 2019 21:50:59 -0800 Subject: [PATCH 084/973] [Keyboard] Clueboard 60 fix col 11 12 mixup (#7685) * Fix reversed col 11 and 12 - the two columns are reversed in the matrix * Fix gui * Fix reversed col 11 and 12 - the two columns are reversed in the matrix --- keyboards/clueboard/60/config.h | 2 +- layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/clueboard/60/config.h b/keyboards/clueboard/60/config.h index aa544c70bbad..f0e157ff1488 100644 --- a/keyboards/clueboard/60/config.h +++ b/keyboards/clueboard/60/config.h @@ -47,7 +47,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 } +#define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C15, C14, C13, B5, B6 } #define UNUSED_PINS { A0, A1, A9, B7, B8, B9, B10, B11, B12, B13 } #define DIODE_DIRECTION COL2ROW 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 73d6789c1b38..5e5d16390923 100644 --- a/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c @@ -13,7 +13,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, \ LCTL_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, 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(YFL), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RGUI, KC_RALT, MO(FN), KC_RCTL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT, MO(FN), KC_RCTL), [FN] = 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, \ From 52c18ef0265a8bb4b521b787f425c906a9180ef9 Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 21 Dec 2019 20:00:22 +0900 Subject: [PATCH 085/973] [Docs] fix docs (#7642) * [Docs] recurse-submodules option is need now * [Docs] `tmk_core` folder is correct * [Docs] fix typo * [Docs] package scope has changed * [Docs] Fix menu differences * Update docs/arm_debugging.md Co-Authored-By: fauxpark * Update docs/arm_debugging.md Co-Authored-By: fauxpark * fix typo Co-authored-by: fauxpark --- docs/arm_debugging.md | 22 ++++++++++---------- docs/fr-fr/getting_started_github.md | 22 ++++++++++++-------- docs/fr-fr/getting_started_introduction.md | 2 +- docs/getting_started_github.md | 20 +++++++++++------- docs/he-il/getting_started_github.md | 24 ++++++++++++++-------- docs/he-il/getting_started_introduction.md | 4 ++-- docs/ja/arm_debugging.md | 20 +++++++++--------- docs/ja/getting_started_github.md | 20 +++++++++++------- docs/ru-ru/getting_started_github.md | 22 ++++++++++++-------- docs/ru-ru/getting_started_introduction.md | 2 +- docs/zh-cn/getting_started_github.md | 22 ++++++++++++-------- docs/zh-cn/getting_started_introduction.md | 2 +- 12 files changed, 109 insertions(+), 73 deletions(-) diff --git a/docs/arm_debugging.md b/docs/arm_debugging.md index 448b7a8fcc36..04887d88b7c4 100644 --- a/docs/arm_debugging.md +++ b/docs/arm_debugging.md @@ -1,4 +1,4 @@ -# ARM Debugging usign Eclipse +# ARM Debugging using Eclipse This page describes how to setup debugging for ARM MCUs using an SWD adapter and open-source/free tools. In this guide we will install GNU MCU Eclipse IDE for C/C++ Developers and OpenOCD together with all the necessary dependencies. @@ -18,7 +18,7 @@ XPM installation instructions can be found [here](https://www.npmjs.com/package/ ### The ARM Toolchain -Using XPM it is very easy to install the ARM toolchain. Enter the command `xpm install --global @gnu-mcu-eclipse/arm-none-eabi-gcc`. +Using XPM it is very easy to install the ARM toolchain. Enter the command `xpm install --global @xpack-dev-tools/arm-none-eabi-gcc`. ### Windows build tools @@ -33,7 +33,7 @@ If you have an ST-Link the drivers can be found [here](https://www.st.com/en/dev ### OpenOCD -This dependency allows SWD access from GDB and it is essential for debugging. Run `xpm install --global @gnu-mcu-eclipse/openocd`. +This dependency allows SWD access from GDB and it is essential for debugging. Run `xpm install --global @xpack-dev-tools/openocd`. ### Java @@ -45,17 +45,17 @@ Now its finally time to install the IDE. Use the Release page [here](https://git ## Configuring Eclipse -Open up the Eclipse IDE we just downloaded. To import our QMK directory select File -> Import -> C/C++ -> Existing code as Makefile Project. Select next and use Browse to select your QMK folder. In the tool-chain list select ARM Cross GCC and select Finish. +Open up the Eclipse IDE we just downloaded. To import our QMK directory select File -> Import -> C/C++ -> Existing Code as Makefile Project. Select Next and use Browse to select your QMK folder. In the tool-chain list select ARM Cross GCC and select Finish. -Now you can see the QMK folder on the left hand side. Right click it and select Properties. On the left hand side, expand MCU and select ARM Toolchain Paths. Press xPack and OK. Repeat for OpenOCD Path and if you are on windows for Build Tool Path. Select Apply and Close. +Now you can see the QMK folder on the left hand side. Right click it and select Properties. On the left hand side, expand MCU and select ARM Toolchains Paths. Press xPack and OK. Repeat for OpenOCD Path and if you are on Windows for Build Tools Path. Select Apply and Close. -Now its time to install the necessary MCU packages. Go to Packs perspective by selecting Window -> Open Perspective -> Others -> Packs. Now select the yellow refresh symbol next to the Packs tab. This will take a long time as it is requesting the MCU definitions from various places. If some of the links fail you can probably select Ignore. +Now its time to install the necessary MCU packages. Go to Packs perspective by selecting Window -> Perspective -> Open Perspective -> Other... -> Packs. Now select the yellow refresh symbol next to the Packs tab. This will take a long time as it is requesting the MCU definitions from various places. If some of the links fail you can probably select Ignore. -When this finishes you must find the MCU which we will be building/debugging for. In this example I will be using the STM32F3 series MCUs. On the left, select STMicroelectonics -> STM32F3 Series. On the middle window we can see the pack. Right click and select Install. Once that is done we can go back to the default perspective, Window -> Open Perspective -> Others -> C/C++. +When this finishes you must find the MCU which we will be building/debugging for. In this example I will be using the STM32F3 series MCUs. On the left, select STMicroelectronics -> STM32F3 Series. On the middle window we can see the pack. Right click and select Install. Once that is done we can go back to the default perspective, Window -> Perspective -> Open Perspective -> Other... -> C/C++. -We need to let eclipse know the device we intent to build QMK on. Right click on the QMK folder -> Properties -> C/C++ Build -> Settings. Select the Devices tab and under devices select the appropriate variant of your MCU. For my example it is STM32F303CC +We need to let eclipse know the device we intent to build QMK on. Right click on the QMK folder -> Properties -> C/C++ Build -> Settings. Select the Devices tab and under Devices select the appropriate variant of your MCU. For my example it is STM32F303CC -While we are here let's setup the build command as well. Select C/C++ Build and then the Behavior tab. On the build command, replace `all` with your necessary make command. For example for a rev6 Planck with the default keymap this would be `planck/rev6:default`. Select Apply and Close. +While we are here let's setup the build command as well. Select C/C++ Build and then the Behavior tab. On the Build command, replace `all` with your necessary make command. For example for a rev6 Planck with the default keymap this would be `planck/rev6:default`. Select Apply and Close. ## Building @@ -71,7 +71,7 @@ NOTE: Make sure the SWCLK and SWDIO pins are not used in the matrix of your keyb ### Configuring the Debugger -Right click on your QMK folder, select Debug As -> Debug Configuration. Here double click on GDB OpenOCD Debugging. Select the debugger tab and enter the configuration necessary for your MCU. This might take some fiddling and googleing to find out. The default script for the STM32F3 is called stm32f3discovery.cfg. To let OpenOCD know, in the Config options enter `-f board/stm32f3discovery.cfg`. +Right click on your QMK folder, select Debug As -> Debug Configurations... . Here double click on GDB OpenOCD Debugging. Select the Debugger tab and enter the configuration necessary for your MCU. This might take some fiddling and Googling to find out. The default script for the STM32F3 is called `stm32f3discovery.cfg`. To let OpenOCD know, in the Config options enter `-f board/stm32f3discovery.cfg`. NOTE: In my case this configuration script requires editing to disable the reset assertion. The locations of the scripts can be found in the actual executable field usually under the path `openocd/version/.content/scripts/board`. Here I edited `reset_config srst_only` to `reset_config none`. @@ -81,7 +81,7 @@ Select Apply and Close. Reset your keyboard. -Press the bug icon and if all goes well you should soon find yourself in the debug perspective. Here the program counter will pause at the beginning of the main function and way for you to press Play. Most of the features of all debuggers work on ARM MCUs but for exact details google is your friend! +Press the bug icon and if all goes well you should soon find yourself in the Debug perspective. Here the program counter will pause at the beginning of the main function and wait for you to press Play. Most of the features of all debuggers work on Arm MCUs but for exact details Google is your friend! Happy debugging! diff --git a/docs/fr-fr/getting_started_github.md b/docs/fr-fr/getting_started_github.md index 22c6ee749ba4..48755625a78b 100644 --- a/docs/fr-fr/getting_started_github.md +++ b/docs/fr-fr/getting_started_github.md @@ -16,17 +16,23 @@ Faites attention à sélectionner "HTTPS", et sélectionnez le lien et copiez-le ![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) -Ensuite, entrez `git clone` dans la ligne de commande, et collez votre lien: +Ensuite, entrez `git clone --recurse-submodules ` dans la ligne de commande, et collez votre lien: ``` -user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git Cloning into 'qmk_firmware'... -remote: Counting objects: 46625, done. -remote: Compressing objects: 100% (2/2), done. -remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 -Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. -Resolving deltas: 100% (29362/29362), done. -Checking out files: 100% (2799/2799), done. +remote: Enumerating objects: 9, done. +remote: Counting objects: 100% (9/9), done. +remote: Compressing objects: 100% (5/5), done. +remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874 +Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done. +Resolving deltas: 100% (119972/119972), done. +... +Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b' +Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' +Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' +Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' +Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit: diff --git a/docs/fr-fr/getting_started_introduction.md b/docs/fr-fr/getting_started_introduction.md index a7f0ff96af4d..b2711a1671eb 100644 --- a/docs/fr-fr/getting_started_introduction.md +++ b/docs/fr-fr/getting_started_introduction.md @@ -4,7 +4,7 @@ Le but de cette page est d'expliquer les informations de base qui vous serons n ## Structure de base de QMK -QMK est un fork du projet [tmk_keyboard](https://github.com/tmk/tmk_keyboard) créé par [Jun Wako](https://github.com/tmk). Le code originel de TMK, avec quelques modifications, se trouve dans le dossier `tmk`. Les additions que QMK amène au projet se trouvent dans le dossier `quantum`. Les projets de clavier se trouvent dans les dossiers `handwired` et `keyboard`. +QMK est un fork du projet [tmk_keyboard](https://github.com/tmk/tmk_keyboard) créé par [Jun Wako](https://github.com/tmk). Le code originel de TMK, avec quelques modifications, se trouve dans le dossier `tmk_core`. Les additions que QMK amène au projet se trouvent dans le dossier `quantum`. Les projets de clavier se trouvent dans les dossiers `handwired` et `keyboard`. ### Structure du Userspace diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md index 629f4ece26aa..07f523f57811 100644 --- a/docs/getting_started_github.md +++ b/docs/getting_started_github.md @@ -16,17 +16,23 @@ And be sure to select "HTTPS", and select the link and copy it: ![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) -From here, enter `git clone ` into the command line, and then paste your link: +From here, enter `git clone --recurse-submodules ` into the command line, and then paste your link: ``` user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git Cloning into 'qmk_firmware'... -remote: Counting objects: 46625, done. -remote: Compressing objects: 100% (2/2), done. -remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 -Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. -Resolving deltas: 100% (29362/29362), done. -Checking out files: 100% (2799/2799), done. +remote: Enumerating objects: 9, done. +remote: Counting objects: 100% (9/9), done. +remote: Compressing objects: 100% (5/5), done. +remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874 +Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done. +Resolving deltas: 100% (119972/119972), done. +... +Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b' +Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' +Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' +Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' +Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this: diff --git a/docs/he-il/getting_started_github.md b/docs/he-il/getting_started_github.md index 55602c81426d..e5d0f7c7829c 100644 --- a/docs/he-il/getting_started_github.md +++ b/docs/he-il/getting_started_github.md @@ -17,19 +17,25 @@ Github עלול להיות קצת טריקי למי שלא מכיר את העב ![קישור HTTPS](http://i.imgur.com/eGO0ohO.jpg) -מכאן והלאה, הקיש `git clone ` בשורת הפקודה והדביקו את הלינק שלכם: +מכאן והלאה, הקיש `git clone --recurse-submodules ` בשורת הפקודה והדביקו את הלינק שלכם:
``` -user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git Cloning into 'qmk_firmware'... -remote: Counting objects: 46625, done. -remote: Compressing objects: 100% (2/2), done. -remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 -Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. -Resolving deltas: 100% (29362/29362), done. -Checking out files: 100% (2799/2799), done. +remote: Enumerating objects: 9, done. +remote: Counting objects: 100% (9/9), done. +remote: Compressing objects: 100% (5/5), done. +remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874 +Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done. +Resolving deltas: 100% (119972/119972), done. +... +Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b' +Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' +Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' +Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' +Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ```
@@ -66,4 +72,4 @@ To https://github.com/whoeveryouare/qmk_firmware.git ![צרו Pull Request](http://i.imgur.com/Ojydlaj.jpg) אחרי שהגשתם, אנו עלולים לפנות אליכם לגבי השינויים שהצעתם, נבקש שתבצעו שינויים ובסופו של דבר נקבל את השינויים! תודה שתרמתם לפרוייקט QMK :) - \ No newline at end of file + diff --git a/docs/he-il/getting_started_introduction.md b/docs/he-il/getting_started_introduction.md index 4b7f56b2a7e0..fca86bdaaf49 100644 --- a/docs/he-il/getting_started_introduction.md +++ b/docs/he-il/getting_started_introduction.md @@ -5,7 +5,7 @@ ## מבנה QMK בסיסי -QMK הוא פורק של הפרוייקט [tmk_keyboard](https://github.com/tmk/tmk_keyboard) של [Jun Wako](https://github.com/tmk). קוד הTMK המקורי, עם התאמות, יכול להמצא בתיקיית `tmk`. התוספות של QMK לפרוייקט יכולות להמצא בתיקיית `quantum`. פרוייקטי מקלדות יכולות להמצא בתיקיות `handwired` ו- `keyboard`. +QMK הוא פורק של הפרוייקט [tmk_keyboard](https://github.com/tmk/tmk_keyboard) של [Jun Wako](https://github.com/tmk). קוד הTMK המקורי, עם התאמות, יכול להמצא בתיקיית `tmk_core`. התוספות של QMK לפרוייקט יכולות להמצא בתיקיית `quantum`. פרוייקטי מקלדות יכולות להמצא בתיקיות `handwired` ו- `keyboard`. ### מבנה אחסון המשתמש @@ -69,4 +69,4 @@ In every keymap folder, the following files may be found. Only `keymap.c` is req ``` - \ No newline at end of file + diff --git a/docs/ja/arm_debugging.md b/docs/ja/arm_debugging.md index 5b7b89a67828..27eddbfdf118 100644 --- a/docs/ja/arm_debugging.md +++ b/docs/ja/arm_debugging.md @@ -23,7 +23,7 @@ XPM のインストール手順は[ここ](https://www.npmjs.com/package/xpm)で ### ARM ツールチェーン -XPM を使うと、ARM ツールチェーンをとても簡単にインストールできます。`xpm install --global @gnu-mcu-eclipse/arm-none-eabi-gcc` とコマンドを入力します。 +XPM を使うと、ARM ツールチェーンをとても簡単にインストールできます。`xpm install --global @xpack-dev-tools/arm-none-eabi-gcc` とコマンドを入力します。 ### Windows ビルドツール @@ -38,7 +38,7 @@ ST-Link を持っている場合は、ドライバは[ここ](https://www.st.com ### OpenOCD -この依存関係により、SWD は GDB からアクセスでき、デバッグに不可欠です。`xpm install --global @gnu-mcu-eclipse/openocd` を実行します。 +この依存関係により、SWD は GDB からアクセスでき、デバッグに不可欠です。`xpm install --global @xpack-dev-tools/openocd` を実行します。 ### Java @@ -50,17 +50,17 @@ Java は Eclipse で必要とされるため、[ここ](https://www.oracle.com/t ## Eclipse の設定 -ダウンロードした Eclipse IDE を開きます。QMK ディレクトリをインポートするために、File -> Import -> C/C++ -> Existing code as Makefile Project を選択します。Next を選択し、Browse を使用して QMK フォルダを選択します。tool-chain リストから ARM Cross GCC を選択し、Finish を選択します。 +ダウンロードした Eclipse IDE を開きます。QMK ディレクトリをインポートするために、File -> Import -> C/C++ -> Existing Code as Makefile Project を選択します。Next を選択し、Browse を使用して QMK フォルダを選択します。tool-chain リストから ARM Cross GCC を選択し、Finish を選択します。 -これで、左側に QMK フォルダが表示されます。右クリックして、Properties を選択します。左側で MCU を展開し、ARM Toolchain Paths を選択します。xPack を押して OK を押します。OpenOCD Path で同じことを繰り返し、Windows の場合は、Build Tool Path でも同じことを繰り返します。Apply and Close を選択します。 +これで、左側に QMK フォルダが表示されます。右クリックして、Properties を選択します。左側で MCU を展開し、ARM Toolchains Paths を選択します。xPack を押して OK を押します。OpenOCD Path で同じことを繰り返し、Windows の場合は、Build Tools Path でも同じことを繰り返します。Apply and Close を選択します。 -ここで、必要な MCU パッケージをインストールします。Window -> Open Perspective -> Others -> Packs を選択して、Packs perspective に移動します。Packs タブの横にある黄色のリフレッシュ記号を選択します。これは様々な場所から MCU の定義を要求するため、時間が掛かります。一部のリンクが失敗した場合は、おそらく Ignore を選択できます。 +ここで、必要な MCU パッケージをインストールします。Window -> Perspective -> Open Perspective -> Other... -> Packs を選択して、Packs perspective に移動します。Packs タブの横にある黄色のリフレッシュ記号を選択します。これは様々な場所から MCU の定義を要求するため、時間が掛かります。一部のリンクが失敗した場合は、おそらく Ignore を選択できます。 -これが終了すると、ビルドやデバッグする MCU を見つけることができるはずです。この例では、STM32F3 シリーズの MCU を使います。左側で、STMicroelectronics -> STM32F3 Series を選択します。中央のウィンドウに、pack が表示されます。右クリックし、Install を選択します。それが終了したら、Window -> Open Perspective -> Others -> C/C++ を選択してデフォルトのパースペクティブに戻ることができます。 +これが終了すると、ビルドやデバッグする MCU を見つけることができるはずです。この例では、STM32F3 シリーズの MCU を使います。左側で、STMicroelectronics -> STM32F3 Series を選択します。中央のウィンドウに、pack が表示されます。右クリックし、Install を選択します。それが終了したら、Window -> Perspective -> Open Perspective -> Other... -> C/C++ を選択してデフォルトのパースペクティブに戻ることができます。 -Eclipse に QMK をビルドしようとするデバイスを教える必要があります。QMK フォルダを右クリック -> Properties -> C/C++ Build -> Settings を選択します。Devices タブを選択し、devices の下から MCU の適切な種類を選択します。私の例では、STM32F303CC です。 +Eclipse に QMK をビルドしようとするデバイスを教える必要があります。QMK フォルダを右クリック -> Properties -> C/C++ Build -> Settings を選択します。Devices タブを選択し、Devices の下から MCU の適切な種類を選択します。私の例では、STM32F303CC です。 -この間に、build コマンドもセットアップしましょう。C/C++ Build を選択し、Behavior タブを選択します。build コマンドのところで、`all` を必要な make コマンドに置き換えます。例えば、rev6 Planck の default キーマップの場合、これは `planck/rev6:default` になります。Apply and Close を選択します。 +この間に、Build コマンドもセットアップしましょう。C/C++ Build を選択し、Behavior タブを選択します。build コマンドのところで、`all` を必要な make コマンドに置き換えます。例えば、rev6 Planck の default キーマップの場合、これは `planck/rev6:default` になります。Apply and Close を選択します。 ## ビルド @@ -76,7 +76,7 @@ ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成さ ### デバッガの設定 -QMK フォルダを右クリックし、Debug As -> Debug Configuration を選択します。ここで、GDB OpenOCD Debugging をダブルクリックします。Debugger タブを選択し、MCU に必要な設定を入力します。これを見つけるにはいじったりググったりする必要があるかもしれません。STM32F3 用のデフォルトスクリプトは stm32f3discovery.cfg と呼ばれます。OpenOCD に伝えるには、Config options で `-f board/stm32f3discovery.cfg` と入力します。 +QMK フォルダを右クリックし、Debug As -> Debug Configurations... を選択します。ここで、GDB OpenOCD Debugging をダブルクリックします。Debugger タブを選択し、MCU に必要な設定を入力します。これを見つけるにはいじったりググったりする必要があるかもしれません。STM32F3 用のデフォルトスクリプトは stm32f3discovery.cfg と呼ばれます。OpenOCD に伝えるには、Config options で `-f board/stm32f3discovery.cfg` と入力します。 注意: 私の場合、この設定スクリプトはリセット操作を無効にするために編集が必要です。スクリプトの場所は、通常はパス `openocd/version/.content/scripts/board` の下の実際の実行可能フィールドの中で見つかります。ここで、私は `reset_config srst_only` を `reset_config none` に編集しました。 @@ -86,7 +86,7 @@ Apply and Close を選択します。 キーボードをリセットしてください。 -虫アイコンをクリックし、もし全てうまく行けば debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止するので、Play ボタンを押します。全てのデバッガのほとんどの機能は ARM MCU で動作しますが、正確な詳細については google があなたのお友達です! +虫アイコンをクリックし、もし全てうまく行けば Debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止するので、Play ボタンを押します。全てのデバッガのほとんどの機能は ARM MCU で動作しますが、正確な詳細については google があなたのお友達です! ハッピーデバッギング! diff --git a/docs/ja/getting_started_github.md b/docs/ja/getting_started_github.md index e7af36efa4f1..0d08ab78b71f 100644 --- a/docs/ja/getting_started_github.md +++ b/docs/ja/getting_started_github.md @@ -21,17 +21,23 @@ Github は慣れていない人には少し注意が必要です - このガイ ![HTTPS リンク](http://i.imgur.com/eGO0ohO.jpg) -ここから、`git clone` をコマンドラインに入力し、リンクを貼り付けます: +ここから、`git clone --recurse-submodules ` をコマンドラインに入力し、リンクを貼り付けます: ``` user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git Cloning into 'qmk_firmware'... -remote: Counting objects: 46625, done. -remote: Compressing objects: 100% (2/2), done. -remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 -Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. -Resolving deltas: 100% (29362/29362), done. -Checking out files: 100% (2799/2799), done. +remote: Enumerating objects: 9, done. +remote: Counting objects: 100% (9/9), done. +remote: Compressing objects: 100% (5/5), done. +remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874 +Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done. +Resolving deltas: 100% (119972/119972), done. +... +Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b' +Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' +Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' +Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' +Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` ローカルマシンに QMK のフォークができるので、キーマップの追加、コンパイル、キーボードへの書き込みができます。変更に満足したら、以下のようにそれらをフォークへ追加、コミットおよびプッシュすることができます: diff --git a/docs/ru-ru/getting_started_github.md b/docs/ru-ru/getting_started_github.md index 8a0fd07a2799..3b4940dd15fd 100644 --- a/docs/ru-ru/getting_started_github.md +++ b/docs/ru-ru/getting_started_github.md @@ -15,17 +15,23 @@ GitHub может показаться несколько сложным для ![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) -Теперь введите `git clone` в командную строку, а затем вставьте ссылку: +Теперь введите `git clone --recurse-submodules ` в командную строку, а затем вставьте ссылку: ``` -user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git Cloning into 'qmk_firmware'... -remote: Counting objects: 46625, done. -remote: Compressing objects: 100% (2/2), done. -remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 -Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. -Resolving deltas: 100% (29362/29362), done. -Checking out files: 100% (2799/2799), done. +remote: Enumerating objects: 9, done. +remote: Counting objects: 100% (9/9), done. +remote: Compressing objects: 100% (5/5), done. +remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874 +Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done. +Resolving deltas: 100% (119972/119972), done. +... +Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b' +Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' +Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' +Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' +Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом: diff --git a/docs/ru-ru/getting_started_introduction.md b/docs/ru-ru/getting_started_introduction.md index 142fe4254a27..ccc441806853 100644 --- a/docs/ru-ru/getting_started_introduction.md +++ b/docs/ru-ru/getting_started_introduction.md @@ -4,7 +4,7 @@ ## Базовая структура QMK -QMK - это форк [Джуна Вако (Jun Wako)](https://github.com/tmk) проекта [tmk_keyboard](https://github.com/tmk/tmk_keyboard). Оригинальный код TMK с изменениями можно найти в папке `tmk`. Дополнения QMK к проекту можно найти в папке `quantum`. Проекты клавиатур можно найти в папках `handwired` и `keyboard`. +QMK - это форк [Джуна Вако (Jun Wako)](https://github.com/tmk) проекта [tmk_keyboard](https://github.com/tmk/tmk_keyboard). Оригинальный код TMK с изменениями можно найти в папке `tmk_core`. Дополнения QMK к проекту можно найти в папке `quantum`. Проекты клавиатур можно найти в папках `handwired` и `keyboard`. ### Структура пространства пользователя diff --git a/docs/zh-cn/getting_started_github.md b/docs/zh-cn/getting_started_github.md index 0400eea6435b..2b2f7a75c589 100644 --- a/docs/zh-cn/getting_started_github.md +++ b/docs/zh-cn/getting_started_github.md @@ -16,17 +16,23 @@ Github can be a little tricky to those that aren't familiar with it - this guide ![HTTPS链接](http://i.imgur.com/eGO0ohO.jpg) -然后,在命令行输入`git clone `,然后粘贴你的链接: +然后,在命令行输入`git clone --recurse-submodules `,然后粘贴你的链接: ``` -user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +user@computer:~$ git clone --recurse-submodules https://github.com/whoeveryouare/qmk_firmware.git Cloning into 'qmk_firmware'... -remote: Counting objects: 46625, done. -remote: Compressing objects: 100% (2/2), done. -remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 -Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. -Resolving deltas: 100% (29362/29362), done. -Checking out files: 100% (2799/2799), done. +remote: Enumerating objects: 9, done. +remote: Counting objects: 100% (9/9), done. +remote: Compressing objects: 100% (5/5), done. +remote: Total 183883 (delta 5), reused 4 (delta 4), pack-reused 183874 +Receiving objects: 100% (183883/183883), 132.90 MiB | 9.57 MiB/s, done. +Resolving deltas: 100% (119972/119972), done. +... +Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca18b' +Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' +Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' +Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' +Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` 现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样: diff --git a/docs/zh-cn/getting_started_introduction.md b/docs/zh-cn/getting_started_introduction.md index dcd0b72a5641..b977b6339093 100644 --- a/docs/zh-cn/getting_started_introduction.md +++ b/docs/zh-cn/getting_started_introduction.md @@ -4,7 +4,7 @@ ## 基本QMK结构 -QMK是[Jun Wako](https://github.com/tmk)的[tmk_keyboard](https://github.com/tmk/tmk_keyboard)工程的一个分叉。经过更改的TMK原始代码放在`tmk` 文件夹中。 QMK增加的新东西可以在 `quantum` 文件夹中找到。 键盘项目可以在 `handwired`(手动飞线) 和 `keyboard`(PCB键盘)这两个文件夹找到。 +QMK是[Jun Wako](https://github.com/tmk)的[tmk_keyboard](https://github.com/tmk/tmk_keyboard)工程的一个分叉。经过更改的TMK原始代码放在`tmk_core` 文件夹中。 QMK增加的新东西可以在 `quantum` 文件夹中找到。 键盘项目可以在 `handwired`(手动飞线) 和 `keyboard`(PCB键盘)这两个文件夹找到。 ### 用户空间结构 From 05b479d349aafb8298b43fcbfcddc4440336de9c Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 21 Dec 2019 22:01:28 +1100 Subject: [PATCH 086/973] Add TADA68 keymap/rules/config for QMK bootloader (#7679) * Add TADA68 keymap/rules/config for QMK bootloader * Remove extraneous #DEFINEs * use #pragma rather than include guards Co-Authored-By: fauxpark * Remove obselete #endif Co-Authored-By: fauxpark * #undefine DESCRIPTION before redefining Co-Authored-By: fauxpark * Remove obselete #define Co-Authored-By: fauxpark Co-authored-by: fauxpark --- .../tada68/keymaps/tokyovigilante/config.h | 25 ++++++++++++++ .../tada68/keymaps/tokyovigilante/keymap.c | 7 ++++ .../tada68/keymaps/tokyovigilante/layers.json | 1 + .../tada68/keymaps/tokyovigilante/readme.md | 34 +++++++++++++++++++ .../tada68/keymaps/tokyovigilante/rules.mk | 2 ++ 5 files changed, 69 insertions(+) create mode 100755 keyboards/tada68/keymaps/tokyovigilante/config.h create mode 100644 keyboards/tada68/keymaps/tokyovigilante/keymap.c create mode 100644 keyboards/tada68/keymaps/tokyovigilante/layers.json create mode 100644 keyboards/tada68/keymaps/tokyovigilante/readme.md create mode 100755 keyboards/tada68/keymaps/tokyovigilante/rules.mk diff --git a/keyboards/tada68/keymaps/tokyovigilante/config.h b/keyboards/tada68/keymaps/tokyovigilante/config.h new file mode 100755 index 000000000000..9184bc1f4df9 --- /dev/null +++ b/keyboards/tada68/keymaps/tokyovigilante/config.h @@ -0,0 +1,25 @@ +/* +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 + +#undef DESCRIPTION +#define DESCRIPTION QMK keyboard firmware for TADA68 with QMK bootloader + +#define QMK_ESC_OUTPUT F0 // usually COL +#define QMK_ESC_INPUT D0 // usually ROW +#define QMK_LED B6 diff --git a/keyboards/tada68/keymaps/tokyovigilante/keymap.c b/keyboards/tada68/keymaps/tokyovigilante/keymap.c new file mode 100644 index 000000000000..13159c0d4c0d --- /dev/null +++ b/keyboards/tada68/keymaps/tokyovigilante/keymap.c @@ -0,0 +1,7 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_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_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, 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT_ansi(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_DEL, KC_INS, KC_TRNS, KC_TRNS, KC_UP, 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_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_END, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R), + [2] = LAYOUT_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, KC_NO, KC_NO, 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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) +}; diff --git a/keyboards/tada68/keymaps/tokyovigilante/layers.json b/keyboards/tada68/keymaps/tokyovigilante/layers.json new file mode 100644 index 000000000000..d6604042e3bb --- /dev/null +++ b/keyboards/tada68/keymaps/tokyovigilante/layers.json @@ -0,0 +1 @@ +[["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_BSLS", "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_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_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"], ["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_DEL", "KC_INS", "KC_TRNS", "KC_TRNS", "KC_UP", "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_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_END", "KC_TRNS", "KC_TRNS", "KC_TRNS", "BL_DEC", "BL_TOGG", "BL_INC", "KC_TRNS", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_BTN1", "KC_MS_U", "KC_BTN2", "KC_TRNS", "MO(2)", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MS_L", "KC_MS_D", "KC_MS_R"], ["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", "RESET", "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", "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_TRNS", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"]] \ No newline at end of file diff --git a/keyboards/tada68/keymaps/tokyovigilante/readme.md b/keyboards/tada68/keymaps/tokyovigilante/readme.md new file mode 100644 index 000000000000..8544399d65ff --- /dev/null +++ b/keyboards/tada68/keymaps/tokyovigilante/readme.md @@ -0,0 +1,34 @@ +# TADA68 (65% ATMega32U4 PCB) + +The TADA68 comes with a custom firmware based on the LUFA mass storage +driver, which mounts the user-accessible portion of the flash storage +as a USB drive. This is prone to failure and can only be accessed by +hitting the physical reset button on the base of the board, which is +relatively accessible in an assembled keyboard. + +This keymap has some customisation to work with a TADA68 which has been +ISP-reflashed (using a USBasp or other ISP) to work with the QMK bootloader. + +This allows use of dfu-programmer to reflash the firmware in DFU mode, and +bootloader entry and exit with key-combos. + +To build the firmware, set up a build environment according to the standard +QMK instructions, then run: + +```make tada68:tokyovigilante:production``` + +which will build the bootloader, user firmware, and the combined image `__production.hex`. + +Then run + +```avrdude -F -c usbasp -p m32u4 -e -U flash:w:tada68_tokyovigilante_production.hex:a -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m -U lock:w:0x3F:m``` + +to copy it to your board (connected to the USBasp or other programmer, replacing the -c and filename parameters as required). The fuse and lock +bitmaps will enable DFU mode. + +Once the board is unplugged and plugged in via USB, the default key-combo to +enter DFU mode is Fn-Meta-R, then Esc to exit. You can then use +`make tada68::dfu` to build and flash any other custom keymap you +like, as the qmk-dfu bootloader can only be replaced using the ISP. This keymap is fairly basic, just make sure any replacement one has a RESET command defined (ideally on a non-default layer). + +More information can be found in the QMK docs: diff --git a/keyboards/tada68/keymaps/tokyovigilante/rules.mk b/keyboards/tada68/keymaps/tokyovigilante/rules.mk new file mode 100755 index 000000000000..2f7fde3d5c23 --- /dev/null +++ b/keyboards/tada68/keymaps/tokyovigilante/rules.mk @@ -0,0 +1,2 @@ +BOOTLOADER = qmk-dfu +FIRMWARE_FORMAT = hex From 376419a4f7e0489111a9ac24acc847342fe9d64d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 21 Dec 2019 18:22:49 +0000 Subject: [PATCH 087/973] Add central location for ChibiOS defines (#7542) * Add central location for chibios defines * Add central location for chibios defines - actually add files this time.... * Add Copyright header * Update include order to resolve i2cv1 build errors --- drivers/arm/i2c_master.c | 3 +-- drivers/arm/i2c_master.h | 28 +++++++++--------------- quantum/backlight/backlight_arm.c | 4 ---- quantum/quantum.h | 1 + tmk_core/common/chibios/chibios_config.h | 24 ++++++++++++++++++++ 5 files changed, 36 insertions(+), 24 deletions(-) create mode 100644 tmk_core/common/chibios/chibios_config.h diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index b9eff0ad2e8b..21aefd497ccf 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -24,9 +24,8 @@ * STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used * but using any other I2C pins should be trivial. */ - -#include "i2c_master.h" #include "quantum.h" +#include "i2c_master.h" #include #include diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index 31cbfb9774a7..346513ad8086 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -27,10 +27,6 @@ #include "ch.h" #include -#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32F4XX) || defined(STM32L0xx) || defined(STM32L1xx) -# define USE_I2CV1 -#endif - #ifdef I2C1_BANK # define I2C1_SCL_BANK I2C1_BANK # define I2C1_SDA_BANK I2C1_BANK @@ -51,20 +47,6 @@ # define I2C1_SDA 7 #endif -#if defined(STM32F1XX) || defined(STM32F1xx) -# define USE_GPIOV1 -#endif - -#ifndef USE_GPIOV1 -// The default PAL alternate modes are used to signal that the pins are used for I2C -# ifndef I2C1_SCL_PAL_MODE -# define I2C1_SCL_PAL_MODE 4 -# endif -# ifndef I2C1_SDA_PAL_MODE -# define I2C1_SDA_PAL_MODE 4 -# endif -#endif - #ifdef USE_I2CV1 # ifndef I2C1_OPMODE # define I2C1_OPMODE OPMODE_I2C @@ -99,6 +81,16 @@ # define I2C_DRIVER I2CD1 #endif +#ifndef USE_GPIOV1 +// The default PAL alternate modes are used to signal that the pins are used for I2C +# ifndef I2C1_SCL_PAL_MODE +# define I2C1_SCL_PAL_MODE 4 +# endif +# ifndef I2C1_SDA_PAL_MODE +# define I2C1_SDA_PAL_MODE 4 +# endif +#endif + typedef int16_t i2c_status_t; #define I2C_STATUS_SUCCESS (0) diff --git a/quantum/backlight/backlight_arm.c b/quantum/backlight/backlight_arm.c index 3f94ccef8ecd..8c6909a4ae83 100644 --- a/quantum/backlight/backlight_arm.c +++ b/quantum/backlight/backlight_arm.c @@ -10,10 +10,6 @@ # error "Backlight support for STMF072 is not available. Please disable." # endif -# if defined(STM32F1XX) || defined(STM32F1xx) -# define USE_GPIOV1 -# endif - // GPIOV2 && GPIOV3 # ifndef BACKLIGHT_PAL_MODE # define BACKLIGHT_PAL_MODE 2 diff --git a/quantum/quantum.h b/quantum/quantum.h index b9e7eea24b2c..053b33b917c6 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -22,6 +22,7 @@ #endif #if defined(PROTOCOL_CHIBIOS) # include "hal.h" +# include "chibios_config.h" #endif #include "wait.h" diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h new file mode 100644 index 000000000000..272529608343 --- /dev/null +++ b/tmk_core/common/chibios/chibios_config.h @@ -0,0 +1,24 @@ +/* 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 + +#if defined(STM32F1XX) +# define USE_GPIOV1 +#endif + +#if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) +# define USE_I2CV1 +#endif From 0e2ff9b384fa2ec10d2555ef2e87915f453cecab Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sat, 21 Dec 2019 23:39:26 -0600 Subject: [PATCH 088/973] Readded lost pgm_read_word code to encoder array lookups (#7577) --- keyboards/rgbkb/sol/keymaps/default/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index 51039e48e2a9..e08e02c48e6e 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -234,12 +234,12 @@ void encoder_update_user(uint8_t index, bool clockwise) { #endif { uint8_t layer = biton32(layer_state); - uint16_t keycode = encoders[layer][index][clockwise]; + uint16_t keycode = pgm_read_word(&encoders[layer][index][clockwise]); while (keycode == KC_TRANSPARENT && layer > 0) { layer--; if ((layer_state & (1 << layer)) != 0) - keycode = encoders[layer][index][clockwise]; + keycode = pgm_read_word(&encoders[layer][index][clockwise]); } if (keycode != KC_TRANSPARENT) tap_code16(keycode); From 70661645917cc9a8e492abb82828c55cf137b834 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 22 Dec 2019 05:50:08 -0800 Subject: [PATCH 089/973] Completely remove i2c_transmit_receive function (#7686) * Add i2c_transmit_receive function This function is listed in the ARM header file, but doesn't actually exist. * Remove i2c_transmit_receive function * Update DRV2605L read function to use i2c_readReg on both arm and avr --- drivers/arm/i2c_master.h | 1 - drivers/haptic/DRV2605L.c | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index 346513ad8086..3d3891289faa 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -101,7 +101,6 @@ void i2c_init(void); i2c_status_t i2c_start(uint8_t address); i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); -i2c_status_t i2c_transmit_receive(uint8_t address, uint8_t* tx_body, uint16_t tx_length, uint8_t* rx_body, uint16_t rx_length); i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); void i2c_stop(void); diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index c40731913bd9..830d629dae98 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c @@ -32,16 +32,9 @@ void DRV_write(uint8_t drv_register, uint8_t settings) { } uint8_t DRV_read(uint8_t regaddress) { -#ifdef __AVR__ i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, DRV2605L_read_buffer, 1, 100); DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; -#else - DRV2605L_tx_register[0] = regaddress; - if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, DRV2605L_tx_register, 1, DRV2605L_read_buffer, 1)) { - printf("err reading reg \n"); - } - DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; -#endif + return DRV2605L_read_register; } @@ -127,4 +120,4 @@ void DRV_pulse(uint8_t sequence) { DRV_write(DRV_GO, 0x00); DRV_write(DRV_WAVEFORM_SEQ_1, sequence); DRV_write(DRV_GO, 0x01); -} \ No newline at end of file +} From 7494490d6d8966596434c0f6dcdd9d0a6600dfba Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Mon, 23 Dec 2019 12:58:51 +0900 Subject: [PATCH 090/973] Update toshi0383 keymap (#7700) * minor update for reviung39:toshi0383 * update zinc:toshi0383 --- keyboards/reviung39/keymaps/toshi0383/keymap.c | 18 +++++++++--------- keyboards/zinc/keymaps/toshi0383/keymap.c | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/keyboards/reviung39/keymaps/toshi0383/keymap.c b/keyboards/reviung39/keymaps/toshi0383/keymap.c index da94181db1c3..e1783892551e 100644 --- a/keyboards/reviung39/keymaps/toshi0383/keymap.c +++ b/keyboards/reviung39/keymaps/toshi0383/keymap.c @@ -29,29 +29,29 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_reviung39( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RGUI, KC_RSFT, - KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_RGUI, KC_RALT, RGUI(KC_RSFT), + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SCLN), KC_RGUI, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), LOWER, KC_ENT, RAISE ), [_LOWER] = LAYOUT_reviung39( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, - _______, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, KC_DOT, KC_SLSH, _______, - _______, KC_ENT, KC_RGUI + KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, + _______, _______, KC_RGUI ), [_RAISE] = LAYOUT_reviung39( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, ADJUST, _______, _______, _______, _______, _______, - KC_LGUI, KC_ENT, _______ + KC_LGUI, _______, _______ ), [_ADJUST] = LAYOUT_reviung39( - RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, KC_Y, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, XXXXXXX, _______ + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, _______ ), }; diff --git a/keyboards/zinc/keymaps/toshi0383/keymap.c b/keyboards/zinc/keymaps/toshi0383/keymap.c index d1738c83e84e..45863a71e027 100644 --- a/keyboards/zinc/keymaps/toshi0383/keymap.c +++ b/keyboards/zinc/keymaps/toshi0383/keymap.c @@ -18,18 +18,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ * ,-----------------------------------------. ,-----------------------------------------. * | Esc | Q | W | E | R | T | | Y | U | I | O | P |BSpace| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | A | S | D | F | G | | H | J | K | L | : |Shift | + * | Tab | A | S | D | F | G | | H | J | K | L |Shift | GUI | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Space | Z | X | C | V | B | | N | M | Ctrl | GUI | Alt | SCMD | + * |Space | Z | X | C | V | B | | N | M | Ctrl | . | Alt | SCMD | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | |Lower |Enter | |Enter |Raise | | | | | + * | GUI | | | |Lower |Enter | |Enter |Raise | | | | | * `-----------------------------------------' `-----------------------------------------' */ [_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, KC_BSPACE, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RGUI, KC_RSFT, \ - KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_RGUI, KC_RALT, RGUI(KC_RSFT), \ - _______, _______, _______, _______, LOWER, KC_ENT, KC_ENT, RAISE, _______, _______, _______, _______ \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SCLN), KC_RGUI, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), \ + KC_RGUI, _______, _______, _______, LOWER, KC_ENT, KC_ENT, RAISE, _______, _______, _______, _______ \ ), /* Lower @@ -46,8 +46,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ [_LOWER] = LAYOUT_ortho_4x12( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______,\ _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, \ - _______, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, KC_DOT, KC_SLSH, _______, \ - _______, _______, _______, _______, _______, KC_TRNS, ADJUST, KC_RGUI, _______, _______, _______, _______ \ + KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, \ + _______, _______, _______, KC_TRNS, _______, KC_TRNS, ADJUST, KC_RGUI, _______, _______, _______, _______ \ ), /* Raise From 9aedb620c51e61b0ec654ffaeb0eac2d8839b0b4 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 24 Dec 2019 20:27:58 +0000 Subject: [PATCH 091/973] Add backwards compatibility for oled_write_raw_P on ARM --- drivers/oled/oled_driver.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index bba6a7a12904..f490f367ae32 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -224,6 +224,8 @@ void oled_write_raw_P(const char *data, uint16_t size); // Advances the cursor while writing, inverts the pixels if true // Advances the cursor to the next page, wiring ' ' to the remainder of the current page # define oled_write_ln_P(data, invert) oled_write(data, invert) + +# define oled_write_raw_P(data, size) oled_write_raw(data, size) #endif // defined(__AVR__) // Can be used to manually turn on the screen if it is off From 46e2b6e43d6667cc20bcccf34c71dc60048ac9b2 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 25 Dec 2019 09:54:47 -0800 Subject: [PATCH 092/973] Turn off RGB Matrix LEDs when keyboard sleeps (#7713) --- quantum/rgb_matrix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 55a6f74be75c..9bbeff833269 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -417,7 +417,12 @@ void rgb_matrix_init(void) { eeconfig_debug_rgb_matrix(); // display current eeprom values } -void rgb_matrix_set_suspend_state(bool state) { g_suspend_state = state; } +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; +} void rgb_matrix_toggle(void) { rgb_matrix_config.enable ^= 1; From e5501d48155a7c2855d4c30249e8d2d40b7c621a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 25 Dec 2019 19:17:02 +1100 Subject: [PATCH 093/973] Make the keyboard beep when Audio is enabled and `\a` is encountered in a sendstring --- quantum/quantum.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/quantum/quantum.c b/quantum/quantum.c index 4c501785c0eb..695da5fdcb7c 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -57,6 +57,9 @@ float goodbye_song[][2] = GOODBYE_SONG; # ifdef DEFAULT_LAYER_SONGS float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS; # endif +# ifdef SENDSTRING_BELL +float bell_song[][2] = SONG(TERMINAL_SOUND); +# endif #endif static void do_code16(uint16_t code, void (*f)(uint8_t)) { @@ -470,6 +473,13 @@ 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 + PLAY_SONG(bell_song); + return; + } +#endif + uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]); bool is_shifted = pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code]); bool is_altgred = pgm_read_byte(&ascii_to_altgr_lut[(uint8_t)ascii_code]); From 4edc8fc3c70c30dbcc927dbfc8570369cbc325d6 Mon Sep 17 00:00:00 2001 From: Martin Karlsson Date: Thu, 26 Dec 2019 16:45:14 +0100 Subject: [PATCH 094/973] K-Nunmpad17 (#7708) * Initial commit for K-Nunmpad * Changed layoutname Corrected the files according to drashnas suggestions. * Some names have been changed * Some code thats not been used has been removed * Fixed rules.mk When adding the commnity layout, tapdancing broke. This was fixed with rules.mk was changed in the k-numpad and karlssn keymap. * Cleanup according fauxpark Cleaned up the readme.md and the rules.mk according to feedback from fauxpark. --- keyboards/handwired/k_numpad17/config.h | 53 ++++++++++++++++ keyboards/handwired/k_numpad17/k_numpad17.c | 1 + keyboards/handwired/k_numpad17/k_numpad17.h | 35 +++++++++++ .../k_numpad17/keymaps/default/keymap.c | 24 ++++++++ .../k_numpad17/keymaps/karlssn/keymap.c | 61 +++++++++++++++++++ .../k_numpad17/keymaps/karlssn/rules.mk | 1 + keyboards/handwired/k_numpad17/readme.md | 25 ++++++++ keyboards/handwired/k_numpad17/rules.mk | 31 ++++++++++ 8 files changed, 231 insertions(+) create mode 100644 keyboards/handwired/k_numpad17/config.h create mode 100644 keyboards/handwired/k_numpad17/k_numpad17.c create mode 100644 keyboards/handwired/k_numpad17/k_numpad17.h create mode 100644 keyboards/handwired/k_numpad17/keymaps/default/keymap.c create mode 100644 keyboards/handwired/k_numpad17/keymaps/karlssn/keymap.c create mode 100644 keyboards/handwired/k_numpad17/keymaps/karlssn/rules.mk create mode 100644 keyboards/handwired/k_numpad17/readme.md create mode 100644 keyboards/handwired/k_numpad17/rules.mk diff --git a/keyboards/handwired/k_numpad17/config.h b/keyboards/handwired/k_numpad17/config.h new file mode 100644 index 000000000000..e14101edec19 --- /dev/null +++ b/keyboards/handwired/k_numpad17/config.h @@ -0,0 +1,53 @@ +/* +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 Handwired +#define PRODUCT K-Numpad17 +#define DESCRIPTION QMK keyboard firmware for handwired numpad with 17 keys + +#define TAPPING_TERM 400 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D1, D4, C6, D7, E6 } +#define MATRIX_COL_PINS { B2, B1, F6 , F4 } +#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 + + diff --git a/keyboards/handwired/k_numpad17/k_numpad17.c b/keyboards/handwired/k_numpad17/k_numpad17.c new file mode 100644 index 000000000000..290a86aac583 --- /dev/null +++ b/keyboards/handwired/k_numpad17/k_numpad17.c @@ -0,0 +1 @@ +#include "k_numpad17.h" \ No newline at end of file diff --git a/keyboards/handwired/k_numpad17/k_numpad17.h b/keyboards/handwired/k_numpad17/k_numpad17.h new file mode 100644 index 000000000000..1fc99794df9e --- /dev/null +++ b/keyboards/handwired/k_numpad17/k_numpad17.h @@ -0,0 +1,35 @@ +#pragma once +#include "quantum.h" + +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k41, k33 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, KC_NO}, \ + {k30, k31, k32, k33}, \ + {k40, KC_NO, k41, KC_NO} \ +} + +/* matrix layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | | + * |----|----|----| 13 | + * | 20 | 21 | 22 | | + * |----|----|----|----| + * | 30 | 31 | 32 | | + * |----|----|----| 33 | + * | 40 | 41 | | + * `-------------------' + */ + + diff --git a/keyboards/handwired/k_numpad17/keymaps/default/keymap.c b/keyboards/handwired/k_numpad17/keymaps/default/keymap.c new file mode 100644 index 000000000000..2f383eea91dc --- /dev/null +++ b/keyboards/handwired/k_numpad17/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ,-------------------. + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 | . | | + * `-------------------' + */ + + [0] = LAYOUT_numpad_5x4( + 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 + ), +}; diff --git a/keyboards/handwired/k_numpad17/keymaps/karlssn/keymap.c b/keyboards/handwired/k_numpad17/keymaps/karlssn/keymap.c new file mode 100644 index 000000000000..c2f314116b26 --- /dev/null +++ b/keyboards/handwired/k_numpad17/keymaps/karlssn/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +//Tap Dance Declarations +enum { + TD_DOT_COMMAS = 0 +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_DOT_COMMAS] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_COMMA) +// Other declarations would go here, separated by commas, if you have them +}; + +//In Layer declaration, add tap dance item in place of a key code + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ,-------------------. + * |bcsp| / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | FN/0 | . | | + * `-------------------' + */ + + [0] = LAYOUT_numpad_5x4( + KC_BSPC, 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, + LT(1, KC_P0), TD(TD_DOT_COMMAS), KC_PENT + ), + /* + * ,-------------------. + * | F10| F11| F12| - | + * |----|----|----|----| + * | F7 | F8 | F9 | | + * |----|----|----| vol| + * | F4 | F5 | F6 | + | + * |----|----|----|----| + * | F1 | F2 | F3 | vol| + * |----|----|----| - | + * | FN | . | | + * `-------------------' + */ + [1] = LAYOUT_numpad_5x4( + KC_F10, KC_F11, KC_F12, KC_NO, + KC_F7, KC_F8, KC_F9, + KC_F4, KC_F5, KC_F6, KC_VOLU, + KC_F1, KC_F2, KC_F3, + KC_NO, KC_PDOT, KC_VOLD + ) +}; diff --git a/keyboards/handwired/k_numpad17/keymaps/karlssn/rules.mk b/keyboards/handwired/k_numpad17/keymaps/karlssn/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/handwired/k_numpad17/keymaps/karlssn/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/k_numpad17/readme.md b/keyboards/handwired/k_numpad17/readme.md new file mode 100644 index 000000000000..76bbaf439187 --- /dev/null +++ b/keyboards/handwired/k_numpad17/readme.md @@ -0,0 +1,25 @@ +# K-Numpad17 +k-numpad + +### Arduino Pro Micro Pinout +| rows | 0 | 1 | 2 | 3 | 4 | +| ----------- | --- | --- | --- | --- | --- | +| arduino pin | 2 | 4 | 5 | 6 | 7 | +| qmk pin | D1 | D4 | C6 | D7 | E6 | + +| columns | 0 | 1 | 2 | 3 | +| ----------- | --- | --- | --- | --- | +| arduino pin | 16 | 15 | A1 | A3 | +| qmk pin | B5 | B4 | B3 | C3 | + + +Make example for this keyboard (after setting up your build environment): + + make handwired/k_numpad17:default + +Bootmagic is enabled. Press the key at (0,0) while plugging the keyboard in to jump to bootloader. This is numlock in the default keymap. + +* Keyboard Maintainer: [Karlssn](https://github.com/Karlssn) +* Hardware Availability: [Casefile](https://www.thingiverse.com/thing:4062409) + +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/handwired/k_numpad17/rules.mk b/keyboards/handwired/k_numpad17/rules.mk new file mode 100644 index 000000000000..e1f2d2a148bd --- /dev/null +++ b/keyboards/handwired/k_numpad17/rules.mk @@ -0,0 +1,31 @@ +# 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 = lite # Key at 0,0 makes the keyboard go into bootloader +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +TAP_DANCE_ENABLE = no + +LAYOUTS = numpad_5x4 From 12baca129545bbd194fc95e542abfd6fcf552f47 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Thu, 26 Dec 2019 09:46:18 -0600 Subject: [PATCH 095/973] Initial Crkbd layout (#7716) --- keyboards/crkbd/keymaps/bcat/config.h | 6 +++ keyboards/crkbd/keymaps/bcat/keymap.c | 51 ++++++++++++++++++++++++++ keyboards/crkbd/keymaps/bcat/readme.md | 30 +++++++++++++++ keyboards/crkbd/keymaps/bcat/rules.mk | 3 ++ users/bcat/config.h | 20 ++++++++++ 5 files changed, 110 insertions(+) create mode 100644 keyboards/crkbd/keymaps/bcat/config.h create mode 100644 keyboards/crkbd/keymaps/bcat/keymap.c create mode 100644 keyboards/crkbd/keymaps/bcat/readme.md create mode 100644 keyboards/crkbd/keymaps/bcat/rules.mk diff --git a/keyboards/crkbd/keymaps/bcat/config.h b/keyboards/crkbd/keymaps/bcat/config.h new file mode 100644 index 000000000000..fd5fce542120 --- /dev/null +++ b/keyboards/crkbd/keymaps/bcat/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define EE_HANDS + +/* Limit max RGB LED current to avoid tripping controller fuse. */ +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c new file mode 100644 index 000000000000..59ed00b5d7d1 --- /dev/null +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_LOWER, + LAYER_RAISE, + LAYER_ADJUST, +}; + +#define LY_LWR MO(LAYER_LOWER) +#define LY_RSE MO(LAYER_RAISE) + +#define KY_CESC LCTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ + [LAYER_DEFAULT] = 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, + KY_CESC, 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_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI + ), + + /* 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, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* 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, + _______, _______, _______, _______, _______, _______ + ), + + /* 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, + _______, _______, _______, RGB_TOG, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); +} diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md new file mode 100644 index 000000000000..aa2d943d18b8 --- /dev/null +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -0,0 +1,30 @@ +# bcat's Corne layout + +This split ergo layout mirrors +[my Lily58 layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) +with the number row removed and RGB controls added. See that layout's docs for +more details on the principles that went into the layout. + +## Default layer + +![Default layer layout](https://i.imgur.com/s1LDlSQ.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5)) + +## Lower layer + +![Lower layer layout](https://i.imgur.com/9ShGkJI.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) + +## Raise layer + +![Raise layer layout](https://i.imgur.com/HcmW99r.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7)) + +## Adjust layer + +![Adjust layer layout](https://i.imgur.com/53qLnxo.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee)) diff --git a/keyboards/crkbd/keymaps/bcat/rules.mk b/keyboards/crkbd/keymaps/bcat/rules.mk new file mode 100644 index 000000000000..cd3418dab8c7 --- /dev/null +++ b/keyboards/crkbd/keymaps/bcat/rules.mk @@ -0,0 +1,3 @@ +BOOTLOADER = atmel-dfu # Elite-C + +RGB_MATRIX_ENABLE = WS2812 # per-key RGB and underglow diff --git a/users/bcat/config.h b/users/bcat/config.h index f6be07bf6ebf..6b132a429cd7 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -22,6 +22,26 @@ */ #define TAPPING_FORCE_HOLD +#if defined(RGB_MATRIX_ENABLE) + /* Turn off per-key RGB when the host goes to sleep. */ + #define RGB_DISABLE_WHEN_USB_SUSPENDED true + + /* Keep per-key RGB increments consistent across keyboards. */ + #undef RGB_MATRIX_HUE_STEP + #undef RGB_MATRIX_SAT_STEP + #undef RGB_MATRIX_VAL_STEP + #undef RGB_MATRIX_SPD_STEP + + #define RGB_MATRIX_HUE_STEP 8 + #define RGB_MATRIX_SAT_STEP 17 + #define RGB_MATRIX_VAL_STEP 17 + #define RGB_MATRIX_SPD_STEP 17 + + /* Turn on additional RGB animations. */ + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + #define RGB_MATRIX_KEYPRESSES +#endif + #if defined(RGBLIGHT_ENABLE) /* Turn off RGB underglow when the host goes to sleep. */ #define RGBLIGHT_SLEEP From cfbb848e03a113c65dd7fb01133a2049dbef6542 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Thu, 26 Dec 2019 12:38:10 -0500 Subject: [PATCH 096/973] Add LZ PhysiX PCB (#7668) * add physix PCB * update info.json and default keymap per LZ * update make example in readme * remove extra stuff * remove excess newlines --- keyboards/hineybush/physix/config.h | 252 ++++++++++++++++++ keyboards/hineybush/physix/info.json | 21 ++ .../hineybush/physix/keymaps/default/keymap.c | 50 ++++ .../physix/keymaps/default/readme.md | 1 + keyboards/hineybush/physix/physix.c | 49 ++++ keyboards/hineybush/physix/physix.h | 87 ++++++ keyboards/hineybush/physix/readme.md | 15 ++ keyboards/hineybush/physix/rules.mk | 32 +++ 8 files changed, 507 insertions(+) create mode 100644 keyboards/hineybush/physix/config.h create mode 100644 keyboards/hineybush/physix/info.json create mode 100644 keyboards/hineybush/physix/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/physix/keymaps/default/readme.md create mode 100644 keyboards/hineybush/physix/physix.c create mode 100644 keyboards/hineybush/physix/physix.h create mode 100644 keyboards/hineybush/physix/readme.md create mode 100644 keyboards/hineybush/physix/rules.mk diff --git a/keyboards/hineybush/physix/config.h b/keyboards/hineybush/physix/config.h new file mode 100644 index 000000000000..cc6e185321ed --- /dev/null +++ b/keyboards/hineybush/physix/config.h @@ -0,0 +1,252 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEC81 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LZ +#define PRODUCT PhysiX +#define DESCRIPTION A custom ergonomic keyboard by Life Zone + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * 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, D1, D2, C7, C6 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B2, B1, B0, B5, B4, D7, D6, D4 } +#define UNUSED_PINS { B6 } + +/* 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 E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 26 + #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/hineybush/physix/info.json b/keyboards/hineybush/physix/info.json new file mode 100644 index 000000000000..089fcdb26b62 --- /dev/null +++ b/keyboards/hineybush/physix/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "physix", + "url": "", + "maintainer": "hineybush", + "width": 20.25, + "height": 5.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Delete", "x":18.75, "y":0}, {"label":"Esc", "x":0.75, "y":0.25}, {"label":"!", "x":1.75, "y":0.25}, {"label":"@", "x":2.75, "y":0.25}, {"label":"#", "x":4, "y":0.25}, {"label":"$", "x":5, "y":0.25}, {"label":"%", "x":6, "y":0.25}, {"label":"^", "x":7, "y":0.25}, {"label":"&", "x":10, "y":0.25}, {"label":"*", "x":11, "y":0.25}, {"label":"(", "x":12, "y":0.25}, {"label":")", "x":13, "y":0.25}, {"label":"_", "x":14.25, "y":0.25}, {"label":"+", "x":15.25, "y":0.25}, {"label":"~", "x":16.25, "y":0.25}, {"label":"Back", "x":17.25, "y":0.25}, {"label":"PgUp", "x":19, "y":1}, {"label":"Tab", "x":0.5, "y":1.25, "w":1.5}, {"label":"Q", "x":2, "y":1.25}, {"label":"W", "x":3.5, "y":1.25}, {"label":"E", "x":4.5, "y":1.25}, {"label":"R", "x":5.5, "y":1.25}, {"label":"T", "x":6.5, "y":1.25}, {"label":"Y", "x":9.5, "y":1.25}, {"label":"U", "x":10.5, "y":1.25}, {"label":"I", "x":11.5, "y":1.25}, {"label":"O", "x":12.5, "y":1.25}, {"label":"P", "x":14, "y":1.25}, {"label":"{", "x":15, "y":1.25}, {"label":"}", "x":16, "y":1.25}, {"label":"|", "x":17, "y":1.25, "w":1.5}, {"label":"PgDn", "x":19.25, "y":2}, {"label":"Caps Lock", "x":0.25, "y":2.25, "w":1.75}, {"label":"A", "x":2, "y":2.25}, {"label":"S", "x":3.75, "y":2.25}, {"label":"D", "x":4.75, "y":2.25}, {"label":"F", "x":5.75, "y":2.25}, {"label":"G", "x":6.75, "y":2.25}, {"label":"H", "x":9.75, "y":2.25}, {"label":"J", "x":10.75, "y":2.25}, {"label":"K", "x":11.75, "y":2.25}, {"label":"L", "x":12.75, "y":2.25}, {"label":":", "x":14.5, "y":2.25}, {"label":"\"", "x":15.5, "y":2.25}, {"label":"Enter", "x":16.5, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":4.25, "y":3.25}, {"label":"C", "x":5.25, "y":3.25}, {"label":"V", "x":6.25, "y":3.25}, {"label":"B", "x":7.25, "y":3.25}, {"label":"B", "x":9.25, "y":3.25}, {"label":"N", "x":10.25, "y":3.25}, {"label":"M", "x":11.25, "y":3.25}, {"label":"<", "x":12.25, "y":3.25}, {"label":">", "x":14, "y":3.25}, {"label":"?", "x":15, "y":3.25}, {"label":"Shift", "x":16, "y":3.25, "w":1.75}, {"label":"\u2191", "x":17.75, "y":3.25}, {"label":"Ctrl", "x":0.25, "y":4.25, "w":1.5}, {"label":"Alt", "x":4, "y":4.25, "w":1.25}, {"label":"Space", "x":5.25, "y":4.25, "w":2.25}, {"label":"Layer 2", "x":7.5, "y":4.25}, {"label":"Space", "x":9, "y":4.25, "w":2}, {"x":11, "y":4.25}, {"label":"Right Alt", "x":12, "y":4.25}, {"label":"Win", "x":15.25, "y":4.25, "w":1.5}, {"label":"\u2190", "x":16.75, "y":4.25}, {"label":"\u2193", "x":17.75, "y":4.25}, {"label":"\u2192", "x":18.75, "y":4.25}] + }, + "LAYOUT_split_bksp_275_rspace": { + "layout": [{"label":"Delete", "x":18.75, "y":0}, {"label":"Esc", "x":0.75, "y":0.25}, {"label":"!", "x":1.75, "y":0.25}, {"label":"@", "x":2.75, "y":0.25}, {"label":"#", "x":4, "y":0.25}, {"label":"$", "x":5, "y":0.25}, {"label":"%", "x":6, "y":0.25}, {"label":"^", "x":7, "y":0.25}, {"label":"&", "x":10, "y":0.25}, {"label":"*", "x":11, "y":0.25}, {"label":"(", "x":12, "y":0.25}, {"label":")", "x":13, "y":0.25}, {"label":"_", "x":14.25, "y":0.25}, {"label":"+", "x":15.25, "y":0.25}, {"label":"~", "x":16.25, "y":0.25}, {"label":"Back", "x":17.25, "y":0.25}, {"label":"PgUp", "x":19, "y":1}, {"label":"Tab", "x":0.5, "y":1.25, "w":1.5}, {"label":"Q", "x":2, "y":1.25}, {"label":"W", "x":3.5, "y":1.25}, {"label":"E", "x":4.5, "y":1.25}, {"label":"R", "x":5.5, "y":1.25}, {"label":"T", "x":6.5, "y":1.25}, {"label":"Y", "x":9.5, "y":1.25}, {"label":"U", "x":10.5, "y":1.25}, {"label":"I", "x":11.5, "y":1.25}, {"label":"O", "x":12.5, "y":1.25}, {"label":"P", "x":14, "y":1.25}, {"label":"{", "x":15, "y":1.25}, {"label":"}", "x":16, "y":1.25}, {"label":"|", "x":17, "y":1.25, "w":1.5}, {"label":"PgDn", "x":19.25, "y":2}, {"label":"Caps Lock", "x":0.25, "y":2.25, "w":1.75}, {"label":"A", "x":2, "y":2.25}, {"label":"S", "x":3.75, "y":2.25}, {"label":"D", "x":4.75, "y":2.25}, {"label":"F", "x":5.75, "y":2.25}, {"label":"G", "x":6.75, "y":2.25}, {"label":"H", "x":9.75, "y":2.25}, {"label":"J", "x":10.75, "y":2.25}, {"label":"K", "x":11.75, "y":2.25}, {"label":"L", "x":12.75, "y":2.25}, {"label":":", "x":14.5, "y":2.25}, {"label":"\"", "x":15.5, "y":2.25}, {"label":"Enter", "x":16.5, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":4.25, "y":3.25}, {"label":"C", "x":5.25, "y":3.25}, {"label":"V", "x":6.25, "y":3.25}, {"label":"B", "x":7.25, "y":3.25}, {"label":"B", "x":9.25, "y":3.25}, {"label":"N", "x":10.25, "y":3.25}, {"label":"M", "x":11.25, "y":3.25}, {"label":"<", "x":12.25, "y":3.25}, {"label":">", "x":14, "y":3.25}, {"label":"?", "x":15, "y":3.25}, {"label":"Shift", "x":16, "y":3.25, "w":1.75}, {"label":"\u2191", "x":17.75, "y":3.25}, {"label":"Ctrl", "x":0.25, "y":4.25, "w":1.5}, {"label":"Alt", "x":4, "y":4.25, "w":1.25}, {"label":"Space", "x":5.25, "y":4.25, "w":2.25}, {"label":"Layer 2", "x":7.5, "y":4.25}, {"label":"Space", "x":9, "y":4.25, "w":2.75}, {"label":"Right Alt", "x":11.75, "y":4.25, "w":1.25}, {"label":"Win", "x":15.25, "y":4.25, "w":1.5}, {"label":"\u2190", "x":16.75, "y":4.25}, {"label":"\u2193", "x":17.75, "y":4.25}, {"label":"\u2192", "x":18.75, "y":4.25}] + }, + "LAYOUT_full_bksp_275_rspace": { + "layout": [{"label":"Delete", "x":18.75, "y":0}, {"label":"Esc", "x":0.75, "y":0.25}, {"label":"!", "x":1.75, "y":0.25}, {"label":"@", "x":2.75, "y":0.25}, {"label":"#", "x":4, "y":0.25}, {"label":"$", "x":5, "y":0.25}, {"label":"%", "x":6, "y":0.25}, {"label":"^", "x":7, "y":0.25}, {"label":"&", "x":10, "y":0.25}, {"label":"*", "x":11, "y":0.25}, {"label":"(", "x":12, "y":0.25}, {"label":")", "x":13, "y":0.25}, {"label":"_", "x":14.25, "y":0.25}, {"label":"+", "x":15.25, "y":0.25}, {"label":"Back", "x":16.25, "y":0.25, "w":2}, {"label":"PgUp", "x":19, "y":1}, {"label":"Tab", "x":0.5, "y":1.25, "w":1.5}, {"label":"Q", "x":2, "y":1.25}, {"label":"W", "x":3.5, "y":1.25}, {"label":"E", "x":4.5, "y":1.25}, {"label":"R", "x":5.5, "y":1.25}, {"label":"T", "x":6.5, "y":1.25}, {"label":"Y", "x":9.5, "y":1.25}, {"label":"U", "x":10.5, "y":1.25}, {"label":"I", "x":11.5, "y":1.25}, {"label":"O", "x":12.5, "y":1.25}, {"label":"P", "x":14, "y":1.25}, {"label":"{", "x":15, "y":1.25}, {"label":"}", "x":16, "y":1.25}, {"label":"|", "x":17, "y":1.25, "w":1.5}, {"label":"PgDn", "x":19.25, "y":2}, {"label":"Caps Lock", "x":0.25, "y":2.25, "w":1.75}, {"label":"A", "x":2, "y":2.25}, {"label":"S", "x":3.75, "y":2.25}, {"label":"D", "x":4.75, "y":2.25}, {"label":"F", "x":5.75, "y":2.25}, {"label":"G", "x":6.75, "y":2.25}, {"label":"H", "x":9.75, "y":2.25}, {"label":"J", "x":10.75, "y":2.25}, {"label":"K", "x":11.75, "y":2.25}, {"label":"L", "x":12.75, "y":2.25}, {"label":":", "x":14.5, "y":2.25}, {"label":"\"", "x":15.5, "y":2.25}, {"label":"Enter", "x":16.5, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":4.25, "y":3.25}, {"label":"C", "x":5.25, "y":3.25}, {"label":"V", "x":6.25, "y":3.25}, {"label":"B", "x":7.25, "y":3.25}, {"label":"B", "x":9.25, "y":3.25}, {"label":"N", "x":10.25, "y":3.25}, {"label":"M", "x":11.25, "y":3.25}, {"label":"<", "x":12.25, "y":3.25}, {"label":">", "x":14, "y":3.25}, {"label":"?", "x":15, "y":3.25}, {"label":"Shift", "x":16, "y":3.25, "w":1.75}, {"label":"\u2191", "x":17.75, "y":3.25}, {"label":"Ctrl", "x":0.25, "y":4.25, "w":1.5}, {"label":"Alt", "x":4, "y":4.25, "w":1.25}, {"label":"Space", "x":5.25, "y":4.25, "w":2.25}, {"label":"Layer 2", "x":7.5, "y":4.25}, {"label":"Space", "x":9, "y":4.25, "w":2.75}, {"label":"Right Alt", "x":11.75, "y":4.25, "w":1.25}, {"label":"Win", "x":15.25, "y":4.25, "w":1.5}, {"label":"\u2190", "x":16.75, "y":4.25}, {"label":"\u2193", "x":17.75, "y":4.25}, {"label":"\u2192", "x":18.75, "y":4.25}] + }, + "LAYOUT_full_bksp_200_rspace": { + "layout": [{"label":"Delete", "x":18.75, "y":0}, {"label":"Esc", "x":0.75, "y":0.25}, {"label":"!", "x":1.75, "y":0.25}, {"label":"@", "x":2.75, "y":0.25}, {"label":"#", "x":4, "y":0.25}, {"label":"$", "x":5, "y":0.25}, {"label":"%", "x":6, "y":0.25}, {"label":"^", "x":7, "y":0.25}, {"label":"&", "x":10, "y":0.25}, {"label":"*", "x":11, "y":0.25}, {"label":"(", "x":12, "y":0.25}, {"label":")", "x":13, "y":0.25}, {"label":"_", "x":14.25, "y":0.25}, {"label":"+", "x":15.25, "y":0.25}, {"label":"Back", "x":16.25, "y":0.25, "w":2}, {"label":"PgUp", "x":19, "y":1}, {"label":"Tab", "x":0.5, "y":1.25, "w":1.5}, {"label":"Q", "x":2, "y":1.25}, {"label":"W", "x":3.5, "y":1.25}, {"label":"E", "x":4.5, "y":1.25}, {"label":"R", "x":5.5, "y":1.25}, {"label":"T", "x":6.5, "y":1.25}, {"label":"Y", "x":9.5, "y":1.25}, {"label":"U", "x":10.5, "y":1.25}, {"label":"I", "x":11.5, "y":1.25}, {"label":"O", "x":12.5, "y":1.25}, {"label":"P", "x":14, "y":1.25}, {"label":"{", "x":15, "y":1.25}, {"label":"}", "x":16, "y":1.25}, {"label":"|", "x":17, "y":1.25, "w":1.5}, {"label":"PgDn", "x":19.25, "y":2}, {"label":"Caps Lock", "x":0.25, "y":2.25, "w":1.75}, {"label":"A", "x":2, "y":2.25}, {"label":"S", "x":3.75, "y":2.25}, {"label":"D", "x":4.75, "y":2.25}, {"label":"F", "x":5.75, "y":2.25}, {"label":"G", "x":6.75, "y":2.25}, {"label":"H", "x":9.75, "y":2.25}, {"label":"J", "x":10.75, "y":2.25}, {"label":"K", "x":11.75, "y":2.25}, {"label":"L", "x":12.75, "y":2.25}, {"label":":", "x":14.5, "y":2.25}, {"label":"\"", "x":15.5, "y":2.25}, {"label":"Enter", "x":16.5, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":4.25, "y":3.25}, {"label":"C", "x":5.25, "y":3.25}, {"label":"V", "x":6.25, "y":3.25}, {"label":"B", "x":7.25, "y":3.25}, {"label":"B", "x":9.25, "y":3.25}, {"label":"N", "x":10.25, "y":3.25}, {"label":"M", "x":11.25, "y":3.25}, {"label":"<", "x":12.25, "y":3.25}, {"label":">", "x":14, "y":3.25}, {"label":"?", "x":15, "y":3.25}, {"label":"Shift", "x":16, "y":3.25, "w":1.75}, {"label":"\u2191", "x":17.75, "y":3.25}, {"label":"Ctrl", "x":0.25, "y":4.25, "w":1.5}, {"label":"Alt", "x":4, "y":4.25, "w":1.25}, {"label":"Space", "x":5.25, "y":4.25, "w":2.25}, {"label":"Layer 2", "x":7.5, "y":4.25}, {"label":"Space", "x":9, "y":4.25, "w":2}, {"x":11, "y":4.25}, {"label":"Right Alt", "x":12, "y":4.25}, {"label":"Win", "x":15.25, "y":4.25, "w":1.5}, {"label":"\u2190", "x":16.75, "y":4.25}, {"label":"\u2193", "x":17.75, "y":4.25}, {"label":"\u2192", "x":18.75, "y":4.25}] + } + } +} diff --git a/keyboards/hineybush/physix/keymaps/default/keymap.c b/keyboards/hineybush/physix/keymaps/default/keymap.c new file mode 100644 index 000000000000..2e0cf3155c83 --- /dev/null +++ b/keyboards/hineybush/physix/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* #define LAYOUT_split_bksp_275_rspace( \ + k000, k001, k002, k003, k004, k005, k403, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + 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, k214, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k400, k402, k404, k405, k406, K409, k410, k411, k412, k413 \ +) \ */ + [_BASE] = LAYOUT_split_bksp_275_rspace( + 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_GRAVE, 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_split_bksp_275_rspace( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_BRTG, BL_TOGG, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_INS, + 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_HOME, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/physix/keymaps/default/readme.md b/keyboards/hineybush/physix/keymaps/default/readme.md new file mode 100644 index 000000000000..0127c70d3578 --- /dev/null +++ b/keyboards/hineybush/physix/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for physix diff --git a/keyboards/hineybush/physix/physix.c b/keyboards/hineybush/physix/physix.c new file mode 100644 index 000000000000..99614aeb784e --- /dev/null +++ b/keyboards/hineybush/physix/physix.c @@ -0,0 +1,49 @@ +/* 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 "physix.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. + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(D3); + setPinOutput(D5); + 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 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.caps_lock); + writePin(D5, led_state.scroll_lock); + } + return res; + return led_update_user(led_state); +} + + + diff --git a/keyboards/hineybush/physix/physix.h b/keyboards/hineybush/physix/physix.h new file mode 100644 index 000000000000..c081a53806fe --- /dev/null +++ b/keyboards/hineybush/physix/physix.h @@ -0,0 +1,87 @@ +/* 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 . + */ + +#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, k003, k004, k005, k403, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + 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, k214, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k400, k402, k404, k405, k406, k408, k409, k410, k411, k412, k413 \ +) \ +{ \ + {k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014}, \ + {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, KC_NO, k214}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO}, \ + {k400, KC_NO,k402, k403, k404, k405, k406, KC_NO,k408, k409 ,k410, k411, k412, k413, KC_NO} \ +} + +#define LAYOUT_split_bksp_275_rspace( \ + k000, k001, k002, k003, k004, k005, k403, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + 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, k214, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k400, k402, k404, k405, k406, k409, k410, k411, k412, k413 \ +) \ +{ \ + {k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014}, \ + {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, KC_NO, k214}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO}, \ + {k400, KC_NO,k402, k403, k404, k405, k406, KC_NO,KC_NO,k409 ,k410, k411, k412, k413, KC_NO} \ +} + +#define LAYOUT_full_bksp_275_rspace( \ + k000, k001, k002, k003, k004, k005, k403, k006, k007, k008, k009, k010, k011, k013, k014, \ + 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, k214, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k400, k402, k404, k405, k406, k409, k410, k411, k412, k413 \ +) \ +{ \ + {k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, KC_NO,k013, k014}, \ + {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, KC_NO, k214}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO}, \ + {k400, KC_NO,k402, k403, k404, k405, k406, KC_NO,KC_NO,k409 ,k410, k411, k412, k413, KC_NO} \ +} + +#define LAYOUT_full_bksp_200_rspace( \ + k000, k001, k002, k003, k004, k005, k403, k006, k007, k008, k009, k010, k011, k013, k014, \ + 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, k214, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k400, k402, k404, k405, k406, k408, k409, k410, k411, k412, k413 \ +) \ +{ \ + {k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, KC_NO,k013, k014}, \ + {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, KC_NO, k214}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO}, \ + {k400, KC_NO,k402, k403, k404, k405, k406, KC_NO,k408, k409 ,k410, k411, k412, k413, KC_NO} \ +} diff --git a/keyboards/hineybush/physix/readme.md b/keyboards/hineybush/physix/readme.md new file mode 100644 index 000000000000..c95a8dc28482 --- /dev/null +++ b/keyboards/hineybush/physix/readme.md @@ -0,0 +1,15 @@ +# physix + +![PhysiX](https://geekhack.org/index.php?topic=103049.0) + +The PhysiX Ergonomic Keyboard by Life Zone + +* Keyboard Maintainer: [hineybush](https://github.com/hineybush) +* Hardware Supported: LZ PhysiX +* Hardware Availability: Group Buy + +Make example for this keyboard (after setting up your build environment): + + make hineybush/physix: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/hineybush/physix/rules.mk b/keyboards/hineybush/physix/rules.mk new file mode 100644 index 000000000000..5c1f5fb4b074 --- /dev/null +++ b/keyboards/hineybush/physix/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 = 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 = 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 a14339e75215ba5562483f25260683c64abaaf85 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Thu, 26 Dec 2019 12:39:09 -0500 Subject: [PATCH 097/973] Add h75-singa ver. (#7667) * add h75_singa * delete some stuff * update to remove extra crap --- keyboards/hineybush/h75_singa/config.h | 245 ++++++++++++++++++ keyboards/hineybush/h75_singa/h75_singa.c | 17 ++ keyboards/hineybush/h75_singa/h75_singa.h | 61 +++++ keyboards/hineybush/h75_singa/info.json | 15 ++ .../h75_singa/keymaps/default/keymap.c | 45 ++++ .../h75_singa/keymaps/default/readme.md | 1 + .../h75_singa/keymaps/wkl_std/keymap.c | 46 ++++ .../h75_singa/keymaps/wkl_std/readme.md | 1 + keyboards/hineybush/h75_singa/readme.md | 15 ++ keyboards/hineybush/h75_singa/rules.mk | 32 +++ 10 files changed, 478 insertions(+) create mode 100644 keyboards/hineybush/h75_singa/config.h create mode 100644 keyboards/hineybush/h75_singa/h75_singa.c create mode 100644 keyboards/hineybush/h75_singa/h75_singa.h create mode 100644 keyboards/hineybush/h75_singa/info.json create mode 100644 keyboards/hineybush/h75_singa/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/h75_singa/keymaps/default/readme.md create mode 100644 keyboards/hineybush/h75_singa/keymaps/wkl_std/keymap.c create mode 100644 keyboards/hineybush/h75_singa/keymaps/wkl_std/readme.md create mode 100644 keyboards/hineybush/h75_singa/readme.md create mode 100644 keyboards/hineybush/h75_singa/rules.mk diff --git a/keyboards/hineybush/h75_singa/config.h b/keyboards/hineybush/h75_singa/config.h new file mode 100644 index 000000000000..82222e29c3b4 --- /dev/null +++ b/keyboards/hineybush/h75_singa/config.h @@ -0,0 +1,245 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEC9A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Singa Keyboards +#define PRODUCT h75_singa +#define DESCRIPTION Singa + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * 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, B1, D0, D1, D2, D6 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, B2, D4, D5, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 22 + #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/hineybush/h75_singa/h75_singa.c b/keyboards/hineybush/h75_singa/h75_singa.c new file mode 100644 index 000000000000..e2de94a43323 --- /dev/null +++ b/keyboards/hineybush/h75_singa/h75_singa.c @@ -0,0 +1,17 @@ +/* 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 "h75_singa.h" diff --git a/keyboards/hineybush/h75_singa/h75_singa.h b/keyboards/hineybush/h75_singa/h75_singa.h new file mode 100644 index 000000000000..7e8e63d18336 --- /dev/null +++ b/keyboards/hineybush/h75_singa/h75_singa.h @@ -0,0 +1,61 @@ +/* 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 . + */ + +#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, 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 \ +) \ +{ \ + {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, KC_NO, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k214, k215}, \ + {k300, KC_NO, 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, KC_NO, k414, k415}, \ + {k500, k501, k502, KC_NO, k504, KC_NO, k506, KC_NO, k508, KC_NO, k510, k511, KC_NO, k513, k514, k515} \ +} + +#define LAYOUT_wkl_std( \ + 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, 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, k314, k315, \ + k400, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k414, k415, \ + k500, k501, k506, k510, k511, k513, k514, k515 \ +) \ +{ \ + {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, KC_NO, k114, k115}, \ + {k200, KC_NO, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k214, k215}, \ + {k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, k315}, \ + {k400, KC_NO, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, KC_NO, k414, k415}, \ + {k500, k501, KC_NO, KC_NO, KC_NO, KC_NO, k506, KC_NO, KC_NO, KC_NO, k510, k511, KC_NO, k513, k514, k515} \ +} diff --git a/keyboards/hineybush/h75_singa/info.json b/keyboards/hineybush/h75_singa/info.json new file mode 100644 index 000000000000..8b886289c3b1 --- /dev/null +++ b/keyboards/hineybush/h75_singa/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "h75_singa", + "url": "", + "maintainer": "hineybush", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_all": { + "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":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1}, {"x":14, "y":1}, {"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}, {"x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":1.25}, {"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":2.75}, {"x":6.5, "y":5, "w":1.25}, {"x":7.75, "y":5, "w":2.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + }, + "LAYOUT_wkl_std": { + "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":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "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":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":1.5, "y":5, "w":1.5}, {"x":3, "y":5, "w":6.5}, {"label":"Alt", "x":9.5, "y":5, "w":1.5}, {"label":"Ctrl", "x":11, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} diff --git a/keyboards/hineybush/h75_singa/keymaps/default/keymap.c b/keyboards/hineybush/h75_singa/keymaps/default/keymap.c new file mode 100644 index 000000000000..85f59d0fb2b3 --- /dev/null +++ b/keyboards/hineybush/h75_singa/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* 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 + ), +}; + + diff --git a/keyboards/hineybush/h75_singa/keymaps/default/readme.md b/keyboards/hineybush/h75_singa/keymaps/default/readme.md new file mode 100644 index 000000000000..cf2ef2d81849 --- /dev/null +++ b/keyboards/hineybush/h75_singa/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h75_singa diff --git a/keyboards/hineybush/h75_singa/keymaps/wkl_std/keymap.c b/keyboards/hineybush/h75_singa/keymaps/wkl_std/keymap.c new file mode 100644 index 000000000000..156f99225d69 --- /dev/null +++ b/keyboards/hineybush/h75_singa/keymaps/wkl_std/keymap.c @@ -0,0 +1,46 @@ +/* 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, 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, k314, k315, \ + k400, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k414, k415, \ + k500, k501, k506, k510, k511, k513, k514, k515 \*/ + [0] = LAYOUT_wkl_std( + 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_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_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + + ), + + [1] = LAYOUT_wkl_std( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,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 + ), +}; + + + diff --git a/keyboards/hineybush/h75_singa/keymaps/wkl_std/readme.md b/keyboards/hineybush/h75_singa/keymaps/wkl_std/readme.md new file mode 100644 index 000000000000..cbffa642ce24 --- /dev/null +++ b/keyboards/hineybush/h75_singa/keymaps/wkl_std/readme.md @@ -0,0 +1 @@ +# A basic winkeyless keymap with full-sized backspace for h75_singa diff --git a/keyboards/hineybush/h75_singa/readme.md b/keyboards/hineybush/h75_singa/readme.md new file mode 100644 index 000000000000..815785834cb8 --- /dev/null +++ b/keyboards/hineybush/h75_singa/readme.md @@ -0,0 +1,15 @@ +# h75_singa + +![h75_singa](imgur.com image replace me!) - TBD + +New 75% PCB for Singa Keyboards + +* Keyboard Maintainer: [hineybush](https://github.com/hineybush) +* Hardware Supported: Singa w/ USB Type-C support (exact version TBA) +* Hardware Availability: TBA + +Make example for this keyboard (after setting up your build environment): + + make h75_singa: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/hineybush/h75_singa/rules.mk b/keyboards/hineybush/h75_singa/rules.mk new file mode 100644 index 000000000000..9255756c179a --- /dev/null +++ b/keyboards/hineybush/h75_singa/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 = 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 = 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 c32d0857104eb07ee99258387f118fc63385343c Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 26 Dec 2019 19:01:57 -0800 Subject: [PATCH 098/973] [Keyboard] Kyria Configurator Fixes (#7719) * Fix key object order info.json: Reorder the key objects into the order required by kyria.h * linting info.json: fix indent depth and trailing whitespaces * Minimize visual footprint info.json: Subtract 0.25 from each Y value to minimize the keyboard dimensions when rendered --- keyboards/kyria/info.json | 82 +++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 21 deletions(-) diff --git a/keyboards/kyria/info.json b/keyboards/kyria/info.json index 916367f47a07..a2bfd578ce33 100644 --- a/keyboards/kyria/info.json +++ b/keyboards/kyria/info.json @@ -1,23 +1,63 @@ { - "keyboard_name": "Kyria", - "url": "https://splitkb.com", - "maintainer": "splitkb.com", - "width": 16.5, - "height": 5.5, - "layouts": { - "LAYOUT": { - "layout": [ - {"x":3, "y":0.25}, {"x":12.5, "y":0.25}, {"x":2, "y":0.5}, {"x":4, "y":0.5}, {"x":11.5, "y":0.5}, - {"x":13.5, "y":0.5}, {"x":5, "y":0.75}, {"x":10.5, "y":0.75}, {"x":0, "y":1}, {"x":1, "y":1}, - {"x":14.5, "y":1}, {"x":15.5, "y":1}, {"x":3, "y":1.25}, {"x":12.5, "y":1.25}, {"x":2, "y":1.5}, - {"x":4, "y":1.5}, {"x":11.5, "y":1.5}, {"x":13.5, "y":1.5}, {"x":5, "y":1.75}, {"x":10.5, "y":1.75}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2}, {"x":3, "y":2.25}, - {"x":12.5, "y":2.25}, {"x":2, "y":2.5}, {"x":4, "y":2.5}, {"x":11.5, "y":2.5}, {"x":13.5, "y":2.5}, - {"x":5, "y":2.75}, {"x":10.5, "y":2.75}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":14.5, "y":3}, - {"x":15.5, "y":3}, {"x":6, "y":3.25}, {"x":9.5, "y":3.25}, {"x":2.5, "y":3.5}, {"x":3.5, "y":3.5}, - {"x":7, "y":3.5}, {"x":8.5, "y":3.5}, {"x":12, "y":3.5}, {"x":13, "y":3.5}, {"x":4.5, "y":3.75}, - {"x":11, "y":3.75}, {"x":5.5, "y":4.25}, {"x":10, "y":4.25}, {"x":6.5, "y":4.5}, {"x":9, "y":4.5} - ] - } + "keyboard_name": "Kyria", + "url": "https://splitkb.com", + "maintainer": "splitkb.com", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0.75}, + {"x":1, "y":0.75}, + {"x":2, "y":0.25}, + {"x":3, "y":0}, + {"x":4, "y":0.25}, + {"x":5, "y":0.5}, + {"x":10.5, "y":0.5}, + {"x":11.5, "y":0.25}, + {"x":12.5, "y":0}, + {"x":13.5, "y":0.25}, + {"x":14.5, "y":0.75}, + {"x":15.5, "y":0.75}, + {"x":0, "y":1.75}, + {"x":1, "y":1.75}, + {"x":2, "y":1.25}, + {"x":3, "y":1}, + {"x":4, "y":1.25}, + {"x":5, "y":1.5}, + {"x":10.5, "y":1.5}, + {"x":11.5, "y":1.25}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1.25}, + {"x":14.5, "y":1.75}, + {"x":15.5, "y":1.75}, + {"x":0, "y":2.75}, + {"x":1, "y":2.75}, + {"x":2, "y":2.25}, + {"x":3, "y":2}, + {"x":4, "y":2.25}, + {"x":5, "y":2.5}, + {"x":6, "y":3}, + {"x":7, "y":3.25}, + {"x":8.5, "y":3.25}, + {"x":9.5, "y":3}, + {"x":10.5, "y":2.5}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2}, + {"x":13.5, "y":2.25}, + {"x":14.5, "y":2.75}, + {"x":15.5, "y":2.75}, + {"x":2.5, "y":3.25}, + {"x":3.5, "y":3.25}, + {"x":4.5, "y":3.5}, + {"x":5.5, "y":4}, + {"x":6.5, "y":4.25}, + {"x":9, "y":4.25}, + {"x":10, "y":4}, + {"x":11, "y":3.5}, + {"x":12, "y":3.25}, + {"x":13, "y":3.25} + ] } - } \ No newline at end of file + } +} From b359830ea2f92010a8c5459cbb610857fe5d6675 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 27 Dec 2019 14:31:48 +1100 Subject: [PATCH 099/973] Fix file encoding for zh-cn/custom_quantum_functions.md (#7665) --- docs/zh-cn/custom_quantum_functions.md | 324 ++++++++++++------------- 1 file changed, 162 insertions(+), 162 deletions(-) diff --git a/docs/zh-cn/custom_quantum_functions.md b/docs/zh-cn/custom_quantum_functions.md index 42ceba9cac7c..f2c6098dcb70 100644 --- a/docs/zh-cn/custom_quantum_functions.md +++ b/docs/zh-cn/custom_quantum_functions.md @@ -1,31 +1,31 @@ -# ��ζ�������̵Ĺ��� +# 如何定制你键盘的功能 -���ںܶ�����˵���ƻ����̿ɲ�ֻ������ĵ��Է����㰴���Ǹ�����ô�򵥡���϶���ʵ�ֱȼ򵥰����ͺ�����ӵĹ��ܡ�QMK��������ע�����Ĺ���, ���ǹ���, ���⣬�������Զ�������ڲ�ͬ����µ���Ϊ�� +对于很多人来说客制化键盘可不只是向你的电脑发送你按了那个件这么简单。你肯定想实现比简单按键和宏更复杂的功能。QMK有能让你注入代码的钩子, 覆盖功能, 另外,还可以自定义键盘在不同情况下的行为。 -��ҳ���ٶ��κ������QMK֪ʶ�����Ķ�[����QMK](understanding_qmk.md)�����ڸ������IJ���������ⷢ����ʲô�� +本页不假定任何特殊的QMK知识,但阅读[理解QMK](understanding_qmk.md)将会在更基础的层面帮你理解发生了什么。 -## A Word on Core vs ���� vs ���� +## A Word on Core vs 键盘 vs 布局 -���ǰ�qmk��֯��һ����νṹ�� +我们把qmk组织成一个层次结构: * Core (`_quantum`) * Keyboard/Revision (`_kb`) * Keymap (`_user`) -����������ÿһ�������������ڶ����ϼ�һ��`_kb()`�� `_user()` ��׺�� �����ڼ���/�޶���ʹ��`_kb()`��׺���ڲ��ֲ�ʹ��`_user()`��׺�� +下面描述的每一个函数都可以在定义上加一个`_kb()`或 `_user()` 后缀。 建议在键盘/修订层使用`_kb()`后缀,在布局层使用`_user()`后缀。 -�ڼ���/�޶��㶨�庯��ʱ��`_kb()`��ִ���κδ���ǰ�ȵ���`_user()`�DZ�Ҫ�ģ���Ȼ���ֲ㺯���Ͳ�Ҫ�����á� - -# �Զ������ +在键盘/修订层定义函数时,`_kb()`在执行任何代码前先调用`_user()`是必要的,不然布局层函数就不要被调用。 + +# 自定义键码 -��ĿǰΪֹ������������Ǹ������м������Ϊ�򴴽��µļ��롣�Ӵ���Ƕ�������Щ�����������ơ� +到目前为止,最常见的任务是更改现有键码的行为或创建新的键码。从代码角度来看这些操作都很相似。 -## ����һ���¼��� +## 定义一个新键码 -���������һ������ö�ٳ���ȫ����Ҳ���Ǹ�����������ֲ�����Ψһ��ֵ��QMKû��ֱ������������ֵ��С�������ṩ��һ��`SAFE_RANGE`�ꡣ�������ö��ʱ��`SAFE_RANGE`����֤��ȡ����Ψһ�ļ���ֵ�� +创建键码第一步,先枚举出它全部,也就是给键码起个名字并分配唯一数值。QMK没有直接限制最大键码值大小,而是提供了一个`SAFE_RANGE`宏。你可以在枚举时用`SAFE_RANGE`来保证你取得了唯一的键码值。 -����ö��������������ӡ������ӵ�`keymap.c`�Ļ�����ڲ���������`FOO`��`BAR`�ˡ� +这有枚举两个键码的例子。把这块加到`keymap.c`的话你就在布局中能用`FOO`和`BAR`了。 ```c enum my_keycodes { @@ -34,46 +34,46 @@ enum my_keycodes { }; ``` -## Ϊ�������Ϊ��� +## 为键码的行为编程 -���㸲��һ���Ѵ��ڰ�������Ϊʱ���������Ϊ�����¼�ʱ����Ҫ��`process_record_kb()`��`process_record_user()`���������������ڼ���������ʵ���¼�������ǰ��QMK���á����������������`true`��QMK�����������ķ�ʽ�������롣�������Ժܷ������չ����Ĺ��ܶ������滻���������������`false` QMK������������������Ȼ���ͼ���̧���ǰ����¼�����������ˡ� +当你覆盖一个已存在按键的行为时,或将这个行为赋给新键时,你要用`process_record_kb()`和`process_record_user()`函数。这俩函数在键处理中真实键事件被处理前被QMK调用。如果这俩函数返回`true`,QMK将会用正常的方式处理键码。这样可以很方便的扩展键码的功能而不是替换它。如果函数返回`false` QMK会跳过正常键处理,然后发送键子抬起还是按下事件就由你决定了。 -��ij�������»��ͷ�ʱ���������ᱻ���á� +当某个键按下或释放时这俩函数会被调用。 -### process_record_user()`����ʾ��ʵ�� +### process_record_user()`函数示例实现 -����������������¡��Զ�����һ������`FOO`�ļ������Ϊ�����������ڰ��»س�ʱ���������� +这个例子做了两个事。自定义了一个叫做`FOO`的键码的行为,并补充了在按下回车时播放音符。 ```c bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case FOO: if (record->event.pressed) { - // ����ʱ��Щʲô + // 按下时做些什么 } else { - // �ͷ�ʱ��Щʲô + // 释放时做些什么 } - return false; // �����˼������н�һ������ + return false; // 跳过此键的所有进一步处理 case KC_ENTER: - // �����»س�ʱ�������� + // 当按下回车时播放音符 if (record->event.pressed) { PLAY_NOTE_ARRAY(tone_qwerty); } - return true; // ��QMK�����س�����/�ͷ��¼� + return true; // 让QMK触发回车按下/释放事件 default: - return true; // ���������������� + return true; // 正常处理其他键码 } } ``` -### `process_record_*` �����ĵ� +### `process_record_*` 函数文档 -* ����/�޶�: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` -* ����: `bool process_record_user(uint16_t keycode, keyrecord_t *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` ����������Щ�¼��� +`keycode(键码)`参数是在布局上定义的,比如`MO(1)`, `KC_L`, 等等。 你要用 `switch...case` 块来处理这些事件。 -`record`��������ʵ�ʰ�������Ϣ�� +`record`参数含有实际按键的信息: ```c keyrecord_t record { @@ -88,9 +88,9 @@ keyrecord_t record { } ``` -# LED���� +# LED控制 -qmk�ṩ�˶�ȡHID�淶������5��LED�ķ�����: +qmk提供了读取HID规范包含的5个LED的方法。: * `USB_LED_NUM_LOCK` * `USB_LED_CAPS_LOCK` @@ -98,20 +98,20 @@ qmk * `USB_LED_COMPOSE` * `USB_LED_KANA` -�����������Ӧ������LED״̬��λ��λ�� -�����ַ������Ի������LED״̬�� +这五个常量对应于主机LED状态的位置位。 +有两种方法可以获得主机LED状态: -* ͨ��ִ�� `led_set_user()` -* ͨ������ `host_keyboard_leds()` +* 通过执行 `led_set_user()` +* 通过调用 `host_keyboard_leds()` ## `led_set_user()` -��5��LED���κ�һ����״̬��Ҫ�ı�ʱ���˺����������á��˺���ͨ����������LED������ -ʹ��`IS_LED_ON(usb_led, led_name)`��`IS_LED_OFF(usb_led, led_name)`�������������LED״̬�� +当5个LED中任何一个的状态需要改变时,此函数将被调用。此函数通过参数输入LED参数。 +使用`IS_LED_ON(usb_led, led_name)`和`IS_LED_OFF(usb_led, led_name)`这两个宏来检查LED状态。 -!> `host_keyboard_leds()`���ܻ���`led_set_user()`������ǰ������ֵ�� +!> `host_keyboard_leds()`可能会在`led_set_user()`被调用前返回新值。 -### `led_set_user()`����ʾ��ʵ�� +### `led_set_user()`函数示例实现 ```c void led_set_user(uint8_t usb_led) { @@ -143,59 +143,59 @@ void led_set_user(uint8_t usb_led) { } ``` -### `led_set_*`�����ĵ� +### `led_set_*`函数文档 -* ����/�޶�: `void led_set_kb(uint8_t usb_led)` -* ����: `void led_set_user(uint8_t usb_led)` +* 键盘/修订: `void led_set_kb(uint8_t usb_led)` +* 布局: `void led_set_user(uint8_t usb_led)` ## `host_keyboard_leds()` -������������᷵������յ���LED״̬�����������`led_set_*`֮���ȡLED״̬ʱ�����ã�������[`matrix_scan_user()`](#����ɨ�����). -Ϊ�˱�ݣ��������`IS_HOST_LED_ON(led_name)`��`IS_HOST_LED_OFF(led_name)` �꣬����ֱ�ӵ��úͼ��`host_keyboard_leds()`�� +调用这个函数会返回最后收到的LED状态。这个函数在`led_set_*`之外读取LED状态时很有用,比如在[`matrix_scan_user()`](#矩阵扫描代码). +为了便捷,你可以用`IS_HOST_LED_ON(led_name)`和`IS_HOST_LED_OFF(led_name)` 宏,而不直接调用和检查`host_keyboard_leds()`。 -## ��������LED״̬ +## 设置物理LED状态 -һЩ����ʵ����Ϊ��������LED��״̬�ṩ�˷���ķ����� +一些键盘实现了为设置物理LED的状态提供了方便的方法。 ### Ergodox Boards -Ergodoxʵ�����ṩ`ergodox_right_led_1`/`2`/`3_on`/`off()`����ÿ��LED�����, Ҳ������ `ergodox_right_led_on`/`off(uint8_t led)` �������򿪻�ر����ǡ� +Ergodox实现了提供`ergodox_right_led_1`/`2`/`3_on`/`off()`来让每个LED开或关, 也可以用 `ergodox_right_led_on`/`off(uint8_t led)` 按索引打开或关闭他们。 -���⣬������ʹ��`ergodox_led_all_set(uint8_t n)`ָ������LED�����ȼ������ÿ��LED��`ergodox_right_led_1`/`2`/`3_set(uint8_t n)`��ʹ�������Ļ���`ergodox_right_led_set(uint8_t led, uint8_t n)`�� +此外,还可以使用`ergodox_led_all_set(uint8_t n)`指定所有LED的亮度级别;针对每个LED用`ergodox_right_led_1`/`2`/`3_set(uint8_t n)`;使用索引的话用`ergodox_right_led_set(uint8_t led, uint8_t n)`。 -Ergodox boards ͬʱ������������ȼ���`LED_BRIGHTNESS_LO`��������ȼ���`LED_BRIGHTNESS_HI`(Ĭ�����). +Ergodox boards 同时定义了最低亮度级别`LED_BRIGHTNESS_LO`和最高亮度级别`LED_BRIGHTNESS_HI`(默认最高). -# ���̳�ʼ������ +# 键盘初始化代码 -���̳�ʼ�������м������衣�������Ǹ�����ȡ��������Ҫ��ʲô�� +键盘初始化过程有几个步骤。你是用那个函数取决于你想要做什么。 -��������Ҫ��ʼ��������������˳���г��� +有三个主要初始化函数,按调用顺序列出。 -* `keyboard_pre_init_*` - ���ڴ����������������ǰ���С���������Щ��Ҫ��ǰ���е�Ӳ����ʼ���� -* `matrix_init_*` - �ڹ̼����������м䱻���á���ʱӲ���ѳ�ʼ����������δ��ʼ���� -* `keyboard_post_init_*` - �ڹ̼�����������󱻵��á����������£���ġ����ƻ������붼���Է������ +* `keyboard_pre_init_*` - 会在大多数其他东西运行前运行。适用于哪些需要提前运行的硬件初始化。 +* `matrix_init_*` - 在固件启动过程中间被调用。此时硬件已初始化,功能尚未初始化。 +* `keyboard_post_init_*` - 在固件启动过程最后被调用。大多数情况下,你的“客制化”代码都可以放在这里。 -!> ���ڴ��������˵`keyboard_post_init_user`������Ҫ���õĺ���������, ��ʱ���������RGB�Ʒ��⡣ +!> 对于大多数人来说`keyboard_post_init_user`是你想要调用的函数。例如, 此时你可以设置RGB灯发光。 -## ����Ԥ��ʼ������ +## 键盘预初始化代码 -����뼫�����У���������USB��ʼ��ǰ���С� +这代码极早运行,甚至都在USB初始化前运行。 -����֮�󲻾þ���ͱ���ʼ���ˡ� +在这之后不久矩阵就被初始化了。 -���ڴ�����û���˵,���ò�������Ϊ����Ҫ����������Ӳ���ij�ʼ���� +对于大多数用户来说,这用不到,因为它主要是用于面向硬件的初始化。 -���������Ӳ����ʼ���Ļ����������ٺò�����(�����ʼ��LED����һ���). +但如果你有硬件初始化的话放在这里再好不过了(比如初始化LED引脚一类的). -### `keyboard_pre_init_user()`����ʾ��ʵ�� +### `keyboard_pre_init_user()`函数示例实现 -�������ڼ��̼����趨 B0, B1, B2, B3, �� B4 ��LED���š� +本例中在键盘级别,设定 B0, B1, B2, B3, 和 B4 是LED引脚。 ```c void keyboard_pre_init_user(void) { - // ���ü���Ԥ��ʼ������ + // 调用键盘预初始化代码 - // ����LED����Ϊ���ģʽ + // 设置LED引脚为输出模式 setPinOutput(B0); setPinOutput(B1); setPinOutput(B2); @@ -204,73 +204,73 @@ void keyboard_pre_init_user(void) { } ``` -### `keyboard_pre_init_*` �����ĵ� +### `keyboard_pre_init_*` 函数文档 -* ����/�޶�: `void keyboard_pre_init_kb(void)` -* ����: `void keyboard_pre_init_user(void)` +* 键盘/修订: `void keyboard_pre_init_kb(void)` +* 布局: `void keyboard_pre_init_user(void)` -## �����ʼ������ +## 矩阵初始化代码 -�⽫���ھ����ʼ��ʱ�����ã���ijЩӲ�����úú󣬵���һЩ���ܱ���ʼ��ǰ�� +这将会在矩阵初始化时被调用,在某些硬件设置好后,但在一些功能被初始化前。 -���������������ط����õ��Ķ�����ʱ�������ã�����Ӳ���޹أ�Ҳ����������������λ�á� +这在你设置其他地方会用到的东西的时候会很有用,但与硬件无关,也不依赖于它的启动位置。 -### `matrix_init_*`�����ĵ� +### `matrix_init_*`函数文档 -* ����/�޶�: `void matrix_init_kb(void)` -* ����: `void matrix_init_user(void)` +* 键盘/修订: `void matrix_init_kb(void)` +* 布局: `void matrix_init_user(void)` -## ���̺��ʼ������ +## 键盘后初始化代码 -���Ǽ��̳�ʼ�������е����һ����������������ijЩ���ԣ��������ã���Ϊ��ʱӦ�ö����ǽ��г�ʼ���� +这是键盘初始化过程中的最后一个任务。如果您想更改某些特性,这会很有用,因为此时应该对它们进行初始化。 -### `keyboard_post_init_user()`ʾ��ʵ�� +### `keyboard_post_init_user()`示例实现 -��ʾ�������г�ʼ����ɺ����У�����RGB�ơ� +本示例在所有初始化完成后运行,配置RGB灯。 ```c void keyboard_post_init_user(void) { - // ���ú��ʼ������ - rgblight_enable_noeeprom(); // ʹ��Rgb������������ - rgblight_sethsv_noeeprom(180, 255, 255); // ����ɫ���õ�����ɫ(��ɫ)������ - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // ���ÿ��ٺ���ģʽ������ + // 调用后初始化代码 + rgblight_enable_noeeprom(); // 使能Rgb,不保存设置 + rgblight_sethsv_noeeprom(180, 255, 255); // 将颜色设置到蓝绿色(青色)不保存 + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // 设置快速呼吸模式不保存 } ``` -### `keyboard_post_init_*` �����ĵ� +### `keyboard_post_init_*` 函数文档 -* ����/�޶�: `void keyboard_post_init_kb(void)` -* ����: `void keyboard_post_init_user(void)` +* 键盘/修订: `void keyboard_post_init_kb(void)` +* 布局: `void keyboard_post_init_user(void)` -# ����ɨ����� +# 矩阵扫描代码 -���ܵĻ���Ҫ��`process_record_*()`�Զ�����̣������ַ�ʽ���ӵ��¼��У���ȷ�����벻��Լ��̲������������Ӱ�졣Ȼ�����ڼ���������£��б�Ҫ���о���ɨ�衣����Щ������Ҫ�ر�ע���������ܣ���Ϊ��ÿ�����ٱ�����10�Ρ� +可能的话你要用`process_record_*()`自定义键盘,以这种方式连接到事件中,以确保代码不会对键盘产生负面的性能影响。然而,在极少数情况下,有必要进行矩阵扫描。在这些函数中要特别注意代码的性能,因为它每秒至少被调用10次。 -### `matrix_scan_*`ʾ��ʵ�� +### `matrix_scan_*`示例实现 -������ӱ�����ʡ���ˡ���hook����һ�������ܼ������е�����֮ǰ����Ӧ���㹻�˽�qmk���ڲ��ṹ���Ա���û��ʾ��������±�д���������Ҫ��������[����һ��issue](https://github.com/qmk/qmk_firmware/issues/new)��[��Discord�������ǽ���](https://discord.gg/Uq7gcHh). +这个例子被故意省略了。在hook这样一个对性能及其敏感的区域之前,您应该足够了解qmk的内部结构,以便在没有示例的情况下编写。如果你需要帮助,请[建立一个issue](https://github.com/qmk/qmk_firmware/issues/new)或[在Discord上与我们交流](https://discord.gg/Uq7gcHh). -### `matrix_scan_*` �����ĵ� +### `matrix_scan_*` 函数文档 -* ����/�޶�: `void matrix_scan_kb(void)` -* ����: `void matrix_scan_user(void)` +* 键盘/修订: `void matrix_scan_kb(void)` +* 布局: `void matrix_scan_user(void)` -�ú�����ÿ�ξ���ɨ��ʱ�����ã��������MCU��������������ͬ��������д����Ҫ��������Ϊ�������кܶ�Ρ� +该函数在每次矩阵扫描时被调用,这基本与MCU处理能力上限相同。在这里写代码要谨慎,因为它会运行很多次。 -������Զ������ɨ�����ʱ�õ������������Ҳ���������Զ���״̬���(����LED�ƻ�����Ļ)�������������û���������Ҳ�붨�����еĹ��ܡ� +你会在自定义矩阵扫描代码时用到这个函数。这也可以用作自定义状态输出(比如LED灯或者屏幕)或者其他即便用户不输入你也想定期运行的功能。 -# ���� ����/���� ���� +# 键盘 空闲/唤醒 代码 -�������֧�־Ϳ���ͨ��ֹͣһ��Ʊ�������ﵽ"����"��RGB�ƺͱ�����Ǻܺõ����ӡ�����Խ�Լ�ܺģ�Ҳ����������̷�ζ���ѡ� +如果键盘支持就可以通过停止一大票功能来达到"空闲"。RGB灯和背光就是很好的例子。这可以节约能耗,也可能让你键盘风味更佳。 -��������������: `suspend_power_down_*`��`suspend_wakeup_init_*`, �ֱ���ϵͳ����кͻ���ʱ���á� +用两个函数控制: `suspend_power_down_*`和`suspend_wakeup_init_*`, 分别在系统板空闲和唤醒时调用。 -### suspend_power_down_user()��suspend_wakeup_init_user()ʾ��ʵ�� +### suspend_power_down_user()和suspend_wakeup_init_user()示例实现 ```c @@ -283,18 +283,18 @@ void suspend_wakeup_init_user(void) { } ``` -### ���� ����/���� �����ĵ� +### 键盘 挂起/唤醒 函数文档 -* ����/�޶�: `void suspend_power_down_kb(void)` ��`void suspend_wakeup_init_user(void)` -* ����: `void suspend_power_down_kb(void)` �� `void suspend_wakeup_init_user(void)` +* 键盘/修订: `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_*` ʾ��ʵ�� +### `layer_state_set_*` 示例实现 -����ʹ����Planck����ʾ����������� [RGB�����](feature_rgblight.md)ʹ֮����Ӧ +本例使用了Planck键盘示范了如何设置 [RGB背光灯](feature_rgblight.md)使之与层对应 ```c uint32_t layer_state_set_user(uint32_t state) { @@ -318,31 +318,31 @@ uint32_t layer_state_set_user(uint32_t state) { return state; } ``` -### `layer_state_set_*` �����ĵ� +### `layer_state_set_*` 函数文档 -* ����/�޶�: `uint32_t layer_state_set_kb(uint32_t state)` -* ����: `uint32_t layer_state_set_user(uint32_t state)` +* 键盘/修订: `uint32_t layer_state_set_kb(uint32_t state)` +* 布局: `uint32_t layer_state_set_user(uint32_t state)` -��`״̬`�ǻ���bitmask, ���[���ָ���](keymap.md#���ֵIJ�״̬) +该`状态`是活动层的bitmask, 详见[布局概述](keymap.md#布局的层状态) -# ���籣������ (EEPROM) +# 掉电保存配置 (EEPROM) -�����������ó��ڵı����ڼ����С���Щ���ñ����������ص�EEPROM����粻����ʧ�� ���ÿ�����`eeconfig_read_kb`��`eeconfig_read_user`��ȡ��������`eeconfig_update_kb`��`eeconfig_update_user`д�롣�������ϣ���ܹ��л��Ĺ��ܺ�����(�����л�RGB��ָʾ�����⣬�������`eeconfig_init_kb`��`eeconfig_init_user`������EEPROMĬ��ֵ�� +这会让你的配置长期的保存在键盘中。这些配置保存在你主控的EEPROM里,掉电不会消失。 设置可以用`eeconfig_read_kb`和`eeconfig_read_user`读取,可以用`eeconfig_update_kb`和`eeconfig_update_user`写入。这对于您希望能够切换的功能很有用(比如切换RGB层指示。此外,你可以用`eeconfig_init_kb`和`eeconfig_init_user`来设置EEPROM默认值。 -��ӵIJ��ֿ����ǣ��кܶ෽������ͨ��EEPROM�洢�ͷ������ݣ����Ҳ�û�������ַ����ǡ�������ȷ���ġ���ÿ������ֻ��һ��˫��(���ֽ�)�ռ䡣 +最复杂的部分可能是,有很多方法可以通过EEPROM存储和访问数据,并且并没有用哪种方法是“政治正确”的。你每个功能只有一个双字(四字节)空间。 -��סEEPROM����д�������ġ�����д�������ܸߣ����Dz�����ֻ������д��EEPROM�С������д��Ƶ�������MCU���������̡� +记住EEPROM是有写入寿命的。尽管写入寿命很高,但是并不是只有设置写道EEPROM中。如果你写入频繁,你的MCU寿命将会变短。 -* �����������������ӣ���ô������ϣ������ʹ��������ԣ���Ϊ���൱���ӡ� +* 如果您不理解这个例子,那么您可能希望避免使用这个特性,因为它相当复杂。 -### ʾ��ʵ�� +### 示例实现 -��������������������ã����Ҷ�д������ʹ�����û����֡�����һ�����ӵĺ������кܶ�����Ҫ����ʵ���ϣ���ʹ���˺ܶ����������������� +本例讲解了如何添加设置,并且读写。本里使用了用户布局。这是一个复杂的函数,有很多事情要做。实际上,它使用了很多上述函数来工作! -�����keymap.c�ļ��У������´�������������: +在你的keymap.c文件中,将以下代码添加至顶部: ```c typedef union { uint32_t raw; @@ -354,19 +354,19 @@ typedef union { user_config_t user_config; ``` -���ϴ��뽨����һ���ṹ�壬�ýṹ����Դ洢���ò�������д��EEPROM�������㽫���趨���������Ϊ�ڽṹ������Ȼ���塣Ҫ��ס`bool` (����)ֵʹ��1λ, `uint8_t`ʹ��8λ, `uint16_t`ʹ��16λ������Ի�ϴ���ʹ�ã�����˳��Ǵ����ܻ������鷳����Ϊ�ǻ�ı�д��д����ֵ�� +以上代码建立了一个结构体,该结构体可以存储设置并可用于写入EEPROM。如此这般将无需定义变量,因为在结构体中已然定义。要记住`bool` (布尔)值使用1位, `uint8_t`使用8位, `uint16_t`使用16位。你可以混合搭配使用,但是顺序记错可能会招致麻烦,因为那会改变写入写出的值。 - `layer_state_set_*`������ʹ����`rgb_layer_change`��ʹ����`keyboard_post_init_user`��`process_record_user`������һ�С� + `layer_state_set_*`函数中使用了`rgb_layer_change`,使用了`keyboard_post_init_user`和`process_record_user`来配置一切。 -����Ҫʹ��`keyboard_post_init_user����Ҫ����`eeconfig_read_user()`�������ոմ����Ľṹ�塣Ȼ������������ʹ������ṹ���������IJ����еĹ��ܡ����������� +首先要使用`keyboard_post_init_user,你要加入`eeconfig_read_user()`来填充你刚刚创建的结构体。然后您可以立即使用这个结构来控制您的布局中的功能。就像这样: ```c void keyboard_post_init_user(void) { - // ���ò��ּ���ľ����ʼ�� + // 调用布局级别的矩阵初始化 - // ��EEPROM���û����� + // 从EEPROM读用户配置 user_config.raw = eeconfig_read_user(); - // ��ʹ�ܣ�����Ĭ�ϲ� + // 如使能,设置默认层 if (user_config.rgb_layer_change) { rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom_cyan(); @@ -374,7 +374,7 @@ void keyboard_post_init_user(void) { } } ``` -���Ϻ������ڶ�EEPROM���ú�����ʹ�ø�����������Ĭ�ϲ�RGB��ɫ��"raw"��ֵ�Ǵ����������"union"�����Ľṹ����ת�����ġ� +以上函数会在读EEPROM配置后立即使用该设置来设置默认层RGB颜色。"raw"的值是从你上面基于"union"创建的结构体中转换来的。 ```c uint32_t layer_state_set_user(uint32_t state) { @@ -391,86 +391,86 @@ uint32_t layer_state_set_user(uint32_t state) { case _ADJUST: if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); } break; - default: // ����������Ĭ�ϲ� + default: // 针对其他层或默认层 if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); } break; } return state; } ``` -��������ֵʹ��ʱ��ı�RGB����ơ������������ֵ, Ϊ`process_record_user`����һ���¼������`RGB_LYR`������Ҫȷ�������ʹ��������RGB���룬ʹ�������ʾ������رգ��뽫������Ϊ�� +这样仅在值使能时会改变RGB背光灯。现在配置这个值, 为`process_record_user`创建一个新键码叫做`RGB_LYR`。我们要确保,如果使用正常的RGB代码,使用上面的示例将其关闭,请将其设置为: ```c bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case FOO: if (record->event.pressed) { - // ����ʱ����ʲô + // 按下时做点什么 } else { - // �ͷ�ʱ����ʲô + // 释放时做点什么 } - return false; // �����˼��Ľ�һ������ + return false; // 跳过此键的进一步处理 case KC_ENTER: - // �ڰ��»س�ʱ�������� + // 在按下回车时播放音符 if (record->event.pressed) { PLAY_NOTE_ARRAY(tone_qwerty); } - return true; // ��QMK�����س�����/�ͷ��¼� - case RGB_LYR: // ������underglow��Ϊ��ָʾ��������ʹ�á� + return true; // 让QMK产生回车按下/释放事件 + case RGB_LYR: // 本句让underglow作为层指示,或正常使用。 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); // ��ô���̸��²���ɫ + 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���� (see quantum_keycodes.h, L400 ���Բο�) - if (record->event.pressed) { //����ʧ�ܲ�ָʾ��������ı����������Ҫ�������� - if (user_config.rgb_layer_change) { // ����ʹ��ʱ - user_config.rgb_layer_change = false; // ʧ�ܣ�Ȼ�� - eeconfig_update_user(user_config.raw); // ��EEPROMд������ + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // 对于所有的RGB代码 (see quantum_keycodes.h, L400 可以参考) + 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; // ������������ + return true; // 按其他键正常 } } ``` -�����Ҫ����`eeconfig_init_user`���������Ե�EEPROM����ʱ������ָ��Ĭ��ֵ, �����Զ����������ǿ������EEPROM������`EEP_RST`�����[Bootmagic](feature_bootmagic.md)���������磬���Ҫ��Ĭ�����������RGB��ָʾ��������Ĭ��ֵ +最后你要加入`eeconfig_init_user`函数,所以当EEPROM重置时,可以指定默认值, 甚至自定义操作。想强制重置EEPROM,请用`EEP_RST`键码或[Bootmagic](feature_bootmagic.md)函数。比如,如果要在默认情况下设置RGB层指示,并保存默认值 ```c -void eeconfig_init_user(void) { // EEPROM�������� +void eeconfig_init_user(void) { // EEPROM正被重置 user_config.raw = 0; - user_config.rgb_layer_change = true; // ������ҪĬ��ʹ�� - eeconfig_update_user(user_config.raw); // ��EEPROMд��Ĭ��ֵ + user_config.rgb_layer_change = true; // 我们想要默认使能 + eeconfig_update_user(user_config.raw); // 向EEPROM写入默认值 - // use the non noeeprom versions, ��Ҫ��EEPROMд����Щֵ - rgblight_enable(); // Ĭ��ʹ��RGB - rgblight_sethsv_cyan(); // Ĭ��������ɫ - rgblight_mode(1); // Ĭ�����ó��� + // use the non noeeprom versions, 还要向EEPROM写入这些值 + rgblight_enable(); // 默认使能RGB + rgblight_sethsv_cyan(); // 默认设置青色 + rgblight_mode(1); // 默认设置长亮 } ``` -Ȼ��������ˡ�RGB��ָʾ����������������ʱ������������û�һֱ���棬��������¼��̡������ʹ������RGB���룬��ָʾ��ʧ�ܣ��������������������ˡ� +然后就完事了。RGB层指示会在你想让它工作时工作。这个设置会一直保存,即便你拔下键盘。如果你使用其他RGB代码,层指示将失能,现在它可以做你所想了。 -### 'EECONFIG' �����ĵ� +### '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)` +* 键盘/修订: `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λ(˫��)��ֵ�� +`val` 是你想写入EEPROM的值,`eeconfig_read_*`函数会从EEPROM返回一个32位(双字)的值。 -# �Զ������-�����ٽ�ֵ(TAPPING_TERM) -Ĭ�������,����-�����ٽ�ֵ��ȫ��ͳһ�ģ����Ҳ���ͨ�����������á����ڴ�����û���˵��ܺá���������Щ����£�����`LT`����˵������ʱ��˫���ܼ����������󣬿�������Ϊ��Щ���������ļ������װ�ס��Ϊ�˲���ÿ�����Զ�����룬�����ܿ���Ϊÿ��������`TAPPING_TERM`�� +# 自定义击键-长按临界值(TAPPING_TERM) +默认情况下,击键-长按临界值是全球统一的,并且不能通过键进行配置。对于大多数用户来说这很好。但是在有些情况下,对于`LT`键来说按键延时对双功能键的提升更大,可能是因为有些键比其他的键更容易按住。为了不给每个都自定义键码,本功能可以为每个键定义`TAPPING_TERM`。 -��ʹ��������ܵĻ�, Ҫ����`config.h`����`#define TAPPING_TERM_PER_KEY`�� +想使能这个功能的话, 要先在`config.h`加上`#define TAPPING_TERM_PER_KEY`。 -## `get_tapping_term`ʾ��ʵ�� +## `get_tapping_term`示例实现 -��Ҫ�޸Ļ��ڼ����`TAPPING TERM`,��Ҫ��`keymap.c`�ļ��������´���: +想要修改基于键码的`TAPPING TERM`,你要向`keymap.c`文件添加如下代码: ```c uint16_t get_tapping_term(uint16_t keycode) { @@ -485,6 +485,6 @@ uint16_t get_tapping_term(uint16_t keycode) { } ``` -### `get_tapping_term` �����ĵ� +### `get_tapping_term` 函数文档 -������ƪ����������,�������Ҫquantum���߼��̼���ĺ�����ֻҪ�û����������ɡ� +不像这篇的其他功能,这个不需要quantum或者键盘级别的函数,只要用户级函数即可。 From 80e73b6210dbcd3bf48c72006df935661435c43d Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 28 Dec 2019 05:09:32 +0900 Subject: [PATCH 100/973] [Docs] Update Japanese translation (#7693) * [Docs] Update translation * Update docs/ja/contributing.md * Update docs/ja/contributing.md Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> --- docs/ja/contributing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ja/contributing.md b/docs/ja/contributing.md index d1b28b1f5892..8d3c822b4fe9 100644 --- a/docs/ja/contributing.md +++ b/docs/ja/contributing.md @@ -1,8 +1,8 @@ # 貢献方法 👍🎉 まず、これを読み貢献する時間を作ってくれてありがとうございます!🎉👍 @@ -90,7 +90,7 @@ kerpleplork はエラーコード 23 で連続的に失敗していました。 ドキュメントは QMK への貢献を始める最も簡単な方法の1つです。ドキュメントが間違っているか不完全な場所を見つけ、これらを修正するのは簡単です!私たちもドキュメントを編集する人を非常に必要としています。編集するスキルがあるが、どこにどのように飛び乗ればいいのか分からない場合は、[助けをもとめて](#where-can-i-go-for-help)ください! -全てのドキュメントは `qmk_firmware/docs` ディレクトリの中にあります。あるいは web ベースのワークフローを使いたい場合は、http://docs.qmk.fm/ の各ページの上部にある "Suggest An Edit" をクリックすることができます。 +全てのドキュメントは `qmk_firmware/docs` ディレクトリの中にあります。あるいは web ベースのワークフローを使いたい場合は、https://docs.qmk.fm/ の各ページの下部にある "Edit this page" リンクをクリックすることができます。 ドキュメントの中にコードの例を提供する場合は、ドキュメント内の他の場所で使用されている命名規則を順守してください。例えば、一貫性を保つために、`my_layers` あるいは `my_keycodes` として列挙型を標準化します: From 26a823082b17ee30aa8a0c5e39a32d854449ce15 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 28 Dec 2019 07:31:23 +0900 Subject: [PATCH 101/973] [Docs] Fix minor differences in docs/newbs_git_resynchronize_a_branch.md (#7728) --- docs/newbs_git_resynchronize_a_branch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/newbs_git_resynchronize_a_branch.md b/docs/newbs_git_resynchronize_a_branch.md index 2e6b26e094ab..3e7acdba7adc 100644 --- a/docs/newbs_git_resynchronize_a_branch.md +++ b/docs/newbs_git_resynchronize_a_branch.md @@ -1,6 +1,6 @@ # Resynchronizing an Out-of-Sync Git Branch -Suppose you have committed to your `master` branch, and now need to update your QMK repository. You could `git pull` QMK's `master` branch into your own, but GitHub will tell you that your commit is a number of commits ahead of `qmk:master`, which can create issues if you want to make a pull request to QMK. +Suppose you have committed to your `master` branch, and now need to update your QMK repository. You could `git pull` QMK's `master` branch into your own, but GitHub will tell you that your branch is a number of commits ahead of `qmk:master`, which can create issues if you want to make a pull request to QMK. ?> This document builds upon the concepts detailed in [Your Fork's Master: Update Often, Commit Never](newbs_git_using_your_master_branch.md). If you are not familiar with that document, please read it first, then return here. From c329a0ec8ef894aadec3eb11ee44b136955cb1ca Mon Sep 17 00:00:00 2001 From: yiancar Date: Sat, 28 Dec 2019 08:06:42 +0000 Subject: [PATCH 102/973] [Keyboard] Doppelganger (#7682) * Initial commit * Update info.json * Update doppelganger.c * Update keyboards/doppelganger/readme.md * Update keyboards/doppelganger/readme.md * Update keyboards/doppelganger/readme.md * Update keyboards/doppelganger/rules.mk * Update keyboards/doppelganger/rules.mk * Update keyboards/doppelganger/rules.mk * Update keyboards/doppelganger/rules.mk * More fixes my g:) * Update keyboards/doppelganger/rules.mk * Update keyboards/doppelganger/rules.mk * More prettying * Update rules.mk * Minor spacing * Init pins * Update rules.mk * Update keyboards/doppelganger/info.json --- keyboards/doppelganger/config.h | 229 ++++++++++++++++++ keyboards/doppelganger/doppelganger.c | 39 +++ keyboards/doppelganger/doppelganger.h | 46 ++++ keyboards/doppelganger/info.json | 12 + .../doppelganger/keymaps/default/keymap.c | 33 +++ .../doppelganger/keymaps/default/readme.md | 1 + keyboards/doppelganger/readme.md | 15 ++ keyboards/doppelganger/rules.mk | 34 +++ 8 files changed, 409 insertions(+) create mode 100644 keyboards/doppelganger/config.h create mode 100644 keyboards/doppelganger/doppelganger.c create mode 100644 keyboards/doppelganger/doppelganger.h create mode 100644 keyboards/doppelganger/info.json create mode 100644 keyboards/doppelganger/keymaps/default/keymap.c create mode 100644 keyboards/doppelganger/keymaps/default/readme.md create mode 100644 keyboards/doppelganger/readme.md create mode 100644 keyboards/doppelganger/rules.mk diff --git a/keyboards/doppelganger/config.h b/keyboards/doppelganger/config.h new file mode 100644 index 000000000000..c19fa5179036 --- /dev/null +++ b/keyboards/doppelganger/config.h @@ -0,0 +1,229 @@ +/* +Copyright 2019 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 0x4447 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT Doppelganger +#define DESCRIPTION A custom split keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 9 + +/* + * 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 SPLIT_HAND_PIN D4 + +#define MATRIX_ROW_PINS { E6, F1, C7, F7, F6 } +#define MATRIX_COL_PINS { F4, F0, B7, B3, B2, B1, D5, D3, D2 } +#define UNUSED_PINS + +#define MATRIX_ROW_PINS_RIGHT { D7, D6, D4, E6, B5 } +#define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, F7, C7, C6, B6 } + +/* 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 USE_I2C +#define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B4 +// #ifdef RGB_DI_PIN +#define RGBLED_NUM 2 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 1, 1 } +// #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 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 2 diff --git a/keyboards/doppelganger/doppelganger.c b/keyboards/doppelganger/doppelganger.c new file mode 100644 index 000000000000..04d19480daab --- /dev/null +++ b/keyboards/doppelganger/doppelganger.c @@ -0,0 +1,39 @@ +/* Copyright 2019 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 "doppelganger.h" + +void keyboard_pre_init_kb (void) { + setPinOutput(C6); + setPinOutput(B0); +} + +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(C6, !led_state.caps_lock); + } + return res; +} + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + writePin(B0, !(state & (1UL << 1))); + return state; +} diff --git a/keyboards/doppelganger/doppelganger.h b/keyboards/doppelganger/doppelganger.h new file mode 100644 index 000000000000..c065c28c46fd --- /dev/null +++ b/keyboards/doppelganger/doppelganger.h @@ -0,0 +1,46 @@ +/* Copyright 2019 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 "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( \ + L01, L02, L03, L04, L05, L06, L07, L08, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, R18, \ + L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, R28, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, R31, R32, R33, R34, R35, R36, R37, R38, \ + L40, L41, L42, L43, L44, L45, L46, R42, R43, R44, R45, R46, R47, R48 \ +) \ +{ \ + { KC_NO, L01, L02, L03, L04, L05, L06, L07, L08 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38 }, \ + { L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07, KC_NO }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \ + { R20, R21, R22, R23, R24, R25, R26, R27, R28 }, \ + { KC_NO, R31, R32, R33, R34, R35, R36, R37, R38 }, \ + { KC_NO, KC_NO, R42, R43, R44, R45, R46, R47, R48 }, \ +} diff --git a/keyboards/doppelganger/info.json b/keyboards/doppelganger/info.json new file mode 100644 index 000000000000..4de98961a48a --- /dev/null +++ b/keyboards/doppelganger/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Doppelganger", + "url": "", + "maintainer": "yiancar", + "width": 20, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"F1", "x":1, "y":0}, {"label":"Esc", "x":2.5, "y":0}, {"label":"1", "x":3.5, "y":0}, {"label":"2", "x":4.5, "y":0}, {"label":"3", "x":5.5, "y":0}, {"label":"4", "x":6.5, "y":0}, {"label":"5", "x":7.5, "y":0}, {"label":"6", "x":8.5, "y":0}, {"label":"7", "x":10.5, "y":0}, {"label":"8", "x":11.5, "y":0}, {"label":"9", "x":12.5, "y":0}, {"label":"0", "x":13.5, "y":0}, {"label":"_", "x":14.5, "y":0}, {"label":"+", "x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":17.5, "y":0}, {"label":"F2", "x":0, "y":1}, {"label":"F3", "x":1, "y":1}, {"label":"Tab", "x":2.5, "y":1, "w":1.5}, {"label":"Q", "x":4, "y":1}, {"label":"W", "x":5, "y":1}, {"label":"E", "x":6, "y":1}, {"label":"R", "x":7, "y":1}, {"label":"T", "x":8, "y":1}, {"label":"Y", "x":10, "y":1}, {"label":"U", "x":11, "y":1}, {"label":"I", "x":12, "y":1}, {"label":"O", "x":13, "y":1}, {"label":"P", "x":14, "y":1}, {"label":"{", "x":15, "y":1}, {"label":"}", "x":16, "y":1}, {"label":"|", "x":17, "y":1, "w":1.5}, {"label":"Pg Up", "x":19, "y":1}, {"label":"F4", "x":0, "y":2}, {"label":"F5", "x":1, "y":2}, {"label":"Caps Lock", "x":2.5, "y":2, "w":1.75}, {"label":"A", "x":4.25, "y":2}, {"label":"S", "x":5.25, "y":2}, {"label":"D", "x":6.25, "y":2}, {"label":"F", "x":7.25, "y":2}, {"label":"G", "x":8.25, "y":2}, {"label":"H", "x":10.25, "y":2}, {"label":"J", "x":11.25, "y":2}, {"label":"K", "x":12.25, "y":2}, {"label":"L", "x":13.25, "y":2}, {"label":":", "x":14.25, "y":2}, {"label":"\"", "x":15.25, "y":2}, {"label":"~", "x":16.25, "y":2}, {"label":"Enter", "x":17.25, "y":2, "w":1.25}, {"label":"Pg Dn", "x":19, "y":2}, {"label":"F6", "x":0, "y":3}, {"label":"F7", "x":1, "y":3}, {"label":"Shift", "x":2.5, "y":3, "w":1.25}, {"label":"|", "x":3.75, "y":3}, {"label":"Z", "x":4.75, "y":3}, {"label":"X", "x":5.75, "y":3}, {"label":"C", "x":6.75, "y":3}, {"label":"V", "x":7.75, "y":3}, {"label":"B", "x":8.75, "y":3}, {"label":"N", "x":10.75, "y":3}, {"label":"M", "x":11.75, "y":3}, {"label":"<", "x":12.75, "y":3}, {"label":">", "x":13.75, "y":3}, {"label":"?", "x":14.75, "y":3}, {"label":"Shift", "x":15.75, "y":3, "w":1.75}, {"label":"Up", "x":17.75, "y":3.25}, {"label":"Fn", "x":19, "y":3}, {"label":"F8", "x":0, "y":4}, {"label":"F9", "x":1, "y":4}, {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, {"label":"Win", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.25}, {"x":8.25, "y":4}, {"x":10.25, "y":4, "w":2.75}, {"label":"Alt", "x":13, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"label":"Win", "x":15.25, "y":4, "w":1.25}, {"label":"Left", "x":16.75, "y":4.25}, {"label":"Down", "x":17.75, "y":4.25}, {"label":"Right", "x":18.75, "y":4.25}] + } + } +} diff --git a/keyboards/doppelganger/keymaps/default/keymap.c b/keyboards/doppelganger/keymaps/default/keymap.c new file mode 100644 index 000000000000..dedbd2394020 --- /dev/null +++ b/keyboards/doppelganger/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 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( /* Base */ + KC_F1, 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_F2, KC_F3, 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_F4, KC_F5, 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_F6, KC_F7, 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_F8, KC_F9, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( /* FN1 */ + RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, 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_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, 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_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, 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, 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 + ), +}; diff --git a/keyboards/doppelganger/keymaps/default/readme.md b/keyboards/doppelganger/keymaps/default/readme.md new file mode 100644 index 000000000000..9e9824f4d4a4 --- /dev/null +++ b/keyboards/doppelganger/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for doppelganger diff --git a/keyboards/doppelganger/readme.md b/keyboards/doppelganger/readme.md new file mode 100644 index 000000000000..52a12942c2fd --- /dev/null +++ b/keyboards/doppelganger/readme.md @@ -0,0 +1,15 @@ +# Doppelganger + +![doppelganger](https://i.imgur.com/5eALJBf.png) + +A Split keyboard co-designed with Cable Car designs + +* Keyboard Maintainer: [Yiancar-Designs](https://github.com/yiancar) +* Hardware Supported: The specific set of pcbs which use 2 ATMEGA-32u4 +* Hardware Availability: Contact Noahf#2971 on discord! + +Make example for this keyboard (after setting up your build environment): + + make doppelganger: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/doppelganger/rules.mk b/keyboards/doppelganger/rules.mk new file mode 100644 index 000000000000..9e1bd63ab0b6 --- /dev/null +++ b/keyboards/doppelganger/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 = 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 = 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 +SPLIT_KEYBOARD = yes From 250a99ff1b7e7b143e6b008001f97793b331a9a6 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 28 Dec 2019 19:18:52 +0000 Subject: [PATCH 103/973] Add rules.mk defaults for f103,f072,f042 (#7704) * Add rules.mk defaults for f103,f072,f042 * Add rules.mk defaults for f103,f072,f042 - remove comment * Add rules.mk defaults for f103,f072,f042 - align USE_FPU * Reset MCU to avoid build issues * Move essential config values to top and remove ability for override * Align DFU_SUFFIX_ARGS order with DFU_ARGS --- quantum/mcu_selection.mk | 114 +++++++++++++++++++++++++++++++++++---- 1 file changed, 104 insertions(+), 10 deletions(-) diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 24b2b2abd911..bddafa6a4c47 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -1,9 +1,15 @@ ifneq ($(findstring STM32F303, $(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 ?= STM32 - MCU_SERIES ?= STM32F3xx + MCU_FAMILY = STM32 + MCU_SERIES = STM32F3xx # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ @@ -18,22 +24,110 @@ ifneq ($(findstring STM32F303, $(MCU)),) # /boards/, or drivers/boards/ BOARD ?= GENERIC_STM32_F303XC + USE_FPU ?= yes + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p df11 +endif + +ifneq ($(findstring STM32F072, $(MCU)),) # Cortex version - MCU = cortex-m4 + MCU = cortex-m0 + + # 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 = STM32 + MCU_SERIES = STM32F0xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F072xB + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f0xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= ST_STM32F072B_DISCOVERY + + USE_FPU ?= no + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p df11 +endif + +ifneq ($(findstring STM32F042, $(MCU)),) + # Cortex version + MCU = cortex-m0 + + # 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 = STM32 + MCU_SERIES = STM32F0xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F042x6 + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f0xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F042X6 + + USE_FPU ?= no + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p df11 +endif + +ifneq ($(findstring STM32F103, $(MCU)),) + # Cortex version + MCU = cortex-m3 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV ?= 7 + ARMV = 7 - USE_FPU = yes + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F1xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F103x8 + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f1xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F103 - # 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=0x08005000 + USE_FPU ?= no # Options to pass to dfu-util when flashing DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS = -p DF11 -v 0483 + DFU_SUFFIX_ARGS ?= -v 0483 -p df11 endif ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286)) From 36d913e1b135a2885678c7ee239572121bebca55 Mon Sep 17 00:00:00 2001 From: codecoffeecode Date: Sat, 28 Dec 2019 18:15:32 -0800 Subject: [PATCH 104/973] [Keymap] Adding keymap for KBDFans Kbd67 MKII RGB (#7712) * Adding keymap for Kbd67 MKIIRGB * "addressing comments by fauxpark" --- .../mkiirgb/keymaps/codecoffeecode/keymap.c | 41 +++++++++++++++++++ .../mkiirgb/keymaps/codecoffeecode/rules.mk | 2 + 2 files changed, 43 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/codecoffeecode/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/codecoffeecode/rules.mk diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/codecoffeecode/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/codecoffeecode/keymap.c new file mode 100644 index 000000000000..4ad4663ca80e --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base layer + * ,--------------------------------------------------------------------------------------------------. + * |Esc ~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | Home | + * |-------------------------------------------------------------------------------------------+------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | End | + * |-------------------------------------------------------------------------------------------+------+ + * | CtrlCaps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp | + * |-------------------------------------------------------------------------------------------+------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | MO(2) | Up | PgDn | + * +-------------------------------------------------------------------------┬---┬-------------+------+ + * | LCtrl | LGUI | LAlt | Space | Btn2 | MO(1)| | Left |Down | Right| + * `-------------------------------------------------------------------------┘ └-------------+------´ + */ + [0] = LAYOUT_65_ansi_blocker( /* 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_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_END, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(2), KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BTN2, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [1] = LAYOUT_65_ansi_blocker( /* MO(1) - Fn */ + 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, + _______, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP, + CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, _______,_______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, KC_PGDN, + KC_LSFT, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [2] = LAYOUT_65_ansi_blocker( /* MO(2) - RShift */ + KC_GESC, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + LCTL(KC_L), _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/codecoffeecode/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/codecoffeecode/rules.mk new file mode 100644 index 000000000000..a4a9db461bcb --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/codecoffeecode/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes \ No newline at end of file From 25aaeb4f401fedee00e90e9fe27bdea5fed778d6 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 29 Dec 2019 16:38:33 +0900 Subject: [PATCH 105/973] Japanese translation of docs/newbs_git_*.md (#7689) * update docs/ja/newbs.md * update docs/ja/_summary.md * Translate docs/newbs_git_best_practices.md into Japanese. * Translate docs/newbs_git_using_your_master_branch.md into Japanese. * Translate docs/newbs_git_resolving_merge_conflicts.md into Japanese. * Translate docs/newbs_git_resynchronize_a_branch.md into Japanese. * Update docs/ja/newbs_git_using_your_master_branch.md * Update docs/ja/newbs_git_resynchronize_a_branch.md * Update docs/ja/newbs_git_resynchronize_a_branch.md * Update docs/ja/newbs_git_resynchronize_a_branch.md * Update docs/ja/newbs_git_resynchronize_a_branch.md * Update docs/ja/newbs_git_resynchronize_a_branch.md * update ja/newbs_git_resynchronize_a_branch.md * update ja/newbs_git_resynchronize_a_branch.md * Update docs/ja/newbs_git_best_practices.md * Update docs/ja/_summary.md * Update docs/ja/newbs_git_resynchronize_a_branch.md * update ja/newbs_git_resynchronize_a_branch.md * update ja/newbs_learn_more_resources.md * Update docs/ja/newbs_git_resynchronize_a_branch.md * Update docs/ja/newbs_git_resynchronize_a_branch.md Co-Authored-By: shela --- docs/ja/_summary.md | 5 +- docs/ja/newbs.md | 6 +- docs/ja/newbs_git_best_practices.md | 24 +++++ .../ja/newbs_git_resolving_merge_conflicts.md | 94 ++++++++++++++++ docs/ja/newbs_git_resynchronize_a_branch.md | 88 +++++++++++++++ docs/ja/newbs_git_using_your_master_branch.md | 101 ++++++++++++++++++ docs/ja/newbs_learn_more_resources.md | 8 +- 7 files changed, 320 insertions(+), 6 deletions(-) create mode 100644 docs/ja/newbs_git_best_practices.md create mode 100644 docs/ja/newbs_git_resolving_merge_conflicts.md create mode 100644 docs/ja/newbs_git_resynchronize_a_branch.md create mode 100644 docs/ja/newbs_git_using_your_master_branch.md diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index 22db3a7fe169..e5e19ddc80e7 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -3,7 +3,10 @@ * [初めてのファームウェアの構築](ja/newbs_building_firmware.md) * [ファームウェアのフラッシュ](ja/newbs_flashing.md) * [テストとデバッグ](ja/newbs_testing_debugging.md) - * [Gitのベストプラクティス](ja/newbs_best_practices.md) + * [QMK における Git 運用作法](ja/newbs_git_best_practices.md) + * [あなたのフォークの master ブランチ](ja/newbs_git_using_your_master_branch.md) + * [マージの競合の解決](ja/newbs_git_resolving_merge_conflicts.md) + * [同期のとれていない git ブランチの再同期](ja/newbs_git_resynchronize_a_branch.md) * [学習リソース](ja/newbs_learn_more_resources.md) * [QMKの基本](ja/README.md) diff --git a/docs/ja/newbs.md b/docs/ja/newbs.md index 54189cce482a..84e973275267 100644 --- a/docs/ja/newbs.md +++ b/docs/ja/newbs.md @@ -2,8 +2,8 @@ QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。 @@ -24,7 +24,7 @@ QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポー * [オンライン GUI を使用して初めてのファームウェアを構築する](ja/newbs_building_firmware_configurator.md) * [ファームウェアを書きこむ](ja/newbs_flashing.md) * [テストとデバッグ](ja/newbs_testing_debugging.md) -* [QMK における Git 運用作法](ja/newbs_best_practices.md) +* [QMK における Git 運用作法](ja/newbs_git_best_practices.md) * [さらに学ぶための学習リソース](ja/newbs_learn_more_resources.md) このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。 diff --git a/docs/ja/newbs_git_best_practices.md b/docs/ja/newbs_git_best_practices.md new file mode 100644 index 000000000000..1b0bda1e4ea0 --- /dev/null +++ b/docs/ja/newbs_git_best_practices.md @@ -0,0 +1,24 @@ +# QMK における Git 運用作法 :id=best-git-practices-for-working-with-qmk + + + +## または、"如何にして私は心配することをやめて Git を愛することを学んだか。" + +このセクションは、QMK への貢献をスムーズに行なう最もよい方法を初心者に教えることを目的としています。 +QMK に貢献するプロセスを順を追って説明し、この作業を簡単にするいくつかの方法を詳しく説明します。 +その後、意図的に一部を壊してみせて、それらを修正する方法を説明します。 + +このセクションは以下のことを前提としています: + +1. あなたは GitHub アカウントがあり、アカウントに [qmk_firmware リポジトリをフォーク](ja/getting_started_github.md) している。 +2. あなたは、[環境構築](ja/newbs_getting_started.md#set-up-your-environment) と [QMK の設定](ja/newbs_getting_started.md#set-up-qmk) を両方とも完了している。 + +--- + +- パート 1: [あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと](ja/newbs_git_using_your_master_branch.md) +- パート 2: [マージの競合の解決](ja/newbs_git_resolving_merge_conflicts.md) +- パート 3: [同期のとれていない git ブランチの再同期](ja/newbs_git_resynchronize_a_branch.md) diff --git a/docs/ja/newbs_git_resolving_merge_conflicts.md b/docs/ja/newbs_git_resolving_merge_conflicts.md new file mode 100644 index 000000000000..f1096e52ed92 --- /dev/null +++ b/docs/ja/newbs_git_resolving_merge_conflicts.md @@ -0,0 +1,94 @@ +# マージの競合の解決 + + + +ブランチでの作業の完了に時間がかかる場合、他の人が行った変更が、プルリクエストを開いたときにブランチに加えた変更と競合することがあります。 +これは *マージの競合* と呼ばれ、複数の人が同じファイルの同じ部分を編集すると発生します。 + +?> このドキュメントは [あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと](ja/newbs_git_using_your_master_branch.md) で詳述されている概念に基づいています。 +その概念に慣れていない場合は、まずそれを読んでから、ここに戻ってください。 + +## 変更のリベース + +*リベース* は、コミット履歴のある時点で適用された変更を取得し、それらを元に戻し、次に同じ変更を別のポイントに適用する Git の方法です。 +マージの競合が発生した場合、ブランチをリベースして、ブランチを作成してから現在までに行われた変更を取得できます。 + +開始するには、次を実行します: + +``` +git fetch upstream +git rev-list --left-right --count HEAD...upstream/master +``` + +ここに入力された `git rev-list` コマンドは、現在のブランチと QMK の master ブランチで異なるコミットの数を返します。 +最初に `git fetch` を実行して、upstream リポジトリの現在の状態を表す refs があることを確認します。 +入力された `git rev-list` コマンドの出力は2つの数値を返します: + +``` +$ git rev-list --left-right --count HEAD...upstream/master +7 35 +``` + +最初の数字は、現在のブランチが作成されてからのコミット数を表し、2番目の数字は、現在のブランチが作成されてから `upstream/master` に対して行われたコミットの数であり、したがって、現在のブランチに記録されていない変更です。 + +現在のブランチと upstream リポジトリの両方の現在の状態がわかったので、リベース操作を開始できます: + +``` +git rebase upstream/master +``` + +これにより、Git は現在のブランチのコミットを取り消してから、QMK の master ブランチに対してコミットを再適用します。 + +``` +$ git rebase upstream/master +First, rewinding head to replay your work on top of it... +Applying: Commit #1 +Using index info to reconstruct a base tree... +M conflicting_file_1.txt +Falling back to patching base and 3-way merge... +Auto-merging conflicting_file_1.txt +CONFLICT (content): Merge conflict in conflicting_file_1.txt +error: Failed to merge in the changes. +hint: Use 'git am --show-current-patch' to see the failed patch +Patch failed at 0001 Commit #1 + +Resolve all conflicts manually, mark them as resolved with +"git add/rm ", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort". +``` + +これにより、マージの競合があることがわかり、競合のあるファイルの名前が示されます。 +テキストエディタで競合するファイルを開くと、ファイルのどこかに次のような行があります: + +``` +<<<<<<< HEAD +

For help with any issues, email us at support@webhost.us.

+======= +

Need help? Email support@webhost.us.

+>>>>>>> Commit #1 +``` + +行 `<<<<<<< HEAD` はマージ競合の始まりを示し、行 `>>>>>>> commit #1` は終了を示し、競合するセクションは `=======` で区切られます。 +`HEAD` 側の部分はファイルの QMK master バージョンからのものであり、コミットメッセージでマークされた部分は現在のブランチとコミットからのものです。 + +Git はファイルの内容ではなく *ファイルへの変更* を直接追跡するため、Git がコミットの前にファイル内にあったテキストを見つけられない場合、ファイルの編集方法がわかりません。 +ファイルを再編集して、競合を解決します。 +変更を加えてから、ファイルを保存します。 + +``` +

Need help? Email support@webhost.us.

+``` + +そしてコマンド実行: + +``` +git add conflicting_file_1.txt +git rebase --continue +``` + +Git は、競合するファイルへの変更をログに記録し、ブランチのコミットが最後に達するまで適用し続けます。 diff --git a/docs/ja/newbs_git_resynchronize_a_branch.md b/docs/ja/newbs_git_resynchronize_a_branch.md new file mode 100644 index 000000000000..747fe1e6101b --- /dev/null +++ b/docs/ja/newbs_git_resynchronize_a_branch.md @@ -0,0 +1,88 @@ +# 同期のとれていない git ブランチの再同期 + + + +仮にあなたの `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) で詳述されている概念に基づいています。その概念に慣れていない場合は、まずそれを読んでから、ここに戻ってください。 +(訳注:この文書で言う、「同期のとれていない git ブランチ」とは、master ブランチに関する、この「コミットしない」方針を逸脱して、QMK の master リポジトリに存在しないコミットがあなたのフォークの master ブランチに入っている状態を指します。) + +## あなた自身の `master` ブランチでの変更のバックアップ(オプション) + +救えるものなら自分の行った変更を失いたくはないでしょう。 +あなたの `master` ブランチに既に加えた変更を保存したい場合、最も簡単な方法は、単に「ダーティな」`master` ブランチの複製を作成することです: + +```sh +git branch old_master master +``` + +これで、 `master` ブランチの複製である `old_master` という名前のブランチができました。 + +## あなたのブランチの再同期 + +さあ、`master` ブランチを再同期します。 +この手順では、QMK のリポジトリを git のリモートリポジトリとして設定する必要があります。 +設定済みのリモートリポジトリを確認するには、`git remote -v` を実行し、次のような結果が返されなければなりません。 + +```sh +QMKuser ~/qmk_firmware (master) +$ git remote -v +origin https://github.com//qmk_firmware.git (fetch) +origin https://github.com//qmk_firmware.git (push) +upstream https://github.com/qmk/qmk_firmware.git (fetch) +upstream https://github.com/qmk/qmk_firmware.git (push) +``` + +もし、上記のようにならずに以下のように参照されるフォークが、1つだけ表示される場合: + +```sh +QMKuser ~/qmk_firmware (master) +$ git remote -v +origin https://github.com/qmk/qmk_firmware.git (fetch) +origin https://github.com/qmk/qmk_firmware.git (push) +``` + +新しいリモートリポジトリを追加します: + +```sh +git remote add upstream https://github.com/qmk/qmk_firmware.git +``` + +次に、`origin` リモートリポジトリを、あなた自身のフォークにリダイレクトします: + +```sh +git remote set-url origin https://github.com/<あなたのユーザ名>/qmk_firmware.git +``` + +両方のリモートリポジトリが設定されたので、次を実行して、QMK である `upstream` リポジトリの参照を更新する必要があります。 + +```sh +git fetch upstream +``` + +この時点で、次を実行してあなたの(訳注:master)ブランチを QMK のブランチに再同期します。 +(訳注: 今現在 `master` ブランチがチェックアウトされていなければなりません。 + そうなってなければ、`git checkout master` を先に実行しておく必要があります。) + +```sh +git reset --hard upstream/master +``` + +これらの手順により、あなたのコンピュータ上のリポジトリが更新されますが、あなたの GitHub 上のフォークはまだ同期されていません。 +GitHub 上のフォークを再同期するには、あなたのフォークにプッシュして、ローカルリポジトリに反映されていないリモート変更をオーバーライドするように Git に指示する必要があります。 +これを行うには、次を実行します: + +```sh +git push --force-with-lease +``` + +!> 他のユーザーがコミットを投稿するフォークで `git push --force-with-lease` を**実行しないでください**。これをすると、かれらのコミットが消去されてしまいます。 + +これで、あなたの GitHub フォーク、あなたのローカルファイル、および QMK のリポジトリはすべて同じになりました。 +ここから、[ブランチを使って](ja/newbs_git_using_your_master_branch.md#making-changes)さらに必要な変更を加え、通常どおりそれらを投稿できます。 diff --git a/docs/ja/newbs_git_using_your_master_branch.md b/docs/ja/newbs_git_using_your_master_branch.md new file mode 100644 index 000000000000..41013560d34c --- /dev/null +++ b/docs/ja/newbs_git_using_your_master_branch.md @@ -0,0 +1,101 @@ +# あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと + + + +QMK の開発では、何がどこで行われているかにかかわらず、`master` ブランチを最新の状態に保つことを強くお勧めします、しかし `master` ブランチには***絶対に直接コミットしないでください***。 +代わりに、あなたのすべての変更は開発ブランチで行い、あなたが開発する時にはそのブランチからプルリクエストを発行します。 + +マージの競合 — これは 2人以上のユーザーがファイルの同じ部分をそれぞれ異なる編集をして統合できなくなった状態 — の可能性を減らすため `master` ブランチをなるべく最新の状態に保ち、新しいブランチを作成して新しい開発を開始します。 + +## あなたの master ブランチを更新する + +`master` ブランチを最新の状態に保つには、git のリモートリポジトリとして QMK ファームウェアのリポジトリ(以降、QMK リポジトリ)を追加することをお勧めします。 +これを行うには、Git コマンドラインインターフェイスを開き、次のように入力します。 + +``` +git remote add upstream https://github.com/qmk/qmk_firmware.git +``` + +?> `upstream`(訳注: `upstream` は`上流`という意味です)という名前は任意ですが、一般的な慣習です。 +QMK のリモートリポジトリには、あなたにとって分かりやすい名前を付けることができます。 +Git の `remote` コマンドは、構文 `git remote add ` を使用します。 +`` はリモートリポジトリの省略形としてあなたが指定するものです。 +この名前は、`fetch`、`pull`、`push` やそれ以外の多くの Git コマンドで、対象のリモートリポジトリを指定するために使用されます。 + +リポジトリが追加されたことを確認するには、`git remote -v` を実行します。 +次のように表示されます。 + +``` +$ git remote -v +origin https://github.com//qmk_firmware.git (fetch) +origin https://github.com//qmk_firmware.git (push) +upstream https://github.com/qmk/qmk_firmware.git (fetch) +upstream https://github.com/qmk/qmk_firmware.git (push) +``` + +これが完了すると、`git fetch upstream` を実行してリポジトリの更新を確認できます。 +このコマンドは `upstream` というニックネームを持つ QMK リポジトリから、ブランチとタグ — "refs" と総称されます — を取得します。 +これで、あなたのフォーク `origin` のデータを QMK が保持するデータと比較できます。 + +あなたのフォークの `master` を更新するには、次を実行します、各行の後にEnterキーを押してください: + +``` +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` + +これにより、あなたの `master` ブランチに切り替わり、QMK リポジトリから 'refs' を取得し、現在の QMK の `master` ブランチをコンピュータにダウンロードしてから、あなたのフォークにアップロードします。 + +## 変更を行なう :id=making-changes + +変更するには、以下を入力して新しいブランチを作成します: + +``` +git checkout -b dev_branch +git push --set-upstream origin dev_branch +``` + +これにより、`dev_branch` という名前の新しいブランチが作成され、チェックアウトされ、新しいブランチがあなたのフォークに保存されます。 +`--set-upstream` 引数は、このブランチから `git push` または `git pull` を使用するたびに、あなたのフォークと `dev_branch` ブランチを使用するように git に指示します。 +この引数は最初のプッシュでのみ使用する必要があります。 +その後、残りの引数なしで `git push` または `git pull` を安全に使用できます。 + +?> `git push` では、`-set-upstream` の代わりに `-u` を使用できます、 `-u` は `--set-upstream` のエイリアスです。 + +ブランチにはほぼ任意の名前を付けることができますが、あなたが行なう変更を表す名前を付けることをお勧めします。 + +デフォルトでは、`git checkout -b`は、今チェックアウトされているブランチに基づいて新しいブランチを作成します。 +コマンド末尾に既存のブランチの名前を追加指定することにより、チェックアウトされていない既存のブランチを基にして新しいブランチを作成できます: + +``` +git checkout -b dev_branch master +``` + +これで開発ブランチができたのでテキストエディタを開き必要な変更を加えます。 +ブランチに対して多くの小さなコミットを行うことをお勧めします。 +そうすることで、問題を引き起こす変更をより簡単に特定し必要に応じて元に戻すことができます。 +変更を加えるには、更新が必要なファイルを編集して保存し、Git の *ステージングエリア* に追加してから、ブランチにコミットします: + +``` +git add path/to/updated_file +git commit -m "My commit message." +``` + +`git add`は、変更されたファイルを Git の *ステージングエリア* に追加します。 +これは、Git の「ロードゾーン」です。 +これには、`git commit` によって *コミット* される変更が含まれており、リポジトリへの変更が保存されます。 +変更内容が一目でわかるように、説明的なコミットメッセージを使用します。 + +?> 複数のファイルを変更した場合、`git add -- path/to/file1 path/to/file2 ...` を実行すれば、あなたの望むファイルを追加できます。 + +## 変更を公開する + +最後のステップは、変更をフォークにプッシュすることです。 +これを行うには、`git push`と入力します。 +Gitは、 `dev_branch`の現在の状態をフォークに公開します。 diff --git a/docs/ja/newbs_learn_more_resources.md b/docs/ja/newbs_learn_more_resources.md index 14feb61b325f..35101cdce655 100644 --- a/docs/ja/newbs_learn_more_resources.md +++ b/docs/ja/newbs_learn_more_resources.md @@ -14,13 +14,17 @@ * [Great General Tutorial](https://www.codecademy.com/learn/learn-git) * [Git Game To Learn From Examples](https://learngitbranching.js.org/) -* [Git Resources to Learn More About Github](ja/getting_started_github.md) -* [Git Resources Aimed Specifically toward QMK](ja/contributing.md) +* [Git Resources to Learn More About Github](getting_started_github.md) +* [Git Resources Aimed Specifically toward QMK](contributing.md) ### 日本語 _日本語のリソース情報を募集中です。_ +* [Git Game To Learn From Examples(日本語対応有り)](https://learngitbranching.js.org/) +* [QMK で Github を使う方法](ja/getting_started_github.md) +* [貢献方法](ja/contributing.md) + ## コマンドラインに関するリソース: ### 英語 From 8af1501328711ba806785861b183786cb5cbb80a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 30 Dec 2019 05:21:58 +1100 Subject: [PATCH 106/973] Clean up ISSI driver includes (#7734) * Clean up ISSI driver includes * Missed an endif --- drivers/issi/is31fl3218.h | 1 + drivers/issi/is31fl3731-simple.c | 15 ++------------- drivers/issi/is31fl3731-simple.h | 8 ++++---- drivers/issi/is31fl3731.c | 18 +++--------------- drivers/issi/is31fl3731.h | 5 +---- drivers/issi/is31fl3733.c | 19 +++---------------- drivers/issi/is31fl3733.h | 5 +---- drivers/issi/is31fl3736.c | 21 ++++----------------- drivers/issi/is31fl3737.c | 23 +++++------------------ drivers/issi/is31fl3737.h | 5 +---- 10 files changed, 25 insertions(+), 95 deletions(-) diff --git a/drivers/issi/is31fl3218.h b/drivers/issi/is31fl3218.h index a70cc1e79380..fa760da191dc 100644 --- a/drivers/issi/is31fl3218.h +++ b/drivers/issi/is31fl3218.h @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once #include diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c index fad4676defd4..bd3bb474602d 100644 --- a/drivers/issi/is31fl3731-simple.c +++ b/drivers/issi/is31fl3731-simple.c @@ -16,21 +16,9 @@ * along with this program. If not, see . */ -#ifdef __AVR__ -# include -# include -# include -#else -# include "wait.h" -#endif - -#include -#include -#include #include "is31fl3731-simple.h" #include "i2c_master.h" -#include "progmem.h" -#include "print.h" +#include "wait.h" // 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) @@ -156,6 +144,7 @@ void IS31FL3731_init(uint8_t addr) { // enable software shutdown IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); + // this delay was copied from other drivers, might not be needed wait_ms(10); diff --git a/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h index a223c351e885..85b458753cf3 100644 --- a/drivers/issi/is31fl3731-simple.h +++ b/drivers/issi/is31fl3731-simple.h @@ -16,8 +16,10 @@ * along with this program. If not, see . */ -#ifndef IS31FL3731_DRIVER_H -#define IS31FL3731_DRIVER_H +#pragma once + +#include +#include typedef struct is31_led { uint8_t driver : 2; @@ -203,5 +205,3 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C9_14 0xB1 #define C9_15 0xB2 #define C9_16 0xB3 - -#endif // IS31FL3731_DRIVER_H diff --git a/drivers/issi/is31fl3731.c b/drivers/issi/is31fl3731.c index 0b6f3e985de1..9f006b8174bd 100644 --- a/drivers/issi/is31fl3731.c +++ b/drivers/issi/is31fl3731.c @@ -15,18 +15,9 @@ * along with this program. If not, see . */ -#ifdef __AVR__ -# include -# include -# include -#else -# include "wait.h" -#endif - #include "is31fl3731.h" -#include #include "i2c_master.h" -#include "progmem.h" +#include "wait.h" // 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) @@ -141,12 +132,9 @@ void IS31FL3731_init(uint8_t addr) { // enable software shutdown IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); -// this delay was copied from other drivers, might not be needed -#ifdef __AVR__ - _delay_ms(10); -#else + + // this delay was copied from other drivers, might not be needed wait_ms(10); -#endif // picture mode IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); diff --git a/drivers/issi/is31fl3731.h b/drivers/issi/is31fl3731.h index 6a7a45d8fff0..19e8e6251f80 100644 --- a/drivers/issi/is31fl3731.h +++ b/drivers/issi/is31fl3731.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef IS31FL3731_DRIVER_H -#define IS31FL3731_DRIVER_H +#pragma once #include #include @@ -207,5 +206,3 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); #define C9_14 0xB1 #define C9_15 0xB2 #define C9_16 0xB3 - -#endif // IS31FL3731_DRIVER_H diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c index e60f0e878ea8..b913922b07f3 100644 --- a/drivers/issi/is31fl3733.c +++ b/drivers/issi/is31fl3733.c @@ -16,18 +16,9 @@ * along with this program. If not, see . */ -#ifdef __AVR__ -# include -# include -# include -#else -# include "wait.h" -#endif - -#include -#include "i2c_master.h" -#include "progmem.h" #include "is31fl3733.h" +#include "i2c_master.h" +#include "wait.h" // 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) @@ -168,12 +159,8 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) { // Disable software shutdown. IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01); -// Wait 10ms to ensure the device has woken up. -#ifdef __AVR__ - _delay_ms(10); -#else + // Wait 10ms to ensure the device has woken up. wait_ms(10); -#endif } void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { diff --git a/drivers/issi/is31fl3733.h b/drivers/issi/is31fl3733.h index 4cf186733435..603d505a136d 100644 --- a/drivers/issi/is31fl3733.h +++ b/drivers/issi/is31fl3733.h @@ -16,8 +16,7 @@ * along with this program. If not, see . */ -#ifndef IS31FL3733_DRIVER_H -#define IS31FL3733_DRIVER_H +#pragma once #include #include @@ -250,5 +249,3 @@ void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index); #define L_14 0xBD #define L_15 0xBE #define L_16 0xBF - -#endif // IS31FL3733_DRIVER_H diff --git a/drivers/issi/is31fl3736.c b/drivers/issi/is31fl3736.c index 754292425ec8..9bd8fecfb2f8 100644 --- a/drivers/issi/is31fl3736.c +++ b/drivers/issi/is31fl3736.c @@ -14,18 +14,9 @@ * along with this program. If not, see . */ -#ifdef __AVR__ -# include -# include -# include -#else -# include "wait.h" -#endif - #include "is31fl3736.h" -#include #include "i2c_master.h" -#include "progmem.h" +#include "wait.h" // 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) @@ -154,12 +145,8 @@ void IS31FL3736_init(uint8_t addr) { // Disable software shutdown. IS31FL3736_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); -// Wait 10ms to ensure the device has woken up. -#ifdef __AVR__ - _delay_ms(10); -#else + // Wait 10ms to ensure the device has woken up. wait_ms(10); -#endif } void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { @@ -263,7 +250,7 @@ void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); IS31FL3736_write_pwm_buffer(addr1, g_pwm_buffer[0]); - // IS31FL3736_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + // IS31FL3736_write_pwm_buffer(addr2, g_pwm_buffer[1]); } g_pwm_buffer_update_required = false; } @@ -275,7 +262,7 @@ void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) { IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); for (int i = 0; i < 24; i++) { IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]); - // IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i] ); + // IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i]); } } } diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c index 4cc46272e241..37c5c58e42be 100644 --- a/drivers/issi/is31fl3737.c +++ b/drivers/issi/is31fl3737.c @@ -16,18 +16,9 @@ * along with this program. If not, see . */ -#ifdef __AVR__ -# include -# include -# include -#else -# include "wait.h" -#endif - -#include +#include "is31fl3737.h" #include "i2c_master.h" -#include "progmem.h" -#include "rgb_matrix.h" +#include "wait.h" // 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) @@ -156,12 +147,8 @@ void IS31FL3737_init(uint8_t addr) { // Disable software shutdown. IS31FL3737_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); -// Wait 10ms to ensure the device has woken up. -#ifdef __AVR__ - _delay_ms(10); -#else + // Wait 10ms to ensure the device has woken up. wait_ms(10); -#endif } void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { @@ -217,7 +204,7 @@ void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); IS31FL3737_write_pwm_buffer(addr1, g_pwm_buffer[0]); - // IS31FL3737_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + // IS31FL3737_write_pwm_buffer(addr2, g_pwm_buffer[1]); } g_pwm_buffer_update_required = false; } @@ -229,7 +216,7 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) { IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); for (int i = 0; i < 24; i++) { IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]); - // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] ); + // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i]); } } } diff --git a/drivers/issi/is31fl3737.h b/drivers/issi/is31fl3737.h index 2c2fb1964137..a1d228177879 100644 --- a/drivers/issi/is31fl3737.h +++ b/drivers/issi/is31fl3737.h @@ -16,8 +16,7 @@ * along with this program. If not, see . */ -#ifndef IS31FL3737_DRIVER_H -#define IS31FL3737_DRIVER_H +#pragma once #include #include @@ -202,5 +201,3 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2); #define L_10 0xBB #define L_11 0xBC #define L_12 0xBD - -#endif // IS31FL3737_DRIVER_H From 64263bbb0255df756dc30467ee6643054d325597 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 29 Dec 2019 11:16:24 -0800 Subject: [PATCH 107/973] [Keyboard] Orion Locking Indicator LED Support (#7683) * add indicator lighting support thanks to Keebology tracing * set the correct number of underglow LEDs * add comments and skeletal structure for layer indicator LEDs * add backlight areas pins * update readme * we can't turn leds on based on zones, so we use multiple backlight pin support instead to turn them ALL on and control them. * add comments to backlight setting * make a more useful default keymap that can also be used for testing * add duck orion to list * add indicator led support * update readme * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/duck/orion/v3/matrix.c Co-Authored-By: Drashna Jaelre * add the appropriate header files * fix indent so Drashna will not die * Update keyboards/duck/orion/v3/v3.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/duck/orion/v3/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/readme.md Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/readme.md Co-Authored-By: fauxpark * Update keyboards/duck/orion/v3/readme.md Co-Authored-By: fauxpark Co-authored-by: Drashna Jaelre Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: fauxpark --- keyboards/duck/orion/v3/config.h | 10 +++- .../duck/orion/v3/keymaps/default/keymap.c | 22 ++++--- keyboards/duck/orion/v3/matrix.c | 31 +++++----- keyboards/duck/orion/v3/readme.md | 14 ++--- keyboards/duck/orion/v3/v3.c | 58 ++++++------------- keyboards/duck/readme.md | 1 + 6 files changed, 64 insertions(+), 72 deletions(-) diff --git a/keyboards/duck/orion/v3/config.h b/keyboards/duck/orion/v3/config.h index 3a17d5941637..b04729712ee5 100644 --- a/keyboards/duck/orion/v3/config.h +++ b/keyboards/duck/orion/v3/config.h @@ -37,11 +37,17 @@ along with this program. If not, see . #define DEBOUNCE 5 /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +// #define BACKLIGHT_LEVELS 3 + +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { B1, B2, B3, E6 } +#define BACKLIGHT_LED_COUNT 4 +#define BACKLIGHT_LEVELS 10 +#define BACKLIGHT_ON_STATE 1 #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 -#define RGBLED_NUM 17 +#define RGBLED_NUM 18 /* Set to top left most key */ #define BOOTMAGIC_LITE_ROW 4 diff --git a/keyboards/duck/orion/v3/keymaps/default/keymap.c b/keyboards/duck/orion/v3/keymaps/default/keymap.c index 83fa4f9a8e80..0da0cdaeb3bb 100644 --- a/keyboards/duck/orion/v3/keymaps/default/keymap.c +++ b/keyboards/duck/orion/v3/keymaps/default/keymap.c @@ -16,11 +16,19 @@ #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_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) \ +[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_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, MO(1),KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT), + +[1] = LAYOUT_tkl_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, + BL_TOGG, BL_STEP, BL_INC, BL_DEC, 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, + 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, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c index 3c3240b9f4cd..f93c7a9cd95b 100644 --- a/keyboards/duck/orion/v3/matrix.c +++ b/keyboards/duck/orion/v3/matrix.c @@ -14,13 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include -#include -#include -#include "matrix.h" -#include "util.h" -#include "print.h" -#include "debug.h" +#include "quantum.h" static uint8_t debouncing = DEBOUNCE; @@ -54,18 +48,23 @@ void matrix_scan_user(void) { void backlight_init_ports(void) { - DDRD |= 0b11010000; - PORTD &= ~0b01010000; - PORTD |= 0b10000000; - DDRB |= 0b00011111; - PORTB &= ~0b00001110; - PORTB |= 0b00010001; - DDRE |= 0b01000000; - PORTE &= ~0b01000000; + +} + +void indicator_init_ports(void) { + + // Num LED + setPinOutput(B4); + + // Caps Lock + setPinOutput(B0); + + // Scroll Lock + setPinOutput(D7); } void matrix_init(void) { - backlight_init_ports(); + indicator_init_ports(); unselect_cols(); init_rows(); diff --git a/keyboards/duck/orion/v3/readme.md b/keyboards/duck/orion/v3/readme.md index 50032e93eeb4..8d1b83401e37 100644 --- a/keyboards/duck/orion/v3/readme.md +++ b/keyboards/duck/orion/v3/readme.md @@ -3,9 +3,9 @@ Non official firmware for custom TKL Korean keyboard made by Duck. Group buy was run December 2018 via [geekhack](https://geekhack.org/index.php?topic=98581.0) with 100 keyboards total. -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: Duck Eagle/Viper PCB Ver 2.0, Atmega32u4 -Hardware Availability: Wait until GB of the next revision +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: Duck Orion V3 PCB Ver 2.1 +* Hardware Availability: Wait until GB of the next revision Make example for this keyboard (after setting up your build environment): @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): **Reset Key:** To put the Orion V3 into reset, hold Backspace key (`K4N`) while plugging in. -**CAUTION:** At this time 10/03/19 lighting has not been tested fully and may not properly work. +**CAUTION:** At this time 12/19/19 layer indicator lighting has not been implemented by 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). @@ -22,9 +22,9 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to The Orion V3 PCB consists of: ### Microchips -2 74HC237D 3-to-8 line decoders +2 74HC237D 3-to-8 line decoders U1, U2 1 Atmega32u4 microcontroller -2 WS2811 LED controller +2 WS2811 LED controller U5, U6 ## Notes -Special thanks to Marcus aka Keebology for doing this remotely and mapping the matrix. \ No newline at end of file +Special thanks to Marcus aka Keebology for doing this remotely and mapping the matrix, indicator LEDs, and backlight LEDs. diff --git a/keyboards/duck/orion/v3/v3.c b/keyboards/duck/orion/v3/v3.c index 95da4b45b680..ca5c512cee1d 100644 --- a/keyboards/duck/orion/v3/v3.c +++ b/keyboards/duck/orion/v3/v3.c @@ -16,48 +16,26 @@ #include "v3.h" #include "indicator_leds.h" -enum BACKLIGHT_AREAS { - BACKLIGHT_ALPHAS = 0b00000010, - BACKLIGHT_MODNUM = 0b00001000 -}; +// Alphas PB1 +// Navigation Cluster: PB2 +// Number Row, Mods: PB3 +// Function Row: PE6 -void backlight_set(uint8_t level) { - switch(level) { - case 0: - PORTB |= BACKLIGHT_ALPHAS; - PORTB |= BACKLIGHT_MODNUM; - break; - case 1: - PORTB &= ~BACKLIGHT_ALPHAS; - PORTB |= BACKLIGHT_MODNUM; - break; - case 2: - PORTB |= BACKLIGHT_ALPHAS; - PORTB &= ~BACKLIGHT_MODNUM; - break; - case 3: - PORTB &= ~BACKLIGHT_ALPHAS; - PORTB &= ~BACKLIGHT_MODNUM; - break; - } -} - -// Port from backlight_update_state -void led_set_kb(uint8_t usb_led) { - bool status[8] = { - IS_HOST_LED_ON(USB_LED_SCROLL_LOCK), /* LED 3 */ - IS_HOST_LED_ON(USB_LED_CAPS_LOCK), /* LED 2 */ - IS_HOST_LED_ON(USB_LED_NUM_LOCK), /* LED 1 */ - - layer_state & (1<<2), /* LED 6 */ - layer_state & (1<<1), /* LED 5 */ - layer_state & (1<<0) ? 0: 1, /* LED 4 */ - - layer_state & (1<<5), /* LED 8 */ - layer_state & (1<<4) /* LED 7 */ - }; +// Other than using RGB or LED matrix, QMK cannot turn on specific zones +// of backlight LEDs. Unfortunately, Duck PCBs do not follow this design +// and instead use multiple pins connected to each of these zones. QMK is +// only able to control them ALL with the current default mechanisms. - indicator_leds_set(status); +// Locking indicator LEDs +// The Duck Orion V3 has 3 locking indicator LEDs and are located to the right +// of the Escape key. +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, !led_state.caps_lock); + writePin(B4, !led_state.num_lock); + writePin(D7, !led_state.scroll_lock); + } + return true; } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/duck/readme.md b/keyboards/duck/readme.md index caf7e156d13d..32076da7da4f 100644 --- a/keyboards/duck/readme.md +++ b/keyboards/duck/readme.md @@ -13,4 +13,5 @@ Jetfire V1 Lightsaver V3 Octagon V1 Octagon V2 +Orion V3 Viper V2 \ No newline at end of file From 559ef215638e82de75e3e9221baf4909990f4f53 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 30 Dec 2019 07:53:23 +1100 Subject: [PATCH 108/973] Add LUFA mass storage `BOOTLOADER` "support" (#7729) --- bootloader.mk | 7 +++++++ keyboards/gray_studio/cod67/rules.mk | 5 +---- keyboards/tada68/rules.mk | 5 +---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bootloader.mk b/bootloader.mk index d615533947be..e516e9ff9fd2 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -82,6 +82,13 @@ ifeq ($(strip $(BOOTLOADER)), USBasp) OPT_DEFS += -DBOOTLOADER_USBASP BOOTLOADER_SIZE = 4096 endif +ifeq ($(strip $(BOOTLOADER)), lufa-ms) + # DO NOT USE THIS BOOTLOADER IN NEW PROJECTS! + # It is extremely prone to bricking, and is only included to support existing boards. + OPT_DEFS += -DBOOTLOADER_MS + BOOTLOADER_SIZE = 6144 + FIRMWARE_FORMAT = bin +endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) diff --git a/keyboards/gray_studio/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk index 0bed09539f5b..132db98f45e9 100644 --- a/keyboards/gray_studio/cod67/rules.mk +++ b/keyboards/gray_studio/cod67/rules.mk @@ -9,10 +9,7 @@ MCU = atmega32u4 # QMK DFU qmk-dfu # ATmega32A bootloadHID # ATmega328P USBasp -BOOTLOADER = atmel-dfu # actually lufa-ms - -# Mass storage bootloader on the COD67 uses bin files -FIRMWARE_FORMAT = bin +BOOTLOADER = lufa-ms # Build Options # change yes to no to disable diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk index ec3991c318d1..38b05e042698 100755 --- a/keyboards/tada68/rules.mk +++ b/keyboards/tada68/rules.mk @@ -9,10 +9,7 @@ MCU = atmega32u4 # QMK DFU qmk-dfu # ATmega32A bootloadHID # ATmega328P USBasp -BOOTLOADER = atmel-dfu # actually lufa-ms - -# Mass storage bootloader on the tada68 uses bin files -FIRMWARE_FORMAT = bin +BOOTLOADER = lufa-ms # Build Options # comment out to disable the options. From f6bdb6afba80f451f9866517aafc507f1f15c091 Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Mon, 30 Dec 2019 10:29:36 -0500 Subject: [PATCH 109/973] New PCB - Curiosity - Alice Layout PCB (#7725) * add new keyboard * update config to use * confirm config that works * fix the keymaps and what not * default keymap update * update readme * update and remove unncessary files * update IDs and remove unused definitions * update readme * add new keyboard * update config to use * confirm config that works * fix the keymaps and what not * default keymap update * update readme * update and remove unncessary files * update IDs and remove unused definitions * update readme * remove unused stuff * update default keymap and add my own with layer indicator LEDs * update README * add crd's layout as part of the default as well * some specific space fixes * update readme for flashing * remove code and use mcu selection instead. yay! * remove vlk from default and enable velocikeys in madhatter * remove BL_ from default * and remove BL_ from madhatter as well * Update keyboards/cheshire/curiosity/keymaps/crd/keymap.c Co-Authored-By: fauxpark Co-authored-by: Khader Syed <35927972+chapter63@users.noreply.github.com> Co-authored-by: fauxpark --- keyboards/cheshire/curiosity/chconf.h | 524 ++++++++++++++++++ keyboards/cheshire/curiosity/config.h | 50 ++ keyboards/cheshire/curiosity/curiosity.c | 17 + keyboards/cheshire/curiosity/curiosity.h | 42 ++ keyboards/cheshire/curiosity/halconf.h | 353 ++++++++++++ keyboards/cheshire/curiosity/info.json | 82 +++ .../cheshire/curiosity/keymaps/crd/keymap.c | 51 ++ .../curiosity/keymaps/default/keymap.c | 53 ++ .../curiosity/keymaps/default/readme.md | 7 + .../curiosity/keymaps/madhatter/keymap.c | 79 +++ .../curiosity/keymaps/madhatter/readme.md | 7 + .../curiosity/keymaps/madhatter/rules.mk | 1 + keyboards/cheshire/curiosity/mcuconf.h | 171 ++++++ keyboards/cheshire/curiosity/readme.md | 20 + keyboards/cheshire/curiosity/rules.mk | 17 + 15 files changed, 1474 insertions(+) create mode 100644 keyboards/cheshire/curiosity/chconf.h create mode 100644 keyboards/cheshire/curiosity/config.h create mode 100644 keyboards/cheshire/curiosity/curiosity.c create mode 100644 keyboards/cheshire/curiosity/curiosity.h create mode 100644 keyboards/cheshire/curiosity/halconf.h create mode 100644 keyboards/cheshire/curiosity/info.json create mode 100644 keyboards/cheshire/curiosity/keymaps/crd/keymap.c create mode 100644 keyboards/cheshire/curiosity/keymaps/default/keymap.c create mode 100644 keyboards/cheshire/curiosity/keymaps/default/readme.md create mode 100644 keyboards/cheshire/curiosity/keymaps/madhatter/keymap.c create mode 100644 keyboards/cheshire/curiosity/keymaps/madhatter/readme.md create mode 100644 keyboards/cheshire/curiosity/keymaps/madhatter/rules.mk create mode 100644 keyboards/cheshire/curiosity/mcuconf.h create mode 100644 keyboards/cheshire/curiosity/readme.md create mode 100644 keyboards/cheshire/curiosity/rules.mk diff --git a/keyboards/cheshire/curiosity/chconf.h b/keyboards/cheshire/curiosity/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/cheshire/curiosity/chconf.h @@ -0,0 +1,524 @@ +/* + 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 + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @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/cheshire/curiosity/config.h b/keyboards/cheshire/curiosity/config.h new file mode 100644 index 000000000000..7dca470c5172 --- /dev/null +++ b/keyboards/cheshire/curiosity/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2019 zvecr + +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 0xCAFE +#define PRODUCT_ID 0x0FAD +#define DEVICE_VER 0x0001 +#define MANUFACTURER Nightingale Studios/Cheshire Designs +#define PRODUCT Curiosity +#define DESCRIPTION Curiosity + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { B13, B14, A4, A2, A1 } +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A5, B9, B8, B7, B6, B5, B4, B3, A15 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B15 +#define RGBLED_NUM 14 + +#define RGBLIGHT_ANIMATIONS + +#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/cheshire/curiosity/curiosity.c b/keyboards/cheshire/curiosity/curiosity.c new file mode 100644 index 000000000000..e52499b352ea --- /dev/null +++ b/keyboards/cheshire/curiosity/curiosity.c @@ -0,0 +1,17 @@ +#include "curiosity.h" + +void matrix_init_board(void){ + setPinOutput(A8); + setPinOutput(A9); + setPinOutput(A10); +} + +bool led_update_kb(led_t led_state) { + bool runDefault = led_update_user(led_state); + if (runDefault) { + writePin(A8, !led_state.num_lock); + writePin(A9, !led_state.caps_lock); + writePin(A10, !led_state.scroll_lock); + } + return runDefault; +} diff --git a/keyboards/cheshire/curiosity/curiosity.h b/keyboards/cheshire/curiosity/curiosity.h new file mode 100644 index 000000000000..e250eda8f063 --- /dev/null +++ b/keyboards/cheshire/curiosity/curiosity.h @@ -0,0 +1,42 @@ +/* Copyright 2019 zvecr + * + * 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_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K208, K209, K210, K211, K212, K213, K215, \ + K301, K302, K303, K304, K305, K306, K308, K309, K310, K311, K312, K313, K314, K315, \ + K401, K403, K405, K406, K409, K411, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \ + { K100, K101, K102, K103, K104, K105, K106, ____, K108, K109, K110, K111, K112, K113, K114, K115}, \ + { K200, K201, K202, K203, K204, K205, K206, ____, K208, K209, K210, K211, K212, K213, ____, K215}, \ + { ____, K301, K302, K303, K304, K305, K306, ____, K308, K309, K310, K311, K312, K313, K314, K315}, \ + { ____, K401, ____, K403, ____, K405, K406, ____, ____, K409, ____, K411, ____, ____, K414, ____}, \ +} diff --git a/keyboards/cheshire/curiosity/halconf.h b/keyboards/cheshire/curiosity/halconf.h new file mode 100644 index 000000000000..8b9724b1a30e --- /dev/null +++ b/keyboards/cheshire/curiosity/halconf.h @@ -0,0 +1,353 @@ +/* + 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 FALSE +#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 FALSE +#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 FALSE +#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/cheshire/curiosity/info.json b/keyboards/cheshire/curiosity/info.json new file mode 100644 index 000000000000..f989546584e4 --- /dev/null +++ b/keyboards/cheshire/curiosity/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Curiosity", + "maintainer": "zvecr", + "width": 19.75, + "height": 5.25, + "layouts": { + "LAYOUT_default": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"`", "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":"Del", "x":17, "y":0.25}, + {"label":"Backspace", "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":"|", "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":"Fn", "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":"Ctrl", "x":1.5, "y":4.25, "w":1.5}, + {"label":"Alt", "x":5, "y":4.25, "w":1.5}, + {"label":"Space", "x":6.5, "y":4.25, "w":2}, + {"label":"Menu", "x":8.5, "y":4.25}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.75}, + {"label":"Alt", "x":13, "y":4.25, "w":1.5}, + {"label":"Ctrl", "x":18, "y":4.25, "w":1.5} + ] + } + } +} diff --git a/keyboards/cheshire/curiosity/keymaps/crd/keymap.c b/keyboards/cheshire/curiosity/keymaps/crd/keymap.c new file mode 100644 index 000000000000..5ccaafec3c19 --- /dev/null +++ b/keyboards/cheshire/curiosity/keymaps/crd/keymap.c @@ -0,0 +1,51 @@ +/* +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 + + +enum keyboard_layers { + _BL, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTES CTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_default( + KC_NO, 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_GRV, + KC_NO, 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_NO, KC_CTES, 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(_FL), + KC_LCTL, KC_LGUI, KC_SPC, MO(_FL), KC_SPC, KC_RALT, MO(_CL) + ), + [_FL] = LAYOUT_default( + KC_PGUP, 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, + KC_PGDN, KC_CAPS, _______, _______, EEP_RST, RESET, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + KC_ESC, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + _______, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [_CL] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______, _______, + _______, _______, RGB_VAD, RGB_VAI, RGB_TOG, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_HUI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_SAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/cheshire/curiosity/keymaps/default/keymap.c b/keyboards/cheshire/curiosity/keymaps/default/keymap.c new file mode 100644 index 000000000000..5b0f176ea4c9 --- /dev/null +++ b/keyboards/cheshire/curiosity/keymaps/default/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2019 Khader Syed + +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 my_layers { + _QWERTY, + _FNMS, + _NAVMED +}; + +#define FNMS MO(_FNMS) +#define NAVMED MO(_NAVMED) +#define CAP_CTL CTL_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_default( + KC_GESC, 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_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, CAP_CTL, 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, FNMS, + KC_LCTL, KC_LALT, KC_LCMD, NAVMED, KC_SPC, KC_RALT, KC_RCTL + ), + + [_FNMS] = LAYOUT_default( + RGB_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, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN2, _______, _______, + _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, + AG_TOGG, _______, _______, _______, _______, _______, _______ + ), + + [_NAVMED] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, RESET, + KC_END, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/cheshire/curiosity/keymaps/default/readme.md b/keyboards/cheshire/curiosity/keymaps/default/readme.md new file mode 100644 index 000000000000..c56b768141b2 --- /dev/null +++ b/keyboards/cheshire/curiosity/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# Curiosity default keymap + +- A layer for all functions and mouse keys +- A layer for arrows and media +- Arrows on IJKL +- Caps and control on caps lock - wonderful + diff --git a/keyboards/cheshire/curiosity/keymaps/madhatter/keymap.c b/keyboards/cheshire/curiosity/keymaps/madhatter/keymap.c new file mode 100644 index 000000000000..b0649d37ab8c --- /dev/null +++ b/keyboards/cheshire/curiosity/keymaps/madhatter/keymap.c @@ -0,0 +1,79 @@ +/* +Copyright 2019 Khader Syed + +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 my_layers { + _QWERTY, + _FNMS, + _NAVMED +}; + +#define FNMS MO(_FNMS) +#define NAVMED MO(_NAVMED) +#define CAP_CTL CTL_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_default( + KC_GESC, 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_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, CAP_CTL, 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, FNMS, + KC_LCTL, KC_LALT, KC_LCMD, NAVMED, KC_SPC, KC_RALT, KC_RCTL + ), + + [_FNMS] = LAYOUT_default( + RGB_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, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, RESET, + VLK_TOG, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN2, _______, _______, + _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, + AG_TOGG, _______, _______, _______, _______, _______, _______ + ), + + [_NAVMED] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, RESET, + KC_END, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; + +static uint8_t top = 0; +static uint8_t middle = 0; +static uint8_t bottom = 1; + +layer_state_t layer_state_set_user(layer_state_t state) { + top = middle = bottom = 0; + switch (get_highest_layer(state)) { + case _NAVMED: + top = 1; + break; + case _FNMS: + middle = 1; + break; + default: + break; + } + return state; +} + +bool led_update_user(led_t usb_led) { + writePin(A8, !top); + writePin(A9, !middle); + writePin(A10, !bottom); + return false; +} diff --git a/keyboards/cheshire/curiosity/keymaps/madhatter/readme.md b/keyboards/cheshire/curiosity/keymaps/madhatter/readme.md new file mode 100644 index 000000000000..a0e4c42c135c --- /dev/null +++ b/keyboards/cheshire/curiosity/keymaps/madhatter/readme.md @@ -0,0 +1,7 @@ +# Curiosity default keymap + +- A layer for all functions and mouse keys +- A layer for arrows and media +- Arrows on IJKL +- Caps and control on caps lock - wonderful +- Layer indicator LEDs diff --git a/keyboards/cheshire/curiosity/keymaps/madhatter/rules.mk b/keyboards/cheshire/curiosity/keymaps/madhatter/rules.mk new file mode 100644 index 000000000000..1b0f198d06c1 --- /dev/null +++ b/keyboards/cheshire/curiosity/keymaps/madhatter/rules.mk @@ -0,0 +1 @@ +VELOCIKEY_ENABLE = yes diff --git a/keyboards/cheshire/curiosity/mcuconf.h b/keyboards/cheshire/curiosity/mcuconf.h new file mode 100644 index 000000000000..faca3defdf0e --- /dev/null +++ b/keyboards/cheshire/curiosity/mcuconf.h @@ -0,0 +1,171 @@ +/* + 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 + +/* + * 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 FALSE +#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_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 FALSE +#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 FALSE +#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_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/cheshire/curiosity/readme.md b/keyboards/cheshire/curiosity/readme.md new file mode 100644 index 000000000000..dbde94130b23 --- /dev/null +++ b/keyboards/cheshire/curiosity/readme.md @@ -0,0 +1,20 @@ +# Cheshire Curiosity PCB + +Cheshire Alice Keyboard Replacement PCB + +* Keyboard Maintainer: [sidcarter](https://github.com/sidcarter) +* Hardware Supported: Cheshire Curiosity PCB, STM32F072CBT6 +* Designed By: Nightingale Studios/PhoenixStarr + +Make example for this keyboard (after setting up your build environment): + + make cheshire/curiosity:default:flash + +If you are flashing this keyboard/pcb for the first time: + + * Set the dip switch on the reverse of the PCB to 1 + * Hit the reset button and then do + * make cheshire/curiosity:default + * After flashing the keyboard successfully, you can reset the dip switch back to 0 + +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/cheshire/curiosity/rules.mk b/keyboards/cheshire/curiosity/rules.mk new file mode 100644 index 000000000000..354465a08436 --- /dev/null +++ b/keyboards/cheshire/curiosity/rules.mk @@ -0,0 +1,17 @@ +# MCU name +MCU = STM32F072 + +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow From 91c8a9314aed50d4220ce18e7f3f1e0476e44286 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Mon, 30 Dec 2019 16:34:12 +0100 Subject: [PATCH 110/973] Dactyl manuform layout optimized for Swedish (#7724) * Dactyl manuform layout optimized for Swedish * Layers as enum --- .../5x6/keymaps/swedish/config.h | 27 +++++++++ .../5x6/keymaps/swedish/keymap.c | 58 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h create mode 100644 keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h new file mode 100644 index 000000000000..29ab59ad66b4 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h @@ -0,0 +1,27 @@ +/* +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 + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define MASTER_RIGHT +//#define EE_HANDS +// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c new file mode 100644 index 000000000000..f8dfb2718c90 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c @@ -0,0 +1,58 @@ +/* A Swedish XMonad layout for the Dactyl Manuform 5x6 Keyboard */ + +#include QMK_KEYBOARD_H +#include "keymap_swedish.h" + +enum dactyl_layers { + _QWERTY, + _LOWER, + _RAISE, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) +#define TERM LGUI(LSFT(KC_ENT)) +#define ALTTAB LGUI(KC_TAB) +#define KILL LGUI(LSFT(KC_C)) +#define OPEN LGUI(KC_P) +#define KC_QSM LSFT(SE_PLUS) +#define KC_AA SE_AA +#define KC_AE SE_AE +#define KC_OE SE_OSLH + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_5x6( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , SE_APOS, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_AA , + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_OE , KC_AE , + KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SE_SLSH, SE_MINS, + KC_EXLM, KC_QSM , SE_PLUS, SE_EQL , + RAISE , KC_SPC , KC_ENT , LOWER , + ALTTAB , KC_LGUI, KC_BSPC, KC_DEL , + OPEN , TERM , KILL , KC_LALT + ), + + [_LOWER] = LAYOUT_5x6( + SE_TILD, KC_EXLM, SE_AT , KC_HASH, SE_DLR , KC_PERC, SE_CIRC, SE_AMPR, SE_ASTR, SE_SLSH, SE_LPRN, SE_RPRN, + SE_ACUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LCBR, SE_RCBR, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, SE_LBRC, SE_RBRC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LESS, SE_GRTR, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + + ), + + [_RAISE] = LAYOUT_5x6( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + _______, _______, _______, _______, _______, _______, RESET , _______, _______, _______, KC_MUTE, SE_PIPE, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , KC_VOLU, SE_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; From d1ed98f58b67909af2425690dd11d0a85621d098 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 31 Dec 2019 02:15:23 +0900 Subject: [PATCH 111/973] [Docs] remove docs/ja/newbs_best_practices.md (#7739) 'docs/ja/newbs_best_practices.md' has been replaced by 'docs/ja/newbs_git_*.md'. --- docs/ja/newbs_best_practices.md | 263 -------------------------------- 1 file changed, 263 deletions(-) delete mode 100644 docs/ja/newbs_best_practices.md diff --git a/docs/ja/newbs_best_practices.md b/docs/ja/newbs_best_practices.md deleted file mode 100644 index 3c87d53d460a..000000000000 --- a/docs/ja/newbs_best_practices.md +++ /dev/null @@ -1,263 +0,0 @@ - -# QMK における Git 運用作法 - - - - -## または、如何にして私は心配することをやめて Git を愛することを学んだか。 - - - -この文書は、QMK への貢献をスムーズに行なう最もよい方法を初心者に教えることを目的としています。 -QMK に貢献するプロセスを順を追って説明し、この作業を簡単にするいくつかの方法を詳しく説明します。 -その後、意図的に一部を壊してみせて、それらを修正する方法を教えます。 - - -このドキュメントは以下のことを前提としています: - - - - - - -1. あなたは GitHub アカウントがあり、アカウントに [qmk_firmware リポジトリをフォーク](ja/getting_started_github.md) している。 -2. あなたは、[環境構築](ja/newbs_getting_started.md#set-up-your-environment) と [QMK の設定](ja/newbs_getting_started.md#set-up-qmk) を両方とも完了している。 - - -## あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと - - - -QMK の開発では、何がどこで行われているかにかかわらず、`master` ブランチを最新の状態に保つことを強くお勧めします、しかし `master` ブランチには***絶対に直接コミットしないでください***。 -代わりに、あなたのすべての変更は開発ブランチで行い、あなたが開発する時にはそのブランチからプルリクエストを発行します。 - - - -マージの競合 — これは 2人以上のユーザーがファイルの同じ部分をそれぞれ異なる編集をして統合できなくなった状態 — の可能性を減らすため `master` ブランチをなるべく最新の状態に保ち、新しいブランチを作成して新しい開発を開始します。 - - -### あなたの master ブランチを更新する - - - -`master` ブランチを最新の状態に保つには、git のリモートリポジトリとして QMK ファームウェアのリポジトリ(以降、QMK リポジトリ)を追加することをお勧めします。 -これを行うには、Git コマンドラインインターフェイスを開き、次のように入力します。 - -``` -git remote add upstream https://github.com/qmk/qmk_firmware.git -``` - - - -リポジトリが追加されたことを確認するには、`git remote -v` を実行します。 -次のように表示されます。(訳注: `upstream` は`上流`という意味です。) - -``` -$ git remote -v -origin https://github.com//qmk_firmware.git (fetch) -origin https://github.com//qmk_firmware.git (push) -upstream https://github.com/qmk/qmk_firmware.git (fetch) -upstream https://github.com/qmk/qmk_firmware.git (push) -``` - - - -これが完了すると、`git fetch upstream` を実行してリポジトリの更新を確認できます。 -このコマンドは `upstream` というニックネームを持つ QMK リポジトリから、ブランチとタグ — "refs" と総称されます — を取得します。 -これで、あなたのフォーク `origin` のデータを QMK が保持するデータと比較できます。 - - - -あなたのフォークの `master` を更新するには、次を実行します、各行の後にEnterキーを押してください: - -``` -git checkout master -git fetch upstream -git pull upstream master -git push origin master -``` - - - -これにより、あなたの `master` ブランチに切り替わり、QMK リポジトリから 'refs' を取得し、現在の QMK の `master` ブランチをコンピュータにダウンロードしてから、あなたのフォークにアップロードします。 - - -### 変更を行なう - - - -変更するには、以下を入力して新しいブランチを作成します: - -``` -git checkout -b dev_branch -git push --set-upstream origin dev_branch -``` - - - -これにより、`dev_branch` という名前の新しいブランチが作成され、チェックアウトされ、新しいブランチがあなたのフォークに保存されます。 -`--set-upstream` 引数は、このブランチから `git push` または `git pull` を使用するたびに、あなたのフォークと `dev_branch` ブランチを使用するように git に指示します。 -この引数は最初のプッシュでのみ使用する必要があります。 -その後、残りの引数なしで `git push` または `git pull` を安全に使用できます。 - - - -!> `git push` では、`-set-upstream` の代わりに `-u` を使用できます、 `-u` は `--set-upstream` のエイリアスです。 - - - -ブランチにはほぼ任意の名前を付けることができますが、あなたが行なう変更を表す名前を付けることをお勧めします。 - - - -デフォルトでは、`git checkout -b`は、今チェックアウトされているブランチに基づいて新しいブランチを作成します。 -コマンド末尾に既存のブランチの名前を追加指定することにより、チェックアウトされていない既存のブランチを基にして新しいブランチを作成できます: - -``` -git checkout -b dev_branch master -``` - - - -これで開発ブランチができたのでテキストエディタを開き必要な変更を加えます。 -ブランチに対して多くの小さなコミットを行うことをお勧めします。 -そうすることで、問題を引き起こす変更をより簡単に特定し必要に応じて元に戻すことができます。 -変更を加えるには、更新が必要なファイルを編集して保存し、Git の *ステージングエリア* に追加してから、ブランチにコミットします: - -``` -git add path/to/updated_file -git commit -m "My commit message." -``` - - - -`git add`は、変更されたファイルを Git の *ステージングエリア* に追加します。 -これは、Git の「ロードゾーン」です。 -これには、`git commit` によって *コミット* される変更が含まれており、リポジトリへの変更が保存されます。 -変更内容が一目でわかるように、説明的なコミットメッセージを使用します。 - - - -!> 多くのファイルを変更したが、すべてのファイルが同じ変更の一部である場合、各ファイルを個別に追加するのではなく、 `git add .` を使用して、現在のディレクトリにあるすべての変更されたファイルを追加できます。 - - -### 変更を公開する - - - -最後のステップは、変更をフォークにプッシュすることです。これを行うには、`git push`と入力します。 -Git は `dev_branch` の現在の状態をフォークに公開します。 - - -## マージの競合の解決 - - - -ブランチでの作業の完了に時間がかかる場合、他の人が行った変更が、プルリクエストを開いたときにブランチに加えた変更と競合することがあります。 -これは *マージの競合* と呼ばれ、複数の人が同じファイルの同じ部分を編集すると発生します。 - - -### 変更のリベース - - - -*リベース* は、ある時点で適用された変更を取得し、それらを元に戻し、次に同じ変更を別のポイントに適用する Git の方法です。 -マージの競合が発生した場合、ブランチをリベースして、ブランチを作成してから現在までに行われた変更を取得できます。 - - - -開始するには、次を実行します: - -``` -git fetch upstream -git rev-list --left-right --count HEAD...upstream/master -``` - - - -ここに入力された `git rev-list` コマンドは、現在のブランチと QMK の master ブランチで異なるコミットの数を返します。 -最初に `git fetch` を実行して、upstream リポジトリの現在の状態を表す refs があることを確認します。 -入力された `git rev-list` コマンドの出力は2つの数値を返します: - -``` -$ git rev-list --left-right --count HEAD...upstream/master -7 35 -``` - - - -最初の数字は、現在のブランチが作成されてからのコミット数を表し、2番目の数字は、現在のブランチが作成されてから `upstream/master` に対して行われたコミットの数であり、したがって、現在のブランチに記録されていない変更です。 - - - -現在のブランチと upstream リポジトリの両方の現在の状態がわかったので、リベース操作を開始できます: - -``` -git rebase upstream/master -``` - - - -これにより、Git は現在のブランチのコミットを取り消してから、QMK の master ブランチに対してコミットを再適用します。 - -``` -$ git rebase upstream/master -First, rewinding head to replay your work on top of it... -Applying: Commit #1 -Using index info to reconstruct a base tree... -M conflicting_file_1.txt -Falling back to patching base and 3-way merge... -Auto-merging conflicting_file_1.txt -CONFLICT (content): Merge conflict in conflicting_file_1.txt -error: Failed to merge in the changes. -hint: Use 'git am --show-current-patch' to see the failed patch -Patch failed at 0001 Commit #1 - -Resolve all conflicts manually, mark them as resolved with -"git add/rm ", then run "git rebase --continue". -You can instead skip this commit: run "git rebase --skip". -To abort and get back to the state before "git rebase", run "git rebase --abort". -``` - - - -これにより、マージの競合があることがわかり、競合のあるファイルの名前が示されます。 -テキストエディタで競合するファイルを開くと、ファイルのどこかに次のような行があります: - -``` -<<<<<<< HEAD -

For help with any issues, email us at support@webhost.us.

-======= -

Need help? Email support@webhost.us.

->>>>>>> Commit #1 -``` - - - -行 `<<<<<<< HEAD` はマージ競合の始まりを示し、行 `>>>>>>> commit #1` は終了を示し、競合するセクションは `=======` で区切られます。 -`HEAD` 側の部分はファイルの QMK master バージョンからのものであり、コミットメッセージでマークされた部分は現在のブランチとコミットからのものです。 - - - -Git はファイルの内容ではなく *ファイルへの変更* を直接追跡するため、Git がコミットの前にファイル内にあったテキストを見つけられない場合、ファイルの編集方法がわかりません。 -ファイルを再編集して、競合を解決します。 -変更を加えてから、ファイルを保存します。 - -``` -

Need help? Email support@webhost.us.

-``` - -そしてコマンド実行: - -``` -git add conflicting_file_1.txt -git rebase --continue -``` - - - -Git は、競合するファイルへの変更をログに記録し、ブランチのコミットが最後に達するまで適用し続けます。 From a52e55ec09c587ca58a156a6c174d51e0ad228b4 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 31 Dec 2019 06:33:54 -0800 Subject: [PATCH 112/973] [Docs] Update macOS related issues in docs (#7744) * [Docs] Update macOS related issues in docs * Update faq_build.md * Apply suggestions from code review Co-Authored-By: fauxpark Co-authored-by: fauxpark --- docs/faq_build.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 618ae40f3b16..70a16afea4d4 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -119,24 +119,29 @@ The solution is to remove and reinstall all affected modules. ``` brew rm avr-gcc +brew rm avr-gcc@8 brew rm dfu-programmer brew rm dfu-util brew rm gcc-arm-none-eabi +brew rm arm-gcc-bin@8 brew rm avrdude -brew install avr-gcc +brew install avr-gcc@8 brew install dfu-programmer brew install dfu-util -brew install gcc-arm-none-eabi +brew install arm-gcc-bin@8 brew install avrdude +brew link --force avr-gcc@8 +brew link --force arm-gcc-bin@8 + ``` -### avr-gcc 8.1 and LUFA +### `avr-gcc` and LUFA -If you updated your avr-gcc to above 7 you may see errors involving LUFA. For example: +If you updated your `avr-gcc` and you see errors involving LUFA, for example: `lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` -For now, you need to rollback avr-gcc to 7 in brew. +For now, you need to rollback `avr-gcc` to 8 in Homebrew. ``` brew uninstall --force avr-gcc From 7ba6456c0b2e041bb9f97dbed265c5b8b4b12192 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 31 Dec 2019 08:33:49 -0800 Subject: [PATCH 113/973] Use White channel on RGBW LEDs (#7678) * Use White channel on RGBW LEDs Co-authored-by: kwerdenker * Manually apply white channel to array * Move where convert_rgb_to_rgbw is called * Fix type for rgbw led struct * Add changes to Ergodox EZ can revert if deemed necessary * Revert "Add changes to Ergodox EZ" This reverts commit aa44db198d40d758ca10470eb94615513592d1dd. * Revert "Fix type for rgbw led struct" This reverts commit c5c744cba040201cc0d124400773cf13f8a2cf22. * Revert "Move where convert_rgb_to_rgbw is called" This reverts commit cd7f17caf6dd30731c54b3be54490fe4519444f9. * Revert changes and fix up functions * Enable white channel for Ergodox EZ as well * Only run conversion of rgblight is enabled Co-authored-by: kwerdenker --- keyboards/ergodox_ez/led_i2c.c | 8 +++++++- quantum/color.c | 14 ++++++++++++++ quantum/color.h | 4 +++- quantum/rgb_matrix_drivers.c | 2 +- quantum/rgblight.c | 9 ++++++++- 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox_ez/led_i2c.c b/keyboards/ergodox_ez/led_i2c.c index 3e75a8cd08ba..4a7a02f468aa 100644 --- a/keyboards/ergodox_ez/led_i2c.c +++ b/keyboards/ergodox_ez/led_i2c.c @@ -51,7 +51,13 @@ void rgblight_set(void) { #endif } } - +#ifdef RGBW + else { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + convert_rgb_to_rgbw(&led[i]); + } + } +#endif uint8_t led_num = RGBLED_NUM; i2c_init(); diff --git a/quantum/color.c b/quantum/color.c index 1f398e240389..8bd52444faa4 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -85,3 +85,17 @@ RGB hsv_to_rgb(HSV hsv) { return rgb; } + +#ifdef RGBW +#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 + led->w = MIN(led->r, MIN(led->g, led->b)); + led->r -= led->w; + led->g -= led->w; + led->b -= led->w; +} +#endif diff --git a/quantum/color.h b/quantum/color.h index 678164662863..58d4f0407fab 100644 --- a/quantum/color.h +++ b/quantum/color.h @@ -64,5 +64,7 @@ typedef struct PACKED { #endif RGB hsv_to_rgb(HSV hsv); - +#ifdef RGBW +void convert_rgb_to_rgbw(LED_TYPE *led); +#endif #endif // COLOR_H diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 9729a3064e33..ea41b0d3962f 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -113,7 +113,7 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { led[i].g = g; led[i].b = b; # ifdef RGBW - led[i].w = 0; + convert_rgb_to_rgbw(led[i]); # endif } diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 7949bb688eda..141dc2e7bce1 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -611,6 +611,7 @@ void rgblight_set(void) { # endif } } + # ifdef RGBLIGHT_LED_MAP LED_TYPE led0[RGBLED_NUM]; for (uint8_t i = 0; i < RGBLED_NUM; i++) { @@ -620,7 +621,13 @@ void rgblight_set(void) { # else start_led = led + clipping_start_pos; # endif - ws2812_setleds(start_led, num_leds); + +#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 From 680ebef0869b7860017a80bd601faac61227cd28 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 31 Dec 2019 17:26:40 +0000 Subject: [PATCH 114/973] SPI DMA based RGB Underglow for STM32 (#7674) * Initial stash of ws2812 spi driver * Update comment, add sync backup plan * Add testing notes to spi ws2812 driver * Align RGBW error messages --- docs/ws2812_driver.md | 29 ++++++++++++- drivers/arm/ws2812_spi.c | 91 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 118 insertions(+), 2 deletions(-) diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index 67481c458db6..80b6948586ef 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -14,7 +14,7 @@ These LEDs are called "addressable" because instead of using a wire per color, e |----------|--------------------|--------------------| | bit bang | :heavy_check_mark: | :heavy_check_mark: | | I2C | :heavy_check_mark: | | -| SPI | | Soon™ | +| SPI | | :heavy_check_mark: | | PWM | | Soon™ | ## Driver configuration @@ -40,3 +40,30 @@ Configure the hardware via your config.h: #define WS2812_ADDRESS 0xb0 // default: 0xb0 #define WS2812_TIMEOUT 100 // default: 100 ``` + +### SPI +Targeting STM32 boards where WS2812 support is offloaded to an SPI hardware device. The advantage is that the use of DMA offloads processing of the WS2812 protocol from the MCU. `RGB_DI_PIN` for this driver is the configured SPI MOSI pin. Due to the nature of repurposing SPI to drive the LEDs, the other SPI pins, MISO and SCK, **must** remain unused. To configure it, add this to your rules.mk: + +```make +WS2812_DRIVER = spi +``` + +Configure the hardware via your config.h: +```c +#define WS2812_SPI SPID1 // default: SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 5 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5 +``` + +You must also turn on the SPI feature in your halconf.h and mcuconf.h + +#### Testing Notes + +While not an exhaustive list, the following table provides the scenarios that have been partially validated: + +| | SPI1 | SPI2 | SPI3 | +|-|-|-|-| +| f072 | ? | B15 :heavy_check_mark: | N/A | +| f103 | A7 :heavy_check_mark: | B15 :heavy_check_mark: | N/A | +| f303 | A7 :heavy_check_mark: B5 :heavy_check_mark: | B15 :heavy_check_mark: | B5 :heavy_check_mark: | + +*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.* \ No newline at end of file diff --git a/drivers/arm/ws2812_spi.c b/drivers/arm/ws2812_spi.c index 2094e50098af..0e954ec5069c 100644 --- a/drivers/arm/ws2812_spi.c +++ b/drivers/arm/ws2812_spi.c @@ -1 +1,90 @@ -#error("NOT SUPPORTED") \ No newline at end of file +#include "quantum.h" +#include "ws2812.h" + +/* Adapted from https://github.com/gamazeps/ws2812b-chibios-SPIDMA/ */ + +#ifdef RGBW +# error "RGBW not supported" +#endif + +// Define the spi your LEDs are plugged to here +#ifndef WS2812_SPI +# define WS2812_SPI SPID1 +#endif + +#ifndef WS2812_SPI_MOSI_PAL_MODE +# define WS2812_SPI_MOSI_PAL_MODE 5 +#endif + +#define BYTES_FOR_LED_BYTE 4 +#define NB_COLORS 3 +#define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * NB_COLORS) +#define DATA_SIZE (BYTES_FOR_LED * RGBLED_NUM) +#define RESET_SIZE 200 +#define PREAMBLE_SIZE 4 + +static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE] = {0}; + +/* + * As the trick here is to use the SPI to send a huge pattern of 0 and 1 to + * the ws2812b protocol, we use this helper function to translate bytes into + * 0s and 1s for the LED (with the appropriate timing). + */ +static uint8_t get_protocol_eq(uint8_t data, int pos) { + uint8_t eq = 0; + if (data & (1 << (2 * (3 - pos)))) + eq = 0b1110; + else + eq = 0b1000; + if (data & (2 << (2 * (3 - pos)))) + eq += 0b11100000; + else + eq += 0b10000000; + return eq; +} + +static void set_led_color_rgb(LED_TYPE color, int pos) { + uint8_t* tx_start = &txbuf[PREAMBLE_SIZE]; + + for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.g, j); + for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.r, j); + for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j); +} + +void ws2812_init(void) { +#if defined(USE_GPIOV1) + palSetLineMode(RGB_DI_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL); +#else + palSetLineMode(RGB_DI_PIN, PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL); +#endif + + // TODO: more dynamic baudrate + static const SPIConfig spicfg = { + NULL, PAL_PORT(RGB_DI_PIN), PAL_PAD(RGB_DI_PIN), + SPI_CR1_BR_1 | SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us (2.25 MHz) + }; + + spiAcquireBus(&WS2812_SPI); /* Acquire ownership of the bus. */ + spiStart(&WS2812_SPI, &spicfg); /* Setup transfer parameters. */ + spiSelect(&WS2812_SPI); /* Slave Select assertion. */ +} + +void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) { + static bool s_init = false; + if (!s_init) { + ws2812_init(); + s_init = true; + } + + for (uint8_t i = 0; i < leds; i++) { + set_led_color_rgb(ledarray[i], i); + } + + // Send async - each led takes ~0.03ms, 50 leds ~1.5ms, animations flushing faster than send will cause issues. + // Instead spiSend can be used to send synchronously (or the thread logic can be added back). +#ifdef WS2812_SPI_SYNC + spiSend(&WS2812_SPI, sizeof(txbuf) / sizeof(txbuf[0]), txbuf); +#else + spiStartSend(&WS2812_SPI, sizeof(txbuf) / sizeof(txbuf[0]), txbuf); +#endif +} From 59b017381c96ce5fd200d4db590accf8cbea9313 Mon Sep 17 00:00:00 2001 From: shikamiya <46595896+shikamiya@users.noreply.github.com> Date: Wed, 1 Jan 2020 19:07:54 +0900 Subject: [PATCH 115/973] Add creation of new keyboard in child directory (#6018) * Add creation of new chlid keyboard * Add creation of new keyboard's parent directories * Remove redundant message and if statement * Divide creating new keyboard directory from copying template files * Fix variables of year placeholder * Fix filename of keyboard.[ch] --- util/new_keyboard.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh index 11c6497e23c6..1f08790ad427 100755 --- a/util/new_keyboard.sh +++ b/util/new_keyboard.sh @@ -32,8 +32,10 @@ set_git_username() { # Copy the template files to the new keyboard directory. copy_templates() { + mkdir -p "$keyboard_dir" + echo -n "Copying base template files..." - cp -r "quantum/template/base" "${keyboard_dir}" + cp -r "quantum/template/base/." "${keyboard_dir}" echo " done" echo -n "Copying $keyboard_type template files..." @@ -41,8 +43,8 @@ copy_templates() { echo " done" echo -n "Renaming keyboard files..." - mv "${keyboard_dir}/keyboard.c" "${keyboard_dir}/${keyboard_name}.c" - mv "${keyboard_dir}/keyboard.h" "${keyboard_dir}/${keyboard_name}.h" + mv "${keyboard_dir}/keyboard.c" "${keyboard_dir}/${keyboard_base_name}.c" + mv "${keyboard_dir}/keyboard.h" "${keyboard_dir}/${keyboard_base_name}.h" echo " done" } @@ -74,8 +76,8 @@ replace_placeholders() { replace_year_placeholders() { local replace_year_filenames=( "${keyboard_dir}/config.h" - "${keyboard_dir}/${keyboard_name}.c" - "${keyboard_dir}/${keyboard_name}.h" + "${keyboard_dir}/${keyboard_base_name}.c" + "${keyboard_dir}/${keyboard_base_name}.h" "${keyboard_dir}/keymaps/default/config.h" "${keyboard_dir}/keymaps/default/keymap.c" ) @@ -88,10 +90,10 @@ replace_keyboard_placeholders() { "${keyboard_dir}/config.h" "${keyboard_dir}/info.json" "${keyboard_dir}/readme.md" - "${keyboard_dir}/${keyboard_name}.c" + "${keyboard_dir}/${keyboard_base_name}.c" "${keyboard_dir}/keymaps/default/readme.md" ) - replace_placeholders "%KEYBOARD%" "$keyboard_name" "${replace_keyboard_filenames[@]}" + replace_placeholders "%KEYBOARD%" "$keyboard_base_name" "${replace_keyboard_filenames[@]}" } # Replace %YOUR_NAME% with the username. @@ -100,8 +102,8 @@ replace_name_placeholders() { "${keyboard_dir}/config.h" "${keyboard_dir}/info.json" "${keyboard_dir}/readme.md" - "${keyboard_dir}/${keyboard_name}.c" - "${keyboard_dir}/${keyboard_name}.h" + "${keyboard_dir}/${keyboard_base_name}.c" + "${keyboard_dir}/${keyboard_base_name}.h" "${keyboard_dir}/keymaps/default/config.h" "${keyboard_dir}/keymaps/default/keymap.c" ) @@ -136,6 +138,7 @@ echo while [ -z "$keyboard_name" ]; do prompt "Keyboard Name" "" keyboard_name=$prompt_return + keyboard_base_name=$(basename $keyboard_name) done keyboard_dir="keyboards/$keyboard_name" From c4061f003ccba195cb19b4c51db61a1f65f29039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20K=C4=B1l=C4=B1=C3=A7da=C4=9F=C4=B1?= Date: Wed, 1 Jan 2020 20:44:22 +0300 Subject: [PATCH 116/973] [Keyboard] Aranck handwired keyboard to support community MIT layouts, also minor optimisations done (#7737) * Aranck now supports community MIT layouts, also minor optimisations done * Update keyboards/handwired/aranck/keymaps/turkishish/readme.md * Update keyboards/handwired/aranck/readme.md --- keyboards/handwired/aranck/aranck.h | 2 +- keyboards/handwired/aranck/config.h | 2 +- keyboards/handwired/aranck/info.json | 2 +- .../handwired/aranck/keymaps/default/config.h | 22 ----------- .../handwired/aranck/keymaps/default/keymap.c | 38 +++++++------------ .../aranck/keymaps/turkishish/config.h | 4 +- .../aranck/keymaps/turkishish/keymap.c | 37 ++++++++---------- .../aranck/keymaps/turkishish/readme.md | 6 +++ keyboards/handwired/aranck/readme.md | 12 ++---- keyboards/handwired/aranck/rules.mk | 14 ++++--- 10 files changed, 54 insertions(+), 85 deletions(-) delete mode 100644 keyboards/handwired/aranck/keymaps/default/config.h diff --git a/keyboards/handwired/aranck/aranck.h b/keyboards/handwired/aranck/aranck.h index de7639fd03be..df887c2c56ca 100644 --- a/keyboards/handwired/aranck/aranck.h +++ b/keyboards/handwired/aranck/aranck.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_aranck_mit(\ +#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, \ diff --git a/keyboards/handwired/aranck/config.h b/keyboards/handwired/aranck/config.h index 5212409c8dd9..0de56cc3b6fe 100644 --- a/keyboards/handwired/aranck/config.h +++ b/keyboards/handwired/aranck/config.h @@ -24,7 +24,7 @@ along with this program. If not, see . #define PRODUCT_ID 0x0000 #define DEVICE_VER 0x0001 #define MANUFACTURER Ardakilic -#define PRODUCT ARANCK +#define PRODUCT Aranck #define DESCRIPTION A handwired 40% ortholinear keyboard /* key matrix size */ diff --git a/keyboards/handwired/aranck/info.json b/keyboards/handwired/aranck/info.json index 450d89634a1b..5e138508d580 100644 --- a/keyboards/handwired/aranck/info.json +++ b/keyboards/handwired/aranck/info.json @@ -6,7 +6,7 @@ "width": 12, "height": 4, "layouts": { - "LAYOUT_aranck_mit": { + "LAYOUT_planck_mit": { "key_count": 47, "layout": [ { "x": 0, "y": 0 }, diff --git a/keyboards/handwired/aranck/keymaps/default/config.h b/keyboards/handwired/aranck/keymaps/default/config.h deleted file mode 100644 index cf888b0adc3d..000000000000 --- a/keyboards/handwired/aranck/keymaps/default/config.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright 2019 Arda Kilicdagi - * - * 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 RETRO_TAPPING -// #define PERMISSIVE_HOLD \ No newline at end of file diff --git a/keyboards/handwired/aranck/keymaps/default/keymap.c b/keyboards/handwired/aranck/keymaps/default/keymap.c index 2765c7afbfaa..206d23b6afd7 100644 --- a/keyboards/handwired/aranck/keymaps/default/keymap.c +++ b/keyboards/handwired/aranck/keymaps/default/keymap.c @@ -42,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | PWR | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_aranck_mit( +[_QWERTY] = LAYOUT_planck_mit( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, LT(_SODA, KC_POWER), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), LT(_SPACE, KC_SPC), MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_aranck_mit( +[_LOWER] = LAYOUT_planck_mit( 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_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_HOME, KC_END, _______, @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_aranck_mit( +[_RAISE] = LAYOUT_planck_mit( 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_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_PGUP, KC_PGDN, _______, @@ -89,18 +89,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Soda Layer * Keys that I mostly use when while chilling or taking a break :) * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | | | | | | | | | Up | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | Mute | + * | | | | | | | | Left | Down |Right | | Mute | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | Next | Vol- | Vol+ | Play | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | |Brght▼|Brght▲| * `-----------------------------------------------------------------------------------' */ -[_SODA] = LAYOUT_aranck_mit( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, +[_SODA] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU ), @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | |Brght▼|Brght▲| * `-----------------------------------------------------------------------------------' */ -[_SPACE] = LAYOUT_aranck_mit( +[_SPACE] = LAYOUT_planck_mit( _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, @@ -129,15 +129,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | Enter| 4 | 5 | 6 | + | * | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 1 | 2 | 3 | + | / | + * | | | | | | | Enter| 1 | 2 | 3 | + | / | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | 0 | 0 | . | , | = | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = LAYOUT_aranck_mit( +[_NUMPAD] = LAYOUT_planck_mit( _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, - _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL ), @@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_aranck_mit( +[_ADJUST] = LAYOUT_planck_mit( _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, @@ -166,13 +166,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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) { -// return true; -//} - -void matrix_init_user(void) {} - -void matrix_scan_user(void) {} - -void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/aranck/keymaps/turkishish/config.h b/keyboards/handwired/aranck/keymaps/turkishish/config.h index 3e40ef4f6de9..0810a3b23f0a 100644 --- a/keyboards/handwired/aranck/keymaps/turkishish/config.h +++ b/keyboards/handwired/aranck/keymaps/turkishish/config.h @@ -19,4 +19,6 @@ // place overrides here #define RETRO_TAPPING -#define PERMISSIVE_HOLD \ No newline at end of file +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD \ No newline at end of file diff --git a/keyboards/handwired/aranck/keymaps/turkishish/keymap.c b/keyboards/handwired/aranck/keymaps/turkishish/keymap.c index 195b8aaad053..4e7ef57b713c 100644 --- a/keyboards/handwired/aranck/keymaps/turkishish/keymap.c +++ b/keyboards/handwired/aranck/keymaps/turkishish/keymap.c @@ -43,6 +43,7 @@ enum aranck_layers { #define VERTICAL_PIPE RALT(KC_EQL) #define BACKTICK RALT(KC_BSLS) #define TILDE RALT(KC_RBRC) +#define NUMBER_SIGN RALT(KC_3) #define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX /* @@ -93,10 +94,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Sda|<>| Ctrl | Alt | OS |Lowr|,| Space* |Rise|"| Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_aranck_mit( +[_QWERTY] = LAYOUT_planck_mit( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT /*KC_ENT*/, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, LT(_SODA, KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_BSLS), LT(_SPACE, KC_SPC), LT(_RAISE, KC_NONUS_BSLASH), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -106,15 +107,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | ? | _ | Ğ | Ü | - | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | "$" | "{" | "}" | , | ">" | + * | | F7 | F8 | F9 | F10 | F11 | F12 | "$" | "{" | "}" | < | ">" | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | "[" | "]" | ' | " | + * | | | | | | | | "[" | "]" | ' | " | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_aranck_mit( +[_LOWER] = LAYOUT_planck_mit( 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_EQL, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DOLLAR_SIGN, CURLY_OPEN, CURLY_CLOSE, KC_BSLS, LSFT(KC_GRV), + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DOLLAR_SIGN, CURLY_OPEN, CURLY_CLOSE, KC_GRV, LSFT(KC_GRV), _______, _______, _______, _______, _______, _______, _______, SQUARE_OPEN, SQUARE_CLOSE, LSFT(KC_2), KC_NONUS_BSLASH ), @@ -125,15 +126,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | * | - | "\" | "|" | , | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | , | " | "~" | "`" | <>| | + * | | F7 | F8 | F9 | F10 | F11 | F12 | # | " | "~" | "`" | <>| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_aranck_mit( +[_RAISE] = LAYOUT_planck_mit( 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, BACKSLASH, VERTICAL_PIPE, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, TILDE, BACKTICK, KC_GRV, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMBER_SIGN, KC_NUBS, TILDE, BACKTICK, KC_GRV, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -148,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | |Brght▼|Brght▲| * `-----------------------------------------------------------------------------------' */ -[_SODA] = LAYOUT_aranck_mit( +[_SODA] = LAYOUT_planck_mit( _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, @@ -166,7 +167,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | |Brght▼|Brght▲| * `-----------------------------------------------------------------------------------' */ -[_SPACE] = LAYOUT_aranck_mit( +[_SPACE] = LAYOUT_planck_mit( _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, @@ -181,15 +182,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | Enter| 4 | 5 | 6 | + | * | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 1 | 2 | 3 | + | / | + * | | | | | | | Enter| 1 | 2 | 3 | + | / | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | 0 | 0 | . | , | = | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = LAYOUT_aranck_mit( +[_NUMPAD] = LAYOUT_planck_mit( _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, - _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PSLS, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_SLSH, KC_PDOT, KC_PEQL ), @@ -204,7 +205,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_aranck_mit( +[_ADJUST] = LAYOUT_planck_mit( _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, @@ -217,9 +218,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - -void matrix_init_user(void) {} - -void matrix_scan_user(void) {} - -void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/handwired/aranck/keymaps/turkishish/readme.md b/keyboards/handwired/aranck/keymaps/turkishish/readme.md index 8998081c1f2b..3ff12ca0e7fe 100644 --- a/keyboards/handwired/aranck/keymaps/turkishish/readme.md +++ b/keyboards/handwired/aranck/keymaps/turkishish/readme.md @@ -1 +1,7 @@ # The Turkishish keymap for Aranck + +This layout is optimized for my use cases with Turkish OS layout. + +You can flash the "turkishish" layout like: + + make handwired/aranck:turkishish:flash diff --git a/keyboards/handwired/aranck/readme.md b/keyboards/handwired/aranck/readme.md index 67089b49974c..437d0b44db46 100644 --- a/keyboards/handwired/aranck/readme.md +++ b/keyboards/handwired/aranck/readme.md @@ -8,15 +8,11 @@ A handwired 40% ortholinear keyboard. The story: https://imgur.com/a/4QI7ifJ -Keyboard Maintainer: [Arda Kilicdagi](https://github.com/ardakilic) -Hardware Supported: Pro Micro +* Keyboard Maintainer: [Arda Kilicdagi](https://github.com/ardakilic) +* Hardware Supported: Pro Micro Make example for this keyboard (after setting up your build environment): - make handwired/aranck:default:flash + make handwired/aranck:default -You can flash the "turkishish" layout (which I'm currently using) like: - - make handwired/aranck:turkishish: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 +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/aranck/rules.mk b/keyboards/handwired/aranck/rules.mk index b95b98a4c72d..a6809de9d46a 100644 --- a/keyboards/handwired/aranck/rules.mk +++ b/keyboards/handwired/aranck/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,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 = yes # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = planck_mit \ No newline at end of file From 91013d452f97f791961dc3541fb2e1ac05aaa6fa Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Thu, 2 Jan 2020 11:06:55 +0900 Subject: [PATCH 117/973] [Docs] add japanese translation (faq part) (#7464) * add faq part * add faq part * add faq part * add faq part * add faq part * update for link * update for a punctuation * update files based on comments * restore removed git diff header * correct pathname on git diff header * update files based on comments * update files based on comments * update files based on comments * update files based on comments * update file based on comment * update file based on comment * update file based on comment Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Co-Authored-By: shela Co-Authored-By: satt99 <39004890+satt99@users.noreply.github.com> --- docs/ja/driver_installation_zadig.md | 53 +++++++++ docs/ja/faq.md | 11 ++ docs/ja/faq_build.md | 156 ++++++++++++++++++++++++++ docs/ja/faq_debug.md | 161 +++++++++++++++++++++++++++ docs/ja/faq_general.md | 20 ++++ docs/ja/faq_keymap.md | 149 +++++++++++++++++++++++++ 6 files changed, 550 insertions(+) create mode 100644 docs/ja/driver_installation_zadig.md create mode 100644 docs/ja/faq.md create mode 100644 docs/ja/faq_build.md create mode 100644 docs/ja/faq_debug.md create mode 100644 docs/ja/faq_general.md create mode 100644 docs/ja/faq_keymap.md diff --git a/docs/ja/driver_installation_zadig.md b/docs/ja/driver_installation_zadig.md new file mode 100644 index 000000000000..53fff992b82d --- /dev/null +++ b/docs/ja/driver_installation_zadig.md @@ -0,0 +1,53 @@ +# Zadig を使ったブートローダドライバのインストール + + + +QMK はホストにたいして通常の HID キーボードデバイスとして振る舞うため特別なドライバは必要ありません。しかし、Windows でのキーボードへの書き込みは、多くの場合、キーボードをリセットした時に現れるブートローダデバイスで*行います*。 + +2つの注目すべき例外があります: 通常 Pro Micro で見られる Caterina ブートローダや、PJRC Teensy に書き込まれている HalfKay ブートローダは、それぞれシリアルポートと汎用 HID デバイスとして振る舞うため、ドライバは必要ありません。 + +[Zadig](https://zadig.akeo.ie/) ユーティリティを使うことをお勧めします。MSYS2 あるいは WSL を使って開発環境をセットアップした場合、`qmk_install.sh` スクリプトはドライバをインストールするかどうかをたずねます。 + +## インストール + +`RESET` キーコード (別のレイヤにあるかもしれません)を押すか、通常はキーボードの下面にあるリセットスイッチを押して、キーボードをブートローダモードにします。どちらもキーボードに無い場合は、Escape または Space+`B` を押しながら接続してみてください (詳細は、[ブートマジック](ja/feature_bootmagic.md) ドキュメントを見てください)。一部のキーボードはブートマジックの代わりに[コマンド](ja/feature_command.md)を使います。この場合、キーボードが接続されている状態で「左Shift + 右Shift + `B`」あるいは「左Shift + 右Shift + Escape」を押すと、ブートローダモードに入ることができます。 +一部のキーボードはブートローダに入るために特定の操作をする必要があります。例えば、[ブートマジック Lite](ja/feature_bootmagic.md#bootmagic-lite) キー (デフォルト: Escape) は別のキー(例えば、左Control)かもしれません。また、コマンドを有効にするキーの組み合わせ (デフォルト: 左Shift + 右Shift) は何か他のキー(例えば 左Control + 右Control)を押し続ける必要がある場合があります。不明な場合は、キーボードの README ファイルを参照してください。 + +USBaspLoader を使ってデバイスをブートローダモードにするには、`BOOT` ボタンを押しながら `RESET` ボタンをタップしてください。 +あるいは `BOOT` を押し続けながら USB ケーブルを挿入します。 + +Zadig は自動的にブートローダデバイスを検知します。**Options → List All Devices** を確認する必要がある場合があります。 + +- Atmel AVR MCU を搭載したキーボードの場合、ブートローダは `ATm32U4DFU` に似た名前が付けられ、ベンダー ID は `03EB` です。 +- USBasp ブートローダは `USBasp` として表示され、VID/PID は`16C0:05DC` です。 +- QMK-DFU ブートローダを使って書き込まれた AVR キーボードは ` Bootloader` という名前が付けられ、VID は `03EB` です。 +- ほとんどの ARM キーボードでは、`STM32 BOOTLOADER` と呼ばれ、VID/PID は `0483:DF11` です。 + +!> Zadig が `HidUsb` ドライバを使用する1つ以上のデバイスを表示する場合、キーボードはおそらくブートローダモードではありません。矢印はオレンジ色になり、システムドライバの変更を確認するように求められます。この場合、続行**しないでください**! + +矢印が緑色で表示されたら、ドライバを選択し、**Install Driver** をクリックします。`libusb-win32` ドライバは通常 AVR で動作し、`WinUSB`は ARM で動作しますが、それでもキーボードに書き込みできない場合は、リストから異なるドライバをインストールしてみてください。msys2 を使ってコマンドライン経由で USBaspLoader デバイスに書き込むには、`libusbk` ドライバがお勧めです。そうではなく書き込みに QMK Toolbox を使っている場合は `libusb-win32` がうまく動作します。 + +![ブートローダドライバが正常にインストールされた Zadig](https://i.imgur.com/b8VgXzx.png) + +最後に、新しいドライバがロードされたことを確認するためにキーボードのプラグを抜いて再接続します。書き込みに QMK Toolbox を使う場合は、ドライバの変更を認識しない場合があるため、QMK Toolkit を終了して再起動します。 + +## 間違ったデバイスのインストールからの回復 + +キーボードが入力できなくなった場合は、ブートローダではなくキーボード自体のドライバを間違って入れ替えた可能性があります。これはキーボードがブートローダモードでない場合に起こりえます。これは Zadig で簡単に確認することができます - 健全なキーボードには、全てのインタフェースに `HidUsb` ドライバがインストールされています: + +![Zadig から見た健全なキーボード](https://i.imgur.com/Hx0E5kC.png) + +デバイスマネージャーを開き、キーボードと思われるデバイスを探します。 + +![デバイスマネージャーにおける、間違ったドライバがインストールされたキーボード](https://i.imgur.com/L3wvX8f.png) + +右クリックし、**デバイスのアンインストール** をクリックします。最初に **このデバイスのドライバーソフトウェアを削除します** にチェックが付いていることを確認してください。 + +!["ドライバの削除"にチェックボックスにチェックが付いた、デバイスのアンインストールダイアログ](https://i.imgur.com/aEs2RuA.png) + +**Action → Scan for hardware changes** をクリックします。この時点で、再び入力できるようになっているはずです。Zadig でキーボードデバイスが `HidUsb` ドライバを使っていることを再確認します。そうであれば完了です。キーボードは再び機能するはずです! + +?> Windows が新しいドライバを使えるようにするために、この時点でコンピュータを完全に再起動する必要があるかもしれません。 diff --git a/docs/ja/faq.md b/docs/ja/faq.md new file mode 100644 index 000000000000..a3a42d55a332 --- /dev/null +++ b/docs/ja/faq.md @@ -0,0 +1,11 @@ +# よくある質問 + + + +* [一般](ja/faq_general.md) +* [QMK のビルドあるいはコンパイル](ja/faq_build.md) +* [QMK のデバッグとトラブルシューティング](ja/faq_debug.md) +* [キーマップ](ja/faq_keymap.md) diff --git a/docs/ja/faq_build.md b/docs/ja/faq_build.md new file mode 100644 index 000000000000..73c597307a03 --- /dev/null +++ b/docs/ja/faq_build.md @@ -0,0 +1,156 @@ +# よくあるビルドの質問 + + + +このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。 + +## Linux でプログラムできません +デバイスを操作するには適切な権限が必要です。Linux ユーザの場合は、以下の `udev` ルールに関する指示を見てください。`udev` に問題がある場合は、回避策は `sudo` コマンドを使うことです。このコマンドに慣れていない場合は、`man sudo` コマンドでマニュアルを確認するか、[この web ページを見てください](https://linux.die.net/man/8/sudo)。 + +コントローラが ATMega32u4 の場合の `sudo` の使い方の例: + + $ sudo dfu-programmer atmega32u4 erase --force + $ sudo dfu-programmer atmega32u4 flash your.hex + $ sudo dfu-programmer atmega32u4 reset + +あるいは、単純に: + + $ sudo make ::dfu + +`make` を `sudo` で実行することは一般的には良い考えでは***なく***、可能であれば前者の方法のいずれかを使うべきです。 + +### Linux の `udev` ルール +Linux では、MCU にアクセスするには適切な権限が必要です。ファームウェアを書き込む時に `sudo` を使うか、`/etc/udev/rules.d/` にこれらのファイルを配置することで、アクセスすることができます。権限の追加が完了したら、以下を実行します: +```console +sudo udevadm control --reload-rules +sudo udevadm trigger +``` + +**/etc/udev/rules.d/50-atmel-dfu.rules:** +``` +# Atmel ATMega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666" +# Atmel USBKEY AT90USB1287 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666" +# Atmel ATMega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666" +``` + +**/etc/udev/rules.d/52-tmk-keyboard.rules:** +``` +# tmk keyboard products https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` +**/etc/udev/rules.d/54-input-club-keyboard.rules:** + +``` +# Input Club keyboard bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" +``` + +**/etc/udev/rules.d/55-caterina.rules:** +``` +# ModemManager should ignore the following devices +ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1" +``` + +**注意:** ModemManager フィルタリングは厳格モードでは無い場合のみ動作します。以下のコマンドでその設定を変更することができます: +```console +sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service +sudo systemctl daemon-reload +sudo systemctl restart ModemManager +``` + +**/etc/udev/rules.d/56-dfu-util.rules:** +``` +# stm32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666" +# Generic stm32 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666" +``` + +**/etc/udev/rules.d/57-bootloadhid.rules:** +``` +# bootloadHID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE:="0666" +``` + +### Linux のブートローダモードで Serial デバイスが検知されない +カーネルがデバイスを適切にサポートしていることを確認してください。デバイスが、Pro Micro (Atmega32u4) のように USB ACM を使う場合、`CONFIG_USB_ACM=y` を含めるようにしてください。他のデバイスは `USB_SERIAL` およびそのサブオプションを必要とするかもしれません。 + +## DFU ブートローダの不明なデバイス + +Windows 上でキーボードを書き込む時に発生する問題は、ブートローダ用に間違ったドライバがインストールされているか、全くインストールされていないかによるものがほとんどです。 + +QMK インストールスクリプト (MSYS2 あるいは WSL 内の `qmk_firmware` ディレクトリから `./util/qmk_install.sh`) を再実行するか、QMK Toolbox の再インストールでこの問題が解決するかもしれません。別のやり方として、手動で [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) パッケージをダウンロードして実行することができます。 + +それでもうまく行かない場合は、Zadig をダウンロードして実行する必要があります。詳細な情報は [Zadig を使ったブートローダドライバのインストール](ja/driver_installation_zadig.md)を見てください。 + +## USB VID と PID +`config.h` を編集することで任意の ID を使うことができます。おそらく未使用の ID を使っても、他の製品と衝突するとても低い可能性があることを除いて、実際には問題はありません。 + +QMK のほとんどのキーボードは、vendor ID として、`0xFEED` を使います。他のキーボードを調べて、ユニークな ID を選択してください。 + +またこれも見てください。 +https://github.com/tmk/tmk_keyboard/issues/150 + +ここで本当にユニークな VID:PID を買うことができます。個人的な使用にはこれは必要ないと思います。 +- http://www.obdev.at/products/vusb/license.html +- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 + +## AVR のための BOOTLOADER_SIZE +Teensy2.0++ ブートローダのサイズは 2048 バイトであることに注意してください。一部の Makefile には間違ったコメントがあります。 + +``` +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 2048 +# Atmel DFU loader 4096 (TMK Alt Controller) +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 +``` + +## MacOS での `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` +これは brew での更新に関する問題で、avr-gcc が依存するシンボリックリンクを壊します。 + +解決法は全ての影響を受けたモジュールを削除し再インストールすることです。 + +``` +brew rm avr-gcc +brew rm dfu-programmer +brew rm dfu-util +brew rm gcc-arm-none-eabi +brew rm avrdude +brew install avr-gcc +brew install dfu-programmer +brew install dfu-util +brew install gcc-arm-none-eabi +brew install avrdude +``` + +### avr-gcc 8.1 と LUFA + +avr-gcc を 7 より上に更新した場合、LUFA に関連するエラーが表示されるかもしれません。例えば: + +`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` + +今のところ、brew で avr-gcc を 7 にロールバックする必要があります。 + +``` +brew uninstall --force avr-gcc +brew install avr-gcc@8 +brew link --force avr-gcc@8 +``` + +### キーボードに書き込んだが何も起こらない、あるいはキーの押下が登録されない - ARM (rev6 planck、clueboard 60、hs60v2 など) でも同じ (Feb 2019) +ARM ベースのチップ上での EEPROM の動作によって、保存された設定が無効になる場合があります。これはデフォルトレイヤに影響し、まだ調査中の特定の環境下でキーボードが使えなくなる*しれません*。EEPROM のリセットでこれが修正されます。 + +[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) を使って eeprom のリセットを強制することができます。このイメージを書き込んだ後で、通常のファームウェアを書き込むと、キーボードが_通常_ の動作順序に復元されます。 +[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin) + +いずれかの形式でブートマジックが有効になっている場合は、これも実行できるはずです (実行方法の詳細については、[ブートマジックドキュメント](feature_bootmagic.md)とキーボード情報を見てください)。 diff --git a/docs/ja/faq_debug.md b/docs/ja/faq_debug.md new file mode 100644 index 000000000000..a9c7e3df0696 --- /dev/null +++ b/docs/ja/faq_debug.md @@ -0,0 +1,161 @@ +# デバッグの FAQ + + + +このページは、キーボードのトラブルシューティングについての様々な一般的な質問を説明します。 + +# デバッグコンソール + +## `hid_listen` がデバイスを認識できない +デバイスのデバッグコンソールの準備ができていない場合、以下のように表示されます: + +``` +Waiting for device:......... +``` + +デバイスが接続されると、*hid_listen* がデバイスを見つけ、以下のメッセージが表示されます: + +``` +Waiting for new device:......................... +Listening: +``` + +この 'Listening:' のメッセージが表示されない場合は、[Makefile] を `CONSOLE_ENABLE=yes` に設定してビルドしてみてください + +Linux のような OS でデバイスにアクセスするには、権限が必要かもしれません。 +- `sudo hid_listen` を試してください + +## コンソールにメッセージが表示されない +以下を調べてください: +- *hid_listen* がデバイスを検出する。上記を見てください。 +- **Magic**+d を使ってデバッグを有効にする。[マジックコマンド](https://github.com/tmk/tmk_keyboard#magic-commands)を見てください。 +- `debug_enable=true` を設定します。[テストとデバッグ](ja/newbs_testing_debugging.md#debugging)を見てください +- デバッグ print の代わりに 'print' 関数を使ってみてください。**common/print.h** を見てください。 +- コンソール機能を持つ他のデバイスを切断します。[Issue #97](https://github.com/tmk/tmk_keyboard/issues/97) を見てください。 + +## Linux あるいは UNIX のようなシステムはスーパーユーザ権限を必要とします +権限付きで *hid_listen* を実行するために 'sudo' を使ってください。 +``` +$ sudo hid_listen +``` + +または rules ディレクトリにファイルを置いて、TMK デバイスのための *udev rule* を追加します。ディレクトリは各システムで異なるかもしれません。 + +File: /etc/udev/rules.d/52-tmk-keyboard.rules (Ubuntu の場合) +``` +# tmk keyboard products https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +*** + +# 雑多なこと +## 安全性の考慮 + +あなたはおそらくキーボードを「文鎮化」したくないでしょう。文鎮化するとファームウェアを書き換えられないようになります。リスクがあまりに高い(そしてそうでないかもしれない)ものの一部のリストを示します。 + +- キーボードマップに RESET が含まれない場合、DFU モードに入るには、PCB のリセットボタンを押す必要があります。底部のネジを外す必要があります。 +- tmk_core / common にあるファイルを触るとキーボードが操作不能になるかもしれません。 +- .hex ファイルが大きすぎると問題を引き起こします; `make dfu` コマンドはブロックを削除し、 +サイズを検査し(おっと、間違った順序です!)、エラーを出力し、 +キーボードへの書き込みに失敗し、DFU モードのままになります。 + - この目的のためには、Planck の最大の .hex ファイルサイズは 7000h (10進数で28672)であることに注意してください。 + +``` +Linking: .build/planck_rev4_cbbrowne.elf [OK] +Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK] + +Size after: + text data bss dec hex filename + 0 22396 0 22396 577c planck_rev4_cbbrowne.hex +``` + +- 上のファイルのサイズは 22396/577ch で、28672/7000h より小さいです +- 適切な替わりの .hex ファイルがある限り、それをロードして再試行することができます +- あなたがキーボードの Makefile で指定したかもしれない一部のオプションは、余分なメモリを消費します; BOOTMAGIC_ENABLE、MOUSEKEY_ENABLE、EXTRAKEY_ENABLE、CONSOLE_ENABLE、API_SYSEX_ENABLE に注意してください +- DFU ツールは(オプションの余計なフルーツサラダを投げ込まない限り)ブートローダに書き込むことを許可しないので、 +ここにはリスクはほとんどありません。 +- EEPROM の書き込みサイクルは、約100000です。ファームウェアを繰り返し継続的に書き換えるべきではありません。それは最終的に EEPROM を焼き焦がします。 + +## NKRO が動作しません +最初に、**Makefile** 内でビルドオプション `NKRO_ENABLE` を使ってファームウェアをコンパイルする必要があります。 + +**NKRO** がまだ動作しない場合は、`Magic` **N** コマンド(デフォルトでは `LShift+RShift+N`)を試してみてください。**NKRO** モードと **6KRO** モード間を一時的に切り替えるためにこのコマンドを使うことができます。**NKRO** が機能しない状況、特に BIOS の場合は **6KRO** モードに切り替える必要があります。 + +ファームウェアを `BOOTMAGIC_ENABLE` でビルドした場合、`ブートマジック` **N** コマンドで切り替える必要があります (デフォルトでは `Space+N`)。この設定は EEPROM に格納され、電源を入れ直しても保持されます。 + +https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch + + +## TrackPoint はリセット回路が必要です (PS/2 マウスサポート) +リセット回路が無いとハードウェアの不適切な初期化のために一貫性の無い結果になります。TPM754 の回路図を見てください。 + +- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 +- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf + + +## 16 を超えるマトリックの列を読み込めない +列が 16 を超える場合、[matrix.h] の `read_cols()` 内の `1<<16` の代わりに `1UL<<16` を使ってください。 + +C では、AVR の場合 `1` は [16 bit] である [int] 型の1を意味し、15 を超えて左にシフトすることはできません。`1<<16` すると予期しないゼロが発生します。`1UL` として [unsigned long] 型を使う必要があります。 + +http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 + +## 特別なエクストラキーが動作しない (システム、オーディオコントロールキー) +QMK でそれらを使うには、`rules.mk` 内で `EXTRAKEY_ENABLE` を定義する必要があります。 + +``` +EXTRAKEY_ENABLE = yes # オーディオ制御とシステム制御 +``` + +## スリープから復帰しない + +Windows では、**デバイスマネージャ**の**電源の管理**タブ内の `このデバイスで、コンピュータのスタンバイ状態を解除できるようにする` 設定を調べてください。また BIOS 設定も調べてください。 + +スリープ中に任意のキーを押すとホストが起動するはずです。 + +## Arduino を使っていますか? + +**Arduino のピンの命名は実際のチップと異なることに注意してください。** 例えば、Arduino のピン `D0` は `PD0` ではありません。回路図を自身で確認してください。 + +- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf +- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf + +Arduino の Leonardo と micro には **ATMega32U4** が載っていて、TMK 用に使うことができますが、Arduino のブートローダが問題になることがあります。 + +## JTAG を有効にする + +デフォルトでは、キーボードが起動するとすぐに JTAG デバッグインタフェースが無効になります。JTAG 対応 MCU は `JTAGEN` ヒューズが設定された状態で出荷されており、キーボードがスイッチマトリックス、LED などに使用している可能性のある MCU の特定のピンを乗っ取ります。 + +JTAG を有効にしたままにしたい場合は、単に以下のものを `config.h` に追加します: + +```c +#define NO_JTAG_DISABLE +``` + +## USB 3 の互換性 +USB 3 ポートで問題がある人がいると聞きました。USB 2 ポートを試してください。 + + +## Mac の互換性 +### OS X 10.11 と Hub +https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 + + +## リジューム (スリープとウェークアップ)/電源サイクルの問題 +一部の人がキーボードが BIOS で動作しなくなった、またはリジューム(電源サイクル)の後で動作しなくなったと報告しました。 + +今のところ、この問題の根本は明確ではないですが、幾つかのビルドオプションが関係しているようです。Makefileで、`CONSOLE_ENABLE`、`NKRO_ENABLE`、`SLEEP_LED_ENABLE` あるいは他のオプションを無効にしてみてください。 + +https://github.com/tmk/tmk_keyboard/issues/266 +https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 + + + +## FLIP が動作しない +### `AtLibUsbDfu.dll` が見つかりません +デバイスマネージャから現在のドライバを削除し、FLIP が提供するものを再インストールします。 +http://imgur.com/a/bnwzy diff --git a/docs/ja/faq_general.md b/docs/ja/faq_general.md new file mode 100644 index 000000000000..cfea2cda2301 --- /dev/null +++ b/docs/ja/faq_general.md @@ -0,0 +1,20 @@ +# よくある質問 + + + +## QMK とは何か? + +Quantum Mechanical Keyboard の略である [QMK](https://github.com/qmk) は、カスタムキーボードのためのツールをビルドしている人々のグループです。[TMK](https://github.com/tmk/tmk_keyboard) の大幅に修正されたフォークである [QMK ファームウェア](https://github.com/qmk/qmk_firmware)から始まりました。 + +## QMK と TMK の違いは何か? + +TMK は [Jun Wako](https://github.com/tmk) によって設計され実装されました。QMK は [Jack Humbert](https://github.com/jackhumbert) の Planck 用 TMK のフォークとして始まりました。しばらくして、Jack のフォークは TMK からかなり分岐し、2015年に Jack はフォークを QMK に名前を変えることにしました。 + +技術的な観点から、QMK は幾つかの新しい機能を追加した TMK に基づいています。最も注目すべきことは、QMK は利用可能なキーコードの数を増やし、`S()`、`LCTL()` および `MO()` などの高度な機能を実装するためにこれらを使っています。[キーコード](keycodes.md)でこれらのキーコードの完全なリストを見ることができます。 + +プロジェクトとコミュニティの管理の観点から、TMK は公式にサポートされている全てのキーボードを自分で管理しており、コミュニティのサポートも少し受けています。他のキーボード用に別個のコミュニティが維持するフォークが存在するか、作成できます。デフォルトでは少数のキーマップのみが提供されるため、ユーザは一般的にお互いにキーマップを共有しません。QMK は集中管理されたリポジトリを介して、キーボードとキーマップの両方を共有することを奨励しており、品質基準に準拠する全てのプルリクエストを受け付けます。これらはほとんどコミュニティで管理されますが、必要な場合は QMK チームも支援します。 + +どちらのアプローチもメリットとデメリットがあり、理に適う場合は TMK と QMK の間でコードは自由にやり取りされます。 diff --git a/docs/ja/faq_keymap.md b/docs/ja/faq_keymap.md new file mode 100644 index 000000000000..bf7bf56f2066 --- /dev/null +++ b/docs/ja/faq_keymap.md @@ -0,0 +1,149 @@ +# キーマップの FAQ + + + +このページは人々がキーマップについてしばしば持つ疑問について説明します。まだ読んだことが無い場合には、[キーマップの概要](ja/keymap.md)を最初に読むべきです。 + +## どのキーコードを使えますか? +あなたが利用可能なキーコードのインデックスについては、[キーコード](ja/keycodes.md)を見てください。より広範なドキュメントがある場合は、そこからリンクしてあります。 + +キーコードは実際には [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h) で定義されています。 + +## デフォルトのキーコードとは何か? + +世界中で使用されている ANSI、ISO および JIS の3つの標準キーボードがあります。北米では主に ANSI が使われ、ヨーロッパおよびアフリカでは主に ISO が使われ、日本では JIS が使われます。言及されていない地域では、ANSI あるいは ISO が使われています。これらのレイアウトに対応するキーコードは以下の通りです: + + +![キーボードのレイアウトイメージ](https://i.imgur.com/5wsh5wM.png) + +## 一部のキーが入れ替わっているか、または動作しない + +QMK には2つの機能、ブートマジックとコマンドがあり、これによりその場でキーボードの動作を変更することができます。これには Ctrl/Caps の交換、Gui の無効化、Alt/GUI の交換、Backspace/Backslash の交換、全てのキーの無効化およびその他の動作の変更が含まれますが、これらに限定されません。 + +迅速な解決策として、キーボードを接続している時に `Space`+`Backspace` を押してみてください。これはキーボードに保存されている設定をリセットし、これらのキーを通常の操作に戻します。うまく行かない場合は、以下を見てください: + +* [ブートマジック](ja/feature_bootmagic.md) +* [コマンド](ja/feature_command.md) + +## メニューキーが動作しない + +ほとんどの最近のキーボードにある、`KC_RGUI` と `KC_RCTL` の間にあるキーは、実際には `KC_APP` と呼ばれます。これは、そのキーが発明された時に、関連する標準にすでに `MENU` という名前のキーが存在していたため、MS はそれを `APP` キーと呼ぶことを選択したためです。 + +## `KC_SYSREQ` が動作しません +`KC_SYSREQ` の代わりに、Print Screen(`KC_PSCREEN` あるいは `KC_PSCR`) のキーコードを使ってください。'Alt + Print Screen' のキーの組み合わせは、'システムリクエスト' と認識されます。 + +[issue #168](https://github.com/tmk/tmk_keyboard/issues/168) と以下を見てください +* http://en.wikipedia.org/wiki/Magic_SysRq_key +* http://en.wikipedia.org/wiki/System_request + +## 電源キーが動作しません + +やや紛らわしいことに、QMK には2つの "Power" キーコードがあります: キーボード/キーパッド HID usage page では `KC_POWER`、Consumer page では `KC_SYSTEM_POWER` (あるいは `KC_PWR`)。 + +前者は macOS でのみ認識されますが、後者 `KC_SLEP` および `KC_WAKE` は3つの主要なオペレーティングシステム全てでサポートされるため、これらを使うことをお勧めします。Windows ではこれらのキーはすぐに機能しますが、macOS ではそれらはダイアログが表示されるまで押し続ける必要があります。 + +## ワンショットモディファイア +私の個人的な 'the' の問題を解決します。'The' ではなく 'the' あるいは 'THe' を間違って入力することがありました。ワンショットシフトはこれを軽減します。 +https://github.com/tmk/tmk_keyboard/issues/67 + +## モディファイヤ/レイヤスタック +修飾キーあるいはレイヤは、レイヤの切り替えが適切に設定されていない場合、スタックするかもしれません。 +修飾キーおよびレイヤ切り替えの場合、リリースイベント時に修飾キーの登録を解除する、もしくは前のレイヤに戻るために、目的のレイヤの同じ位置に `KC_TRANS` を配置する必要があります。 + +* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching +* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 +* https://github.com/tmk/tmk_keyboard/issues/248 + + +## メカニカルロックスイッチのサポート + +この機能は [Alps](http://deskthority.net/wiki/Alps_SKCL_Lock) のような*メカニカルロックスイッチ*用です。以下を `config.h` に追加することで有効にすることができます: + +``` +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE +``` + +この機能を有効にした後で、キーマップでキーコード `KC_LCAP`、`KC_LNUM` および `KC_LSCR` を使います。 + +古いビンテージメカニカルキーボードにはロックスイッチが付いている場合がありますが、最新のものにはありません。***ほとんどの場合この機能は必要なく、単にキーコード `KC_CAPS`、`KC_NLCK` および `KC_SLCK`*** を使います。 + +## セディーユ 'Ç' のような ASCII 以外の特別文字の入力 + +[ユニコード](ja/feature_unicode.md) 機能を見てください。 + +## macOS での `Fn` キー + +ほとんどの Fn キーと異なり、Apple のキーボードの Fn キーには実際には独自のキーコードのようなものがあります。基本的な 6KRO HID レポートの6番目のキーコードの代わりになります -- つまり、Apple キーボードは実際には 5KRO のみです。 + +QMK にこのキーを送信させることは技術的に可能です。ただし、そうするには Fn キーの状態を追加するためにレポート形式の修正を必要とします。 +さらに悪いことに、キーボードの VID と PID が実際の Apple のキーボードのものと一致しない限り、認識されません。公式の QMK がこの機能をサポートすることで法的な問題が起きるため、サポートされることはないでしょう。 + +詳細については、[この issue](https://github.com/qmk/qmk_firmware/issues/2179) を見てください。 + +## Mac OSX でサポートされるキーは? +このソースコードから、どのキーコードが OSX でサポートされるかを知ることができます。 + +`usb_2_adb_keymap` 配列は、キーボード/キーパッドページの Page usages を ADB スキャンコード(OSX 内部キーコード)にマップします。 + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/Cosmo_USB2ADB.c + +`IOHIDConsumer::dispatchConsumerEvent` は Consumer page usages を処理します。 + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp + + +## Mac OSX での JIS キー +`無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` のような日本語 JIS キーボード固有のキーは OSX では認識されません。**Seil** を使ってこれらのキーを使うことができます。以下のオプションを試してください。 + +* PC キーボードで NFER キーを有効にする +* PC キーボードで XFER キーを有効にする +* PC キーボードで KATAKANA キーを有効にする + +https://pqrs.org/osx/karabiner/seil.html + + +## RN-42 Bluetooth が Karabiner で動作しない +Karabiner - Mac OSX 上のキーマッピングツール - は、デフォルトでは RN-42 モジュールからの入力を無視します。Karabiner をキーボードで動作させるにはこのオプションを有効にする必要があります。 +https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237 + +この問題の詳細についてはこれらを見てください。 +https://github.com/tmk/tmk_keyboard/issues/213 +https://github.com/tekezo/Karabiner/issues/403 + + +## 単一のキーでの Esc と` + +[Grave Escape](feature_grave_esc.md) 機能を見てください。 + +## Mac OSX での Eject +`KC_EJCT` キーコードは OSX で動作します。https://github.com/tmk/tmk_keyboard/issues/250 +Windows 10 はコードを無視し、Linux/Xorg は認識しますが、デフォルトではマッピングがありません。 + +実際の Apple キーボードにある Eject キーコードは実際には分かりません。HHKB は Mac モードでは Eject キー (`Fn+f`) に `F20` を使いますが、これはおそらく Apple の Eject キーコードと同じではありません。 + + +## `action_util.c` の `weak_mods` と `real_mods` は何か +___改善されるべきです___ + +real_mods は実際の物理的な修飾キーの状態を保持することを目的にしていますが、weak_mods は実際の修飾キーの状態に影響しない仮想あるいは一時的なモディファイアの状態を保持します。 + +物理的な左シフトキーを押しながら ACTION_MODS_KEY(LSHIFT, KC_A) を入力するとします + +weak_mods では、 +* (1) 左シフトキーを押し続ける: real_mods |= MOD_BIT(LSHIFT) +* (2) ACTION_MODS_KEY(LSHIFT, KC_A) を押す: weak_mods |= MOD_BIT(LSHIFT) +* (3) ACTION_MODS_KEY(LSHIFT, KC_A) を放す: weak_mods &= ~MOD_BIT(LSHIFT) +real_mods はモディファイアの状態を維持します。 + +weak mods 無しでは、 +* (1) 左シフトキーを押し続ける: real_mods |= MOD_BIT(LSHIFT) +* (2) ACTION_MODS_KEY(LSHIFT, KC_A) を押す: real_mods |= MOD_BIT(LSHIFT) +* (3) ACTION_MODS_KEY(LSHIFT, KC_A) を放す: real_mods &= ~MOD_BIT(LSHIFT) +ここで、real_mods は 'physical left shift' '物理的な左シフト' の状態を見失います。 + +キーボードレポートが送信される時、weak_mods は real_mods と論理和がとられます。 +https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57 From 45482d612c760c6b727b138629b8f60bf90cb122 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Wed, 1 Jan 2020 20:01:37 -0800 Subject: [PATCH 118/973] Update Kinesis keymap (#7741) * Update Kinesis keymap Added a MACLOCK macro to lock my mac easier * Updated readme.md --- keyboards/kinesis/keymaps/xyverz/keymap.c | 3 ++- keyboards/kinesis/keymaps/xyverz/readme.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index 1144d7924ab6..cade953acd76 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -12,6 +12,7 @@ enum custom_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, KEYPAD }; // Aliases to make the keymap more uniform #define GUI_END GUI_T(KC_END) #define KPD_ENT LT(_KEYPAD, KC_ENT) +#define MACLOCK LGUI(LCTL(KC_Q)) // clang-format off @@ -197,7 +198,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Left Thumb _______, _______, _______, - _______, _______, _______, + _______, _______, MACLOCK, // Right Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/kinesis/keymaps/xyverz/readme.md b/keyboards/kinesis/keymaps/xyverz/readme.md index f8896934c035..556cae8d4c4d 100644 --- a/keyboards/kinesis/keymaps/xyverz/readme.md +++ b/keyboards/kinesis/keymaps/xyverz/readme.md @@ -105,5 +105,5 @@ Removed the Media layer 2018-12-07 ,------|------|------||------+------+------. | | | || | | | | | |------||------| | KP 0 | - | | | || | | | + | | |MacLck|| | | | `--------------------'`--------------------' From 86815edc3140d926e272abf9a4c48b7ba0b4fd3b Mon Sep 17 00:00:00 2001 From: Benjamin Smith Date: Wed, 1 Jan 2020 20:19:41 -0800 Subject: [PATCH 119/973] [Keyboard] Change cKeys Washington keyboard to use atmel-dfu bootloader (#7756) --- keyboards/ckeys/washington/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ckeys/washington/rules.mk b/keyboards/ckeys/washington/rules.mk index 9c5764b920a3..aa2dfb328ccb 100644 --- a/keyboards/ckeys/washington/rules.mk +++ b/keyboards/ckeys/washington/rules.mk @@ -9,7 +9,7 @@ MCU = atmega32u4 # QMK DFU qmk-dfu # ATmega32A bootloadHID # ATmega328P USBasp -BOOTLOADER = caterina +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable @@ -31,4 +31,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 ENCODER_ENABLE = yes # Enable support for encoders -OLED_DRIVER_ENABLE = yes # Enable support for OLED displays \ No newline at end of file +OLED_DRIVER_ENABLE = yes # Enable support for OLED displays From 77f66cc5e1e2a4624305526d6ff9ffee60e17588 Mon Sep 17 00:00:00 2001 From: Jianfei Wang Date: Thu, 2 Jan 2020 14:28:05 +0800 Subject: [PATCH 120/973] [Keyboard] add Just60 keyboard (#7752) * [Keyboard] add Just60 keyboard * [Keyboard] just60: fixes per suggestions * Update keyboards/just60/rules.mk * Update keyboards/just60/readme.md * Update keyboards/just60/rules.mk * [Keyboard] just60: add keymap specific bootloader * Revert "[Keyboard] just60: add keymap specific bootloader" This reverts commit 0357e0a6f40233eec43f42c32fb405f60e7fbb1c. --- keyboards/just60/config.h | 54 ++++++++++++++++++++++ keyboards/just60/just60.h | 41 ++++++++++++++++ keyboards/just60/keymaps/default/keymap.c | 50 ++++++++++++++++++++ keyboards/just60/keymaps/default/readme.md | 19 ++++++++ keyboards/just60/readme.md | 17 +++++++ keyboards/just60/rules.mk | 35 ++++++++++++++ 6 files changed, 216 insertions(+) create mode 100644 keyboards/just60/config.h create mode 100644 keyboards/just60/just60.h create mode 100644 keyboards/just60/keymaps/default/keymap.c create mode 100644 keyboards/just60/keymaps/default/readme.md create mode 100644 keyboards/just60/readme.md create mode 100644 keyboards/just60/rules.mk diff --git a/keyboards/just60/config.h b/keyboards/just60/config.h new file mode 100644 index 000000000000..ef0af7c61081 --- /dev/null +++ b/keyboards/just60/config.h @@ -0,0 +1,54 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1960 +#define DEVICE_VER 0x0001 +#define MANUFACTURER YDKB +#define PRODUCT Just60 +#define DESCRIPTION Just60 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { E2, C7, B3, B2, B1 } +#define MATRIX_COL_PINS { D6, D7, B4, B6, B5, B7, F7, F6, F5, F4, F1, F0, E6, B0 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +#define QMK_ESC_OUTPUT D6 // usually COL +#define QMK_ESC_INPUT E2 // usually ROW + +/* 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 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif diff --git a/keyboards/just60/just60.h b/keyboards/just60/just60.h new file mode 100644 index 000000000000..426324fe02cd --- /dev/null +++ b/keyboards/just60/just60.h @@ -0,0 +1,41 @@ +/* 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 . + */ + +#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, K0B, K0C, K48 , \ + 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, K3C, \ + K40, K41, K42, K44, K45, K47, K49, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO }, \ + { 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, KC_NO, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, K44, K45, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D }, \ +} diff --git a/keyboards/just60/keymaps/default/keymap.c b/keyboards/just60/keymaps/default/keymap.c new file mode 100644 index 000000000000..da034e0e447e --- /dev/null +++ b/keyboards/just60/keymaps/default/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/default/readme.md b/keyboards/just60/keymaps/default/readme.md new file mode 100644 index 000000000000..927618c9101e --- /dev/null +++ b/keyboards/just60/keymaps/default/readme.md @@ -0,0 +1,19 @@ +# The default keymap for Just60 + +Just60 could be customized to many layouts, and this is just one of them. + +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/readme.md b/keyboards/just60/readme.md new file mode 100644 index 000000000000..f78adcd5294c --- /dev/null +++ b/keyboards/just60/readme.md @@ -0,0 +1,17 @@ +# Just60 + +Just60 keyboard produced by Yang. The keyboard comes with a custom Mass Storage Device bootloader and a TMK based firmware from ydkb.io. + +To use a QMK based firmware, you might want to install a QMK bootloader. The PCB exposes 6 pins for ISP(In-System Programming), and they are located just under the ATMega32U4 chip. From left to right, the pins are `VCC`, `SCLK`, `MOSI`, `MISO`, `RESET`, `GND`. The `GND` is the square one. You could program the flash with any AVR programmer, or a Raspberry Pi with `avrdude`. + +Backlight LEDs and Bluetooth are not working yet. + +* Keyboard Maintainer: [Jianfei Wang](https://github.com/thinxer) +* Hardware Supported: Just60 (atmega32u4) +* Hardware Availability: https://item.taobao.com/item.htm?id=564176654249 + +Make example for this keyboard (after setting up your build environment): + + make just60: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/just60/rules.mk b/keyboards/just60/rules.mk new file mode 100644 index 000000000000..3aaf101543ab --- /dev/null +++ b/keyboards/just60/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = lufa-ms + +# 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 dff4f13c195ff8b799e886ec671d40d1448b55b9 Mon Sep 17 00:00:00 2001 From: William Chang Date: Wed, 1 Jan 2020 22:31:00 -0800 Subject: [PATCH 121/973] 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 b83e3ae556239b4aa6f2c4db20535c536692eb3b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 1 Jan 2020 22:42:04 -0800 Subject: [PATCH 122/973] [Keyboard] Ergodox EZ - Re-init ISSI driver on reconnect (#7731) --- keyboards/ergodox_ez/matrix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 4f11a0ad521a..c7077293804c 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -122,6 +122,9 @@ uint8_t matrix_scan(void) { } else { print("left side attached\n"); ergodox_blink_all_leds(); +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_init(); // re-init driver on reconnect +#endif } } } From 2557bc8e6f6e61352fa5875646d861126c42a3b0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 2 Jan 2020 17:45:41 +1100 Subject: [PATCH 123/973] Remove custom matrix from PS2AVRGB boards (#7396) * Remove custom matrix from PS2AVRGB boards * Add custom backlight.c to SRC for bminiex, for now * Add missing DIODE_DIRECTIONs --- keyboards/bfake/bfake.c | 3 - keyboards/bfake/config.h | 2 +- keyboards/bfake/matrix.c | 106 -------------- keyboards/bfake/rules.mk | 4 - keyboards/coseyfannitutti/discipad/discipad.c | 8 -- .../coseyfannitutti/discipline/discipline.c | 8 -- .../e6v2/le_bmc/keymaps/default/keymap.c | 12 -- .../e6v2/oe_bmc/keymaps/default/keymap.c | 12 -- keyboards/ft/mars80/keymaps/default/keymap.c | 12 -- keyboards/jc65/v32a/config.h | 7 +- keyboards/jc65/v32a/matrix.c | 106 -------------- keyboards/jc65/v32a/rules.mk | 4 - keyboards/jc65/v32a/v32a.c | 3 - keyboards/jc65/v32a/v32a.h | 30 ++-- keyboards/jj40/rules.mk | 15 -- keyboards/jj50/config.h | 8 +- keyboards/jj50/jj50.c | 10 -- keyboards/jj50/jj50.h | 2 - keyboards/jj50/matrix.c | 107 -------------- keyboards/jj50/rules.mk | 4 +- keyboards/leeku/finger65/config.h | 2 + keyboards/mechmini/v1/config.h | 7 +- keyboards/mechmini/v1/matrix.c | 112 --------------- keyboards/mechmini/v1/rules.mk | 4 - keyboards/mechmini/v1/v1.c | 10 -- keyboards/mechmini/v1/v1.h | 24 ++-- keyboards/mehkee96/config.h | 3 + keyboards/mehkee96/keymaps/default/keymap.c | 10 -- keyboards/mehkee96/matrix.c | 130 ------------------ keyboards/mehkee96/mehkee96.c | 10 -- keyboards/mehkee96/rules.mk | 4 - keyboards/mt40/config.h | 8 +- keyboards/mt40/matrix.c | 128 ----------------- keyboards/mt40/mt40.h | 1 - keyboards/mt40/rules.mk | 4 - keyboards/percent/canoe/canoe.c | 10 -- keyboards/percent/canoe/canoe.h | 10 +- keyboards/percent/canoe/config.h | 6 +- keyboards/percent/canoe/matrix.c | 112 --------------- keyboards/percent/canoe/rules.mk | 4 - keyboards/percent/skog/config.h | 6 +- .../percent/skog/keymaps/default/keymap.c | 8 -- keyboards/percent/skog/matrix.c | 112 --------------- keyboards/percent/skog/skog.c | 10 -- keyboards/percent/skog/skog.h | 1 - keyboards/winkeyless/bface/config.h | 2 + keyboards/winkeyless/bmini/bmini.c | 3 - keyboards/winkeyless/bmini/config.h | 3 + keyboards/winkeyless/bmini/matrix.c | 106 -------------- keyboards/winkeyless/bmini/rules.mk | 4 - keyboards/winkeyless/bminiex/config.h | 3 + keyboards/winkeyless/bminiex/matrix.c | 122 ---------------- keyboards/winkeyless/bminiex/rules.mk | 4 +- keyboards/ymd75/config.h | 4 +- keyboards/ymd75/matrix.c | 108 --------------- keyboards/ymd75/rules.mk | 4 +- keyboards/ymd75/ymd75.c | 10 -- keyboards/ymd75/ymd75.h | 2 - keyboards/ymd96/config.h | 3 +- keyboards/ymd96/matrix.c | 112 --------------- keyboards/ymd96/rules.mk | 4 +- keyboards/ymd96/ymd96.c | 10 -- keyboards/ymd96/ymd96.h | 2 - keyboards/ymdk/bface/config.h | 2 + keyboards/ymdk/bface/rules.mk | 15 -- keyboards/ymdk_np21/config.h | 6 +- keyboards/ymdk_np21/matrix.c | 129 ----------------- keyboards/ymdk_np21/rules.mk | 4 +- keyboards/ymdk_np21/ymdk_np21.h | 2 - 69 files changed, 81 insertions(+), 1782 deletions(-) delete mode 100644 keyboards/bfake/matrix.c delete mode 100644 keyboards/jc65/v32a/matrix.c delete mode 100644 keyboards/jj50/matrix.c delete mode 100644 keyboards/mechmini/v1/matrix.c delete mode 100644 keyboards/mehkee96/matrix.c delete mode 100644 keyboards/mt40/matrix.c delete mode 100644 keyboards/percent/canoe/matrix.c delete mode 100644 keyboards/percent/skog/matrix.c delete mode 100644 keyboards/winkeyless/bmini/matrix.c delete mode 100644 keyboards/winkeyless/bminiex/matrix.c delete mode 100644 keyboards/ymd75/matrix.c delete mode 100644 keyboards/ymd96/matrix.c delete mode 100644 keyboards/ymdk_np21/matrix.c diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index f7d006576c72..9039fe5465ae 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c @@ -17,9 +17,6 @@ along with this program. If not, see . #include "bfake.h" -__attribute__ ((weak)) -void matrix_scan_user(void) {} - void backlight_init_ports(void) { setPinOutput(D0); setPinOutput(D1); diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index 0a8911b09ab6..65f1f3a759ff 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define MATRIX_COLS 11 #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6} +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bfake/matrix.c b/keyboards/bfake/matrix.c deleted file mode 100644 index 57aa36b5ff74..000000000000 --- a/keyboards/bfake/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk index 5963c9810a02..107bb4fa903a 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -22,7 +22,3 @@ RGBLIGHT_ENABLE = no WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/coseyfannitutti/discipad/discipad.c b/keyboards/coseyfannitutti/discipad/discipad.c index c8f6e0a178da..4bdb1c6c20c9 100644 --- a/keyboards/coseyfannitutti/discipad/discipad.c +++ b/keyboards/coseyfannitutti/discipad/discipad.c @@ -14,11 +14,3 @@ * along with this program. If not, see . */ #include "discipad.h" - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} diff --git a/keyboards/coseyfannitutti/discipline/discipline.c b/keyboards/coseyfannitutti/discipline/discipline.c index 6a788ce0e8f6..50ba0bae54bc 100644 --- a/keyboards/coseyfannitutti/discipline/discipline.c +++ b/keyboards/coseyfannitutti/discipline/discipline.c @@ -14,11 +14,3 @@ * along with this program. If not, see . */ #include "discipline.h" - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} diff --git a/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c index 730041917650..6d9209e4871e 100644 --- a/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c @@ -60,15 +60,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c index 730041917650..6d9209e4871e 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c @@ -60,15 +60,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/ft/mars80/keymaps/default/keymap.c b/keyboards/ft/mars80/keymaps/default/keymap.c index ba7ef83d9875..010102d723bf 100644 --- a/keyboards/ft/mars80/keymaps/default/keymap.c +++ b/keyboards/ft/mars80/keymaps/default/keymap.c @@ -61,15 +61,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index 444ebad07739..5439dbe396b3 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h @@ -26,8 +26,11 @@ along with this program. If not, see . #define PRODUCT JC65 PS2AVRGB /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 16 +#define MATRIX_ROWS 7 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B7 } +#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 RGBLED_NUM 16 diff --git a/keyboards/jc65/v32a/matrix.c b/keyboards/jc65/v32a/matrix.c deleted file mode 100644 index 57aa36b5ff74..000000000000 --- a/keyboards/jc65/v32a/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/jc65/v32a/rules.mk b/keyboards/jc65/v32a/rules.mk index 18e7f1de9dc7..a8fea7efa7f7 100644 --- a/keyboards/jc65/v32a/rules.mk +++ b/keyboards/jc65/v32a/rules.mk @@ -22,7 +22,3 @@ RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index 9b1e07274c51..2a289872fefc 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c @@ -17,9 +17,6 @@ along with this program. If not, see . #include "v32a.h" -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { setPinOutput(D0); diff --git a/keyboards/jc65/v32a/v32a.h b/keyboards/jc65/v32a/v32a.h index ba91d80a641a..b319ba80affa 100644 --- a/keyboards/jc65/v32a/v32a.h +++ b/keyboards/jc65/v32a/v32a.h @@ -27,14 +27,13 @@ along with this program. If not, see . K01,K30,K11,K21,K31,K41,K51,K46,KE6,KE7,K47,KA1, KB1,K86,K77, \ K00,K10,K20, K40,K56,K50, K57,KB0,KC0,K96,K76,K66 \ ){ \ - { K00, K10, K20, K30, K40, K50,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KB0, KC0, KD0,KC_NO,KC_NO }, \ - { K01, K11, K21, K31, K41, K51,KC_NO,KC_NO,KC_NO,KC_NO, KA1, KB1,KC_NO,KC_NO,KC_NO,KC_NO }, \ - { K02, K12, K22, K32, K42, K52,KC_NO,KC_NO,KC_NO,KC_NO, KA2, KB2, KC2, KD2,KC_NO,KC_NO }, \ - { K03, K13, K23, K33, K43, K53,KC_NO,KC_NO,KC_NO,KC_NO, KA3, KB3, KC3, KD3,KC_NO,KC_NO }, \ - { K04, K14, K24, K34, K44, K54,KC_NO,KC_NO,KC_NO,KC_NO, KA4, KB4, KC4, KD4, KE4,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, K16, K26, K36, K46, K56, K66, K76, K86, K96,KC_NO, KB6, KC6, KD6, KE6,KC_NO }, \ - { KC_NO, K17, K27, K37, K47, K57, K67, K77, K87,KC_NO,KC_NO, KB7, KC7, KD7, KE7,KC_NO } \ + { K00, K10, K20, K30, K40, K50,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KB0, KC0, KD0,KC_NO }, \ + { K01, K11, K21, K31, K41, K51,KC_NO,KC_NO,KC_NO,KC_NO, KA1, KB1,KC_NO,KC_NO,KC_NO }, \ + { K02, K12, K22, K32, K42, K52,KC_NO,KC_NO,KC_NO,KC_NO, KA2, KB2, KC2, KD2,KC_NO }, \ + { K03, K13, K23, K33, K43, K53,KC_NO,KC_NO,KC_NO,KC_NO, KA3, KB3, KC3, KD3,KC_NO }, \ + { K04, K14, K24, K34, K44, K54,KC_NO,KC_NO,KC_NO,KC_NO, KA4, KB4, KC4, KD4, KE4 }, \ + { KC_NO, K16, K26, K36, K46, K56, K66, K76, K86, K96,KC_NO, KB6, KC6, KD6, KE6 }, \ + { KC_NO, K17, K27, K37, K47, K57, K67, K77, K87,KC_NO,KC_NO, KB7, KC7, KD7, KE7 } \ } #define LAYOUT_kc( \ @@ -45,14 +44,13 @@ along with this program. If not, see . K00,K10,K20, K40,K56,K50, K57,KB0,KC0,K96,K76,K66 \ ) \ { \ - { KC_##K00,KC_##K10,KC_##K20,KC_##K30,KC_##K40,KC_##K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KB0,KC_##KC0,KC_##KD0, KC_NO,KC_NO }, \ - { KC_##K01,KC_##K11,KC_##K21,KC_##K31,KC_##K41,KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA1,KC_##KB1, KC_NO, KC_NO, KC_NO,KC_NO }, \ - { KC_##K02,KC_##K12,KC_##K22,KC_##K32,KC_##K42,KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA2,KC_##KB2,KC_##KC2,KC_##KD2, KC_NO,KC_NO }, \ - { KC_##K03,KC_##K13,KC_##K23,KC_##K33,KC_##K43,KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA3,KC_##KB3,KC_##KC3,KC_##KD3, KC_NO,KC_NO }, \ - { KC_##K04,KC_##K14,KC_##K24,KC_##K34,KC_##K44,KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA4,KC_##KB4,KC_##KC4,KC_##KD4,KC_##KE4,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_##K16,KC_##K26,KC_##K36,KC_##K46,KC_##K56,KC_##K66,KC_##K76,KC_##K86,KC_##K96, KC_NO,KC_##KB6,KC_##KC6,KC_##KD6,KC_##KE6,KC_NO }, \ - { KC_NO,KC_##K17,KC_##K27,KC_##K37,KC_##K47,KC_##K57,KC_##K67,KC_##K77,KC_##K87, KC_NO, KC_NO,KC_##KB7,KC_##KC7,KC_##KD7,KC_##KE7,KC_NO } \ + { KC_##K00,KC_##K10,KC_##K20,KC_##K30,KC_##K40,KC_##K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KB0,KC_##KC0,KC_##KD0, KC_NO }, \ + { KC_##K01,KC_##K11,KC_##K21,KC_##K31,KC_##K41,KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA1,KC_##KB1, KC_NO, KC_NO, KC_NO }, \ + { KC_##K02,KC_##K12,KC_##K22,KC_##K32,KC_##K42,KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA2,KC_##KB2,KC_##KC2,KC_##KD2, KC_NO }, \ + { KC_##K03,KC_##K13,KC_##K23,KC_##K33,KC_##K43,KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA3,KC_##KB3,KC_##KC3,KC_##KD3, KC_NO }, \ + { KC_##K04,KC_##K14,KC_##K24,KC_##K34,KC_##K44,KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA4,KC_##KB4,KC_##KC4,KC_##KD4,KC_##KE4 }, \ + { KC_NO,KC_##K16,KC_##K26,KC_##K36,KC_##K46,KC_##K56,KC_##K66,KC_##K76,KC_##K86,KC_##K96, KC_NO,KC_##KB6,KC_##KC6,KC_##KD6,KC_##KE6 }, \ + { KC_NO,KC_##K17,KC_##K27,KC_##K37,KC_##K47,KC_##K57,KC_##K67,KC_##K77,KC_##K87, KC_NO, KC_NO,KC_##KB7,KC_##KC7,KC_##KD7,KC_##KE7 } \ } #endif diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index 8e0e8c864734..c53a6804c0cb 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h index dfd8a4a8fbce..884a28d50698 100644 --- a/keyboards/jj50/config.h +++ b/keyboards/jj50/config.h @@ -32,9 +32,11 @@ along with this program. If not, see . #define DESCRIPTION Preonic-like clone /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 -#define DIODE_DIRECTION ROW2COL +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#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_LEVELS 12 diff --git a/keyboards/jj50/jj50.c b/keyboards/jj50/jj50.c index 7c3cee95d186..a302adf40509 100644 --- a/keyboards/jj50/jj50.c +++ b/keyboards/jj50/jj50.c @@ -20,16 +20,6 @@ along with this program. If not, see . #include "backlight.h" #include "backlight_custom.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { b_led_init_ports(); diff --git a/keyboards/jj50/jj50.h b/keyboards/jj50/jj50.h index 8a904897e6ba..6b1c7eacf3bb 100644 --- a/keyboards/jj50/jj50.h +++ b/keyboards/jj50/jj50.h @@ -25,8 +25,6 @@ along with this program. If not, see . #include "keycode.h" #include "action.h" -void matrix_init_user(void); - #define LAYOUT_ortho_5x12( \ K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \ diff --git a/keyboards/jj50/matrix.c b/keyboards/jj50/matrix.c deleted file mode 100644 index 95c6057e7c41..000000000000 --- a/keyboards/jj50/matrix.c +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro -Modified 2018 by Wayne K Jones - -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 "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - //----> DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation - //matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk index 40473e6ecc43..62b21e4df23d 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -29,8 +29,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c LAYOUTS = ortho_5x12 diff --git a/keyboards/leeku/finger65/config.h b/keyboards/leeku/finger65/config.h index 3e6eebb32459..584db4ad319e 100644 --- a/keyboards/leeku/finger65/config.h +++ b/keyboards/leeku/finger65/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C3, C4, C5, C6, C7 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/mechmini/v1/config.h b/keyboards/mechmini/v1/config.h index 9355a6dc33c0..eb15a368ad58 100644 --- a/keyboards/mechmini/v1/config.h +++ b/keyboards/mechmini/v1/config.h @@ -30,8 +30,11 @@ along with this program. If not, see . #define DESCRIPTION 40% modular keyboard /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4 } +#define DIODE_DIRECTION COL2ROW #define NO_UART 1 diff --git a/keyboards/mechmini/v1/matrix.c b/keyboards/mechmini/v1/matrix.c deleted file mode 100644 index 245813dfd2de..000000000000 --- a/keyboards/mechmini/v1/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/mechmini/v1/rules.mk b/keyboards/mechmini/v1/rules.mk index ee023b43bae4..1c6252c59bd4 100644 --- a/keyboards/mechmini/v1/rules.mk +++ b/keyboards/mechmini/v1/rules.mk @@ -22,7 +22,3 @@ RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/mechmini/v1/v1.c b/keyboards/mechmini/v1/v1.c index 2c910d9658ca..ba0e09520932 100644 --- a/keyboards/mechmini/v1/v1.c +++ b/keyboards/mechmini/v1/v1.c @@ -16,13 +16,3 @@ along with this program. If not, see . */ #include "v1.h" - -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} diff --git a/keyboards/mechmini/v1/v1.h b/keyboards/mechmini/v1/v1.h index 1e392b353092..acdad5c6d62a 100644 --- a/keyboards/mechmini/v1/v1.h +++ b/keyboards/mechmini/v1/v1.h @@ -30,14 +30,10 @@ along with this program. If not, see . K00, K10, K20, K56, K57, KB0, KC0, K66 \ ) \ { \ - { K00, K10, K20, K56, KC_NO, K57, KC_NO, KC_NO, KB0, KC0, K66, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, 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, 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, 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 } \ + { K00, K10, K20, K56, KC_NO, K57, KC_NO, KC_NO, KB0, KC0, K66, KC_NO }, \ + { K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO }, \ + { K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO }, \ + { K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3 } \ } #define LAYOUT_split_space( \ @@ -47,14 +43,10 @@ along with this program. If not, see . K00, K10, K20, K56, K57, KB0, KC0, K66 \ ) \ { \ - { K00, K10, K20, K56, KC_NO, KC_NO, K57, KC_NO, KB0, KC0, K66, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, 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, 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, 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 } \ + { K00, K10, K20, K56, KC_NO, KC_NO, K57, KC_NO, KB0, KC0, K66, KC_NO }, \ + { K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO }, \ + { K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO }, \ + { K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3 } \ } #endif diff --git a/keyboards/mehkee96/config.h b/keyboards/mehkee96/config.h index 4adfcc86b9d0..d506626d1e74 100644 --- a/keyboards/mehkee96/config.h +++ b/keyboards/mehkee96/config.h @@ -12,6 +12,9 @@ /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/mehkee96/keymaps/default/keymap.c b/keyboards/mehkee96/keymaps/default/keymap.c index cd69fb2fe9eb..46ee4d19cc3d 100644 --- a/keyboards/mehkee96/keymaps/default/keymap.c +++ b/keyboards/mehkee96/keymaps/default/keymap.c @@ -68,13 +68,3 @@ BL_TOGG, BL_DEC, BL_INC changes the in-switch LEDs _______ , _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/keyboards/mehkee96/matrix.c b/keyboards/mehkee96/matrix.c deleted file mode 100644 index bbb84e52e481..000000000000 --- a/keyboards/mehkee96/matrix.c +++ /dev/null @@ -1,130 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -__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) { -} - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/mehkee96/mehkee96.c b/keyboards/mehkee96/mehkee96.c index 46427ec93bfc..d9e2bac7a595 100644 --- a/keyboards/mehkee96/mehkee96.c +++ b/keyboards/mehkee96/mehkee96.c @@ -16,13 +16,3 @@ along with this program. If not, see . */ #include "mehkee96.h" - -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk index 1cbd02948f88..a7d36548f063 100644 --- a/keyboards/mehkee96/rules.mk +++ b/keyboards/mehkee96/rules.mk @@ -24,7 +24,3 @@ RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index 48f707f71fd2..f5038fb5413d 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define DESCRIPTION A Planck clone /* key matrix size */ -#define MATRIX_ROWS 8 +#define MATRIX_ROWS 7 #define MATRIX_COLS 15 #define NO_UART 1 @@ -55,12 +55,12 @@ along with this program. If not, see . /* #define CB6 0x37 // B7 */ /* #define CC7 0x62 // C2 */ -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C2, C3, C4, C5, C6, C7, D7 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } /* #define UNUSED_PINS */ /* COL2ROW, ROW2COL*/ -/* #define DIODE_DIRECTION COL2ROW */ +#define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D2 diff --git a/keyboards/mt40/matrix.c b/keyboards/mt40/matrix.c deleted file mode 100644 index d75fcc221af5..000000000000 --- a/keyboards/mt40/matrix.c +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" -#include "config.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[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) { -} - - - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_kb(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/mt40/mt40.h b/keyboards/mt40/mt40.h index a539577082b4..3ff9c89d0010 100644 --- a/keyboards/mt40/mt40.h +++ b/keyboards/mt40/mt40.h @@ -34,7 +34,6 @@ { K30, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, KC_NO, KC_NO }, \ { K10, K01, K02, K03, K04, K05, KC_NO, KC_NO, KC_NO, KC_NO, K0A, KC_NO, KC_NO, KC_NO, KC_NO }, \ { K00, 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, K0B }, \ - { 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, K06, K16, K26, K35, K38, K3A, K39, K3B, KC_NO, KC_NO, K07, K17, K27 }, \ { KC_NO, KC_NO, K09, K19, K29, KC_NO, K2B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K18, K28 } \ } diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index 0cbf90c674b2..338a83cc7474 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -29,9 +29,5 @@ TAP_DANCE_ENABLE = no OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c - LAYOUTS = planck_mit LAYOUTS_HAS_RGB = no diff --git a/keyboards/percent/canoe/canoe.c b/keyboards/percent/canoe/canoe.c index e59b0dd7bcc0..79c6330fe868 100644 --- a/keyboards/percent/canoe/canoe.c +++ b/keyboards/percent/canoe/canoe.c @@ -17,16 +17,6 @@ along with this program. If not, see . #include "canoe.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE void backlight_set(uint8_t level) { if (level == 0) { diff --git a/keyboards/percent/canoe/canoe.h b/keyboards/percent/canoe/canoe.h index 9e1e3e3d6ae9..83d7c08bb546 100644 --- a/keyboards/percent/canoe/canoe.h +++ b/keyboards/percent/canoe/canoe.h @@ -32,10 +32,7 @@ along with this program. If not, see . { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ { _x_, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, _x_, K42, K43, K44, _x_, _x_, _x_, K48, _x_, K4A, K4B, K4C, K4D, K4E }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ } \ + { K40, _x_, K42, K43, K44, _x_, _x_, _x_, K48, _x_, K4A, K4B, K4C, K4D, K4E } \ } #define LAYOUT_65_ansi_blocker( \ @@ -49,10 +46,7 @@ along with this program. If not, see . { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ { _x_, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, _x_, K42, K43, K44, _x_, _x_, _x_, K48, _x_, _x_, K4B, K4C, K4D, K4E }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ } \ + { K40, _x_, K42, K43, K44, _x_, _x_, _x_, K48, _x_, _x_, K4B, K4C, K4D, K4E } \ } #define LAYOUT LAYOUT_65_ansi_blocker // added to not break existing checked in keymaps diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h index bae6ed20fa07..950e0806e599 100644 --- a/keyboards/percent/canoe/config.h +++ b/keyboards/percent/canoe/config.h @@ -28,11 +28,11 @@ along with this program. If not, see . #define RGBLED_NUM 2 -#define MATRIX_ROWS 8 +#define MATRIX_ROWS 5 #define MATRIX_COLS 15 -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/percent/canoe/matrix.c b/keyboards/percent/canoe/matrix.c deleted file mode 100644 index 245813dfd2de..000000000000 --- a/keyboards/percent/canoe/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/percent/canoe/rules.mk b/keyboards/percent/canoe/rules.mk index f2f6ee4e5b56..6340c81224b3 100644 --- a/keyboards/percent/canoe/rules.mk +++ b/keyboards/percent/canoe/rules.mk @@ -23,8 +23,4 @@ WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c - LAYOUTS = 65_ansi_blocker 65_iso_blocker diff --git a/keyboards/percent/skog/config.h b/keyboards/percent/skog/config.h index 7c68d797d5b1..7a0c703ec9bc 100644 --- a/keyboards/percent/skog/config.h +++ b/keyboards/percent/skog/config.h @@ -26,9 +26,13 @@ along with this program. If not, see . #define PRODUCT Skog TKL /* matrix size */ -#define MATRIX_ROWS 8 +#define MATRIX_ROWS 7 #define MATRIX_COLS 14 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } +#define DIODE_DIRECTION COL2ROW + #define RGBLED_NUM 2 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/percent/skog/keymaps/default/keymap.c b/keyboards/percent/skog/keymaps/default/keymap.c index eefc24cb0d60..282ce39a506f 100644 --- a/keyboards/percent/skog/keymaps/default/keymap.c +++ b/keyboards/percent/skog/keymaps/default/keymap.c @@ -27,11 +27,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} diff --git a/keyboards/percent/skog/matrix.c b/keyboards/percent/skog/matrix.c deleted file mode 100644 index 245813dfd2de..000000000000 --- a/keyboards/percent/skog/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/percent/skog/skog.c b/keyboards/percent/skog/skog.c index 8678d483a7e2..1c26c550e516 100644 --- a/keyboards/percent/skog/skog.c +++ b/keyboards/percent/skog/skog.c @@ -22,16 +22,6 @@ ps2avrGB support code by Kenneth A. (bminiex/.[ch]) #include "backlight.h" #include "backlight_custom.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { diff --git a/keyboards/percent/skog/skog.h b/keyboards/percent/skog/skog.h index 17be94621b2c..c04a765b2e3e 100644 --- a/keyboards/percent/skog/skog.h +++ b/keyboards/percent/skog/skog.h @@ -32,7 +32,6 @@ along with this program. If not, see . { K01, K11, K21, K31, K41, K51, K61, KC_NO, K81, K91, KA1, KB1, KC1, KD1 }, \ { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2 }, \ { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3 }, \ - { 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 }, \ { K05, K15, K25, K35, K45, K55, K65, K75, K85, K95, KA5, KB5, KC5, KC_NO }, \ { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6 }, \ { K07, K17, K27, K37, KC_NO, K57, KC_NO, KC_NO, K87, K97, KA7, KB7, KC7, KD7 } \ diff --git a/keyboards/winkeyless/bface/config.h b/keyboards/winkeyless/bface/config.h index 9d90e16a3d51..95d44557a51a 100644 --- a/keyboards/winkeyless/bface/config.h +++ b/keyboards/winkeyless/bface/config.h @@ -35,6 +35,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, D7} #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/winkeyless/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c index 87a31d05203c..f44fd36a8cc7 100644 --- a/keyboards/winkeyless/bmini/bmini.c +++ b/keyboards/winkeyless/bmini/bmini.c @@ -16,6 +16,3 @@ along with this program. If not, see . */ #include "bmini.h" - -__attribute__ ((weak)) -void matrix_scan_user(void) {} diff --git a/keyboards/winkeyless/bmini/config.h b/keyboards/winkeyless/bmini/config.h index 37df80f80a13..f8a26e4f0049 100644 --- a/keyboards/winkeyless/bmini/config.h +++ b/keyboards/winkeyless/bmini/config.h @@ -31,6 +31,9 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/winkeyless/bmini/matrix.c b/keyboards/winkeyless/bmini/matrix.c deleted file mode 100644 index 57aa36b5ff74..000000000000 --- a/keyboards/winkeyless/bmini/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/winkeyless/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk index 7822bd83010d..530e8ea32979 100644 --- a/keyboards/winkeyless/bmini/rules.mk +++ b/keyboards/winkeyless/bmini/rules.mk @@ -22,7 +22,3 @@ RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/winkeyless/bminiex/config.h b/keyboards/winkeyless/bminiex/config.h index 35c8ce933dd7..037ca002840b 100644 --- a/keyboards/winkeyless/bminiex/config.h +++ b/keyboards/winkeyless/bminiex/config.h @@ -30,6 +30,9 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/winkeyless/bminiex/matrix.c b/keyboards/winkeyless/bminiex/matrix.c deleted file mode 100644 index 8faaed8ac0d0..000000000000 --- a/keyboards/winkeyless/bminiex/matrix.c +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" -#include "backlight.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -__attribute__ ((weak)) -void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) {} -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/winkeyless/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk index 39a77bda1276..2c999dcbf6f4 100644 --- a/keyboards/winkeyless/bminiex/rules.mk +++ b/keyboards/winkeyless/bminiex/rules.mk @@ -29,6 +29,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC += backlight.c diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index a56a1b54b882..00f6bd292c05 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h @@ -35,7 +35,9 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -#define DIODE_DIRECTION ROW2COL +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#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 12 diff --git a/keyboards/ymd75/matrix.c b/keyboards/ymd75/matrix.c deleted file mode 100644 index a726ee889f6f..000000000000 --- a/keyboards/ymd75/matrix.c +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro -Modified 2018 by Wayne K Jones - -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 "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation - //matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 0c1c9110ca83..eb41e19cf3c3 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -33,6 +33,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c index 74f7c6a493d9..e32a745bfd01 100644 --- a/keyboards/ymd75/ymd75.c +++ b/keyboards/ymd75/ymd75.c @@ -20,16 +20,6 @@ along with this program. If not, see . #include "backlight.h" #include "backlight_custom.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { diff --git a/keyboards/ymd75/ymd75.h b/keyboards/ymd75/ymd75.h index e17dedeb312c..0c9fff58cbe7 100644 --- a/keyboards/ymd75/ymd75.h +++ b/keyboards/ymd75/ymd75.h @@ -25,8 +25,6 @@ along with this program. If not, see . #include "keycode.h" #include "action.h" -void matrix_init_user(void); - #define LAYOUT( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h index 5c496d8d25f3..1232f90c28be 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h @@ -31,7 +31,8 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -//#define DIODE_DIRECTION ROW2COL +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } //#define RGB_DI_PIN C4 /* COL2ROW or ROW2COL */ diff --git a/keyboards/ymd96/matrix.c b/keyboards/ymd96/matrix.c deleted file mode 100644 index 2932976dde20..000000000000 --- a/keyboards/ymd96/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/ymd96/rules.mk b/keyboards/ymd96/rules.mk index 19d9fd81abb3..3c892daabb61 100644 --- a/keyboards/ymd96/rules.mk +++ b/keyboards/ymd96/rules.mk @@ -31,6 +31,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c diff --git a/keyboards/ymd96/ymd96.c b/keyboards/ymd96/ymd96.c index 546a4c6e3af2..eae84ade1948 100644 --- a/keyboards/ymd96/ymd96.c +++ b/keyboards/ymd96/ymd96.c @@ -21,16 +21,6 @@ along with this program. If not, see . #include "backlight.h" #include "backlight_custom.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { diff --git a/keyboards/ymd96/ymd96.h b/keyboards/ymd96/ymd96.h index a516297c1980..c89be7168658 100644 --- a/keyboards/ymd96/ymd96.h +++ b/keyboards/ymd96/ymd96.h @@ -20,8 +20,6 @@ along with this program. If not, see . #include "quantum.h" -void matrix_init_user(void); // TODO port this to other PS2AVRGB boards - #define LAYOUT_default( \ K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K2E, K0D, K76, K79, K78, \ K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K46, K47, K48, K49, \ diff --git a/keyboards/ymdk/bface/config.h b/keyboards/ymdk/bface/config.h index 9e5a9134ff21..2273b7e84e62 100644 --- a/keyboards/ymdk/bface/config.h +++ b/keyboards/ymdk/bface/config.h @@ -34,6 +34,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, D7} #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + #define NO_UART 1 #define BACKLIGHT_PIN D4 diff --git a/keyboards/ymdk/bface/rules.mk b/keyboards/ymdk/bface/rules.mk index 7b829530b23d..f6f026cf3002 100644 --- a/keyboards/ymdk/bface/rules.mk +++ b/keyboards/ymdk/bface/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2019 Ethan Durrant (emdarcher) -# -# 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 . - # MCU name MCU = atmega32a diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 4a846f5e94c4..60c5277761c6 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -29,8 +29,10 @@ along with this program. If not, see . #define PRODUCT np21 /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 +#define MATRIX_ROWS 4 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ymdk_np21/matrix.c b/keyboards/ymdk_np21/matrix.c deleted file mode 100644 index b2bfb2f0bb2e..000000000000 --- a/keyboards/ymdk_np21/matrix.c +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation - - return 1; -} - -__attribute__ ((weak)) -void matrix_scan_user(void) {}; - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - // Looping keyboard code goes here - // This runs every cycle (a lot) - matrix_scan_user(); -}; - -__attribute__ ((weak)) -void matrix_init_user(void) {}; - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index 2bab3043e873..772bee92855d 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -31,6 +31,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c diff --git a/keyboards/ymdk_np21/ymdk_np21.h b/keyboards/ymdk_np21/ymdk_np21.h index 728406d6e5e6..2cd2d13c21ab 100644 --- a/keyboards/ymdk_np21/ymdk_np21.h +++ b/keyboards/ymdk_np21/ymdk_np21.h @@ -23,8 +23,6 @@ along with this program. If not, see . #include "keycode.h" #include "action.h" -void matrix_init_user(void); // TODO port this to other PS2AVRGB boards - #define LAYOUT( \ K01, K02, K03, K04, K05, K06, \ K11, K12, K13, K14, K15, K16, \ From 8ec0b378bc5cd0f0154e24c4a765f91b60791f2c Mon Sep 17 00:00:00 2001 From: xyzz <1065521+xyzz@users.noreply.github.com> Date: Thu, 2 Jan 2020 07:49:53 -0500 Subject: [PATCH 124/973] Fix typo in action.c (#7757) --- tmk_core/common/action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index bd6aeba4f84e..7fbdbd8c3cdb 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -552,7 +552,7 @@ void process_action(keyrecord_t *record, action_t action) { action_macro_play(action_get_macro(record, action.func.id, action.func.opt)); break; #endif -#if defined(BACKLIGHT_ENABLE) | defined(LED_MATRIX_ENABLE) +#if defined(BACKLIGHT_ENABLE) || defined(LED_MATRIX_ENABLE) case ACT_BACKLIGHT: if (!event.pressed) { switch (action.backlight.opt) { From 53757f97059ce02a1af31aae456b168954f5232e Mon Sep 17 00:00:00 2001 From: marhalloweenvt Date: Thu, 2 Jan 2020 23:57:47 +0700 Subject: [PATCH 125/973] [Keyboard] Add p65rgb PCB (#7753) * [Keyboard] Add new keyboard Symmetry60 * Add new keyboard Symmetry60 * Fix Typo * Update keyboards/handwired/symmetry60/config.h * Update keyboards/handwired/symmetry60/readme.md * Update keyboards/handwired/symmetry60/readme.md * Update keyboards/handwired/symmetry60/readme.md * Update keyboards/handwired/symmetry60/rules.mk * Update keyboards/handwired/symmetry60/symmetry60.h * Update keyboards/handwired/symmetry60/symmetry60.h * Update keyboards/handwired/symmetry60/symmetry60.h * Update readme.md * Update keymap.c * Update keymap.c * Update keymap.c * Update rules.mk * Update symmetry60.c * Update keyboards/handwired/symmetry60/rules.mk * Add ColorLice * Update ColorLice - Adjust info.json to support Configurator - Adjust layout name to fit with info.json - Seperate 2 feature: RGB Switch and RGB Underglow * Update new way of control lock leds * Remove #ifndef COLORLICE_H * Update make example * Revert Helix * Revert Helix * Revert Helix * Revert Helix * Update keyboards/handwired/colorlice/colorlice.h * Update keyboards/handwired/colorlice/colorlice.h * Update default keymap * Revert Helix * Update keyboards/handwired/colorlice/readme.md * Update keyboards/handwired/colorlice/rules.mk * Update keyboards/handwired/colorlice/colorlice.c * Update keyboards/handwired/colorlice/colorlice.c * Remove unnecessary function * Update keyboards/handwired/colorlice/colorlice.c * Adjust rules option for working with Configurator - Move RGB_MATRIX_ENABLE and RGBLIGHT_ENABLE to keyboard rule. - Add RGB_DI_PIN in keyboard config * Update keyboards/helix/rev2/keymaps/default/keymap.c * Update keyboards/handwired/colorlice/readme.md * Update keymap for Colorlice * Adjust rules.mk to use space indent * Update ColorLice to work with QMK online configurator - Delete rgb_underglow keymap - Move config from keymap layer to keyboard layer - Tweak a little layout so it can appear default layout on QMK config * Update keyboards/handwired/colorlice/rules.mk * Update keyboards/handwired/colorlice/rules.mk * Add p65rgb * Update keyboards/handwired/p65rgb/config.h * Update p65rgb.c * Update keymap.c * Update rules.mk --- keyboards/handwired/p65rgb/config.h | 64 +++++++++++++++ keyboards/handwired/p65rgb/info.json | 82 +++++++++++++++++++ .../handwired/p65rgb/keymaps/default/keymap.c | 33 ++++++++ keyboards/handwired/p65rgb/p65rgb.c | 49 +++++++++++ keyboards/handwired/p65rgb/p65rgb.h | 42 ++++++++++ keyboards/handwired/p65rgb/readme.md | 15 ++++ keyboards/handwired/p65rgb/rules.mk | 33 ++++++++ 7 files changed, 318 insertions(+) create mode 100644 keyboards/handwired/p65rgb/config.h create mode 100644 keyboards/handwired/p65rgb/info.json create mode 100644 keyboards/handwired/p65rgb/keymaps/default/keymap.c create mode 100644 keyboards/handwired/p65rgb/p65rgb.c create mode 100644 keyboards/handwired/p65rgb/p65rgb.h create mode 100644 keyboards/handwired/p65rgb/readme.md create mode 100644 keyboards/handwired/p65rgb/rules.mk diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h new file mode 100644 index 000000000000..c3900c7ec802 --- /dev/null +++ b/keyboards/handwired/p65rgb/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2019 marhalloweenvt + +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 0x75B4 +#define DEVICE_VER 0x0001 +#define MANUFACTURER marhalloweenvt +#define PRODUCT p65rgb +#define DESCRIPTION Replacement PCB for e6.5 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 17 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C7, C6, B6, B5, D5 } +#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B0, B1, B2, B3, B7, D0, D1, D2, D3, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B4 +#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_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DRIVER_LED_TOTAL 83 +#define RGBLIGHT_LIMIT_VAL 180 + +/* 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 + +#define QMK_ESC_OUTPUT E6 // usually COL +#define QMK_ESC_INPUT C7 // usually ROW diff --git a/keyboards/handwired/p65rgb/info.json b/keyboards/handwired/p65rgb/info.json new file mode 100644 index 000000000000..b3901525d324 --- /dev/null +++ b/keyboards/handwired/p65rgb/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "p65rgb", + "url": "", + "maintainer": "marhalloweenvt", + "width": 16, + "height": 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":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}, + {"label":"Enter", "x":13.75, "y":2, "w":1.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":"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, "w":1.25}, + {"label":"Menu", "x":11.25, "y":4, "w":1.25}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/p65rgb/keymaps/default/keymap.c b/keyboards/handwired/p65rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..2a9f6cc71214 --- /dev/null +++ b/keyboards/handwired/p65rgb/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2019 marhalloweenvt + * + * 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( /* 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_GRV, 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_PGUP, + 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_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, TO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_APP, KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT( /* FN */ + 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_TRNS, KC_TRNS, KC_INS, + 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_HOME, + CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_END, + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, NK_TOGG, 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), + +}; diff --git a/keyboards/handwired/p65rgb/p65rgb.c b/keyboards/handwired/p65rgb/p65rgb.c new file mode 100644 index 000000000000..5c045c2fc140 --- /dev/null +++ b/keyboards/handwired/p65rgb/p65rgb.c @@ -0,0 +1,49 @@ +/* Copyright 2019 marhalloweenvt + * + * 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 "p65rgb.h" + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, + { 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17 }, + { 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 }, + { 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51 }, + { 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82 } +}, { + { 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 }, {195, 0 }, {205, 0 }, {210, 0 }, {224, 0 }, + { 224,16 }, {224, 16 }, {210, 16 }, {180, 16 }, {165, 16 }, {150, 16 }, {135, 16 }, {120, 16 }, {105, 16 }, { 90, 16 }, { 75, 16 }, { 60, 16 }, { 45, 16 }, { 30, 16 }, { 15, 16 }, { 0, 16 }, { 0, 16 }, + { 0, 32 }, { 0, 32 }, { 15, 32 }, { 30, 32 }, { 45, 32 }, { 60, 32 }, { 75, 32 }, { 90, 32 }, {105, 32 }, {120, 32 }, {135, 32 }, {150, 32 }, {165, 32 }, {190, 32 }, {205, 32 }, {210, 32 }, {224, 32 }, + { 224, 8 }, {224, 48 }, {210, 48 }, {195, 48 }, {180, 48 }, {150, 48 }, {135, 48 }, {120, 48 }, {105, 48 }, { 90, 48 }, { 75, 48 }, { 60, 48 }, { 45, 48 }, { 30, 48 }, { 15, 48 }, { 0, 48 }, { 0, 48 }, + { 0, 64 }, { 0, 64 }, { 0, 64 }, { 15, 64 }, { 15, 64 }, { 40, 64 }, { 90, 64 }, {105, 64 }, {150, 64 }, {180, 64 }, {180, 64 }, {195, 64 }, {210, 64 }, {220, 64 }, {224, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, + 2, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 2, 2, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 +} }; + +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} diff --git a/keyboards/handwired/p65rgb/p65rgb.h b/keyboards/handwired/p65rgb/p65rgb.h new file mode 100644 index 000000000000..fd7e216d13fa --- /dev/null +++ b/keyboards/handwired/p65rgb/p65rgb.h @@ -0,0 +1,42 @@ +/* Copyright 2019 marhalloweenvt + * + * 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, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, K2e, k2f, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3c, k3e, k3f, \ + k40, k41, k42, k45, k49, k4a, k4c, k4e, k4f \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, k1f, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, K2e, k2f, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, KC_NO, k3c, KC_NO, k3e, k3f, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO, k4c, KC_NO, k4e, k4f, KC_NO }, \ +} + diff --git a/keyboards/handwired/p65rgb/readme.md b/keyboards/handwired/p65rgb/readme.md new file mode 100644 index 000000000000..e0c787b86e1f --- /dev/null +++ b/keyboards/handwired/p65rgb/readme.md @@ -0,0 +1,15 @@ +# p65rgb + +![p65rgb](https://i.imgur.com/Z3RfOXe.jpg) + +A replacement PCB for my E6.5 Keyboard + +* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt) +* Hardware Supported: p65rgb +* Hardware Availability: p65rgb + +Make example for this keyboard (after setting up your build environment): + + make handwired/p65rgb: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/p65rgb/rules.mk b/keyboards/handwired/p65rgb/rules.mk new file mode 100644 index 000000000000..297aa1cd77a5 --- /dev/null +++ b/keyboards/handwired/p65rgb/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 = 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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = WS2812 # Enable keyboard RGB backlight functionality with ws2812 driver +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 3650d59afe69484c7d8c489763e04ddd3d79c03b Mon Sep 17 00:00:00 2001 From: Akaash Suresh Date: Thu, 2 Jan 2020 11:52:23 -0600 Subject: [PATCH 126/973] Merge upstream/master with userspace --- keyboards/crkbd/keymaps/curry/config.h | 31 ++ keyboards/crkbd/keymaps/curry/keymap.c | 61 +++ keyboards/crkbd/keymaps/curry/rules.mk | 22 ++ keyboards/lily58/keymaps/curry/config.h | 7 + keyboards/lily58/keymaps/curry/keymap.c | 71 ++++ keyboards/lily58/keymaps/curry/rules.mk | 17 + users/curry/.gitignore | 1 + users/curry/config.h | 116 ++++++ users/curry/curry.c | 131 +++++++ users/curry/curry.h | 57 +++ users/curry/oled.c | 162 ++++++++ users/curry/process_records.c | 85 +++++ users/curry/process_records.h | 104 ++++++ users/curry/rgb_stuff.c | 471 ++++++++++++++++++++++++ users/curry/rgb_stuff.h | 32 ++ users/curry/rgblight_breathe_table.h | 118 ++++++ users/curry/rules.mk | 61 +++ users/curry/tap_dances.c | 3 + users/curry/tap_dances.h | 3 + users/curry/wrappers.h | 92 +++++ 20 files changed, 1645 insertions(+) create mode 100644 keyboards/crkbd/keymaps/curry/config.h create mode 100644 keyboards/crkbd/keymaps/curry/keymap.c create mode 100644 keyboards/crkbd/keymaps/curry/rules.mk create mode 100644 keyboards/lily58/keymaps/curry/config.h create mode 100644 keyboards/lily58/keymaps/curry/keymap.c create mode 100644 keyboards/lily58/keymaps/curry/rules.mk create mode 100644 users/curry/.gitignore create mode 100644 users/curry/config.h create mode 100644 users/curry/curry.c create mode 100644 users/curry/curry.h create mode 100644 users/curry/oled.c create mode 100644 users/curry/process_records.c create mode 100644 users/curry/process_records.h create mode 100644 users/curry/rgb_stuff.c create mode 100644 users/curry/rgb_stuff.h create mode 100644 users/curry/rgblight_breathe_table.h create mode 100644 users/curry/rules.mk create mode 100644 users/curry/tap_dances.c create mode 100644 users/curry/tap_dances.h create mode 100644 users/curry/wrappers.h diff --git a/keyboards/crkbd/keymaps/curry/config.h b/keyboards/crkbd/keymaps/curry/config.h new file mode 100644 index 000000000000..2bb61d3fe7e8 --- /dev/null +++ b/keyboards/crkbd/keymaps/curry/config.h @@ -0,0 +1,31 @@ +#pragma once + +#define MASTER_RIGHT +#define USE_SERIAL_PD2 + +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLED_NUM 27 + +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 5 +# define RGBLIGHT_LIMIT_VAL 120 +#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_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 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 +#endif + +#define OLED_DISABLE_TIMEOUT +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/crkbd/keymaps/curry/keymap.c b/keyboards/crkbd/keymaps/curry/keymap.c new file mode 100644 index 000000000000..23c7c46c7f3f --- /dev/null +++ b/keyboards/crkbd/keymaps/curry/keymap.c @@ -0,0 +1,61 @@ +#include "curry.h" + +#define LAYOUT_crkbd_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_wrapper( \ + KC_GESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + M_LCTL, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, M_RALT, \ + OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ + KC_GRV, OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, OS_RGUI \ + ) +#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_crkbd_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_crkbd_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_crkbd_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_MODS] = LAYOUT_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, KC_RSFT, + _______, _______, _______, _______, _______, _______ + ), + [_LOWER] = LAYOUT_wrapper( + _______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_PIPE, + KC_F11, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_F12, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_wrapper( \ + _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_wrapper( \ + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, + _______, _______, _______, _______, TG_MODS, _______ + ) +}; diff --git a/keyboards/crkbd/keymaps/curry/rules.mk b/keyboards/crkbd/keymaps/curry/rules.mk new file mode 100644 index 000000000000..7f77b43f4c22 --- /dev/null +++ b/keyboards/crkbd/keymaps/curry/rules.mk @@ -0,0 +1,22 @@ +# 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 = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +RGB_MATRIX_ENABLE = WS2812 +TAP_DANCE_ENABLE = yes # Enable Tap Dance. +OLED_DRIVER_ENABLE = yes +BOOTLOADER = atmel-dfu +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/lily58/keymaps/curry/config.h b/keyboards/lily58/keymaps/curry/config.h new file mode 100644 index 000000000000..229213b3caf6 --- /dev/null +++ b/keyboards/lily58/keymaps/curry/config.h @@ -0,0 +1,7 @@ +#pragma once + +#define MASTER_LEFT +#define USE_SERIAL_PD2 + +#define OLED_DISABLE_TIMEOUT +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/lily58/keymaps/curry/keymap.c b/keyboards/lily58/keymaps/curry/keymap.c new file mode 100644 index 000000000000..3e2e0ae4903e --- /dev/null +++ b/keyboards/lily58/keymaps/curry/keymap.c @@ -0,0 +1,71 @@ +#include "curry.h" + +#define LAYOUT_lily58_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, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ + ) \ + LAYOUT_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_GRV, \ + KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSLS, \ + KC_LCTL, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ + OS_LSFT, K31, K32, K33, K34, K35, KC_LBRC, KC_RBRC, K36, K37, K38, K39, K3A, OS_RSFT, \ + OS_LGUI, OS_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, OS_RGUI \ + ) +#define LAYOUT_lily58_base_wrapper(...) LAYOUT_lily58_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_lily58_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_lily58_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_lily58_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_MODS] = LAYOUT_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_wrapper( \ + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F12, + _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, _______, + _______, _________________LOWER_L3__________________, _______, _______, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_wrapper( \ + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, _______, + _______, _________________RAISE_L3__________________, _______, _______, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_wrapper( \ + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + MG_NKRO, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, RGB_IDL, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/lily58/keymaps/curry/rules.mk b/keyboards/lily58/keymaps/curry/rules.mk new file mode 100644 index 000000000000..4e73f47f49b9 --- /dev/null +++ b/keyboards/lily58/keymaps/curry/rules.mk @@ -0,0 +1,17 @@ +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 = 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. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes # Enable Tap Dance. +OLED_DRIVER_ENABLE = yes +BOOTLOADER = atmel-dfu +SPLIT_TRANSPORT = mirror diff --git a/users/curry/.gitignore b/users/curry/.gitignore new file mode 100644 index 000000000000..c6df8c013951 --- /dev/null +++ b/users/curry/.gitignore @@ -0,0 +1 @@ +secrets.c diff --git a/users/curry/config.h b/users/curry/config.h new file mode 100644 index 000000000000..ac4a8f0709e5 --- /dev/null +++ b/users/curry/config.h @@ -0,0 +1,116 @@ +#pragma once + +// Use custom magic number so that when switching branches, EEPROM always gets reset +#define EECONFIG_MAGIC_NUMBER (uint16_t)0x420 + +/* Set Polling rate to 1000Hz */ +#define USB_POLLING_INTERVAL_MS 1 + +#ifdef RGBLIGHT_ENABLE +# undef RGBLIGHT_ANIMATIONS +# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) +# define RGBLIGHT_SLEEP +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +# else +# define RGBLIGHT_ANIMATIONS +# endif +#endif // RGBLIGHT_ENABLE + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # 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_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +// # define EECONFIG_RGB_MATRIX (uint32_t *)16 + +# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) +# define DISABLE_RGB_MATRIX_ALPHAS_MODS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BREATHING +# define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_VAL +# 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_DUAL_BEACON +# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +# 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 +# endif // AVR +#endif // RGB_MATRIX_ENABLE + +#ifndef ONESHOT_TAP_TOGGLE +# define ONESHOT_TAP_TOGGLE 2 +#endif // !ONESHOT_TAP_TOGGLE + +#ifndef ONESHOT_TIMEOUT +# define ONESHOT_TIMEOUT 3000 +#endif // !ONESHOT_TIMEOUT + +#ifndef QMK_KEYS_PER_SCAN +# define QMK_KEYS_PER_SCAN 4 +#endif // !QMK_KEYS_PER_SCAN + +// this makes it possible to do rolling combos (zx) with keys that +// convert to other keys on hold (z becomes ctrl when you hold it, +// and when this option isn't enabled, z rapidly followed by x +// actually sends Ctrl-x. That's bad.) +#define IGNORE_MOD_TAP_INTERRUPT +#undef PERMISSIVE_HOLD +//#define TAPPING_FORCE_HOLD +//#define RETRO_TAPPING + +#define FORCE_NKRO + +#ifndef TAPPING_TOGGLE +# define TAPPING_TOGGLE 1 +#endif + +#ifdef TAPPING_TERM +# undef TAPPING_TERM +#endif // TAPPING_TERM +#if defined(KEYBOARD_ergodox_ez) +# define TAPPING_TERM 185 +#elif defined(KEYBOARD_crkbd) +# define TAPPING_TERM 200 +#else +# define TAPPING_TERM 175 +#endif + +#define TAP_CODE_DELAY 5 + +/* Disable unused and unneeded features to reduce on firmware size */ +#ifdef LOCKING_SUPPORT_ENABLE +# undef LOCKING_SUPPORT_ENABLE +#endif +#ifdef LOCKING_RESYNC_ENABLE +# undef LOCKING_RESYNC_ENABLE +#endif diff --git a/users/curry/curry.c b/users/curry/curry.c new file mode 100644 index 000000000000..b6afa5ef2e7a --- /dev/null +++ b/users/curry/curry.c @@ -0,0 +1,131 @@ +#include "curry.h" + +userspace_config_t userspace_config; + +#define CURRY_UNICODE_MODE 1 + +void bootmagic_lite(void) { + matrix_scan(); +#if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 + wait_ms(DEBOUNCING_DELAY * 2); +#elif defined(DEBOUNCE) && DEBOUNCE > 0 + wait_ms(DEBOUNCE * 2); +#else + wait_ms(30); +#endif + matrix_scan(); + if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { + bootloader_jump(); + } +} + +__attribute__((weak)) void keyboard_pre_init_keymap(void) {} + +void keyboard_pre_init_user(void) { + userspace_config.raw = eeconfig_read_user(); + keyboard_pre_init_keymap(); +} + +__attribute__((weak)) void matrix_init_keymap(void) {} + +// Call user matrix init, set default RGB colors and then +// call the keymap's init function +void matrix_init_user(void) { +#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(CURRY_UNICODE_MODE); + get_unicode_input_mode(); +#endif // UNICODE_ENABLE + matrix_init_keymap(); +} + +__attribute__((weak)) void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + keyboard_post_init_rgb(); +#endif + keyboard_post_init_keymap(); +} + +__attribute__((weak)) void shutdown_keymap(void) {} + +void rgb_matrix_update_pwm_buffers(void); + +// On RESET, set all RGB to red, shutdown the keymap. +void shutdown_user(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(1); + rgblight_setrgb_red(); +#endif // RGBLIGHT_ENABLE +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_color_all(0xFF, 0x00, 0x00); + rgb_matrix_update_pwm_buffers(); +#endif // RGB_MATRIX_ENABLE + shutdown_keymap(); +} + +__attribute__((weak)) void suspend_power_down_keymap(void) {} + +void suspend_power_down_user(void) { suspend_power_down_keymap(); } + +__attribute__((weak)) void suspend_wakeup_init_keymap(void) {} + +void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } + +__attribute__((weak)) void matrix_scan_keymap(void) {} + +// No global matrix scan code, so just run keymap's matrix +// scan function +void matrix_scan_user(void) { + static bool has_ran_yet; + if (!has_ran_yet) { + has_ran_yet = true; + startup_user(); + } + +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + matrix_scan_rgb(); +#endif // RGBLIGHT_ENABLE + + matrix_scan_keymap(); +} + +__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } + +// On Layer change, run keymap's layer change check +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + state = layer_state_set_rgb(state); +#endif // RGBLIGHT_ENABLE + return layer_state_set_keymap(state); +} + +__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } + +// Runs state check and changes underglow color and animation +layer_state_t default_layer_state_set_user(layer_state_t state) { + return default_layer_state_set_keymap(state); +} + +__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} + +// Any custom LED code goes here. +void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } + +__attribute__((weak)) void eeconfig_init_keymap(void) {} + +void eeconfig_init_user(void) { + userspace_config.raw = 0; + userspace_config.rgb_layer_change = true; + eeconfig_update_user(userspace_config.raw); +#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(CURRY_UNICODE_MODE); + get_unicode_input_mode(); +#else + eeprom_update_byte(EECONFIG_UNICODEMODE, CURRY_UNICODE_MODE); +#endif + eeconfig_init_keymap(); + keyboard_init(); +} diff --git a/users/curry/curry.h b/users/curry/curry.h new file mode 100644 index 000000000000..985453c49bfa --- /dev/null +++ b/users/curry/curry.h @@ -0,0 +1,57 @@ +#pragma once + +#include QMK_KEYBOARD_H + +#include "version.h" +#include "eeprom.h" +#include "wrappers.h" +#include "process_records.h" + +#ifdef TAP_DANCE_ENABLE +# include "tap_dances.h" +#endif // TAP_DANCE_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +# include "rgb_stuff.h" +#endif +#if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA) +# include "lufa.h" +# include "split_util.h" +#endif + +/* Define layer names */ +enum userspace_layers { + _QWERTY = 0, + _NUMLOCK = 0, + _COLEMAK, + _DVORAK, + _MODS, + _LOWER, + _RAISE, + _ADJUST, +}; + +void matrix_init_keymap(void); +void shutdown_keymap(void); +void suspend_power_down_keymap(void); +void suspend_wakeup_init_keymap(void); +void matrix_scan_keymap(void); +layer_state_t layer_state_set_keymap(layer_state_t state); +layer_state_t default_layer_state_set_keymap(layer_state_t state); +void led_set_keymap(uint8_t usb_led); +void eeconfig_init_keymap(void); + +// clang-format off +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + bool is_overwatch :1; + bool nuke_switch :1; + uint8_t unicode_mod :4; + bool swapped_numbers :1; + bool rgb_matrix_idle_anim :1; + }; +} userspace_config_t; +// clang-format on + +extern userspace_config_t userspace_config; diff --git a/users/curry/oled.c b/users/curry/oled.c new file mode 100644 index 000000000000..4eb23423eb61 --- /dev/null +++ b/users/curry/oled.c @@ -0,0 +1,162 @@ +#include "curry.h" + +#ifdef OLED_DRIVER_ENABLE +#define KEYLOGGER_LENGTH 5 +static uint32_t oled_timer = 0; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; +static uint16_t log_timer = 0; +// clang-format off +static const char PROGMEM code_to_name[0xFF] = { +// 0 1 2 3 4 5 6 7 8 9 A B c D E F + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x + '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x + ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x + ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx + 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx +}; + +void add_keylog(uint16_t keycode); + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } + +void add_keylog(uint16_t keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { + keycode = keycode & 0xFF; + } else if (keycode > 0xFF) { + keycode = 0; + } + + for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { + keylog_str[i] = keylog_str[i - 1]; + } + + if (keycode < (sizeof(code_to_name) / sizeof(char))) { + keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); + } + + log_timer = timer_read(); +} + +void render_keylogger_status(void) { + oled_write_P(PSTR("Keys"), false); + oled_write(keylog_str, false); +} + +void render_default_layer_state(void) { + oled_write_P(PSTR("Lyout"), false); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + oled_write_P(PSTR(" QRTY"), false); + break; + case _COLEMAK: + oled_write_P(PSTR(" COLE"), false); + break; + case _DVORAK: + oled_write_P(PSTR(" DVRK"), false); + break; + } +} + +void render_layer_state(void) { + oled_write_P(PSTR("LAYER"), false); + oled_write_P(PSTR("Lower"), layer_state_is(_LOWER)); + oled_write_P(PSTR("Raise"), layer_state_is(_RAISE)); + oled_write_P(PSTR(" Mods"), layer_state_is(_MODS)); +} + +void render_keylock_status(uint8_t led_usb_state) { + oled_write_P(PSTR("Lock:"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK)); + oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); + oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); +} + +void render_mod_status(uint8_t modifiers) { + oled_write_P(PSTR("Mods:"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); + oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL)); + oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT)); + oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI)); +} + +void render_bootmagic_status(void) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + oled_write_P(PSTR("BTMGK"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); + oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); + oled_write_P(PSTR(" "), false); + oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); + oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); + oled_write_P(PSTR(" NKRO"), keymap_config.nkro); +} + +void render_user_status(void) { + oled_write_P(PSTR("USER:"), false); + oled_write_P(PSTR(" Anim"), userspace_config.rgb_matrix_idle_anim); + oled_write_P(PSTR(" Layr"), userspace_config.rgb_layer_change); + oled_write_P(PSTR(" Nuke"), userspace_config.nuke_switch); +} + +void render_status_main(void) { + /* Show Keyboard Layout */ + render_default_layer_state(); + render_keylock_status(host_keyboard_leds()); + render_bootmagic_status(); + render_user_status(); + + render_keylogger_status(); +} + +void render_status_secondary(void) { + /* Show Keyboard Layout */ + render_default_layer_state(); + render_layer_state(); + render_mod_status(get_mods() | get_oneshot_mods()); + + render_keylogger_status(); +} + +void oled_task_user(void) { + if (timer_elapsed32(oled_timer) > 30000) { + oled_off(); + return; + } +# ifndef SPLIT_KEYBOARD + else { + oled_on(); + } +# endif + if (is_keyboard_master()) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_status_secondary(); + } +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + oled_timer = timer_read32(); + add_keylog(keycode); + } + return true; +} + +#endif diff --git a/users/curry/process_records.c b/users/curry/process_records.c new file mode 100644 index 000000000000..fd1d61ad9d80 --- /dev/null +++ b/users/curry/process_records.c @@ -0,0 +1,85 @@ +#include "curry.h" + +uint16_t copy_paste_timer; + +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } + +__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + switch (keycode) { + case KC_MAKE: + if (!record->event.pressed) { + uint8_t temp_mod = mod_config(get_mods()); + uint8_t temp_osm = mod_config(get_oneshot_mods()); + clear_mods(); + clear_oneshot_mods(); + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) { + send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); + } + if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { + send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); + } +#ifdef RGB_MATRIX_SPLIT_RIGHT + send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); +# ifndef OLED_DRIVER_ENABLE + send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); +# endif +#endif + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); + } + + break; + + case VRSN: // Prints firmware version + if (record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); + } + break; + + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_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; +#ifdef UNICODE_ENABLE + case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ + if (record->event.pressed) { + send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + } + break; + case UC_TABL: // ┬─┬ノ( º _ ºノ) + if (record->event.pressed) { + send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); + } + break; + case UC_SHRG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); + } + break; + case UC_DISA: // ಠ_ಠ + if (record->event.pressed) { + send_unicode_hex_string("0CA0 005F 0CA0"); + } + break; +#endif + } + return process_record_keymap(keycode, record) && +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + process_record_user_rgb(keycode, record) && +#endif // RGBLIGHT_ENABLE + process_record_secrets(keycode, record); +} diff --git a/users/curry/process_records.h b/users/curry/process_records.h new file mode 100644 index 000000000000..6170ed4c7efc --- /dev/null +++ b/users/curry/process_records.h @@ -0,0 +1,104 @@ +#pragma once +#include "curry.h" + +#if defined(KEYMAP_SAFE_RANGE) +# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE +#else +# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE +#endif + +enum userspace_custom_keycodes { + VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info + KC_QWERTY, // Sets default layer to QWERTY + KC_COLEMAK, // Sets default layer to COLEMAK + KC_DVORAK, // Sets default layer to DVORAK + KC_MAKE, // Run keyboard's customized make command + KC_RGB_T, // Toggles RGB Layer Indication mode + RGB_IDL, // RGB Idling animations + KC_SECRET_1, // test1 + KC_SECRET_2, // test2 + KC_SECRET_3, // test3 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ + KC_DT1, + KC_DT2, + KC_DT3, + KC_DT4, + NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes +}; + +bool process_record_secrets(uint16_t keycode, keyrecord_t *record); +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +#define TG_MODS TG(_MODS) +#define OS_LWR OSL(_LOWER) +#define OS_RSE OSL(_RAISE) + +#define KC_SEC1 KC_SECRET_1 +#define KC_SEC2 KC_SECRET_2 +#define KC_SEC3 KC_SECRET_3 +#define KC_SEC4 KC_SECRET_4 +#define KC_SEC5 KC_SECRET_5 + +#define QWERTY KC_QWERTY +#define DVORAK KC_DVORAK +#define COLEMAK KC_COLEMAK + +#define KC_RESET RESET +#define KC_RST KC_RESET + +#ifdef SWAP_HANDS_ENABLE +# define KC_C1R3 SH_T(KC_TAB) +#else // SWAP_HANDS_ENABLE +# define KC_C1R3 KC_TAB +#endif // SWAP_HANDS_ENABLE + +#define BK_LWER LT(_LOWER, KC_BSPC) +#define SP_LWER LT(_LOWER, KC_SPC) +#define DL_RAIS LT(_RAISE, KC_DEL) +#define ET_RAIS LT(_RAISE, KC_ENTER) + +/* OSM keycodes, to keep things clean and easy to change */ +#define KC_MLSF OSM(MOD_LSFT) +#define KC_MRSF OSM(MOD_RSFT) + +#define OS_LGUI OSM(MOD_LGUI) +#define OS_RGUI OSM(MOD_RGUI) +#define OS_LSFT OSM(MOD_LSFT) +#define OS_RSFT OSM(MOD_RSFT) +#define OS_LCTL OSM(MOD_LCTL) +#define OS_RCTL OSM(MOD_RCTL) +#define OS_LALT OSM(MOD_LALT) +#define OS_RALT OSM(MOD_RALT) +#define OS_MEH OSM(MOD_MEH) +#define OS_HYPR OSM(MOD_HYPR) + +#define M_LALT ALT_T(KC_TAB) +#define M_RALT RALT_T(KC_QUOT) + +#define M_LCTL CTL_T(KC_TAB) +#define M_RCTL RCTL_T(KC_QUOT) + +#define MT_ESC MT(MOD_LCTL, KC_ESC) + +#define ALT_APP ALT_T(KC_APP) + +#define MG_NKRO MAGIC_TOGGLE_NKRO + +#define UC_IRNY UC(0x2E2E) +#define UC_CLUE UC(0x203D) + +// KWin Window Switching +#define KC_DT1 LCTL(KC_F1) +#define KC_DT2 LCTL(KC_F2) +#define KC_DT3 LCTL(KC_F3) +#define KC_DT4 LCTL(KC_F4) diff --git a/users/curry/rgb_stuff.c b/users/curry/rgb_stuff.c new file mode 100644 index 000000000000..1129f70be9cc --- /dev/null +++ b/users/curry/rgb_stuff.c @@ -0,0 +1,471 @@ +#include "curry.h" +#include "rgb_stuff.h" +#include "eeprom.h" + +#if defined(RGBLIGHT_ENABLE) +extern rgblight_config_t rgblight_config; +bool has_initialized; + +void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } +#endif // RGBLIGHT_ENABLE + +#if defined(RGB_MATRIX_ENABLE) +static uint32_t hypno_timer; +# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL +# else +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN +# endif + +void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } + +void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } + +void check_default_layer(uint8_t mode, uint8_t type) { + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); + break; + case _COLEMAK: + rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); + break; + case _DVORAK: + rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); + break; + } +} + +void rgb_matrix_indicators_user(void) { + if (userspace_config.rgb_layer_change && +# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + !g_suspend_state && +# endif +# if defined(RGBLIGHT_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +# else + rgb_matrix_config.enable +# endif + ) { + switch (get_highest_layer(layer_state)) { + case _RAISE: + rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + case _LOWER: + rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + case _ADJUST: + rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + default: { + check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); + break; + } + } + check_default_layer(0, LED_FLAG_MODIFIER); + } +} +#endif + +/* Custom indicators for modifiers. + * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback. + * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. + */ +#ifdef RGBLIGHT_ENABLE +# ifdef INDICATOR_LIGHTS +void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { + if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { + if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { +# ifdef SHFT_LED1 + rgblight_sethsv_at(120, 255, 255, SHFT_LED1); +# endif // SHFT_LED1 +# ifdef SHFT_LED2 + rgblight_sethsv_at(120, 255, 255, SHFT_LED2); +# endif // SHFT_LED2 + } else { +# ifdef SHFT_LED1 + rgblight_sethsv_default_helper(SHFT_LED1); +# endif // SHFT_LED1 +# ifdef SHFT_LED2 + rgblight_sethsv_default_helper(SHFT_LED2); +# endif // SHFT_LED2 + } + if ((this_mod | this_osm) & MOD_MASK_CTRL) { +# ifdef CTRL_LED1 + rgblight_sethsv_at(0, 255, 255, CTRL_LED1); +# endif // CTRL_LED1 +# ifdef CTRL_LED2 + rgblight_sethsv_at(0, 255, 255, CTRL_LED2); +# endif // CTRL_LED2 + } else { +# ifdef CTRL_LED1 + rgblight_sethsv_default_helper(CTRL_LED1); +# endif // CTRL_LED1 +# ifdef CTRL_LED2 + rgblight_sethsv_default_helper(CTRL_LED2); +# endif // CTRL_LED2 + } + if ((this_mod | this_osm) & MOD_MASK_GUI) { +# ifdef GUI_LED1 + rgblight_sethsv_at(51, 255, 255, GUI_LED1); +# endif // GUI_LED1 +# ifdef GUI_LED2 + rgblight_sethsv_at(51, 255, 255, GUI_LED2); +# endif // GUI_LED2 + } else { +# ifdef GUI_LED1 + rgblight_sethsv_default_helper(GUI_LED1); +# endif // GUI_LED1 +# ifdef GUI_LED2 + rgblight_sethsv_default_helper(GUI_LED2); +# endif // GUI_LED2 + } + if ((this_mod | this_osm) & MOD_MASK_ALT) { +# ifdef ALT_LED1 + rgblight_sethsv_at(240, 255, 255, ALT_LED1); +# endif // ALT_LED1 +# ifdef GUI_LED2 + rgblight_sethsv_at(240, 255, 255, ALT_LED2); +# endif // GUI_LED2 + } else { +# ifdef GUI_LED1 + rgblight_sethsv_default_helper(ALT_LED1); +# endif // GUI_LED1 +# ifdef GUI_LED2 + rgblight_sethsv_default_helper(ALT_LED2); +# endif // GUI_LED2 + } + } +} + +/* Function for the indicators */ +void matrix_scan_indicator(void) { + if (has_initialized) { + set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); + } +} +# endif // INDICATOR_LIGHTS + +# ifdef RGBLIGHT_TWINKLE +static rgblight_fadeout lights[RGBLED_NUM]; + +__attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } + +/* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ +bool rgblight_twinkle_is_led_used(uint8_t index) { + switch (index) { +# ifdef INDICATOR_LIGHTS +# ifdef SHFT_LED1 + case SHFT_LED1: + return true; +# endif // SHFT_LED1 +# ifdef SHFT_LED2 + case SHFT_LED2: + return true; +# endif // SHFT_LED2 +# ifdef CTRL_LED1 + case CTRL_LED1: + return true; +# endif // CTRL_LED1 +# ifdef CTRL_LED2 + case CTRL_LED2: + return true; +# endif // CTRL_LED2 +# ifdef GUI_LED1 + case GUI_LED1: + return true; +# endif // GUI_LED1 +# ifdef GUI_LED2 + case GUI_LED2: + return true; +# endif // GUI_LED2 +# ifdef ALT_LED1 + case ALT_LED1: + return true; +# endif // ALT_LED1 +# ifdef ALT_LED2 + case ALT_LED2: + return true; +# endif // ALT_LED2 +# endif // INDICATOR_LIGHTS + default: + return rgblight_twinkle_is_led_used_keymap(index); + } +} + +/* Handler for fading/twinkling effect */ +void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive + bool litup = false; + for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { + if (lights[light_index].enabled && timer_elapsed(lights[light_index].timer) > 10) { + rgblight_fadeout *light = &lights[light_index]; + litup = true; + + if (light->life) { + light->life -= 1; + if (get_highest_layer(layer_state) == 0) { + sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); + } + light->timer = timer_read(); + } else { + if (light->enabled && get_highest_layer(layer_state) == 0) { + rgblight_sethsv_default_helper(light_index); + } + litup = light->enabled = false; + } + } + } + if (litup && get_highest_layer(layer_state) == 0) { + rgblight_set(); + } +} + +/* Triggers a LED to fade/twinkle. + * This function handles the selection of the LED and prepres for it to be used. + */ +void start_rgb_light(void) { + uint8_t indices[RGBLED_NUM]; + uint8_t indices_count = 0; + uint8_t min_life = 0xFF; + uint8_t min_life_index = -1; + for (uint8_t index = 0; index < RGBLED_NUM; ++index) { + if (rgblight_twinkle_is_led_used(index)) { + continue; + } + if (lights[index].enabled) { + if (min_life_index == -1 || lights[index].life < min_life) { + min_life = lights[index].life; + min_life_index = index; + } + continue; + } + + indices[indices_count] = index; + ++indices_count; + } + + uint8_t light_index; + if (!indices_count) { + light_index = min_life_index; + } else { + light_index = indices[rand() % indices_count]; + } + + rgblight_fadeout *light = &lights[light_index]; + light->enabled = true; + light->timer = timer_read(); + light->life = 0xC0 + rand() % 0x40; + + light->hue = rgblight_config.hue + (rand() % 0xB4) - 0x54; + + rgblight_sethsv_at(light->hue, 255, light->life, light_index); +} +# endif +#endif // RGBLIGHT_ENABLE + +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { + uint16_t temp_keycode = keycode; + // Filter out the actual keycode from MT and LT keys. + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + temp_keycode &= 0xFF; + } + +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + hypno_timer = timer_read32(); + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } +#endif + + switch (temp_keycode) { +#ifdef RGBLIGHT_TWINKLE + case KC_A ... KC_SLASH: + case KC_F1 ... KC_F12: + case KC_INSERT ... KC_UP: + case KC_KP_SLASH ... KC_KP_DOT: + case KC_F13 ... KC_F24: + case KC_AUDIO_MUTE ... KC_MEDIA_REWIND: + if (record->event.pressed) { + start_rgb_light(); + } + break; +#endif // RGBLIGHT_TWINKLE + case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + if (record->event.pressed) { + userspace_config.rgb_layer_change ^= 1; + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_layer_change) { + layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) + } + } +#endif // RGBLIGHT_ENABLE + break; + case RGB_IDL: // This allows me to use underglow as layer indication, or as normal +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (record->event.pressed) { + userspace_config.rgb_matrix_idle_anim ^= 1; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } + } +#endif + break; + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions + if (record->event.pressed) { + bool is_eeprom_updated = false; +#ifdef RGBLIGHT_ENABLE + // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled + if (userspace_config.rgb_layer_change) { + userspace_config.rgb_layer_change = false; + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + is_eeprom_updated = true; + } +#endif +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim) { + userspace_config.rgb_matrix_idle_anim = false; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + is_eeprom_updated = true; + } +#endif + if (is_eeprom_updated) { + eeconfig_update_user(userspace_config.raw); + } + } + break; + } + return true; +} + +void keyboard_post_init_rgb(void) { +#if defined(RGBLIGHT_ENABLE) +# if defined(RGBLIGHT_STARTUP_ANIMATION) + bool is_enabled = rgblight_config.enable; + if (userspace_config.rgb_layer_change) { + rgblight_enable_noeeprom(); + } + if (rgblight_config.enable) { + layer_state_set_user(layer_state); + uint16_t old_hue = rgblight_config.hue; + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + for (uint16_t i = 255; i > 0; i--) { + rgblight_sethsv_noeeprom((i + old_hue) % 255, 255, 255); + matrix_scan(); + wait_ms(10); + } + } + if (!is_enabled) { + rgblight_disable_noeeprom(); + } + +# endif + layer_state_set_user(layer_state); +#endif +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } +#endif +} + +void matrix_scan_rgb(void) { +#ifdef RGBLIGHT_ENABLE +# ifdef RGBLIGHT_TWINKLE + scan_rgblight_fadeout(); +# endif // RGBLIGHT_ENABLE + +# ifdef INDICATOR_LIGHTS + matrix_scan_indicator(); +# endif +#endif + +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } +#endif +} + +#ifdef RGBLIGHT_ENABLE +void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { + rgblight_sethsv_noeeprom(hue, sat, val); + wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly + rgblight_mode_noeeprom(mode); +} +#endif + +layer_state_t layer_state_set_rgb(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE + if (userspace_config.rgb_layer_change) { + switch (get_highest_layer(state)) { + case _RAISE: + rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_BREATHING + 3); + break; + case _LOWER: + rgblight_set_hsv_and_mode(HSV_GREEN, RGBLIGHT_MODE_BREATHING + 3); + break; + case _ADJUST: + rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); + break; + default: // for any other layers, or the default layer + { + uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; + switch (get_highest_layer(default_layer_state)) { + case _COLEMAK: + rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); + break; + case _DVORAK: + rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); + break; + default: + rgblight_set_hsv_and_mode(HSV_CYAN, mode); + break; + } + break; + } + } + } +#endif // RGBLIGHT_ENABLE + + return state; +} + +#ifdef RGB_MATRIX_ENABLE +# include "lib/lib8tion/lib8tion.h" +extern led_config_t g_led_config; + +void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { + HSV hsv = {hue, sat, val}; + if (hsv.v > rgb_matrix_config.hsv.v) { + hsv.v = rgb_matrix_config.hsv.v; + } + + switch (mode) { + case 1: // breathing + { + uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); + hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + break; + } + default: // Solid Color + { + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + break; + } + } +} +#endif diff --git a/users/curry/rgb_stuff.h b/users/curry/rgb_stuff.h new file mode 100644 index 000000000000..50b73c1c3cbe --- /dev/null +++ b/users/curry/rgb_stuff.h @@ -0,0 +1,32 @@ +#pragma once +#include "quantum.h" +#ifdef RGB_MATRIX_ENABLE +# include "rgb_matrix.h" +#endif + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) +typedef struct { + bool enabled; + uint8_t hue; + uint16_t timer; + uint8_t life; +} rgblight_fadeout; +#endif + +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); +void keyboard_post_init_rgb(void); +void matrix_scan_rgb(void); +layer_state_t layer_state_set_rgb(layer_state_t state); +layer_state_t default_layer_state_set_rgb(layer_state_t state); + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) +void scan_rgblight_fadeout(void); +#endif +#if defined(RGBLIGHT_ENABLE) +void rgblight_sethsv_default_helper(uint8_t index); +#endif + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); +void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); +#endif diff --git a/users/curry/rgblight_breathe_table.h b/users/curry/rgblight_breathe_table.h new file mode 100644 index 000000000000..4c6ae38faa4b --- /dev/null +++ b/users/curry/rgblight_breathe_table.h @@ -0,0 +1,118 @@ +#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE +#define RGBLIGHT_EFFECT_BREATHE_TABLE + +// clang-format off +const uint8_t rgblight_effect_breathe_table[] PROGMEM = { +/* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */ +/* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 256 + 0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e, + 0x4f, 0x51, 0x52, 0x54, 0x55, 0x57, 0x58, 0x5a, + 0x5c, 0x5d, 0x5f, 0x60, 0x62, 0x64, 0x65, 0x67, + 0x69, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x73, 0x75, + 0x77, 0x79, 0x7b, 0x7c, 0x7e, 0x80, 0x82, 0x84, + 0x86, 0x88, 0x8a, 0x8b, 0x8d, 0x8f, 0x91, 0x93, + 0x95, 0x97, 0x99, 0x9b, 0x9d, 0x9f, 0xa1, 0xa3, + 0xa5, 0xa7, 0xa9, 0xaa, 0xac, 0xae, 0xb0, 0xb2, + 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, 0xbf, 0xc1, + 0xc3, 0xc5, 0xc7, 0xc9, 0xca, 0xcc, 0xce, 0xd0, + 0xd1, 0xd3, 0xd5, 0xd6, 0xd8, 0xda, 0xdb, 0xdd, + 0xde, 0xe0, 0xe1, 0xe3, 0xe4, 0xe5, 0xe7, 0xe8, + 0xe9, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, + 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf8, + 0xf9, 0xfa, 0xfa, 0xfb, 0xfc, 0xfc, 0xfc, 0xfd, + 0xfd, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfd, + 0xfd, 0xfc, 0xfc, 0xfc, 0xfb, 0xfa, 0xfa, 0xf9, + 0xf8, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, + 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, 0xeb, 0xe9, + 0xe8, 0xe7, 0xe5, 0xe4, 0xe3, 0xe1, 0xe0, 0xde, + 0xdd, 0xdb, 0xda, 0xd8, 0xd6, 0xd5, 0xd3, 0xd1, + 0xd0, 0xce, 0xcc, 0xca, 0xc9, 0xc7, 0xc5, 0xc3, + 0xc1, 0xbf, 0xbe, 0xbc, 0xba, 0xb8, 0xb6, 0xb4, + 0xb2, 0xb0, 0xae, 0xac, 0xaa, 0xa9, 0xa7, 0xa5, + 0xa3, 0xa1, 0x9f, 0x9d, 0x9b, 0x99, 0x97, 0x95, + 0x93, 0x91, 0x8f, 0x8d, 0x8b, 0x8a, 0x88, 0x86, + 0x84, 0x82, 0x80, 0x7e, 0x7c, 0x7b, 0x79, 0x77, + 0x75, 0x73, 0x72, 0x70, 0x6e, 0x6c, 0x6a, 0x69, + 0x67, 0x65, 0x64, 0x62, 0x60, 0x5f, 0x5d, 0x5c, + 0x5a, 0x58, 0x57, 0x55, 0x54, 0x52, 0x51, 0x4f, + 0x4e, 0x4c, 0x4b, 0x4a, 0x48, 0x47, 0x45, 0x44 + #endif /* 256 bytes table */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 128 + 0x44, 0x47, 0x4a, 0x4c, + 0x4f, 0x52, 0x55, 0x58, + 0x5c, 0x5f, 0x62, 0x65, + 0x69, 0x6c, 0x70, 0x73, + 0x77, 0x7b, 0x7e, 0x82, + 0x86, 0x8a, 0x8d, 0x91, + 0x95, 0x99, 0x9d, 0xa1, + 0xa5, 0xa9, 0xac, 0xb0, + 0xb4, 0xb8, 0xbc, 0xbf, + 0xc3, 0xc7, 0xca, 0xce, + 0xd1, 0xd5, 0xd8, 0xdb, + 0xde, 0xe1, 0xe4, 0xe7, + 0xe9, 0xec, 0xee, 0xf0, + 0xf2, 0xf4, 0xf6, 0xf8, + 0xf9, 0xfa, 0xfc, 0xfc, + 0xfd, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, + 0xfd, 0xfc, 0xfb, 0xfa, + 0xf8, 0xf7, 0xf5, 0xf3, + 0xf1, 0xef, 0xed, 0xeb, + 0xe8, 0xe5, 0xe3, 0xe0, + 0xdd, 0xda, 0xd6, 0xd3, + 0xd0, 0xcc, 0xc9, 0xc5, + 0xc1, 0xbe, 0xba, 0xb6, + 0xb2, 0xae, 0xaa, 0xa7, + 0xa3, 0x9f, 0x9b, 0x97, + 0x93, 0x8f, 0x8b, 0x88, + 0x84, 0x80, 0x7c, 0x79, + 0x75, 0x72, 0x6e, 0x6a, + 0x67, 0x64, 0x60, 0x5d, + 0x5a, 0x57, 0x54, 0x51, + 0x4e, 0x4b, 0x48, 0x45 + #endif /* 128 bytes table */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 64 + 0x44, 0x4a, + 0x4f, 0x55, + 0x5c, 0x62, + 0x69, 0x70, + 0x77, 0x7e, + 0x86, 0x8d, + 0x95, 0x9d, + 0xa5, 0xac, + 0xb4, 0xbc, + 0xc3, 0xca, + 0xd1, 0xd8, + 0xde, 0xe4, + 0xe9, 0xee, + 0xf2, 0xf6, + 0xf9, 0xfc, + 0xfd, 0xfe, + 0xfe, 0xfe, + 0xfd, 0xfb, + 0xf8, 0xf5, + 0xf1, 0xed, + 0xe8, 0xe3, + 0xdd, 0xd6, + 0xd0, 0xc9, + 0xc1, 0xba, + 0xb2, 0xaa, + 0xa3, 0x9b, + 0x93, 0x8b, + 0x84, 0x7c, + 0x75, 0x6e, + 0x67, 0x60, + 0x5a, 0x54, + 0x4e, 0x48 + #endif /* 64 bytes table */ +}; +// clang-format on + +static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table); + +#endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */ diff --git a/users/curry/rules.mk b/users/curry/rules.mk new file mode 100644 index 000000000000..2ebb807946bb --- /dev/null +++ b/users/curry/rules.mk @@ -0,0 +1,61 @@ +SRC += curry.c \ + process_records.c + +LTO_ENABLE = yes +SPACE_CADET_ENABLE = no + +ifneq ($(strip $(NO_SECRETS)), yes) + ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") + SRC += secrets.c + endif + ifeq ($(strip $(NO_SECRETS)), lite) + OPT_DEFS += -DNO_SECRETS + endif +endif + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dances.c +endif + +ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) + SRC += oled.c +endif + +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + SRC += rgb_stuff.c + ifeq ($(strip $(INDICATOR_LIGHTS)), yes) + OPT_DEFS += -DINDICATOR_LIGHTS + endif + ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) + OPT_DEFS += -DRGBLIGHT_TWINKLE + endif + ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) + OPT_DEFS += -DRGBLIGHT_NOEEPROM + endif + ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes) + OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION + endif +endif + +RGB_MATRIX_ENABLE ?= no +ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) + SRC += rgb_stuff.c +endif + + +ifdef CONSOLE_ENABLE + ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) + OPT_DEFS += -DKEYLOGGER_ENABLE + endif +endif + +ifeq ($(strip $(MAKE_BOOTLOADER)), yes) + OPT_DEFS += -DMAKE_BOOTLOADER +endif + +# At least until build.mk or the like drops, this is here to prevent +# VUSB boards from enabling NKRO, as they do not support it. Ideally +# this should be handled per keyboard, but until that happens ... +ifeq ($(strip $(PROTOCOL)), VUSB) + NKRO_ENABLE = no +endif diff --git a/users/curry/tap_dances.c b/users/curry/tap_dances.c new file mode 100644 index 000000000000..fe62def0d4dd --- /dev/null +++ b/users/curry/tap_dances.c @@ -0,0 +1,3 @@ +#include "curry.h" + +qk_tap_dance_action_t tap_dance_actions[] = {}; diff --git a/users/curry/tap_dances.h b/users/curry/tap_dances.h new file mode 100644 index 000000000000..43ce12ffcf81 --- /dev/null +++ b/users/curry/tap_dances.h @@ -0,0 +1,3 @@ +#pragma once +#include "curry.h" + diff --git a/users/curry/wrappers.h b/users/curry/wrappers.h new file mode 100644 index 000000000000..fa181af2ef85 --- /dev/null +++ b/users/curry/wrappers.h @@ -0,0 +1,92 @@ +#pragma once +#include "curry.h" +/* +Since our quirky block definitions are basically a list of comma separated +arguments, we need a wrapper in order for these definitions to be +expanded before being used as arguments to the LAYOUT_xxx macro. +*/ +#if (!defined(LAYOUT) && defined(KEYMAP)) +# define LAYOUT KEYMAP +#endif + +// clang-format off +#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) +#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__) + +/* +Blocks for each of the four major keyboard layouts +Organized so we can quickly adapt and modify all of them +at once, rather than for each keyboard, one at a time. +And this allows for much cleaner blocks in the keymaps. +For instance Tap/Hold for Control on all of the layouts + +NOTE: These are all the same length. If you do a search/replace + then you need to add/remove underscores to keep the + lengths consistent. +*/ + +#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_SLASH + +#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_B +#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_G +#define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_D, KC_V + +#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _________________COLEMAK_R2________________ KC_M, KC_N, KC_E, KC_I, KC_O +#define _________________COLEMAK_R3________________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH + +#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I +#define _________________DVORAK_L3_________________ KC_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, KC_S +#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z + + +#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define _________________SYM_LEFT__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________SYM_RIGHT_________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN + + +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ + + +#define _________________LOWER_L1__________________ _________________FUNC_LEFT_________________ +#define _________________LOWER_L2__________________ _________________SYM_LEFT__________________ +#define _________________LOWER_L3__________________ KC_DT1, KC_DT2, KC_DT3, KC_DT4, _______ + +#define _________________LOWER_R1__________________ _________________FUNC_RIGHT________________ +#define _________________LOWER_R2__________________ _________________SYM_RIGHT_________________ +#define _________________LOWER_R3__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR + +#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ +#define _________________RAISE_L2__________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______ +#define _________________RAISE_L3__________________ _______, _______, _______, _______, _______ + +#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ +#define _________________RAISE_R2__________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ +#define _________________RAISE_R3__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC + +#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG +#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM +#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T + +#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 +#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, XXXXXXX +#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT + +// clang-format on From a0a6e24788ebbe8f78ff6bf3644eb263f9b8d765 Mon Sep 17 00:00:00 2001 From: Akaash Suresh Date: Thu, 2 Jan 2020 12:13:39 -0600 Subject: [PATCH 127/973] Added license and readme --- users/curry/LICENSE.md | 14 ++++++++++++++ users/curry/README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 users/curry/LICENSE.md create mode 100644 users/curry/README.md diff --git a/users/curry/LICENSE.md b/users/curry/LICENSE.md new file mode 100644 index 000000000000..198ae45b2e34 --- /dev/null +++ b/users/curry/LICENSE.md @@ -0,0 +1,14 @@ +Copyright 2020 Akaash Suresh casa.akaash@gmail.com @CurryFurious + +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/curry/README.md b/users/curry/README.md new file mode 100644 index 000000000000..e61df51b2e85 --- /dev/null +++ b/users/curry/README.md @@ -0,0 +1,29 @@ +# Information + +These is my userspace files, heavily influenced by @drashna's userspace structure. + +Main uses are for corne & lily58, supporting dfu bootloader (elite-c) + +# Keyboards +## Split Common +Is compatible with split_common when the previous two keyboards update to them. + +If you want to use these keymaps with split common code, they are on my personal github fork: [CurryFurous/qmk_firmware](https://github.com/CurryFurious/qmk_firmware) + +Referenced PRs: #6260, #5998, #6001 + +## Keymaps +Keymap layout is similar between the two keyboards. Lily 58 has a lot of open keys for custom keys as well. Keymap formatting is set up in the physical layout of the keyboard, so mapping keys should be easier. + +## Tap Dances + +Tap dances are enabled but none are defined, you can add them to [tapdances.c](tapdances.c). If not using tapdances, you can disable them in the keymaps. + +## RGB +RGB is implemented pretty much the same as @drashna. Only change is that I added the RGB code from the drashna's corne [keymap.c](../../keyboards/crkbd/keymaps/drashna/keymap.c), lines 313-383 into rgb_stuff.c. + +## OLED +Similarly to RGB, I moved all OLED code into [oled.c](oled.c) to better clear up the keymap.c file. I haven't experimented with the kyria's 128x64 pixel screen so it probably won't work as well with it yet. + +## Wrappers +Have implemented QWERTY, COLEMAK Mod DH, and DVORAK. Other macros are defined, some modified from drashna's. Drashna's [wrappers.h](../drashna/wrappers.h) has other layouts that you can copy in as you see fit, make sure to add them to the userspace_layers enum in [curry.h](curry.h) From 291ef064a7dd47e91eaa438b8dd1116aee58cdff Mon Sep 17 00:00:00 2001 From: Akaash Suresh Date: Thu, 2 Jan 2020 12:19:07 -0600 Subject: [PATCH 128/973] Formatting --- keyboards/crkbd/keymaps/curry/keymap.c | 109 ++++++++++++------------ keyboards/crkbd/keymaps/curry/rules.mk | 37 ++++---- keyboards/lily58/keymaps/curry/keymap.c | 24 +++--- keyboards/lily58/keymaps/curry/rules.mk | 38 +++++---- users/curry/README.md | 7 +- 5 files changed, 111 insertions(+), 104 deletions(-) diff --git a/keyboards/crkbd/keymaps/curry/keymap.c b/keyboards/crkbd/keymaps/curry/keymap.c index 23c7c46c7f3f..7686c420ea2a 100644 --- a/keyboards/crkbd/keymaps/curry/keymap.c +++ b/keyboards/crkbd/keymaps/curry/keymap.c @@ -1,61 +1,62 @@ #include "curry.h" #define LAYOUT_crkbd_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_wrapper( \ - KC_GESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - M_LCTL, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, M_RALT, \ - OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ - KC_GRV, OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, OS_RGUI \ - ) + 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_wrapper( \ + KC_GESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + M_LCTL, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, M_RALT, \ + OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ + KC_GRV, OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, OS_RGUI \ + ) #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_crkbd_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_COLEMAK] = LAYOUT_crkbd_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_crkbd_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_MODS] = LAYOUT_wrapper( - _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, - _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, - KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, KC_RSFT, - _______, _______, _______, _______, _______, _______ - ), - [_LOWER] = LAYOUT_wrapper( - _______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_PIPE, - KC_F11, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_F12, - _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, - _______, _______, _______, _______, _______, _______ - ), - - [_RAISE] = LAYOUT_wrapper( \ - _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, - _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, - _______, _______, _______, _______, _______, _______ - ), - - [_ADJUST] = LAYOUT_wrapper( \ - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, - VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, - MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, - _______, _______, _______, _______, TG_MODS, _______ - ) + [_QWERTY] = LAYOUT_crkbd_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_crkbd_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_crkbd_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_MODS] = LAYOUT_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, KC_RSFT, + _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_wrapper( + _______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_PIPE, + KC_F11, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_F12, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_wrapper( \ + _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_wrapper( \ + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, + _______, _______, _______, _______, TG_MODS, _______ + ) }; diff --git a/keyboards/crkbd/keymaps/curry/rules.mk b/keyboards/crkbd/keymaps/curry/rules.mk index 7f77b43f4c22..483d86bdc992 100644 --- a/keyboards/crkbd/keymaps/curry/rules.mk +++ b/keyboards/crkbd/keymaps/curry/rules.mk @@ -2,21 +2,22 @@ # 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) -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. -SWAP_HANDS_ENABLE = no # Enable one-hand typing -RGB_MATRIX_ENABLE = WS2812 -TAP_DANCE_ENABLE = yes # Enable Tap Dance. -OLED_DRIVER_ENABLE = yes -BOOTLOADER = atmel-dfu -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +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 = 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. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +RGB_MATRIX_ENABLE = WS2812 +TAP_DANCE_ENABLE = yes # Enable Tap Dance. +OLED_DRIVER_ENABLE = yes +BOOTLOADER = atmel-dfu +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SPLIT_TRANSPORT = mirror diff --git a/keyboards/lily58/keymaps/curry/keymap.c b/keyboards/lily58/keymaps/curry/keymap.c index 3e2e0ae4903e..a8183d36f3fa 100644 --- a/keyboards/lily58/keymaps/curry/keymap.c +++ b/keyboards/lily58/keymaps/curry/keymap.c @@ -1,18 +1,18 @@ #include "curry.h" #define LAYOUT_lily58_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, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ - ) \ - LAYOUT_wrapper( \ - KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_GRV, \ - KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSLS, \ - KC_LCTL, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ - OS_LSFT, K31, K32, K33, K34, K35, KC_LBRC, KC_RBRC, K36, K37, K38, K39, K3A, OS_RSFT, \ - OS_LGUI, OS_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, OS_RGUI \ - ) + 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, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ + ) \ + LAYOUT_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_GRV, \ + KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSLS, \ + KC_LCTL, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ + OS_LSFT, K31, K32, K33, K34, K35, KC_LBRC, KC_RBRC, K36, K37, K38, K39, K3A, OS_RSFT, \ + OS_LGUI, OS_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, OS_RGUI \ + ) #define LAYOUT_lily58_base_wrapper(...) LAYOUT_lily58_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/lily58/keymaps/curry/rules.mk b/keyboards/lily58/keymaps/curry/rules.mk index 4e73f47f49b9..e19c0f389d69 100644 --- a/keyboards/lily58/keymaps/curry/rules.mk +++ b/keyboards/lily58/keymaps/curry/rules.mk @@ -1,17 +1,21 @@ -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 = 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. -SWAP_HANDS_ENABLE = no # Enable one-hand typing -TAP_DANCE_ENABLE = yes # Enable Tap Dance. -OLED_DRIVER_ENABLE = yes -BOOTLOADER = atmel-dfu -SPLIT_TRANSPORT = mirror +# 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 = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes # Enable Tap Dance. +OLED_DRIVER_ENABLE = yes +BOOTLOADER = atmel-dfu +SPLIT_TRANSPORT = mirror diff --git a/users/curry/README.md b/users/curry/README.md index e61df51b2e85..70d6262d73c2 100644 --- a/users/curry/README.md +++ b/users/curry/README.md @@ -2,18 +2,19 @@ These is my userspace files, heavily influenced by @drashna's userspace structure. +# Keyboards + Main uses are for corne & lily58, supporting dfu bootloader (elite-c) -# Keyboards ## Split Common Is compatible with split_common when the previous two keyboards update to them. -If you want to use these keymaps with split common code, they are on my personal github fork: [CurryFurous/qmk_firmware](https://github.com/CurryFurious/qmk_firmware) +If you want to use these keymaps with split common code, they are on my personal github fork: [CurryFurious/qmk_firmware](https://github.com/CurryFurious/qmk_firmware) Referenced PRs: #6260, #5998, #6001 ## Keymaps -Keymap layout is similar between the two keyboards. Lily 58 has a lot of open keys for custom keys as well. Keymap formatting is set up in the physical layout of the keyboard, so mapping keys should be easier. +Keymap layout is similar between the two keyboards. Lily58 has a lot of open keys for custom keys as well. Keymap formatting is set up in the physical layout of the keyboard, so mapping keys should be easier. ## Tap Dances From 5404d6baef45e5eda0d080376ee31791fc05b16f Mon Sep 17 00:00:00 2001 From: hvp <32483282+hvpkod@users.noreply.github.com> Date: Thu, 2 Jan 2020 20:31:54 +0100 Subject: [PATCH 129/973] [Keymap] Hvp baseline19 (#7690) * Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch --- keyboards/atreus62/keymaps/hvp/config.h | 5 + keyboards/atreus62/keymaps/hvp/keymap.c | 67 +++++++ keyboards/atreus62/keymaps/hvp/readme.md | 10 + keyboards/atreus62/keymaps/hvp/rules.mk | 1 + keyboards/crkbd/keymaps/hvp/keymap.c | 42 ++-- keyboards/crkbd/keymaps/hvp/readme.md | 11 +- keyboards/crkbd/keymaps/hvp/rules.mk | 2 +- keyboards/lets_split/keymaps/hvp/config.h | 40 ++++ keyboards/lets_split/keymaps/hvp/keymap.c | 65 +++++++ keyboards/lets_split/keymaps/hvp/readme.md | 10 + keyboards/lets_split/keymaps/hvp/rules.mk | 2 + keyboards/lily58/keymaps/hvp/config.h | 56 ++++++ keyboards/lily58/keymaps/hvp/keymap.c | 181 +++++++++++++++++ keyboards/lily58/keymaps/hvp/readme.md | 10 + keyboards/lily58/keymaps/hvp/rules.mk | 13 ++ keyboards/planck/keymaps/hvp/config.h | 39 ++++ keyboards/planck/keymaps/hvp/keymap.c | 184 ++++++++++++++++++ keyboards/planck/keymaps/hvp/readme.md | 10 + keyboards/planck/keymaps/hvp/rules.mk | 4 + .../minivan/keymaps/hvp/config.h | 5 + .../minivan/keymaps/hvp/keymap.c | 54 +++++ .../minivan/keymaps/hvp/readme.md | 10 + .../minivan/keymaps/hvp/rules.mk | 2 + keyboards/ut472/keymaps/hvp/config.h | 4 +- keyboards/ut472/keymaps/hvp/keymap.c | 76 ++------ keyboards/ut472/keymaps/hvp/readme.md | 11 +- users/hvp/hvp.h | 6 + users/hvp/tap_dances.c | 66 +++++-- users/hvp/tap_dances.h | 4 +- 29 files changed, 881 insertions(+), 109 deletions(-) create mode 100644 keyboards/atreus62/keymaps/hvp/config.h create mode 100644 keyboards/atreus62/keymaps/hvp/keymap.c create mode 100644 keyboards/atreus62/keymaps/hvp/readme.md create mode 100644 keyboards/atreus62/keymaps/hvp/rules.mk create mode 100644 keyboards/lets_split/keymaps/hvp/config.h create mode 100644 keyboards/lets_split/keymaps/hvp/keymap.c create mode 100644 keyboards/lets_split/keymaps/hvp/readme.md create mode 100644 keyboards/lets_split/keymaps/hvp/rules.mk create mode 100644 keyboards/lily58/keymaps/hvp/config.h create mode 100644 keyboards/lily58/keymaps/hvp/keymap.c create mode 100644 keyboards/lily58/keymaps/hvp/readme.md create mode 100644 keyboards/lily58/keymaps/hvp/rules.mk create mode 100644 keyboards/planck/keymaps/hvp/config.h create mode 100644 keyboards/planck/keymaps/hvp/keymap.c create mode 100644 keyboards/planck/keymaps/hvp/readme.md create mode 100644 keyboards/planck/keymaps/hvp/rules.mk create mode 100644 keyboards/thevankeyboards/minivan/keymaps/hvp/config.h create mode 100644 keyboards/thevankeyboards/minivan/keymaps/hvp/keymap.c create mode 100644 keyboards/thevankeyboards/minivan/keymaps/hvp/readme.md create mode 100644 keyboards/thevankeyboards/minivan/keymaps/hvp/rules.mk diff --git a/keyboards/atreus62/keymaps/hvp/config.h b/keyboards/atreus62/keymaps/hvp/config.h new file mode 100644 index 000000000000..e1222e21f56e --- /dev/null +++ b/keyboards/atreus62/keymaps/hvp/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define TAPPING_TERM 150 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD diff --git a/keyboards/atreus62/keymaps/hvp/keymap.c b/keyboards/atreus62/keymaps/hvp/keymap.c new file mode 100644 index 000000000000..9873897a5acd --- /dev/null +++ b/keyboards/atreus62/keymaps/hvp/keymap.c @@ -0,0 +1,67 @@ + +#include QMK_KEYBOARD_H +#include "hvp.c" + +// 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 LT3_ESC LT(3, KC_ESC) +#define LT4_TAB LT(4, KC_TAB) +#define LT1_ENT LT(1, KC_ENTER) +#define LT2_BSP LT(2, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( /* qwerty */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC , + LT4_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , + LT3_ESC, KC_A, KC_S, KC_D, LT(3,KC_F), LT(4,KC_G), KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2) , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, TD(TD3), KC_SFTENT , + KC_LCTL, KC_APP, _______, KC_LGUI, KC_LALT,SFT_T(KC_SPC), LT2_BSP, LT1_ENT, SFT_T(KC_SPC), KC_LSFT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + LAYOUT( /* Right */ + 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_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC , + KC_DEL, _______, _______, _______, _______, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + LAYOUT(/* Left */ + 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_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC, + KC_DELETE, _______, _______, _______, _______, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, + _______ , _______ , _______ , _______ , _______ , KC_LEFT_CURLY_BRACE , KC_RIGHT_CURLY_BRACE ,KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD, + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + + LAYOUT(/* 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_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, KC_NO, D_NAVI, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO , + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_NO , + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPLY, KC_NO, KC_MUTE, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), + + + + LAYOUT(/* Tab */ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______ , + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______ , + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______ , + KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* + [_TRNS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + */ +}; diff --git a/keyboards/atreus62/keymaps/hvp/readme.md b/keyboards/atreus62/keymaps/hvp/readme.md new file mode 100644 index 000000000000..766533d3be13 --- /dev/null +++ b/keyboards/atreus62/keymaps/hvp/readme.md @@ -0,0 +1,10 @@ +Keyboard: Atreus62 +Keys: 62 keyed ortho staggered keyboard with a split layout and num row. +Layout: Swedish characters on main layer using tap dance. Built for Eurkey keyboard layout. +Flash instructions: Flash using avrdude, will req the hvp user space to compile. + +> make make atreus62:hvp:avrdude + +Links: +Github - https://github.com/qmk/qmk_firmware/tree/master/keyboards/atreus62 +Eurkey layout - https://eurkey.steffen.bruentjen.eu/ diff --git a/keyboards/atreus62/keymaps/hvp/rules.mk b/keyboards/atreus62/keymaps/hvp/rules.mk new file mode 100644 index 000000000000..1ba2fa8fbefa --- /dev/null +++ b/keyboards/atreus62/keymaps/hvp/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/hvp/keymap.c b/keyboards/crkbd/keymaps/hvp/keymap.c index b66c360e188a..9e1cd5f01cb6 100644 --- a/keyboards/crkbd/keymaps/hvp/keymap.c +++ b/keyboards/crkbd/keymaps/hvp/keymap.c @@ -25,56 +25,56 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( \ + [_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,\ + LT(_ADJUST,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_BSPC, //|------+------+------+------+------+------| |------+------+------+------+------+------| - LT(_ADJUST, KC_ESC), KC_A, KC_S, KC_D, LT(_RAISE,KC_F), MT(MOD_LCTL,KC_G), KC_H, KC_J, KC_K, KC_L,TD(TD1),TD(TD2),\ + LSFT_T(KC_ESC), KC_A, KC_S, KC_D, LT(3,KC_F), KC_G, KC_H, KC_J, KC_K, KC_L,TD(TD1),TD(TD2), //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,TD(TD3),KC_SFTENT,\ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,TD(TD3),KC_SFTENT, //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + KC_LGUI, LT(1,KC_SPC),MT(MOD_LSFT, KC_SPC), MT(MOD_LSFT,KC_ENT), LT(2,KC_SPC),KC_LALT //`--------------------' `--------------------' ), - [_RAISE] = LAYOUT( \ + [_RAISE] = LAYOUT( //,-----------------------------------------. ,-----------------------------------------. - KC_TAB, 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_BSPC, //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,KC_NO, KC_DEL,\ + KC_DEL, _______, _______, _______, _______, _______, _______,KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_NO,\ + KC_LCTL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + _______, _______, _______, _______, _______, _______ //`--------------------' `--------------------' ), - [_LOWER] = LAYOUT( \ + [_LOWER] = LAYOUT( //,-----------------------------------------. ,-----------------------------------------. - KC_TAB,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,\ + KC_TAB,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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV,\ + KC_DEL, _______, _______, _______, _______, _______, _______,KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD,\ + KC_LCTL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD, //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + _______, _______, _______, _______, _______, _______ //`--------------------' `--------------------' ), - [_ADJUST] = LAYOUT( \ + [_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_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,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ + KC_F1,_______,_______,D_NAVI,_______,_______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, //|------+------+------+------+------+------| |------+------+------+------+------+------| - RESET,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_MPLY, KC_MNXT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,\ + RESET,KC_PSCR,_______,_______,_______,_______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + _______, KC_VOLD,KC_MPLY, KC_MNXT, KC_VOLU,_______ //`--------------------' `--------------------' ) }; -int RGB_current_mode; +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) { diff --git a/keyboards/crkbd/keymaps/hvp/readme.md b/keyboards/crkbd/keymaps/hvp/readme.md index 33bb83b83f9d..3ccdc12193eb 100644 --- a/keyboards/crkbd/keymaps/hvp/readme.md +++ b/keyboards/crkbd/keymaps/hvp/readme.md @@ -1,5 +1,10 @@ -Keymap to be used with Eurkey for easy access to swedish characters on first layer. +Keyboard: Corne Keyboard (CRKBD) +Keys: A split keyboard with 3x6 vertically staggered keys and 3 thumb keys. +Layout: Swedish characters on main layer using tapdance. Built for eurkey keyboard layout. +Flash instructions: Flash using avrdude, will req the hvp user space to compile. -Links: +> make crkbd:hvp:avrdude -- https://eurkey.steffen.bruentjen.eu/ \ No newline at end of file +Links: +Github - https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd +Eurkey layout - https://eurkey.steffen.bruentjen.eu/ diff --git a/keyboards/crkbd/keymaps/hvp/rules.mk b/keyboards/crkbd/keymaps/hvp/rules.mk index a651e528cf4b..03859ab63323 100644 --- a/keyboards/crkbd/keymaps/hvp/rules.mk +++ b/keyboards/crkbd/keymaps/hvp/rules.mk @@ -10,5 +10,5 @@ SRC += ./lib/glcdfont.c \ # ./lib/timelogger.c \ TAP_DANCE_ENABLE = yes -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control # LOCAL_GLCDFONT = yes \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/hvp/config.h b/keyboards/lets_split/keymaps/hvp/config.h new file mode 100644 index 000000000000..df24c53cde2d --- /dev/null +++ b/keyboards/lets_split/keymaps/hvp/config.h @@ -0,0 +1,40 @@ +/* +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 +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } + +/* 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 RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 diff --git a/keyboards/lets_split/keymaps/hvp/keymap.c b/keyboards/lets_split/keymaps/hvp/keymap.c new file mode 100644 index 000000000000..e9ebd46d64b3 --- /dev/null +++ b/keyboards/lets_split/keymaps/hvp/keymap.c @@ -0,0 +1,65 @@ +#include QMK_KEYBOARD_H +#include "hvp.c" + +// 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 _QWERTY 0 +#define _LOWER 3 +#define _RAISE 4 +#define _NAVI 5 +#define _ADJUST 6 + +enum custom_keycodes { + QWERTY = SAFE_RANGE +}; + + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +#define LT3_ESC LT(5, KC_ESC) +#define LT4_TAB LT(6, KC_TAB) +#define F_NAVI LT(5, KC_F) + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_ortho_4x12( + LT4_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_ESC, KC_A, KC_S, KC_D, F_NAVI, LT(6,KC_G), KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, TD(TD3), KC_SFTENT , + KC_LCTL, KC_APP, KC_LGUI, KC_LALT, LT(3,KC_SPC), SFT_T(KC_SPC), KC_SFTENT, LT(4,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_RAISE] = LAYOUT_ortho_4x12( /* Right */ + 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_DEL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +[_LOWER] = LAYOUT_ortho_4x12( /* Left */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC, + KC_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +[_NAVI] = LAYOUT_ortho_4x12( /* 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, + _______, _______, _______, D_NAVI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, _______, _______, _______, _______,KC_MUTE, KC_MPLY, KC_MSTP, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + +[_ADJUST] = LAYOUT_ortho_4x12( /* Tab */ + _______, RGB_TOG, RGB_MOD, RGB_RMOD, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_M_P, RGB_HUD, RGB_HUI, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + KC_PSCR, _______, RGB_SAD, RGB_SAI, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, + RESET, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______ +)}; diff --git a/keyboards/lets_split/keymaps/hvp/readme.md b/keyboards/lets_split/keymaps/hvp/readme.md new file mode 100644 index 000000000000..a43b9d52ecf7 --- /dev/null +++ b/keyboards/lets_split/keymaps/hvp/readme.md @@ -0,0 +1,10 @@ +Keyboard: Lets split! +Keys: 48key ortho 40% keyboard +Layout: Swedish characters on main layer using tapdance. Built for eurkey keyboard layout. +Flash instructions: Flash using avrdude, will req the hvp user space to compile. + +> make lets_split/rev2:hvp:avrdude + +Links: +Github - https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split +Eurkey layout - https://eurkey.steffen.bruentjen.eu/ diff --git a/keyboards/lets_split/keymaps/hvp/rules.mk b/keyboards/lets_split/keymaps/hvp/rules.mk new file mode 100644 index 000000000000..1c1ed316a075 --- /dev/null +++ b/keyboards/lets_split/keymaps/hvp/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/lily58/keymaps/hvp/config.h b/keyboards/lily58/keymaps/hvp/config.h new file mode 100644 index 000000000000..3367748de87d --- /dev/null +++ b/keyboards/lily58/keymaps/hvp/config.h @@ -0,0 +1,56 @@ +/* +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_TERM 100 +#undef TAPPING_TERM +#define TAPPING_TERM 150 + +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#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/hvp/keymap.c b/keyboards/lily58/keymaps/hvp/keymap.c new file mode 100644 index 000000000000..67e2541f6bcc --- /dev/null +++ b/keyboards/lily58/keymaps/hvp/keymap.c @@ -0,0 +1,181 @@ +#include QMK_KEYBOARD_H +#include "hvp.c" + +#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; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 +#define _NAVI 4 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + NAVI, + ADJUST +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + LT(3,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + LT(_NAVI,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_LSFT, KC_A, KC_S, KC_D, LT(4,KC_F), LT(3,KC_G), KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2), + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, MT(MOD_LSFT,KC_BSPC), MT(MOD_LSFT,KC_ENTER), KC_N, KC_M, KC_COMM, KC_DOT, TD(TD3), MT(MOD_RSFT,KC_ENT), + KC_LALT, KC_LGUI, LOWER,LT(1,KC_SPC), LT(2,KC_SPC), RAISE, KC_RALT, KC_RGUI +), +[_RAISE] = LAYOUT( /* Right */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + 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_DEL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, MT(MOD_LCTL,KC_LBRC), MT(MOD_LALT,KC_RBRC), _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_LOWER] = LAYOUT( /* Left */ + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, + 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_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, + _______, _______, _______, _______, _______, _______, MT(MOD_LCTL,KC_LCBR), MT(MOD_LALT,KC_RCBR), _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + [_NAVI] = LAYOUT( /* Tab */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, D_NAVI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, KC_VOLD, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_VOLU, _______ + ), + + [_ADJUST] = LAYOUT( /* Esc */ + _______, RGB_TOG, RGB_MOD, RGB_RMOD, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_M_P, RGB_HUD, RGB_HUI, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + KC_PSCR, _______, RGB_SAD, RGB_SAI, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, + RESET, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_VOLD, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_VOLU, _______ + ) +}; + +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) { + +} + +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); + +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; +} \ No newline at end of file diff --git a/keyboards/lily58/keymaps/hvp/readme.md b/keyboards/lily58/keymaps/hvp/readme.md new file mode 100644 index 000000000000..971bd2800e48 --- /dev/null +++ b/keyboards/lily58/keymaps/hvp/readme.md @@ -0,0 +1,10 @@ +Keyboard: Lily58 +Keys: Lily58 is 6×4+5keys column-staggered split keyboard. +Layout: Swedish characters on main layer using tap dance. Built for Eurkey keyboard layout. +Flash instructions: Flash using dfu, will req the hvp user space to compile. + +> make lily58:hvp:dfu + +Links: +Github - https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58 +Eurkey layout - https://eurkey.steffen.bruentjen.eu/ diff --git a/keyboards/lily58/keymaps/hvp/rules.mk b/keyboards/lily58/keymaps/hvp/rules.mk new file mode 100644 index 000000000000..b1ee4e83180d --- /dev/null +++ b/keyboards/lily58/keymaps/hvp/rules.mk @@ -0,0 +1,13 @@ +EXTRAKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes + +# 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 \ \ No newline at end of file diff --git a/keyboards/planck/keymaps/hvp/config.h b/keyboards/planck/keymaps/hvp/config.h new file mode 100644 index 000000000000..472afc648857 --- /dev/null +++ b/keyboards/planck/keymaps/hvp/config.h @@ -0,0 +1,39 @@ +#pragma once +#define TAPPING_TERM 150 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#ifdef AUDIO_ENABLE +# define STARTUP_SONG SONG(PLANCK_SOUND) +// #define STARTUP_SONG SONG(NO_SOUND) + +# define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) } +#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 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/hvp/keymap.c b/keyboards/planck/keymaps/hvp/keymap.c new file mode 100644 index 000000000000..c9aa6198152b --- /dev/null +++ b/keyboards/planck/keymaps/hvp/keymap.c @@ -0,0 +1,184 @@ +/* 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 "hvp.c" +#include QMK_KEYBOARD_H +#include "muse.h" + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _NAVI, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE +}; + +#define _QWERTY 0 +#define _RAISE 1 +#define _LOWER 2 +#define _NAVI 3 +#define _ADJUST 5 + +#define LT3_ESC LT(3, KC_ESC) +#define LT4_TAB LT(5, KC_TAB) + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_planck_grid( + LT4_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_ESC, KC_A, KC_S, KC_D, LT(3,KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, TD(TD3), KC_SFTENT, + KC_LCTL, KC_APP, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_RAISE] = LAYOUT_planck_grid( /* Right */ + 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_DEL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +[_LOWER] = LAYOUT_planck_grid( /* Left */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC, + KC_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +[_NAVI] = LAYOUT_planck_grid( /* 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, + _______, _______, _______, D_NAVI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_PSCR, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPLY, KC_MSTP, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + +[_ADJUST] = LAYOUT_planck_grid( /* Tab */ + _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, KC_4, KC_5, KC_6, _______, _______, + KC_PSCR, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, + RESET, _______, TERM_ON, TERM_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, DEBUG +)}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +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(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) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_ADJUST); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_ADJUST); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + 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/planck/keymaps/hvp/readme.md b/keyboards/planck/keymaps/hvp/readme.md new file mode 100644 index 000000000000..cb58d85785e6 --- /dev/null +++ b/keyboards/planck/keymaps/hvp/readme.md @@ -0,0 +1,10 @@ +Keyboard: Planck rev6 +Keys: 40% (12x4) ortholinear keyboard +Layout: Swedish characters on main layer using tap dance. Built for Eurkey keyboard layout. +Flash instructions: Flash using avrdude, will req the hvp user space to compile. + +> make planck/rev6:hvp:dfu-util + +Links: +Github - https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck +Eurkey layout - https://eurkey.steffen.bruentjen.eu/ diff --git a/keyboards/planck/keymaps/hvp/rules.mk b/keyboards/planck/keymaps/hvp/rules.mk new file mode 100644 index 000000000000..896115f718fb --- /dev/null +++ b/keyboards/planck/keymaps/hvp/rules.mk @@ -0,0 +1,4 @@ +SRC += muse.c + +RGBLIGHT_ENABLE = no +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/hvp/config.h b/keyboards/thevankeyboards/minivan/keymaps/hvp/config.h new file mode 100644 index 000000000000..cd2aa46c4497 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/hvp/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define TAPPING_TERM 150 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/hvp/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/hvp/keymap.c new file mode 100644 index 000000000000..779292fb3c01 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/hvp/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H +#include "hvp.c" + +#define _QW 0 +#define _L1 1 +#define _L2 2 +#define _L3 3 +#define _L4 4 + +#define LT4_TAB LT(_L4, KC_TAB) +#define LT3_ESC LT(_L3, KC_ESC) + +enum custom_keycodes { + QW = SAFE_RANGE, + L1, + L2, + L3, + L4 +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_arrow( /* Qwerty */ + LT4_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_ESC, KC_A, KC_S, KC_D, LT(3,KC_F), LT(4,KC_G), KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, TD(TD3), KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, LT(_L2,KC_ENT), LT(_L1,KC_SPC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [_L1] = LAYOUT_arrow( /* LAYER 1 */ + 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_DELETE, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + [_L2] = LAYOUT_arrow( /* LAYER 2 */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC, + KC_DELETE, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + [_L3] = LAYOUT_arrow( /* LAYER 3 */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, D_NAVI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_PSCR, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, _______, KC_MUTE, KC_MPLY, KC_MSTP, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), + + [_L4] = LAYOUT_arrow( /* LAYER 4 */ + _______, RGB_TOG, RGB_MOD, RGB_RMOD, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_M_P, RGB_HUD, RGB_HUI, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + KC_PSCR, _______, RGB_SAD, RGB_SAI, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, + RESET, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/hvp/readme.md b/keyboards/thevankeyboards/minivan/keymaps/hvp/readme.md new file mode 100644 index 000000000000..60ee3d6cd0ab --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/hvp/readme.md @@ -0,0 +1,10 @@ +Keyboard: Minivan 40% keyboard +Keys: A compact 44% keyboard. +Layout: Swedish characters on main layer using tap dance. Built for Eurkey keyboard layout. +Flash instructions: Flash using dfu, will req the hvp user space to compile. + +> make make thevankeyboards/minivan:hvp:dfu + +Links: +Github - https://github.com/qmk/qmk_firmware/tree/master/keyboards/thevankeyboards/minivan +Eurkey layout - https://eurkey.steffen.bruentjen.eu/ diff --git a/keyboards/thevankeyboards/minivan/keymaps/hvp/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/hvp/rules.mk new file mode 100644 index 000000000000..f039e269faa2 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/hvp/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ut472/keymaps/hvp/config.h b/keyboards/ut472/keymaps/hvp/config.h index 4ade43cdcd93..53fc5b76fb4d 100644 --- a/keyboards/ut472/keymaps/hvp/config.h +++ b/keyboards/ut472/keymaps/hvp/config.h @@ -17,6 +17,4 @@ #pragma once #define TAPPING_TERM 150 #define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT - -// place overrides here +#define IGNORE_MOD_TAP_INTERRUPT \ No newline at end of file diff --git a/keyboards/ut472/keymaps/hvp/keymap.c b/keyboards/ut472/keymaps/hvp/keymap.c index c37718ddab59..ec88e242348b 100644 --- a/keyboards/ut472/keymaps/hvp/keymap.c +++ b/keyboards/ut472/keymaps/hvp/keymap.c @@ -17,83 +17,43 @@ #include "hvp.c" #define LT3_ESC LT(3, KC_ESC) +#define LT4_TAB LT(4, KC_TAB) +#define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base Layer - * ,-------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | - * |-------------------------------------------------------------------------+ - * |Tab/L3| A | S | D | F | G | H | J | K | L | ; | ' | - * |-------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / |Sh/En| - * |-------------------------------------------------------------------------+ - * | Ctrl| Alt | Gui | App | L2 | Space | L1 | Left| Down| Up |Right| - * `-------------------------------------------------------------------------' - */ - 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, - LT3_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2), + LT4_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_ESC, KC_A, KC_S, KC_D, LT(3,KC_F), LT(4,KC_G), KC_H, KC_J, KC_K, KC_L, TD(TD1), TD(TD2), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, TD(TD3), KC_SFTENT, - KC_LCTL, KC_APP, KC_LGUI, KC_LALT, MO(2), MT(MOD_LSFT, KC_SPC), MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_LCTL, KC_APP, KC_LGUI, KC_LALT, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), - /* FN Layer 1 - * ,-------------------------------------------------------------------------. - * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Delete| - * |-------------------------------------------------------------------------+ - * | | | | | | | | - | = | [ | ] | \ | - * |-------------------------------------------------------------------------+ - * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | | - * |-------------------------------------------------------------------------+ - * | | | |Capsl| | | | Home| PgDn| PgUp| End | - * `-------------------------------------------------------------------------' - */ - LAYOUT( /* Right */ 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_DELETE, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, - KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + KC_DELETE, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), - /* FN Layer 2 - * ,-------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |Delete| - * |-------------------------------------------------------------------------+ - * | | | | | | | | _ | + | { | } | | | - * |-------------------------------------------------------------------------+ - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | - * |-------------------------------------------------------------------------+ - * | | | |Capsl| | | | Home| PgDn| PgUp| End | - * `-------------------------------------------------------------------------' - */ - LAYOUT( /* Left */ KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC, KC_DELETE, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), - /* FN Layer 2 - * ,-------------------------------------------------------------------------. - * | Esc | Calc|Webhm| Mail| Comp| | | | | |PrtSc| | - * |-------------------------------------------------------------------------+ - * | | | | | | | | | | | | | - * |-------------------------------------------------------------------------+ - * | | | | | | | | | | | | | - * |-------------------------------------------------------------------------+ - * | | | | | | | |MousL|MousD|MousU|MousR| - * `-------------------------------------------------------------------------' - */ - -LAYOUT( /* Tab */ +LAYOUT( /* 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_PSCR, + _______, _______, _______, D_NAVI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_PSCR, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, - RESET, _______, _______, _______, KC_MUTE, KC_MPLY, KC_MSTP, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + _______, _______, _______, _______, KC_MUTE, KC_MPLY, KC_MSTP, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), +LAYOUT( /* Tab */ + _______, RGB_TOG, RGB_MOD, RGB_RMOD, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_M_P, RGB_HUD, RGB_HUI, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + KC_PSCR, _______, RGB_SAD, RGB_SAI, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, + RESET, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______ ), }; \ No newline at end of file diff --git a/keyboards/ut472/keymaps/hvp/readme.md b/keyboards/ut472/keymaps/hvp/readme.md index e3dcee467e5f..a249201ded98 100644 --- a/keyboards/ut472/keymaps/hvp/readme.md +++ b/keyboards/ut472/keymaps/hvp/readme.md @@ -1,5 +1,10 @@ -# UT47 default keymap +Keyboard: UT47.2 +Keys: 47key staggered 40% keyboard +Layout: Swedish characters on main layer using tap dance. Built for Eurkey keyboard layout. +Flash instructions: Flash using dfu, will req the hvp user space to compile. -![UT47 layout image](https://i.imgur.com/Tsz5qsF.png) +> make ut472:hvp:dfu -[KLE](http://www.keyboard-layout-editor.com/##@@_y:0%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Back%20Space&_x:0.25&a:4&f:4&w:4&h:4&d:true%3B&=%3Cb%3EGNAP!%3C%2F%2Fb%3E%3Cp%3E%3Cp%3EMinimum%20stagger%3Cp%3E47%20key%20layout%3B&@_a:7&f:3&w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&_w:1.25%3B&=%27%3B&@_w:1.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=Return%3B&@=Ctrl&=Alt&=Super&=Menu&_w:1.25%3B&=%2F&dArr%2F%3B&_w:2%3B&=&_w:1.25%3B&=%2F&uArr%2F%3B&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B%3B&=undefined) +Links: +Github - https://github.com/ai03-2725/UT47.2 +Eurkey layout - https://eurkey.steffen.bruentjen.eu/ diff --git a/users/hvp/hvp.h b/users/hvp/hvp.h index 2b2210f873f4..99da258aafb5 100644 --- a/users/hvp/hvp.h +++ b/users/hvp/hvp.h @@ -4,3 +4,9 @@ # include "tap_dances.h" #endif #include "quantum.h" + +#define TAPPING_TERM 150 + +// Keys + +#define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) \ No newline at end of file diff --git a/users/hvp/tap_dances.c b/users/hvp/tap_dances.c index bb102b30abf8..1269d5f27289 100644 --- a/users/hvp/tap_dances.c +++ b/users/hvp/tap_dances.c @@ -6,10 +6,7 @@ void dance_1_finished(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { tap_code(KC_SCLN); } else { - register_code(KC_RALT); - register_code(KC_O); - unregister_code(KC_RALT); - unregister_code(KC_O); + tap_code16(ALGR(KC_A)); } } @@ -17,8 +14,7 @@ void dance_1_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { unregister_code(KC_SCLN); } else { - unregister_code(KC_RALT); - unregister_code(KC_O); + unregister_code16(ALGR(KC_A)); } } @@ -27,10 +23,7 @@ void dance_2_finished(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { tap_code(KC_QUOT); } else { - register_code(KC_RALT); - register_code(KC_A); - unregister_code(KC_RALT); - unregister_code(KC_A); + tap_code16(ALGR(KC_W)); } } @@ -38,8 +31,7 @@ void dance_2_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { unregister_code(KC_QUOT); } else { - unregister_code(KC_RALT); - unregister_code(KC_A); + unregister_code16(ALGR(KC_W)); } } @@ -49,10 +41,7 @@ void dance_3_finished(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { tap_code(KC_SLSH); } else { - register_code(KC_RALT); - register_code(KC_W); - unregister_code(KC_RALT); - unregister_code(KC_W); + tap_code16(ALGR(KC_O)); } } @@ -60,8 +49,43 @@ void dance_3_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { unregister_code(KC_SLSH); } else { - unregister_code(KC_RALT); - unregister_code(KC_W); + unregister_code16(ALGR(KC_O)); + } +} + +// Tap dance 4 +void dance_4_finished(qk_tap_dance_state_t *state, void *user_data) { + // if (state->count == 2) + if (state->count == 2) { + tap_code(KC_DOT); + } else { + tap_code16(ALGR(KC_W)); + } +} + +void dance_4_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + unregister_code(KC_DOT); + } else { + unregister_code16(ALGR(KC_W)); + } +} + +// Tap dance 5 +void dance_5_finished(qk_tap_dance_state_t *state, void *user_data) { + // if (state->count == 2) + if (state->count == 2) { + tap_code(KC_DOT); + } else { + tap_code16(ALGR(KC_O)); + } +} + +void dance_5_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + unregister_code(KC_DOT); + } else { + unregister_code16(ALGR(KC_O)); } } @@ -72,4 +96,8 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_2_finished, dance_2_reset), - [TD3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_3_finished, dance_3_reset)}; \ No newline at end of file + [TD3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_3_finished, dance_3_reset), + + [TD4] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_4_finished, dance_4_reset), + + [TD5] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_5_finished, dance_5_reset)}; \ No newline at end of file diff --git a/users/hvp/tap_dances.h b/users/hvp/tap_dances.h index 705985faac52..cad9bd90ec99 100644 --- a/users/hvp/tap_dances.h +++ b/users/hvp/tap_dances.h @@ -6,5 +6,7 @@ enum tapdance_id { TD1 = 0, TD2, - TD3 + TD3, + TD4, + TD5 }; From 156d319604b398dbc3d2290cd9e277dd19da8b96 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 3 Jan 2020 06:50:25 +1100 Subject: [PATCH 130/973] Remove remnants of custom matrix from Skog rules.mk (#7764) --- keyboards/percent/skog/rules.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/percent/skog/rules.mk b/keyboards/percent/skog/rules.mk index 2b0c1154dd57..da03a2e0c329 100644 --- a/keyboards/percent/skog/rules.mk +++ b/keyboards/percent/skog/rules.mk @@ -28,6 +28,4 @@ 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 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c From 2406c04d89a8a289b131c43759beca593cc9520c Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Thu, 2 Jan 2020 21:03:47 +0100 Subject: [PATCH 131/973] [Keymap] Personal keymap for Let's Split keyboard. (#7702) * Add Initial layout configuration. * Set arduino pro micro's built in RX LED as Numlock * Enable Autoshift feautre. * Remove DVORAK layout. * Add Numpad, update default layer. * Update AutoShift timeout. * Beautify ASCII Art. * Update keymap. * Add Initial verison of RGB lighting. * Add Tap dance, hungarian letters. .Xmodmap example: https://github.com/geripgeri/dotfiles/commit/09f058753dd10e4ff8ab2aac7274b5600c466392 * Update RGB to use only noeeprom functions. * Change default rgb led color. * Add `pragma once`. * Emojis added. * Add tap dance for hungarian letters, multimedia control, slash/backslash. * Remove audio related code. * Add Gaming layer. * Remove unnecessary code, update copyright. * Add readme.md * Implement code review suggestions. * Implement code review suggestions #2 --- .../lets_split/keymaps/geripgeri/config.h | 37 ++ .../lets_split/keymaps/geripgeri/keymap.c | 368 ++++++++++++++++++ .../lets_split/keymaps/geripgeri/readme.md | 3 + .../lets_split/keymaps/geripgeri/rules.mk | 5 + 4 files changed, 413 insertions(+) create mode 100644 keyboards/lets_split/keymaps/geripgeri/config.h create mode 100644 keyboards/lets_split/keymaps/geripgeri/keymap.c create mode 100644 keyboards/lets_split/keymaps/geripgeri/readme.md create mode 100644 keyboards/lets_split/keymaps/geripgeri/rules.mk diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h new file mode 100644 index 000000000000..6e71ea2b935c --- /dev/null +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2019 Gergely Peidl + +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 AUTO_SHIFT_TIMEOUT 200 +#define NO_AUTO_SHIFT_NUMERIC + +// RGB lighting +#define RGBLIGHT_SLEEP +#undef RGBLED_NUM +#define RGBLED_NUM 32 + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_STATIC_GRADIENT + +#define TAPPING_TERM 200 diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c new file mode 100644 index 000000000000..b268fb90c2b0 --- /dev/null +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -0,0 +1,368 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _NUMPAD, + _GAMING, + _ADJUST +}; + +enum custom_keycodes { + NUMPAD = SAFE_RANGE, + SLIGHTLY, + SMILE, + JOY, + RELAXED, + HEART, + SAD, + CRY, + NETRURAL, + SCREAM, + THUMBSUP +}; + +enum td_extra_keys { + U, + O, + NEXTPREV, + SLASH +}; + +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, //send two single taps + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +int cur_dance (qk_tap_dance_state_t *state); + +void u_finished (qk_tap_dance_state_t *state, void *user_data); +void o_finished (qk_tap_dance_state_t *state, void *user_data); + +uint8_t rgb_mode = RGBLIGHT_MODE_BREATHING + 1; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | ALT |Numpad| GUI |Lower | Space| | Bksp |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_MINUS, + 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, TD(SLASH), KC_ENT, + KC_LCTL, KC_LALT, MO(_NUMPAD), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | :) | :D | :'D | :$ | <3 | | | Home | Pgup | | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | :( | :'( | :| | :O | +1 | | | End |Pgdown| | [ | ] |PrntSc| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | |Insert| | Del | | 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_EQL, + SLIGHTLY, SMILE, JOY, RELAXED, HEART, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_PIPE, + SAD, CRY, NETRURAL, SCREAM, THUMBSUP, _______, KC_END, KC_PGDOWN,_______, KC_LBRC, KC_RBRC, KC_PSCREEN, + _______, _______, _______, _______, _______, KC_INSERT, KC_DEL, _______, TD(NEXTPREV), 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 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ +[_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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | Reset|EEPRST| | EE | | | | | UE | IE | OE | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | AE | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TGLAS| | | | | | | | | | | |GAMING| + * `-----------------------------------------' `-----------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + RESET, EEP_RST, _______, RALT(KC_SCLN), _______, _______, _______, TD(U), RALT(KC_Z), TD(O), _______, _______, + _______, RALT(KC_QUOT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_GAMING) +), + +/* Numpad + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | 7 | 8 | 9 | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | 4 | 5 | 6 | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | VAI | SAI | HUI | | | | | 3 | 2 | 1 | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | |RGBMOD|RGBTGL| | Calc | 0 | + | | | | + * `-----------------------------------------' `-----------------------------------------' + */ +[_NUMPAD] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, + _______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ +), + +/* Gaming + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | RAISE| | | | LOWER| | | | | + * `-----------------------------------------' `-----------------------------------------' + */ +[_GAMING] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RAISE, _______, _______, LOWER, _______, _______, _______, _______ +)}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case RGB_VAI: + if(record->event.pressed) { + rgblight_increase_val_noeeprom(); + } + break; + case RGB_VAD: + if(record->event.pressed) { + rgblight_decrease_val_noeeprom(); + } + break; + case RGB_SAI: + if(record->event.pressed) { + rgblight_increase_sat_noeeprom(); + } + break; + case RGB_SAD: + if(record->event.pressed) { + rgblight_decrease_sat_noeeprom(); + } + break; + case RGB_HUI: + if(record->event.pressed) { + rgblight_increase_hue_noeeprom(); + } + break; + case RGB_HUD: + if(record->event.pressed) { + rgblight_decrease_hue_noeeprom(); + } + break; + case RGB_TOG: + if(record->event.pressed) { + rgblight_toggle_noeeprom(); + } + break; + case RGB_MOD: + if(record->event.pressed) { + rgblight_step_noeeprom(); + rgb_mode = rgblight_get_mode(); + } + break; + case RGB_RMOD: + if(record->event.pressed) { + rgblight_step_reverse_noeeprom(); + rgb_mode = rgblight_get_mode(); + } + break; + + case SLIGHTLY: + if(record->event.pressed) { + SEND_STRING(":slightly_smiling_face:"); + } + break; + case SMILE: + if(record->event.pressed) { + SEND_STRING(":smile:"); + } + break; + case JOY: + if(record->event.pressed) { + SEND_STRING(":joy:"); + } + break; + case RELAXED: + if(record->event.pressed) { + SEND_STRING(":relaxed:"); + } + break; + case HEART: + if(record->event.pressed) { + SEND_STRING(":heart:"); + } + break; + case SAD: + if(record->event.pressed) { + SEND_STRING(":white_frowning_face:"); + } + break; + case CRY: + if(record->event.pressed) { + SEND_STRING(":cry:"); + } + break; + case NETRURAL: + if(record->event.pressed) { + SEND_STRING(":neutral_face:"); + } + break; + case SCREAM: + if(record->event.pressed) { + SEND_STRING(":scream:"); + } + break; + case THUMBSUP: + if(record->event.pressed) { + SEND_STRING(":+1:"); + } + break; + default: + return true; + } + return false; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + writePin(B0, !(state & (1UL << (_NUMPAD)))); + + switch(biton32(state)) { + case _RAISE: + rgblight_setrgb_at(255, 255, 255, RGBLED_NUM / 2); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _LOWER: + rgblight_setrgb_at(255, 255, 255, RGBLED_NUM / 2 - 1); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _NUMPAD: + rgblight_setrgb_at(0,255,0, 0); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _GAMING: + rgb_mode = RGBLIGHT_MODE_RAINBOW_SWIRL + 5; + autoshift_disable(); + break; + default: + rgb_mode = RGBLIGHT_MODE_BREATHING + 1; + rgblight_mode_noeeprom(rgb_mode); + autoshift_enable(); + break; + } + return state; +} + +void led_set_user(uint8_t usb_led) { + rgblight_sethsv_noeeprom(0, 255, 255); + rgblight_mode_noeeprom(rgb_mode); +} + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. + else return SINGLE_HOLD; + } + else if (state->count == 2) { + /* + * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap + * action when hitting 'pp'. Suggested use case for this return value is when you want to send two + * keystrokes of the key, and not the 'double tap' action/macro. + */ + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + //Assumes no one is trying to type the same letter three times (at least not quickly). + //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add + //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP' + if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; //magic number. At some point this method will expand to work for more presses +} + +static tap utap_state = { + .is_press_action = true, + .state = 0 +}; + +static tap otap_state = { + .is_press_action = true, + .state = 0 +}; + +void u_finished (qk_tap_dance_state_t *state, void *user_data) { + utap_state.state = cur_dance(state); + switch(utap_state.state) { + case SINGLE_TAP: SEND_STRING(SS_RALT("]")); break; + case DOUBLE_TAP: SEND_STRING(SS_RALT("-")); break; + case TRIPLE_TAP: SEND_STRING(SS_RALT("\\")); break; + } +} + +void o_finished (qk_tap_dance_state_t *state, void *user_data) { + otap_state.state = cur_dance(state); + switch(otap_state.state) { + case SINGLE_TAP: SEND_STRING(SS_RALT("=")); break; + case DOUBLE_TAP: SEND_STRING(SS_RALT("0")); break; + case TRIPLE_TAP: SEND_STRING(SS_RALT("[")); break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [U] = ACTION_TAP_DANCE_FN(u_finished), + [O] = ACTION_TAP_DANCE_FN(o_finished), + [NEXTPREV] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), + [SLASH] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_BSLS) + }; diff --git a/keyboards/lets_split/keymaps/geripgeri/readme.md b/keyboards/lets_split/keymaps/geripgeri/readme.md new file mode 100644 index 000000000000..09f1bedee79d --- /dev/null +++ b/keyboards/lets_split/keymaps/geripgeri/readme.md @@ -0,0 +1,3 @@ +# Personal Layout + +[Layout](http://www.keyboard-layout-editor.com/#/gists/8eae83bfb830d847c94c7ff423bbdc84) diff --git a/keyboards/lets_split/keymaps/geripgeri/rules.mk b/keyboards/lets_split/keymaps/geripgeri/rules.mk new file mode 100644 index 000000000000..5cefc001771a --- /dev/null +++ b/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -0,0 +1,5 @@ +AUTO_SHIFT_ENABLE = yes +AUTO_SHIFT_MODIFIERS = no +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes + From f08ffc271534ebe2bc4ea794bf95159c006688ad Mon Sep 17 00:00:00 2001 From: Legonut Date: Thu, 2 Jan 2020 16:03:19 -0500 Subject: [PATCH 132/973] [Keyboard] Updates for Sol 2 (#7746) Add Numpad to keymap Fix OLED rotation Add LED locations for Starfighter case --- keyboards/rgbkb/sol/keymaps/default/keymap.c | 18 ++++++++--------- keyboards/rgbkb/sol/keymaps/default/readme.md | 8 ++++---- keyboards/rgbkb/sol/rev2/config.h | 2 ++ keyboards/rgbkb/sol/rev2/post_rules.mk | 2 ++ keyboards/rgbkb/sol/rev2/rev2.c | 20 +++++++++++++++++++ keyboards/rgbkb/sol/rev2/rules.mk | 1 + 6 files changed, 38 insertions(+), 13 deletions(-) diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index e08e02c48e6e..04af5165e7e7 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -107,13 +107,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,------------------------------------------------. ,------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | SAD | VAI | SAI | RESET| | | | | | | | | | | + * | | SAD | VAI | SAI | RESET| | | | | | P7 | P8 | P9 | | | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | | + * | | HUD | VAD | HUI |RGBRST| | | | | | P4 | P5 | P6 | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | SPD | | SPI | | | | | | | |RGBTOG| HUI | SAI | VAI | + * | | SPD | | SPI | | | | | | | P1 | P2 | P3 | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | |RGBMOD(| | | | | | | |RGBRMOD| HUD | SAD | VAD | + * | | | |RGBMOD| | | | | | | P0 | PDOT | NLCK |QWERTY|COLEMK| * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' * | | | | | | * `-------------' `-------------' @@ -121,10 +121,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJ] = 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_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ - _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, RGB_SPI, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, \ + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, QWERTY, COLEMAK, \ _______, _______, _______, _______ \ ) }; @@ -301,7 +301,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) return OLED_ROTATION_270; - return rotation; + return OLED_ROTATION_180; } static void render_logo(void) { diff --git a/keyboards/rgbkb/sol/keymaps/default/readme.md b/keyboards/rgbkb/sol/keymaps/default/readme.md index 4a97a7babefe..ce5bce19ee14 100644 --- a/keyboards/rgbkb/sol/keymaps/default/readme.md +++ b/keyboards/rgbkb/sol/keymaps/default/readme.md @@ -57,13 +57,13 @@ * ,------------------------------------------------. ,------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | SAD | VAI | SAI | RESET| | | | | | | | | | | + * | | SAD | VAI | SAI | RESET| | | | | | P7 | P8 | P9 | | | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | | + * | | HUD | VAD | HUI |RGBRST| | | | | | P4 | P5 | P6 | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * | | | | | | | | | | | P1 | P2 | P3 | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | |RGBMOD| | | | | | | |RGBSMOD| HUD | SAD | VAD | + * | | | |RGBMOD| | | | | | | P0 | PDOT | NLCK |QWERTY|COLEMK| * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' * | | | | | | * `-------------' `-------------' diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h index af74b7e46fbd..ee5ad924abbb 100644 --- a/keyboards/rgbkb/sol/rev2/config.h +++ b/keyboards/rgbkb/sol/rev2/config.h @@ -33,6 +33,8 @@ along with this program. If not, see . #ifdef FULLHAND_ENABLE #define FULLHAND_LEDS 24 +#elif SF_ENABLE + #define FULLHAND_LEDS 38 #else #define FULLHAND_LEDS 0 #endif diff --git a/keyboards/rgbkb/sol/rev2/post_rules.mk b/keyboards/rgbkb/sol/rev2/post_rules.mk index 0cbf430ad3e5..ab03325c9fae 100644 --- a/keyboards/rgbkb/sol/rev2/post_rules.mk +++ b/keyboards/rgbkb/sol/rev2/post_rules.mk @@ -20,6 +20,8 @@ endif ifeq ($(strip $(FULLHAND_ENABLE)), yes) OPT_DEFS += -DFULLHAND_ENABLE +else ifeq ($(strip $(SF_ENABLE)), yes) + OPT_DEFS += -DSF_ENABLE endif ifeq ($(strip $(EXTRA_ENCODERS_ENABLE)), yes) diff --git a/keyboards/rgbkb/sol/rev2/rev2.c b/keyboards/rgbkb/sol/rev2/rev2.c index 467aa18e44fe..e00c48560988 100644 --- a/keyboards/rgbkb/sol/rev2/rev2.c +++ b/keyboards/rgbkb/sol/rev2/rev2.c @@ -33,6 +33,11 @@ led_config_t g_led_config = { { #ifdef FULLHAND_ENABLE { 2, 88 }, { 2, 103 }, { 2, 117 }, { 2, 132 }, { 10, 145 }, { 25, 145 }, { 39, 145 }, { 54, 145 }, { 69, 145 }, { 79, 136 }, { 87, 124 }, { 94, 111 }, +// SF Left +#elif SF_ENABLE + { 0, 88 }, { 0, 103 }, { 0, 117 }, { 0, 130 }, { 9, 142 }, { 24, 142 }, { 38, 142 }, + { 53, 142 }, { 67, 142 }, { 79, 135 }, { 86, 123 }, { 93, 110 }, { 88, 102 }, { 74, 101 }, + { 60, 91 }, { 45, 98 }, { 33, 92 }, { 23, 86 }, { 10, 80 }, #endif // Left Hand Mapped Right to Left { 213, 14 }, { 196, 14 }, { 182, 14 }, { 168, 14 }, { 154, 14 }, { 140, 14 }, { 122, 14 }, @@ -49,6 +54,11 @@ led_config_t g_led_config = { { #ifdef FULLHAND_ENABLE ,{ 222, 88 }, { 222, 103 }, { 222, 117 }, { 222, 132 }, { 214, 145 }, { 199, 145 }, { 185, 145 }, { 170, 145 }, { 155, 145 }, { 145, 136 }, { 137, 124 }, { 130, 111 } +// SF Right +#elif SF_ENABLE + ,{ 224, 88 }, { 224, 103 }, { 224, 117 }, { 224, 130 }, { 215, 142 }, { 200, 142 }, { 186, 142 }, + { 171, 142 }, { 157, 142 }, { 145, 135 }, { 138, 123 }, { 131, 110 }, { 136, 102 }, { 150, 101 }, + { 164, 91 }, { 179, 98 }, { 191, 92 }, { 201, 86 }, { 214, 80 } #endif }, { // Left Hand Mapped Left to Right @@ -66,6 +76,11 @@ led_config_t g_led_config = { { #ifdef FULLHAND_ENABLE 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +// SF Left +#elif SF_ENABLE + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, #endif // Left Hand Mapped Right to Left 1, 4, 4, 4, 4, 4, 1, @@ -82,6 +97,11 @@ led_config_t g_led_config = { { #ifdef FULLHAND_ENABLE ,2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +// SF Right +#elif SF_ENABLE + ,2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2 #endif } }; diff --git a/keyboards/rgbkb/sol/rev2/rules.mk b/keyboards/rgbkb/sol/rev2/rules.mk index 87b400fa14e8..40f4c4b8cab2 100644 --- a/keyboards/rgbkb/sol/rev2/rules.mk +++ b/keyboards/rgbkb/sol/rev2/rules.mk @@ -22,6 +22,7 @@ RGB_MATRIX_FRAMEBUFFER_EFFECTS = no # Enable frame buffer effects like the typin RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness for RGBLIGHT or RGB_MATRIX. Otherwise, limited to a safe level for a normal USB-A port FULLHAND_ENABLE = no # Enables the additional 24 Full Hand LEDs +SF_ENABLE = no # Enables the additional 38 Starfighter LEDs IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Misc From dd04079098a17e22693e83de227001fe548c1606 Mon Sep 17 00:00:00 2001 From: Casper Weiss Bang Date: Thu, 2 Jan 2020 22:06:46 +0100 Subject: [PATCH 133/973] Fixed a small typo (#7743) --- docs/newbs_building_firmware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md index 5a8f181b8c4c..d7d31c07feb0 100644 --- a/docs/newbs_building_firmware.md +++ b/docs/newbs_building_firmware.md @@ -42,7 +42,7 @@ Open up your `keymap.c`. Inside this file you'll find the structure that control const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a that particular layer. +This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a particular layer. !> When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is. From 5b8f1327d810d7b345b8b99d4062a0aebb650f8c Mon Sep 17 00:00:00 2001 From: CurryFurious Date: Thu, 2 Jan 2020 16:26:09 -0600 Subject: [PATCH 134/973] Removing unnecessary struct definitions Removed userspace_config unused variables, and removed _NUMLOCK as it isn't used anywhere. --- users/curry/curry.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/users/curry/curry.h b/users/curry/curry.h index 985453c49bfa..a9de9ae51025 100644 --- a/users/curry/curry.h +++ b/users/curry/curry.h @@ -21,7 +21,6 @@ /* Define layer names */ enum userspace_layers { _QWERTY = 0, - _NUMLOCK = 0, _COLEMAK, _DVORAK, _MODS, @@ -45,10 +44,7 @@ typedef union { uint32_t raw; struct { bool rgb_layer_change :1; - bool is_overwatch :1; bool nuke_switch :1; - uint8_t unicode_mod :4; - bool swapped_numbers :1; bool rgb_matrix_idle_anim :1; }; } userspace_config_t; From 61173dce5d85eb778b43a0af76c42eb217ac49ca Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Thu, 2 Jan 2020 17:35:05 -0500 Subject: [PATCH 135/973] [Keyboard] adjust h87a RGB settings (#7751) * update VID and PID for h87a * update default RGB underglow pattern * update comments * Update keyboards/hineybush/h87a/h87a.c * Update keyboards/hineybush/h87a/h87a.c * Update keyboards/hineybush/h87a/h87a.c --- keyboards/hineybush/h87a/config.h | 1 + keyboards/hineybush/h87a/h87a.c | 9 ++++++++- keyboards/hineybush/h87a/rules.mk | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/keyboards/hineybush/h87a/config.h b/keyboards/hineybush/h87a/config.h index 5a1e6d366cd9..f9d8f9766e1f 100644 --- a/keyboards/hineybush/h87a/config.h +++ b/keyboards/hineybush/h87a/config.h @@ -72,5 +72,6 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 200 #define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep #endif diff --git a/keyboards/hineybush/h87a/h87a.c b/keyboards/hineybush/h87a/h87a.c index 2ce469b69265..c3bb89080601 100644 --- a/keyboards/hineybush/h87a/h87a.c +++ b/keyboards/hineybush/h87a/h87a.c @@ -42,4 +42,11 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } - +void eeconfig_init_kb(void) { // EEPROM is getting reset! + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/hineybush/h87a/rules.mk b/keyboards/hineybush/h87a/rules.mk index 653ec1f9a232..2c5bc96c6f2a 100644 --- a/keyboards/hineybush/h87a/rules.mk +++ b/keyboards/hineybush/h87a/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) From 474f7f399c707a61448b353c5d614cefa47ff69a Mon Sep 17 00:00:00 2001 From: Tom Saleeba Date: Fri, 3 Jan 2020 09:10:13 +1030 Subject: [PATCH 136/973] [Keyboard] add initial ergoslab directory (#7730) * feat: add initial ergoslab directory * fix: address all comments from noroadsleft * fix: address comment from drashna * feat: add swap hands config to ergoslab * chore: change ergoslab image to real photo * re --- keyboards/ergoslab/config.h | 28 ++++++++ keyboards/ergoslab/ergoslab.c | 1 + keyboards/ergoslab/ergoslab.h | 7 ++ keyboards/ergoslab/info.json | 66 +++++++++++++++++++ keyboards/ergoslab/keymaps/default/config.h | 29 ++++++++ keyboards/ergoslab/keymaps/default/keymap.c | 73 +++++++++++++++++++++ keyboards/ergoslab/readme.md | 33 ++++++++++ keyboards/ergoslab/rev1/config.h | 71 ++++++++++++++++++++ keyboards/ergoslab/rev1/rev1.c | 18 +++++ keyboards/ergoslab/rev1/rev1.h | 24 +++++++ keyboards/ergoslab/rules.mk | 35 ++++++++++ 11 files changed, 385 insertions(+) create mode 100644 keyboards/ergoslab/config.h create mode 100644 keyboards/ergoslab/ergoslab.c create mode 100644 keyboards/ergoslab/ergoslab.h create mode 100644 keyboards/ergoslab/info.json create mode 100644 keyboards/ergoslab/keymaps/default/config.h create mode 100644 keyboards/ergoslab/keymaps/default/keymap.c create mode 100644 keyboards/ergoslab/readme.md create mode 100644 keyboards/ergoslab/rev1/config.h create mode 100644 keyboards/ergoslab/rev1/rev1.c create mode 100644 keyboards/ergoslab/rev1/rev1.h create mode 100644 keyboards/ergoslab/rules.mk diff --git a/keyboards/ergoslab/config.h b/keyboards/ergoslab/config.h new file mode 100644 index 000000000000..590b63c9d687 --- /dev/null +++ b/keyboards/ergoslab/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2019 Tom Saleeba + +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" + +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 40 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 255 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/ergoslab/ergoslab.c b/keyboards/ergoslab/ergoslab.c new file mode 100644 index 000000000000..6f2796c07c3e --- /dev/null +++ b/keyboards/ergoslab/ergoslab.c @@ -0,0 +1 @@ +#include "ergoslab.h" diff --git a/keyboards/ergoslab/ergoslab.h b/keyboards/ergoslab/ergoslab.h new file mode 100644 index 000000000000..8b0249054341 --- /dev/null +++ b/keyboards/ergoslab/ergoslab.h @@ -0,0 +1,7 @@ +#pragma once + +#ifdef KEYBOARD_ergoslab_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" diff --git a/keyboards/ergoslab/info.json b/keyboards/ergoslab/info.json new file mode 100644 index 000000000000..e24f0f1fc713 --- /dev/null +++ b/keyboards/ergoslab/info.json @@ -0,0 +1,66 @@ +{ + "keyboard_name": "ergoslab", + "url": "https://github.com/tomsaleeba/ergoslab", + "maintainer": "tomsaleeba", + "width": 13, + "height": 5.25, + "layouts": { + "LAYOUT_ergoslab": { + "key_count": 52, + "layout": [ + {"label":"Q", "x":0, "y":0.625}, + {"label":"W", "x":1, "y":0.125}, + {"label":"E", "x":2, "y":0}, + {"label":"R", "x":3, "y":0.125}, + {"label":"T", "x":4, "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.625}, + {"label":"A", "x":0, "y":1.625}, + {"label":"S", "x":1, "y":1.125}, + {"label":"D", "x":2, "y":1}, + {"label":"F", "x":3, "y":1.125}, + {"label":"G", "x":4, "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.625}, + {"label":"Z", "x":0, "y":2.625}, + {"label":"X", "x":1, "y":2.125}, + {"label":"C", "x":2, "y":2}, + {"label":"V", "x":3, "y":2.125}, + {"label":"B", "x":4, "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.625}, + {"label":"'", "x":0, "y":3.625}, + {"label":"Alt", "x":1, "y":3.125}, + {"label":"Del", "x":2, "y":3}, + {"label":"Enter", "x":3, "y":3.125}, + {"label":"Shift", "x":4, "y":3.25}, + {"label":"Ctrl", "x":5, "y":3.25}, + {"label":"Numb", "x":7, "y":3.25}, + {"label":"Space", "x":8, "y":3.25}, + {"label":"Left", "x":9, "y":3.125}, + {"label":"Down", "x":10, "y":3}, + {"label":"Up", "x":11, "y":3.125}, + {"label":"Right", "x":12, "y":3.625}, + {"label":"[", "x":1, "y":4.25}, + {"label":"(", "x":2, "y":4.25}, + {"label":"Esc", "x":3, "y":4.25}, + {"label":"Media", "x":4, "y":4.25}, + {"label":"GUI", "x":5, "y":4.25}, + {"label":"Tab", "x":7, "y":4.25}, + {"label":"Mouse", "x":8, "y":4.25}, + {"label":"Bspc", "x":9, "y":4.25}, + {"label":")", "x":10, "y":4.25}, + {"label":"]", "x":11, "y":4.25} + ] + } + } +} diff --git a/keyboards/ergoslab/keymaps/default/config.h b/keyboards/ergoslab/keymaps/default/config.h new file mode 100644 index 000000000000..2c47a7440db6 --- /dev/null +++ b/keyboards/ergoslab/keymaps/default/config.h @@ -0,0 +1,29 @@ +/* +Copyright 2019 Tom Saleeba + +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/ergoslab/keymaps/default/keymap.c b/keyboards/ergoslab/keymaps/default/keymap.c new file mode 100644 index 000000000000..a9bf27924601 --- /dev/null +++ b/keyboards/ergoslab/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + BASE, + MDIA, + NUMB, + MOUS +}; + +#ifdef RGBLIGHT_ENABLE +#define ERGOSLAB_BRIGHTNESS 112 +#define HSV_ERGOSLAB_ORANGE 28, 255, 16 +#define HSV_ERGOSLAB_RED 0, 255, ERGOSLAB_BRIGHTNESS +#define HSV_ERGOSLAB_GREEN 85, 255, ERGOSLAB_BRIGHTNESS +#define HSV_ERGOSLAB_CYAN 128, 255, ERGOSLAB_BRIGHTNESS +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_ergoslab( + 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_QUOT, KC_LALT, KC_DEL, KC_ENT, KC_LSFT, KC_LCTL, MO(NUMB), KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_LBRC, KC_LPRN, KC_ESC, MO(MDIA),KC_RGUI, KC_TAB, TG(MOUS), KC_BSPC, KC_RPRN, KC_RBRC + ), + + [MDIA] = LAYOUT_ergoslab( + 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_HOME, KC_PGDN, KC_PGUP, KC_END, + _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, KC_MUTE, + _______, RESET, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [NUMB] = LAYOUT_ergoslab( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_BSLS, KC_PIPE, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_GRV, KC_COLN, KC_TILD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_DQT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [MOUS] = LAYOUT_ergoslab( + _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN3, KC_WH_D, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_ACL0, _______, KC_BTN2, KC_BTN1, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +#ifdef RGBLIGHT_ENABLE +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + switch (layer) { + case BASE: + rgblight_sethsv(HSV_ERGOSLAB_ORANGE); + break; + case MDIA: + rgblight_sethsv(HSV_ERGOSLAB_RED); + break; + case NUMB: + rgblight_sethsv(HSV_ERGOSLAB_GREEN); + break; + case MOUS: + rgblight_sethsv(HSV_ERGOSLAB_CYAN); + break; + default: + break; + } + return state; +}; +#endif diff --git a/keyboards/ergoslab/readme.md b/keyboards/ergoslab/readme.md new file mode 100644 index 000000000000..9343f3bc9ef8 --- /dev/null +++ b/keyboards/ergoslab/readme.md @@ -0,0 +1,33 @@ +# ergoslab + +![ergoslab](https://raw.githubusercontent.com/tomsaleeba/ergoslab/master/ergoslab.jpg) + + +A split ergo 5x6 keyboard with hotswap sockets and a heap of thumb keys designed +by Tom Saleeba. [More info on the GitHub +Repo](https://github.com/tomsaleeba/ergoslab). + +**Status** The ergoslab is currently being beta-tested. + +* Keyboard Maintainer: [Tom Saleeba](https://github.com/tomsaleeba) +* Hardware Supported: Pro Micro (ATmega32U4) +* Hardware Availability: gerbers are available from the [releases page on the +GitHub repo](https://github.com/tomsaleeba/ergoslab/releases). Get them +manufactured at your favourite PCB house. I used JLCPCB. + + +Make example for this keyboard (after setting up your build environment): + + make ergoslab:default + +Example of flashing this keyboard: + + make ergoslab: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). + +A build guide for this keyboard can be found here: [Build +Guide](https://github.com/tomsaleeba/ergoslab/blob/master/build-guide.md) diff --git a/keyboards/ergoslab/rev1/config.h b/keyboards/ergoslab/rev1/config.h new file mode 100644 index 000000000000..4e69b1095303 --- /dev/null +++ b/keyboards/ergoslab/rev1/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2019 Tom Saleeba + +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 0x5148 +#define DEVICE_VER 0x0100 +#define MANUFACTURER tomsaleeba +#define PRODUCT Ergoslab Keyboard +#define DESCRIPTION Split 45 percent ergonomic keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 2 // Number of LEDs +// FIXME this following line should enable our layer status LEDs to work on both +// sides without need to wire them into a chain. It doesn't though. Uncommenting +// means the slave side of the keyboard stops working (and the LEDs don't work). +// #define RGBLED_SPLIT {1,1} + +/* + * 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/ergoslab/rev1/rev1.c b/keyboards/ergoslab/rev1/rev1.c new file mode 100644 index 000000000000..0e3e0fe99636 --- /dev/null +++ b/keyboards/ergoslab/rev1/rev1.c @@ -0,0 +1,18 @@ +#include "rev1.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}}, + {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}}, + {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9}}, + + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}}, + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, +}; +#endif diff --git a/keyboards/ergoslab/rev1/rev1.h b/keyboards/ergoslab/rev1/rev1.h new file mode 100644 index 000000000000..bf99a17b237d --- /dev/null +++ b/keyboards/ergoslab/rev1/rev1.h @@ -0,0 +1,24 @@ +#pragma once + +#include "ergoslab.h" + +#include "quantum.h" + +#define LAYOUT_ergoslab( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L41, L42, L43, L44, L45, R45, R44, R43, R42, R41 \ +) { \ + { L00, L01, L02, L03, L04, KC_NO }, \ + { L10, L11, L12, L13, L14, KC_NO }, \ + { L20, L21, L22, L23, L24, KC_NO }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, L41, L42, L43, L44, L45 }, \ + { R00, R01, R02, R03, R04, KC_NO }, \ + { R10, R11, R12, R13, R14, KC_NO }, \ + { R20, R21, R22, R23, R24, KC_NO }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { KC_NO, R41, R42, R43, R44, R45 } \ + } diff --git a/keyboards/ergoslab/rules.mk b/keyboards/ergoslab/rules.mk new file mode 100644 index 000000000000..f5ae8c51eef1 --- /dev/null +++ b/keyboards/ergoslab/rules.mk @@ -0,0 +1,35 @@ +# 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 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 +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 = yes # 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 + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = ergoslab/rev1 From 3fd8f160c3b3394f2e06643347143e46d880aa69 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri, 3 Jan 2020 07:47:27 +0900 Subject: [PATCH 137/973] [Docs] Added description of LIB_SRC to docs/config_options.md (#7765) And LINK_TIME_OPTIMIZATION_ENABLE move to 'Build Options' section. --- docs/config_options.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 0cf3fb78a696..ea5a8929540e 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -287,8 +287,27 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i * Defines which format (bin, hex) is copied to the root `qmk_firmware` folder after building. * `SRC` * Used to add files to the compilation/linking list. +* `LIB_SRC` + * Used to add files as a library to the compilation/linking list. + The files specified by `LIB_SRC` is linked after the files specified by `SRC`. + For example, if you specify: + ``` + SRC += a.c + LIB_SRC += lib_b.c + SRC += c.c + LIB_SRC += lib_d.c + ``` + The link order is as follows. + ``` + ... a.o c.o ... lib_b.a lib_d.a ... + ``` * `LAYOUTS` * A list of [layouts](feature_layouts.md) this keyboard supports. +* `LINK_TIME_OPTIMIZATION_ENABLE` + * Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. + It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` +* `LTO_ENABLE` + * It has the same meaning as LINK_TIME_OPTIMIZATION_ENABLE. You can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`. ## AVR MCU Options * `MCU = atmega32u4` @@ -347,9 +366,6 @@ Use these to enable or disable building certain features. The more you have enab * Forces the keyboard to wait for a USB connection to be established before it starts up * `NO_USB_STARTUP_CHECK` * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master. -* `LINK_TIME_OPTIMIZATION_ENABLE` - * Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` - * Alternatively, you can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`. ## USB Endpoint Limitations From 983026ad8bb1226e6929f6a59ecafea1e43f31aa Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Fri, 3 Jan 2020 02:22:21 -0500 Subject: [PATCH 138/973] [Keymap] adding tf68 keymap, my first pull request. expecting there's lots of bad practice, sorry (#7763) * adding tf68 keymap * had tf keymap in wrong folder * added tragicforce readme * cleaned up code * more cleanup * indent love and layer name change --- .../tragicforce68/keymaps/rossman360/keymap.c | 145 ++++++++++++++++++ .../keymaps/rossman360/readme.md | 3 + 2 files changed, 148 insertions(+) create mode 100755 keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c create mode 100644 keyboards/keebio/tragicforce68/keymaps/rossman360/readme.md diff --git a/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c b/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c new file mode 100755 index 000000000000..ef3fc729e284 --- /dev/null +++ b/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c @@ -0,0 +1,145 @@ +#include QMK_KEYBOARD_H + +#define PGMOD LT(_MOD, KC_PGDN) +#define SPCMOD LT(_MOD, KC_SPACE) +#define VOLMOD LT(_MOD, KC__MUTE) +#define CMDBSP MT(MOD_LGUI, KC_BSPC) +#define ALTDEL MT(MOD_LALT, KC_DEL) +#define BWORD LCTL(KC_BSPC) +#define LWORD LCTL(KC_LEFT) +#define RWORD LCTL(KC_RIGHT) +#define JUMPBACK LSFT(KC_TAB) +#define UNDO LCTL(KC_Z) +#define XPANDR LCTL(LSFT(KC_X)) +#define NTAB LCTL(KC_T) +#define CTAB LCTL(KC_W) +#define XPANDR LCTL(LSFT(KC_X)) + +enum layer_names { + _BASE, + _REV, + _MOD, + _DEL, +}; + +enum custom_keycodes { + LAUNCHCLOCK = SAFE_RANGE, + CSPEAK, + SPEAK1, + SPEAK2, + SPEAK3, + SPEAK4, + PARADOWN, + WREFRESH, + PMERGE, + REMCAPS, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { + case CSPEAK: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); + break; + } + case SPEAK1: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_1))); + break; + } + case SPEAK2: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_2))); + } + break; + case SPEAK3: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_3))); + } + break; + case SPEAK4: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_4))); + } + break; + case PARADOWN: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); + } + break; + case PMERGE: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_HOME) SS_TAP(X_BSPACE) SS_TAP(X_SPACE) SS_LCTRL(SS_TAP(X_BSPACE)) SS_TAP(X_SPACE)); + } + break; + case WREFRESH: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_BSPACE)); + } + break; + case REMCAPS: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_LCTRL(SS_TAP(X_LEFT)) SS_TAP(X_DELETE)); + } + break; + }; + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT_split_space( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ + 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, NTAB, + //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ + 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(_MOD),CTAB, + //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ + 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_ENTER, + //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ + 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, + //├──────────┬───────┴──┬─────┴────┬───┴────────┴─────┬───┴────────┴───┬─────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ + CMDBSP, ALTDEL, KC_LCTRL, KC_SPACE, SPCMOD, SPCMOD, MO(_DEL), KC_LCTL, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT + //└──────────┴──────────┴──────────┴──────────────────┴────────────────┴───────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ + ), + +[_REV] = LAYOUT_split_space( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ + _______, _______, _______, _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ + KC_LEFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,KC_HOME, KC_END, KC_RIGHT, _______, _______, + //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ + JUMPBACK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CSPEAK, _______, + //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ + _______, _______, _______, KC_TAB, PGMOD, _______, _______, _______, _______, _______, _______, _______ + //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ + ), + +[_MOD] = LAYOUT_split_space( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ + RESET, _______, _______, _______, _______, _______,_______, _______,KC_F8 , _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, + //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ + _______, _______, WREFRESH,_______, DF(_REV), _______, _______, UNDO, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ + KC_CAPS, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP, KC_RIGHT, KC_END, _______, PARADOWN, + //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ + _______, _______, XPANDR, _______, _______, _______, _______, PMERGE, KC_DOWN, _______, _______, _______, KC_F1 , + //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ + _______, _______, _______, LWORD, RWORD, LWORD, RWORD, _______, _______, _______, KC_F2 , _______ + //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ + ), + +[_DEL] = LAYOUT_split_space( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ + _______, SPEAK1, SPEAK2, SPEAK3, SPEAK4, _______,_______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ + REMCAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ + _______, _______, KC_DEL, KC_BSPC, BWORD, _______, _______, _______, _______, _______, _______, _______ + //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ + ), +}; diff --git a/keyboards/keebio/tragicforce68/keymaps/rossman360/readme.md b/keyboards/keebio/tragicforce68/keymaps/rossman360/readme.md new file mode 100644 index 000000000000..95e76d6308b5 --- /dev/null +++ b/keyboards/keebio/tragicforce68/keymaps/rossman360/readme.md @@ -0,0 +1,3 @@ +#Rossman360's Tragicforce68 Layout + +This is a split-space layout that, like a lot of my layouts, has a lot of macros specific to the transcription service Rev. Moving back through text, deleting characters or whole words and returning to the end of the document can all be done using thumbs. From ee5bf0376786bbdeb14e71bc137933bdea273608 Mon Sep 17 00:00:00 2001 From: Rossman360 Date: Fri, 3 Jan 2020 01:46:42 -0500 Subject: [PATCH 139/973] Add Levinson keymap --- .../levinson/keymaps/rossman360/keymap.c | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 keyboards/keebio/levinson/keymaps/rossman360/keymap.c diff --git a/keyboards/keebio/levinson/keymaps/rossman360/keymap.c b/keyboards/keebio/levinson/keymaps/rossman360/keymap.c new file mode 100644 index 000000000000..ff38ea8aad77 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/rossman360/keymap.c @@ -0,0 +1,146 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#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) +#define CMDBSP MT(MOD_LGUI, KC_BSPC) +#define ALTDEL MT(MOD_LALT, KC_DEL) +#define CTRLSP MT(MOD_LCTL, KC_SPACE) +#define BWORD LCTL(KC_BSPC) +#define JUMPBACK LSFT(KC_TAB) +#define LWORD LCTL(KC_LEFT) +#define RWORD LCTL(KC_RIGHT) +#define UNDO LCTL(KC_Z) +#define NTAB LCTL(KC_T) +#define CTAB LCTL(KC_W) +#define XPANDR LCTL(LSFT(KC_X)) +#define TAB1 LCTL(KC_1) +#define TAB2 LCTL(KC_2) +#define TAB3 LCTL(KC_3) +#define TAB4 LCTL(KC_4) +#define RVOLU LCTL(KC_RBRC) +#define RVOLD LCTL(KC_LBRC) + +enum layer_names { + _BASE, + _DEL, + _FN1, + _FN2, + _NUM, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SPEAKDASH, + CSPEAK, + PARADOWN, + PMERGE, + ULEFT, + URIGHT, + WREFRESH, + REMCAPS, + SPEAK1, + SPEAK2, + SPEAK3, + SPEAK4 +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { + case SPEAKDASH: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MINUS) SS_TAP(X_ENTER) SS_TAP(X_ENTER)); + } + break; + case CSPEAK: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); + } + break; + case SPEAK1: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_1))); + } + break; + case SPEAK2: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_2))); + } + break; + case SPEAK3: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_3))); + } + break; + case SPEAK4: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_4))); + } + break; + case PARADOWN: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); + } + break; + case PMERGE: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_HOME) SS_TAP(X_BSPACE) SS_TAP(X_SPACE) SS_LCTRL(SS_TAP(X_BSPACE)) SS_TAP(X_SPACE)); + } + break; + case WREFRESH: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_BSPACE)); + } + break; + case REMCAPS: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_LCTRL(SS_TAP(X_LEFT)) SS_TAP(X_DELETE)); + } + break; +}; +return true; +}; + +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 , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,SPEAKDASH, + _______, _______, _______, _______, 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 , _______, _______, _______ + ) +}; From c87d88be4d699754f133fb9e953199603367a4ae Mon Sep 17 00:00:00 2001 From: Rossman360 Date: Fri, 3 Jan 2020 01:51:08 -0500 Subject: [PATCH 140/973] cleanup --- keyboards/keebio/levinson/keymaps/rossman360/keymap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/keebio/levinson/keymaps/rossman360/keymap.c b/keyboards/keebio/levinson/keymaps/rossman360/keymap.c index ff38ea8aad77..122562457da7 100644 --- a/keyboards/keebio/levinson/keymaps/rossman360/keymap.c +++ b/keyboards/keebio/levinson/keymaps/rossman360/keymap.c @@ -40,8 +40,6 @@ enum custom_keycodes { CSPEAK, PARADOWN, PMERGE, - ULEFT, - URIGHT, WREFRESH, REMCAPS, SPEAK1, @@ -50,7 +48,6 @@ enum custom_keycodes { SPEAK4 }; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SPEAKDASH: From 2f338c060847f352a6307e0438a2be32793bfe27 Mon Sep 17 00:00:00 2001 From: Rossman360 Date: Fri, 3 Jan 2020 01:54:13 -0500 Subject: [PATCH 141/973] more cleanup --- keyboards/keebio/levinson/keymaps/rossman360/keymap.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/keyboards/keebio/levinson/keymaps/rossman360/keymap.c b/keyboards/keebio/levinson/keymaps/rossman360/keymap.c index 122562457da7..c56d61c8ad44 100644 --- a/keyboards/keebio/levinson/keymaps/rossman360/keymap.c +++ b/keyboards/keebio/levinson/keymaps/rossman360/keymap.c @@ -36,7 +36,6 @@ enum layer_names { enum custom_keycodes { QWERTY = SAFE_RANGE, - SPEAKDASH, CSPEAK, PARADOWN, PMERGE, @@ -50,11 +49,6 @@ enum custom_keycodes { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case SPEAKDASH: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_MINUS) SS_TAP(X_ENTER) SS_TAP(X_ENTER)); - } - break; case CSPEAK: if (record->event.pressed) { SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); @@ -123,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN2] = LAYOUT_ortho_4x12( _______, SPEAK1 , SPEAK2 , SPEAK3 , SPEAK4 , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,SPEAKDASH, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, PARADOWN, CSPEAK, _______, _______, _______, _______, _______, _______ ), From a1788a839804d37cf3619f39945cc790ca90203d Mon Sep 17 00:00:00 2001 From: Rossman360 Date: Fri, 3 Jan 2020 03:15:43 -0500 Subject: [PATCH 142/973] remove unneccesary line --- .../levinson/keymaps/rossman360/keymap.c | 2 - .../keymaps/rossman360/keymap.c~HEAD | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 2 deletions(-) create mode 100755 keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c~HEAD diff --git a/keyboards/keebio/levinson/keymaps/rossman360/keymap.c b/keyboards/keebio/levinson/keymaps/rossman360/keymap.c index c56d61c8ad44..efb5f9cfa4bb 100644 --- a/keyboards/keebio/levinson/keymaps/rossman360/keymap.c +++ b/keyboards/keebio/levinson/keymaps/rossman360/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - #define PGMOD LT(_NUM, KC_PGDN) #define TABMOD LT(_FN1, KC_TAB) #define SPCMOD LT(_FN1, KC_SPACE) diff --git a/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c~HEAD b/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c~HEAD new file mode 100755 index 000000000000..ef3fc729e284 --- /dev/null +++ b/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c~HEAD @@ -0,0 +1,145 @@ +#include QMK_KEYBOARD_H + +#define PGMOD LT(_MOD, KC_PGDN) +#define SPCMOD LT(_MOD, KC_SPACE) +#define VOLMOD LT(_MOD, KC__MUTE) +#define CMDBSP MT(MOD_LGUI, KC_BSPC) +#define ALTDEL MT(MOD_LALT, KC_DEL) +#define BWORD LCTL(KC_BSPC) +#define LWORD LCTL(KC_LEFT) +#define RWORD LCTL(KC_RIGHT) +#define JUMPBACK LSFT(KC_TAB) +#define UNDO LCTL(KC_Z) +#define XPANDR LCTL(LSFT(KC_X)) +#define NTAB LCTL(KC_T) +#define CTAB LCTL(KC_W) +#define XPANDR LCTL(LSFT(KC_X)) + +enum layer_names { + _BASE, + _REV, + _MOD, + _DEL, +}; + +enum custom_keycodes { + LAUNCHCLOCK = SAFE_RANGE, + CSPEAK, + SPEAK1, + SPEAK2, + SPEAK3, + SPEAK4, + PARADOWN, + WREFRESH, + PMERGE, + REMCAPS, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { + case CSPEAK: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); + break; + } + case SPEAK1: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_1))); + break; + } + case SPEAK2: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_2))); + } + break; + case SPEAK3: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_3))); + } + break; + case SPEAK4: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_4))); + } + break; + case PARADOWN: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); + } + break; + case PMERGE: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_HOME) SS_TAP(X_BSPACE) SS_TAP(X_SPACE) SS_LCTRL(SS_TAP(X_BSPACE)) SS_TAP(X_SPACE)); + } + break; + case WREFRESH: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_BSPACE)); + } + break; + case REMCAPS: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_LCTRL(SS_TAP(X_LEFT)) SS_TAP(X_DELETE)); + } + break; + }; + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT_split_space( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ + 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, NTAB, + //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ + 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(_MOD),CTAB, + //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ + 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_ENTER, + //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ + 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, + //├──────────┬───────┴──┬─────┴────┬───┴────────┴─────┬───┴────────┴───┬─────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ + CMDBSP, ALTDEL, KC_LCTRL, KC_SPACE, SPCMOD, SPCMOD, MO(_DEL), KC_LCTL, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT + //└──────────┴──────────┴──────────┴──────────────────┴────────────────┴───────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ + ), + +[_REV] = LAYOUT_split_space( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ + _______, _______, _______, _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ + KC_LEFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,KC_HOME, KC_END, KC_RIGHT, _______, _______, + //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ + JUMPBACK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CSPEAK, _______, + //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ + _______, _______, _______, KC_TAB, PGMOD, _______, _______, _______, _______, _______, _______, _______ + //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ + ), + +[_MOD] = LAYOUT_split_space( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ + RESET, _______, _______, _______, _______, _______,_______, _______,KC_F8 , _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, + //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ + _______, _______, WREFRESH,_______, DF(_REV), _______, _______, UNDO, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ + KC_CAPS, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP, KC_RIGHT, KC_END, _______, PARADOWN, + //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ + _______, _______, XPANDR, _______, _______, _______, _______, PMERGE, KC_DOWN, _______, _______, _______, KC_F1 , + //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ + _______, _______, _______, LWORD, RWORD, LWORD, RWORD, _______, _______, _______, KC_F2 , _______ + //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ + ), + +[_DEL] = LAYOUT_split_space( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ + _______, SPEAK1, SPEAK2, SPEAK3, SPEAK4, _______,_______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ + REMCAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ + _______, _______, KC_DEL, KC_BSPC, BWORD, _______, _______, _______, _______, _______, _______, _______ + //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ + ), +}; From abca0ccf4a28caea94fa87e16e08ce0709f80ad5 Mon Sep 17 00:00:00 2001 From: Rossman360 Date: Fri, 3 Jan 2020 03:19:53 -0500 Subject: [PATCH 143/973] remove head --- .../keymaps/rossman360/keymap.c~HEAD | 145 ------------------ 1 file changed, 145 deletions(-) delete mode 100755 keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c~HEAD diff --git a/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c~HEAD b/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c~HEAD deleted file mode 100755 index ef3fc729e284..000000000000 --- a/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c~HEAD +++ /dev/null @@ -1,145 +0,0 @@ -#include QMK_KEYBOARD_H - -#define PGMOD LT(_MOD, KC_PGDN) -#define SPCMOD LT(_MOD, KC_SPACE) -#define VOLMOD LT(_MOD, KC__MUTE) -#define CMDBSP MT(MOD_LGUI, KC_BSPC) -#define ALTDEL MT(MOD_LALT, KC_DEL) -#define BWORD LCTL(KC_BSPC) -#define LWORD LCTL(KC_LEFT) -#define RWORD LCTL(KC_RIGHT) -#define JUMPBACK LSFT(KC_TAB) -#define UNDO LCTL(KC_Z) -#define XPANDR LCTL(LSFT(KC_X)) -#define NTAB LCTL(KC_T) -#define CTAB LCTL(KC_W) -#define XPANDR LCTL(LSFT(KC_X)) - -enum layer_names { - _BASE, - _REV, - _MOD, - _DEL, -}; - -enum custom_keycodes { - LAUNCHCLOCK = SAFE_RANGE, - CSPEAK, - SPEAK1, - SPEAK2, - SPEAK3, - SPEAK4, - PARADOWN, - WREFRESH, - PMERGE, - REMCAPS, -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { -switch (keycode) { - case CSPEAK: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); - break; - } - case SPEAK1: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_1))); - break; - } - case SPEAK2: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_2))); - } - break; - case SPEAK3: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_3))); - } - break; - case SPEAK4: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_4))); - } - break; - case PARADOWN: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); - } - break; - case PMERGE: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_HOME) SS_TAP(X_BSPACE) SS_TAP(X_SPACE) SS_LCTRL(SS_TAP(X_BSPACE)) SS_TAP(X_SPACE)); - } - break; - case WREFRESH: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_BSPACE)); - } - break; - case REMCAPS: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_LCTRL(SS_TAP(X_LEFT)) SS_TAP(X_DELETE)); - } - break; - }; - return true; -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_BASE] = LAYOUT_split_space( - //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ - 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, NTAB, - //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ - 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(_MOD),CTAB, - //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ - 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_ENTER, - //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ - 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, - //├──────────┬───────┴──┬─────┴────┬───┴────────┴─────┬───┴────────┴───┬─────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ - CMDBSP, ALTDEL, KC_LCTRL, KC_SPACE, SPCMOD, SPCMOD, MO(_DEL), KC_LCTL, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT - //└──────────┴──────────┴──────────┴──────────────────┴────────────────┴───────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ - ), - -[_REV] = LAYOUT_split_space( - //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ - _______, _______, _______, _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, _______, _______, _______, - //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ - KC_LEFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,KC_HOME, KC_END, KC_RIGHT, _______, _______, - //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ - JUMPBACK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CSPEAK, _______, - //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ - _______, _______, _______, KC_TAB, PGMOD, _______, _______, _______, _______, _______, _______, _______ - //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ - ), - -[_MOD] = LAYOUT_split_space( - //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ - RESET, _______, _______, _______, _______, _______,_______, _______,KC_F8 , _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, - //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ - _______, _______, WREFRESH,_______, DF(_REV), _______, _______, UNDO, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ - KC_CAPS, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP, KC_RIGHT, KC_END, _______, PARADOWN, - //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ - _______, _______, XPANDR, _______, _______, _______, _______, PMERGE, KC_DOWN, _______, _______, _______, KC_F1 , - //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ - _______, _______, _______, LWORD, RWORD, LWORD, RWORD, _______, _______, _______, KC_F2 , _______ - //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ - ), - -[_DEL] = LAYOUT_split_space( - //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ - _______, SPEAK1, SPEAK2, SPEAK3, SPEAK4, _______,_______, _______,_______, _______, _______, _______, _______, _______, _______, _______, - //├────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────────────┤ ├────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┤ └────────┴────────┘ - REMCAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├──────────────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───┬────┴───────────────────┤ ┌────────┐ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├──────────┬───────┴──┬─────┴────┬───┴────────┴──────┬──┴────────┴────┬────┴────────┴┬────────┴────────┼────────┴─┬──────────┬────┬──────┴─┬────────┼────────┐ - _______, _______, KC_DEL, KC_BSPC, BWORD, _______, _______, _______, _______, _______, _______, _______ - //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ - ), -}; From 2a7c715bc6f5774a4fa73a0a83f8c3bd44f19e22 Mon Sep 17 00:00:00 2001 From: Akaash Suresh Date: Fri, 3 Jan 2020 08:47:18 -0600 Subject: [PATCH 144/973] Fixed formatting and added font file --- keyboards/crkbd/keymaps/curry/config.h | 8 +- keyboards/crkbd/keymaps/curry/rules.mk | 2 +- keyboards/lily58/keymaps/curry/config.h | 2 +- keyboards/lily58/keymaps/curry/rules.mk | 2 +- users/curry/config.h | 2 + users/curry/glcdfont.c | 241 ++++++++++++++++++++++++ 6 files changed, 250 insertions(+), 7 deletions(-) create mode 100644 users/curry/glcdfont.c diff --git a/keyboards/crkbd/keymaps/curry/config.h b/keyboards/crkbd/keymaps/curry/config.h index 2bb61d3fe7e8..4b424b05b335 100644 --- a/keyboards/crkbd/keymaps/curry/config.h +++ b/keyboards/crkbd/keymaps/curry/config.h @@ -1,8 +1,11 @@ #pragma once -#define MASTER_RIGHT +#define EE_HANDS #define USE_SERIAL_PD2 +#define OLED_DISABLE_TIMEOUT +#define TAPPING_TERM_PER_KEY + #ifdef RGBLIGHT_ENABLE # undef RGBLED_NUM # define RGBLED_NUM 27 @@ -26,6 +29,3 @@ # define RGB_MATRIX_VAL_STEP 5 # define RGB_MATRIX_SPD_STEP 10 #endif - -#define OLED_DISABLE_TIMEOUT -#define TAPPING_TERM_PER_KEY diff --git a/keyboards/crkbd/keymaps/curry/rules.mk b/keyboards/crkbd/keymaps/curry/rules.mk index 483d86bdc992..97f56f80483b 100644 --- a/keyboards/crkbd/keymaps/curry/rules.mk +++ b/keyboards/crkbd/keymaps/curry/rules.mk @@ -20,4 +20,4 @@ TAP_DANCE_ENABLE = yes # Enable Tap Dance. OLED_DRIVER_ENABLE = yes BOOTLOADER = atmel-dfu SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -SPLIT_TRANSPORT = mirror +SPLIT_TRANSPORT = mirror diff --git a/keyboards/lily58/keymaps/curry/config.h b/keyboards/lily58/keymaps/curry/config.h index 229213b3caf6..9ab19bc3c021 100644 --- a/keyboards/lily58/keymaps/curry/config.h +++ b/keyboards/lily58/keymaps/curry/config.h @@ -1,6 +1,6 @@ #pragma once -#define MASTER_LEFT +#define EE_HANDS #define USE_SERIAL_PD2 #define OLED_DISABLE_TIMEOUT diff --git a/keyboards/lily58/keymaps/curry/rules.mk b/keyboards/lily58/keymaps/curry/rules.mk index e19c0f389d69..1b42868c915b 100644 --- a/keyboards/lily58/keymaps/curry/rules.mk +++ b/keyboards/lily58/keymaps/curry/rules.mk @@ -18,4 +18,4 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing TAP_DANCE_ENABLE = yes # Enable Tap Dance. OLED_DRIVER_ENABLE = yes BOOTLOADER = atmel-dfu -SPLIT_TRANSPORT = mirror +SPLIT_TRANSPORT = mirror diff --git a/users/curry/config.h b/users/curry/config.h index ac4a8f0709e5..45b8364e126e 100644 --- a/users/curry/config.h +++ b/users/curry/config.h @@ -114,3 +114,5 @@ #ifdef LOCKING_RESYNC_ENABLE # undef LOCKING_RESYNC_ENABLE #endif + +#define OLED_FONT_H "users/curry/glcdfont.c" diff --git a/users/curry/glcdfont.c b/users/curry/glcdfont.c new file mode 100644 index 000000000000..2bfc3fac6d44 --- /dev/null +++ b/users/curry/glcdfont.c @@ -0,0 +1,241 @@ +#pragma once + +#ifdef __AVR__ +# include +# include +#elif defined(ESP8266) +# include +#else +# define PROGMEM +#endif + +// Corne 8x6 font with QMK Firmware Logo +// Online editor: https://helixfonteditor.netlify.com/ + +// clang-format off +const unsigned char font[] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, +0x20, 0x54, 0x54, 0x78, 0x40, 0x00, +0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, +0x38, 0x44, 0x44, 0x44, 0x28, 0x00, +0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, +0x38, 0x54, 0x54, 0x54, 0x18, 0x00, +0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, +0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, +0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, +0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, +0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, +0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, +0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, +0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, +0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, +0x48, 0x54, 0x54, 0x54, 0x24, 0x00, +0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, +0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, +0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, +0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, +0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, +0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, +0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0, +0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, +0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, +0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, +0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, +0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, +0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, +0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, +0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, +0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 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, 0xF8, 0xFC, 0xFE, +0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x81, +0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF, +0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, +0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, +0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, +0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, +0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 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, 0x03, 0x0F, 0x1F, +0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F, +0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C, +0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x07, 0x07, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x03, 0x01, 0x00, 0x00, 0x00, 0x00, +0x01, 0x03, 0x07, 0x07, 0x07, 0x07, +0x07, 0x07, 0x07, 0x07, 0x03, 0x01, +0x00, 0x00, 0x00, 0x07, 0x07, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x07, 0x07, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x07, +0x07, 0x00, 0x00, 0x00, 0x01, 0x03, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x07, 0x07, 0x03, 0x01, 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, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; From 2dc0fd2b500f01b36bc9ec74b87795707d503c48 Mon Sep 17 00:00:00 2001 From: hineybush Date: Fri, 3 Jan 2020 14:32:54 -0500 Subject: [PATCH 145/973] small hbcp changes --- keyboards/hineybush/hbcp/config.h | 164 +----------------------------- keyboards/hineybush/hbcp/hbcp.c | 9 ++ keyboards/hineybush/hbcp/rules.mk | 2 +- 3 files changed, 12 insertions(+), 163 deletions(-) diff --git a/keyboards/hineybush/hbcp/config.h b/keyboards/hineybush/hbcp/config.h index 5bf426df7ebc..8a5b96ec367b 100644 --- a/keyboards/hineybush/hbcp/config.h +++ b/keyboards/hineybush/hbcp/config.h @@ -58,26 +58,11 @@ along with this program. If not, see . #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_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 */ @@ -98,149 +83,4 @@ along with this program. If not, see . */ // #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/hineybush/hbcp/hbcp.c b/keyboards/hineybush/hbcp/hbcp.c index cd5320f6e509..e2513023e099 100644 --- a/keyboards/hineybush/hbcp/hbcp.c +++ b/keyboards/hineybush/hbcp/hbcp.c @@ -67,6 +67,15 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } +void eeconfig_init_kb(void) { // EEPROM is getting reset! + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default + + eeconfig_update_kb(0); + eeconfig_init_user(); +} + #ifdef RGBLIGHT_ENABLE __attribute__ ((weak)) diff --git a/keyboards/hineybush/hbcp/rules.mk b/keyboards/hineybush/hbcp/rules.mk index fa31c9e0019e..869fa029c93c 100644 --- a/keyboards/hineybush/hbcp/rules.mk +++ b/keyboards/hineybush/hbcp/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 = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug From 320822d75b785401809f45007320e6fb6885b3fd Mon Sep 17 00:00:00 2001 From: Wilba Date: Sat, 4 Jan 2020 07:52:00 +1100 Subject: [PATCH 146/973] VIA Configurator Refactor (#7268) * VIA Refactor * Remove old code * review changes * review changes * Fix cannonkeys/satisfaction75/prototype:via build * Add via.h to quantum.h * Move backlight init to after backlight config load * Merge branch 'master' into via_refactor_pr * Update user's rules.mk to new way of enabling VIA * Added id_switch_matrix_state * Review changes --- common_features.mk | 40 +- keyboards/aeboards/aegis/config.h | 20 - keyboards/aeboards/aegis/keymaps/via/rules.mk | 69 +-- keyboards/aeboards/aegis/rules.mk | 4 +- keyboards/aeboards/ext65/config.h | 21 - .../aeboards/ext65/keymaps/default/keymap.c | 8 +- keyboards/aeboards/ext65/keymaps/via/keymap.c | 8 +- keyboards/aeboards/ext65/keymaps/via/rules.mk | 69 +-- keyboards/aeboards/ext65/rules.mk | 5 +- keyboards/ai03/lunar/config.h | 22 - keyboards/ai03/lunar/keymaps/via/rules.mk | 86 +--- keyboards/cannonkeys/an_c/config.h | 23 +- .../cannonkeys/an_c/keymaps/via/rules.mk | 6 +- keyboards/cannonkeys/an_c/rules.mk | 3 - keyboards/cannonkeys/chimera65/config.h | 20 - .../cannonkeys/chimera65/keymaps/via/rules.mk | 6 +- keyboards/cannonkeys/chimera65/rules.mk | 3 - keyboards/cannonkeys/instant60/config.h | 23 +- .../cannonkeys/instant60/keymaps/via/rules.mk | 6 +- .../instant60/keymaps/via_standard/rules.mk | 6 +- keyboards/cannonkeys/instant60/rules.mk | 3 - keyboards/cannonkeys/iron165/config.h | 22 +- keyboards/cannonkeys/satisfaction75/config.h | 43 +- .../satisfaction75/keymaps/boy_314/rules.mk | 3 +- .../satisfaction75/keymaps/via/rules.mk | 6 +- .../satisfaction75/prototype/prototype.h | 17 + keyboards/cannonkeys/satisfaction75/rules.mk | 3 - .../satisfaction75/satisfaction75.c | 288 ++++-------- .../satisfaction75/satisfaction75.h | 10 +- .../satisfaction75/satisfaction_encoder.c | 6 +- keyboards/cannonkeys/savage65/config.h | 22 +- keyboards/cannonkeys/stm32f072/keyboard.c | 266 +++-------- keyboards/cannonkeys/stm32f072/keyboard.h | 4 +- keyboards/cannonkeys/tmov2/config.h | 22 +- keyboards/dp60/config.h | 22 +- keyboards/dp60/keymaps/via/rules.mk | 40 +- keyboards/handwired/prime_exl/config.h | 20 - .../handwired/prime_exl/keymaps/via/rules.mk | 87 +--- keyboards/hs60/v2/config.h | 22 +- keyboards/hs60/v2/keymaps/ansi_via/rules.mk | 68 +-- .../hs60/v2/keymaps/default_via/rules.mk | 68 +-- keyboards/hs60/v2/keymaps/goatmaster/rules.mk | 68 +-- keyboards/hs60/v2/keymaps/hhkb_via/rules.mk | 68 +-- keyboards/hs60/v2/keymaps/iso_andys8/rules.mk | 68 +-- keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 68 +-- .../hs60/v2/keymaps/win_osx_dual/rules.mk | 68 +-- keyboards/hs60/v2/rules.mk | 2 - keyboards/hs60/v2/v2.h | 2 +- keyboards/idb_60/config.h | 20 - keyboards/illuminati/is0/keymaps/via/keymap.c | 31 ++ .../illuminati/is0/keymaps/via/readme.md | 1 + keyboards/illuminati/is0/keymaps/via/rules.mk | 1 + keyboards/keebio/iris/iris.h | 2 +- keyboards/keebio/iris/keymaps/osiris/rules.mk | 5 - keyboards/keebio/iris/keymaps/via/config.h | 20 - keyboards/keebio/iris/keymaps/via/rules.mk | 8 +- keyboards/keebio/iris/rev1/config.h | 20 - keyboards/keebio/iris/rev1_led/config.h | 20 - keyboards/keebio/iris/rev2/config.h | 20 - keyboards/keebio/iris/rev3/config.h | 20 - keyboards/keebio/iris/rev4/config.h | 20 - keyboards/kingly_keys/romac/config.h | 4 +- .../kingly_keys/romac/keymaps/via/keymap.c | 44 ++ .../kingly_keys/romac/keymaps/via/rules.mk | 1 + keyboards/maartenwut/plain60/config.h | 21 - .../plain60/keymaps/kwerdenker/rules.mk | 5 +- .../maartenwut/plain60/keymaps/via/rules.mk | 6 +- keyboards/nk65/config.h | 21 +- keyboards/nk65/keymaps/default_via/rules.mk | 68 +-- keyboards/nk65/nk65.h | 2 +- keyboards/nk65/rules.mk | 2 - keyboards/primekb/prime_e/config.h | 20 - .../primekb/prime_e/keymaps/via/rules.mk | 86 +--- keyboards/projectkb/alice/config.h | 26 +- keyboards/projectkb/alice/rules.mk | 3 - keyboards/sck/osa/config.h | 4 +- keyboards/sck/osa/keymaps/via/keymap.c | 49 ++ keyboards/sck/osa/keymaps/via/readme.md | 1 + keyboards/sck/osa/keymaps/via/rules.mk | 2 + keyboards/snagpad/config.h | 20 - keyboards/snagpad/keymaps/via/rules.mk | 77 +--- keyboards/westfoxtrot/aanzee/config.h | 23 - .../westfoxtrot/aanzee/keymaps/via/rules.mk | 70 +-- keyboards/wilba_tech/rama_works_koyu/config.h | 26 +- .../rama_works_koyu/keymaps/via/keymap.c | 36 ++ .../rama_works_koyu/keymaps/via/rules.mk | 1 + .../rama_works_koyu/rama_works_koyu.h | 2 +- keyboards/wilba_tech/rama_works_koyu/rules.mk | 4 +- .../wilba_tech/rama_works_m10_b/config.h | 27 +- .../rama_works_m10_b/keymaps/knops/config.h | 1 + .../rama_works_m10_b/keymaps/via/keymap.c | 13 + .../rama_works_m10_b/keymaps/via/rules.mk | 1 + .../wilba_tech/rama_works_m10_b/rules.mk | 8 +- .../wilba_tech/rama_works_m60_a/config.h | 26 +- .../rama_works_m60_a/keymaps/via/keymap.c | 40 ++ .../rama_works_m60_a/keymaps/via/rules.mk | 1 + .../rama_works_m60_a/rama_works_m60_a.h | 2 +- .../wilba_tech/rama_works_m60_a/rules.mk | 4 +- keyboards/wilba_tech/rama_works_m6_a/config.h | 26 +- .../rama_works_m6_a/keymaps/via/keymap.c | 16 + .../rama_works_m6_a/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/rama_works_m6_a/rules.mk | 9 +- keyboards/wilba_tech/rama_works_m6_b/config.h | 26 +- .../rama_works_m6_b/keymaps/via/keymap.c | 16 + .../rama_works_m6_b/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/rama_works_m6_b/rules.mk | 4 +- .../wilba_tech/rama_works_u80_a/config.h | 27 +- .../rama_works_u80_a/keymaps/via/keymap.c | 37 ++ .../rama_works_u80_a/keymaps/via/rules.mk | 1 + .../rama_works_u80_a/rama_works_u80_a.h | 2 +- .../wilba_tech/rama_works_u80_a/rules.mk | 5 +- keyboards/wilba_tech/via_api.h | 49 -- keyboards/wilba_tech/via_keycodes.h | 77 ---- keyboards/wilba_tech/wt60_a/config.h | 25 +- .../wilba_tech/wt60_a/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt60_a/rules.mk | 2 +- keyboards/wilba_tech/wt60_d/config.h | 20 - .../wilba_tech/wt60_d/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt60_d/rules.mk | 8 +- keyboards/wilba_tech/wt60_d/wt60_d.c | 18 +- keyboards/wilba_tech/wt65_a/config.h | 25 +- .../wilba_tech/wt65_a/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt65_a/rules.mk | 2 +- keyboards/wilba_tech/wt65_b/config.h | 25 +- .../wilba_tech/wt65_b/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt65_b/rules.mk | 2 +- keyboards/wilba_tech/wt69_a/config.h | 23 - .../wilba_tech/wt69_a/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt69_a/rules.mk | 2 +- keyboards/wilba_tech/wt75_a/config.h | 25 +- .../wilba_tech/wt75_a/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt75_a/rules.mk | 2 +- keyboards/wilba_tech/wt75_b/config.h | 25 +- .../wilba_tech/wt75_b/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt75_b/rules.mk | 2 +- keyboards/wilba_tech/wt75_c/config.h | 29 +- .../wilba_tech/wt75_c/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt75_c/rules.mk | 2 +- keyboards/wilba_tech/wt80_a/config.h | 24 +- .../wilba_tech/wt80_a/keymaps/via/rules.mk | 3 +- keyboards/wilba_tech/wt80_a/rules.mk | 2 +- keyboards/wilba_tech/wt8_a/config.h | 23 - .../wilba_tech/wt8_a/keymaps/via/rules.mk | 69 +-- keyboards/wilba_tech/wt8_a/rules.mk | 2 +- keyboards/wilba_tech/wt_main.c | 434 +++++------------- keyboards/wilba_tech/wt_mono_backlight.c | 9 +- keyboards/wilba_tech/wt_rgb_backlight.c | 8 +- keyboards/wilba_tech/zeal60/config.h | 24 +- .../wilba_tech/zeal60/keymaps/via/keymap.c | 38 ++ .../wilba_tech/zeal60/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/zeal60/rules.mk | 4 +- keyboards/wilba_tech/zeal60/zeal60.h | 2 +- keyboards/wilba_tech/zeal65/config.h | 24 +- keyboards/wilba_tech/zeal65/info.json | 2 +- .../zeal65/keymaps/split_bs/keymap.c | 8 +- .../wilba_tech/zeal65/keymaps/via/keymap.c | 38 ++ .../wilba_tech/zeal65/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/zeal65/rules.mk | 4 +- keyboards/wilba_tech/zeal65/zeal65.h | 4 +- quantum/dynamic_keymap.c | 55 ++- quantum/quantum.c | 7 +- quantum/quantum.h | 8 + quantum/via.c | 400 ++++++++++++++++ quantum/via.h | 151 ++++++ show_options.mk | 3 +- tmk_core/common/eeconfig.h | 2 + tmk_core/common/keyboard.c | 6 + 167 files changed, 1514 insertions(+), 3169 deletions(-) create mode 100644 keyboards/illuminati/is0/keymaps/via/keymap.c create mode 100644 keyboards/illuminati/is0/keymaps/via/readme.md create mode 100644 keyboards/illuminati/is0/keymaps/via/rules.mk delete mode 100644 keyboards/keebio/iris/keymaps/via/config.h create mode 100644 keyboards/kingly_keys/romac/keymaps/via/keymap.c create mode 100644 keyboards/kingly_keys/romac/keymaps/via/rules.mk create mode 100644 keyboards/sck/osa/keymaps/via/keymap.c create mode 100644 keyboards/sck/osa/keymaps/via/readme.md create mode 100644 keyboards/sck/osa/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_koyu/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_koyu/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m10_b/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m60_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m60_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m6_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m6_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m6_b/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m6_b/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_u80_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_u80_a/keymaps/via/rules.mk delete mode 100644 keyboards/wilba_tech/via_api.h delete mode 100644 keyboards/wilba_tech/via_keycodes.h create mode 100644 keyboards/wilba_tech/zeal60/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/zeal60/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/zeal65/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/zeal65/keymaps/via/rules.mk create mode 100644 quantum/via.c create mode 100644 quantum/via.h diff --git a/common_features.mk b/common_features.mk index 640539fd6f41..92b24bb2003d 100644 --- a/common_features.mk +++ b/common_features.mk @@ -82,19 +82,19 @@ endif ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE - UNICODE_COMMON = yes + UNICODE_COMMON := yes SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c endif ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) OPT_DEFS += -DUNICODEMAP_ENABLE - UNICODE_COMMON = yes + UNICODE_COMMON := yes SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c endif ifeq ($(strip $(UNICODE_ENABLE)), yes) OPT_DEFS += -DUNICODE_ENABLE - UNICODE_COMMON = yes + UNICODE_COMMON := yes SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c endif @@ -107,13 +107,13 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) OPT_DEFS += -DRGBLIGHT_ENABLE SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/rgblight.c - CIE1931_CURVE = yes - LED_BREATHING_TABLE = yes - RGB_KEYCODES_ENABLE = yes + CIE1931_CURVE := yes + LED_BREATHING_TABLE := yes + RGB_KEYCODES_ENABLE := yes ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER else - WS2812_DRIVER_REQUIRED = yes + WS2812_DRIVER_REQUIRED := yes endif endif @@ -147,12 +147,12 @@ endif SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/rgb_matrix.c SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c - CIE1931_CURVE = yes - RGB_KEYCODES_ENABLE = yes + CIE1931_CURVE := yes + RGB_KEYCODES_ENABLE := yes endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) - RGB_MATRIX_ENABLE = IS31FL3731 + RGB_MATRIX_ENABLE := IS31FL3731 endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731) @@ -178,7 +178,7 @@ endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) OPT_DEFS += -DWS2812 - WS2812_DRIVER_REQUIRED = yes + WS2812_DRIVER_REQUIRED := yes endif ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) @@ -232,12 +232,12 @@ endif endif ifeq ($(strip $(LCD_ENABLE)), yes) - CIE1931_CURVE = yes + CIE1931_CURVE := yes endif # backward compat ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) - BACKLIGHT_DRIVER = custom + BACKLIGHT_DRIVER := custom endif VALID_BACKLIGHT_TYPES := pwm software custom @@ -250,7 +250,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) endif ifeq ($(strip $(VISUALIZER_ENABLE)), yes) - CIE1931_CURVE = yes + CIE1931_CURVE := yes endif COMMON_VPATH += $(QUANTUM_DIR)/backlight @@ -294,12 +294,12 @@ endif ifeq ($(strip $(CIE1931_CURVE)), yes) OPT_DEFS += -DUSE_CIE1931_CURVE - LED_TABLES = yes + LED_TABLES := yes endif ifeq ($(strip $(LED_BREATHING_TABLE)), yes) OPT_DEFS += -DUSE_LED_BREATHING_TABLE - LED_TABLES = yes + LED_TABLES := yes endif ifeq ($(strip $(LED_TABLES)), yes) @@ -349,6 +349,14 @@ ifeq ($(strip $(VELOCIKEY_ENABLE)), yes) SRC += $(QUANTUM_DIR)/velocikey.c endif +ifeq ($(strip $(VIA_ENABLE)), yes) + DYNAMIC_KEYMAP_ENABLE := yes + RAW_ENABLE := yes + BOOTMAGIC_ENABLE := lite + SRC += $(QUANTUM_DIR)/via.c + OPT_DEFS += -DVIA_ENABLE +endif + ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes) OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE SRC += $(QUANTUM_DIR)/dynamic_keymap.c diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h index 2a35897300dd..5836f02bc0a9 100644 --- a/keyboards/aeboards/aegis/config.h +++ b/keyboards/aeboards/aegis/config.h @@ -46,23 +46,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*12*9*2)) = (37+864) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 901 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 123 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/aeboards/aegis/keymaps/via/rules.mk b/keyboards/aeboards/aegis/keymaps/via/rules.mk index 70258b9ead63..1e5b99807cb7 100644 --- a/keyboards/aeboards/aegis/keymaps/via/rules.mk +++ b/keyboards/aeboards/aegis/keymaps/via/rules.mk @@ -1,68 +1 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -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) -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) -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk index 602da8678656..2e39dae173c6 100644 --- a/keyboards/aeboards/aegis/rules.mk +++ b/keyboards/aeboards/aegis/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -30,5 +30,3 @@ 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 -# project specific files -SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/aeboards/ext65/config.h b/keyboards/aeboards/ext65/config.h index 7255b463fc6f..c6e6ac8900f7 100644 --- a/keyboards/aeboards/ext65/config.h +++ b/keyboards/aeboards/ext65/config.h @@ -46,24 +46,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*10*2)) = (37+800) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 837 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 187 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 - diff --git a/keyboards/aeboards/ext65/keymaps/default/keymap.c b/keyboards/aeboards/ext65/keymaps/default/keymap.c index 339fe2c48439..54eab23aec65 100644 --- a/keyboards/aeboards/ext65/keymaps/default/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/default/keymap.c @@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_ext65( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [2] = LAYOUT_ext65( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT_ext65( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/keymaps/via/keymap.c index efa11cd0fd64..ab6a93043a31 100644 --- a/keyboards/aeboards/ext65/keymaps/via/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/via/keymap.c @@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_ext65( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [2] = LAYOUT_ext65( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT_ext65( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/aeboards/ext65/keymaps/via/rules.mk b/keyboards/aeboards/ext65/keymaps/via/rules.mk index 70258b9ead63..1e5b99807cb7 100644 --- a/keyboards/aeboards/ext65/keymaps/via/rules.mk +++ b/keyboards/aeboards/ext65/keymaps/via/rules.mk @@ -1,68 +1 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -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) -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) -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/aeboards/ext65/rules.mk b/keyboards/aeboards/ext65/rules.mk index bac979ad0c2a..a5c98a1c60d7 100644 --- a/keyboards/aeboards/ext65/rules.mk +++ b/keyboards/aeboards/ext65/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -29,6 +29,3 @@ 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 - -# project specific files -SRC += keyboards/wilba_tech/wt_main.c diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index f7f3262ac732..5bc0a0c49b0c 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h @@ -242,25 +242,3 @@ along with this program. If not, see . /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 - -/* VIA Configurator Compatibility */ - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/ai03/lunar/keymaps/via/rules.mk b/keyboards/ai03/lunar/keymaps/via/rules.mk index 01fcd55e8dff..1e5b99807cb7 100644 --- a/keyboards/ai03/lunar/keymaps/via/rules.mk +++ b/keyboards/ai03/lunar/keymaps/via/rules.mk @@ -1,85 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -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 -BOOTLOADER = atmel-dfu - - -# 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 -# -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 = 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 -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -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) - -SRC += keyboards/wilba_tech/wt_main.c - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h index ef480521bc5a..55414ba50951 100644 --- a/keyboards/cannonkeys/an_c/config.h +++ b/keyboards/cannonkeys/an_c/config.h @@ -58,26 +58,9 @@ along with this program. If not, see . #define PIN_WS2812 15 #define WS2812_SPI SPID2 - -// EEPROM usage -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 40 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x03 -#define EEPROM_VERSION_ADDR 42 - - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 -// start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 -#define EEPROM_CUSTOM_BACKLIGHT 644 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 /* * Feature disable options diff --git a/keyboards/cannonkeys/an_c/keymaps/via/rules.mk b/keyboards/cannonkeys/an_c/keymaps/via/rules.mk index d12497792d56..1e5b99807cb7 100644 --- a/keyboards/cannonkeys/an_c/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/an_c/keymaps/via/rules.mk @@ -1,5 +1 @@ -# rules.mk overrides to enable VIA - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk index 2f30956e7d56..f99075d815cf 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk @@ -53,7 +53,4 @@ CUSTOM_MATRIX = no # Custom matrix file # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason RGBLIGHT_ENABLE = yes -# RAW_ENABLE = yes -# DYNAMIC_KEYMAP_ENABLE = yes - LAYOUTS = 60_ansi 60_tsangan_hhkb diff --git a/keyboards/cannonkeys/chimera65/config.h b/keyboards/cannonkeys/chimera65/config.h index ace3565bea9d..c76fd6c1c5b5 100644 --- a/keyboards/cannonkeys/chimera65/config.h +++ b/keyboards/cannonkeys/chimera65/config.h @@ -50,26 +50,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -// EEPROM usage -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x02 -#define EEPROM_VERSION_ADDR 36 - - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 -// start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -#define EEPROM_CUSTOM_BACKLIGHT 678 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 679 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 202 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk b/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk index d12497792d56..1e5b99807cb7 100644 --- a/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk @@ -1,5 +1 @@ -# rules.mk overrides to enable VIA - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/chimera65/rules.mk b/keyboards/cannonkeys/chimera65/rules.mk index 580a7712c6ac..cd6734a312a9 100644 --- a/keyboards/cannonkeys/chimera65/rules.mk +++ b/keyboards/cannonkeys/chimera65/rules.mk @@ -52,6 +52,3 @@ 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 - -# RAW_ENABLE = yes -# DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h index 9da2043d2f62..2d23d5f83c5d 100644 --- a/keyboards/cannonkeys/instant60/config.h +++ b/keyboards/cannonkeys/instant60/config.h @@ -58,26 +58,9 @@ along with this program. If not, see . #define PIN_WS2812 15 #define WS2812_SPI SPID2 - -// EEPROM usage -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 40 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x03 -#define EEPROM_VERSION_ADDR 42 - - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 -// start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 -#define EEPROM_CUSTOM_BACKLIGHT 644 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 /* * Feature disable options diff --git a/keyboards/cannonkeys/instant60/keymaps/via/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk index d12497792d56..1e5b99807cb7 100644 --- a/keyboards/cannonkeys/instant60/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk @@ -1,5 +1 @@ -# rules.mk overrides to enable VIA - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk index d12497792d56..1e5b99807cb7 100644 --- a/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk +++ b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk @@ -1,5 +1 @@ -# rules.mk overrides to enable VIA - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index 1ce6fa3b26dd..d1dd3b28999b 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -55,7 +55,4 @@ CUSTOM_MATRIX = no # Custom matrix file # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason RGBLIGHT_ENABLE = yes -# RAW_ENABLE = yes -# DYNAMIC_KEYMAP_ENABLE = yes - LAYOUTS = 60_ansi 60_tsangan_hhkb diff --git a/keyboards/cannonkeys/iron165/config.h b/keyboards/cannonkeys/iron165/config.h index c5fcd4518aba..640f6fb6599a 100644 --- a/keyboards/cannonkeys/iron165/config.h +++ b/keyboards/cannonkeys/iron165/config.h @@ -50,25 +50,9 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -// EEPROM usage -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 40 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x02 -#define EEPROM_VERSION_ADDR 42 - - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 -// start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 -#define EEPROM_CUSTOM_BACKLIGHT 684 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 /* * Feature disable options diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 8387289d87b7..7a4354c8a7a6 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -64,41 +64,14 @@ along with this program. If not, see . #endif - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 40 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x01 -#define EEPROM_VERSION_ADDR 42 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 - -// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) = 803 - -// I'm also putting my custom stuff after that -// 1 for enabled encoder modes -// 1 for custom backlighting controls -// 1 for OLED default mode -// 6 for 3x custom encoder settings, left, right, and press (18 total) - -#define DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES 811 -#define DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT 812 -#define DYNAMIC_KEYMAP_DEFAULT_OLED 813 -#define DYNAMIC_KEYMAP_CUSTOM_ENCODER 814 - -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 832 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 - - +// Custom config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +// Custom config Usage: +// 1 for enabled encoder modes (1 byte) +// 1 for custom backlighting controls (1 byte) +// 1 for OLED default mode (1 byte) +// 6 for 3x custom encoder settings, left, right, and press (18 bytes) +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21 /* * Feature disable options diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk index 0dcaa7318373..6f45dc73ed67 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk @@ -1,4 +1,3 @@ # rules.mk overrides to enable VIA -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk index d12497792d56..1e5b99807cb7 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk @@ -1,5 +1 @@ -# rules.mk overrides to enable VIA - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/satisfaction75/prototype/prototype.h b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h index 42e574f3ea83..ed4c7d793da7 100644 --- a/keyboards/cannonkeys/satisfaction75/prototype/prototype.h +++ b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h @@ -17,3 +17,20 @@ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ } + +// Expose All Keys - Split backspace - ISO Extra keys - Split space bottom row +#define LAYOUT_all( \ + K000, 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, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { 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, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk index 3e2877200ed2..e81448d626ac 100644 --- a/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -51,7 +51,4 @@ ENCODER_ENABLE = yes QWIIC_ENABLE += MICRO_OLED #BACKLIGHT_ENABLE = yes -# RAW_ENABLE = yes -# DYNAMIC_KEYMAP_ENABLE = yes - DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 12d3660daeb1..0fe09c384fb6 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -15,11 +15,7 @@ #include "raw_hid.h" #include "dynamic_keymap.h" #include "tmk_core/common/eeprom.h" - -// HACK -#include "keyboards/wilba_tech/via_api.h" // Temporary hack -#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack - +#include "version.h" // for QMK_BUILDDATE used in EEPROM magic /* Artificial delay added to get media keys to work in the encoder*/ #define MEDIA_KEY_DELAY 10 @@ -58,56 +54,20 @@ backlight_config_t kb_backlight_config = { .level = BACKLIGHT_LEVELS }; -bool eeprom_is_valid(void) -{ - return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && - eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); -} - -void eeprom_set_valid(bool valid) +#ifdef VIA_ENABLE +void raw_hid_receive_kb( uint8_t *data, uint8_t length ) { - eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); - eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); -} - -void eeprom_reset(void) -{ - // Set the VIA specific EEPROM state as invalid. - eeprom_set_valid(false); - // Set the TMK/QMK EEPROM state as invalid. - eeconfig_disable(); -} - -#ifdef RAW_ENABLE - -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: - { - command_data[0] = PROTOCOL_VERSION >> 8; - command_data[1] = PROTOCOL_VERSION & 0xFF; - break; - } - case id_get_keyboard_value: - { + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch ( *command_id ) + { + 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_oled_default_mode: { - uint8_t default_oled = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); + uint8_t default_oled = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED); command_data[1] = default_oled; break; } @@ -141,15 +101,14 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) break; } } - break; + break; } -#ifdef DYNAMIC_KEYMAP_ENABLE case id_set_keyboard_value: { switch(command_data[0]){ case id_oled_default_mode: { - eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED, command_data[1]); + eeprom_update_byte((uint8_t*)EEPROM_DEFAULT_OLED, command_data[1]); break; } case id_oled_mode: @@ -161,7 +120,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) case id_encoder_modes: { enabled_encoder_modes = command_data[1]; - eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, enabled_encoder_modes); + eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, enabled_encoder_modes); break; } case id_encoder_custom: @@ -180,95 +139,15 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) } 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; - 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] ); - break; - } - case id_dynamic_keymap_reset: - { - dynamic_keymap_reset(); - break; - } - 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(); - 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_set_buffer( offset, size, &command_data[3] ); - break; - } - case id_dynamic_keymap_macro_reset: - { - dynamic_keymap_macro_reset(); - break; - } - 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] ); - 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] ); - break; - } -#endif // DYNAMIC_KEYMAP_ENABLE - case id_eeprom_reset: - { - eeprom_reset(); - break; - } - case id_bootloader_jump: - { - // Need to send data back before the jump - // Informs host that the command is handled - raw_hid_send( data, length ); - // Give host time to read it - wait_ms(100); - bootloader_jump(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - - // Return same buffer with values changed - raw_hid_send( data, length ); - + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + // DO NOT call raw_hid_send(data,length) here, let caller do this } - #endif @@ -349,18 +228,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { break; } -#ifdef DYNAMIC_KEYMAP_ENABLE - // Handle macros - if (record->event.pressed) { - if ( keycode >= MACRO00 && keycode <= MACRO15 ) - { - uint8_t id = keycode - MACRO00; - dynamic_keymap_macro_send(id); - return false; - } - } -#endif //DYNAMIC_KEYMAP_ENABLE - return process_record_user(keycode, record); } @@ -392,59 +259,56 @@ void encoder_update_kb(uint8_t index, bool clockwise) { } } -void dynamic_keymap_custom_reset(void){ - void *p = (void*)(DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); - void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); - while ( p != end ) { - eeprom_update_byte(p, 0); - ++p; - } - eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, 0x1F); +void custom_config_reset(void){ + void *p = (void*)(VIA_EEPROM_CUSTOM_CONFIG_ADDR); + void *end = (void*)(VIA_EEPROM_CUSTOM_CONFIG_ADDR+VIA_EEPROM_CUSTOM_CONFIG_SIZE); + while ( p != end ) { + eeprom_update_byte(p, 0); + ++p; + } + eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, 0x1F); } -void save_backlight_config_to_eeprom(){ - eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT, kb_backlight_config.raw); +void backlight_config_save(){ + eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); } -void load_custom_config(){ - kb_backlight_config.raw = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); +void custom_config_load(){ + kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); #ifdef DYNAMIC_KEYMAP_ENABLE - oled_mode = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); - enabled_encoder_modes = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES); + oled_mode = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED); + enabled_encoder_modes = eeprom_read_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES); #endif } -void eeprom_init_kb(void) +// Called from via_init() if VIA_ENABLE +// Called from matrix_init_kb() if not VIA_ENABLE +void via_init_kb(void) { - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM. - if (eeprom_is_valid()) { - load_custom_config(); - } else { - // If the EEPROM has not been saved before, or is out of date, - // save the default values to the EEPROM. Default values - // come from construction of the zeal_backlight_config instance. - //backlight_config_save(); + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + if (via_eeprom_is_valid()) { + custom_config_load(); + } else { #ifdef DYNAMIC_KEYMAP_ENABLE - // This resets the keymaps in EEPROM to what is in flash. - dynamic_keymap_reset(); - // This resets the macros in EEPROM to nothing. - dynamic_keymap_macro_reset(); // Reset the custom stuff - dynamic_keymap_custom_reset(); + custom_config_reset(); #endif - // Save the magic number last, in case saving was interrupted - eeprom_set_valid(true); - } + // DO NOT set EEPROM valid here, let caller do this + } } void matrix_init_kb(void) { - eeprom_init_kb(); +#ifndef VIA_ENABLE + via_init_kb(); + via_eeprom_set_valid(true); +#endif // VIA_ENABLE + rtcGetTime(&RTCD1, &last_timespec); queue_for_send = true; backlight_init_ports(); - matrix_init_user(); + matrix_init_user(); } @@ -472,3 +336,51 @@ void matrix_scan_kb(void) { #endif } +// +// In the case of VIA being disabled, we still need to check if +// keyboard level EEPROM memory is valid before loading. +// Thus these are copies of the same functions in VIA, since +// the backlight settings reuse VIA's EEPROM magic/version, +// and the ones in via.c won't be compiled in. +// +// Yes, this is sub-optimal, and is only here for completeness +// (i.e. catering to the 1% of people that want wilba.tech LED bling +// AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA). +// +#ifndef VIA_ENABLE + +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 ); +} + +// 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 ); + + 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 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. + eeconfig_disable(); +} + +#endif // VIA_ENABLE \ No newline at end of file diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h index 188a1d49707b..13aaf688826d 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.h +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h @@ -8,6 +8,12 @@ #include "rev1.h" #endif +#include "via.h" // only for EEPROM address +#define EEPROM_ENABLED_ENCODER_MODES (VIA_EEPROM_CUSTOM_CONFIG_ADDR) +#define EEPROM_CUSTOM_BACKLIGHT (VIA_EEPROM_CUSTOM_CONFIG_ADDR+1) +#define EEPROM_DEFAULT_OLED (VIA_EEPROM_CUSTOM_CONFIG_ADDR+2) +#define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+3) + /* screen off after this many milliseconds */ #define ScreenOffInterval 60000 /* milliseconds */ @@ -117,5 +123,5 @@ void backlight_set(uint8_t level); bool is_breathing(void); void breathing_enable(void); void breathing_disable(void); -void load_custom_config(void); -void save_backlight_config_to_eeprom(void); +void custom_config_load(void); +void backlight_config_save(void); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index e866d897c7ec..8fcd720e2f98 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -12,7 +12,7 @@ void pre_encoder_mode_change(){ timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; rtcSetTime(&RTCD1, ×pec); } else if (encoder_mode == ENC_MODE_BACKLIGHT){ - save_backlight_config_to_eeprom(); + backlight_config_save(); } } @@ -221,7 +221,7 @@ uint16_t handle_encoder_press(){ uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ #ifdef DYNAMIC_KEYMAP_ENABLE - void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); + void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); //big endian uint16_t keycode = eeprom_read_byte(addr) << 8; keycode |= eeprom_read_byte(addr + 1); @@ -233,7 +233,7 @@ uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){ #ifdef DYNAMIC_KEYMAP_ENABLE - void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); + void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); eeprom_update_byte(addr, (uint8_t)(new_code >> 8)); eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF)); #endif diff --git a/keyboards/cannonkeys/savage65/config.h b/keyboards/cannonkeys/savage65/config.h index 996b93951508..b69aba39eb5d 100644 --- a/keyboards/cannonkeys/savage65/config.h +++ b/keyboards/cannonkeys/savage65/config.h @@ -58,25 +58,9 @@ along with this program. If not, see . #define PIN_WS2812 15 #define WS2812_SPI SPID2 -// EEPROM usage -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 40 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x02 -#define EEPROM_VERSION_ADDR 42 - - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 -// start + layer * rows * col * 2 -#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 -#define EEPROM_CUSTOM_BACKLIGHT 684 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 /* * Feature disable options diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c index 5a9ccafff74a..32e30f334804 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.c +++ b/keyboards/cannonkeys/stm32f072/keyboard.c @@ -10,11 +10,10 @@ #include "raw_hid.h" #include "dynamic_keymap.h" #include "tmk_core/common/eeprom.h" +#include "version.h" // for QMK_BUILDDATE used in EEPROM magic -// HACK -#include "keyboards/wilba_tech/via_api.h" // Temporary hack -#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack - +#include "via.h" +#define EEPROM_CUSTOM_BACKLIGHT (VIA_EEPROM_CUSTOM_CONFIG_ADDR) backlight_config_t kb_backlight_config = { .enable = true, @@ -22,61 +21,29 @@ backlight_config_t kb_backlight_config = { .level = BACKLIGHT_LEVELS }; -bool eeprom_is_valid(void) -{ - return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && - eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); -} - -void eeprom_set_valid(bool valid) -{ - eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); - eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); -} - -void eeprom_reset(void) -{ - eeprom_set_valid(false); - eeconfig_disable(); -} - -void save_backlight_config_to_eeprom(){ +void backlight_config_save(){ eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); } -void load_custom_config(){ +void backlight_config_load(){ kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); } -#ifdef DYNAMIC_KEYMAP_ENABLE -void dynamic_keymap_custom_reset(void){ - void *p = (void*)(EEPROM_CUSTOM_BACKLIGHT); - void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); - while ( p != end ) { - eeprom_update_byte(p, 0); - ++p; - } -} -#endif - -void eeprom_init_kb(void) +// Called from via_init() if VIA_ENABLE +// Called from matrix_init_kb() if not VIA_ENABLE +void via_init_kb(void) { // If the EEPROM has the magic, the data is good. // OK to load from EEPROM. - if (eeprom_is_valid()) { - load_custom_config(); + if (via_eeprom_is_valid()) { + backlight_config_load(); } else { -#ifdef DYNAMIC_KEYMAP_ENABLE - // This resets the keymaps in EEPROM to what is in flash. - dynamic_keymap_reset(); - // This resets the macros in EEPROM to nothing. - dynamic_keymap_macro_reset(); - // Reset the custom stuff - dynamic_keymap_custom_reset(); -#endif - // Save the magic number last, in case saving was interrupted - save_backlight_config_to_eeprom(); - eeprom_set_valid(true); + // If the EEPROM has not been saved before, or is out of date, + // save the default values to the EEPROM. Default values + // come from construction of the backlight_config instance. + backlight_config_save(); + + // DO NOT set EEPROM valid here, let caller do this } } @@ -84,7 +51,13 @@ __attribute__ ((weak)) void matrix_init_board(void); void matrix_init_kb(void){ - eeprom_init_kb(); + // If VIA is disabled, we still need to load backlight settings. + // Call via_init_kb() the same way as via_init(), with setting + // EEPROM valid afterwards. +#ifndef VIA_ENABLE + via_init_kb(); + via_eeprom_set_valid(true); +#endif // VIA_ENABLE /* MOSI pin*/ #ifdef RGBLIGHT_ENABLE palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); @@ -112,7 +85,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { kb_backlight_config.level = BACKLIGHT_LEVELS; } backlight_set(kb_backlight_config.level); - save_backlight_config_to_eeprom(); + backlight_config_save(); } return false; case BL_TOGG: @@ -123,7 +96,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { } else { backlight_set(0); } - save_backlight_config_to_eeprom(); + backlight_config_save(); } return false; @@ -135,168 +108,71 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { kb_backlight_config.level = kb_backlight_config.level - 1; } backlight_set(kb_backlight_config.level); - save_backlight_config_to_eeprom(); + backlight_config_save(); } return false; case BL_BRTG: if (record->event.pressed) { kb_backlight_config.breathing = !kb_backlight_config.breathing; breathing_toggle(); - save_backlight_config_to_eeprom(); + backlight_config_save(); } return false; default: break; } - #ifdef DYNAMIC_KEYMAP_ENABLE - // Handle macros - if (record->event.pressed) { - if ( keycode >= MACRO00 && keycode <= MACRO15 ) - { - uint8_t id = keycode - MACRO00; - dynamic_keymap_macro_send(id); - return false; - } - } - #endif //DYNAMIC_KEYMAP_ENABLE - return process_record_user(keycode, record);; } -// Start Dynamic Keymap code -#ifdef RAW_ENABLE -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: - { - command_data[0] = PROTOCOL_VERSION >> 8; - command_data[1] = 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; - command_data[4] = value & 0xFF; - break; - } - default: - { - *command_id = id_unhandled; - break; - } - } - break; - } -#ifdef DYNAMIC_KEYMAP_ENABLE - 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] ); - break; - } - case id_dynamic_keymap_reset: - { - dynamic_keymap_reset(); - break; - } - 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(); - 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] ); - 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] ); - break; - } - case id_dynamic_keymap_macro_reset: - { - dynamic_keymap_macro_reset(); - break; - } - 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] ); - 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] ); - break; - } -#endif // DYNAMIC_KEYMAP_ENABLE - case id_eeprom_reset: - { - eeprom_reset(); - break; - } - case id_bootloader_jump: - { - // Need to send data back before the jump - // Informs host that the command is handled - raw_hid_send( data, length ); - // Give host time to read it - wait_ms(100); - bootloader_jump(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } +// +// In the case of VIA being disabled, we still need to check if +// keyboard level EEPROM memory is valid before loading. +// Thus these are copies of the same functions in VIA, since +// the backlight settings reuse VIA's EEPROM magic/version, +// and the ones in via.c won't be compiled in. +// +// Yes, this is sub-optimal, and is only here for completeness +// (i.e. catering to the 1% of people that want wilba.tech LED bling +// AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA). +// +#ifndef VIA_ENABLE - // Return same buffer with values changed - raw_hid_send( data, length ); +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 ); +} +// 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 ); + + 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); } -#endif +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. + eeconfig_disable(); +} + +#endif // VIA_ENABLE \ No newline at end of file diff --git a/keyboards/cannonkeys/stm32f072/keyboard.h b/keyboards/cannonkeys/stm32f072/keyboard.h index 94c973d6153f..81dd1b704ef0 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.h +++ b/keyboards/cannonkeys/stm32f072/keyboard.h @@ -19,5 +19,5 @@ void backlight_set(uint8_t level); bool is_breathing(void); void breathing_enable(void); void breathing_disable(void); -void load_custom_config(void); -void save_backlight_config_to_eeprom(void); +void backlight_config_load(void); +void backlight_config_save(void); diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h index 0c586de9e511..d5f1d0788462 100644 --- a/keyboards/cannonkeys/tmov2/config.h +++ b/keyboards/cannonkeys/tmov2/config.h @@ -58,25 +58,9 @@ along with this program. If not, see . #define PIN_WS2812 15 #define WS2812_SPI SPID2 -// EEPROM usage -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 40 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x02 -#define EEPROM_VERSION_ADDR 42 - - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (43+(4*4*15*2)) = (43+480) = 523 -// start + layer * rows * col * 2c -#define DYNAMIC_KEYMAP_EEPROM_ADDR 43 -#define EEPROM_CUSTOM_BACKLIGHT 523 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 524 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 /* * Feature disable options diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index 87eebbe1974c..29d5e3c2a4ab 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -50,24 +50,6 @@ #define DRIVER_2_LED_TOTAL 36 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#if defined(RAW_ENABLE) -//VIA -#define DYNAMIC_KEYMAP_LAYER_COUNT 2 -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 391 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +#if defined(VIA_ENABLE) +# define DYNAMIC_KEYMAP_LAYER_COUNT 2 #endif diff --git a/keyboards/dp60/keymaps/via/rules.mk b/keyboards/dp60/keymaps/via/rules.mk index 6d2a73864342..036bd6d1c3ec 100644 --- a/keyboards/dp60/keymaps/via/rules.mk +++ b/keyboards/dp60/keymaps/via/rules.mk @@ -1,39 +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 = 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 -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 bottom light -RGB_MATRIX_ENABLE = yes # Use RGB matrix - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - -CUSTOM_MATRIX = yes -SRC += matrix.c keyboards/wilba_tech/wt_main.c +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index ef6e204ec45c..8e5692fa86ff 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -49,23 +49,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*9*2)) = (37+720) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 757 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 267 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/keymaps/via/rules.mk b/keyboards/handwired/prime_exl/keymaps/via/rules.mk index e726a8a0e075..1e5b99807cb7 100644 --- a/keyboards/handwired/prime_exl/keymaps/via/rules.mk +++ b/keyboards/handwired/prime_exl/keymaps/via/rules.mk @@ -1,86 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -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 -BOOTLOADER = atmel-dfu - - -# 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 -# -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 = 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -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) - -# This is the VIA magic -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -SRC += keyboards/wilba_tech/wt_main.c - +VIA_ENABLE = yes diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 02df0074cc25..91fdf6080920 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -134,21 +134,7 @@ along with this program. If not, see . #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 } -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+32) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 69 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (69+(4*5*14*2)) = (69+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 629 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// 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/keymaps/ansi_via/rules.mk b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk index b8311f5e7f05..1e5b99807cb7 100644 --- a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk @@ -1,67 +1 @@ -# 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 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -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 -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes +VIA_ENABLE = yes diff --git a/keyboards/hs60/v2/keymaps/default_via/rules.mk b/keyboards/hs60/v2/keymaps/default_via/rules.mk index b8311f5e7f05..1e5b99807cb7 100644 --- a/keyboards/hs60/v2/keymaps/default_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/default_via/rules.mk @@ -1,67 +1 @@ -# 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 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -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 -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes +VIA_ENABLE = yes diff --git a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk index b8311f5e7f05..1e5b99807cb7 100644 --- a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk +++ b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk @@ -1,67 +1 @@ -# 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 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -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 -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes +VIA_ENABLE = yes diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk index b8311f5e7f05..1e5b99807cb7 100644 --- a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk @@ -1,67 +1 @@ -# 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 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -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 -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes +VIA_ENABLE = yes diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk index b8311f5e7f05..1e5b99807cb7 100644 --- a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk +++ b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk @@ -1,67 +1 @@ -# 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 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -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 -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes +VIA_ENABLE = yes diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk index 69592d06c752..1e5b99807cb7 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -1,67 +1 @@ -# 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 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -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 -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes +VIA_ENABLE = yes diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk index 1dc96d04be9d..1e5b99807cb7 100644 --- a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk @@ -1,67 +1 @@ -# 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 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -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 -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes +VIA_ENABLE = yes diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/rules.mk index 6c323425893b..37deb63be7db 100644 --- a/keyboards/hs60/v2/rules.mk +++ b/keyboards/hs60/v2/rules.mk @@ -21,8 +21,6 @@ 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 -RAW_ENABLE = no -DYNAMIC_KEYMAP_ENABLE = no CIE1931_CURVE = yes LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/hs60/v2/v2.h b/keyboards/hs60/v2/v2.h index da32c3026a8c..e7707648627a 100644 --- a/keyboards/hs60/v2/v2.h +++ b/keyboards/hs60/v2/v2.h @@ -19,7 +19,7 @@ #include "quantum.h" #include "../../wilba_tech/wt_rgb_backlight_keycodes.h" -#include "../../wilba_tech/via_keycodes.h" +#include "via.h" // This a shortcut to help you visually see your layout. diff --git a/keyboards/idb_60/config.h b/keyboards/idb_60/config.h index 0120e470e504..f5538c291edf 100644 --- a/keyboards/idb_60/config.h +++ b/keyboards/idb_60/config.h @@ -148,23 +148,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/illuminati/is0/keymaps/via/keymap.c b/keyboards/illuminati/is0/keymaps/via/keymap.c new file mode 100644 index 000000000000..6b8df505ed2b --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/via/keymap.c @@ -0,0 +1,31 @@ +/* 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( + KC_ENT + ), + [1] = LAYOUT( + KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS + ), +}; diff --git a/keyboards/illuminati/is0/keymaps/via/readme.md b/keyboards/illuminati/is0/keymaps/via/readme.md new file mode 100644 index 000000000000..1c12e453033d --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA keymap for is0 diff --git a/keyboards/illuminati/is0/keymaps/via/rules.mk b/keyboards/illuminati/is0/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keebio/iris/iris.h b/keyboards/keebio/iris/iris.h index 5e6bc5b582d3..878d57897b5f 100644 --- a/keyboards/keebio/iris/iris.h +++ b/keyboards/keebio/iris/iris.h @@ -13,7 +13,7 @@ #endif #include "quantum.h" -#include "../../wilba_tech/via_keycodes.h" +#include "via.h" // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ diff --git a/keyboards/keebio/iris/keymaps/osiris/rules.mk b/keyboards/keebio/iris/keymaps/osiris/rules.mk index f2788b5f7515..45c570a3b66c 100644 --- a/keyboards/keebio/iris/keymaps/osiris/rules.mk +++ b/keyboards/keebio/iris/keymaps/osiris/rules.mk @@ -1,8 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes MOUSEKEY_ENABLE = yes - -# VIA Support - Comment these 3 lines out to disable -# RAW_ENABLE = yes -# DYNAMIC_KEYMAP_ENABLE = yes -# SRC += keyboards/wilba_tech/wt_main.c \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/via/config.h b/keyboards/keebio/iris/keymaps/via/config.h deleted file mode 100644 index f2498e5927e6..000000000000 --- a/keyboards/keebio/iris/keymaps/via/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -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 RGBLIGHT_ANIMATIONS diff --git a/keyboards/keebio/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk index ca2680325e1c..1e5b99807cb7 100644 --- a/keyboards/keebio/iris/keymaps/via/rules.mk +++ b/keyboards/keebio/iris/keymaps/via/rules.mk @@ -1,7 +1 @@ -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes - -# VIA Support - Comment these 3 lines out to disable -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -SRC += keyboards/wilba_tech/wt_main.c +VIA_ENABLE = yes diff --git a/keyboards/keebio/iris/rev1/config.h b/keyboards/keebio/iris/rev1/config.h index 7b88fe5de722..a6b14138e482 100644 --- a/keyboards/keebio/iris/rev1/config.h +++ b/keyboards/keebio/iris/rev1/config.h @@ -60,23 +60,3 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 12 // Number of LEDs - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev1_led/config.h b/keyboards/keebio/iris/rev1_led/config.h index ec78ef67f4b0..5f93a61dfc9f 100644 --- a/keyboards/keebio/iris/rev1_led/config.h +++ b/keyboards/keebio/iris/rev1_led/config.h @@ -60,23 +60,3 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 12 // Number of LEDs - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h index 500b0fcbd1f7..ab55bf77b2c5 100644 --- a/keyboards/keebio/iris/rev2/config.h +++ b/keyboards/keebio/iris/rev2/config.h @@ -60,23 +60,3 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 12 // Number of LEDs - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index eeb999ad4f76..8c6f4ad0859e 100644 --- a/keyboards/keebio/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -69,23 +69,3 @@ along with this program. If not, see . #define RGB_DI_PIN F7 #define RGBLED_NUM 12 // Number of LEDs #define RGBLED_SPLIT { 6, 6 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/keebio/iris/rev4/config.h b/keyboards/keebio/iris/rev4/config.h index b4bcd6139b9c..87fdafcd5b7a 100644 --- a/keyboards/keebio/iris/rev4/config.h +++ b/keyboards/keebio/iris/rev4/config.h @@ -73,23 +73,3 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 12 // Number of LEDs #define RGBLED_SPLIT { 6, 6 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/kingly_keys/romac/config.h b/keyboards/kingly_keys/romac/config.h index da236c50043f..59b084e8c98c 100644 --- a/keyboards/kingly_keys/romac/config.h +++ b/keyboards/kingly_keys/romac/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 0x4b4b // "KK" +#define PRODUCT_ID 0x0001 #define DEVICE_VER 0x0001 #define MANUFACTURER TheRoyalSweatshirt #define PRODUCT romac diff --git a/keyboards/kingly_keys/romac/keymaps/via/keymap.c b/keyboards/kingly_keys/romac/keymaps/via/keymap.c new file mode 100644 index 000000000000..833336b53181 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2018 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_KP_7, KC_KP_8, KC_KP_9, \ + KC_KP_4, KC_KP_5, KC_KP_6, \ + KC_KP_1, KC_KP_2, KC_KP_3, \ + MO(1), KC_KP_0, KC_KP_DOT \ + ), + [1] = 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 \ + ), + [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 \ + ), + [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 \ + ) +}; diff --git a/keyboards/kingly_keys/romac/keymaps/via/rules.mk b/keyboards/kingly_keys/romac/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/maartenwut/plain60/config.h b/keyboards/maartenwut/plain60/config.h index d17481617ffd..af4fb6231186 100644 --- a/keyboards/maartenwut/plain60/config.h +++ b/keyboards/maartenwut/plain60/config.h @@ -47,24 +47,3 @@ along with this program. If not, see . #define QMK_ESC_OUTPUT D2 // usually COL #define QMK_ESC_INPUT B4 // usually ROW - -//VIA -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk b/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk index 793bd869ae97..facc9dc7e65c 100644 --- a/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk +++ b/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk @@ -16,8 +16,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) 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) -RAW_ENABLE = no -DYNAMIC_KEYMAP_ENABLE = no + diff --git a/keyboards/maartenwut/plain60/keymaps/via/rules.mk b/keyboards/maartenwut/plain60/keymaps/via/rules.mk index 2b23b188b474..1e5b99807cb7 100644 --- a/keyboards/maartenwut/plain60/keymaps/via/rules.mk +++ b/keyboards/maartenwut/plain60/keymaps/via/rules.mk @@ -1,5 +1 @@ -# rules.mk overrides to enable VIA -SRC += keyboards/wilba_tech/wt_main.c - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 51e101cde5e3..423714c54cf7 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -134,21 +134,6 @@ along with this program. If not, see . #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 } -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+32) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 69 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (69+(4*5*15*2)) = (69+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 669 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 diff --git a/keyboards/nk65/keymaps/default_via/rules.mk b/keyboards/nk65/keymaps/default_via/rules.mk index b8311f5e7f05..1e5b99807cb7 100755 --- a/keyboards/nk65/keymaps/default_via/rules.mk +++ b/keyboards/nk65/keymaps/default_via/rules.mk @@ -1,67 +1 @@ -# 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 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -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 -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes +VIA_ENABLE = yes diff --git a/keyboards/nk65/nk65.h b/keyboards/nk65/nk65.h index 49725a7e64e6..35aca2a64ce5 100755 --- a/keyboards/nk65/nk65.h +++ b/keyboards/nk65/nk65.h @@ -19,7 +19,7 @@ #include "quantum.h" #include "../wilba_tech/wt_rgb_backlight_keycodes.h" -#include "../wilba_tech/via_keycodes.h" +#include "via.h" // This a shortcut to help you visually see your layout. diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk index 0840daf3767a..01765538a280 100755 --- a/keyboards/nk65/rules.mk +++ b/keyboards/nk65/rules.mk @@ -21,8 +21,6 @@ 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 -RAW_ENABLE = no -DYNAMIC_KEYMAP_ENABLE = no CIE1931_CURVE = yes LAYOUTS = 65_ansi diff --git a/keyboards/primekb/prime_e/config.h b/keyboards/primekb/prime_e/config.h index 46124973de10..bf5061b1aee0 100644 --- a/keyboards/primekb/prime_e/config.h +++ b/keyboards/primekb/prime_e/config.h @@ -50,23 +50,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*13*4*2)) = (37+416) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 453 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 571 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/primekb/prime_e/keymaps/via/rules.mk b/keyboards/primekb/prime_e/keymaps/via/rules.mk index c981a2f2614b..1e5b99807cb7 100644 --- a/keyboards/primekb/prime_e/keymaps/via/rules.mk +++ b/keyboards/primekb/prime_e/keymaps/via/rules.mk @@ -1,85 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -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 -BOOTLOADER = atmel-dfu - - -# 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 -# -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 = 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -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) - -# This is the VIA magic -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -SRC += keyboards/wilba_tech/wt_main.c \ No newline at end of file +VIA_ENABLE = yes diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h index cc0386ae68d3..4a068a8893c0 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/config.h @@ -58,29 +58,9 @@ along with this program. If not, see . #define PIN_WS2812 15 #define WS2812_SPI SPID2 - -// EEPROM usage -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 32 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x01 -#define EEPROM_VERSION_ADDR 34 - -#define EEPROM_CUSTOM_BACKLIGHT 804 - -#undef EEPROM_MAGIC_ADDR -#define EEPROM_MAGIC_ADDR 34 -#undef EEPROM_VERSION_ADDR -#define EEPROM_VERSION_ADDR 36 -#undef RGB_BACKLIGHT_CONFIG_EEPROM_ADDR -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -#undef DYNAMIC_KEYMAP_EEPROM_ADDR -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -#undef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 66 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 /* * Feature disable options diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index 606ffda183e1..92887833527b 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk @@ -51,7 +51,4 @@ CUSTOM_MATRIX = no # Custom matrix file # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason RGBLIGHT_ENABLE = yes -# RAW_ENABLE = yes -# DYNAMIC_KEYMAP_ENABLE = yes - DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h index 1b574a0997f4..67101344000a 100644 --- a/keyboards/sck/osa/config.h +++ b/keyboards/sck/osa/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 0x5343 // "SC" +#define PRODUCT_ID 0x0001 #define DEVICE_VER 0x0001 #define MANUFACTURER Space City Keyboards #define PRODUCT OSA diff --git a/keyboards/sck/osa/keymaps/via/keymap.c b/keyboards/sck/osa/keymaps/via/keymap.c new file mode 100644 index 000000000000..2c1af0731857 --- /dev/null +++ b/keyboards/sck/osa/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 jrfhoutx + * + * 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_DEL, 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_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_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, KC_RSFT, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), +[1] = LAYOUT_all( + 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 + ), + +[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 + ), +}; diff --git a/keyboards/sck/osa/keymaps/via/readme.md b/keyboards/sck/osa/keymaps/via/readme.md new file mode 100644 index 000000000000..3f8300bb1f8b --- /dev/null +++ b/keyboards/sck/osa/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA keymap for OSA diff --git a/keyboards/sck/osa/keymaps/via/rules.mk b/keyboards/sck/osa/keymaps/via/rules.mk new file mode 100644 index 000000000000..bee21da5283a --- /dev/null +++ b/keyboards/sck/osa/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index a4ab9d5e26ad..339bdd1be62c 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h @@ -47,23 +47,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*5*4*2)) = (37+160) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 197 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 827 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file diff --git a/keyboards/snagpad/keymaps/via/rules.mk b/keyboards/snagpad/keymaps/via/rules.mk index 032d68c5e96d..1e5b99807cb7 100644 --- a/keyboards/snagpad/keymaps/via/rules.mk +++ b/keyboards/snagpad/keymaps/via/rules.mk @@ -1,76 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -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 -BOOTLOADER = caterina - -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# 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) -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) -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 - -# This is the VIA magic -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -SRC += keyboards/wilba_tech/wt_main.c - -LAYOUTS = ortho_5x4 numpad_5x4 +VIA_ENABLE = yes diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h index 4a5b65c58390..69fc6138797b 100644 --- a/keyboards/westfoxtrot/aanzee/config.h +++ b/keyboards/westfoxtrot/aanzee/config.h @@ -117,26 +117,3 @@ along with this program. If not, see . * useful if your keyboard/keypad is missing keys and you want magic key support. * */ - - -//dynamic keymap and via support - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk index bcc5dc530a44..1e5b99807cb7 100644 --- a/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk @@ -1,69 +1 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -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 -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) -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) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID - -#add files needed for via - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -SRC += keyboards/wilba_tech/wt_main.c +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h index f3e21aa15f4e..9cbbd6620b27 100644 --- a/keyboards/wilba_tech/rama_works_koyu/config.h +++ b/keyboards/wilba_tech/rama_works_koyu/config.h @@ -18,7 +18,7 @@ #include "config_common.h" // USB Device descriptor parameter -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x4B59 // "KY" #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -119,24 +119,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 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// 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 diff --git a/keyboards/wilba_tech/rama_works_koyu/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/keymap.c new file mode 100644 index 000000000000..f6bc94fbd60e --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#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_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_BSPC, 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, + MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT), + + // 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_TRNS, + KC_CAPS, 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_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [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), +}; diff --git a/keyboards/wilba_tech/rama_works_koyu/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h index f51bc5c61378..b9c033e095f3 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h +++ b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h @@ -18,7 +18,7 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define ____ KC_NO diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index cf6a8a96a01f..80a3b32b2b5e 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rules.mk +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk @@ -20,7 +20,7 @@ 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 = no # Virtual DIP switch configuration(+1000) +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) @@ -36,8 +36,6 @@ 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 -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes # project specific files diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h index f72ecae85c2d..d2e67e0c979e 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/config.h @@ -15,13 +15,12 @@ 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 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x00AB // 10-B #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -180,25 +179,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 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*2)) = (37+80) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 117 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 907 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 - -#endif diff --git a/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h index 7c3ec9601d69..511dc9537e38 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h @@ -19,6 +19,7 @@ #include "../../config.h" +#undef VIA_ENABLE #undef RAW_ENABLE #undef DYNAMIC_KEYMAP_ENABLE diff --git a/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c new file mode 100644 index 000000000000..8c97a5cfb65f --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_0 ), + LAYOUT( + 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 ), + LAYOUT( + 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/rama_works_m10_b/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk index 07372d0ac23c..e970f6c7a277 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_b/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -29,9 +29,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - -# project specific files -SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h index 1ee76750c1c0..8381a4db00b6 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/config.h +++ b/keyboards/wilba_tech/rama_works_m60_a/config.h @@ -18,7 +18,7 @@ #include "config_common.h" // USB Device descriptor parameter -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x060A // 60-A #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -116,24 +116,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 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..7b6d9b756c01 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +// M60-A layout +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_60_hhkb( + 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_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO23), + +// Fn1 Layer +[1] = LAYOUT_60_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_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), + +// Fn2 Layer +[2] = LAYOUT_60_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_60_hhkb( + 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), + +}; + + diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h index 01e096fee6a8..2c690122baaf 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h +++ b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h @@ -17,7 +17,7 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define XXX KC_NO diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index 1dec6c074fa7..e4e934bdba4e 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk @@ -20,7 +20,7 @@ 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 = no # Virtual DIP switch configuration(+1000) +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) @@ -36,8 +36,6 @@ 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 -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes LAYOUTS = 60_hhkb diff --git a/keyboards/wilba_tech/rama_works_m6_a/config.h b/keyboards/wilba_tech/rama_works_m6_a/config.h index 07396450d6ba..1a61604bb437 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/config.h +++ b/keyboards/wilba_tech/rama_works_m6_a/config.h @@ -18,7 +18,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x006A // 6-A #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -103,27 +103,9 @@ #define RGB_BACKLIGHT_ENABLED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - // NOTE: M6-A doesn't use RGB backlight, but we keep this // consistent with M6-B which does. -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+43) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 80 -// Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43 diff --git a/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..7a408fa8aa56 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; + diff --git a/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk index 5feee3112080..26185cb38f54 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk @@ -19,7 +19,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # 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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -34,10 +34,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = no - -# project specific files -SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h index 535c64b80fb7..3ebfd80dabdd 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/config.h +++ b/keyboards/wilba_tech/rama_works_m6_b/config.h @@ -18,7 +18,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x006B // 6-B #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -149,24 +149,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 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+43) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 80 -// Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43 diff --git a/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/keymap.c new file mode 100644 index 000000000000..7a408fa8aa56 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; + diff --git a/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk index 4c14af06c458..05212a3be239 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk @@ -19,7 +19,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # 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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -35,8 +35,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes # project specific files diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index d0bf0ed1e3b1..748b2cb2919b 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h @@ -19,7 +19,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x080A // 80-A #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -232,25 +232,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 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x07 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*6*17*2)) = (68+816) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 884 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 140 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 diff --git a/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..548843427ca4 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#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_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_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, 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, 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, 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), + + [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) +}; + diff --git a/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h index c057db4ccd1c..c5380e4a6b01 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h +++ b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h @@ -18,7 +18,7 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define ____ KC_NO diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index 0f02cd04f375..443776d4a3cb 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_u80_a/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -29,9 +29,6 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes # project specific files diff --git a/keyboards/wilba_tech/via_api.h b/keyboards/wilba_tech/via_api.h deleted file mode 100644 index f04bb1b46a95..000000000000 --- a/keyboards/wilba_tech/via_api.h +++ /dev/null @@ -1,49 +0,0 @@ -/* 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 - -#define PROTOCOL_VERSION 0x0008 - -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, -}; - -enum via_keyboard_value_id -{ - id_uptime = 0x01, - id_firmware_version -}; - diff --git a/keyboards/wilba_tech/via_keycodes.h b/keyboards/wilba_tech/via_keycodes.h deleted file mode 100644 index bed48d64b053..000000000000 --- a/keyboards/wilba_tech/via_keycodes.h +++ /dev/null @@ -1,77 +0,0 @@ -/* 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 - -// Can't use SAFE_RANGE here, it might change if someone adds -// new values to enum quantum_keycodes. -// Need to keep checking 0x5F10 is still in the safe range. -// TODO: merge this into quantum_keycodes -// Backlight keycodes are in range 0x5F00-0x5F0F -enum via_keycodes { - FN_MO13 = 0x5F10, - FN_MO23, - MACRO00, - MACRO01, - MACRO02, - MACRO03, - MACRO04, - MACRO05, - MACRO06, - MACRO07, - MACRO08, - MACRO09, - MACRO10, - MACRO11, - MACRO12, - MACRO13, - MACRO14, - MACRO15, -}; - -enum user_keycodes { - USER00 = 0x5F80, - USER01, - USER02, - USER03, - USER04, - USER05, - USER06, - USER07, - USER08, - USER09, - USER10, - USER11, - USER12, - USER13, - USER14, - USER15, -}; - -// VIA specific "action functions", introduced with Zeal60 -// These are only valid IDs in action_function() -// Use FN_TT13, FN_TT23, etc. in keymaps -enum via_action_functions { - TRIPLE_TAP_1_3 = 0x31, - TRIPLE_TAP_2_3 = 0x32 -}; - -// Bitwise OR the above with 0x0F00 to use in F(x) macro -// This reserves the top 256 of the 4096 range of F(x) keycodes, -// leaving the rest for use in fn_actions[] or actions in EEPROM. -#define FN_TT13 F((0x0F00|TRIPLE_TAP_1_3)) -#define FN_TT23 F((0x0F00|TRIPLE_TAP_2_3)) - -#define TG_NKRO MAGIC_TOGGLE_NKRO diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 6e1e0e81cc80..269afbcb8bb1 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -200,24 +200,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*5*14*2)) = (44+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 604 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 420 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index 111c94ee80d9..c59e94e83c12 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt60_d/config.h b/keyboards/wilba_tech/wt60_d/config.h index 066465d424ca..acb69ba042f6 100644 --- a/keyboards/wilba_tech/wt60_d/config.h +++ b/keyboards/wilba_tech/wt60_d/config.h @@ -178,23 +178,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*5*14*2)) = (37+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 597 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 427 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index 07372d0ac23c..a5c98a1c60d7 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -29,9 +29,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - -# project specific files -SRC = keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt60_d/wt60_d.c b/keyboards/wilba_tech/wt60_d/wt60_d.c index ccff6d62c94b..52a7733683fb 100644 --- a/keyboards/wilba_tech/wt60_d/wt60_d.c +++ b/keyboards/wilba_tech/wt60_d/wt60_d.c @@ -1,17 +1 @@ -/* Copyright 2018 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 . - */ - -// Nothing to see here, move along... ;-) +#include "wt60_d.h" diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 9d67c317b289..ad4c120f4d19 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -197,24 +197,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index 111c94ee80d9..c59e94e83c12 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index 8b2437fc92af..f98fa4e729bb 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -197,24 +197,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index 111c94ee80d9..c59e94e83c12 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt69_a/config.h b/keyboards/wilba_tech/wt69_a/config.h index 57546cb4911b..b107453441bf 100644 --- a/keyboards/wilba_tech/wt69_a/config.h +++ b/keyboards/wilba_tech/wt69_a/config.h @@ -178,26 +178,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -// Does not use WT_MONO_BACKLIGHT -//#define WT_MONO_BACKLIGHT - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*5*17*2)) = (37+680) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 717 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 307 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index 7d1c2aa1b170..25f3ecbf19c4 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index f63bbf69c7a8..0c0a2ff0827c 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -200,24 +200,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*6*15*2)) = (44+720) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 764 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 260 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index 111c94ee80d9..c59e94e83c12 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index b173b024174d..0c7b3dbfaddc 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -200,24 +200,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index 111c94ee80d9..c59e94e83c12 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h index 71059987744e..b84f2444d880 100644 --- a/keyboards/wilba_tech/wt75_c/config.h +++ b/keyboards/wilba_tech/wt75_c/config.h @@ -198,26 +198,9 @@ #define MONO_BACKLIGHT_EFFECT 1 // the default effect speed (0-3) -#define MONO_BACKLIGHT_EFFECT_SPEED 0 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +#define MONO_BACKLIGHT_EFFECT_SPEED 000 + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk index 111c94ee80d9..c59e94e83c12 100644 --- a/keyboards/wilba_tech/wt75_c/rules.mk +++ b/keyboards/wilba_tech/wt75_c/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 15dac9047fe9..b706956ef915 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -197,24 +197,6 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*6*17*2)) = (44+816) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 860 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 164 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk index 4880a57becd3..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index 111c94ee80d9..c59e94e83c12 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt8_a/config.h b/keyboards/wilba_tech/wt8_a/config.h index 08556650da22..9af0d00507ea 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h @@ -90,26 +90,3 @@ * */ //#define FORCE_NKRO - -// Does not use WT_MONO_BACKLIGHT -// #define WT_MONO_BACKLIGHT - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*1*8*2)) = (37+64) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 101 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 923 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk index f072c67198c2..1e5b99807cb7 100644 --- a/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk @@ -1,68 +1 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -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) -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) -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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index 7d1c2aa1b170..25f3ecbf19c4 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/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 = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index 32fc6f9e4417..1ad12ee4a580 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c @@ -23,361 +23,177 @@ #if MONO_BACKLIGHT_ENABLED #include "keyboards/wilba_tech/wt_mono_backlight.h" #endif // MONO_BACKLIGHT_ENABLED -#include "keyboards/wilba_tech/via_api.h" // Temporary hack -#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack -#include "raw_hid.h" -#include "dynamic_keymap.h" -#include "timer.h" -#include "tmk_core/common/eeprom.h" - -bool eeprom_is_valid(void) -{ - return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && - eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); -} - -void eeprom_set_valid(bool valid) -{ - eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); - eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); -} - -void eeprom_reset(void) -{ - // Set the Zeal60 specific EEPROM state as invalid. - eeprom_set_valid(false); - // Set the TMK/QMK EEPROM state as invalid. - eeconfig_disable(); -} - -#ifdef RAW_ENABLE - -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: - { - command_data[0] = PROTOCOL_VERSION >> 8; - command_data[1] = PROTOCOL_VERSION & 0xFF; - break; - } - case id_get_keyboard_value: - { - if ( command_data[0] == 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; - } - else - { - *command_id = id_unhandled; - } - break; - } -#ifdef DYNAMIC_KEYMAP_ENABLE - 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] ); - break; - } - case id_dynamic_keymap_reset: - { - dynamic_keymap_reset(); - break; - } - 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(); - 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] ); - 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] ); - break; - } - case id_dynamic_keymap_macro_reset: - { - dynamic_keymap_macro_reset(); - break; - } - 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] ); - 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] ); - break; - } -#endif // DYNAMIC_KEYMAP_ENABLE -#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - case id_backlight_config_set_value: - { - backlight_config_set_value(command_data); - break; - } - case id_backlight_config_get_value: - { - backlight_config_get_value(command_data); - break; - } - case id_backlight_config_save: - { - backlight_config_save(); - break; - } -#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - case id_eeprom_reset: - { - eeprom_reset(); - break; - } - case id_bootloader_jump: - { - // Need to send data back before the jump - // Informs host that the command is handled - raw_hid_send( data, length ); - // Give host time to read it - wait_ms(100); - bootloader_jump(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - - // Return same buffer with values changed - raw_hid_send( data, length ); - -} +#include "via.h" +#ifndef VIA_ENABLE +#include "tmk_core/common/eeprom.h" +#include "version.h" // for QMK_BUILDDATE used in EEPROM magic #endif -void main_init(void) +// Called from via_init() if VIA_ENABLE +// Called from matrix_init_kb() if not VIA_ENABLE +void via_init_kb(void) { - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM. - if (eeprom_is_valid()) { -#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - backlight_config_load(); -#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - } else { + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM + if (via_eeprom_is_valid()) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - // If the EEPROM has not been saved before, or is out of date, - // save the default values to the EEPROM. Default values - // come from construction of the backlight_config instance. - backlight_config_save(); + backlight_config_load(); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED -#ifdef DYNAMIC_KEYMAP_ENABLE - // This resets the keymaps in EEPROM to what is in flash. - dynamic_keymap_reset(); - // This resets the macros in EEPROM to nothing. - dynamic_keymap_macro_reset(); -#endif // DYNAMIC_KEYMAP_ENABLE - // Save the magic number last, in case saving was interrupted - eeprom_set_valid(true); - } - + } else { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - // Initialize LED drivers for backlight. - backlight_init_drivers(); - - backlight_timer_init(); - backlight_timer_enable(); + // If the EEPROM has not been saved before, or is out of date, + // save the default values to the EEPROM. Default values + // come from construction of the backlight_config instance. + backlight_config_save(); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED -} -void bootmagic_lite(void) -{ - // The lite version of TMK's bootmagic. - // 100% less potential for accidentally making the - // keyboard do stupid things. + // DO NOT set EEPROM valid here, let caller do this + } - // We need multiple scans because debouncing can't be turned off. - matrix_scan(); - wait_ms(DEBOUNCE); - wait_ms(DEBOUNCE); - matrix_scan(); +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + // Initialize LED drivers for backlight. + backlight_init_drivers(); - // If the Esc (matrix 0,0) is held down on power up, - // reset the EEPROM valid state and jump to bootloader. - if ( matrix_get_row(0) & (1<<0) ) { - eeprom_reset(); - bootloader_jump(); - } + backlight_timer_init(); + backlight_timer_enable(); +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } void matrix_init_kb(void) { - bootmagic_lite(); - main_init(); - matrix_init_user(); + // If VIA is disabled, we still need to load backlight settings. + // Call via_init_kb() the same way as via_init(), with setting + // EEPROM valid afterwards. +#ifndef VIA_ENABLE + via_init_kb(); + via_eeprom_set_valid(true); +#endif // VIA_ENABLE + + matrix_init_user(); } void matrix_scan_kb(void) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - // This only updates the LED driver buffers if something has changed. - backlight_update_pwm_buffers(); + // This only updates the LED driver buffers if something has changed. + backlight_update_pwm_buffers(); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - matrix_scan_user(); + matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - process_record_backlight(keycode, record); + process_record_backlight(keycode, record); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - switch(keycode) { - case FN_MO13: - if (record->event.pressed) { - layer_on(1); - update_tri_layer(1, 2, 3); - } else { - layer_off(1); - update_tri_layer(1, 2, 3); - } - return false; - break; - case FN_MO23: - if (record->event.pressed) { - layer_on(2); - update_tri_layer(1, 2, 3); - } else { - layer_off(2); - update_tri_layer(1, 2, 3); - } - return false; - break; - } - -#ifdef DYNAMIC_KEYMAP_ENABLE - // Handle macros - if (record->event.pressed) { - if ( keycode >= MACRO00 && keycode <= MACRO15 ) - { - uint8_t id = keycode - MACRO00; - dynamic_keymap_macro_send(id); - return false; - } - } -#endif //DYNAMIC_KEYMAP_ENABLE - - return process_record_user(keycode, record); -} - -// This overrides the one in quantum/keymap_common.c -uint16_t keymap_function_id_to_action( uint16_t function_id ) -{ - // Zeal60 specific "action functions" are 0xF00 to 0xFFF - // i.e. F(0xF00) to F(0xFFF) are mapped to - // enum zeal60_action_functions by masking last 8 bits. - if ( function_id >= 0x0F00 && function_id <= 0x0FFF ) - { - uint8_t id = function_id & 0xFF; - switch ( id ) { - case TRIPLE_TAP_1_3: - case TRIPLE_TAP_2_3: - { - return ACTION_FUNCTION_TAP(id); - break; - } - default: - break; - } - } - - return pgm_read_word(&fn_actions[function_id]); -} - - -// Zeal60 specific "action functions" -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch (id) - { - case TRIPLE_TAP_1_3: - case TRIPLE_TAP_2_3: - if (record->event.pressed) { - layer_on( id == TRIPLE_TAP_1_3 ? 1 : 2 ); - if (record->tap.count && !record->tap.interrupted) { - if (record->tap.count >= 3) { - layer_invert(3); - } - } else { - record->tap.count = 0; - } - } else { - layer_off( id == TRIPLE_TAP_1_3 ? 1 : 2 ); - } - break; - } + return process_record_user(keycode, record); } void led_set_kb(uint8_t usb_led) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - backlight_set_indicator_state(usb_led); + backlight_set_indicator_state(usb_led); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - led_set_user(usb_led); + led_set_user(usb_led); } void suspend_power_down_kb(void) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - backlight_set_suspend_state(true); + backlight_set_suspend_state(true); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } void suspend_wakeup_init_kb(void) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - backlight_set_suspend_state(false); + backlight_set_suspend_state(false); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } +// Moving this to the bottom of this source file is a workaround +// for an intermittent compiler error for Atmel compiler. +#ifdef VIA_ENABLE +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 ) + { +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + case id_backlight_config_set_value: + { + backlight_config_set_value(command_data); + break; + } + case id_backlight_config_get_value: + { + backlight_config_get_value(command_data); + break; + } + case id_backlight_config_save: + { + backlight_config_save(); + break; + } +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + default: + { + // Unhandled message. + *command_id = id_unhandled; + *command_data = *command_data; // force use of variable + break; + } + } + // DO NOT call raw_hid_send(data,length) here, let caller do this +} +#endif // VIA_ENABLE + +// +// In the case of VIA being disabled, we still need to check if +// keyboard level EEPROM memory is valid before loading. +// Thus these are copies of the same functions in VIA, since +// the backlight settings reuse VIA's EEPROM magic/version, +// and the ones in via.c won't be compiled in. +// +// Yes, this is sub-optimal, and is only here for completeness +// (i.e. catering to the 1% of people that want wilba.tech LED bling +// AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA). +// +#ifndef VIA_ENABLE + +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 ); +} + +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); +} + +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. + eeconfig_disable(); +} + +#endif // VIA_ENABLE diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index 69d82e582ac9..daf738da2e1b 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -19,12 +19,17 @@ #include "wt_rgb_backlight_api.h" // reuse these for now #include "wt_rgb_backlight_keycodes.h" // reuse these for now -#include "drivers/avr/i2c_master.h" -#include "drivers/issi/is31fl3736.h" #include +#include "drivers/avr/i2c_master.h" #include "progmem.h" #include "quantum/color.h" +#include "tmk_core/common/eeprom.h" + +#include "via.h" // uses only the EEPROM address +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) + +#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 ca8c3269f637..31cfabddd7c3 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -33,18 +33,20 @@ #include "wt_rgb_backlight_keycodes.h" #if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) -#include -#include #include #include "drivers/avr/i2c_master.h" #else #include "ch.h" #include "hal.h" #include "drivers/arm/i2c_master.h" -#include "tmk_core/common/eeprom.h" #endif + #include "progmem.h" #include "quantum/color.h" +#include "tmk_core/common/eeprom.h" + +#include "via.h" // uses only the EEPROM address +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) #if defined(RGB_BACKLIGHT_M6_B) #include "drivers/issi/is31fl3218.h" diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h index 6b9529a6f973..cb2f6a96bdd3 100644 --- a/keyboards/wilba_tech/zeal60/config.h +++ b/keyboards/wilba_tech/zeal60/config.h @@ -115,24 +115,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 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// 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 diff --git a/keyboards/wilba_tech/zeal60/keymaps/via/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/via/keymap.c new file mode 100644 index 000000000000..395790d29049 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for Zeal60 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[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_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_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, FN_MO13, FN_MO23, KC_RCTL), + +// Fn1 Layer +[1] = LAYOUT_60_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_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, 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_TRNS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[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), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_60_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, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/zeal60/keymaps/via/rules.mk b/keyboards/wilba_tech/zeal60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index 11f3867de39f..3067be73d36c 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk @@ -20,7 +20,7 @@ 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 = no # Virtual DIP switch configuration(+1000) +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) @@ -36,8 +36,6 @@ 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 -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes LAYOUTS = 60_ansi 60_iso 60_hhkb 60_ansi_split_bs_rshift diff --git a/keyboards/wilba_tech/zeal60/zeal60.h b/keyboards/wilba_tech/zeal60/zeal60.h index 0d4f1b908b45..016531d227a9 100644 --- a/keyboards/wilba_tech/zeal60/zeal60.h +++ b/keyboards/wilba_tech/zeal60/zeal60.h @@ -17,7 +17,7 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define XXX KC_NO diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h index f452fbd47507..01649d76fe7c 100644 --- a/keyboards/wilba_tech/zeal65/config.h +++ b/keyboards/wilba_tech/zeal65/config.h @@ -115,24 +115,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 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 diff --git a/keyboards/wilba_tech/zeal65/info.json b/keyboards/wilba_tech/zeal65/info.json index d83895ed953a..709f7cefe1b4 100644 --- a/keyboards/wilba_tech/zeal65/info.json +++ b/keyboards/wilba_tech/zeal65/info.json @@ -6,7 +6,7 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT_65_split_bs": { + "LAYOUT_65_all": { "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":"Del", "x":14, "y":0}, {"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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"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":"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":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Win", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Fn2", "x":10, "y":4, "w":1.5}, {"label":"Fn1", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] }, "LAYOUT_65_normie": { diff --git a/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c b/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c index 96b04c358d36..2c6d24e8fafd 100644 --- a/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c +++ b/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c @@ -4,7 +4,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default layer -[0] = LAYOUT_65_split_bs( +[0] = LAYOUT_65_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_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_BSPC, 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, @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, KC_LALT, KC_SPC, FN_MO23, FN_MO13, KC_LEFT, KC_DOWN, KC_RGHT), // Fn1 Layer -[1] = LAYOUT_65_split_bs( +[1] = LAYOUT_65_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_TRNS, KC_CAPS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -20,7 +20,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), // Fn2 Layer -[2] = LAYOUT_65_split_bs( +[2] = LAYOUT_65_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, @@ -28,7 +28,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), // Fn3 Layer (zeal60 Configuration) -[3] = LAYOUT_65_split_bs( +[3] = LAYOUT_65_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, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_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, diff --git a/keyboards/wilba_tech/zeal65/keymaps/via/keymap.c b/keyboards/wilba_tech/zeal65/keymaps/via/keymap.c new file mode 100644 index 000000000000..2c6d24e8fafd --- /dev/null +++ b/keyboards/wilba_tech/zeal65/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Split-backspace layout for Zeal65 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_65_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_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_BSPC, 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_LGUI, KC_LALT, KC_SPC, FN_MO23, FN_MO13, KC_LEFT, KC_DOWN, KC_RGHT), + +// Fn1 Layer +[1] = LAYOUT_65_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_TRNS, + KC_CAPS, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_65_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), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_65_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, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_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), + +}; diff --git a/keyboards/wilba_tech/zeal65/keymaps/via/rules.mk b/keyboards/wilba_tech/zeal65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/zeal65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk index 6c8783eb29f7..94d487cbb721 100644 --- a/keyboards/wilba_tech/zeal65/rules.mk +++ b/keyboards/wilba_tech/zeal65/rules.mk @@ -20,7 +20,7 @@ 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 = no # Virtual DIP switch configuration(+1000) +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) @@ -36,8 +36,6 @@ 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 -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes # project specific files diff --git a/keyboards/wilba_tech/zeal65/zeal65.h b/keyboards/wilba_tech/zeal65/zeal65.h index d8528e6c516c..34c1294165fa 100644 --- a/keyboards/wilba_tech/zeal65/zeal65.h +++ b/keyboards/wilba_tech/zeal65/zeal65.h @@ -17,11 +17,11 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define XXX KC_NO -#define LAYOUT_65_split_bs( \ +#define LAYOUT_65_all( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, 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, K2E, \ diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index ca056f630e3a..11d28592d603 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -20,28 +20,37 @@ #include "progmem.h" // to read default from flash #include "quantum.h" // for send_string() #include "dynamic_keymap.h" - -#ifdef DYNAMIC_KEYMAP_ENABLE - -# ifndef DYNAMIC_KEYMAP_EEPROM_ADDR -# error DYNAMIC_KEYMAP_EEPROM_ADDR not defined -# endif - -# ifndef DYNAMIC_KEYMAP_LAYER_COUNT -# error DYNAMIC_KEYMAP_LAYER_COUNT not defined -# endif - -# ifndef DYNAMIC_KEYMAP_MACRO_COUNT -# error DYNAMIC_KEYMAP_MACRO_COUNT not defined -# endif - -# ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -# error DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR not defined -# endif - -# ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE -# error DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE not defined -# endif +#include "via.h" // for default VIA_EEPROM_ADDR_END + +#ifndef DYNAMIC_KEYMAP_LAYER_COUNT +# define DYNAMIC_KEYMAP_LAYER_COUNT 4 +#endif + +#ifndef DYNAMIC_KEYMAP_MACRO_COUNT +# 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 +#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)) +#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) +#endif uint8_t dynamic_keymap_get_layer_count(void) { return DYNAMIC_KEYMAP_LAYER_COUNT; } @@ -208,5 +217,3 @@ void dynamic_keymap_macro_send(uint8_t id) { send_string(data); } } - -#endif // DYNAMIC_KEYMAP_ENABLE diff --git a/quantum/quantum.c b/quantum/quantum.c index 695da5fdcb7c..bf159644ab6d 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -212,6 +212,9 @@ bool process_record_quantum(keyrecord_t *record) { #endif // HAPTIC_ENABLE #if defined(RGB_MATRIX_ENABLE) process_rgb_matrix(keycode, record) && +#endif +#if defined(VIA_ENABLE) + process_record_via(keycode, record) && #endif process_record_kb(keycode, record) && #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) @@ -560,9 +563,7 @@ __attribute__((weak)) void bootmagic_lite(void) { // We need multiple scans because debouncing can't be turned off. matrix_scan(); -#if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 - wait_ms(DEBOUNCING_DELAY * 2); -#elif defined(DEBOUNCE) && DEBOUNCE > 0 +#if defined(DEBOUNCE) && DEBOUNCE > 0 wait_ms(DEBOUNCE * 2); #else wait_ms(30); diff --git a/quantum/quantum.h b/quantum/quantum.h index 053b33b917c6..9758374f64ca 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -162,6 +162,14 @@ extern layer_state_t layer_state; # include "process_dynamic_macro.h" #endif +#ifdef DYNAMIC_KEYMAP_ENABLE +# include "dynamic_keymap.h" +#endif + +#ifdef VIA_ENABLE +# include "via.h" +#endif + // Function substitutions to ease GPIO manipulation #if defined(__AVR__) typedef uint8_t pin_t; diff --git a/quantum/via.c b/quantum/via.c new file mode 100644 index 000000000000..64b05324a1c1 --- /dev/null +++ b/quantum/via.c @@ -0,0 +1,400 @@ +/* Copyright 2019 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 RAW_ENABLE +# error "RAW_ENABLE is not enabled" +#endif + +#ifndef DYNAMIC_KEYMAP_ENABLE +# error "DYNAMIC_KEYMAP_ENABLE is not enabled" +#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 + +// 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 ); +} + +// 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 ); + + 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) +{ + // Set the VIA specific EEPROM state as invalid. + via_eeprom_set_valid(false); + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); +} + +// 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) +{ + // The lite version of TMK's bootmagic based on Wilba. + // 100% less potential for accidentally making the + // keyboard do stupid things. + + // We need multiple scans because debouncing can't be turned off. + matrix_scan(); +#if defined(DEBOUNCE) && DEBOUNCE > 0 + wait_ms(DEBOUNCE * 2); +#else + wait_ms(30); +#endif + matrix_scan(); + + // If the Esc and space bar are held down on power up, + // reset the EEPROM valid state and jump to bootloader. + // Assumes Esc is at [0,0]. + // This isn't very generalized, but we need something that doesn't + // rely on user's keymaps in firmware or EEPROM. + if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { + // This is the only difference from the default implementation. + via_eeprom_reset(); + // Jump to bootloader. + bootloader_jump(); + } +} + +// Override this at the keyboard code level to check +// VIA's EEPROM valid state and reset to defaults as needed. +// Used by keyboards that store their own state in EEPROM, +// 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) { +} + +// Called by QMK core to initialize dynamic keymaps etc. +void via_init(void) +{ + // Let keyboard level test EEPROM valid state, + // but not set it valid, it is done here. + via_init_kb(); + + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + if (via_eeprom_is_valid()) { + } else { + // This resets the layout options + via_set_layout_options(0); + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); + // This resets the macros in EEPROM to nothing. + dynamic_keymap_macro_reset(); + // Save the magic number last, in case saving was interrupted + via_eeprom_set_valid(true); + } +} + +// 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 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++ ) { + value = value << 8; + value |= eeprom_read_byte(source); + source++; + } + return 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 ); + value = value >> 8; + target--; + } +} + +// Called by QMK core to process VIA-specific keycodes. +bool process_record_via(uint16_t keycode, keyrecord_t *record) +{ + // Handle macros + if (record->event.pressed) { + if ( keycode >= MACRO00 && keycode <= MACRO15 ) + { + uint8_t id = keycode - MACRO00; + dynamic_keymap_macro_send(id); + return false; + } + } + + // 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) { + case FN_MO13: + if (record->event.pressed) { + layer_on(1); + update_tri_layer(1, 2, 3); + } else { + layer_off(1); + update_tri_layer(1, 2, 3); + } + return false; + break; + case FN_MO23: + if (record->event.pressed) { + layer_on(2); + update_tri_layer(1, 2, 3); + } else { + layer_off(2); + update_tri_layer(1, 2, 3); + } + return false; + break; + } + return true; +} + +// Keyboard level code can override this to handle custom messages from VIA. +// See raw_hid_receive() implementation. +// 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; +} + +// VIA handles received HID messages first, and will route to +// raw_hid_receive_kb() for command IDs that are not handled here. +// 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 +// possibly modified with returned values. +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: + { + 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; + 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; + command_data[4] = value & 0xFF; + break; + } + 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 + command_data[i++] = value & 0xFF; + } +#endif + break; + } + 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]; + via_set_layout_options(value); + break; + } + 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; + 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] ); + break; + } + 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: + { + raw_hid_receive_kb(data, length); + break; + } + 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(); + 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] ); + 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] ); + break; + } + case id_dynamic_keymap_macro_reset: + { + dynamic_keymap_macro_reset(); + break; + } + 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] ); + 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] ); + break; + } + case id_eeprom_reset: + { + via_eeprom_reset(); + break; + } + case id_bootloader_jump: + { + // Need to send data back before the jump + // Informs host that the command is handled + raw_hid_send( data, length ); + // Give host time to read it + wait_ms(100); + bootloader_jump(); + break; + } + default: + { + // The command ID is not known + // Return the unhandled state + *command_id = id_unhandled; + break; + } + } + + // Return the same buffer, optionally with values changed + // (i.e. returning state to the host, or the unhandled state). + raw_hid_send( data, length ); +} diff --git a/quantum/via.h b/quantum/via.h new file mode 100644 index 000000000000..f9a8017b2462 --- /dev/null +++ b/quantum/via.h @@ -0,0 +1,151 @@ +/* Copyright 2019 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 // 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, +// thus installing firmware built on a different date to the one +// already installed can be detected and the EEPROM data is reset. +// 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) +#endif + +#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 +#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) + +#ifndef VIA_EEPROM_CUSTOM_CONFIG_SIZE +# define VIA_EEPROM_CUSTOM_CONFIG_SIZE 0 +#endif + +// This is changed only when the command IDs change, +// so VIA Configurator can detect compatible firmware. +#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, +}; + +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. +// Need to keep checking 0x5F10 is still in the safe range. +// TODO: merge this into quantum_keycodes +// Backlight keycodes are in range 0x5F00-0x5F0F +enum via_keycodes { + FN_MO13 = 0x5F10, + FN_MO23, + MACRO00, + MACRO01, + MACRO02, + MACRO03, + MACRO04, + MACRO05, + MACRO06, + MACRO07, + MACRO08, + MACRO09, + MACRO10, + MACRO11, + MACRO12, + MACRO13, + MACRO14, + MACRO15, +}; + +enum user_keycodes { + 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 +// EEPROM is invalid and use/save defaults. +bool via_eeprom_is_valid(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); + +// 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); + +// Called by QMK core to initialize dynamic keymaps etc. +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); + +// Called by QMK core to process VIA-specific keycodes. +bool process_record_via(uint16_t keycode, keyrecord_t *record); + diff --git a/show_options.mk b/show_options.mk index 63ab3b0d7b19..003169d4cb65 100644 --- a/show_options.mk +++ b/show_options.mk @@ -10,7 +10,8 @@ BUILD_OPTION_NAMES = \ DEBOUNCE_TYPE \ SPLIT_KEYBOARD \ DYNAMIC_KEYMAP_ENABLE \ - USB_HID_ENABLE + USB_HID_ENABLE \ + VIA_ENABLE HARDWARE_OPTION_NAMES = \ SLEEP_LED_ENABLE \ diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 308f865e19f4..6fbe789031b9 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -48,6 +48,8 @@ along with this program. If not, see . #define EECONFIG_RGB_MATRIX_SPEED (uint8_t *)32 // TODO: Combine these into a single word and single block of EEPROM #define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)33 +// Size of EEPROM being used, other code can refer to this for available EEPROM +#define EECONFIG_SIZE 34 /* debug bit */ #define EECONFIG_DEBUG_ENABLE (1 << 0) #define EECONFIG_DEBUG_MATRIX (1 << 1) diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index af2b2fd48b4f..794a9152fbeb 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -83,6 +83,9 @@ along with this program. If not, see . #ifdef VELOCIKEY_ENABLE # include "velocikey.h" #endif +#ifdef VIA_ENABLE +# include "via.h" +#endif // Only enable this if console is enabled to print to #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) @@ -217,6 +220,9 @@ __attribute__((weak)) bool is_keyboard_master(void) { return true; } void keyboard_init(void) { timer_init(); matrix_init(); +#ifdef VIA_ENABLE + via_init(); +#endif #ifdef QWIIC_ENABLE qwiic_init(); #endif From 2c1417246789383829145bdfc51b3b3921a99341 Mon Sep 17 00:00:00 2001 From: csc027 Date: Fri, 3 Jan 2020 14:12:53 -0800 Subject: [PATCH 147/973] [Keymap] Added csc027 keymaps for keebio/iris and planck (#7472) * Added csc027 user folder and keymaps for both keebio/iris and planck * Moved the git_macros variable out of the process_record_user function. * Updated the usb_led code to use the new led_update_user instead of the led_set_user function. * Update users/csc027/defines.h Removed the "_______" macro definition in defines.h, since it has already been defined in QMK. * Update users/csc027/defines.h Removed the "XXXXXXX" macro definition in defines.h, since it has already been defined in QMK. * Update users/csc027/csc027.c Simplified several keyboard macro definitions in the csc027.c file by switching from SS_LCTRL to SS_LCTL in their definitions. * Condensed both the planck and iris rules files to the minimal set of declarations. --- keyboards/keebio/iris/keymaps/csc027/config.h | 28 +++ keyboards/keebio/iris/keymaps/csc027/keymap.c | 70 ++++++ keyboards/keebio/iris/keymaps/csc027/rules.mk | 6 + keyboards/planck/keymaps/csc027/keymap.c | 88 +++++++ keyboards/planck/keymaps/csc027/rules.mk | 6 + users/csc027/csc027.c | 63 +++++ users/csc027/csc027.h | 49 ++++ users/csc027/custom_audio.c | 17 ++ users/csc027/custom_audio.h | 8 + users/csc027/custom_rgb.c | 25 ++ users/csc027/custom_rgb.h | 9 + users/csc027/defines.h | 217 ++++++++++++++++++ users/csc027/rules.mk | 11 + users/csc027/usb_led.c | 32 +++ users/csc027/usb_led.h | 3 + 15 files changed, 632 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/csc027/config.h create mode 100644 keyboards/keebio/iris/keymaps/csc027/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/csc027/rules.mk create mode 100644 keyboards/planck/keymaps/csc027/keymap.c create mode 100644 keyboards/planck/keymaps/csc027/rules.mk create mode 100644 users/csc027/csc027.c create mode 100644 users/csc027/csc027.h create mode 100644 users/csc027/custom_audio.c create mode 100644 users/csc027/custom_audio.h create mode 100644 users/csc027/custom_rgb.c create mode 100644 users/csc027/custom_rgb.h create mode 100644 users/csc027/defines.h create mode 100644 users/csc027/rules.mk create mode 100644 users/csc027/usb_led.c create mode 100644 users/csc027/usb_led.h diff --git a/keyboards/keebio/iris/keymaps/csc027/config.h b/keyboards/keebio/iris/keymaps/csc027/config.h new file mode 100644 index 000000000000..01bb31a6e14a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/csc027/config.h @@ -0,0 +1,28 @@ +/* +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 +#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/iris/keymaps/csc027/keymap.c b/keyboards/keebio/iris/keymaps/csc027/keymap.c new file mode 100644 index 000000000000..398947555c7f --- /dev/null +++ b/keyboards/keebio/iris/keymaps/csc027/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H +#include "csc027.h" + +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_wrapper( + _____________________QWERTY_L1_____________________, _____________________QWERTY_R1_____________________, + _____________________QWERTY_L2_____________________, _____________________QWERTY_R2_____________________, + _____________________QWERTY_L3_____________________, _____________________QWERTY_R3_____________________, + _____________________QWERTY_L4_____________________, KC_SPC, KC_SPC, _____________________QWERTY_R4_____________________, + KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI + ), + + [_RS] = LAYOUT_wrapper( + ______________________RAISE_L1_____________________, ______________________RAISE_R1_____________________, + ______________________RAISE_L2_____________________, ______________________RAISE_R2_____________________, + ______________________RAISE_L3_____________________, ______________________RAISE_R3_____________________, + ______________________RAISE_L4_____________________, _______, _______, ______________________RAISE_R4_____________________, + _______, _______, _______, _______, _______, _______ + ), + + [_LW] = LAYOUT_wrapper( + ______________________LOWER_L1_____________________, ______________________LOWER_R1_____________________, + ______________________LOWER_L2_____________________, ______________________LOWER_R2_____________________, + ______________________LOWER_L3_____________________, ______________________LOWER_R3_____________________, + ______________________LOWER_L4_____________________, _______, _______, ______________________LOWER_R4_____________________, + _______, _______, _______, _______, _______, _______ + ), + + [_MS] = LAYOUT_wrapper( + ______________________MOUSE_L1_____________________, ______________________MOUSE_R1_____________________, + ______________________MOUSE_L2_____________________, ______________________MOUSE_R2_____________________, + ______________________MOUSE_L3_____________________, ______________________MOUSE_R3_____________________, + ______________________MOUSE_L4_____________________, _______, _______, ______________________MOUSE_R4_____________________, + _______, _______, _______, _______, _______, _______ + ), + + [_GT] = LAYOUT_wrapper( + _______________________GIT_L1______________________, _______________________GIT_R1______________________, + _______________________GIT_L2______________________, _______________________GIT_R2______________________, + _______________________GIT_L3______________________, _______________________GIT_R3______________________, + _______________________GIT_L4______________________, _______, _______, _______________________GIT_R4______________________, + _______, _______, _______, _______, _______, _______ + ), + + [_CN] = LAYOUT_wrapper( + ___________________CONVENIENCE_L1__________________, ___________________CONVENIENCE_L1__________________, + ___________________CONVENIENCE_L2__________________, ___________________CONVENIENCE_L2__________________, + ___________________CONVENIENCE_L3__________________, ___________________CONVENIENCE_L3__________________, + ___________________CONVENIENCE_L4__________________, _______, _______, ___________________CONVENIENCE_L4__________________, + _______, _______, _______, _______, _______, _______ + ), + + [_GW] = LAYOUT( + KC_Y, KC_GRV, KC_1, KC_2, KC_3, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_B, KC_TAB, KC_T, KC_W, KC_4, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_M, MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_I, KC_LCTL, KC_Z, KC_LALT, KC_V, KC_SPC, KC_SPC, _______, KC_N, KC_M, KC_COMM, KC_DOT, TO(_CS), TO(_QW), + KC_X, KC_C, KC_SPC, _______, KC_M, KC_B + ), + + [_CS] = LAYOUT( + XXXXXXX, KC_5, KC_1, KC_2, KC_3, KC_4, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_BSPC, + XXXXXXX, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_P4, KC_P5, KC_P6, XXXXXXX, KC_NLCK, + KC_G, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_H, KC_P1, KC_P2, KC_P3, KC_PENT, KC_ESC, + XXXXXXX, KC_LCTL, XXXXXXX, KC_X, XXXXXXX, XXXXXXX, KC_SPC, _______, KC_N, KC_P0, KC_P0, KC_PDOT, TO(_QW), TO(_QW), + KC_B, KC_SPC, KC_SPC, _______, KC_N, KC_P0 + ) +}; diff --git a/keyboards/keebio/iris/keymaps/csc027/rules.mk b/keyboards/keebio/iris/keymaps/csc027/rules.mk new file mode 100644 index 000000000000..e922161e3c2b --- /dev/null +++ b/keyboards/keebio/iris/keymaps/csc027/rules.mk @@ -0,0 +1,6 @@ +BACKLIGHT_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = no +LTO_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes diff --git a/keyboards/planck/keymaps/csc027/keymap.c b/keyboards/planck/keymaps/csc027/keymap.c new file mode 100644 index 000000000000..e39be03eb045 --- /dev/null +++ b/keyboards/planck/keymaps/csc027/keymap.c @@ -0,0 +1,88 @@ +#include QMK_KEYBOARD_H +#include "csc027.h" + +#define LAYOUT_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_wrapper( + _____________________QWERTY_L1_____________________, _____________________QWERTY_R1_____________________, + _____________________QWERTY_L2_____________________, _____________________QWERTY_R2_____________________, + _____________________QWERTY_L3_____________________, _____________________QWERTY_R3_____________________, + _____________________QWERTY_L4_____________________, _____________________QWERTY_R4_____________________ + ), + + [_RS] = LAYOUT_wrapper( + ______________________RAISE_L1_____________________, ______________________RAISE_R1_____________________, + ______________________RAISE_L2_____________________, ______________________RAISE_R2_____________________, + ______________________RAISE_L3_____________________, ______________________RAISE_R3_____________________, + ______________________RAISE_L4_____________________, ______________________RAISE_R4_____________________ + ), + + [_LW] = LAYOUT_wrapper( + ______________________LOWER_L1_____________________, ______________________LOWER_R1_____________________, + ______________________LOWER_L2_____________________, ______________________LOWER_R2_____________________, + ______________________LOWER_L3_____________________, ______________________LOWER_R3_____________________, + ______________________LOWER_L4_____________________, ______________________LOWER_R4_____________________ + ), + + [_MS] = LAYOUT_wrapper( + ______________________MOUSE_L1_____________________, ______________________MOUSE_R1_____________________, + ______________________MOUSE_L2_____________________, ______________________MOUSE_R2_____________________, + ______________________MOUSE_L3_____________________, ______________________MOUSE_R3_____________________, + ______________________MOUSE_L4_____________________, ______________________MOUSE_R4_____________________ + ), + + [_GT] = LAYOUT_wrapper( + _______________________GIT_L1______________________, _______________________GIT_R1______________________, + _______________________GIT_L2______________________, _______________________GIT_R2______________________, + _______________________GIT_L3______________________, _______________________GIT_R3______________________, + _______________________GIT_L4______________________, _______________________GIT_R4______________________ + ), + + [_CN] = LAYOUT_wrapper( + ___________________CONVENIENCE_L1__________________, ___________________CONVENIENCE_R1__________________, + ___________________CONVENIENCE_L2__________________, ___________________CONVENIENCE_R2__________________, + ___________________CONVENIENCE_L3__________________, ___________________CONVENIENCE_R3__________________, + ___________________CONVENIENCE_L4__________________, ___________________CONVENIENCE_R4__________________ + ), + + /* Guild Wars 2 Layer + * + * ,-----------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |BkSpc| + * |-----------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |-----------------------------------------------------------------------| + * |Sf/Ec| A | S | D | F | G | H | J | K | L | ; |Enter| + * |-----------------------------------------------------------------------| + * | Ctl | Z | Alt | X | C |Space|Space| M | B | . |Nxt L|Rst L| + * `-----------------------------------------------------------------------' + */ + + [_GW] = 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_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT , + KC_LCTL, KC_Z, KC_LALT, KC_X, KC_C, KC_SPC, KC_SPC, KC_M, KC_B, KC_DOT, TO(_CS), TO(_QW) + ), + + /* CS:GO Layer + * + * ,-----------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |BkSpc| + * |-----------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | 4 | 5 | 6 | |NmLck| + * |-----------------------------------------------------------------------| + * |Shift| A | S | D | F | G | H | 1 | 2 | 3 |Enter| Esc | + * |-----------------------------------------------------------------------| + * | Ctl | Z | Alt | X | B |Space|Space| 0 | 0 | . |Nxt L|Rst L| + * `-----------------------------------------------------------------------' + */ + + [_CS] = LAYOUT_ortho_4x12( + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_P4, KC_P5, KC_P6, XXXXXXX, KC_NLCK, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_P1, KC_P2, KC_P3, KC_PENT, KC_ESC , + KC_LCTL, KC_Z, KC_LALT, KC_X, KC_B, KC_SPC, KC_SPC, KC_P0, KC_P0, KC_PDOT, TO(_QW), TO(_QW) + ) +}; diff --git a/keyboards/planck/keymaps/csc027/rules.mk b/keyboards/planck/keymaps/csc027/rules.mk new file mode 100644 index 000000000000..801031fb1edc --- /dev/null +++ b/keyboards/planck/keymaps/csc027/rules.mk @@ -0,0 +1,6 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = no +LTO_ENABLE = yes +RGBLIGHT_ENABLE = no diff --git a/users/csc027/csc027.c b/users/csc027/csc027.c new file mode 100644 index 000000000000..106be9b690fe --- /dev/null +++ b/users/csc027/csc027.c @@ -0,0 +1,63 @@ +#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") +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + 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); + } + 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); + } + return false; + case GIT_ADD...MC_ATRD: + 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]); + return true; + } + return false; + default: + return true; + } +} diff --git a/users/csc027/csc027.h b/users/csc027/csc027.h new file mode 100644 index 000000000000..2a4c8a8a6e2a --- /dev/null +++ b/users/csc027/csc027.h @@ -0,0 +1,49 @@ +#pragma once + +#include "quantum.h" +#include "defines.h" + +enum custom_keycodes { + // Layer 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 +}; + +enum custom_layers { + _QW = 0, // Qwerty + _RS, // Raise + _LW, // Lower + _MS, // Mouse + _GT, // Git + _CN, // Convenience + _GW, // Guild Wars 2 + _CS // Counter-Strike: Global Offensive +}; diff --git a/users/csc027/custom_audio.c b/users/csc027/custom_audio.c new file mode 100644 index 000000000000..96e0e660293a --- /dev/null +++ b/users/csc027/custom_audio.c @@ -0,0 +1,17 @@ +#include "csc027.h" +#include "custom_audio.h" + +#if defined(AUDIO_ENABLE) + +float tone_on[][2] = SONG(E__NOTE(_G6)); +float tone_off[][2] = SONG(E__NOTE(_D5)); + +void on_usb_led_off(void) { + PLAY_SONG(tone_off); +} + +void on_usb_led_on(void) { + PLAY_SONG(tone_on); +} + +#endif diff --git a/users/csc027/custom_audio.h b/users/csc027/custom_audio.h new file mode 100644 index 000000000000..daea1e652ed0 --- /dev/null +++ b/users/csc027/custom_audio.h @@ -0,0 +1,8 @@ +#pragma once + +#if defined(AUDIO_ENABLE) + +void on_usb_led_off(void); +void on_usb_led_on(void); + +#endif diff --git a/users/csc027/custom_rgb.c b/users/csc027/custom_rgb.c new file mode 100644 index 000000000000..000483b2aef2 --- /dev/null +++ b/users/csc027/custom_rgb.c @@ -0,0 +1,25 @@ +#include "csc027.h" +#include "custom_rgb.h" + +#if defined(RGBLIGHT_ENABLE) + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + uint16_t user_hue = rgblight_get_hue(); + for (uint16_t i = 0; i < 256; ++i) { + rgblight_sethsv_noeeprom((i + user_hue) % 256, 255, 255); + wait_ms(5); + } + rgblight_sethsv_noeeprom(0, 0, 0); +} + +void on_usb_led_off(void) { + rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() - 85); +} + +void on_usb_led_on(void) { + rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() + 85); +} + +#endif diff --git a/users/csc027/custom_rgb.h b/users/csc027/custom_rgb.h new file mode 100644 index 000000000000..47fdeb7b26e0 --- /dev/null +++ b/users/csc027/custom_rgb.h @@ -0,0 +1,9 @@ +#pragma once + +#if defined(RGBLIGHT_ENABLE) + +void keyboard_post_init_user(void); +void on_usb_led_off(void); +void on_usb_led_on(void); + +#endif diff --git a/users/csc027/defines.h b/users/csc027/defines.h new file mode 100644 index 000000000000..3eaa95d83bd4 --- /dev/null +++ b/users/csc027/defines.h @@ -0,0 +1,217 @@ +#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 + +#define ________________ KC_TRNS + +/* QWERTY Layer + * + * The basic layer of this keymap is a QWERTY layer. + * + * - Modifier keys more closely resemble a standard keyboard's layout. + * - There is a "Nxt L" function that cycles through the QWERTY and + * game layers. This has been implemented by hard coding the jump to the + * next layer in each of the layers using the TO() macro. Currently, the + * "Nxt L" function skips over the momentary layers (i.e., Mouse, Git, + * Lower, Raise, and Convenience layers). + * - There is a "Rst L" function that resets the current layer to the + * QWERTY layer. + * - The "Git" one shot function goes to the macro layer which has Git + * commands implemented. + * - The "Convc" momentary function goes to the Convenience layer which has a + * tenkey. Note: The tenkey will operate using the secondary functions if + * the Number Lock is not enabled (e.g., Left and Right instead of 4 and + * 6). + * - The Right Shift key also doubles as an Enter key if it is tapped rather + * than held. + * + * ,-----------------------------------. ,-----------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P |BkSpc| + * |-----------------------------------| |-----------------------------------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | + * |-----------------------------------| |-----------------------------------| + * |Shift| Z | X | C | V | B | | N | M | , | . | / |Sf/En| + * |-----------------------------------| |-----------------------------------| + * |Cntrl|Super| Alt |Convc|Lower|Space| |Space|Raise| \ | Git |Nxt L|Rst L| + * `-----------------------------------' `-----------------------------------' + */ + +#define _____________________QWERTY_L1_____________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T +#define _____________________QWERTY_L2_____________________ KC_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_L4_____________________ KC_LCTL, KC_LGUI, KC_LALT, MO(_CN), LOWER, KC_SPC + +#define _____________________QWERTY_R1_____________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC +#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, MC_RSFE +#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GW), XXXXXXX + +/* Raise Layer + * + * The Raise layer accommodates the Home, End, Page Up, and Page Down keys + * in what would be the Vim arrow keys positions. This is done as opposed + * to using C-D, C-U, 0, $, and ^, because it would require a separate layer. + * + * - The top row has the shifted versions of the number row, rather than the + * numbers themselves. This is a change to have a mnemonic where shifted + * elements are on the Raise layer. This also makes it easy to use some of + * Vim style movement controls (e.g. $, %), but makes it harder for others + * (e.g. ^, (, )). Consider swapping the number row with the shifted number + * row if you do not care about the mnemonic. + * - The Left Brace, Right Brace, Underscore, and Plus keys have been moved + * from the right side to the left side. This will take some getting used + * to, as these keys are normally on the right side of the keyboard. An + * alternative would be to keep the keys on the right hand side just under + * the Parentheses. This would prevent the use of Vim arrow keys however. + * - The F keys have been laid across the bottom in the Raise layer, rather + * than the Lower layer to allow easy access to the Alt-F4 chord for + * Windows. When the F keys were put in the Lower layer, it made it hard + * to use this chord, as the Lower key, the Alt key, and the F4 key were + * all right next to each other. + * - A Delete key has been added in this layer to allow easy access to the + * Control-Alt-Delete login chord for Windows. + * + * ,-----------------------------------. ,-----------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |-----------------------------------| |-----------------------------------| + * | | _ | + | { | } | Caps| | Home| PgDn| PgUp| End | | | + * |-----------------------------------| |-----------------------------------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |-----------------------------------| |-----------------------------------| + * | | | | | | | | | | | | | | + * `-----------------------------------' `-----------------------------------' + */ + +#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 + +/* Lower Layer + * + * The lower layout scheme accommodates the Vim style arrow keys. + * + * - The arrow keys are in the normal Vim positions. + * - The Left Square Bracket, Right Square Bracket, Minus, and Equal keys + * have been moved from the right side to the left side. This will take + * some getting used to, as it is on the left rather than the right. + * - A Delete key has been added in this layer to allow easy access to the + * Control-Alt-Delete login chord for Windows. + * - The remaining F keys are in this layer. + * + * ,-----------------------------------. ,-----------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |-----------------------------------| |-----------------------------------| + * | | - | = | [ | ] | | | Left| Down| Up |Right| | | + * |-----------------------------------| |-----------------------------------| + * | | F11 | F12 | | | | | | | | | | | + * |-----------------------------------| |-----------------------------------| + * | | | | | | | | | | | | | | + * `-----------------------------------' `-----------------------------------' + */ + +#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 + + +/* MIT Layout (Mouse) + * + * The mouse layer adds keys to use the keyboard like a mouse. + * + * ,-----------------------------------. ,-----------------------------------. + * | | | | | | | | | | | | | | + * |-----------------------------------| |-----------------------------------| + * | | | |Ms-Lc|Ms-Rc| | | Ms-L| Ms-D| Ms-U| Ms-R| | | + * |-----------------------------------| |-----------------------------------| + * | | | | | | | | | | | | | | + * |-----------------------------------| |-----------------------------------| + * | | | | | | | | | | | | | | + * `-----------------------------------' `-----------------------------------' + */ + +#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 + +/* MIT Layout (Git) + * + * The macro layer that has common git commands. + * + * ,-----------------------------------. ,-----------------------------------. + * | |Chery| Show|Rebas|Reset| Tag | | | Pull| Init|Rmote| Push| | + * |-----------------------------------| |-----------------------------------| + * | | Add |Sttus| Diff|Fetch| Grep| |Stash| |ChkOt| Log | | | + * |-----------------------------------| |-----------------------------------| + * | | | |Comit| Move|Brnch| | |Merge| | | | | + * |-----------------------------------| |-----------------------------------| + * | | | | | | | | | | | | | | + * `-----------------------------------' `-----------------------------------' + */ + +#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_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 + + +/* 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 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. + * + * ,-----------------------------------. ,-----------------------------------. + * | | |Insrt|ScrLk|PrtSc| | | * | 7 | 8 | 9 | - |BkSpc| + * |-----------------------------------| |-----------------------------------| + * | | | App | LCAD|MRDP7|NmLck| | / | 4 | 5 | 6 | + | | + * |-----------------------------------| |-----------------------------------| + * | | | | 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_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 diff --git a/users/csc027/rules.mk b/users/csc027/rules.mk new file mode 100644 index 000000000000..7e5d44e1c8f0 --- /dev/null +++ b/users/csc027/rules.mk @@ -0,0 +1,11 @@ +SRC += csc027.c + +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + SRC += custom_rgb.c + SRC += usb_led.c +endif + +ifeq ($(strip $(AUDIO_ENABLE)), yes) + SRC += custom_audio.c + SRC += usb_led.c +endif diff --git a/users/csc027/usb_led.c b/users/csc027/usb_led.c new file mode 100644 index 000000000000..1418e32cad92 --- /dev/null +++ b/users/csc027/usb_led.c @@ -0,0 +1,32 @@ +#include "csc027.h" +#include "usb_led.h" +#include "led.h" + +#if defined(RGBLIGHT_ENABLE) +# include "custom_rgb.h" +#elif defined(AUDIO_ENABLE) +# include "custom_audio.h" +#endif + +#if defined(AUDIO_ENABLE) || defined(RGBLIGHT_ENABLE) + +bool led_update_user(led_t usb_led) { + static led_t old_usb_led = { + .num_lock = false, + .caps_lock = false, + .scroll_lock = false + }; + + if(old_usb_led.caps_lock != usb_led.caps_lock) { + usb_led.caps_lock ? on_usb_led_on() : on_usb_led_off(); + } else if(old_usb_led.num_lock != usb_led.num_lock) { + usb_led.num_lock ? on_usb_led_on() : on_usb_led_off(); + } else if(old_usb_led.scroll_lock != usb_led.scroll_lock) { + usb_led.scroll_lock ? on_usb_led_on() : on_usb_led_off(); + } + old_usb_led = usb_led; + + return true; +} + +#endif diff --git a/users/csc027/usb_led.h b/users/csc027/usb_led.h new file mode 100644 index 000000000000..7451b4695038 --- /dev/null +++ b/users/csc027/usb_led.h @@ -0,0 +1,3 @@ +#pragma once + +bool led_update_user(led_t usb_led); From 0f43c2652555fc2c4adc07eed856cd0633a8e1fb Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Fri, 3 Jan 2020 16:38:59 -0800 Subject: [PATCH 148/973] [Keymap] crd's personal keymap for hotswap leaf60 (#7777) --- .../leaf60/hotswap/keymaps/crd/keymap.c | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 keyboards/foxlab/leaf60/hotswap/keymaps/crd/keymap.c diff --git a/keyboards/foxlab/leaf60/hotswap/keymaps/crd/keymap.c b/keyboards/foxlab/leaf60/hotswap/keymaps/crd/keymap.c new file mode 100644 index 000000000000..117edf35248f --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/keymaps/crd/keymap.c @@ -0,0 +1,33 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + +#define KC_CTES CTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_tsangan_hhkb( + 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_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_CTES, 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_LCTL, XXXXXXX, KC_LGUI, KC_SPC, KC_RALT, XXXXXXX, TO(_CL) + ), + [_FL] = 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, + _______, _______, _______, EEP_RST, RESET, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [_CL] = LAYOUT_60_tsangan_hhkb( + 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, BL_ON, XXXXXXX, XXXXXXX, + XXXXXXX, BL_DEC, BL_INC, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_BRTG, BL_STEP, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_OFF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(_BL) + ) +}; From 8b80cf853bd8896dd7f86f8c80290826583abccc Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 4 Jan 2020 15:57:03 +0900 Subject: [PATCH 149/973] [Docs] Update Japanese translation (#7783) * [Docs] Update translation * Apply suggestions from code review * Update docs/ja/config_options.md * Update docs/ja/newbs_building_firmware.md Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> --- docs/ja/config_options.md | 25 ++++++++++++++++++++----- docs/ja/faq_build.md | 18 +++++++++++------- docs/ja/newbs_building_firmware.md | 6 +++--- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index d7457798c8f9..a3816f16d76a 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -1,8 +1,8 @@ # QMK の設定 QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。 @@ -285,8 +285,26 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * ビルドの後でルート `qmk_firmware` フォルダにコピーされる形式 (bin, hex) を定義します。 * `SRC` * コンパイル・リンクリストにファイルを追加するために使われます。 +* `LIB_SRC` + * コンパイル・リンクリストにライブラリとしてファイルを追加するために使われます。 + `LIB_SRC` で指定されたファイルは、`SRC` で指定されたファイルの後にリンクされます。 + 例えば、次のように指定した場合: + ``` + SRC += a.c + LIB_SRC += lib_b.c + SRC += c.c + LIB_SRC += lib_d.c + ``` + リンク順は以下の通りです。 + ``` + ... a.o c.o ... lib_b.a lib_d.a ... + ``` * `LAYOUTS` * このキーボードがサポートする[レイアウト](ja/feature_layouts.md)のリスト +* `LINK_TIME_OPTIMIZATION_ENABLE` + * キーボードをコンパイルする時に、Link Time Optimization (`LTO`) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。ただし、`LTO` が有効な場合、古いマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。 +* `LTO_ENABLE` + * LINK_TIME_OPTIMIZATION_ENABLE と同じ意味です。`LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。 ## AVR MCU オプション * `MCU = atmega32u4` @@ -345,9 +363,6 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * キーボードが起動する前に、USB 接続が確立されるのをキーボードに待機させます * `NO_USB_STARTUP_CHECK` * キーボードの起動後の usb サスペンドチェックを無効にします。通常、キーボードはタスクが実行される前にホストがウェイク アップするのを待ちます。分割キーボードは半分はウェイクアップコールを取得できませんが、マスタにコマンドを送信する必要があるため、役に立ちます。 -* `LINK_TIME_OPTIMIZATION_ENABLE` - * キーボードをコンパイルする時に、Link Time Optimization (`LTO`) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。ただし、`LTO` が有効な場合、古いマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。 - * `LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。 ## USB エンドポイントの制限 diff --git a/docs/ja/faq_build.md b/docs/ja/faq_build.md index 73c597307a03..9b4ce12a4863 100644 --- a/docs/ja/faq_build.md +++ b/docs/ja/faq_build.md @@ -1,8 +1,8 @@ # よくあるビルドの質問 このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。 @@ -122,24 +122,28 @@ OPT_DEFS += -DBOOTLOADER_SIZE=2048 ``` brew rm avr-gcc +brew rm avr-gcc@8 brew rm dfu-programmer brew rm dfu-util brew rm gcc-arm-none-eabi +brew rm arm-gcc-bin@8 brew rm avrdude -brew install avr-gcc +brew install avr-gcc@8 brew install dfu-programmer brew install dfu-util -brew install gcc-arm-none-eabi +brew install arm-gcc-bin@8 brew install avrdude +brew link --force avr-gcc@8 +brew link --force arm-gcc-bin@8 ``` -### avr-gcc 8.1 と LUFA +### `avr-gcc` と LUFA -avr-gcc を 7 より上に更新した場合、LUFA に関連するエラーが表示されるかもしれません。例えば: +`avr-gcc` を更新し、LUFA に関連するエラーが表示された場合、例えば: `lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` -今のところ、brew で avr-gcc を 7 にロールバックする必要があります。 +今のところ、Homebrew で `avr-gcc` を 8 にロールバックする必要があります。 ``` brew uninstall --force avr-gcc diff --git a/docs/ja/newbs_building_firmware.md b/docs/ja/newbs_building_firmware.md index f9a847f4d210..bcbc64a2184f 100644 --- a/docs/ja/newbs_building_firmware.md +++ b/docs/ja/newbs_building_firmware.md @@ -2,8 +2,8 @@ ビルド環境をセットアップしたので、カスタムファームウェアのビルドを開始する準備ができました。 @@ -56,7 +56,7 @@ macOS または Windows を使用している場合は、キーマップフォ この行はレイヤーのリストの開始を表わしています。 その下には、`LAYOUT` または `KEYMAP` のいずれかを含む行があり、これらの行はレイヤーの開始を表わしています。 -その行の下には、その特定のレイヤーを構成するキーのリストがあります。 +その行の下には、そのレイヤーを構成するキーのリストがあります。 !> キーマップファイルを編集するときは、カンマを追加したり削除したりしないように注意してください。そうするとファームウェアのコンパイルができなくなり、余分であったり欠落していたりするカンマがどこにあるのかを容易に把握できない場合があります。 From 6e520a721dc093244473bb786a1058d655f75406 Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 4 Jan 2020 15:57:59 +0900 Subject: [PATCH 150/973] [Docs] fix installation commands for macos (#7785) * [Docs] fix installation commands for macos * Update docs/getting_started_build_tools.md --- docs/getting_started_build_tools.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index 2721a9a03130..95f17e4b2ecc 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -43,7 +43,7 @@ Debian / Ubuntu example: Fedora / Red Hat example: 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 example: 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 @@ -57,16 +57,17 @@ By default, this will download compilers for both AVR and ARM. If you don't need nix-shell --arg arm false ## macOS -If you're using [homebrew,](http://brew.sh/) you can use the following commands: +If you're using [Homebrew](http://brew.sh/), you can use the following commands: brew tap osx-cross/avr - brew tap PX4/homebrew-px4 + 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 gcc-arm-none-eabi + brew install arm-gcc-bin@8 + brew link --force arm-gcc-bin@8 brew install avrdude This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of `avr-gcc@8` can take over 20 minutes and exhibit high CPU usage. From c1feeaa57f28c781e39996e5d4eea3a31f083439 Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 4 Jan 2020 12:24:51 -0800 Subject: [PATCH 151/973] Update Breaking Changes doc for 2020-02-29 merge --- docs/breaking_changes.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index b5bcb7a1c760..fc71cf5ab190 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -10,16 +10,16 @@ The breaking change period is when we will merge PR's that change QMK in dangero ## When is the next Breaking Change? -The next Breaking Change is scheduled for Nov 29. +The next Breaking Change is scheduled for February 29, 2020. ### Important Dates * [x] 2019 Sep 21 - `future` is created. It will be rebased weekly. -* [ ] 2019 Nov 01 - `future` closed to new PR's. -* [ ] 2019 Nov 01 - Call for testers. -* [ ] 2019 Nov 27 - `master` is locked, no PR's merged. -* [ ] 2019 Nov 29 - Merge `future` to `master`. -* [ ] 2019 Nov 30 - `master` is unlocked. PR's can be merged again. +* [ ] 2020 Jan 11 - `future` closed to new PR's. +* [ ] 2020 Jan 11 - 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. ## What changes will be included? @@ -68,7 +68,7 @@ This happens immediately after the previous `future` branch is merged. * [ ] `git push origin future` * [ ] `git push --tags` -## 4 Weeks Before Merge +## 4+ Weeks Before Merge * `future` is now closed to new PR's, only fixes for current PR's may be merged * Post call for testers From dcb7ca3f7910420cfa85ba659d48285b3633a978 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 4 Jan 2020 20:29:44 +0000 Subject: [PATCH 152/973] Move some common matrix code to a common location (#7699) * Move some common matrix code to a common location * Refactor some 'custom_matrix_helper' logic to use custom matrix lite * Fix build for kinesis/stapelberg - abuse of vpath was picking up matrix.c from core when custom matrix was enabled * Add validation for CUSTOM_MATRIX --- common_features.mk | 26 ++++-- keyboards/kinesis/alvicstep/rules.mk | 4 + keyboards/kinesis/rules.mk | 4 - keyboards/xd84/custom_matrix_helper.c | 56 ------------ keyboards/xd84/rules.mk | 2 +- keyboards/xd96/custom_matrix_helper.c | 56 ------------ keyboards/xd96/rules.mk | 2 +- quantum/matrix.c | 68 ++------------- quantum/matrix_common.c | 59 +++++++++++++ quantum/split_common/matrix.c | 118 +++++++------------------- quantum/split_common/matrix.h | 3 - tmk_core/common/matrix.h | 7 +- 12 files changed, 123 insertions(+), 282 deletions(-) create mode 100644 quantum/matrix_common.c delete mode 100644 quantum/split_common/matrix.h diff --git a/common_features.mk b/common_features.mk index 92b24bb2003d..67c64b425f68 100644 --- a/common_features.mk +++ b/common_features.mk @@ -374,12 +374,28 @@ QUANTUM_SRC:= \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c -# Include the standard or split matrix code if needed + + +VALID_CUSTOM_MATRIX_TYPES:= yes lite no + +CUSTOM_MATRIX ?= no + ifneq ($(strip $(CUSTOM_MATRIX)), yes) - ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c - else - QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c + ifeq ($(filter $(CUSTOM_MATRIX),$(VALID_CUSTOM_MATRIX_TYPES)),) + $(error CUSTOM_MATRIX="$(CUSTOM_MATRIX)" is not a valid custom matrix type) + endif + + # Include common stuff for all non custom matrix users + QUANTUM_SRC += $(QUANTUM_DIR)/matrix_common.c + + # if 'lite' then skip the actual matrix implementation + ifneq ($(strip $(CUSTOM_MATRIX)), lite) + # Include the standard or split matrix code if needed + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c + else + QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c + endif endif endif diff --git a/keyboards/kinesis/alvicstep/rules.mk b/keyboards/kinesis/alvicstep/rules.mk index e69de29bb2d1..232ff719c83a 100644 --- a/keyboards/kinesis/alvicstep/rules.mk +++ b/keyboards/kinesis/alvicstep/rules.mk @@ -0,0 +1,4 @@ +CUSTOM_MATRIX = yes # need to do our own thing with the matrix + +# Project specific files +SRC += matrix.c diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk index 295054d75516..faa3e454c9fb 100644 --- a/keyboards/kinesis/rules.mk +++ b/keyboards/kinesis/rules.mk @@ -28,9 +28,5 @@ 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 should be port E6, current quantum library hardcodes C6, which we use for programming -CUSTOM_MATRIX=yes # need to do our own thing with the matrix DEFAULT_FOLDER = kinesis/alvicstep - -# Project specific files -SRC = matrix.c diff --git a/keyboards/xd84/custom_matrix_helper.c b/keyboards/xd84/custom_matrix_helper.c index a4c5b6afa547..e4e256381948 100644 --- a/keyboards/xd84/custom_matrix_helper.c +++ b/keyboards/xd84/custom_matrix_helper.c @@ -23,72 +23,16 @@ #include "debounce.h" #include "quantum.h" -//_____COMMON__________________________________________________________________ -// user-defined overridable functions -__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) {} - - //_____COULD BE COMMON_________________________________________________________ /* matrix state(1:on, 0:off) */ /*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; /*static*/ matrix_row_t matrix[MATRIX_ROWS]; -#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 - -__attribute__ ((weak)) -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -__attribute__ ((weak)) -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} - __attribute__ ((weak)) matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } -__attribute__ ((weak)) -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += matrix_bitpop(i); - } - return count; -} - -__attribute__ ((weak)) -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"); - } -} - - //_____CUSTOM MATRIX 'LITE'____________________________________________________ __attribute__ ((weak)) void custom_matrix_init(void) { diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index d9d316c13361..4a460d91faa0 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk @@ -34,7 +34,7 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) LINK_TIME_OPTIMIZATION_ENABLE = yes # custom matrix setup -CUSTOM_MATRIX = yes +CUSTOM_MATRIX = lite VPATH += drivers/gpio SRC += custom_matrix_helper.c pca9555.c matrix.c diff --git a/keyboards/xd96/custom_matrix_helper.c b/keyboards/xd96/custom_matrix_helper.c index a4c5b6afa547..e4e256381948 100644 --- a/keyboards/xd96/custom_matrix_helper.c +++ b/keyboards/xd96/custom_matrix_helper.c @@ -23,72 +23,16 @@ #include "debounce.h" #include "quantum.h" -//_____COMMON__________________________________________________________________ -// user-defined overridable functions -__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) {} - - //_____COULD BE COMMON_________________________________________________________ /* matrix state(1:on, 0:off) */ /*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; /*static*/ matrix_row_t matrix[MATRIX_ROWS]; -#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 - -__attribute__ ((weak)) -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -__attribute__ ((weak)) -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} - __attribute__ ((weak)) matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } -__attribute__ ((weak)) -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += matrix_bitpop(i); - } - return count; -} - -__attribute__ ((weak)) -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"); - } -} - - //_____CUSTOM MATRIX 'LITE'____________________________________________________ __attribute__ ((weak)) void custom_matrix_init(void) { diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index 2079e436c0be..d5ac5df36a62 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk @@ -34,7 +34,7 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) LINK_TIME_OPTIMIZATION_ENABLE = yes # custom matrix setup -CUSTOM_MATRIX = yes +CUSTOM_MATRIX = lite VPATH += drivers/gpio SRC += custom_matrix_helper.c pca9555.c matrix.c diff --git a/quantum/matrix.c b/quantum/matrix.c index 907492a0f620..62a86fba6807 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -17,30 +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 @@ -56,27 +37,7 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; 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; -} +// helper functions inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } @@ -90,24 +51,7 @@ inline matrix_row_t matrix_get_row(uint8_t 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"); - } -} - -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += matrix_bitpop(i); - } - return count; -} +// matrix code #ifdef DIRECT_PINS @@ -129,7 +73,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) 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 : (ROW_SHIFTER << col_index); + current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); } } @@ -175,7 +119,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) 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 : (ROW_SHIFTER << col_index); + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); } // Unselect row @@ -221,10 +165,10 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) // Check row pin state if (readPin(row_pins[row_index]) == 0) { // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); + current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); } else { // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); } // Determine if the matrix changed state diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c new file mode 100644 index 000000000000..22704e8ee2c6 --- /dev/null +++ b/quantum/matrix_common.c @@ -0,0 +1,59 @@ +#include "matrix.h" +#include "debounce.h" +#include "print.h" +#include "debug.h" + +// user-defined overridable functions + +__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) {} + +// helper functions + +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; +} + +#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(row) bitpop(matrix_get_row(row)) +#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(row) bitpop16(matrix_get_row(row)) +#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(row) bitpop32(matrix_get_row(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"); + } +} + +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 7176d0cc4f33..58602af859dc 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -14,10 +14,6 @@ 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 "wait.h" @@ -33,23 +29,6 @@ along with this program. If not, see . # include "encoder.h" #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) -#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 - #define ERROR_DISCONNECT_COUNT 5 #define ROWS_PER_HAND (MATRIX_ROWS / 2) @@ -62,58 +41,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t raw_matrix[ROWS_PER_HAND]; +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values // row offsets for each hand uint8_t thisHand, thatHand; // user-defined overridable functions - -__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) {} - __attribute__((weak)) void matrix_slave_scan_user(void) {} // helper functions -inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } - -inline uint8_t matrix_cols(void) { return MATRIX_COLS; } - -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 << col)); } inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } -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"); - } -} - -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += matrix_bitpop(i); - } - return count; -} - // matrix code #ifdef DIRECT_PINS @@ -136,7 +78,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) 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 : (ROW_SHIFTER << col_index); + current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); } } @@ -179,7 +121,7 @@ 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++) { // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (ROW_SHIFTER << col_index); + current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (MATRIX_ROW_SHIFTER << col_index); } // Unselect row @@ -225,10 +167,10 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) // Check row pin state if (readPin(row_pins[row_index])) { // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); } else { // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); + current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); } // Determine if the matrix changed state @@ -280,7 +222,8 @@ void matrix_init(void) { // initialize matrix state: all keys off for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; + raw_matrix[i] = 0; + matrix[i] = 0; } debounce_init(ROWS_PER_HAND); @@ -288,29 +231,7 @@ void matrix_init(void) { 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 < ROWS_PER_HAND; 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 + thisHand, ROWS_PER_HAND, changed); - - return (uint8_t)changed; -} - -uint8_t matrix_scan(void) { - uint8_t ret = _matrix_scan(); - +void matrix_post_scan(void) { if (is_keyboard_master()) { static uint8_t error_count; @@ -335,6 +256,25 @@ uint8_t matrix_scan(void) { #endif matrix_slave_scan_user(); } +} + +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 < ROWS_PER_HAND; 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 - return ret; + debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); + + matrix_post_scan(); + return (uint8_t)changed; } diff --git a/quantum/split_common/matrix.h b/quantum/split_common/matrix.h deleted file mode 100644 index c2bdd3098c1d..000000000000 --- a/quantum/split_common/matrix.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index 7624d513763f..a2fedf5ff0b0 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h @@ -40,6 +40,8 @@ typedef uint32_t matrix_col_t; # error "MATRIX_ROWS: invalid value" #endif +#define MATRIX_ROW_SHIFTER ((matrix_row_t)1) + #define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1 << col)) #ifdef __cplusplus @@ -79,11 +81,6 @@ void matrix_scan_kb(void); void matrix_init_user(void); void matrix_scan_user(void); -#ifdef I2C_SPLIT -void slave_matrix_init(void); -uint8_t slave_matrix_scan(void); -#endif - #ifdef __cplusplus } #endif From 2908f1f96361435a4ba4a5baec8e3f45308963bf Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Sat, 4 Jan 2020 15:51:33 -0500 Subject: [PATCH 153/973] [Keymap] Rossman360 Userspace add (#7779) * create userspace * add early macro support, but gtg * attempt to create userspace. * all changes suggested --- users/rossman360/readme.md | 14 +++++ users/rossman360/rossman360.c | 104 ++++++++++++++++++++++++++++++++++ users/rossman360/rossman360.h | 6 ++ users/rossman360/rules.mk | 5 ++ 4 files changed, 129 insertions(+) create mode 100644 users/rossman360/readme.md create mode 100644 users/rossman360/rossman360.c create mode 100644 users/rossman360/rossman360.h create mode 100644 users/rossman360/rules.mk diff --git a/users/rossman360/readme.md b/users/rossman360/readme.md new file mode 100644 index 000000000000..ebb17d16cf60 --- /dev/null +++ b/users/rossman360/readme.md @@ -0,0 +1,14 @@ +Copyright 2020 Ross Montsinger rmontsinger@gmail.com @Rossman360 + +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 . \ No newline at end of file diff --git a/users/rossman360/rossman360.c b/users/rossman360/rossman360.c new file mode 100644 index 000000000000..ade1b630a828 --- /dev/null +++ b/users/rossman360/rossman360.c @@ -0,0 +1,104 @@ +#include "rossman360.h" + +void my_custom_function(void) { + +} + +#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) +#define CMDBSP MT(MOD_LGUI, KC_BSPC) +#define ALTDEL MT(MOD_LALT, KC_DEL) +#define CTRLSP MT(MOD_LCTL, KC_SPACE) +#define BWORD LCTL(KC_BSPC) +#define JUMPBACK LSFT(KC_TAB) +#define LWORD LCTL(KC_LEFT) +#define RWORD LCTL(KC_RIGHT) +#define UNDO LCTL(KC_Z) +#define NTAB LCTL(KC_T) +#define CTAB LCTL(KC_W) +#define XPANDR LCTL(LSFT(KC_X)) +#define TAB1 LCTL(KC_1) +#define TAB2 LCTL(KC_2) +#define TAB3 LCTL(KC_3) +#define TAB4 LCTL(KC_4) +#define RVOLU LCTL(KC_RBRC) +#define RVOLD LCTL(KC_LBRC) + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); + #ifndef FLASH_BOOTLOADER + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) + #endif + { + SEND_STRING(":flash"); + } + if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { + SEND_STRING(" -j8 --output-sync"); + } + tap_code(KC_ENT); + set_mods(temp_mod); + } + break; + case CSPEAK: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); + } + break; + case SPEAK1: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_1))); + } + break; + case SPEAK2: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_2))); + } + break; + case SPEAK3: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_3))); + } + break; + case SPEAK4: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_4))); + } + break; + case PARADOWN: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); + } + break; + case PMERGE: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_HOME) SS_TAP(X_BSPACE) SS_TAP(X_SPACE) SS_LCTRL(SS_TAP(X_BSPACE)) SS_TAP(X_SPACE)); + } + break; + case WREFRESH: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_BSPACE)); + } + break; + case REMCAPS: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_LCTRL(SS_TAP(X_LEFT)) SS_TAP(X_DELETE)); + } + break; +}; +return true; +}; diff --git a/users/rossman360/rossman360.h b/users/rossman360/rossman360.h new file mode 100644 index 000000000000..4c3e01a99d65 --- /dev/null +++ b/users/rossman360/rossman360.h @@ -0,0 +1,6 @@ +#pragma once + +#include "quantum.h" + +void my_custom_function(void); + diff --git a/users/rossman360/rules.mk b/users/rossman360/rules.mk new file mode 100644 index 000000000000..8aaa74316f79 --- /dev/null +++ b/users/rossman360/rules.mk @@ -0,0 +1,5 @@ +SRC += rossman360.c + +ifeq ($(strip $(MACROS_ENABLED)), yes) + OPT_DEFS += -DMACROS_ENABLED +endif \ No newline at end of file From d4b15cd93af0609fef6e345bd1d2259f8dee62a8 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 4 Jan 2020 16:44:45 -0800 Subject: [PATCH 154/973] [Keyboard] GH60 rev. C: fix LAYOUT_60_iso key sequence in QMK Configurator (#7792) ISO Enter's key object was out of sequence. --- keyboards/gh60/revc/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/gh60/revc/info.json b/keyboards/gh60/revc/info.json index 51c61f318292..bbfa1f2dab4c 100644 --- a/keyboards/gh60/revc/info.json +++ b/keyboards/gh60/revc/info.json @@ -24,8 +24,8 @@ }, "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},{"label":"Space","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}] + "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":"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}, {"label":"Space", "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": { From 59c783df488cc8bcd9b8c92e9b27692c1e1761ed Mon Sep 17 00:00:00 2001 From: Hung DO Date: Sun, 5 Jan 2020 08:04:49 +0700 Subject: [PATCH 155/973] [Keyboard] Add support for db63 hotswap rbg (#7771) * correct the matrix pin for db63 * first correct layout * adding RGB support for db63 * adding backlighting keycode * enable back extension * update readme for the bootloader * correct the capslock pin * update correct info.json and layout following suggestion * editing contact * Update keyboards/db/db63/README.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/db/db63/README.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/db/db63/README.md | 21 ++ keyboards/db/db63/config.h | 42 +++ keyboards/db/db63/db63.c | 17 + keyboards/db/db63/db63.h | 49 +++ keyboards/db/db63/info.json | 18 + keyboards/db/db63/keymaps/default/keymap.c | 60 ++++ keyboards/db/db63/rules.mk | 24 ++ keyboards/db/db63/usbconfig.h | 383 +++++++++++++++++++++ 8 files changed, 614 insertions(+) create mode 100644 keyboards/db/db63/README.md create mode 100644 keyboards/db/db63/config.h create mode 100644 keyboards/db/db63/db63.c create mode 100644 keyboards/db/db63/db63.h create mode 100644 keyboards/db/db63/info.json create mode 100644 keyboards/db/db63/keymaps/default/keymap.c create mode 100644 keyboards/db/db63/rules.mk create mode 100644 keyboards/db/db63/usbconfig.h diff --git a/keyboards/db/db63/README.md b/keyboards/db/db63/README.md new file mode 100644 index 000000000000..e886bed0a1a7 --- /dev/null +++ b/keyboards/db/db63/README.md @@ -0,0 +1,21 @@ +# DB63 + +A 65% keyboard hotswap with RGB that runs ps2avrgb natively, with USB C, RGB underglow and backlight. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: DB63 (ATmega32A) +* [Keyboard layout](http://www.keyboard-layout-editor.com/#/gists/dadea703fc8bfc87dc7c480de9f3ef38) + +Make example for this keyboard (after setting up your build environment): + + make db/db63:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make db/db63:default:flash + +**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Escape* while plugging in the keyboard. (*All backlight LEDs will flash which indicate the board is in bootloader mode.*) + +**Tips**: Another trick to enable the board in reset mode is using BootMapper Client->Options->Set Bootloader. (*This is only available for the first time, before flashing QMK Firmware.*) + +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/db/db63/config.h b/keyboards/db/db63/config.h new file mode 100644 index 000000000000..468e0f8a97a9 --- /dev/null +++ b/keyboards/db/db63/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2020 Hung DO + +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 VENDOR_ID 0xFAAD +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0200 +// You can edit those at usbconfig.h about line 250. These values will +// unforunatly be ignored so far +#define MANUFACTURER HNB +#define PRODUCT DB63v1 Hotswap + +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } +#define UNUSED_PINS + +#define RGBLED_NUM 18 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + diff --git a/keyboards/db/db63/db63.c b/keyboards/db/db63/db63.c new file mode 100644 index 000000000000..62ebb2cc698a --- /dev/null +++ b/keyboards/db/db63/db63.c @@ -0,0 +1,17 @@ +/* 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 "db63.h" diff --git a/keyboards/db/db63/db63.h b/keyboards/db/db63/db63.h new file mode 100644 index 000000000000..d9a4d1e6d24f --- /dev/null +++ b/keyboards/db/db63/db63.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Hung DO + +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 _x_ 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. + * MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } + * MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } + * + */ + +#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, k2c, \ + k30 , k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40 , k41 , k42 , k43 , k44, k45, k46, k47 , k48 \ +) { \ + { k00, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ + { _x_, 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, k46 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3c, k3a, k47, _x_ }, \ + { k40, k41, k42, k43, k45, _x_, _x_, k44, _x_, _x_, _x_, k3b, _x_, k48 } \ +} + diff --git a/keyboards/db/db63/info.json b/keyboards/db/db63/info.json new file mode 100644 index 000000000000..b8ec10539e83 --- /dev/null +++ b/keyboards/db/db63/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "db63", + "url": "http://www.keyboard-layout-editor.com/#/gists/dadea703fc8bfc87dc7c480de9f3ef38", + "maintainer": "QMK Community", + "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, "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": "Fn3", "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": "Shift", "x": 11.25, "y": 3, "w": 1.75 }, { "label": "Up", "x": 13, "y": 3 }, { "label": "Fn2", "x": 14, "y": 3 }, + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, { "label": "Alt", "x": 1.25, "y": 4, "w": 1.25 }, { "label": "Win", "x": 2.5, "y": 4, "w": 1.25 }, { "label": "Space", "x": 3.75, "y": 4, "w": 6.25 }, { "label": "?", "x": 10, "y": 4 }, { "label": "Fn1", "x": 11, "y": 4 }, { "label": "Left", "x": 12, "y": 4 }, { "label": "Down", "x": 13, "y": 4 }, { "label": "Right", "x": 14, "y": 4 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/db/db63/keymaps/default/keymap.c b/keyboards/db/db63/keymaps/default/keymap.c new file mode 100644 index 000000000000..800ff960b1f4 --- /dev/null +++ b/keyboards/db/db63/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2020 Hung DO + +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_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(3), 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_RSFT, KC_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SLSH, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, XXXXXXX, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, _______, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [2] = LAYOUT( + 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_TOG, RGB_VAD, RGB_VAI, 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, + XXXXXXX, 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_RSFT, KC_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, BL_TOGG, BL_DEC, BL_INC, _______, + 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(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, RESET, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, XXXXXXX, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; + +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + rgblight_sethsv(HSV_CYAN); + writePinHigh(D1); + } else { + rgblight_sethsv(HSV_GREEN); + writePinLow(D1); + } + return false; +} diff --git a/keyboards/db/db63/rules.mk b/keyboards/db/db63/rules.mk new file mode 100644 index 000000000000..84eace5ed6d1 --- /dev/null +++ b/keyboards/db/db63/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32a + +# 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 + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c + +OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/db/db63/usbconfig.h b/keyboards/db/db63/usbconfig.h new file mode 100644 index 000000000000..0dfe8b3baf99 --- /dev/null +++ b/keyboards/db/db63/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 1 +/* 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 'H', 'N', 'B' +#define USB_CFG_VENDOR_NAME_LEN 3 +/* 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 'D', 'B', '6', '3', 'H', 'S' +#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 '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 a68f514a8a82a19b078315fd068db592cd811f19 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 4 Jan 2020 17:06:24 -0800 Subject: [PATCH 156/973] [Keyboard] Add QMK support for Red Scarf I numberpads (#7767) * Add support for Red Scarf I numberpads * update info.json for configurator * Update keyboards/redscarf_i/redscarf_i.c Co-Authored-By: fauxpark * Update keyboards/redscarf_i/redscarf_i.h Co-Authored-By: fauxpark * Update keyboards/redscarf_i/redscarf_i.h Co-Authored-By: fauxpark * Update keyboards/redscarf_i/rules.mk Co-Authored-By: fauxpark * Update keyboards/redscarf_i/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/redscarf_i/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/redscarf_i/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/redscarf_i/keymaps/4x5_ortho/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/redscarf_i/keymaps/4x5_ortho/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/redscarf_i/keymaps/4x6_ortho/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/redscarf_i/keymaps/4x6_ortho/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/redscarf_i/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/redscarf_i/readme.md Co-Authored-By: fauxpark * Update keyboards/redscarf_i/rules.mk Co-Authored-By: fauxpark * rename keymaps, add default * final touches! i think we're there * remove .gitignore from keymaps directory * remove unused custom keycodes from ortho_custom_4x5 keymap * remove ortho_custom_5x4 keymap (identical to ortho_5x4 keymap) * remove firmware size impacts from rules.mk * change "MCU selection" to "MCU name" in rules.mk * complete matrix array for LAYOUT_ortho_5x4 macro Probably not needed, but I like when it's complete. * add numpad layout macros * correct info.json data * update readme Co-Authored-By: Ben Weakley <2173281+Defying@users.noreply.github.com> * rename ortho keymaps to rows by columns per QMK convention * rules.mk templating * change uint32_t to layer_state_t per drashna * use led_update_kb() per drashna Co-authored-by: Ben Weakley <2173281+Defying@users.noreply.github.com> Co-authored-by: fauxpark --- keyboards/redscarf_i/config.h | 45 +++++++ keyboards/redscarf_i/info.json | 114 ++++++++++++++++++ keyboards/redscarf_i/keymaps/default/keymap.c | 28 +++++ .../redscarf_i/keymaps/ortho_5x4/keymap.c | 49 ++++++++ .../redscarf_i/keymaps/ortho_6x4/keymap.c | 36 ++++++ keyboards/redscarf_i/readme.md | 15 +++ keyboards/redscarf_i/redscarf_i.c | 54 +++++++++ keyboards/redscarf_i/redscarf_i.h | 85 +++++++++++++ keyboards/redscarf_i/rules.mk | 33 +++++ 9 files changed, 459 insertions(+) create mode 100644 keyboards/redscarf_i/config.h create mode 100644 keyboards/redscarf_i/info.json create mode 100644 keyboards/redscarf_i/keymaps/default/keymap.c create mode 100644 keyboards/redscarf_i/keymaps/ortho_5x4/keymap.c create mode 100644 keyboards/redscarf_i/keymaps/ortho_6x4/keymap.c create mode 100644 keyboards/redscarf_i/readme.md create mode 100644 keyboards/redscarf_i/redscarf_i.c create mode 100644 keyboards/redscarf_i/redscarf_i.h create mode 100644 keyboards/redscarf_i/rules.mk diff --git a/keyboards/redscarf_i/config.h b/keyboards/redscarf_i/config.h new file mode 100644 index 000000000000..9e35e902af7e --- /dev/null +++ b/keyboards/redscarf_i/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2019 Ben Weakley + +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 0x5959 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Red Scarf +#define PRODUCT Red Scarf I +#define DESCRIPTION QMK for Red Scarf I number pads + +/* Matrix */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* Backlight */ +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 \ No newline at end of file diff --git a/keyboards/redscarf_i/info.json b/keyboards/redscarf_i/info.json new file mode 100644 index 000000000000..a2ea71f3a2d3 --- /dev/null +++ b/keyboards/redscarf_i/info.json @@ -0,0 +1,114 @@ +{ + "keyboard_name": "Red Scarf I", + "url": "", + "maintainer": "qmk, defying", + "width": 4, + "layouts": { + "LAYOUT_ortho_5x4": { + "height": 5, + "key_count": 20, + "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} + ] + }, + "LAYOUT_ortho_6x4": { + "height": 6, + "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} + ] + }, + "LAYOUT_numpad_5x4": { + "height": 5, + "key_count": 17, + "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":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":1, "h":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2} + ] + }, + "LAYOUT_numpad_6x4": { + "height": 6, + "key_count": 21, + "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/redscarf_i/keymaps/default/keymap.c b/keyboards/redscarf_i/keymaps/default/keymap.c new file mode 100644 index 000000000000..9a693fabb625 --- /dev/null +++ b/keyboards/redscarf_i/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2019 Ben Weakley + * + * 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_6x4( // Base + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_P1, KC_P2, KC_P3, KC_ENT, + KC_P0, KC_UP, KC_PDOT, KC_BSPC, + KC_LEFT, KC_DOWN, KC_RGHT, BL_TOGG + ) +}; diff --git a/keyboards/redscarf_i/keymaps/ortho_5x4/keymap.c b/keyboards/redscarf_i/keymaps/ortho_5x4/keymap.c new file mode 100644 index 000000000000..57df87858037 --- /dev/null +++ b/keyboards/redscarf_i/keymaps/ortho_5x4/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 Ben Weakley + * + * 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 custom_keycodes { + KC_P00 = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( // Base + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_P1, KC_P2, KC_P3, KC_ENT, + KC_P0, KC_P00, KC_PDOT, MO(1) + ), + [1] = LAYOUT_ortho_5x4( // Function 1 + _______, _______, _______, _______, + _______, _______, _______, _______, + BL_TOGG, BL_STEP, BL_BRTG, _______, + KC_MUTE, KC_VOLD, KC_VOLU, _______, + KC_MPRV, KC_MPLY, KC_MNXT, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_P00: + if (record->event.pressed) { + SEND_STRING("00"); + } + break; + } + return true; +} diff --git a/keyboards/redscarf_i/keymaps/ortho_6x4/keymap.c b/keyboards/redscarf_i/keymaps/ortho_6x4/keymap.c new file mode 100644 index 000000000000..54bf68ce4e16 --- /dev/null +++ b/keyboards/redscarf_i/keymaps/ortho_6x4/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 Ben Weakley + * + * 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_6x4( // Base + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_P1, KC_P2, KC_P3, KC_ENT, + KC_P0, KC_UP, KC_PDOT, KC_BSPC, + KC_LEFT, KC_DOWN, KC_RGHT, MO(1) + ), + [1] = LAYOUT_ortho_6x4( // Function 1 + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + BL_TOGG, BL_STEP, BL_BRTG, _______, + KC_MUTE, KC_VOLD, KC_VOLU, _______, + KC_MPRV, KC_MPLY, KC_MNXT, _______ + ) +}; diff --git a/keyboards/redscarf_i/readme.md b/keyboards/redscarf_i/readme.md new file mode 100644 index 000000000000..a5c5468d2a69 --- /dev/null +++ b/keyboards/redscarf_i/readme.md @@ -0,0 +1,15 @@ +# Red Scarf I + +![redscarf_i](https://i.imgur.com/Q6p81aX.jpg) + +Port of QMK for Red Scarf I number pads, a five- or six-row number pad with support for in-switch single-color LEDs. + +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk), [Ben Weakley](https://github.com/defying) +* Hardware Supported: Red Scarf I PCBs +* Hardware Availability: no longer available + +Make example for this keyboard (after setting up your build environment): + + make redscarf_i: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/redscarf_i/redscarf_i.c b/keyboards/redscarf_i/redscarf_i.c new file mode 100644 index 000000000000..a8a685b13b5a --- /dev/null +++ b/keyboards/redscarf_i/redscarf_i.c @@ -0,0 +1,54 @@ +/* Copyright 2019 Ben Weakley + * + * 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 "redscarf_i.h" + +void keyboard_pre_init_kb(void) { + // initialize top row leds + setPinOutput(F7); + setPinOutput(F6); + setPinOutput(F5); + // and then turn them off + writePinHigh(F7); + writePinHigh(F6); + writePinHigh(F5); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(F7, !led_state.num_lock); + } + return res; +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + switch (biton32(state)) { + case 1: + writePinHigh(F6); + writePinLow(F5); + break; + case 2: + writePinLow(F6); + writePinHigh(F5); + break; + default: + writePinHigh(F6); + writePinHigh(F5); + break; + } + return state; +} diff --git a/keyboards/redscarf_i/redscarf_i.h b/keyboards/redscarf_i/redscarf_i.h new file mode 100644 index 000000000000..44e46893471b --- /dev/null +++ b/keyboards/redscarf_i/redscarf_i.h @@ -0,0 +1,85 @@ +/* Copyright 2019 Ben Weakley + * + * 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_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 } \ +} + +#define LAYOUT_ortho_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +#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, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43 }, \ + { k50, KC_NO, k52, KC_NO } \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k42, k33 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO }, \ + { k30, k31, k32, k33 }, \ + { k40, KC_NO, k42, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/redscarf_i/rules.mk b/keyboards/redscarf_i/rules.mk new file mode 100644 index 000000000000..2724fe6dbcc8 --- /dev/null +++ b/keyboards/redscarf_i/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 +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 +UNICODE_ENABLE = no # Unicode + +LAYOUTS = ortho_5x4 ortho_6x4 numpad_5x4 numpad_6x4 From 12c6f9a412a940021e2f98fe29e4cbf62c03ddbd Mon Sep 17 00:00:00 2001 From: Wilba Date: Sun, 5 Jan 2020 19:18:36 +1100 Subject: [PATCH 157/973] [Keyboard] Added VIA support to Efreet (#7788) * Added Efreet * Review changes --- keyboards/efreet/config.h | 4 +-- keyboards/efreet/keymaps/via/keymap.c | 43 +++++++++++++++++++++++++++ keyboards/efreet/keymaps/via/rules.mk | 1 + keyboards/efreet/rules.mk | 14 ++++----- 4 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 keyboards/efreet/keymaps/via/keymap.c create mode 100644 keyboards/efreet/keymaps/via/rules.mk diff --git a/keyboards/efreet/config.h b/keyboards/efreet/config.h index 2a420b248e80..c95a6a6b2245 100644 --- a/keyboards/efreet/config.h +++ b/keyboards/efreet/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 0x534F // "SO" +#define PRODUCT_ID 0x0001 #define DEVICE_VER 0x0001 #define MANUFACTURER Soran #define PRODUCT Efreet diff --git a/keyboards/efreet/keymaps/via/keymap.c b/keyboards/efreet/keymaps/via/keymap.c new file mode 100644 index 000000000000..c08e3bbe0859 --- /dev/null +++ b/keyboards/efreet/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 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 . + */ +#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 , + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [1] = 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_BSPC, + 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [2] = 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_BSPC, + 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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [3] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/efreet/keymaps/via/rules.mk b/keyboards/efreet/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/efreet/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/efreet/rules.mk b/keyboards/efreet/rules.mk index f3c51f7a6acb..411c3f7a76fc 100644 --- a/keyboards/efreet/rules.mk +++ b/keyboards/efreet/rules.mk @@ -14,19 +14,19 @@ 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) -COMMAND_ENABLE = yes # 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 = 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 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 From f2c61f8840241c0091ad7fcc3f3daa8082111842 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Sun, 5 Jan 2020 17:28:53 -0500 Subject: [PATCH 158/973] h75_singa changes (#7799) --- keyboards/hineybush/h75_singa/h75_singa.c | 9 +++++++++ keyboards/hineybush/h75_singa/rules.mk | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/keyboards/hineybush/h75_singa/h75_singa.c b/keyboards/hineybush/h75_singa/h75_singa.c index e2de94a43323..290f6023e159 100644 --- a/keyboards/hineybush/h75_singa/h75_singa.c +++ b/keyboards/hineybush/h75_singa/h75_singa.c @@ -15,3 +15,12 @@ */ #include "h75_singa.h" + +void eeconfig_init_kb(void) { // EEPROM is getting reset! + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/hineybush/h75_singa/rules.mk b/keyboards/hineybush/h75_singa/rules.mk index 9255756c179a..92ad960cb938 100644 --- a/keyboards/hineybush/h75_singa/rules.mk +++ b/keyboards/hineybush/h75_singa/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 b3b115bcc4466b0320a6725c8e994a9ef4186328 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 6 Jan 2020 16:43:11 +0900 Subject: [PATCH 159/973] [Docs] Update check commands in Japanese documents (#7787) The Japanese documents included a sample command to check the original document changes. But there was something wrong, so I fixed it. --- docs/ja/README.md | 2 +- docs/ja/arm_debugging.md | 2 +- docs/ja/cli.md | 4 ++-- docs/ja/cli_configuration.md | 4 ++-- docs/ja/contributing.md | 2 +- docs/ja/driver_installation_zadig.md | 2 +- docs/ja/faq.md | 2 +- docs/ja/faq_debug.md | 2 +- docs/ja/faq_general.md | 2 +- docs/ja/faq_keymap.md | 2 +- docs/ja/getting_started_getting_help.md | 4 ++-- docs/ja/getting_started_github.md | 4 ++-- docs/ja/getting_started_introduction.md | 4 ++-- docs/ja/newbs.md | 2 +- docs/ja/newbs_building_firmware_configurator.md | 2 +- docs/ja/newbs_flashing.md | 2 +- docs/ja/newbs_getting_started.md | 4 ++-- docs/ja/newbs_git_best_practices.md | 2 +- docs/ja/newbs_git_resolving_merge_conflicts.md | 2 +- docs/ja/newbs_git_resynchronize_a_branch.md | 2 +- docs/ja/newbs_git_using_your_master_branch.md | 2 +- docs/ja/newbs_learn_more_resources.md | 2 +- docs/ja/newbs_testing_debugging.md | 2 +- 23 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/ja/README.md b/docs/ja/README.md index 9b715ec0fb88..8959a9dd9557 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -2,7 +2,7 @@ [![現在のバージョン](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) diff --git a/docs/ja/arm_debugging.md b/docs/ja/arm_debugging.md index 27eddbfdf118..6267d0f8adae 100644 --- a/docs/ja/arm_debugging.md +++ b/docs/ja/arm_debugging.md @@ -2,7 +2,7 @@ このページでは、SWD アダプタとオープンソース/フリーツールを使って ARM MCU をデバッグするためのセットアップ方法について説明します。このガイドでは、GNU MCU Eclipse IDE for C/C++ Developers および OpenOCD を必要な依存関係と一緒にインストールします。 diff --git a/docs/ja/cli.md b/docs/ja/cli.md index 3cc58e1f05ef..ef3752873d82 100644 --- a/docs/ja/cli.md +++ b/docs/ja/cli.md @@ -1,8 +1,8 @@ # QMK CLI このページは QMK CLI のセットアップと使用方法について説明します。 diff --git a/docs/ja/cli_configuration.md b/docs/ja/cli_configuration.md index ce9746479c92..7e9c3e57fa01 100644 --- a/docs/ja/cli_configuration.md +++ b/docs/ja/cli_configuration.md @@ -1,8 +1,8 @@ # QMK CLI 設定 このドキュメントは `qmk config` がどのように動作するかを説明します。 diff --git a/docs/ja/contributing.md b/docs/ja/contributing.md index 8d3c822b4fe9..401cabcd4e6d 100644 --- a/docs/ja/contributing.md +++ b/docs/ja/contributing.md @@ -2,7 +2,7 @@ 👍🎉 まず、これを読み貢献する時間を作ってくれてありがとうございます!🎉👍 diff --git a/docs/ja/driver_installation_zadig.md b/docs/ja/driver_installation_zadig.md index 53fff992b82d..268940ec066e 100644 --- a/docs/ja/driver_installation_zadig.md +++ b/docs/ja/driver_installation_zadig.md @@ -2,7 +2,7 @@ QMK はホストにたいして通常の HID キーボードデバイスとして振る舞うため特別なドライバは必要ありません。しかし、Windows でのキーボードへの書き込みは、多くの場合、キーボードをリセットした時に現れるブートローダデバイスで*行います*。 diff --git a/docs/ja/faq.md b/docs/ja/faq.md index a3a42d55a332..00b0ff82771f 100644 --- a/docs/ja/faq.md +++ b/docs/ja/faq.md @@ -2,7 +2,7 @@ * [一般](ja/faq_general.md) diff --git a/docs/ja/faq_debug.md b/docs/ja/faq_debug.md index a9c7e3df0696..8e42aebbb55f 100644 --- a/docs/ja/faq_debug.md +++ b/docs/ja/faq_debug.md @@ -2,7 +2,7 @@ このページは、キーボードのトラブルシューティングについての様々な一般的な質問を説明します。 diff --git a/docs/ja/faq_general.md b/docs/ja/faq_general.md index cfea2cda2301..935d1a3c6afb 100644 --- a/docs/ja/faq_general.md +++ b/docs/ja/faq_general.md @@ -2,7 +2,7 @@ ## QMK とは何か? diff --git a/docs/ja/faq_keymap.md b/docs/ja/faq_keymap.md index bf7bf56f2066..0c742bf6b91b 100644 --- a/docs/ja/faq_keymap.md +++ b/docs/ja/faq_keymap.md @@ -2,7 +2,7 @@ このページは人々がキーマップについてしばしば持つ疑問について説明します。まだ読んだことが無い場合には、[キーマップの概要](ja/keymap.md)を最初に読むべきです。 diff --git a/docs/ja/getting_started_getting_help.md b/docs/ja/getting_started_getting_help.md index 83fbdc7bdead..4b5d492faf32 100644 --- a/docs/ja/getting_started_getting_help.md +++ b/docs/ja/getting_started_getting_help.md @@ -1,8 +1,8 @@ # 助けを得る QMK に関して助けを得るための多くのリソースがあります。 diff --git a/docs/ja/getting_started_github.md b/docs/ja/getting_started_github.md index 0d08ab78b71f..261f1d391794 100644 --- a/docs/ja/getting_started_github.md +++ b/docs/ja/getting_started_github.md @@ -1,8 +1,8 @@ # QMK で Github を使う方法 Github は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。 diff --git a/docs/ja/getting_started_introduction.md b/docs/ja/getting_started_introduction.md index 2752ea6a21d4..b4f8b574da71 100644 --- a/docs/ja/getting_started_introduction.md +++ b/docs/ja/getting_started_introduction.md @@ -1,8 +1,8 @@ # はじめに このページでは、QMK プロジェクトで作業するために知っておくべき基本的な情報について説明しようと思います。Unix シェルの操作に精通していることを前提としていますが、C について、または make を使ったコンパイルについて精通しているとは想定していません。 diff --git a/docs/ja/newbs.md b/docs/ja/newbs.md index 84e973275267..465b82106d27 100644 --- a/docs/ja/newbs.md +++ b/docs/ja/newbs.md @@ -3,7 +3,7 @@ QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。 diff --git a/docs/ja/newbs_building_firmware_configurator.md b/docs/ja/newbs_building_firmware_configurator.md index 228269b34e06..ae3d3cf286db 100644 --- a/docs/ja/newbs_building_firmware_configurator.md +++ b/docs/ja/newbs_building_firmware_configurator.md @@ -3,7 +3,7 @@ [QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの hex ファイルを生成するオンライングラフィカルユーザーインターフェイスです。 diff --git a/docs/ja/newbs_flashing.md b/docs/ja/newbs_flashing.md index 3407b4625352..f2ca914ee41f 100644 --- a/docs/ja/newbs_flashing.md +++ b/docs/ja/newbs_flashing.md @@ -3,7 +3,7 @@ カスタムファームウェアは出来たので、キーボードに書き込みたくなるでしょう/フラッシュしたくなるでしょう。 diff --git a/docs/ja/newbs_getting_started.md b/docs/ja/newbs_getting_started.md index 865ed162a70c..6f5cd92cd7b1 100644 --- a/docs/ja/newbs_getting_started.md +++ b/docs/ja/newbs_getting_started.md @@ -2,8 +2,8 @@ キーボードにはプロセッサが入っており、それはコンピュータに入っているものと大して違わないものです。 diff --git a/docs/ja/newbs_git_best_practices.md b/docs/ja/newbs_git_best_practices.md index 1b0bda1e4ea0..4e20e4e0b02b 100644 --- a/docs/ja/newbs_git_best_practices.md +++ b/docs/ja/newbs_git_best_practices.md @@ -3,7 +3,7 @@ ## または、"如何にして私は心配することをやめて Git を愛することを学んだか。" diff --git a/docs/ja/newbs_git_resolving_merge_conflicts.md b/docs/ja/newbs_git_resolving_merge_conflicts.md index f1096e52ed92..893c3d503573 100644 --- a/docs/ja/newbs_git_resolving_merge_conflicts.md +++ b/docs/ja/newbs_git_resolving_merge_conflicts.md @@ -3,7 +3,7 @@ ブランチでの作業の完了に時間がかかる場合、他の人が行った変更が、プルリクエストを開いたときにブランチに加えた変更と競合することがあります。 diff --git a/docs/ja/newbs_git_resynchronize_a_branch.md b/docs/ja/newbs_git_resynchronize_a_branch.md index 747fe1e6101b..80ae794a9261 100644 --- a/docs/ja/newbs_git_resynchronize_a_branch.md +++ b/docs/ja/newbs_git_resynchronize_a_branch.md @@ -3,7 +3,7 @@ 仮にあなたの `master` ブランチにあなたのコミットを行い、そしてあなたの QMK リポジトリの更新が必要になったとします。 diff --git a/docs/ja/newbs_git_using_your_master_branch.md b/docs/ja/newbs_git_using_your_master_branch.md index 41013560d34c..08600503490e 100644 --- a/docs/ja/newbs_git_using_your_master_branch.md +++ b/docs/ja/newbs_git_using_your_master_branch.md @@ -3,7 +3,7 @@ QMK の開発では、何がどこで行われているかにかかわらず、`master` ブランチを最新の状態に保つことを強くお勧めします、しかし `master` ブランチには***絶対に直接コミットしないでください***。 diff --git a/docs/ja/newbs_learn_more_resources.md b/docs/ja/newbs_learn_more_resources.md index 35101cdce655..9adcf536062e 100644 --- a/docs/ja/newbs_learn_more_resources.md +++ b/docs/ja/newbs_learn_more_resources.md @@ -3,7 +3,7 @@ これらのリソースは、QMKコミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。 diff --git a/docs/ja/newbs_testing_debugging.md b/docs/ja/newbs_testing_debugging.md index 9cf5c6520039..5ec5811a1e9f 100644 --- a/docs/ja/newbs_testing_debugging.md +++ b/docs/ja/newbs_testing_debugging.md @@ -3,7 +3,7 @@ カスタムファームウェアをキーボードへ書き込んだら、テストする準備が整います。運が良ければ全て問題なく動作しているはずですが、もしそうでなければこのドキュメントがどこが悪いのか調べるのに役立ちます。 From 00d3061e02fa5fedaa6e6cebd310d4e716ffffee Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 6 Jan 2020 01:49:49 -0800 Subject: [PATCH 160/973] [Keymap] Cleanup of Drashna code (#7800) * ifdef rgb stuff like a madman for RGB Coexistance * Re-enable RGB Light on Planck * fix RGB Coexistance issue * Tweak feature settings for Ergodox EZ Glow * Their powers combine, and I am Captain RGB This one is for noroadsleft and yan. * Limit brightness when both RGB features are enabled * Change shutdown method * Add RGB Coexistience stuff to keymap * disable RGBLIGHT_SLEEP until a solution can be found * Disable Unicode on the kyria * Fix up Iris rev defines * Fix up community layouts to compile properly * Cleanup rgb stuff * Merge ergodox keymaps * Update CCCV macro to use tap_code16 * Enable Solenoid on C39 Because josh couldn't * Enable RGB Light, not Matrix on rev6 keymap * Only enable LTO on non-ARM boards * Clean up Bootmagic OLED display * Enable RGBLIGHT_SPLIT on kyria Not that it does anything * Add hotkey for discord --- keyboards/c39/keymaps/drashna/config.h | 2 + keyboards/c39/keymaps/drashna/rules.mk | 2 + .../keebio/iris/keymaps/drashna/config.h | 14 +- keyboards/kyria/keymaps/drashna/config.h | 1 + keyboards/kyria/keymaps/drashna/keymap.c | 52 +++--- keyboards/kyria/keymaps/drashna/rules.mk | 2 +- layouts/community/ergodox/drashna/config.h | 15 +- layouts/community/ergodox/drashna/keymap.c | 41 +++-- layouts/community/ergodox/drashna/rules.mk | 17 +- .../community/ergodox/drashna_glow/config.h | 9 - .../community/ergodox/drashna_glow/keymap.c | 2 - .../community/ergodox/drashna_glow/rules.mk | 13 -- layouts/community/ortho_4x12/drashna/keymap.c | 13 +- layouts/community/ortho_4x12/drashna/rules.mk | 20 +- layouts/community/ortho_5x12/drashna/rules.mk | 1 - users/drashna/drashna.c | 6 +- users/drashna/process_records.c | 8 +- users/drashna/rgb_stuff.c | 173 +++++++++++++++++- users/drashna/rules.mk | 6 +- 19 files changed, 276 insertions(+), 121 deletions(-) delete mode 100644 layouts/community/ergodox/drashna_glow/config.h delete mode 100644 layouts/community/ergodox/drashna_glow/keymap.c delete mode 100644 layouts/community/ergodox/drashna_glow/rules.mk diff --git a/keyboards/c39/keymaps/drashna/config.h b/keyboards/c39/keymaps/drashna/config.h index 5d53fe54bb9d..789b7cc1400b 100644 --- a/keyboards/c39/keymaps/drashna/config.h +++ b/keyboards/c39/keymaps/drashna/config.h @@ -10,3 +10,5 @@ #define RGB_DI_PIN B10 #define RGBLED_NUM 15 + +#define SOLENOID_PIN B11 diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk index d216f6abe6ec..6ebd15a1803c 100644 --- a/keyboards/c39/keymaps/drashna/rules.mk +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -18,3 +18,5 @@ AUDIO_ENABLE = yes # Audio output on port C6 RGBLIGHT_ENABLE = yes # RGB Enable / Disable RGBLIGHT_STARTUP_ANIMATION = yes + +HAPTIC_ENABLE = SOLENOID diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index 25678bd67d14..49381b60a547 100644 --- a/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h @@ -46,11 +46,13 @@ along with this program. If not, see . #ifdef AUDIO_ENABLE # define C6_AUDIO # ifdef RGBLIGHT_ENABLE -# define NO_MUSIC_MODE +# ifndef __arm__ +# define NO_MUSIC_MODE +# endif # endif // RGBLIGHT_ENABLE #endif // AUDIO_ENABLE -#ifndef KEYBOARD_keebio_iris_rev3 +#if defined(KEYBOARD_keebio_iris_rev1) || defined(KEYBOARD_keebio_iris_rev2) # define QMK_ESC_OUTPUT F6 // usually COL # define QMK_ESC_INPUT D7 // usually ROW # define QMK_LED B0 @@ -58,10 +60,12 @@ along with this program. If not, see . #endif #undef PRODUCT -#ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris Rev .2 +#if defined(KEYBOARD_keebio_iris_rev2) +# define PRODUCT Drashna Hacked Iris Rev 2 #elif defined(KEYBOARD_keebio_iris_rev3) -# define PRODUCT Drashna Hacked Iris Rev .3 +# define PRODUCT Drashna Hacked Iris Rev 3 +#elif defined(KEYBOARD_keebio_iris_rev4) +# define PRODUCT Drashna Hacked Iris Rev 4 #endif #define SHFT_LED1 6 diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h index 83d6283f56d2..e566b16d5c3f 100644 --- a/keyboards/kyria/keymaps/drashna/config.h +++ b/keyboards/kyria/keymaps/drashna/config.h @@ -31,6 +31,7 @@ # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 8 # define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SPLIT #endif // If you are using an Elite C rev3 on the slave side, uncomment the lines below: diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c index bdb00e5967c8..5604f1a69200 100644 --- a/keyboards/kyria/keymaps/drashna/keymap.c +++ b/keyboards/kyria/keymaps/drashna/keymap.c @@ -52,7 +52,7 @@ void add_keylog(uint16_t keycode); LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ - OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, MEH(KC_MINS), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ ) /* Re-pass though to allow templates to be used */ @@ -191,30 +191,14 @@ void render_keylogger_status(void) { void render_default_layer_state(void) { oled_write_P(PSTR("Layout: "), false); switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - oled_write_ln_P(PSTR("Qwerty "), false); - break; - case _COLEMAK: - oled_write_ln_P(PSTR("Colemak"), false); - break; - case _DVORAK: - oled_write_ln_P(PSTR("Dvorak"), false); - break; - case _WORKMAN: - oled_write_ln_P(PSTR("Workman"), false); - break; - case _NORMAN: - oled_write_ln_P(PSTR("Norman"), false); - break; - case _MALTRON: - oled_write_ln_P(PSTR("Maltron"), false); - break; - case _EUCALYN: - oled_write_ln_P(PSTR("Eucalyn"), false); - break; - case _CARPLAX: - oled_write_ln_P(PSTR("Carplax"), false); - break; + case _QWERTY: oled_write_ln_P(PSTR("Qwerty"), false); break; + case _COLEMAK: oled_write_ln_P(PSTR("Colemak"), false); break; + case _DVORAK: oled_write_ln_P(PSTR("Dvorak"), false); break; + case _WORKMAN: oled_write_ln_P(PSTR("Workman"), false); break; + case _NORMAN: oled_write_ln_P(PSTR("Norman"), false); break; + case _MALTRON: oled_write_ln_P(PSTR("Maltron"), false); break; + case _EUCALYN: oled_write_ln_P(PSTR("Eucalyn"), false); break; + case _CARPLAX: oled_write_ln_P(PSTR("Carplax"), false); break; } } @@ -230,11 +214,11 @@ void render_layer_state(void) { void render_keylock_status(uint8_t led_usb_state) { oled_write_P(PSTR("Lock: "), false); - oled_write_P(PSTR("NUM"), led_usb_state & (1 << USB_LED_NUM_LOCK)); + oled_write_P(PSTR("NUML"), led_usb_state & (1 << USB_LED_NUM_LOCK)); oled_write_P(PSTR(" "), false); oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); oled_write_P(PSTR(" "), false); - oled_write_ln_P(PSTR("SCL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); + oled_write_ln_P(PSTR("SCLK"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); } void render_mod_status(uint8_t modifiers) { @@ -255,15 +239,21 @@ void render_bootmagic_status(void) { {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, }; oled_write_P(PSTR("Boot "), false); - oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); - oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); + if (keymap_config.swap_lctl_lgui) { + oled_write_P(logo[1][0], false); + } else { + oled_write_P(logo[0][0], false); + } oled_write_P(PSTR(" "), false); oled_write_P(PSTR("NKRO"), keymap_config.nkro); oled_write_P(PSTR(" "), false); oled_write_ln_P(PSTR("GUI"), !keymap_config.no_gui); oled_write_P(PSTR("Magic "), false); - oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); - oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); + if (keymap_config.swap_lctl_lgui) { + oled_write_P(logo[1][1], false); + } else { + oled_write_P(logo[0][1], false); + } oled_write_P(PSTR(" "), false); oled_write_P(PSTR("GRV"), keymap_config.swap_grave_esc); oled_write_P(PSTR(" "), false); diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk index c1a37f5c597b..e835340bbfec 100644 --- a/keyboards/kyria/keymaps/drashna/rules.mk +++ b/keyboards/kyria/keymaps/drashna/rules.mk @@ -1,7 +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 -RGBLIGHT_STARTUP_ANIMATION = yes +RGBLIGHT_STARTUP_ANIMATION = no BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 0091ebcde83e..ce25b0646bf9 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -6,10 +6,13 @@ # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 # define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 +# ifdef RGB_MATRIX_ENABLE +# define RGBLIGHT_DISABLE_KEYCODES +# endif #endif // RGBLIGHT_ENABLE #undef PRODUCT -#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine +#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity #undef DEBOUNCE #define DEBOUNCE 30 @@ -17,3 +20,13 @@ #define TAPPING_TERM_PER_KEY #define ERGODOX_LED_30 + +#ifdef RGB_MATRIX_ENABLE +# undef RGB_MATRIX_LED_PROCESS_LIMIT +# undef RGB_MATRIX_LED_FLUSH_LIMIT +# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) +# define RGBLIGHT_LIMIT_VAL 175 +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS (RGBLIGHT_LIMIT_VAL + 25) +# undef RGBLIGHT_SLEEP +# endif +#endif diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 8308bfdaa19a..69066a47cc48 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -280,7 +280,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_ADJUST] = LAYOUT_ergodox_pretty_wrapper( - KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, + KC_MAKE, _______, _______, _______, _______, _______, UC_MOD, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS), @@ -382,31 +382,32 @@ void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } void rgb_matrix_indicators_user(void) { - if (userspace_config.rgb_layer_change && -# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED - !g_suspend_state && -# endif + if (g_suspend_state || !rgb_matrix_config.enable) return; + + if (layer_state_is(_GAMEPAD)) { + rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q + rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W + rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E + rgb_matrix_set_color(29, 0xFF, 0x80, 0x00); // R + rgb_matrix_set_color(37, 0x00, 0xFF, 0xFF); // A + rgb_matrix_set_color(36, 0x00, 0xFF, 0xFF); // S + rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D + rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F + + rgb_matrix_set_color(userspace_config.swapped_numbers ? 27 : 26, 0xFF, 0xFF, 0xFF); // 1 + rgb_matrix_set_color(userspace_config.swapped_numbers ? 26 : 27, 0x00, 0xFF, 0x00); // 2 + rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3 + } + # if defined(RGBLIGHT_ENABLE) - (!rgblight_config.enable && rgb_matrix_config.enable) + if (!userspace_config.rgb_layer_change) # else - rgb_matrix_config.enable + if (userspace_config.rgb_layer_change) # endif - ) { + { switch (get_highest_layer(layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q - rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W - rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E - rgb_matrix_set_color(29, 0xFF, 0x80, 0x00); // R - rgb_matrix_set_color(37, 0x00, 0xFF, 0xFF); // A - rgb_matrix_set_color(36, 0x00, 0xFF, 0xFF); // S - rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D - rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F - - rgb_matrix_set_color(userspace_config.swapped_numbers ? 27 : 26, 0xFF, 0xFF, 0xFF); // 1 - rgb_matrix_set_color(userspace_config.swapped_numbers ? 26 : 27, 0x00, 0xFF, 0x00); // 2 - rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3 break; case _DIABLO: rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER); diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index 3aee59df6cb2..78a3d15840ae 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -1,19 +1,20 @@ -TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = lite +TAP_DANCE_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no SPACE_CADET_ENABLE = no + ifeq ($(strip $(KEYBOARD)), ergodox_ez) - RGBLIGHT_ENABLE = yes - RGB_MATRIX_ENABLE = no + RGBLIGHT_ENABLE = yes + RGB_MATRIX_ENABLE = yes + RGBLIGHT_TWINKLE = no + INDICATOR_LIGHTS = no + RGBLIGHT_STARTUP_ANIMATION = no endif -CONSOLE_ENABLE = no -BOOTMAGIC_ENABLE = yes UNICODE_ENABLE = yes UNICDOEMAP_ENABLE = no -RGBLIGHT_TWINKLE = no -INDICATOR_LIGHTS = no -RGBLIGHT_STARTUP_ANIMATION = yes DEBOUNCE_TYPE = eager_pr diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h deleted file mode 100644 index 6431cb4ff8d6..000000000000 --- a/layouts/community/ergodox/drashna_glow/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include "../drashna/config.h" - -#undef PRODUCT -#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Glow - -#undef RGB_MATRIX_LED_PROCESS_LIMIT -#undef RGB_MATRIX_LED_FLUSH_LIMIT diff --git a/layouts/community/ergodox/drashna_glow/keymap.c b/layouts/community/ergodox/drashna_glow/keymap.c deleted file mode 100644 index 7d4bdbec50ea..000000000000 --- a/layouts/community/ergodox/drashna_glow/keymap.c +++ /dev/null @@ -1,2 +0,0 @@ -/* placeholder file */ -#include QMK_KEYBOARD_H diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk deleted file mode 100644 index 45addc7c224c..000000000000 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -USER_NAME := drashna - -CORRECTED_LAYOUT := $(LAYOUTS_REPO)/$(LAYOUT)/drashna - -SRC += $(CORRECTED_LAYOUT)/keymap.c - --include $(CORRECTED_LAYOUT)/rules.mk - -ifeq ($(strip $(KEYBOARD)), ergodox_ez) - RGBLIGHT_ENABLE = no - RGB_MATRIX_ENABLE = yes -# TAP_DANCE_ENABLE = no -endif diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index c3899cd036ca..d2957d8fdca4 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -224,16 +224,14 @@ void rgb_matrix_indicators_user(void) { is_ez = true; # endif - if (userspace_config.rgb_layer_change && -# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED - !g_suspend_state && -# endif + if (g_suspend_state || !rgb_matrix_config.enable) return; + # if defined(RGBLIGHT_ENABLE) - (!rgblight_config.enable && rgb_matrix_config.enable) + if (!userspace_config.rgb_layer_change) # else - rgb_matrix_config.enable + if (userspace_config.rgb_layer_change) # endif - ) { + { switch (get_highest_layer(layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); @@ -297,6 +295,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(is_ez ? 41 : 42, 0xD9, 0xA5, 0x21); break; } + if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { if (!layer_state_cmp(layer_state, _ADJUST)) { rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index 38d0d4517670..e4fe905341ae 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk @@ -2,7 +2,6 @@ BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) TAP_DANCE_ENABLE = no -AUDIO_ENABLE = yes SPACE_CADET_ENABLE = no NKRO_ENABLE = yes @@ -11,20 +10,22 @@ ifneq ($(strip $(KEYBOARD)), planck/rev6) COMMAND_ENABLE = no ifeq ($(strip $(LAYOUT_HAS_RGB)), yes) RGBLIGHT_ENABLE = yes - endif - INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes + INDICATOR_LIGHTS = yes + RGBLIGHT_TWINKLE = yes + RGBLIGHT_STARTUP_ANIMATION = yes + endif else CONSOLE_ENABLE = yes COMMAND_ENABLE = yes - RGBLIGHT_ENABLE = no - RGB_MATRIX_ENABLE = WS2812 + RGBLIGHT_ENABLE = yes + RGB_MATRIX_ENABLE = no + AUDIO_ENABLE = yes endif ifeq ($(strip $(KEYBOARD)), planck/light) RGB_MATRIX_ENABLE = yes - RGBLIGHT_ENABLE = no - RGBLIGHT_STARTUP_ANIMATION = no + RGBLIGHT_ENABLE = yes + RGBLIGHT_STARTUP_ANIMATION = yes + AUDIO_ENABLE = yes # HAPTIC_ENABLE += SOLENOID endif ifeq ($(strip $(KEYBOARD)), planck/ez) @@ -37,4 +38,5 @@ ifeq ($(strip $(KEYBOARD)), planck/ez) RGBLIGHT_STARTUP_ANIMATION = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes + AUDIO_ENABLE = yes endif diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk index cae4b27bab2f..b5d55a681d8d 100644 --- a/layouts/community/ortho_5x12/drashna/rules.mk +++ b/layouts/community/ortho_5x12/drashna/rules.mk @@ -4,7 +4,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no -AUDIO_ENABLE = yes NKRO_ENABLE = yes ifeq ($(strip $(KEYBOARD)), fractal) diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 71779a6215f3..1a4ee9b41462 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -121,9 +121,13 @@ void shutdown_user(void) { rgblight_setrgb_red(); #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE +# ifdef __AVR__ rgb_matrix_set_color_all(0xFF, 0x00, 0x00); rgb_matrix_update_pwm_buffers(); - +# else + rgb_matrix_sethsv_noeeprom(0, 255, 255); + rgb_matrix_mode_noeeprom(1); +# endif #endif // RGB_MATRIX_ENABLE shutdown_keymap(); } diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 2f79ad11cc1a..af3ee9cf054f 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -80,13 +80,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) { // Hold, copy - register_code(KC_LCTL); - tap_code(KC_C); - unregister_code(KC_LCTL); + tap_code16(LCTL(KC_C)); } else { // Tap, paste - register_code(KC_LCTL); - tap_code(KC_V); - unregister_code(KC_LCTL); + tap_code16(LCTL(KC_V)); } } break; diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 52ec61c22dcf..e7247f754fa3 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -147,6 +147,7 @@ bool rgblight_twinkle_is_led_used(uint8_t index) { /* Handler for fading/twinkling effect */ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive bool litup = false; + for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { if (lights[light_index].enabled && timer_elapsed(lights[light_index].timer) > 10) { rgblight_fadeout *light = &lights[light_index]; @@ -179,6 +180,7 @@ void start_rgb_light(void) { uint8_t indices_count = 0; uint8_t min_life = 0xFF; uint8_t min_life_index = -1; + for (uint8_t index = 0; index < RGBLED_NUM; ++index) { if (rgblight_twinkle_is_led_used(index)) { continue; @@ -248,7 +250,14 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); eeconfig_update_user(userspace_config.raw); if (userspace_config.rgb_layer_change) { +# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) + rgblight_enable_noeeprom(); +# endif layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) +# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) + } else { + rgblight_disable_noeeprom(); +# endif } } #endif // RGBLIGHT_ENABLE @@ -265,28 +274,182 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { } #endif break; +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + case RGB_TOG: + // Split keyboards need to trigger on key-up for edge-case issue +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_toggle(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_toggle(); +# endif + } + return false; + break; case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions if (record->event.pressed) { - bool is_eeprom_updated = false; -#ifdef RGBLIGHT_ENABLE + bool is_eeprom_updated; +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled if (userspace_config.rgb_layer_change) { userspace_config.rgb_layer_change = false; dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); is_eeprom_updated = true; } -#endif -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) +# endif +# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) if (userspace_config.rgb_matrix_idle_anim) { userspace_config.rgb_matrix_idle_anim = false; dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); is_eeprom_updated = true; } -#endif +# endif if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); } } + +# if defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES) + if (keycode == RGB_MODE_FORWARD && record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); + if (shifted) { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_step_reverse(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_step_reverse(); +# endif + } else { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_step(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_step(); +# endif + } + } else if (keycode == RGB_MODE_REVERSE && record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); + if (shifted) { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_step(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_step(); +# endif + } else { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_step_reverse(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_step_reverse(); +# endif + } + } else if (keycode == RGB_HUI) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_increase_hue(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_increase_hue(); +# endif + } + } else if (keycode == RGB_HUD) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_decrease_hue(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_decrease_hue(); +# endif + } + } else if (keycode == RGB_SAI) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_increase_sat(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_increase_sat(); +# endif + } + } else if (keycode == RGB_SAD) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_decrease_sat(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_decrease_sat(); +# endif + } + } else if (keycode == RGB_VAI) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_increase_val(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_increase_val(); +# endif + } + } else if (keycode == RGB_VAD) { +# ifndef SPLIT_KEYBOARD + if (record->event.pressed) { +# else + if (!record->event.pressed) { +# endif +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_decrease_val(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_decrease_val(); +# endif + } + } else if (keycode == RGB_SPI) { + if (record->event.pressed) { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_increase_speed(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_increase_speed(); +# endif + } + } else if (keycode == RGB_SPD) { + if (record->event.pressed) { +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + rgblight_decrease_speed(); +# endif +# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_decrease_speed(); +# endif + } + } + return false; +# endif +#endif + break; } return true; diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 882857fc8681..4d55da803f9e 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -1,7 +1,9 @@ SRC += drashna.c \ process_records.c -LTO_ENABLE = yes +ifneq ($(PLATFORM),CHIBIOS) + LTO_ENABLE = yes +endif SPACE_CADET_ENABLE = no ifneq ($(strip $(NO_SECRETS)), yes) @@ -58,4 +60,4 @@ endif # this should be handled per keyboard, but until that happens ... ifeq ($(strip $(PROTOCOL)), VUSB) NKRO_ENABLE = no -endif \ No newline at end of file +endif From 5f795d8382e67c68f46cdf6e079c635c3986f939 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 6 Jan 2020 15:29:27 -0800 Subject: [PATCH 161/973] Add an 65_ansi community layout (#7793) * Add an 65_ansi community layout - fix quoting because of comma in config.h * Enable LAYOUT_65_ansi for tada68 * cleanups * Update keyboards/tada68/tada68.h Co-Authored-By: fauxpark Co-authored-by: fauxpark --- keyboards/nk65/config.h | 2 +- keyboards/tada68/rules.mk | 2 ++ keyboards/tada68/tada68.h | 2 ++ layouts/community/65_ansi/yanfali/keymap.c | 40 ++++++++++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100755 layouts/community/65_ansi/yanfali/keymap.c diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 423714c54cf7..33a3f908a69e 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -25,7 +25,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER Yiancar-Designs #define PRODUCT NK65 -#define DESCRIPTION A 65-percent, tool-free RGB keyboard +#define DESCRIPTION "A 65-percent, tool-free RGB keyboard" /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk index 38b05e042698..c92417cf0255 100755 --- a/keyboards/tada68/rules.mk +++ b/keyboards/tada68/rules.mk @@ -26,3 +26,5 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 65_ansi diff --git a/keyboards/tada68/tada68.h b/keyboards/tada68/tada68.h index 670b0e6c15ac..a71910cb3b20 100755 --- a/keyboards/tada68/tada68.h +++ b/keyboards/tada68/tada68.h @@ -37,6 +37,8 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ } +#define LAYOUT_ansi LAYOUT_65_ansi + /* TADA68 ISO layout * ,----------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | diff --git a/layouts/community/65_ansi/yanfali/keymap.c b/layouts/community/65_ansi/yanfali/keymap.c new file mode 100755 index 000000000000..a0887da2bf37 --- /dev/null +++ b/layouts/community/65_ansi/yanfali/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +enum _layers { + BS, + FN +}; + +// shim wilba_tech +#ifndef EF_DEC + #define EF_DEC RGB_RMOD + #define EF_INC RGB_MOD + #define H1_DEC RGB_HUD + #define H1_INC RGB_HUI + #define H2_DEC RGB_HUD + #define H2_INC RGB_HUI + #define S1_DEC RGB_SAD + #define S1_INC RGB_SAI + #define S2_DEC RGB_SAD + #define S2_INC RGB_SAI + #define BR_DEC RGB_VAD + #define BR_INC RGB_VAI + #define ES_DEC KC_TRNS + #define ES_INC KC_TRNS +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BS] = LAYOUT_65_ansi( /* Base */ + 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_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,\ + LCTL_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, 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_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(FN), KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + +[FN] = LAYOUT_65_ansi( /* FN */ + 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_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, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; From 37d7fd12e2fea0dd50dd8ff0a4772e4cad7f0a27 Mon Sep 17 00:00:00 2001 From: Juno Nguyen Date: Tue, 7 Jan 2020 12:35:08 +0800 Subject: [PATCH 162/973] Juno (#7652) * Added community layout juno and junonum; removed poorly maintained variants of juno; added junonum-a47. * Added community layout juno and junonum; removed poorly maintained variants of juno; added junonum-a47. * updated layout type for juno * Performing requested changes; renaming a47; fine-tuning of codes in community layout keymaps. * Fine tuning to requested changes. * Further tuning to suggestion. * Update layouts/community/ortho_4x12/juno/keymap.c Co-Authored-By: fauxpark * Update layouts/community/ortho_4x12/juno/keymap.c Co-Authored-By: fauxpark * Update keyboards/maartenwut/atom47/keymaps/junonum_a47/keymap.c Co-Authored-By: fauxpark * Update keyboards/maartenwut/atom47/keymaps/junonum_a47/keymap.c Co-Authored-By: fauxpark Co-authored-by: fauxpark --- .../atom47/keymaps/junonum_a47/keymap.c | 150 ++++++ .../atom47/keymaps/junonum_a47/readme.md | 1 + keyboards/planck/keymaps/juno/keymap.c | 444 ----------------- keyboards/planck/keymaps/juno/readme.md | 8 - keyboards/preonic/keymaps/juno/keymap.c | 313 ------------ keyboards/preonic/keymaps/juno/readme.md | 1 - keyboards/preonic/keymaps/juno/rules.mk | 0 .../vitamins_included/keymaps/juno/keymap.c | 293 ------------ .../vitamins_included/keymaps/juno/rules.mk | 16 - .../community/ortho_4x12}/juno/config.h | 0 layouts/community/ortho_4x12/juno/keymap.c | 446 ++++++++++++++++++ layouts/community/ortho_4x12/juno/readme.md | 16 + .../community/ortho_4x12}/juno/rules.mk | 8 +- .../community/ortho_4x12/junonum}/config.h | 13 +- layouts/community/ortho_4x12/junonum/keymap.c | 342 ++++++++++++++ .../community/ortho_4x12/junonum/readme.md | 11 + layouts/community/ortho_4x12/junonum/rules.mk | 16 + 17 files changed, 996 insertions(+), 1082 deletions(-) create mode 100644 keyboards/maartenwut/atom47/keymaps/junonum_a47/keymap.c create mode 100644 keyboards/maartenwut/atom47/keymaps/junonum_a47/readme.md delete mode 100644 keyboards/planck/keymaps/juno/keymap.c delete mode 100644 keyboards/planck/keymaps/juno/readme.md delete mode 100644 keyboards/preonic/keymaps/juno/keymap.c delete mode 100644 keyboards/preonic/keymaps/juno/readme.md delete mode 100644 keyboards/preonic/keymaps/juno/rules.mk delete mode 100644 keyboards/vitamins_included/keymaps/juno/keymap.c delete mode 100644 keyboards/vitamins_included/keymaps/juno/rules.mk rename {keyboards/planck/keymaps => layouts/community/ortho_4x12}/juno/config.h (100%) create mode 100644 layouts/community/ortho_4x12/juno/keymap.c create mode 100644 layouts/community/ortho_4x12/juno/readme.md rename {keyboards/planck/keymaps => layouts/community/ortho_4x12}/juno/rules.mk (70%) rename {keyboards/preonic/keymaps/juno => layouts/community/ortho_4x12/junonum}/config.h (76%) create mode 100644 layouts/community/ortho_4x12/junonum/keymap.c create mode 100644 layouts/community/ortho_4x12/junonum/readme.md create mode 100644 layouts/community/ortho_4x12/junonum/rules.mk diff --git a/keyboards/maartenwut/atom47/keymaps/junonum_a47/keymap.c b/keyboards/maartenwut/atom47/keymaps/junonum_a47/keymap.c new file mode 100644 index 000000000000..ebd52ffd032b --- /dev/null +++ b/keyboards/maartenwut/atom47/keymaps/junonum_a47/keymap.c @@ -0,0 +1,150 @@ +#include QMK_KEYBOARD_H + +/* enum custom_keycodes { + SHIFTEN = SAFE_RANGE, + LOWER, + RAISE, + SPACFNL, + SPACFNR, + MAIN, + ADJUST +}; */ + +#define _MAIN 0 +#define _SPLEFT 1 +#define _SPRIGHT 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 5 + +#define _DPAD 6 +#define _DPADNUM 7 + + +#define SHIFTEN RSFT_T(KC_ENT) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define SPACFNL LT(_SPLEFT, KC_SPC) +#define SPACFNR LT(_SPRIGHT, KC_SPC) + +#define DP_ON TO(_DPAD) +#define DP_OFF TO(_MAIN) +#define DPADNUM MO(_DPADNUM) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Primary layer + [_MAIN] = LAYOUT( + KC_ESC, 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_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTEN, + KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACFNL, SPACFNR, RAISE, KC_RALT, KC_APP, KC_RCTRL + ), + + // Main Fn navigation layer + [_SPLEFT] = LAYOUT( + _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, _______, + _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL , + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + // Primary numeric layer using right Spacebar + [_SPRIGHT] = LAYOUT( + KC_GRV, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, + _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, KC_MINUS, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQUAL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + // Secondary symbol layer, also Lower + [_LOWER] = LAYOUT( + KC_TILD, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_SLCK, KC_PAUS, + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_DLR, KC_PERC, KC_CIRC, KC_UNDS, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_EXLM, KC_AT, KC_HASH, KC_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY + ), + + // Numpad layer // Also a homage to Planck with the media player/pause button + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY + ), + + // Safety layer for special functions + [_ADJUST] = LAYOUT( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DP_ON, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_DPAD] = LAYOUT( + KC_ESC, 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_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, DPADNUM, KC_SPC, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DPADNUM] = 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_F6, _______, + _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +/* case MAIN: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_MAIN); + } + 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 ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; */ + } + return true; +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Turn capslock on + writePinLow(E6); + + + } else { + // Turn capslock off + writePinHigh(E6); + } +} diff --git a/keyboards/maartenwut/atom47/keymaps/junonum_a47/readme.md b/keyboards/maartenwut/atom47/keymaps/junonum_a47/readme.md new file mode 100644 index 000000000000..42d83702310e --- /dev/null +++ b/keyboards/maartenwut/atom47/keymaps/junonum_a47/readme.md @@ -0,0 +1 @@ +Juno's junonum keymap adapted for Atom47. \ No newline at end of file diff --git a/keyboards/planck/keymaps/juno/keymap.c b/keyboards/planck/keymaps/juno/keymap.c deleted file mode 100644 index a34a9e9480d6..000000000000 --- a/keyboards/planck/keymaps/juno/keymap.c +++ /dev/null @@ -1,444 +0,0 @@ -#include QMK_KEYBOARD_H -#include "muse.h" - -extern keymap_config_t keymap_config; - -enum planck_layers { - _QWERTY, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _PLOVER, - _ADJUST, - - _FN1, - _DPAD, - _DPADNUM -}; - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - BACKLIT, - EXT_PLV, - - FN1, - DP_ON, - DP_OFF -}; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | App | Ctrl | GUI | Alt |Lower | SpaceFn |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_planck_grid( - 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_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, RSFT_T(KC_ENT), - KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, LT(_FN1, KC_SPC), - LT(_FN1, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT -), - -/* 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT_planck_grid( - 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 , - BACKLIT, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT_planck_grid( - 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 , - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_planck_grid( - 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, 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_planck_grid( - 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 -), - -/* Plover layer (http://opensteno.org) - * ,-----------------------------------------------------------------------------------. - * | # | # | # | # | # | # | # | # | # | # | # | # | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | S | T | P | H | * | * | F | P | L | T | D | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | S | K | W | R | * | * | R | B | G | S | Z | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Exit | | | A | O | | E | U | | | | - * `-----------------------------------------------------------------------------------' - */ - -[_PLOVER] = LAYOUT_planck_grid( - KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , - XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_planck_grid( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -// Two personal additional layers below - -/* Personal custom Fn layer - * ,-----------------------------------------------------------------------------------. - * | | Vol+ | PgUp | Up | PdDn | Ins | | | Up | | PScr | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Vol- | Left | Down | Right| Home | | Left | Down |Right | | Del | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Prev | Play | Next | Brite| End | | | Vol- | Vol+ | Mute | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Caps | | | | | Space | | DP_ON| | | | - * `-----------------------------------------------------------------------------------' - */ -[_FN1] = LAYOUT_planck_grid( - _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, - _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL , - _______, KC_MPRV, KC_MPLY, KC_MNXT, BACKLIT, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, - KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______ -), - -/* DPAD layer, to activate arrow cluster at the bottom right corner - - * ,-----------------------------------------------------------------------------------. - * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | |DNUM | Space | |DP_OFF| Left | Down |Right | - * `-----------------------------------------------------------------------------------' - */ - -[_DPAD] = LAYOUT_planck_grid( - 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_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , - KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, MO(_DPADNUM), - KC_SPC, KC_SPC, LOWER, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT -), - -// Extended layer for weapon switching - -[_DPADNUM] = LAYOUT_planck_grid( - XXXXXXX, 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, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, _______, _______, XXXXXXX, MO(_DPADNUM), - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -) - - -}; - -#ifdef AUDIO_ENABLE - float plover_song[][2] = SONG(PLOVER_SOUND); - float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); - - // Borrowing audio from unused audio - // Caps Lock on and off sound too similar - - float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND); - float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND); - - float dpad_song_on[][2] = SONG(ZELDA_PUZZLE); - float dpad_song_off[][2] = SONG(SONIC_RING); -#endif - -uint32_t layer_state_set_user(uint32_t state) { - - // LED control, lighting up when Fn layer is activated - - state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); - - switch (biton32(state)) { - case _QWERTY: - backlight_set(0); - break; - case _FN1: - backlight_set(3); - break; - case _DPAD: - backlight_set(3); - break; - } - - return state; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); - 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 BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - #ifdef KEYBOARD_planck_rev5 - PORTE &= ~(1<<6); - #endif - } else { - unregister_code(KC_RSFT); - #ifdef KEYBOARD_planck_rev5 - PORTE |= (1<<6); - #endif - } - return false; - break; - case PLOVER: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(plover_song); - #endif - layer_off(_RAISE); - layer_off(_LOWER); - layer_off(_ADJUST); - layer_on(_PLOVER); - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - keymap_config.raw = eeconfig_read_keymap(); - keymap_config.nkro = 1; - eeconfig_update_keymap(keymap_config.raw); - } - return false; - break; - case EXT_PLV: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(plover_gb_song); - #endif - layer_off(_PLOVER); - } - return false; - break; - - -// Play audio upon switching Caps Lock and custom layers - - case KC_CAPS: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - if (host_keyboard_leds() & (1<event.pressed) { - - } else { - #ifdef AUDIO_ENABLE - PLAY_SONG(dpad_song_on); - #endif - - layer_off(_FN1); - layer_on(_DPAD); - } - - case DP_OFF: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(dpad_song_off); - #endif - - layer_off(_DPAD); - } - } - 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(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_update(uint8_t index, bool active) { - switch (index) { - case 0: - if (active) { - #ifdef AUDIO_ENABLE - PLAY_SONG(plover_song); - #endif - layer_on(_ADJUST); - } else { - #ifdef AUDIO_ENABLE - PLAY_SONG(plover_gb_song); - #endif - layer_off(_ADJUST); - } - break; - case 1: - if (active) { - muse_mode = true; - } else { - muse_mode = false; - #ifdef AUDIO_ENABLE - stop_all_notes(); - #endif - } - } -} - -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; - } - #endif -} - -bool music_mask_user(uint16_t keycode) { - switch (keycode) { - case RAISE: - case LOWER: - return false; - default: - return true; - } -} \ No newline at end of file diff --git a/keyboards/planck/keymaps/juno/readme.md b/keyboards/planck/keymaps/juno/readme.md deleted file mode 100644 index a93a0643d552..000000000000 --- a/keyboards/planck/keymaps/juno/readme.md +++ /dev/null @@ -1,8 +0,0 @@ -# Juno Layout -created by Juno Nguyen -juno.ngx@gmail.com - -## Feature: -* Pok3r-inspired functional layer. -* Rearranged numerics for maximum efficiency. - diff --git a/keyboards/preonic/keymaps/juno/keymap.c b/keyboards/preonic/keymaps/juno/keymap.c deleted file mode 100644 index 2e3152d299d6..000000000000 --- a/keyboards/preonic/keymaps/juno/keymap.c +++ /dev/null @@ -1,313 +0,0 @@ -/* Juno's Preonic Layout */ - -#include QMK_KEYBOARD_H - -enum preonic_layers { - _QWERTY, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _ADJUST, - - _FN1, - _DPAD -}; - -enum preonic_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT, - - FN1, - DP_ON, - DP_OFF -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* 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 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | FN1 | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_preonic_grid( \ - 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_DEL, \ - MO(_FN1),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 , \ - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |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, KC_ENT, \ - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |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, KC_ENT , \ - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, 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 | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* 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 |ISO # |ISO / | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_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_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* 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, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* Function (personal function layer) - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Vol- | | Vol+ | | | | PgUp | Up | PgDn | PScr | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | Home | Left | Down |Right | Ins | Del | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Prev | Play | Next | Brite| | End | | Vol- | Vol+ | Mute | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Caps | | Space | | DP_ON| | | | - * `-----------------------------------------------------------------------------------' - */ -[_FN1] = LAYOUT_preonic_grid( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, KC_VOLD, _______, KC_VOLU, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL , \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL , \ - KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT, BACKLIT, _______, KC_END, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_CAPS, _______, KC_SPC, KC_SPC, _______, DP_ON, _______, _______, _______ \ -), - -/* DPAD layer, for active arrow cluster at the bottom right corner - * Use TG() to enable, but FUNC() to disable (defined at end of file) - * All layers clearing required - * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | |Lower | Space |Raise |DP_OFF| Left | Down |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DPAD] = LAYOUT_preonic_grid( \ - 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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , \ - KC_LCTL, KC_LGUI, KC_LALT, _______, LOWER, KC_SPC, KC_SPC, RAISE, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT \ -) - -}; - -#ifdef AUDIO_ENABLE - float plover_song[][2] = SONG(PLOVER_SOUND); - float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); - - float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND); - float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND); - - float dpad_song_on[][2] = SONG(ZELDA_PUZZLE); - float dpad_song_off[][2] = SONG(SONIC_RING); -#endif - -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 - PORTE &= ~(1<<6); - } else { - unregister_code(KC_RSFT); - PORTE |= (1<<6); - } - return false; - break; - - - - // Additional personal custom functions - - case KC_CAPS: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - if (host_keyboard_leds() & (1<event.pressed) { - - } else { - // activated upon release - #ifdef AUDIO_ENABLE - PLAY_SONG(dpad_song_on); - #endif - - layer_off(_FN1); - layer_on(_DPAD); - } - - case DP_OFF: - if (record->event.pressed) { - // deactivated upon pressdown - #ifdef AUDIO_ENABLE - PLAY_SONG(dpad_song_off); - #endif - - //layer_off(_FN1); // do not put in this line - layer_off(_DPAD); - } - - } - return true; -}; diff --git a/keyboards/preonic/keymaps/juno/readme.md b/keyboards/preonic/keymaps/juno/readme.md deleted file mode 100644 index e911968dd964..000000000000 --- a/keyboards/preonic/keymaps/juno/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/juno/rules.mk b/keyboards/preonic/keymaps/juno/rules.mk deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/vitamins_included/keymaps/juno/keymap.c b/keyboards/vitamins_included/keymaps/juno/keymap.c deleted file mode 100644 index 5fa8b4cf7104..000000000000 --- a/keyboards/vitamins_included/keymaps/juno/keymap.c +++ /dev/null @@ -1,293 +0,0 @@ -#include QMK_KEYBOARD_H -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -#define _FN1 5 -#define _DPAD 6 -#define _DPADNUM 7 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, - - FN1, - DP_ON, - DP_OFF -}; - -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | App | Ctrl | GUI | Alt |Lower | SpaceFn |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = 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, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), \ - KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, LT(_FN1, KC_SPC), - LT(_FN1, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ -), - -/* 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 - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * |RESET | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 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_BSPC, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |RESET | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 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_BSPC, \ - 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, _______, _______, _______, _______, RESET, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | |RGB_MOD| - * `-----------------------------------------------------------------------------------' - */ - -[_ADJUST] = LAYOUT_ortho_4x12( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \ -), - -// Two personal additional layers below -// There's no brite key - -/* Function (personal function layer) - * ,-----------------------------------------------------------------------------------. - * | | Vol+ | PgUp | Up | PdDn | Ins | | | Up | | PScr | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Vol- | Left | Down | Right| Home | | Left | Down |Right | | Del | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Prev | Play | Next | | End | | | Vol- | Vol+ | Mute | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Caps | | | | | Space | | DP_ON| | | | - * `-----------------------------------------------------------------------------------' - */ - -[_FN1] = LAYOUT_ortho_4x12( \ - _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, \ - _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL, \ - _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, \ - KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______ \ -), - -/* DPAD layer, for active arrow cluster at the bottom right corner - - * ,-----------------------------------------------------------------------------------. - * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | |DNUM | Space | |DP_OFF| Left | Down |Right | - * `-----------------------------------------------------------------------------------' - */ - -[_DPAD] = 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, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , \ - KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, MO(_DPADNUM), - KC_SPC, KC_SPC, LOWER, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT \ -), - -// Extended layer for weapon switchings - -[_DPADNUM] = LAYOUT_ortho_4x12( \ - XXXXXXX, 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, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 , \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 , \ - _______, _______, _______, XXXXXXX, MO(_DPADNUM), - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ -) - -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_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 ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - - // Additional personal custom functions - - case KC_CAPS: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - if (host_keyboard_leds() & (1<event.pressed) { - - } else { - // activated upon release - #ifdef AUDIO_ENABLE - // PLAY_SONG(dpad_song_on); - #endif - - layer_off(_FN1); - layer_on(_DPAD); - } - - case DP_OFF: - if (record->event.pressed) { - // deactivated upon pressdown - #ifdef AUDIO_ENABLE - // PLAY_SONG(dpad_song_off); - #endif - - //layer_off(_FN1); // do not put in this line - layer_off(_DPAD); - } - } - return true; -} diff --git a/keyboards/vitamins_included/keymaps/juno/rules.mk b/keyboards/vitamins_included/keymaps/juno/rules.mk deleted file mode 100644 index 424b208b6613..000000000000 --- a/keyboards/vitamins_included/keymaps/juno/rules.mk +++ /dev/null @@ -1,16 +0,0 @@ -MIDI_ENABLE=no -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no - -NKRO_ENABLE = no # USB Nkey Rollover -AUDIO_ENABLE = no - -## BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) - -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 \ No newline at end of file diff --git a/keyboards/planck/keymaps/juno/config.h b/layouts/community/ortho_4x12/juno/config.h similarity index 100% rename from keyboards/planck/keymaps/juno/config.h rename to layouts/community/ortho_4x12/juno/config.h diff --git a/layouts/community/ortho_4x12/juno/keymap.c b/layouts/community/ortho_4x12/juno/keymap.c new file mode 100644 index 000000000000..a22c229e2925 --- /dev/null +++ b/layouts/community/ortho_4x12/juno/keymap.c @@ -0,0 +1,446 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + + _FN1, + _DPAD, + _DPADNUM +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV, + + DP_ON, + DP_OFF +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define SPACEFN LT(_FN1, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | App | Ctrl | GUI | Alt |Lower | SpaceFn |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = 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, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), + KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + /* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | 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 , + BACKLIT, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_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_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_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_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 + ), + + /* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + + [_PLOVER] = LAYOUT_ortho_4x12( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + // Two personal additional layers below + + /* Personal custom Fn layer + * ,-----------------------------------------------------------------------------------. + * | | Vol+ | PgUp | Up | PdDn | Ins | | | Up | | PScr | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Left | Down | Right| Home | | Left | Down |Right | | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Prev | Play | Next | Brite| End | | | Vol- | Vol+ | Mute | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | | | | | Space | | DP_ON| | | | + * `-----------------------------------------------------------------------------------' + */ + [_FN1] = LAYOUT_ortho_4x12( + _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL , + _______, KC_MPRV, KC_MPLY, KC_MNXT, BACKLIT, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______ + ), + + /* DPAD layer, to activate arrow cluster at the bottom right corner + + * ,-----------------------------------------------------------------------------------. + * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | |DNUM | Space | |DP_OFF| Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + + [_DPAD] = 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, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, MO(_DPADNUM), + KC_SPC, KC_SPC, LOWER, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT + ), + + // Extended layer for weapon switching + + [_DPADNUM] = LAYOUT_ortho_4x12( + XXXXXXX, 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, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, XXXXXXX, MO(_DPADNUM), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); + + // Borrowing audio from unused audio + // Caps Lock on and off sound too similar + + float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND); + float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND); + + float dpad_song_on[][2] = SONG(ODE_TO_JOY); + float dpad_song_off[][2] = SONG(UNICODE_WINDOWS); +#endif + +// Disable LED on Rev6 +#ifdef KEYBOARD_planck_rev6 +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#else + +layer_state_t layer_state_set_user(layer_state_t state) { + // LED control, lighting up when Fn layer is activated + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + switch (get_highest_layer(state)) { + case _QWERTY: + backlight_set(0); + break; + case _FN1: + backlight_set(3); + break; + case _DPAD: + backlight_set(3); + break; + } + return state; +} + +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + writePinHigh(E6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + + +// Play audio upon switching Caps Lock and custom layers + + case KC_CAPS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + if (host_keyboard_led_state().caps_lock) { + PLAY_SONG(caps_song_off); + } else { + PLAY_SONG(caps_song_on); + } + #endif + } + return true; + + case DP_ON: + if (record->event.pressed) { + + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_on); + #endif + + layer_off(_FN1); + layer_on(_DPAD); + } + + case DP_OFF: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_off); + #endif + + layer_off(_DPAD); + } + } + 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(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_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +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; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/layouts/community/ortho_4x12/juno/readme.md b/layouts/community/ortho_4x12/juno/readme.md new file mode 100644 index 000000000000..b8ce97ec52c2 --- /dev/null +++ b/layouts/community/ortho_4x12/juno/readme.md @@ -0,0 +1,16 @@ +# Juno's Universal ortholinear 4x12 Layout +created by Juno Nguyen + +## Features: +* **Minimal changes from the default keymap**: to minimize re-adaptation. +* **Top corner Esc**: swapped with Tab. +* **Double function ShiftEnter**: hold for Right Shift; tap for Enter. +* **Removed infrequently used keys**: Euro-specific keys. +* **Custom Fn layer**: inspired by Pok3r and refined over time. +* **SpaceFn**: the ultimate way to Fn. +* **Double arrow clusters**: both Fn + WASD and Fn + IJKL are simultaneously usable for maximum comfort. +* **Gaming-specific layer**: T-inverted arrow cluster shape; swapped Raise and Lower for easy access to numeric keys (for switching weapons in action games); standard-positioned bottom modifiers. +* **LED indicator**: lighting up when Fn or Gaming layer is activated. +* **Audio indicators**: Caps Lock and gaming layer. + +Refined since September 2017. \ No newline at end of file diff --git a/keyboards/planck/keymaps/juno/rules.mk b/layouts/community/ortho_4x12/juno/rules.mk similarity index 70% rename from keyboards/planck/keymaps/juno/rules.mk rename to layouts/community/ortho_4x12/juno/rules.mk index e9f1b1336065..cf0942b7187f 100644 --- a/keyboards/planck/keymaps/juno/rules.mk +++ b/layouts/community/ortho_4x12/juno/rules.mk @@ -1,7 +1,11 @@ -BACKLIGHT_ENABLE = yes - SRC += muse.c +ifeq ($(strip $(KEYBOARD)), planck/rev6) + BACKLIGHT_ENABLE = no +else + BACKLIGHT_ENABLE = yes +endif + MIDI_ENABLE=no RGBLIGHT_ENABLE = no MOUSEKEY_ENABLE = no # Mouse keys diff --git a/keyboards/preonic/keymaps/juno/config.h b/layouts/community/ortho_4x12/junonum/config.h similarity index 76% rename from keyboards/preonic/keymaps/juno/config.h rename to layouts/community/ortho_4x12/junonum/config.h index 6387debbb17e..23ef0e122a01 100644 --- a/keyboards/preonic/keymaps/juno/config.h +++ b/layouts/community/ortho_4x12/junonum/config.h @@ -1,7 +1,7 @@ #pragma once #ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PREONIC_SOUND) + #define STARTUP_SONG SONG(PLANCK_SOUND) // #define STARTUP_SONG SONG(NO_SOUND) #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ @@ -10,8 +10,6 @@ } #endif -#define MUSIC_MASK (keycode != KC_NO) - /* * MIDI options */ @@ -22,7 +20,6 @@ /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ - #define MIDI_BASIC /* enable advanced MIDI features: @@ -34,4 +31,10 @@ //#define MIDI_ADVANCED /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 2 \ No newline at end of file +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + +// Reduce power consumption for iOS compatibility +#define USB_MAX_POWER_CONSUMPTION 100 \ No newline at end of file diff --git a/layouts/community/ortho_4x12/junonum/keymap.c b/layouts/community/ortho_4x12/junonum/keymap.c new file mode 100644 index 000000000000..365b8ad4ef6c --- /dev/null +++ b/layouts/community/ortho_4x12/junonum/keymap.c @@ -0,0 +1,342 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + + _FN1, + _DPAD, + _DPADNUM +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV, + + DP_ON, + DP_OFF +}; + +#define SHIFTEN RSFT_T(KC_ENT) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define SPACEFN LT(_FN1, KC_SPC) +#define DPADNUM MO(_DPADNUM) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = 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, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTEN, + _______, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_COLEMAK] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, 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, SHIFTEN, + _______, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_DVORAK] = LAYOUT_ortho_4x12( + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SHIFTEN, + _______, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_DLR, KC_PERC, KC_CIRC, KC_UNDS, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_EXLM, KC_AT, KC_HASH, KC_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, KC_MINUS, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQUAL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_PLOVER] = LAYOUT_ortho_4x12( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN1] = LAYOUT_ortho_4x12( + KC_MENU, _______, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, + KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL , + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______ + ), + + // Slightly modified layer with inverted T-shaped directional pad + [_DPAD] = 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, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, DPADNUM, KC_SPC, KC_SPC, LOWER, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT + ), + + // Extended layer for weapon switching + [_DPADNUM] = LAYOUT_ortho_4x12( + XXXXXXX, 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, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, XXXXXXX, DPADNUM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); + + // Borrowing audio from unused audio + // Caps Lock on and off sound too similar + + float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND); + float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND); + + float dpad_song_on[][2] = SONG(ROCK_A_BYE_BABY); + float dpad_song_off[][2] = SONG(MAJOR_SOUND); +#endif + +// Disable LED on Rev6 +#ifdef KEYBOARD_planck_rev6 +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#else + +layer_state_t layer_state_set_user(layer_state_t state) { + // LED control, lighting up when Fn layer is activated + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + switch (get_highest_layer(state)) { + case _QWERTY: + backlight_set(0); + break; + case _FN1: + backlight_set(3); + break; + case _DPAD: + backlight_set(3); + break; + } + return state; +} + +#endif + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + writePinHigh(E6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + + +// Play audio upon switching Caps Lock and custom layers + + case KC_CAPS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + if (host_keyboard_led_state().caps_lock) { + PLAY_SONG(caps_song_off); + } else { + PLAY_SONG(caps_song_on); + } + #endif + } + return true; + + case DP_ON: + if (record->event.pressed) { + + } else { // only actived upon key release + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_on); + #endif + + layer_off(_FN1); + layer_on(_DPAD); + } + + case DP_OFF: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_off); + #endif + + layer_off(_DPAD); + } + } + 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(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_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +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; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} \ No newline at end of file diff --git a/layouts/community/ortho_4x12/junonum/readme.md b/layouts/community/ortho_4x12/junonum/readme.md new file mode 100644 index 000000000000..f6c148596da4 --- /dev/null +++ b/layouts/community/ortho_4x12/junonum/readme.md @@ -0,0 +1,11 @@ +# junonum +A universal ortholinear 4x12 keymap created by Juno Nguyen + +## Features: +* Successor to *juno* +* Numpad-like cluster for the numerics. +* ESDF and IJKL arrow cluster from SpaceFn +* Huge amount of omissions of the redundant keys. +* minimalism (not really). + +Refined since Oct 2019 \ No newline at end of file diff --git a/layouts/community/ortho_4x12/junonum/rules.mk b/layouts/community/ortho_4x12/junonum/rules.mk new file mode 100644 index 000000000000..e206273f82eb --- /dev/null +++ b/layouts/community/ortho_4x12/junonum/rules.mk @@ -0,0 +1,16 @@ +SRC += muse.c + +ifeq ($(strip $(KEYBOARD)), planck/rev6) + BACKLIGHT_ENABLE = no +else + BACKLIGHT_ENABLE = yes +endif + +MIDI_ENABLE=no +RGBLIGHT_ENABLE = no +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 + +BOOTMAGIC_ENABLE = no # mainly to save space \ No newline at end of file From 6486c7809c06ef52f305528135ee4d97f5daf1b8 Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Mon, 6 Jan 2020 23:36:00 -0500 Subject: [PATCH 163/973] Making keymaps based on userspace (#7812) * hope this works * TF working with userspace * rules for tf * Fixed changed default files * delete old keymap * revert tf68 default to default Co-authored-by: Akaash Suresh --- .../tragicforce68/keymaps/rossman360/keymap.c | 80 +------------------ .../tragicforce68/keymaps/rossman360/rules.mk | 1 + users/rossman360/rossman360.c | 26 +----- users/rossman360/rossman360.h | 27 ++++++- 4 files changed, 30 insertions(+), 104 deletions(-) create mode 100644 keyboards/keebio/tragicforce68/keymaps/rossman360/rules.mk diff --git a/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c b/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c index ef3fc729e284..127a0fd1ee41 100755 --- a/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c +++ b/keyboards/keebio/tragicforce68/keymaps/rossman360/keymap.c @@ -1,19 +1,9 @@ #include QMK_KEYBOARD_H +#include "rossman360.h" #define PGMOD LT(_MOD, KC_PGDN) #define SPCMOD LT(_MOD, KC_SPACE) #define VOLMOD LT(_MOD, KC__MUTE) -#define CMDBSP MT(MOD_LGUI, KC_BSPC) -#define ALTDEL MT(MOD_LALT, KC_DEL) -#define BWORD LCTL(KC_BSPC) -#define LWORD LCTL(KC_LEFT) -#define RWORD LCTL(KC_RIGHT) -#define JUMPBACK LSFT(KC_TAB) -#define UNDO LCTL(KC_Z) -#define XPANDR LCTL(LSFT(KC_X)) -#define NTAB LCTL(KC_T) -#define CTAB LCTL(KC_W) -#define XPANDR LCTL(LSFT(KC_X)) enum layer_names { _BASE, @@ -22,70 +12,6 @@ enum layer_names { _DEL, }; -enum custom_keycodes { - LAUNCHCLOCK = SAFE_RANGE, - CSPEAK, - SPEAK1, - SPEAK2, - SPEAK3, - SPEAK4, - PARADOWN, - WREFRESH, - PMERGE, - REMCAPS, -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { -switch (keycode) { - case CSPEAK: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); - break; - } - case SPEAK1: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_1))); - break; - } - case SPEAK2: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_2))); - } - break; - case SPEAK3: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_3))); - } - break; - case SPEAK4: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN) SS_LCTRL(SS_TAP(X_4))); - } - break; - case PARADOWN: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_PGDOWN) SS_TAP(X_ENTER) SS_TAP(X_PGDOWN)); - } - break; - case PMERGE: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_HOME) SS_TAP(X_BSPACE) SS_TAP(X_SPACE) SS_LCTRL(SS_TAP(X_BSPACE)) SS_TAP(X_SPACE)); - } - break; - case WREFRESH: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_SPACE) SS_TAP(X_BSPACE)); - } - break; - case REMCAPS: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_LCTRL(SS_TAP(X_LEFT)) SS_TAP(X_DELETE)); - } - break; - }; - return true; -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_split_space( //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ @@ -100,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CMDBSP, ALTDEL, KC_LCTRL, KC_SPACE, SPCMOD, SPCMOD, MO(_DEL), KC_LCTL, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT //└──────────┴──────────┴──────────┴──────────────────┴────────────────┴───────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ ), - + [_REV] = LAYOUT_split_space( //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ _______, _______, _______, _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, _______, _______, _______, @@ -128,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, LWORD, RWORD, LWORD, RWORD, _______, _______, _______, KC_F2 , _______ //└──────────┴──────────┴──────────┴───────────────────┴────────────────┴──────────────┴─────────────────┴──────────┴──────────┘ └────────┴────────┴────────┘ ), - + [_DEL] = LAYOUT_split_space( //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────────────┐ ┌────────┬────────┐ _______, SPEAK1, SPEAK2, SPEAK3, SPEAK4, _______,_______, _______,_______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/keebio/tragicforce68/keymaps/rossman360/rules.mk b/keyboards/keebio/tragicforce68/keymaps/rossman360/rules.mk new file mode 100644 index 000000000000..4c2b0289a2da --- /dev/null +++ b/keyboards/keebio/tragicforce68/keymaps/rossman360/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = atmel-dfu diff --git a/users/rossman360/rossman360.c b/users/rossman360/rossman360.c index ade1b630a828..a1c4ad8f9f59 100644 --- a/users/rossman360/rossman360.c +++ b/users/rossman360/rossman360.c @@ -4,35 +4,11 @@ void my_custom_function(void) { } -#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) -#define CMDBSP MT(MOD_LGUI, KC_BSPC) -#define ALTDEL MT(MOD_LALT, KC_DEL) -#define CTRLSP MT(MOD_LCTL, KC_SPACE) -#define BWORD LCTL(KC_BSPC) -#define JUMPBACK LSFT(KC_TAB) -#define LWORD LCTL(KC_LEFT) -#define RWORD LCTL(KC_RIGHT) -#define UNDO LCTL(KC_Z) -#define NTAB LCTL(KC_T) -#define CTAB LCTL(KC_W) -#define XPANDR LCTL(LSFT(KC_X)) -#define TAB1 LCTL(KC_1) -#define TAB2 LCTL(KC_2) -#define TAB3 LCTL(KC_3) -#define TAB4 LCTL(KC_4) -#define RVOLU LCTL(KC_RBRC) -#define RVOLD LCTL(KC_LBRC) - __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader diff --git a/users/rossman360/rossman360.h b/users/rossman360/rossman360.h index 4c3e01a99d65..e5629e20edf2 100644 --- a/users/rossman360/rossman360.h +++ b/users/rossman360/rossman360.h @@ -1,6 +1,29 @@ #pragma once - #include "quantum.h" -void my_custom_function(void); +#define BWORD LCTL(KC_BSPC) +#define LWORD LCTL(KC_LEFT) +#define RWORD LCTL(KC_RIGHT) +#define JUMPBACK LSFT(KC_TAB) +#define UNDO LCTL(KC_Z) +#define XPANDR LCTL(LSFT(KC_X)) +#define NTAB LCTL(KC_T) +#define CTAB LCTL(KC_W) +#define XPANDR LCTL(LSFT(KC_X)) +#define CMDBSP MT(MOD_LGUI, KC_BSPC) +#define ALTDEL MT(MOD_LALT, KC_DEL) + +// Define all of +enum custom_keycodes { + KC_MAKE = SAFE_RANGE, + CSPEAK, + SPEAK1, + SPEAK2, + SPEAK3, + SPEAK4, + PARADOWN, + WREFRESH, + PMERGE, + REMCAPS, +}; From 10d18820d2f182dd83b69a6f024edbdf8d5d4328 Mon Sep 17 00:00:00 2001 From: gtips <51393966+gtips@users.noreply.github.com> Date: Tue, 7 Jan 2020 15:23:32 +0900 Subject: [PATCH 164/973] [Keyboard] Add keyboard Reviung41 (#7807) * [Keyboard] Add keyboard Reviung41 * Modified files * deleted keyboards/reviung41/keymaps/default/config.h * modified keyboards/rebiung41/keymaps/default/keymap.c * modified keyboards/reviung41/readme.md * modified keyboards/reviung41/readme.md * modified keyboards/reviung41/readme.md --- keyboards/reviung41/config.h | 251 ++++++++++++++++++ keyboards/reviung41/info.json | 0 keyboards/reviung41/keymaps/default/keymap.c | 62 +++++ keyboards/reviung41/keymaps/default/readme.md | 1 + keyboards/reviung41/readme.md | 15 ++ keyboards/reviung41/reviung41.c | 16 ++ keyboards/reviung41/reviung41.h | 42 +++ keyboards/reviung41/rules.mk | 33 +++ 8 files changed, 420 insertions(+) create mode 100644 keyboards/reviung41/config.h create mode 100644 keyboards/reviung41/info.json create mode 100644 keyboards/reviung41/keymaps/default/keymap.c create mode 100644 keyboards/reviung41/keymaps/default/readme.md create mode 100644 keyboards/reviung41/readme.md create mode 100644 keyboards/reviung41/reviung41.c create mode 100644 keyboards/reviung41/reviung41.h create mode 100644 keyboards/reviung41/rules.mk diff --git a/keyboards/reviung41/config.h b/keyboards/reviung41/config.h new file mode 100644 index 000000000000..26ecc142da2b --- /dev/null +++ b/keyboards/reviung41/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2020 gtips + +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 0xDCCB +#define DEVICE_VER 0x0001 +#define MANUFACTURER gtips +#define PRODUCT reviung41 +#define DESCRIPTION A 41-key keyboard + +/* key matrix size */ +#define MATRIX_ROWS 7 +#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 } +#define MATRIX_COL_PINS \ + { D4, C6, D7, E6, B4, B5 } +#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 D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 11 + #define RGBLIGHT_HUE_STEP 16 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 16 + #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/reviung41/info.json b/keyboards/reviung41/info.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/reviung41/keymaps/default/keymap.c b/keyboards/reviung41/keymaps/default/keymap.c new file mode 100644 index 000000000000..4231e4896b5f --- /dev/null +++ b/keyboards/reviung41/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2020 gtips + * + * 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, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung41( + 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, RSFT_T(KC_ENT), + KC_LALT, LOWER, KC_SPC, RAISE, KC_RGUI + ), + + [_LOWER] = LAYOUT_reviung41( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_GRV, KC_TILD, + _______, KC_ESC, KC_LGUI, KC_LALT, KC_CAPS, KC_DQUO, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_PSCR, RSFT_T(KC_SPC), + _______, _______, KC_ENT, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung41( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, KC_ESC, KC_RGUI, KC_RALT, KC_CAPS, KC_QUOT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, KC_BSPC, _______, _______ + ), + + [_ADJUST] = LAYOUT_reviung41( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, XXXXXXX, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/keyboards/reviung41/keymaps/default/readme.md b/keyboards/reviung41/keymaps/default/readme.md new file mode 100644 index 000000000000..7e8120413e43 --- /dev/null +++ b/keyboards/reviung41/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung41 diff --git a/keyboards/reviung41/readme.md b/keyboards/reviung41/readme.md new file mode 100644 index 000000000000..49b27bd94f0c --- /dev/null +++ b/keyboards/reviung41/readme.md @@ -0,0 +1,15 @@ +# reviung41 + +![reviung41](https://github.com/gtips/reviung/blob/master/reviung41/image/REVIUNG41-prototype.jpg) + +The REVIUNG41 is 41-key column staggered keyboard. + +* Keyboard Maintainer: [gtips](https://github.com/gtips) +* Hardware Supported: REVIUNG41 PCBs, Pro Micro supported +* Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung/tree/master/reviung41) + +Make example for this keyboard (after setting up your build environment): + + make reviung41: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/reviung41/reviung41.c b/keyboards/reviung41/reviung41.c new file mode 100644 index 000000000000..05bb42160a06 --- /dev/null +++ b/keyboards/reviung41/reviung41.c @@ -0,0 +1,16 @@ +/* Copyright 2020 gtips + * + * 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 "reviung41.h" diff --git a/keyboards/reviung41/reviung41.h b/keyboards/reviung41/reviung41.h new file mode 100644 index 000000000000..6bc80e8b2135 --- /dev/null +++ b/keyboards/reviung41/reviung41.h @@ -0,0 +1,42 @@ +/* Copyright 2020 gtips + * + * 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_reviung41( \ + K00, K01, K02, K03, K04, K05, K30, K31, K32, K33, K34, K35, \ + K10, K11, K12, K13, K14, K15, K40, K41, K42, K43, K44, K45, \ + K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K54, K55, \ + K60, K61, K62, K63, K64 \ +) \ +{ \ + { 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, KC_NO } \ +} diff --git a/keyboards/reviung41/rules.mk b/keyboards/reviung41/rules.mk new file mode 100644 index 000000000000..983d574a313e --- /dev/null +++ b/keyboards/reviung41/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 = 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 From 004ef3fad783832a5b61baa331b45ef5ce67fb9b Mon Sep 17 00:00:00 2001 From: Karol Samborski Date: Tue, 7 Jan 2020 08:57:58 +0100 Subject: [PATCH 165/973] [Keymap] New levinson keymap (#7613) * Vim oriented scheme * Meta on both sides * Removed unused staff * Changed dynamic macro codes to the built ones * Fixed formatting --- .../levinson/keymaps/ksamborski/config.h | 27 ++++ .../levinson/keymaps/ksamborski/keymap.c | 151 ++++++++++++++++++ .../levinson/keymaps/ksamborski/rules.mk | 3 + 3 files changed, 181 insertions(+) create mode 100644 keyboards/keebio/levinson/keymaps/ksamborski/config.h create mode 100644 keyboards/keebio/levinson/keymaps/ksamborski/keymap.c create mode 100644 keyboards/keebio/levinson/keymaps/ksamborski/rules.mk diff --git a/keyboards/keebio/levinson/keymaps/ksamborski/config.h b/keyboards/keebio/levinson/keymaps/ksamborski/config.h new file mode 100644 index 000000000000..7a21830f2da1 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/ksamborski/config.h @@ -0,0 +1,27 @@ +/* +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 + +/* Select hand configuration */ +#define MASTER_LEFT + +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 + diff --git a/keyboards/keebio/levinson/keymaps/ksamborski/keymap.c b/keyboards/keebio/levinson/keymaps/ksamborski/keymap.c new file mode 100644 index 000000000000..4fc77fb8308b --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/ksamborski/keymap.c @@ -0,0 +1,151 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QW, + _LW, + _RS, + _AD, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + MKITPNK +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | Q | W | E | R | T | | Y | U | I | O | P | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G | | H | J | K | L | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | \ | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | | Meta | Alt | Lower| Enter| | Space| Raise| Alt | Meta | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_QW] = 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 , 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_BSPC, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_BSLS, KC_EQL , + KC_LCTL , _______, KC_LGUI, KC_LALT, LOWER , KC_ENT , KC_SPC , RAISE , KC_RALT, KC_LGUI, _______, _______ + ), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | , | 1 | 2 | 3 | + | - | | { | } | ( | ) | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | . | 4 | 5 | 6 | # | * | | F1 | F2 | F3 | F4 | F5 | F6 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| 7 | 8 | 9 | / | = | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | 0 | |Adjust| | | | RAISE| | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_RS] = LAYOUT_ortho_4x12( + KC_COMM , KC_1 , KC_2 , KC_3 , KC_PLUS, KC_MINS, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, _______, _______, + KC_DOT , KC_4 , KC_5 , KC_6 , KC_HASH, KC_ASTR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , + KC_LSFT , KC_7 , KC_8 , KC_9 , KC_SLSH, KC_EQL , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , + _______ , _______, KC_0 , _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | ! | @ | # | $ | % | | Home| PgDn| PgUp| End | ( | ) | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Vol+ | Mute | Play | | Ins | | Left| Down| Up | Right| { | } | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Vol- | < M | M > | | | | ^ | & | * | ' | [ | ] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | |LOWER | | | Shift|Adjust| | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_LW] = LAYOUT_ortho_4x12( + KC_GRV , KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_HOME , KC_PGDN, KC_PGUP, KC_END , KC_LPRN, KC_RPRN, + _______ , KC_VOLU, KC_MUTE, KC_MPLY, _______, KC_INS , KC_LEFT , KC_DOWN, KC_UP , KC_RIGHT, KC_LCBR, KC_RCBR, + _______ , KC_VOLD, KC_MPRV, KC_MNXT, _______, _______, KC_CIRC , KC_AMPR, KC_ASTR, KC_QUOT , KC_LBRC, KC_RBRC , + _______ , _______, _______, _______, _______, _______, KC_LSFT , _______, _______, _______ , _______, _______ + ), + +/* Adjust + * ,-----------------------------------------. ,-----------------------------------------. + * | Reset| | Up | | | Rec1 | | Rec2 | Plain| Snake|Gradnt| | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Caps | Left | Down | Right|MkItPk| Play1| | Play2| RGB | HUE+ | SAT+ | BRI+ | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | Stop1| | Stop2| MODE | HUE- | SAT- | BRI- | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_AD] = LAYOUT_ortho_4x12( + RESET , XXXXXXX, KC_UP , XXXXXXX, XXXXXXX, DM_REC1, DM_REC2, RGB_M_P, RGB_M_SN,RGB_M_G, XXXXXXX, KC_DEL , + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, MKITPNK, DM_PLY1, DM_PLY2, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DM_RSTP, DM_RSTP, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void make_it_pink_blue(void) { + uint16_t blue_hue = 210; + uint16_t pink_hue = 315; + + /* key is pressed */ + uint16_t hue = rgblight_get_hue(); + uint8_t sat = rgblight_get_sat(); + uint8_t val = rgblight_get_val(); + + if (hue != blue_hue) + rgblight_sethsv(blue_hue, sat, val); + else + rgblight_sethsv(pink_hue, sat, val); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QW); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LW); + update_tri_layer(_LW, _RS, _AD); + } else { + layer_off(_LW); + update_tri_layer(_LW, _RS, _AD); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RS); + update_tri_layer(_LW, _RS, _AD); + } else { + layer_off(_RS); + update_tri_layer(_LW, _RS, _AD); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_AD); + } else { + layer_off(_AD); + } + return false; + break; + case MKITPNK: + if (record->event.pressed) + make_it_pink_blue(); + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/levinson/keymaps/ksamborski/rules.mk b/keyboards/keebio/levinson/keymaps/ksamborski/rules.mk new file mode 100644 index 000000000000..1ce3f222fdd4 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/ksamborski/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE=yes +BOOTMAGIC_ENABLE=no +DYNAMIC_MACRO_ENABLE=yes From 957b8f553caa654a971e3b63cf2c4281b92cf601 Mon Sep 17 00:00:00 2001 From: Robert Snyder Date: Tue, 7 Jan 2020 16:23:47 -0500 Subject: [PATCH 166/973] [Keyboard] add info.json for dactyl_promicro (#6993) * add info.json for dactyl_promicro * tabs to spaces reformat dactyl_promicro to match the LAYOUT_6x6 changed the default map to match dactyl --- .../dactyl_promicro/dactyl_promicro.h | 49 ++++++----- keyboards/handwired/dactyl_promicro/info.json | 83 +++++++++++++++++++ .../dactyl_promicro/keymaps/default/keymap.c | 75 +++++++++-------- 3 files changed, 147 insertions(+), 60 deletions(-) create mode 100644 keyboards/handwired/dactyl_promicro/info.json diff --git a/keyboards/handwired/dactyl_promicro/dactyl_promicro.h b/keyboards/handwired/dactyl_promicro/dactyl_promicro.h index 5dfc42f2a94c..61dad7f5386e 100644 --- a/keyboards/handwired/dactyl_promicro/dactyl_promicro.h +++ b/keyboards/handwired/dactyl_promicro/dactyl_promicro.h @@ -2,38 +2,37 @@ #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif #define LAYOUT_6x6(\ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \ - L55, L51, L52, R53, R54, R50, \ - L53, R52, \ - L54, R51 \ - )\ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { L40, L41, L42, L43, L44, L45 }, \ - { KC_NO, L51, L52, L53, L54, L55 }, \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \ + L55, L51, L52, R53, R54, R50, \ + L53, R52, \ + L54, R51 \ + )\ + {\ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { KC_NO, L51, L52, L53, L54, L55 }, \ \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { R40, R41, R42, R43, R44, R45 }, \ - { R50, R51, R52, R53, R54, KC_NO }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 }, \ + { R50, R51, R52, R53, R54, KC_NO } \ } diff --git a/keyboards/handwired/dactyl_promicro/info.json b/keyboards/handwired/dactyl_promicro/info.json new file mode 100644 index 000000000000..7d70e9a60f2f --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Dactyl ProMicro", + "url": "", + "maintainer": "qmk", + "width": 17, + "height": 8, + "layouts": { + "LAYOUT_6x6": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":11, "y":0}, + {"label":"R01", "x":12, "y":0}, + {"label":"R02", "x":13, "y":0}, + {"label":"R03", "x":14, "y":0}, + {"label":"R04", "x":15, "y":0}, + {"label":"R05", "x":16, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":11, "y":1}, + {"label":"R11", "x":12, "y":1}, + {"label":"R12", "x":13, "y":1}, + {"label":"R13", "x":14, "y":1}, + {"label":"R14", "x":15, "y":1}, + {"label":"R15", "x":16, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":11, "y":2}, + {"label":"R21", "x":12, "y":2}, + {"label":"R22", "x":13, "y":2}, + {"label":"R23", "x":14, "y":2}, + {"label":"R24", "x":15, "y":2}, + {"label":"R25", "x":16, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"R30", "x":11, "y":3}, + {"label":"R31", "x":12, "y":3}, + {"label":"R32", "x":13, "y":3}, + {"label":"R33", "x":14, "y":3}, + {"label":"R34", "x":15, "y":3}, + {"label":"R35", "x":16, "y":3}, + {"label":"L40", "x":0, "y":4}, + {"label":"L41", "x":1, "y":4}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":3, "y":4}, + {"label":"L44", "x":4, "y":4}, + {"label":"L45", "x":5, "y":6, "h":2}, + {"label":"R40", "x":11, "y":6, "h":2 }, + {"label":"R41", "x":12, "y":4}, + {"label":"R42", "x":13, "y":4}, + {"label":"R43", "x":14, "y":4}, + {"label":"R44", "x":15, "y":4}, + {"label":"R45", "x":16, "y":4}, + {"label":"L55", "x":6, "y":6, "h":2 }, + {"label":"L51", "x":6, "y":5}, + {"label":"L52", "x":7, "y":5}, + {"label":"R53", "x":9, "y":5}, + {"label":"R54", "x":10, "y":5}, + {"label":"R50", "x":10, "y":6, "h":2 }, + {"label":"L53", "x":7, "y":6}, + {"label":"R52", "x":9, "y":6}, + {"label":"L54", "x":7, "y":7}, + {"label":"R51", "x":9, "y":7} + ] + } + } +} diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c index 394803aef5c9..298cddfd0a16 100644 --- a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c @@ -1,6 +1,3 @@ - -/* A QWERTY 3 Layer layout for the Dactyl Manuform 6x6 Keyboard */ - #include QMK_KEYBOARD_H @@ -11,36 +8,44 @@ #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - - [_QWERTY] = LAYOUT_6x6( - 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, - 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_LCTL , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM , KC_DOT ,KC_SLSH,KC_BSLASH, - KC_PLUS , KC_LEFT,KC_UP ,KC_DOWN, KC_RGHT, RAISE , LOWER , KC_HOME, KC_PGUP, KC_PGDN,KC_END ,KC_EQL, - _______,KC_LALT,KC_PSCR, KC_LGUI, KC_SPC, KC_ENT,KC_GRAVE, KC_AT ,KC_PSCR ,_______ - - ), +#define ONE_GRV LT(1,KC_GRAVE) +#define CTL_Z LCTL_T(KC_Z) +#define ALT_SHFT LALT(KC_LSFT) +#define ALT_MENU LALT_T(KC_MENU) +#define LG_QUOT LGUI_T(KC_QUOT) +#define CTL_ESC LCTL_T(KC_ESC) +#define CTL_SLS LCTL_T(KC_SLSH) +#define LT2_COL LT(_RAISE, KC_SCLN) - - [_LOWER] = LAYOUT_6x6( - 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_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, - _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, - _______,_______,_______,_______,_______,KC_PSCR, KC_P0 , KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, - _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ -), - - [_RAISE] = LAYOUT_6x6( - KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , - _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, - _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, - _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ - ), - - }; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_6x6( + KC_EQL , KC_1 ,KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, + KC_DEL , KC_Q ,KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, + KC_BSPC, KC_A ,KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,LT2_COL,LG_QUOT, + KC_LSFT, CTL_Z ,KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM, KC_DOT,CTL_SLS,KC_RSFT, + ONE_GRV,KC_QUOT,ALT_SHFT,KC_LEFT,KC_RGHT,KC_SPC , KC_ENT , KC_UP ,KC_DOWN,KC_LBRC,KC_RBRC,TT(_LOWER), + KC_BSPC,ALT_MENU,KC_LGUI, KC_RALT,CTL_ESC,KC_TAB , + KC_HOME, KC_PGUP, + KC_END , KC_PGDN + ), + [_LOWER] = LAYOUT_6x6( + _______,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + _______,KC_EXLM,KC_AT ,KC_LBRC,KC_RBRC,KC_PIPE, KC_UP ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PAST,KC_F12 , + _______,KC_HASH,KC_DLR ,KC_LPRN,KC_RPRN,KC_GRV , KC_DOWN,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS,_______, + _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD, KC_AMPR,KC_P1 ,KC_P2 ,KC_P3 ,KC_PSLS,_______, + RESET ,_______,_______,_______,_______,_______, _______,_______,KC_PDOT,KC_P0 ,KC_PEQL,_______, + _______,_______,_______, _______,_______,_______, + _______, _______, + _______, _______ + ), + [_RAISE] = LAYOUT_6x6( + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,KC_MS_U,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,KC_MS_L,KC_MS_D,KC_MS_R,_______, _______,_______,_______,_______,_______,KC_MPLY, + _______,_______,_______,_______,_______,_______, _______,_______,KC_MPRV,KC_MNXT,_______,_______, + RESET ,_______,_______,KC_BTN1,KC_BTN2,_______, KC_WBAK,KC_VOLU,KC_VOLD,KC_MUTE,_______,_______, + _______,_______,_______, _______,_______,_______, + _______, _______, + _______, _______ + ) +}; From cf30c5d17f2a447e7e43a4af8941ac0271c5b44c Mon Sep 17 00:00:00 2001 From: Rob Haswell Date: Tue, 7 Jan 2020 21:25:17 +0000 Subject: [PATCH 167/973] RGB matrix effect - left-right gradient (#7742) * Left-right gradient. * Update the comment to match the new functionality. * CPP does integer division so this round is not necessary. * The x-range is actually 224, update comment and use bit-shifting again. * Update docs with gradient left-right effect and associated "DISABLE" option. --- docs/feature_rgb_matrix.md | 1 + keyboards/crkbd/keymaps/dsanchezseco/config.h | 1 + .../gradient_left_right_anim.h | 22 +++++++++++++++++++ .../rgb_matrix_effects.inc | 1 + 4 files changed, 25 insertions(+) create mode 100644 quantum/rgb_matrix_animations/gradient_left_right_anim.h diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 5695acc50812..92fd62b32a1b 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -199,6 +199,7 @@ enum rgb_matrix_effects { RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes + RGB_MATRIX_GRADIENT_LEFT_RIGHT, // Static gradient left to right, speed controls how much gradient changes RGB_MATRIX_BREATHING, // Single hue brightness cycling animation RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right diff --git a/keyboards/crkbd/keymaps/dsanchezseco/config.h b/keyboards/crkbd/keymaps/dsanchezseco/config.h index 14efb7d4ec6d..033173defb6a 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/config.h +++ b/keyboards/crkbd/keymaps/dsanchezseco/config.h @@ -36,6 +36,7 @@ along with this program. If not, see . //disable effects #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_CYCLE_LEFT_RIGHT // Static gradient left to right speed controls how much gradient changes #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 diff --git a/quantum/rgb_matrix_animations/gradient_left_right_anim.h b/quantum/rgb_matrix_animations/gradient_left_right_anim.h new file mode 100644 index 000000000000..2eab2eb7594f --- /dev/null +++ b/quantum/rgb_matrix_animations/gradient_left_right_anim.h @@ -0,0 +1,22 @@ +#ifndef DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +RGB_MATRIX_EFFECT(GRADIENT_LEFT_RIGHT) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool GRADIENT_LEFT_RIGHT(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = rgb_matrix_config.hsv; + uint8_t scale = scale8(64, rgb_matrix_config.speed); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + // The x range will be 0..224, map this to 0..7 + // Relies on hue being 8-bit and wrapping + hsv.h = rgb_matrix_config.hsv.h + (scale * g_led_config.point[i].x >> 5); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc index 01332ed0dda6..4c1723d93325 100644 --- a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc +++ b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc @@ -2,6 +2,7 @@ #include "rgb_matrix_animations/solid_color_anim.h" #include "rgb_matrix_animations/alpha_mods_anim.h" #include "rgb_matrix_animations/gradient_up_down_anim.h" +#include "rgb_matrix_animations/gradient_left_right_anim.h" #include "rgb_matrix_animations/breathing_anim.h" #include "rgb_matrix_animations/colorband_sat_anim.h" #include "rgb_matrix_animations/colorband_val_anim.h" From b69457a192374522de9662a219165ddfdd83afc2 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Tue, 7 Jan 2020 13:54:08 -0800 Subject: [PATCH 168/973] More minor tweaks. (#7813) Made the MACLOCK key easier tu use by putting it on right thumb cluster as well. --- keyboards/kinesis/keymaps/xyverz/keymap.c | 6 +++--- keyboards/kinesis/keymaps/xyverz/readme.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index cade953acd76..18fdb2e08fbb 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -99,11 +99,11 @@ enum custom_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, KEYPAD }; | |QWERTY|Colemk|Dvorak| | | | KP . |KP Ent| `---------------------------' `---------------------------' ,-------------.,-------------. - | | || | | + | | || |MacLck| ,------|------|------||------+------+------. | | | || | | | | | |------||------| | KP 0 | - | | | || | | | + | | |MacLck|| | | | `--------------------'`--------------------' */ @@ -208,7 +208,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, KC_PDOT, KC_PENT, // Right Thumb - _______, _______, + _______, MACLOCK, _______, _______, _______, KC_P0 ) diff --git a/keyboards/kinesis/keymaps/xyverz/readme.md b/keyboards/kinesis/keymaps/xyverz/readme.md index 556cae8d4c4d..702af4474a29 100644 --- a/keyboards/kinesis/keymaps/xyverz/readme.md +++ b/keyboards/kinesis/keymaps/xyverz/readme.md @@ -101,7 +101,7 @@ Removed the Media layer 2018-12-07 | |QWERTY|Colemk|Dvorak| | | | KP . |KP Ent| `---------------------------' `---------------------------' ,-------------.,-------------. - | | || | | + | | || |MacLck| ,------|------|------||------+------+------. | | | || | | | | | |------||------| | KP 0 | From 0c86cfeaed23377862356326c0f26191f74d899f Mon Sep 17 00:00:00 2001 From: Jesse Leventhal <45154268+jessel92@users.noreply.github.com> Date: Tue, 7 Jan 2020 17:29:45 -0500 Subject: [PATCH 169/973] [Keyboard] Added NCC-1701-KB 3x3 Keypad with Encoder and Keymap (#7819) * Added NCC-1701-KB Keypad and Keymap * Update keyboards/ncc1701kb/config.h * Update keyboards/ncc1701kb/config.h * Update keyboards/ncc1701kb/config.h * Update keyboards/ncc1701kb/config.h * Update keyboards/ncc1701kb/ncc1701kb.h * Update keyboards/ncc1701kb/readme.md * Update keyboards/ncc1701kb/readme.md * Update keyboards/ncc1701kb/readme.md * Fixed changes rules.mk bootloader * Fixed rules.mk Build Options * Recomended fauxpark changes/fixes * Update keyboards/ncc1701kb/ncc1701kb.h * Update keyboards/ncc1701kb/ncc1701kb.h * Update keyboards/ncc1701kb/readme.md * Update keyboards/ncc1701kb/readme.md --- keyboards/ncc1701kb/config.h | 53 ++++++++++++++++++++ keyboards/ncc1701kb/info.json | 12 +++++ keyboards/ncc1701kb/keymaps/default/keymap.c | 51 +++++++++++++++++++ keyboards/ncc1701kb/ncc1701kb.c | 1 + keyboards/ncc1701kb/ncc1701kb.h | 14 ++++++ keyboards/ncc1701kb/readme.md | 17 +++++++ keyboards/ncc1701kb/rules.mk | 34 +++++++++++++ 7 files changed, 182 insertions(+) create mode 100644 keyboards/ncc1701kb/config.h create mode 100644 keyboards/ncc1701kb/info.json create mode 100644 keyboards/ncc1701kb/keymaps/default/keymap.c create mode 100644 keyboards/ncc1701kb/ncc1701kb.c create mode 100644 keyboards/ncc1701kb/ncc1701kb.h create mode 100644 keyboards/ncc1701kb/readme.md create mode 100644 keyboards/ncc1701kb/rules.mk diff --git a/keyboards/ncc1701kb/config.h b/keyboards/ncc1701kb/config.h new file mode 100644 index 000000000000..71978858ec21 --- /dev/null +++ b/keyboards/ncc1701kb/config.h @@ -0,0 +1,53 @@ +/* +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 0x1701 +#define DEVICE_VER 0x0001 +#define MANUFACTURER J2L Designs +#define PRODUCT NCC1701KB +#define DESCRIPTION J2L NCC1701KB + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* NCC-1701-KB PCB default pin-out */ +#define MATRIX_ROW_PINS { D4, D6, D7 } +#define MATRIX_COL_PINS { B4, B5, B6 } +#define UNUSED_PINS + +/* BackLight */ +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/*Encoders */ +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D1 } + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +#define TAPPING_TERM 200 diff --git a/keyboards/ncc1701kb/info.json b/keyboards/ncc1701kb/info.json new file mode 100644 index 000000000000..bc0f04db1686 --- /dev/null +++ b/keyboards/ncc1701kb/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "NCC-1701-KB", + "url": "", + "maintainer": "jessel92", + "width": 3, + "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}] + } + } +} diff --git a/keyboards/ncc1701kb/keymaps/default/keymap.c b/keyboards/ncc1701kb/keymaps/default/keymap.c new file mode 100644 index 000000000000..a3e3d819fda5 --- /dev/null +++ b/keyboards/ncc1701kb/keymaps/default/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 (VOLUME CONTROL) + * |-------+-------+-------| + * | 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_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} \ No newline at end of file diff --git a/keyboards/ncc1701kb/ncc1701kb.c b/keyboards/ncc1701kb/ncc1701kb.c new file mode 100644 index 000000000000..b654ece5ac3b --- /dev/null +++ b/keyboards/ncc1701kb/ncc1701kb.c @@ -0,0 +1 @@ +#include "ncc1701kb.h" diff --git a/keyboards/ncc1701kb/ncc1701kb.h b/keyboards/ncc1701kb/ncc1701kb.h new file mode 100644 index 000000000000..639adc409d67 --- /dev/null +++ b/keyboards/ncc1701kb/ncc1701kb.h @@ -0,0 +1,14 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ +} diff --git a/keyboards/ncc1701kb/readme.md b/keyboards/ncc1701kb/readme.md new file mode 100644 index 000000000000..4e9ece7532ee --- /dev/null +++ b/keyboards/ncc1701kb/readme.md @@ -0,0 +1,17 @@ +# NCC-1701-KB Keypad with Encoder + +![NCC-1701-KB PCB](https://i.imgur.com/aXFgH52.jpg) +![NCC-1701-KB](https://i.imgur.com/9hWyhcR.jpg) + +The NCC-1701-KB Keypad is a custom Star Trek-inspired 3x3 mechanical keypad with an encoder knob. + +* Keyboard Maintainer: [J2L Designs](https://github.com/jessel92) +* Hardware Supported: NCC-1701-KB PCB, ATmega32U4 +* Hardware Availability: [J2L Designs Store](https://www.etsy.com/listing/752039967/ncc-1701-kb-custom-star-trek-inspired) + +Make example for this keyboard (after setting up your build environment): + + make ncc1701kb: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/ncc1701kb/rules.mk b/keyboards/ncc1701kb/rules.mk new file mode 100644 index 000000000000..791d82b401fc --- /dev/null +++ b/keyboards/ncc1701kb/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 = 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 = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI controls +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +API_SYSEX_ENABLE = yes +TAP_DANCE_ENABLE = no +ENCODER_ENABLE = yes \ No newline at end of file From 0027a0a94874302644fa466ff074091ecc9c7b0b Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 7 Jan 2020 16:17:01 -0800 Subject: [PATCH 170/973] Tada68 Fixes and Minor Refactoring (#7820) * fix ANSI layout macro reference * update ISO layout macro and enable 65_iso community layout support - rename to LAYOUT_65_iso (with LAYOUT_iso alias for backwards compatibility) - rename position k2c to k1d (electrical position) * rules.mk templating * tada68.h: use #pragma once include guard * config.h: use #pragma once include guard * make product id unique * update info.json * update readme * cleanup default keymap - keycode alignment - layout macro reference - four-space indent * remove matrix_*_user functions from tada68.h --- keyboards/tada68/config.h | 7 +- keyboards/tada68/info.json | 259 ++++++++++++++++++++-- keyboards/tada68/keymaps/default/keymap.c | 78 +++---- keyboards/tada68/readme.md | 11 +- keyboards/tada68/rules.mk | 33 +-- keyboards/tada68/tada68.h | 18 +- 6 files changed, 312 insertions(+), 94 deletions(-) diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index a8fa37a5b70a..89ed8c31133e 100755 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -15,14 +15,13 @@ 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 PRODUCT_ID 0x4C17 #define DEVICE_VER 0x0003 #define MANUFACTURER TADA #define PRODUCT TADA68 @@ -75,5 +74,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/tada68/info.json b/keyboards/tada68/info.json index bfb3d9e1ed5d..32047fcf11db 100644 --- a/keyboards/tada68/info.json +++ b/keyboards/tada68/info.json @@ -1,23 +1,242 @@ { - "keyboard_name": "Tada68", - "url": "", - "maintainer": "qmk", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT_ansi": { - "key_count": 68, - "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}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - }, - - "LAYOUT_iso": { - "key_count": 69, - "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":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0, "w":2}, {"label":"k0e", "x":15, "y":0}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1e", "x":15, "y":1}, {"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}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"k2e", "x":15, "y":2}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3c", "x":12.25, "y":3, "w":1.75}, {"label":"k3d", "x":14, "y":3}, {"label":"k3e", "x":15, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k49", "x":10, "y":4}, {"label":"k4a", "x":11, "y":4}, {"label":"k4b", "x":12, "y":4}, {"label":"k4c", "x":13, "y":4}, {"label":"k4d", "x":14, "y":4}, {"label":"k4e", "x":15, "y":4}] - }, - - "LAYOUT_ansi_split_enter": { - "key_count": 69, - "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":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0, "w":2}, {"label":"k0e", "x":15, "y":0}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"label":"k1e", "x":15, "y":1}, {"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}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":2, "w":1.25}, {"label":"k2e", "x":15, "y":2}, {"label":"k30", "x":0, "y":3, "w":2.25}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3c", "x":12.25, "y":3, "w":1.75}, {"label":"k3d", "x":14, "y":3}, {"label":"k3e", "x":15, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k49", "x":10, "y":4}, {"label":"k4a", "x":11, "y":4}, {"label":"k4b", "x":12, "y":4}, {"label":"k4c", "x":13, "y":4}, {"label":"k4d", "x":14, "y":4}, {"label":"k4e", "x":15, "y":4}] + "keyboard_name": "Tada68", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "key_count": 68, + "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":"~", "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":"Delete", "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 Up", "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":"Page Down", "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}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4}, + {"label":"Fn", "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_iso": { + "key_count": 69, + "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":"~", "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":"Delete", "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":"Page Up", "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":"Page Down", "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}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4}, + {"label":"Fn", "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_ansi_split_enter": { + "key_count": 69, + "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":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0, "w":2}, + {"label":"k0e", "x":15, "y":0}, + + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k1d", "x":13.5, "y":1, "w":1.5}, + {"label":"k1e", "x":15, "y":1}, + + {"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}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2c", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":2, "w":1.25}, + {"label":"k2e", "x":15, "y":2}, + + {"label":"k30", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k3e", "x":15, "y":3}, + + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k45", "x":3.75, "y":4, "w":6.25}, + {"label":"k49", "x":10, "y":4}, + {"label":"k4a", "x":11, "y":4}, + {"label":"k4b", "x":12, "y":4}, + {"label":"k4c", "x":13, "y":4}, + {"label":"k4d", "x":14, "y":4}, + {"label":"k4e", "x":15, "y":4} + ] + } } - } } diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c index 9a36e87a2a92..25741a6290cf 100755 --- a/keyboards/tada68/keymaps/default/keymap.c +++ b/keyboards/tada68/keymaps/default/keymap.c @@ -8,43 +8,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 |~ ` | - * |----------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | - * |----------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| - * |----------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| - * |----------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | - * `----------------------------------------------------------------' - */ -[_BL] = LAYOUT_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_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, \ - 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(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT), + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|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_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, + 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(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), - /* Keymap _FL: Function Layer - * ,----------------------------------------------------------------. - * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | - * |----------------------------------------------------------------| - * | | |Up | | | | | | | | | | | |Hme | - * |----------------------------------------------------------------| - * | |<- |Dn | ->| | | | | | | | | |End | - * |----------------------------------------------------------------| - * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | - * |----------------------------------------------------------------| - * | | | | | | | |MsL|MsD|MsR | - * `----------------------------------------------------------------' - */ -[_FL] = LAYOUT_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, KC_INS , \ - _______,_______, KC_UP,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \ - _______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \ - _______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,KC_BTN1, KC_MS_U, KC_BTN2, \ - _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D, KC_MS_R), + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * | | |Up | | | | | | | | | | | |Hme | + * |----------------------------------------------------------------| + * | |<- |Dn | ->| | | | | | | | | |End | + * |----------------------------------------------------------------| + * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | + * |----------------------------------------------------------------| + * | | | | | | | |MsL|MsD|MsR | + * `----------------------------------------------------------------' + */ + [_FL] = LAYOUT_65_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, KC_INS, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_BTN1, KC_MS_U, KC_BTN2, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), }; diff --git a/keyboards/tada68/readme.md b/keyboards/tada68/readme.md index a2dbd92de666..c22c4d371b03 100755 --- a/keyboards/tada68/readme.md +++ b/keyboards/tada68/readme.md @@ -1,17 +1,16 @@ -TADA68 -====== +# TADA68 A compact 65% keyboard. -Keyboard Maintainer: QMK Community -Hardware Supported: TADA68 PCB -Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/products/tada68-mechanical-keyboard-gateron-swtich-65-layout-dye-sub-keycaps-cherry-profils?variant=34710238797), [kbdist](http://www.kbdist.com/) +* Keyboard Maintainer: QMK Community +* Hardware Supported: TADA68 PCB +* Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/products/tada68-mechanical-keyboard-gateron-swtich-65-layout-dye-sub-keycaps-cherry-profils?variant=34710238797), [kbdist](http://www.kbdist.com/) Make example for this keyboard (after setting up your build environment): make tada68: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). ## Firmware Format diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk index c92417cf0255..18b4cdf72c83 100755 --- a/keyboards/tada68/rules.mk +++ b/keyboards/tada68/rules.mk @@ -12,19 +12,24 @@ MCU = atmega32u4 BOOTLOADER = lufa-ms # Build Options -# comment out to disable the 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) -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) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +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 = 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 +UNICODE_ENABLE = no # Unicode -LAYOUTS = 65_ansi +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/tada68/tada68.h b/keyboards/tada68/tada68.h index a71910cb3b20..6bc3cdccf3a1 100755 --- a/keyboards/tada68/tada68.h +++ b/keyboards/tada68/tada68.h @@ -1,5 +1,4 @@ -#ifndef TADA68_H -#define TADA68_H +#pragma once #include "quantum.h" @@ -22,7 +21,7 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT_ansi( \ +#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, \ @@ -55,21 +54,23 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT_iso( \ +#define LAYOUT_65_iso( \ 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, k1e, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k1d, k2d, k2e, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ k40, k41, k42, k45, k49, 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, k2c, k1e}, \ + {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, XXX, k2d, k2e}, \ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ } +#define LAYOUT_iso LAYOUT_65_iso + /* TADA68 ANSI layout with Split Enter key * ,----------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | @@ -100,8 +101,3 @@ {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ } - -void matrix_init_user(void); -void matrix_scan_user(void); - -#endif From ee70d496f44f43b5fd0e7b3a94db4dc467725e1e Mon Sep 17 00:00:00 2001 From: yiancar Date: Wed, 8 Jan 2020 01:26:04 +0000 Subject: [PATCH 171/973] [Keyboard] add Allison keyboard (#7818) * Initial commit * Cosmetic Fixes * Delete config.h --- keyboards/allison/allison.c | 17 ++ keyboards/allison/allison.h | 44 ++++ keyboards/allison/config.h | 252 ++++++++++++++++++++ keyboards/allison/info.json | 12 + keyboards/allison/keymaps/default/keymap.c | 50 ++++ keyboards/allison/keymaps/default/readme.md | 7 + keyboards/allison/keymaps/via/keymap.c | 50 ++++ keyboards/allison/keymaps/via/readme.md | 1 + keyboards/allison/keymaps/via/rules.mk | 1 + keyboards/allison/readme.md | 15 ++ keyboards/allison/rules.mk | 32 +++ 11 files changed, 481 insertions(+) create mode 100644 keyboards/allison/allison.c create mode 100644 keyboards/allison/allison.h create mode 100644 keyboards/allison/config.h create mode 100644 keyboards/allison/info.json create mode 100644 keyboards/allison/keymaps/default/keymap.c create mode 100644 keyboards/allison/keymaps/default/readme.md create mode 100644 keyboards/allison/keymaps/via/keymap.c create mode 100644 keyboards/allison/keymaps/via/readme.md create mode 100644 keyboards/allison/keymaps/via/rules.mk create mode 100644 keyboards/allison/readme.md create mode 100644 keyboards/allison/rules.mk diff --git a/keyboards/allison/allison.c b/keyboards/allison/allison.c new file mode 100644 index 000000000000..4ca8bd07de36 --- /dev/null +++ b/keyboards/allison/allison.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "allison.h" diff --git a/keyboards/allison/allison.h b/keyboards/allison/allison.h new file mode 100644 index 000000000000..e9078a82a142 --- /dev/null +++ b/keyboards/allison/allison.h @@ -0,0 +1,44 @@ +/* Copyright 2020 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 "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, K1E, K0E, \ + 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, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, \ + K50, K51, K52, K53, K58, K5C, K5D, K5E \ +) \ +{ \ + { 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, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ + { K50, K51, K52, K53, KC_NO, KC_NO, KC_NO, KC_NO, K58, KC_NO, KC_NO, KC_NO, K5C, K5D, K5E } \ +} diff --git a/keyboards/allison/config.h b/keyboards/allison/config.h new file mode 100644 index 000000000000..8a310d0a2057 --- /dev/null +++ b/keyboards/allison/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2020 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 0x414D +#define DEVICE_VER 0x0001 +#define MANUFACTURER protoTypist +#define PRODUCT Allison +#define DESCRIPTION A custom luxurious 60 with F-row and Macro + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* + * 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 { D2, D1, D0, B1, B2, D3} +#define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, F1, F0 } +#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 4 + +// #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/allison/info.json b/keyboards/allison/info.json new file mode 100644 index 000000000000..1c435a2d22d5 --- /dev/null +++ b/keyboards/allison/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "allison", + "url": "www.yiancar-designs.com", + "maintainer": "Yiancar", + "width": 16.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"0,0", "x":1.25, "y":0}, {"label":"0,1", "x":2.5, "y":0}, {"label":"0,2", "x":3.5, "y":0}, {"label":"0,3", "x":4.5, "y":0}, {"label":"0,4", "x":5.5, "y":0}, {"label":"0,5", "x":6.75, "y":0}, {"label":"0,6", "x":7.75, "y":0}, {"label":"0,7", "x":8.75, "y":0}, {"label":"0,8", "x":9.75, "y":0}, {"label":"0,9", "x":11, "y":0}, {"label":"0,10", "x":12, "y":0}, {"label":"0,11", "x":13, "y":0}, {"label":"0,12", "x":14, "y":0}, {"label":"0,13", "x":15.25, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1.25, "y":1.25}, {"label":"1,2", "x":2.25, "y":1.25}, {"label":"1,3", "x":3.25, "y":1.25}, {"label":"1,4", "x":4.25, "y":1.25}, {"label":"1,5", "x":5.25, "y":1.25}, {"label":"1,6", "x":6.25, "y":1.25}, {"label":"1,7", "x":7.25, "y":1.25}, {"label":"1,8", "x":8.25, "y":1.25}, {"label":"1,9", "x":9.25, "y":1.25}, {"label":"1,10", "x":10.25, "y":1.25}, {"label":"1,11", "x":11.25, "y":1.25}, {"label":"1,12", "x":12.25, "y":1.25}, {"label":"1,13", "x":13.25, "y":1.25}, {"label":"1,14", "x":14.25, "y":1.25}, {"label":"0,14", "x":15.25, "y":1.25}, {"label":"2,0", "x":0, "y":2.25}, {"label":"2,1", "x":1.25, "y":2.25, "w":1.5}, {"label":"2,2", "x":2.75, "y":2.25}, {"label":"2,3", "x":3.75, "y":2.25}, {"label":"2,4", "x":4.75, "y":2.25}, {"label":"2,5", "x":5.75, "y":2.25}, {"label":"2,6", "x":6.75, "y":2.25}, {"label":"2,7", "x":7.75, "y":2.25}, {"label":"2,8", "x":8.75, "y":2.25}, {"label":"2,9", "x":9.75, "y":2.25}, {"label":"2,10", "x":10.75, "y":2.25}, {"label":"2,11", "x":11.75, "y":2.25}, {"label":"2,12", "x":12.75, "y":2.25}, {"label":"2,13", "x":13.75, "y":2.25}, {"label":"2,14", "x":14.75, "y":2.25, "w":1.5}, {"label":"3,0", "x":0, "y":3.25}, {"label":"3,1", "x":1.25, "y":3.25, "w":1.75}, {"label":"3,2", "x":3, "y":3.25}, {"label":"3,3", "x":4, "y":3.25}, {"label":"3,4", "x":5, "y":3.25}, {"label":"3,5", "x":6, "y":3.25}, {"label":"3,6", "x":7, "y":3.25}, {"label":"3,7", "x":8, "y":3.25}, {"label":"3,8", "x":9, "y":3.25}, {"label":"3,9", "x":10, "y":3.25}, {"label":"3,10", "x":11, "y":3.25}, {"label":"3,11", "x":12, "y":3.25}, {"label":"3,12", "x":13, "y":3.25}, {"label":"3,13", "x":14, "y":3.25}, {"label":"3,14", "x":15, "y":3.25, "w":1.25}, {"label":"4,0", "x":0, "y":4.25}, {"label":"4,1", "x":1.25, "y":4.25, "w":1.25}, {"label":"4,2", "x":2.5, "y":4.25}, {"label":"4,3", "x":3.5, "y":4.25}, {"label":"4,4", "x":4.5, "y":4.25}, {"label":"4,5", "x":5.5, "y":4.25}, {"label":"4,6", "x":6.5, "y":4.25}, {"label":"4,7", "x":7.5, "y":4.25}, {"label":"4,8", "x":8.5, "y":4.25}, {"label":"4,9", "x":9.5, "y":4.25}, {"label":"4,10", "x":10.5, "y":4.25}, {"label":"4,11", "x":11.5, "y":4.25}, {"label":"4,12", "x":12.5, "y":4.25}, {"label":"4,13", "x":13.5, "y":4.25, "w":1.75}, {"label":"4,14", "x":15.25, "y":4.25}, {"label":"5,0", "x":0, "y":5.25}, {"label":"5,1", "x":1.25, "y":5.25, "w":1.5}, {"label":"5,2", "x":2.75, "y":5.25}, {"label":"5,3", "x":3.75, "y":5.25, "w":1.5}, {"label":"5,8", "x":5.25, "y":5.25, "w":7}, {"label":"5,12", "x":12.25, "y":5.25, "w":1.5}, {"label":"5,13", "x":13.75, "y":5.25}, {"label":"5,14", "x":14.75, "y":5.25, "w":1.5}] + } + } +} diff --git a/keyboards/allison/keymaps/default/keymap.c b/keyboards/allison/keymaps/default/keymap.c new file mode 100644 index 000000000000..30fed354a4c6 --- /dev/null +++ b/keyboards/allison/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 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 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_INS, + KC_HOME, 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_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_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_END, 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(1), + KC_LGUI, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL), + + [1] = LAYOUT_all( /* FN1 */ + 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( /* 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/allison/keymaps/default/readme.md b/keyboards/allison/keymaps/default/readme.md new file mode 100644 index 000000000000..13f200dad331 --- /dev/null +++ b/keyboards/allison/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymaps for Allison + +![ANSI](https://i.imgur.com/L4MpWy7.png) + +![ISO](https://i.imgur.com/pvb3Gd7.png) + +![ANSI FN1](https://i.imgur.com/pEVv5q6.png) diff --git a/keyboards/allison/keymaps/via/keymap.c b/keyboards/allison/keymaps/via/keymap.c new file mode 100644 index 000000000000..30fed354a4c6 --- /dev/null +++ b/keyboards/allison/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 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 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_INS, + KC_HOME, 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_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_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_END, 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(1), + KC_LGUI, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL), + + [1] = LAYOUT_all( /* FN1 */ + 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( /* 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/allison/keymaps/via/readme.md b/keyboards/allison/keymaps/via/readme.md new file mode 100644 index 000000000000..b82bc8e79f9c --- /dev/null +++ b/keyboards/allison/keymaps/via/readme.md @@ -0,0 +1 @@ +# Compile with this keymap to use VIA diff --git a/keyboards/allison/keymaps/via/rules.mk b/keyboards/allison/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/allison/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/allison/readme.md b/keyboards/allison/readme.md new file mode 100644 index 000000000000..343ff2325d9f --- /dev/null +++ b/keyboards/allison/readme.md @@ -0,0 +1,15 @@ +# Allison + +![Allison](https://i.imgur.com/tvLtu4K.jpg) + +A custom luxurious 60 with F-row and Macro + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +* Hardware Supported: ATmega32U4 +* Hardware Availability: Small production run by mrpetrov#9585 and [protoTypist](https://discord.gg/UvskpBB) + +Make example for this keyboard (after setting up your build environment): + + make allison: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/allison/rules.mk b/keyboards/allison/rules.mk new file mode 100644 index 000000000000..3d524e478fb9 --- /dev/null +++ b/keyboards/allison/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 = 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 From fdc144d215b59a5bc3f3283b159895ec42ccba0b Mon Sep 17 00:00:00 2001 From: Lucas Moreira Date: Tue, 7 Jan 2020 20:28:06 -0500 Subject: [PATCH 172/973] [Keymap] Improvements to KidBrazil keymap to better handle OLED/LED Matrix timeout. (#7688) * 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 * Update keyboards/crkbd/keymaps/kidbrazil/README.md --- keyboards/crkbd/keymaps/kidbrazil/README.md | 17 +++- keyboards/crkbd/keymaps/kidbrazil/keymap.c | 104 +++++++++++++------- 2 files changed, 83 insertions(+), 38 deletions(-) diff --git a/keyboards/crkbd/keymaps/kidbrazil/README.md b/keyboards/crkbd/keymaps/kidbrazil/README.md index 28414860c3b8..a7995a4f6571 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/README.md +++ b/keyboards/crkbd/keymaps/kidbrazil/README.md @@ -1,6 +1,6 @@ # KidBrazil's custom CRKBD Layout -![Crkbd](https://user-images.githubusercontent.com/736191/40575636-6fba63a4-6123-11e8-9ca0-3f990f1f9f4c.jpg) +![Loose Transistor Crkbd](https://user-images.githubusercontent.com/4823043/71268460-0862c000-231b-11ea-8f32-2fe8da4d348a.jpg) This is a simple layout that I use for both programming and gaming. It is very closely based on the original CRKBD layout with some modifications to the @@ -45,8 +45,19 @@ customize this with showing layer and USB information. I also tried my best to get a dormant / sleep state going but it is hit or miss and often only works on the master hand. +## OLED & RGB Matrix timeout +This keymap will set a automated timeout system for the OLED screen and the RGB +matrix. After 3 minutes or so the LED screen will display the logo on both +halves and 5 minutes after that both the LED and the Matrix will be switched +off. + +Once a user hits the keys again, the LED matrix will turn back on unless the +user has disabled it via RGB_TOG. + +## Flashing +To flash this on your CRKBD simply use the `make crkbd:kidbrazil:flash` +command. + ### TODO -- Fix OLED and Backlight so they turn off when the computer sleeps, currently - only the left hand does that and the LEDs still stay on. - Wait for Spit_common to be implemented in CRKBD and revisit the special color layers and animations diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c index 1086cce3acc6..44142d4f2fe9 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/keymap.c +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -4,8 +4,10 @@ extern uint8_t is_master; // Oled timer similar to Drashna's static uint32_t oled_timer = 0; -// Boolean to store -bool eeprom_oled_enabled = false; +// Boolean to store LED state +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 { @@ -54,19 +56,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -//int RGB_current_mode; +// [Post Init] --------------------------------------------------------------// +void keyboard_post_init_user(void) { + // Set RGB to known state + rgb_matrix_enable_noeeprom(); + rgb_matrix_set_color_all(RGB_GREEN); + user_led_enabled = true; +} // [Process User Input] ------------------------------------------------------// bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // Use process_record_keymap to reset timer on keypress - if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE - oled_timer = timer_read32(); - #endif - // Restore LEDs if they are enabled in eeprom - rgb_matrix_enable_noeeprom(); + switch (keycode) { + 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 + default: + // Use process_record_keymap to reset timer on all other keypresses + if (record->event.pressed) { + #ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + #endif + // Restore LEDs if they are enabled by user + if (user_led_enabled) { + rgb_matrix_enable_noeeprom(); + } + } + return true; } - return true; } // [OLED Configuration] ------------------------------------------------------// @@ -180,35 +202,47 @@ void render_master_oled(void) { } } -// lave OLED scren (Right Hand) +// Slave OLED scren (Right Hand) void render_slave_oled(void) { render_logo(); } // {OLED Task} -----------------------------------------------// void oled_task_user(void) { - // Drashna style timeout for LED and OLED Roughly 8mins - if (timer_elapsed32(oled_timer) > 480000) { - oled_off(); - rgb_matrix_disable_noeeprom(); - return; - } - else { - oled_on(); - } - // Show logo when USB dormant - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - case DEVICE_STATE_Powered: - case DEVICE_STATE_Suspended: - render_logo(); - break; - default: - if (is_master) { - render_master_oled(); - } else { - render_slave_oled(); - } - } + if (timer_elapsed32(oled_timer) > 80000 && 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 + oled_clear(); + master_oled_cleared = true; + } + render_logo(); + return; + } + // Drashna style timeout for LED and OLED Roughly 8mins + else if (timer_elapsed32(oled_timer) > 480000) { + oled_off(); + rgb_matrix_disable_noeeprom(); + return; + } + else { + oled_on(); + // Reset OLED Clear flag + master_oled_cleared = false; + // Show logo when USB dormant + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + case DEVICE_STATE_Powered: + case DEVICE_STATE_Suspended: + render_logo(); + break; + default: + if (is_master) { + render_master_oled(); + } else { + render_slave_oled(); + } + } + } } #endif From 8fa64568f01604bde0bb5eb1923e25483af03424 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 8 Jan 2020 12:47:43 +1100 Subject: [PATCH 173/973] [Keyboard] Update Wasdat config (#7826) --- keyboards/maartenwut/wasdat/config.h | 2 +- keyboards/maartenwut/wasdat/readme.md | 8 ++++---- keyboards/maartenwut/wasdat/rules.mk | 16 ++++++++-------- keyboards/maartenwut/wasdat/wasdat.h | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/keyboards/maartenwut/wasdat/config.h b/keyboards/maartenwut/wasdat/config.h index b5c4d3bc2d1f..ffd33d8534d5 100644 --- a/keyboards/maartenwut/wasdat/config.h +++ b/keyboards/maartenwut/wasdat/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define PRODUCT_ID 0xC474 #define DEVICE_VER 0x0001 #define MANUFACTURER Maartenwut #define PRODUCT Wasdat diff --git a/keyboards/maartenwut/wasdat/readme.md b/keyboards/maartenwut/wasdat/readme.md index 1cb42cc011bd..65ae6231e826 100644 --- a/keyboards/maartenwut/wasdat/readme.md +++ b/keyboards/maartenwut/wasdat/readme.md @@ -4,9 +4,9 @@ A drop-in replacement controller for the WASD v2 TKL and fullsize models. -Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut) -Hardware Supported: WASD v2 TKL/Fullsize ANSI & ISO with Wasdat controller -Hardware Availability: [maartenwut.com](https://maartenwut.com/product/wasdat/) +* Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut) +* Hardware Supported: WASD v2 TKL/Fullsize ANSI & ISO with Wasdat controller +* Hardware Availability: [maartenwut.com](https://maartenwut.com/product/wasdat/) ## Flashing @@ -16,6 +16,6 @@ The WASD has no reset button, but it does have a bank of DIP switches on the bot Make example for this keyboard (after setting up your build environment): - make wasdat:default + make maartenwut/wasdat: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/maartenwut/wasdat/rules.mk b/keyboards/maartenwut/wasdat/rules.mk index 059e84a1a550..136c7bce2918 100644 --- a/keyboards/maartenwut/wasdat/rules.mk +++ b/keyboards/maartenwut/wasdat/rules.mk @@ -14,24 +14,24 @@ 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 # 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 +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) -UNICODE_ENABLE = no # Unicode +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 CUSTOM_MATRIX = yes SRC += matrix.c + LAYOUTS = fullsize_ansi fullsize_iso tkl_ansi tkl_iso diff --git a/keyboards/maartenwut/wasdat/wasdat.h b/keyboards/maartenwut/wasdat/wasdat.h index 508ada485313..d9f1f95a2dc0 100644 --- a/keyboards/maartenwut/wasdat/wasdat.h +++ b/keyboards/maartenwut/wasdat/wasdat.h @@ -19,7 +19,7 @@ #define XXX 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. From 9086d720e089d838214d65449e555b1f30665636 Mon Sep 17 00:00:00 2001 From: Perry Huynh Date: Tue, 7 Jan 2020 21:21:52 -0800 Subject: [PATCH 174/973] [Keyboard] add VIA support to Kyuu (#7804) * add VIA support to Kyuu * update keymap file to follow indenting guidelines * add missing newline to rules.mk * remove unnecessary backslashes and reindent default keymap --- keyboards/quantrik/kyuu/config.h | 4 +- .../quantrik/kyuu/keymaps/default/keymap.c | 67 +++++++++---------- keyboards/quantrik/kyuu/keymaps/via/keymap.c | 47 +++++++++++++ keyboards/quantrik/kyuu/keymaps/via/readme.md | 1 + keyboards/quantrik/kyuu/keymaps/via/rules.mk | 1 + 5 files changed, 84 insertions(+), 36 deletions(-) create mode 100755 keyboards/quantrik/kyuu/keymaps/via/keymap.c create mode 100755 keyboards/quantrik/kyuu/keymaps/via/readme.md create mode 100755 keyboards/quantrik/kyuu/keymaps/via/rules.mk diff --git a/keyboards/quantrik/kyuu/config.h b/keyboards/quantrik/kyuu/config.h index b40ce64cc901..69fa4191e70f 100644 --- a/keyboards/quantrik/kyuu/config.h +++ b/keyboards/quantrik/kyuu/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 0x5154 // "QT" +#define PRODUCT_ID 0x0009 #define DEVICE_VER 0x0001 #define MANUFACTURER Quantrik #define PRODUCT Kyuu diff --git a/keyboards/quantrik/kyuu/keymaps/default/keymap.c b/keyboards/quantrik/kyuu/keymaps/default/keymap.c index 077d7ac5a647..5e4709b410f3 100644 --- a/keyboards/quantrik/kyuu/keymaps/default/keymap.c +++ b/keyboards/quantrik/kyuu/keymaps/default/keymap.c @@ -22,43 +22,42 @@ enum custom_keycodes { }; 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_BSLS, KC_GRV, 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_BSPC, 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_LSFT, KC_UP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ - ), - [1] = 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, QMKBEST, 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 \ - ), - + [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_BSLS, KC_GRV, 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_BSPC, 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_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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, QMKBEST, 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 + ) }; 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; + 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) { diff --git a/keyboards/quantrik/kyuu/keymaps/via/keymap.c b/keyboards/quantrik/kyuu/keymaps/via/keymap.c new file mode 100755 index 000000000000..2525ae1c9c62 --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* 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 + +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_BSLS, KC_GRV, 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_BSPC, 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_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [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_TRNS, + KC_TRNS, 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 + ), + [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 + ), + [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 + ) +}; diff --git a/keyboards/quantrik/kyuu/keymaps/via/readme.md b/keyboards/quantrik/kyuu/keymaps/via/readme.md new file mode 100755 index 000000000000..c3d6edabfb73 --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for Kyuu diff --git a/keyboards/quantrik/kyuu/keymaps/via/rules.mk b/keyboards/quantrik/kyuu/keymaps/via/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes From 331bbd602d8f83b86adcdef0a28c8330e955051e Mon Sep 17 00:00:00 2001 From: Kenny Greulich Date: Tue, 7 Jan 2020 21:23:03 -0800 Subject: [PATCH 175/973] [Keymap] added custom keymap and config for dz60rgb v1 (#7808) --- .../dztech/dz60rgb/keymaps/kgreulich/config.h | 70 +++++++++++++++++++ .../dztech/dz60rgb/keymaps/kgreulich/keymap.c | 25 +++++++ .../dztech/dz60rgb/keymaps/kgreulich/rules.mk | 1 + 3 files changed, 96 insertions(+) create mode 100644 keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/kgreulich/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/kgreulich/rules.mk diff --git a/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h b/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h new file mode 100644 index 000000000000..3c8872177749 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h @@ -0,0 +1,70 @@ +#pragma once + +#define FORCE_NKRO + +#define PERMISSIVE_HOLD + +#define TAP_HOLD_CAPS_DELAY 0 +#define USB_POLLING_INTERVAL_MS 1 + +#define QMK_KEYS_PER_SCAN 4 + +// 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 NO_ACTION_ONESHOT +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +// #include "config_led.h" +// #include "dz60rgb.h" +#undef DISABLE_RGB_MATRIX_SPLASH +#undef DISABLE_RGB_MATRIX_MULTISPLASH +#undef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#undef RGB_MATRIX_STARTUP_MODE +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#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_SAT +#define DISABLE_RGB_MATRIX_BAND_VAL +#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 diff --git a/keyboards/dztech/dz60rgb/keymaps/kgreulich/keymap.c b/keyboards/dztech/dz60rgb/keymaps/kgreulich/keymap.c new file mode 100644 index 000000000000..cf067bdeb2d1 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/kgreulich/keymap.c @@ -0,0 +1,25 @@ +#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_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_UP, LT(2, KC_DEL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + KC_GRAVE, 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_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, EEP_RST, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_VOLU, KC_MUTE, + _______, _______, _______, KC_SPC, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + [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, KC_DEL, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/dztech/dz60rgb/keymaps/kgreulich/rules.mk b/keyboards/dztech/dz60rgb/keymaps/kgreulich/rules.mk new file mode 100644 index 000000000000..8a502e9ee3f6 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/kgreulich/rules.mk @@ -0,0 +1 @@ +NKRO_ENABLE = yes # USB Nkey Rollover From 4a09679d740a68ba0cf3020cdaf4d010bd2beca5 Mon Sep 17 00:00:00 2001 From: yiancar Date: Wed, 8 Jan 2020 05:36:43 +0000 Subject: [PATCH 176/973] [Keyboard] add Allison Numpad (#7823) * add Allison Numpad * alternative layout --- keyboards/allison_numpad/allison_numpad.c | 17 ++ keyboards/allison_numpad/allison_numpad.h | 61 +++++ keyboards/allison_numpad/config.h | 252 ++++++++++++++++++ keyboards/allison_numpad/info.json | 15 ++ .../allison_numpad/keymaps/default/keymap.c | 50 ++++ .../allison_numpad/keymaps/default/readme.md | 5 + keyboards/allison_numpad/keymaps/via/keymap.c | 50 ++++ .../allison_numpad/keymaps/via/readme.md | 1 + keyboards/allison_numpad/keymaps/via/rules.mk | 1 + keyboards/allison_numpad/readme.md | 15 ++ keyboards/allison_numpad/rules.mk | 34 +++ 11 files changed, 501 insertions(+) create mode 100644 keyboards/allison_numpad/allison_numpad.c create mode 100644 keyboards/allison_numpad/allison_numpad.h create mode 100644 keyboards/allison_numpad/config.h create mode 100644 keyboards/allison_numpad/info.json create mode 100644 keyboards/allison_numpad/keymaps/default/keymap.c create mode 100644 keyboards/allison_numpad/keymaps/default/readme.md create mode 100644 keyboards/allison_numpad/keymaps/via/keymap.c create mode 100644 keyboards/allison_numpad/keymaps/via/readme.md create mode 100644 keyboards/allison_numpad/keymaps/via/rules.mk create mode 100644 keyboards/allison_numpad/readme.md create mode 100644 keyboards/allison_numpad/rules.mk diff --git a/keyboards/allison_numpad/allison_numpad.c b/keyboards/allison_numpad/allison_numpad.c new file mode 100644 index 000000000000..16f36e314049 --- /dev/null +++ b/keyboards/allison_numpad/allison_numpad.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "allison_numpad.h" diff --git a/keyboards/allison_numpad/allison_numpad.h b/keyboards/allison_numpad/allison_numpad.h new file mode 100644 index 000000000000..9295e68668fb --- /dev/null +++ b/keyboards/allison_numpad/allison_numpad.h @@ -0,0 +1,61 @@ +/* Copyright 2020 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 "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_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 } \ +} + +#define LAYOUT_numpad_6x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, \ + K30, K31, K32, K33, \ + K40, K41, K42, \ + K50, K52, K53 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, KC_NO }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, KC_NO }, \ + { K50, KC_NO, K52, K53 } \ +} diff --git a/keyboards/allison_numpad/config.h b/keyboards/allison_numpad/config.h new file mode 100644 index 000000000000..c8b8189071bd --- /dev/null +++ b/keyboards/allison_numpad/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2020 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 0x414E +#define DEVICE_VER 0x0001 +#define MANUFACTURER protoTypist +#define PRODUCT Allison Numpad +#define DESCRIPTION A custom luxurious numpad to match Allison + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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 { F4, C7, C6, B6, B5, B4 } +#define MATRIX_COL_PINS { F6, F5, F1, F0 } +#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 4 + +// #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/allison_numpad/info.json b/keyboards/allison_numpad/info.json new file mode 100644 index 000000000000..8b4258bd1a79 --- /dev/null +++ b/keyboards/allison_numpad/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "allison_numpad", + "url": "www.yiancar-designs.com", + "maintainer": "Yiancar", + "width": 4, + "height": 6.25, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1, "y":0}, {"label":"0,2", "x":2, "y":0}, {"label":"0,3", "x":3, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"2,0", "x":0, "y":2.25}, {"label":"2,1", "x":1, "y":2.25}, {"label":"2,2", "x":2, "y":2.25}, {"label":"2,3", "x":3, "y":2.25}, {"label":"3,0", "x":0, "y":3.25}, {"label":"3,1", "x":1, "y":3.25}, {"label":"3,2", "x":2, "y":3.25}, {"label":"3,3", "x":3, "y":3.25}, {"label":"4,0", "x":0, "y":4.25}, {"label":"4,1", "x":1, "y":4.25}, {"label":"4,2", "x":2, "y":4.25}, {"label":"4,3", "x":3, "y":4.25}, {"label":"5,0", "x":0, "y":5.25}, {"label":"5,1", "x":1, "y":5.25}, {"label":"5,2", "x":2, "y":5.25}, {"label":"5,3", "x":3, "y":5.25}] + }, + "LAYOUT_numpad_6x4": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1, "y":0}, {"label":"0,2", "x":2, "y":0}, {"label":"0,3", "x":3, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"2,0", "x":0, "y":2.25}, {"label":"2,1", "x":1, "y":2.25}, {"label":"2,2", "x":2, "y":2.25}, {"label":"3,3", "x":3, "y":2.25, "h":2}, {"label":"3,0", "x":0, "y":3.25}, {"label":"3,1", "x":1, "y":3.25}, {"label":"3,2", "x":2, "y":3.25}, {"label":"4,0", "x":0, "y":4.25}, {"label":"4,1", "x":1, "y":4.25}, {"label":"4,2", "x":2, "y":4.25}, {"label":"5,3", "x":3, "y":4.25, "h":2}, {"label":"5,0", "x":0, "y":5.25, "w":2}, {"label":"5,2", "x":2, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/allison_numpad/keymaps/default/keymap.c b/keyboards/allison_numpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..74310885c5ee --- /dev/null +++ b/keyboards/allison_numpad/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_6x4( /* Base */ + KC_PSCR, KC_SLCK, KC_PAUS, TG(1), + 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_P0, KC_PDOT, KC_PENT), + + [1] = LAYOUT_ortho_6x4( /* FN1 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_INC, BL_DEC, BL_BRTG, + KC_TRNS, KC_UP, 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_TRNS, KC_TRNS), + + [2] = LAYOUT_ortho_6x4( /* 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), + + [3] = LAYOUT_ortho_6x4( /* 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), +}; diff --git a/keyboards/allison_numpad/keymaps/default/readme.md b/keyboards/allison_numpad/keymaps/default/readme.md new file mode 100644 index 000000000000..b6b98a1815fc --- /dev/null +++ b/keyboards/allison_numpad/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The default keymap for Allison Numpad + +![NUMPAD](https://i.imgur.com/1n2pl5p.png) + +![NUMPAD FN1](https://i.imgur.com/1n2pl5p.png) \ No newline at end of file diff --git a/keyboards/allison_numpad/keymaps/via/keymap.c b/keyboards/allison_numpad/keymaps/via/keymap.c new file mode 100644 index 000000000000..74310885c5ee --- /dev/null +++ b/keyboards/allison_numpad/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_6x4( /* Base */ + KC_PSCR, KC_SLCK, KC_PAUS, TG(1), + 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_P0, KC_PDOT, KC_PENT), + + [1] = LAYOUT_ortho_6x4( /* FN1 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_INC, BL_DEC, BL_BRTG, + KC_TRNS, KC_UP, 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_TRNS, KC_TRNS), + + [2] = LAYOUT_ortho_6x4( /* 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), + + [3] = LAYOUT_ortho_6x4( /* 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), +}; diff --git a/keyboards/allison_numpad/keymaps/via/readme.md b/keyboards/allison_numpad/keymaps/via/readme.md new file mode 100644 index 000000000000..b82bc8e79f9c --- /dev/null +++ b/keyboards/allison_numpad/keymaps/via/readme.md @@ -0,0 +1 @@ +# Compile with this keymap to use VIA diff --git a/keyboards/allison_numpad/keymaps/via/rules.mk b/keyboards/allison_numpad/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/allison_numpad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/allison_numpad/readme.md b/keyboards/allison_numpad/readme.md new file mode 100644 index 000000000000..0226c44f6837 --- /dev/null +++ b/keyboards/allison_numpad/readme.md @@ -0,0 +1,15 @@ +# Allison Numpad + +![Allison Numpad](https://i.imgur.com/tvLtu4K.jpg) + +A custom luxurious numpad to match Allison + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +* Hardware Supported: ATmega32U4 +* Hardware Availability: Small production run by mrpetrov#9585 and [protoTypist](https://discord.gg/UvskpBB) + +Make example for this keyboard (after setting up your build environment): + + make allison_numpad: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/allison_numpad/rules.mk b/keyboards/allison_numpad/rules.mk new file mode 100644 index 000000000000..19e21ec9ec63 --- /dev/null +++ b/keyboards/allison_numpad/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 = 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 = 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 + +LAYOUTS = ortho_6x4 numpad_6x4 From fe860131dd60e38d95e12da3d5ecaf22f82aa344 Mon Sep 17 00:00:00 2001 From: yulei Date: Wed, 8 Jan 2020 16:11:45 +0800 Subject: [PATCH 177/973] [Keyboard] fixed hhkb keymap issue on e6_rgb (#7684) * fixed hhkb keymap issue and added allleds configuration * fixed layout mismatch * add more matrix control * remove redundent define in rules.mk * turn NKRO on * remove allled macro, adding readme in allleds mode, add via support * add two more layers for via * update readme file * Update keyboards/exclusive/e6_rgb/keymaps/allleds/readme * Update keyboards/exclusive/e6_rgb/keymaps/allleds/readme.md --- keyboards/exclusive/e6_rgb/config.h | 30 +- keyboards/exclusive/e6_rgb/e6_rgb.c | 43 +- keyboards/exclusive/e6_rgb/e6_rgb.h | 61 +- keyboards/exclusive/e6_rgb/info.json | 1309 ++++++++++++++++- .../exclusive/e6_rgb/keymaps/allleds/keymap.c | 16 + .../e6_rgb/keymaps/allleds/readme.md | 13 + .../exclusive/e6_rgb/keymaps/allleds/rules.mk | 1 + .../exclusive/e6_rgb/keymaps/via/keymap.c | 28 + .../exclusive/e6_rgb/keymaps/via/rules.mk | 1 + keyboards/exclusive/e6_rgb/rules.mk | 21 +- 10 files changed, 1418 insertions(+), 105 deletions(-) create mode 100644 keyboards/exclusive/e6_rgb/keymaps/allleds/keymap.c create mode 100644 keyboards/exclusive/e6_rgb/keymaps/allleds/readme.md create mode 100644 keyboards/exclusive/e6_rgb/keymaps/allleds/rules.mk create mode 100644 keyboards/exclusive/e6_rgb/keymaps/via/keymap.c create mode 100644 keyboards/exclusive/e6_rgb/keymaps/via/rules.mk diff --git a/keyboards/exclusive/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h index cb213c25e20a..3a61311810ac 100644 --- a/keyboards/exclusive/e6_rgb/config.h +++ b/keyboards/exclusive/e6_rgb/config.h @@ -7,8 +7,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xDEAD -#define PRODUCT_ID 0xFEED +#define VENDOR_ID 0x4154 //AT +#define PRODUCT_ID 0x4536 //E6 #define DEVICE_VER 0x0062 #define MANUFACTURER astro #define PRODUCT e6rgb @@ -23,27 +23,6 @@ #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* - * 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 - //rgb light setting #define RGBLED_NUM 6 #define RGB_DI_PIN B7 @@ -58,8 +37,3 @@ #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 63 #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL - -// tapping setting -#define TAPPING_TERM 200 -#define RETRO_TAPPING -#define PERMISSIVE_HOLD diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c index 106e58497eed..0e248a202352 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.c +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c @@ -5,24 +5,10 @@ #include "e6_rgb.h" #ifdef RGB_MATRIX_ENABLE -__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) { setPinOutput(D5); writePinHigh(D5); -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { + matrix_init_user(); } const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { @@ -190,3 +176,30 @@ led_config_t g_led_config = { { } }; #endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { +#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + case KC_F15: + rgb_matrix_increase_hue(); + return false; + case KC_F16: + rgb_matrix_increase_sat(); + return false; + case KC_F17: + rgb_matrix_increase_val(); + return false; +#endif + default: + break; + } + } + return true; +} diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.h b/keyboards/exclusive/e6_rgb/e6_rgb.h index 01f700c0097c..df105863b7d6 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.h +++ b/keyboards/exclusive/e6_rgb/e6_rgb.h @@ -10,74 +10,75 @@ // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT_60_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ k40, k42, k43, k47, k48, k49, k4a, k4b \ ) \ { \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ - {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ - {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, KC_NO}, \ - {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \ } #define LAYOUT_60_wkl( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k40, k42, k43, k47, k49, k4a, k4b \ ) \ { \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ - {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ - {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ - {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ } #define LAYOUT_60_hhkb( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + 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, k1e, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k42, k43, k47, k49, k4a \ ) \ { \ - {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, k1e}, \ - {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ - {k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d}, \ - {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ + { 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, k1e}, \ + { k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + { k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ } + #define LAYOUT_60_wkl_split_bs( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + 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, k1e, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k40, k42, k43, k47, k49, k4a, k4b \ ) \ { \ - {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, k1e}, \ - {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ - {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ - {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ + {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, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ } #define LAYOUT_60_ansi_split_bs_shift( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + 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, k1e, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k40, k42, k43, k47, k48, k49, k4a, k4b \ ) \ { \ - {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, k1e}, \ - {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ - {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ - {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \ + {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, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \ } diff --git a/keyboards/exclusive/e6_rgb/info.json b/keyboards/exclusive/e6_rgb/info.json index 80f3610029f2..f4e5f7fe98b5 100644 --- a/keyboards/exclusive/e6_rgb/info.json +++ b/keyboards/exclusive/e6_rgb/info.json @@ -1,21 +1,1292 @@ { - "keyboard_name": "e6_rgb", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_60_wkl": { - "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":1.75}, {"label":"Fn", "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}] - }, - "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_hhkb": { - "key_count":60, - "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":"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}] - } - } + "keyboard_name": "e6_rgb", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_wkl": { + "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": 1.75 + }, + { + "label": "Fn", + "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 + } + ] + }, + "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_hhkb": { + "key_count": 60, + "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": "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 + } + ] + }, + "LAYOUT_allleds": { + "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": "|", + "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": "Caps Lock", + "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": "Fn", + "x": 13.5, + "y": 4, + "w": 1.5 + } + ] + } + } } diff --git a/keyboards/exclusive/e6_rgb/keymaps/allleds/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/allleds/keymap.c new file mode 100644 index 000000000000..d9a7885eb8d5 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/allleds/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_wkl_split_bs( + 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_LCTRL, 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_END,\ + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL), + [1] = LAYOUT_60_wkl_split_bs( + _______, 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,\ + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,TG(0),_______), +}; diff --git a/keyboards/exclusive/e6_rgb/keymaps/allleds/readme.md b/keyboards/exclusive/e6_rgb/keymaps/allleds/readme.md new file mode 100644 index 000000000000..f9d6b26522f9 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/allleds/readme.md @@ -0,0 +1,13 @@ +This keymap turns RGB underglow and per-key RGB ON at the same time. + +While this is the case: + +RGB_TOG, RGB_MOD, etc to control the RGB underglow + +F13-F17 were used to control the per key RGB + +- F13 to turn the RGB on/off +- F14 to change the effect mode +- F15 to increase the HUE +- F16 to increase the SAT +- F17 to increase the VAL diff --git a/keyboards/exclusive/e6_rgb/keymaps/allleds/rules.mk b/keyboards/exclusive/e6_rgb/keymaps/allleds/rules.mk new file mode 100644 index 000000000000..f8610f7e2870 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/allleds/rules.mk @@ -0,0 +1 @@ +RGB_MATRIX_ENABLE = IS31FL3733# Use RGB matrix diff --git a/keyboards/exclusive/e6_rgb/keymaps/via/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..39d7a74c4c70 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/via/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_wkl_split_bs( + 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_LCTRL, 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_END,\ + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL), + [1] = LAYOUT_60_wkl_split_bs( + _______, 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,\ + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______, TG(0),_______), + [2] = LAYOUT_60_wkl_split_bs( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______), + [3] = LAYOUT_60_wkl_split_bs( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______), +}; diff --git a/keyboards/exclusive/e6_rgb/keymaps/via/rules.mk b/keyboards/exclusive/e6_rgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/exclusive/e6_rgb/rules.mk b/keyboards/exclusive/e6_rgb/rules.mk index 4695f647607e..4d8e1c6e5f08 100644 --- a/keyboards/exclusive/e6_rgb/rules.mk +++ b/keyboards/exclusive/e6_rgb/rules.mk @@ -11,29 +11,24 @@ MCU = atmega32u4 # 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 = 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 +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 -#RGBLIGHT_ENABLE = yes # Use RGB bottom light -RGB_MATRIX_ENABLE = IS31FL3733# Use RGB matrix +RGBLIGHT_ENABLE = yes # Use RGB underglow light +RGB_MATRIX_ENABLE = no # Use RGB matrix LAYOUTS = 60_ansi 60_hhkb From d2e6a4bf5eb1b99bf0d90d9271cffd285d408c2a Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 8 Jan 2020 15:47:33 -0800 Subject: [PATCH 178/973] Handwired Minorca Refactor (#7833) * update config.h - use #pragma once include guard - update USB Device Descriptor strings * update minorca.c - remove matrix_init_kb function (same as QMK default) * update minorca.h - use #pragma once include guard - update matrix identifiers * update info.json - update matrix identifiers - change to four-space indent * update rules.mk - remote firmware size impact notes - disable RGBLIGHT_ENABLE (no RGB config present) - templating * update readme.md - templating * update keymaps/default/rules.mk - remove firmware size impact numbers - templating * update keymaps/rgb/rules.mk - remote firmware size impact notes - templating * update keymaps/rgb/readme.md - fix header * remove keymaps/default/rules.mk - identical to keyboard's rules.mk * elevate Bootmagic configurations to keyboard level * update keymaps/rgb/config.h - use #pragma once include guard - remove redundant config.h include * update keymaps/rgb/rules.mk - remove redundant rules * update keymaps/rgb/readme.md - change RGB function list to a table - make wiring call-out a header * remove keymaps/default/config.h - it's blank now * update minorca.h - use four-space indent * add Teensy 2.0 to readme --- keyboards/handwired/minorca/config.h | 16 ++- keyboards/handwired/minorca/info.json | 104 +++++++++--------- .../minorca/keymaps/default/config.h | 10 -- .../minorca/keymaps/default/rules.mk | 21 ---- .../handwired/minorca/keymaps/rgb/config.h | 13 +-- .../handwired/minorca/keymaps/rgb/readme.md | 24 ++-- .../handwired/minorca/keymaps/rgb/rules.mk | 22 +--- keyboards/handwired/minorca/minorca.c | 5 - keyboards/handwired/minorca/minorca.h | 21 ++-- keyboards/handwired/minorca/readme.md | 8 +- keyboards/handwired/minorca/rules.mk | 27 ++--- 11 files changed, 104 insertions(+), 167 deletions(-) delete mode 100644 keyboards/handwired/minorca/keymaps/default/config.h delete mode 100644 keyboards/handwired/minorca/keymaps/default/rules.mk diff --git a/keyboards/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h index fea201b9cf2a..acaf26e95989 100644 --- a/keyboards/handwired/minorca/config.h +++ b/keyboards/handwired/minorca/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,9 +23,9 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6660 #define DEVICE_VER 0x0001 -#define MANUFACTURER ME -#define PRODUCT MinOrca -#define DESCRIPTION Tiny Whale +#define MANUFACTURER panc.co +#define PRODUCT Minorca +#define DESCRIPTION QMK Firmware for panc.co Minorca /* key matrix size */ #define MATRIX_ROWS 4 @@ -72,4 +71,9 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE diff --git a/keyboards/handwired/minorca/info.json b/keyboards/handwired/minorca/info.json index dafee63456c4..d1ae1171fe1d 100644 --- a/keyboards/handwired/minorca/info.json +++ b/keyboards/handwired/minorca/info.json @@ -1,55 +1,55 @@ { - "keyboard_name": "Minorca Handwired", - "url": "", - "maintainer": "qmk", - "width": 12, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"KA00", "x":0, "y":0}, - {"label":"KA01", "x":1, "y":0}, - {"label":"KA02", "x":2, "y":0}, - {"label":"KA03", "x":3, "y":0}, - {"label":"KA04", "x":4, "y":0}, - {"label":"KA05", "x":5, "y":0}, - {"label":"KA06", "x":6, "y":0}, - {"label":"KA07", "x":7, "y":0}, - {"label":"KA08", "x":8, "y":0}, - {"label":"KA09", "x":9, "y":0}, - {"label":"KA10", "x":10, "y":0}, - {"label":"KA11", "x":11, "y":0}, - {"label":"KB00", "x":0, "y":1, "w":1.25}, - {"label":"KB01", "x":1.25, "y":1}, - {"label":"KB02", "x":2.25, "y":1}, - {"label":"KB03", "x":3.25, "y":1}, - {"label":"KB04", "x":4.25, "y":1}, - {"label":"KB05", "x":5.25, "y":1}, - {"label":"KB06", "x":6.25, "y":1}, - {"label":"KB07", "x":7.25, "y":1}, - {"label":"KB08", "x":8.25, "y":1}, - {"label":"KB09", "x":9.25, "y":1}, - {"label":"KB11", "x":10.25, "y":1, "w":1.75}, - {"label":"KC00", "x":0, "y":2, "w":1.75}, - {"label":"KC02", "x":1.75, "y":2}, - {"label":"KC03", "x":2.75, "y":2}, - {"label":"KC04", "x":3.75, "y":2}, - {"label":"KC05", "x":4.75, "y":2}, - {"label":"KC06", "x":5.75, "y":2}, - {"label":"KC07", "x":6.75, "y":2}, - {"label":"KC08", "x":7.75, "y":2}, - {"label":"KC09", "x":8.75, "y":2}, - {"label":"KC10", "x":9.75, "y":2}, - {"label":"KC11", "x":10.75, "y":2, "w":1.25}, - {"label":"KD00", "x":0, "y":3, "w":1.25}, - {"label":"KD02", "x":1.25, "y":3, "w":1.25}, - {"label":"KD03", "x":2.5, "y":3, "w":1.25}, - {"label":"KD04", "x":3.75, "y":3, "w":2.25}, - {"label":"KD07", "x":6, "y":3, "w":2.25}, - {"label":"KD09", "x":8.25, "y":3, "w":1.25}, - {"label":"KD10", "x":9.5, "y":3}, - {"label":"KD11", "x":10.5, "y":3, "w":1.5} - ] + "keyboard_name": "Minorca Handwired", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "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":"K1B", "x":10.25, "y":1, "w":1.75}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K22", "x":1.75, "y":2}, + {"label":"K23", "x":2.75, "y":2}, + {"label":"K24", "x":3.75, "y":2}, + {"label":"K25", "x":4.75, "y":2}, + {"label":"K26", "x":5.75, "y":2}, + {"label":"K27", "x":6.75, "y":2}, + {"label":"K28", "x":7.75, "y":2}, + {"label":"K29", "x":8.75, "y":2}, + {"label":"K2A", "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":"K32", "x":1.25, "y":3, "w":1.25}, + {"label":"K33", "x":2.5, "y":3, "w":1.25}, + {"label":"K34", "x":3.75, "y":3, "w":2.25}, + {"label":"K37", "x":6, "y":3, "w":2.25}, + {"label":"K39", "x":8.25, "y":3, "w":1.25}, + {"label":"K3A", "x":9.5, "y":3}, + {"label":"K3B", "x":10.5, "y":3, "w":1.5} + ] + } } - } } diff --git a/keyboards/handwired/minorca/keymaps/default/config.h b/keyboards/handwired/minorca/keymaps/default/config.h deleted file mode 100644 index c19ad7372418..000000000000 --- a/keyboards/handwired/minorca/keymaps/default/config.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -// place overrides here - - -/* bootmagic salt key */ -#define BOOTMAGIC_KEY_SALT KC_ESC - -/* skip bootmagic and eeconfig */ -#define BOOTMAGIC_KEY_SKIP KC_SPACE diff --git a/keyboards/handwired/minorca/keymaps/default/rules.mk b/keyboards/handwired/minorca/keymaps/default/rules.mk deleted file mode 100644 index 584798d1a15a..000000000000 --- a/keyboards/handwired/minorca/keymaps/default/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ - - -# 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 = 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 = 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 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 diff --git a/keyboards/handwired/minorca/keymaps/rgb/config.h b/keyboards/handwired/minorca/keymaps/rgb/config.h index 43b3c59110de..d3715d054bfe 100644 --- a/keyboards/handwired/minorca/keymaps/rgb/config.h +++ b/keyboards/handwired/minorca/keymaps/rgb/config.h @@ -1,13 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* bootmagic salt key */ -#define BOOTMAGIC_KEY_SALT KC_ESC - -/* skip bootmagic and eeconfig */ -#define BOOTMAGIC_KEY_SKIP KC_SPACE +#pragma once /* ws2812 RGB LED */ #define RGB_DI_PIN D5 @@ -16,5 +7,3 @@ #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - -#endif diff --git a/keyboards/handwired/minorca/keymaps/rgb/readme.md b/keyboards/handwired/minorca/keymaps/rgb/readme.md index ec3b4f00f151..4e9917789ef1 100644 --- a/keyboards/handwired/minorca/keymaps/rgb/readme.md +++ b/keyboards/handwired/minorca/keymaps/rgb/readme.md @@ -1,4 +1,4 @@ -#RGB backlight for MinOrca +# RGB backlight for MinOrca ![wiring](https://i.imgur.com/jyYyiSS.jpg) @@ -8,16 +8,18 @@ http://www.40percent.club/2016/08/tiny-whale.html The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key. -* Tab + Z Toggle on/off -* Tab + X Mode -* Tab + C Hue+ -* Tab + V Hue- -* Tab + B Saturation+ -* Tab + N Saturation- -* Tab + M Brightness+ -* Tab + , Brightness- - -Example wiring: +Shortcut | Function +:------- | :----- +Tab + Z | Toggle on/off +Tab + X | Mode +Tab + C | Hue+ +Tab + V | Hue- +Tab + B | Saturation+ +Tab + N | Saturation- +Tab + M | Brightness+ +Tab + , | Brightness- + +## Example wiring: WS2812 data pin is connected to D5 diff --git a/keyboards/handwired/minorca/keymaps/rgb/rules.mk b/keyboards/handwired/minorca/keymaps/rgb/rules.mk index 6e430d59e240..faa034d88e8c 100644 --- a/keyboards/handwired/minorca/keymaps/rgb/rules.mk +++ b/keyboards/handwired/minorca/keymaps/rgb/rules.mk @@ -1,21 +1 @@ - - -# 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 = 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 = 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 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. - -# 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 WS2812 RGB underlight diff --git a/keyboards/handwired/minorca/minorca.c b/keyboards/handwired/minorca/minorca.c index 24e72c2a5c0a..dbae0b0f9061 100644 --- a/keyboards/handwired/minorca/minorca.c +++ b/keyboards/handwired/minorca/minorca.c @@ -1,6 +1 @@ #include "minorca.h" - -void matrix_init_kb(void) { - - matrix_init_user(); -} \ No newline at end of file diff --git a/keyboards/handwired/minorca/minorca.h b/keyboards/handwired/minorca/minorca.h index 2df4ebdc4f74..ca524caf5909 100644 --- a/keyboards/handwired/minorca/minorca.h +++ b/keyboards/handwired/minorca/minorca.h @@ -1,18 +1,15 @@ -#ifndef MINORCA_H -#define MINORCA_H +#pragma once #include "quantum.h" #define LAYOUT( \ - 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 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1B, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K32, K33, K34, K37, K39, K3A, K3B \ ) { \ - { 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 } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K1B }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, KC_NO, K32, K33, K34, KC_NO, KC_NO, K37, KC_NO, K39, K3A, K3B } \ } - -#endif diff --git a/keyboards/handwired/minorca/readme.md b/keyboards/handwired/minorca/readme.md index c910459603f4..46d310c6178f 100644 --- a/keyboards/handwired/minorca/readme.md +++ b/keyboards/handwired/minorca/readme.md @@ -1,10 +1,10 @@ -# minorca +# Minorca A handwired 40% keyboard by panc.co. -Keyboard Maintainer: [The QMK Community](https://github.com/qmk) -Hardware Supported: panc.co minorca -Hardware Availability: [panc.co](https://www.panc.co/blog/minorcasebright-information-page) +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +* Hardware Supported: panc.co Minorca, Teensy 2.0 +* Hardware Availability: [panc.co](https://www.panc.co/blog/minorcasebright-information-page) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk index 5c29c0c93e97..195749ceb3fc 100644 --- a/keyboards/handwired/minorca/rules.mk +++ b/keyboards/handwired/minorca/rules.mk @@ -12,21 +12,22 @@ 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 +# 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 # 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 = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight +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. - -# 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 d3bd1d893b6f7caebe821b5811104a9981d8f084 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 9 Jan 2020 21:19:24 +1100 Subject: [PATCH 179/973] Ensure `PROGMEM` is present on default keymaps (#7836) --- .../satisfaction75/keymaps/default/keymap.c | 2 +- .../satisfaction75/keymaps/tester/keymap.c | 2 +- .../satisfaction75/keymaps/via/keymap.c | 16 +--------------- .../converter/usb_usb/keymaps/ble/keymap.c | 18 +----------------- .../converter/usb_usb/keymaps/default/keymap.c | 18 +----------------- .../bluepill/keymaps/default/keymap.c | 4 ++-- .../handwired/bluepill/keymaps/iso/keymap.c | 4 ++-- .../handwired/ck4x4/keymaps/default/keymap.c | 5 +---- keyboards/infinity60/keymaps/default/keymap.c | 12 +----------- keyboards/k_type/keymaps/default/keymap.c | 12 +----------- .../sirius/unigo66/keymaps/default/keymap.c | 14 +------------- keyboards/whitefox/keymaps/default/keymap.c | 2 +- 12 files changed, 14 insertions(+), 95 deletions(-) diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c index 5e87c73dcc56..61a9d097a338 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [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_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, ENC_PRESS, diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c index 3595c107b98a..c648333c3d8f 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c +++ b/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +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_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, ENC_PRESS, diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c index 296fd7da6aa3..ce97d7554f81 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c @@ -17,8 +17,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H - -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +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_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, ENC_PRESS, @@ -36,16 +35,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; - - -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/converter/usb_usb/keymaps/ble/keymap.c b/keyboards/converter/usb_usb/keymaps/ble/keymap.c index 190b3319fe9b..75c49f0067ea 100644 --- a/keyboards/converter/usb_usb/keymaps/ble/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/ble/keymap.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: plain Qwerty without layer switching * ,---------------. ,---------------. ,---------------. * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| @@ -46,19 +46,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT ), }; - -void matrix_init_user(void) { - -} - -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/converter/usb_usb/keymaps/default/keymap.c b/keyboards/converter/usb_usb/keymaps/default/keymap.c index 170ed31ef878..c7d91fa5b208 100644 --- a/keyboards/converter/usb_usb/keymaps/default/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/default/keymap.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: plain Qwerty without layer switching * ,---------------. ,---------------. ,---------------. * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| @@ -55,19 +55,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______, ______,______, ______,______ ), }; - -void matrix_init_user(void) { - -} - -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/handwired/bluepill/keymaps/default/keymap.c b/keyboards/handwired/bluepill/keymaps/default/keymap.c index 3d93c24d938d..870a530f9e33 100644 --- a/keyboards/handwired/bluepill/keymaps/default/keymap.c +++ b/keyboards/handwired/bluepill/keymaps/default/keymap.c @@ -23,7 +23,7 @@ along with this program. If not, see . #define _FNTWO 2 // Highly Modified by Xydane -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NORMAL] = LAYOUT_seventy_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_PSCREEN,KC_HOME, KC_END, \ 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_DELETE, \ @@ -66,4 +66,4 @@ layer_state_t layer_state_set_user(layer_state_t state) { break; } return state; -} \ No newline at end of file +} diff --git a/keyboards/handwired/bluepill/keymaps/iso/keymap.c b/keyboards/handwired/bluepill/keymaps/iso/keymap.c index a6aedde7a3d8..072f430fbddf 100644 --- a/keyboards/handwired/bluepill/keymaps/iso/keymap.c +++ b/keyboards/handwired/bluepill/keymaps/iso/keymap.c @@ -23,7 +23,7 @@ along with this program. If not, see . #define _FNTWO 2 // Highly Modified by Xydane -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NORMAL] = LAYOUT_seventy_iso( 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_PSCREEN,KC_HOME, KC_END, \ 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_DELETE, \ @@ -66,4 +66,4 @@ uint32_t layer_state_set_user(uint32_t state) { break; } return state; -} \ No newline at end of file +} diff --git a/keyboards/handwired/ck4x4/keymaps/default/keymap.c b/keyboards/handwired/ck4x4/keymaps/default/keymap.c index d3717754d89d..bc8b602a6795 100644 --- a/keyboards/handwired/ck4x4/keymaps/default/keymap.c +++ b/keyboards/handwired/ck4x4/keymaps/default/keymap.c @@ -17,13 +17,10 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT(KC_7, KC_8, KC_9, KC_MINUS, \ KC_4, KC_5, KC_6, KC_PLUS, \ KC_1, KC_2, KC_3, KC_ENTER, \ RESET, KC_NO, KC_NO, KC_NO \ ), // test with KC_CAPS, KC_A, RESET }; - -const uint16_t fn_actions[] = { -}; diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index 4882469c0035..f64e7c899a71 100644 --- a/keyboards/infinity60/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -1,6 +1,6 @@ #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer * ,-----------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| @@ -41,13 +41,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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,KC_TRNS), }; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - -}; diff --git a/keyboards/k_type/keymaps/default/keymap.c b/keyboards/k_type/keymaps/default/keymap.c index 331d33155279..4f304b012027 100644 --- a/keyboards/k_type/keymaps/default/keymap.c +++ b/keyboards/k_type/keymaps/default/keymap.c @@ -1,6 +1,6 @@ #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( 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, \ @@ -9,13 +9,3 @@ const uint16_t 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), }; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - -}; diff --git a/keyboards/sirius/unigo66/keymaps/default/keymap.c b/keyboards/sirius/unigo66/keymaps/default/keymap.c index 06982e64b7d0..63b4c2f06565 100644 --- a/keyboards/sirius/unigo66/keymaps/default/keymap.c +++ b/keyboards/sirius/unigo66/keymaps/default/keymap.c @@ -1,6 +1,6 @@ #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -114,15 +114,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { _______, _______, _______, _______ ), }; - -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/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c index 61cc4eca0f34..d0f329ebaf7c 100644 --- a/keyboards/whitefox/keymaps/default/keymap.c +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer * ,---------------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| From 71de09d7510213d707ca1056c6e0eca840678d37 Mon Sep 17 00:00:00 2001 From: James Young Date: Thu, 9 Jan 2020 10:55:46 -0800 Subject: [PATCH 180/973] Update Breaking Changes doc timeline --- docs/breaking_changes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index fc71cf5ab190..56d14438d79c 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 Jan 11 - `future` closed to new PR's. -* [ ] 2020 Jan 11 - Call for testers. +* [ ] 2020 Feb 1 - `future` closed to new PR's. +* [ ] 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. @@ -68,7 +68,7 @@ This happens immediately after the previous `future` branch is merged. * [ ] `git push origin future` * [ ] `git push --tags` -## 4+ Weeks Before Merge +## 4 Weeks Before Merge * `future` is now closed to new PR's, only fixes for current PR's may be merged * Post call for testers From caa70df816033c30dbbbf4c5a90d803c7bb1dfde Mon Sep 17 00:00:00 2001 From: Akaash Suresh Date: Thu, 9 Jan 2020 13:57:54 -0600 Subject: [PATCH 181/973] [Keymap] Userspace refactor, adding leader key functionality (#7790) * Userspace refactor * Fixed missed ifdef * tapcode16, adjust layout * glcdfont changes from #7745 * Modify Keymaps, add workman * RGB & OLED update --- keyboards/crkbd/keymaps/curry/config.h | 18 +- keyboards/crkbd/keymaps/curry/keymap.c | 18 +- keyboards/crkbd/keymaps/curry/rules.mk | 31 +- keyboards/lily58/keymaps/curry/config.h | 10 + keyboards/lily58/keymaps/curry/keymap.c | 8 +- keyboards/lily58/keymaps/curry/rules.mk | 29 +- users/curry/{LICENSE.md => LICENSE} | 0 users/curry/config.h | 129 ++++----- users/curry/curry.c | 19 +- users/curry/curry.h | 14 +- users/curry/glcdfont.c | 11 +- users/curry/leader.c | 24 ++ users/curry/leader.h | 3 + users/curry/oled.c | 13 +- users/curry/process_records.c | 27 +- users/curry/process_records.h | 62 ++-- .../{rgb_stuff.c => rgb_lighting_user.c} | 274 ++++-------------- users/curry/rgb_lighting_user.h | 19 ++ users/curry/rgb_matrix_user.c | 144 +++++++++ users/curry/rgb_matrix_user.h | 7 + users/curry/rgb_stuff.h | 32 -- users/curry/rules.mk | 20 +- users/curry/tap_dances.c | 1 + users/curry/tap_dances.h | 2 - users/curry/wrappers.h | 30 +- 25 files changed, 460 insertions(+), 485 deletions(-) rename users/curry/{LICENSE.md => LICENSE} (100%) create mode 100644 users/curry/leader.c create mode 100644 users/curry/leader.h rename users/curry/{rgb_stuff.c => rgb_lighting_user.c} (60%) create mode 100644 users/curry/rgb_lighting_user.h create mode 100644 users/curry/rgb_matrix_user.c create mode 100644 users/curry/rgb_matrix_user.h delete mode 100644 users/curry/rgb_stuff.h diff --git a/keyboards/crkbd/keymaps/curry/config.h b/keyboards/crkbd/keymaps/curry/config.h index 4b424b05b335..a7c4ed740315 100644 --- a/keyboards/crkbd/keymaps/curry/config.h +++ b/keyboards/crkbd/keymaps/curry/config.h @@ -6,23 +6,7 @@ #define OLED_DISABLE_TIMEOUT #define TAPPING_TERM_PER_KEY -#ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 27 - -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 5 -# define RGBLIGHT_LIMIT_VAL 120 -#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_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) +#if defined(RGB_MATRIX_ENABLE) # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 # define RGB_MATRIX_HUE_STEP 8 # define RGB_MATRIX_SAT_STEP 8 diff --git a/keyboards/crkbd/keymaps/curry/keymap.c b/keyboards/crkbd/keymaps/curry/keymap.c index 7686c420ea2a..1ad628c920fb 100644 --- a/keyboards/crkbd/keymaps/curry/keymap.c +++ b/keyboards/crkbd/keymaps/curry/keymap.c @@ -6,10 +6,10 @@ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ ) \ LAYOUT_wrapper( \ - KC_GESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - M_LCTL, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, M_RALT, \ + 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, \ OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ - KC_GRV, OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, OS_RGUI \ + KC_LEAD,OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, KC_RGUI \ ) #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) @@ -32,6 +32,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), + [_WORKMAN] = LAYOUT_crkbd_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, @@ -40,8 +46,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_LOWER] = LAYOUT_wrapper( - _______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_PIPE, - KC_F11, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_F12, + KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F12, + KC_GRV, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, _______, _______, _______, _______, _______, _______ ), @@ -54,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_ADJUST] = LAYOUT_wrapper( \ - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, _______, _______, _______, _______, TG_MODS, _______ diff --git a/keyboards/crkbd/keymaps/curry/rules.mk b/keyboards/crkbd/keymaps/curry/rules.mk index 97f56f80483b..7d35d5f0f97a 100644 --- a/keyboards/crkbd/keymaps/curry/rules.mk +++ b/keyboards/crkbd/keymaps/curry/rules.mk @@ -2,22 +2,15 @@ # 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) -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. -SWAP_HANDS_ENABLE = no # Enable one-hand typing -RGB_MATRIX_ENABLE = WS2812 -TAP_DANCE_ENABLE = yes # Enable Tap Dance. -OLED_DRIVER_ENABLE = yes -BOOTLOADER = atmel-dfu -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -SPLIT_TRANSPORT = mirror +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +COMMAND_ENABLE = no + +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 + +OLED_DRIVER_ENABLE = yes + +BOOTLOADER = atmel-dfu +SPLIT_TRANSPORT = mirror diff --git a/keyboards/lily58/keymaps/curry/config.h b/keyboards/lily58/keymaps/curry/config.h index 9ab19bc3c021..a4c697df4208 100644 --- a/keyboards/lily58/keymaps/curry/config.h +++ b/keyboards/lily58/keymaps/curry/config.h @@ -5,3 +5,13 @@ #define OLED_DISABLE_TIMEOUT #define TAPPING_TERM_PER_KEY + +#if defined(RGBLIGHT_ENABLE) +# undef RGBLED_NUM +# define RGBLED_NUM 27 + +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 5 +# define RGBLIGHT_LIMIT_VAL 120 +#endif diff --git a/keyboards/lily58/keymaps/curry/keymap.c b/keyboards/lily58/keymaps/curry/keymap.c index a8183d36f3fa..bc779305a297 100644 --- a/keyboards/lily58/keymaps/curry/keymap.c +++ b/keyboards/lily58/keymaps/curry/keymap.c @@ -7,11 +7,11 @@ K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ ) \ LAYOUT_wrapper( \ - KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_GRV, \ - KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSLS, \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_GRV, \ + KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSLS, \ KC_LCTL, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ OS_LSFT, K31, K32, K33, K34, K35, KC_LBRC, KC_RBRC, K36, K37, K38, K39, K3A, OS_RSFT, \ - OS_LGUI, OS_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, OS_RGUI \ + KC_LEAD, OS_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, OS_RGUI \ ) #define LAYOUT_lily58_base_wrapper(...) LAYOUT_lily58_base(__VA_ARGS__) @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_wrapper( \ _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, MG_NKRO, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, RGB_IDL, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/lily58/keymaps/curry/rules.mk b/keyboards/lily58/keymaps/curry/rules.mk index 1b42868c915b..2137a15074dc 100644 --- a/keyboards/lily58/keymaps/curry/rules.mk +++ b/keyboards/lily58/keymaps/curry/rules.mk @@ -2,20 +2,15 @@ # 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) -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. -SWAP_HANDS_ENABLE = no # Enable one-hand typing -TAP_DANCE_ENABLE = yes # Enable Tap Dance. -OLED_DRIVER_ENABLE = yes -BOOTLOADER = atmel-dfu -SPLIT_TRANSPORT = mirror +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +COMMAND_ENABLE = no + +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = no + +OLED_DRIVER_ENABLE = yes + +BOOTLOADER = atmel-dfu +SPLIT_TRANSPORT = mirror diff --git a/users/curry/LICENSE.md b/users/curry/LICENSE similarity index 100% rename from users/curry/LICENSE.md rename to users/curry/LICENSE diff --git a/users/curry/config.h b/users/curry/config.h index 45b8364e126e..b982dab038f5 100644 --- a/users/curry/config.h +++ b/users/curry/config.h @@ -6,97 +6,82 @@ /* Set Polling rate to 1000Hz */ #define USB_POLLING_INTERVAL_MS 1 -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) # undef RGBLIGHT_ANIMATIONS -# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) -# define RGBLIGHT_SLEEP -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_SNAKE -# define RGBLIGHT_EFFECT_KNIGHT -# else -# define RGBLIGHT_ANIMATIONS -# endif +# define RGBLIGHT_SLEEP +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT #endif // RGBLIGHT_ENABLE -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) -// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) +#if defined(RGB_MATRIX_ENABLE) +# define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// # 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_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -// # define EECONFIG_RGB_MATRIX (uint32_t *)16 - -# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# 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 RGB_DISABLE_WHEN_USB_SUSPENDED true + +# define DISABLE_RGB_MATRIX_ALPHAS_MODS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BREATHING +# define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_VAL +# 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_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# 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_RAINBOW_MOVING_CHEVRON +# define DISABLE_RGB_MATRIX_DUAL_BEACON +# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +# 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 -# endif // AVR -#endif // RGB_MATRIX_ENABLE - -#ifndef ONESHOT_TAP_TOGGLE +# 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 +#endif // RGB_MATRIX_ENABLE + +#if !defined(ONESHOT_TAP_TOGGLE) # define ONESHOT_TAP_TOGGLE 2 #endif // !ONESHOT_TAP_TOGGLE -#ifndef ONESHOT_TIMEOUT +#if !defined(ONESHOT_TIMEOUT) # define ONESHOT_TIMEOUT 3000 #endif // !ONESHOT_TIMEOUT -#ifndef QMK_KEYS_PER_SCAN +#if !defined(QMK_KEYS_PER_SCAN) # define QMK_KEYS_PER_SCAN 4 #endif // !QMK_KEYS_PER_SCAN -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD -//#define RETRO_TAPPING #define FORCE_NKRO -#ifndef TAPPING_TOGGLE +#if !defined(TAPPING_TOGGLE) # define TAPPING_TOGGLE 1 #endif -#ifdef TAPPING_TERM +#if defined(TAPPING_TERM) # undef TAPPING_TERM #endif // TAPPING_TERM + #if defined(KEYBOARD_ergodox_ez) # define TAPPING_TERM 185 #elif defined(KEYBOARD_crkbd) @@ -107,12 +92,20 @@ #define TAP_CODE_DELAY 5 +#define LEADER_TIMEOUT 250 +#define LEADER_PER_KEY_TIMING + /* Disable unused and unneeded features to reduce on firmware size */ -#ifdef LOCKING_SUPPORT_ENABLE +#if defined(LOCKING_SUPPORT_ENABLE) # undef LOCKING_SUPPORT_ENABLE #endif -#ifdef LOCKING_RESYNC_ENABLE + +#if defined(LOCKING_RESYNC_ENABLE) # undef LOCKING_RESYNC_ENABLE #endif +#if defined(OLED_FONT_H) +# undef OLED_FONT_H +#endif + #define OLED_FONT_H "users/curry/glcdfont.c" diff --git a/users/curry/curry.c b/users/curry/curry.c index b6afa5ef2e7a..035355359154 100644 --- a/users/curry/curry.c +++ b/users/curry/curry.c @@ -53,15 +53,16 @@ void rgb_matrix_update_pwm_buffers(void); // On RESET, set all RGB to red, shutdown the keymap. void shutdown_user(void) { -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) rgblight_enable_noeeprom(); rgblight_mode_noeeprom(1); rgblight_setrgb_red(); -#endif // RGBLIGHT_ENABLE -#ifdef RGB_MATRIX_ENABLE +#endif + +#if defined(RGB_MATRIX_ENABLE) rgb_matrix_set_color_all(0xFF, 0x00, 0x00); rgb_matrix_update_pwm_buffers(); -#endif // RGB_MATRIX_ENABLE +#endif shutdown_keymap(); } @@ -77,7 +78,7 @@ __attribute__((weak)) void matrix_scan_keymap(void) {} // No global matrix scan code, so just run keymap's matrix // scan function -void matrix_scan_user(void) { +__attribute__((weak)) void matrix_scan_user(void) { static bool has_ran_yet; if (!has_ran_yet) { has_ran_yet = true; @@ -96,18 +97,16 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) // On Layer change, run keymap's layer change check layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +#if defined(RGBLIGHT_ENABLE) state = layer_state_set_rgb(state); -#endif // RGBLIGHT_ENABLE +#endif return layer_state_set_keymap(state); } __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } // Runs state check and changes underglow color and animation -layer_state_t default_layer_state_set_user(layer_state_t state) { - return default_layer_state_set_keymap(state); -} +layer_state_t default_layer_state_set_user(layer_state_t state) { return default_layer_state_set_keymap(state); } __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} diff --git a/users/curry/curry.h b/users/curry/curry.h index a9de9ae51025..ee4a73683562 100644 --- a/users/curry/curry.h +++ b/users/curry/curry.h @@ -1,18 +1,23 @@ #pragma once #include QMK_KEYBOARD_H - #include "version.h" #include "eeprom.h" #include "wrappers.h" #include "process_records.h" -#ifdef TAP_DANCE_ENABLE +#if defined(TAP_DANCE_ENABLE) # include "tap_dances.h" #endif // TAP_DANCE_ENABLE -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) -# include "rgb_stuff.h" + +#if defined(RGB_MATRIX_ENABLE) +# include "rgb_matrix_user.h" #endif + +#if defined(RGBLIGHT_ENABLE) +# include "rgb_lighting_user.h" +#endif + #if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA) # include "lufa.h" # include "split_util.h" @@ -23,6 +28,7 @@ enum userspace_layers { _QWERTY = 0, _COLEMAK, _DVORAK, + _WORKMAN, _MODS, _LOWER, _RAISE, diff --git a/users/curry/glcdfont.c b/users/curry/glcdfont.c index 2bfc3fac6d44..10ce3b345737 100644 --- a/users/curry/glcdfont.c +++ b/users/curry/glcdfont.c @@ -1,13 +1,4 @@ -#pragma once - -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ diff --git a/users/curry/leader.c b/users/curry/leader.c new file mode 100644 index 000000000000..3fca6a2ec396 --- /dev/null +++ b/users/curry/leader.c @@ -0,0 +1,24 @@ +#include "curry.h" +#include "leader.h" + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + static bool has_ran_yet; + if (!has_ran_yet) { + has_ran_yet = true; + startup_user(); + } + +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + matrix_scan_rgb(); +#endif // RGBLIGHT_ENABLE + LEADER_DICTIONARY() { + leading = false; + leader_end(); + SEQ_ONE_KEY(KC_F) { SEND_STRING(SS_LCTL("akf")); } // Select all and format + SEQ_ONE_KEY(KC_P) { SEND_STRING(SS_LCTL(SS_LSFT("4"))); } // Screenshot region + SEQ_TWO_KEYS(KC_D, KC_D) { SEND_STRING(SS_LCTL("ac")); } // Copy all + } + matrix_scan_keymap(); +} diff --git a/users/curry/leader.h b/users/curry/leader.h new file mode 100644 index 000000000000..f215893b9ebd --- /dev/null +++ b/users/curry/leader.h @@ -0,0 +1,3 @@ +#pragma once + +void matrix_scan_user(void); diff --git a/users/curry/oled.c b/users/curry/oled.c index 4eb23423eb61..fc87a46e50f4 100644 --- a/users/curry/oled.c +++ b/users/curry/oled.c @@ -1,6 +1,5 @@ #include "curry.h" -#ifdef OLED_DRIVER_ENABLE #define KEYLOGGER_LENGTH 5 static uint32_t oled_timer = 0; static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; @@ -26,6 +25,7 @@ static const char PROGMEM code_to_name[0xFF] = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx }; +// clang-format on void add_keylog(uint16_t keycode); oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } @@ -49,7 +49,7 @@ void add_keylog(uint16_t keycode) { } void render_keylogger_status(void) { - oled_write_P(PSTR("Keys"), false); + oled_write_P(PSTR("Keys:"), false); oled_write(keylog_str, false); } @@ -65,6 +65,9 @@ void render_default_layer_state(void) { case _DVORAK: oled_write_P(PSTR(" DVRK"), false); break; + case _WORKMAN: + oled_write_P(PSTR(" WRKM"), false); + break; } } @@ -139,11 +142,11 @@ void oled_task_user(void) { oled_off(); return; } -# ifndef SPLIT_KEYBOARD +#if !defined(SPLIT_KEYBOARD) else { oled_on(); } -# endif +#endif if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { @@ -158,5 +161,3 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } return true; } - -#endif diff --git a/users/curry/process_records.c b/users/curry/process_records.c index fd1d61ad9d80..fd58ea181b04 100644 --- a/users/curry/process_records.c +++ b/users/curry/process_records.c @@ -9,6 +9,11 @@ __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t bool process_record_user(uint16_t keycode, keyrecord_t *record) { xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); switch (keycode) { + case KC_QWERTY ... KC_WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(keycode - KC_QWERTY); + } + break; case KC_MAKE: if (!record->event.pressed) { uint8_t temp_mod = mod_config(get_mods()); @@ -19,18 +24,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) { send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); } - if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { - send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); - } -#ifdef RGB_MATRIX_SPLIT_RIGHT - send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); -# ifndef OLED_DRIVER_ENABLE - send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); -# endif -#endif - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); + send_string_with_delay_P(PSTR(" -j8 --output-sync\n"), TAP_CODE_DELAY); } - break; case VRSN: // Prints firmware version @@ -44,17 +39,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { copy_paste_timer = timer_read(); } else { if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - register_code(KC_LCTL); - tap_code(KC_C); - unregister_code(KC_LCTL); + tap_code16(LCTL(KC_C)); } else { // Tap, paste - register_code(KC_LCTL); - tap_code(KC_V); - unregister_code(KC_LCTL); + tap_code16(LCTL(KC_V)); } } break; -#ifdef UNICODE_ENABLE +#if defined(UNICODE_ENABLE) case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ if (record->event.pressed) { send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); diff --git a/users/curry/process_records.h b/users/curry/process_records.h index 6170ed4c7efc..49e7240c6786 100644 --- a/users/curry/process_records.h +++ b/users/curry/process_records.h @@ -1,36 +1,29 @@ #pragma once -#include "curry.h" - -#if defined(KEYMAP_SAFE_RANGE) -# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE -#else -# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE -#endif enum userspace_custom_keycodes { - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - KC_MAKE, // Run keyboard's customized make command - KC_RGB_T, // Toggles RGB Layer Indication mode - RGB_IDL, // RGB Idling animations - KC_SECRET_1, // test1 - KC_SECRET_2, // test2 - KC_SECRET_3, // test3 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ + VRSN = SAFE_RANGE, // Prints QMK Firmware and board info + KC_QWERTY, // Sets default layer to QWERTY + KC_COLEMAK, // Sets default layer to COLEMAK + KC_DVORAK, // Sets default layer to DVORAK + KC_WORKMAN, // Sets default layer to WORKMAN + KC_MAKE, // Run keyboard's customized make command + KC_RGB_T, // Toggles RGB Layer Indication mode + RGB_IDL, // RGB Idling animations + KC_SECRET_1, // test1 + KC_SECRET_2, // test2 + KC_SECRET_3, // test3 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ KC_DT1, KC_DT2, KC_DT3, KC_DT4, - NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes + NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes }; bool process_record_secrets(uint16_t keycode, keyrecord_t *record); @@ -52,25 +45,20 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define QWERTY KC_QWERTY #define DVORAK KC_DVORAK #define COLEMAK KC_COLEMAK +#define WORKMAN KC_WORKMAN -#define KC_RESET RESET -#define KC_RST KC_RESET +#define KC_RST RESET -#ifdef SWAP_HANDS_ENABLE +#if defined(SWAP_HANDS_ENABLE) # define KC_C1R3 SH_T(KC_TAB) #else // SWAP_HANDS_ENABLE # define KC_C1R3 KC_TAB #endif // SWAP_HANDS_ENABLE -#define BK_LWER LT(_LOWER, KC_BSPC) #define SP_LWER LT(_LOWER, KC_SPC) -#define DL_RAIS LT(_RAISE, KC_DEL) #define ET_RAIS LT(_RAISE, KC_ENTER) /* OSM keycodes, to keep things clean and easy to change */ -#define KC_MLSF OSM(MOD_LSFT) -#define KC_MRSF OSM(MOD_RSFT) - #define OS_LGUI OSM(MOD_LGUI) #define OS_RGUI OSM(MOD_RGUI) #define OS_LSFT OSM(MOD_LSFT) @@ -82,12 +70,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define OS_MEH OSM(MOD_MEH) #define OS_HYPR OSM(MOD_HYPR) -#define M_LALT ALT_T(KC_TAB) -#define M_RALT RALT_T(KC_QUOT) - -#define M_LCTL CTL_T(KC_TAB) -#define M_RCTL RCTL_T(KC_QUOT) - #define MT_ESC MT(MOD_LCTL, KC_ESC) #define ALT_APP ALT_T(KC_APP) diff --git a/users/curry/rgb_stuff.c b/users/curry/rgb_lighting_user.c similarity index 60% rename from users/curry/rgb_stuff.c rename to users/curry/rgb_lighting_user.c index 1129f70be9cc..25e1ce010433 100644 --- a/users/curry/rgb_stuff.c +++ b/users/curry/rgb_lighting_user.c @@ -1,138 +1,77 @@ #include "curry.h" -#include "rgb_stuff.h" -#include "eeprom.h" +#include "rgb_lighting_user.h" -#if defined(RGBLIGHT_ENABLE) extern rgblight_config_t rgblight_config; bool has_initialized; void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } -#endif // RGBLIGHT_ENABLE - -#if defined(RGB_MATRIX_ENABLE) -static uint32_t hypno_timer; -# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) -# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL -# else -# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN -# endif - -void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } - -void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } - -void check_default_layer(uint8_t mode, uint8_t type) { - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); - break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); - break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); - break; - } -} - -void rgb_matrix_indicators_user(void) { - if (userspace_config.rgb_layer_change && -# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED - !g_suspend_state && -# endif -# if defined(RGBLIGHT_ENABLE) - (!rgblight_config.enable && rgb_matrix_config.enable) -# else - rgb_matrix_config.enable -# endif - ) { - switch (get_highest_layer(layer_state)) { - case _RAISE: - rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); - break; - case _LOWER: - rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); - break; - case _ADJUST: - rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); - break; - default: { - check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); - break; - } - } - check_default_layer(0, LED_FLAG_MODIFIER); - } -} -#endif /* Custom indicators for modifiers. * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback. * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. */ -#ifdef RGBLIGHT_ENABLE -# ifdef INDICATOR_LIGHTS +#if defined(INDICATOR_LIGHTS) void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { -# ifdef SHFT_LED1 +# ifdef SHFT_LED1 rgblight_sethsv_at(120, 255, 255, SHFT_LED1); -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 rgblight_sethsv_at(120, 255, 255, SHFT_LED2); -# endif // SHFT_LED2 +# endif // SHFT_LED2 } else { -# ifdef SHFT_LED1 +# ifdef SHFT_LED1 rgblight_sethsv_default_helper(SHFT_LED1); -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 rgblight_sethsv_default_helper(SHFT_LED2); -# endif // SHFT_LED2 +# endif // SHFT_LED2 } if ((this_mod | this_osm) & MOD_MASK_CTRL) { -# ifdef CTRL_LED1 +# ifdef CTRL_LED1 rgblight_sethsv_at(0, 255, 255, CTRL_LED1); -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 rgblight_sethsv_at(0, 255, 255, CTRL_LED2); -# endif // CTRL_LED2 +# endif // CTRL_LED2 } else { -# ifdef CTRL_LED1 +# ifdef CTRL_LED1 rgblight_sethsv_default_helper(CTRL_LED1); -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 rgblight_sethsv_default_helper(CTRL_LED2); -# endif // CTRL_LED2 +# endif // CTRL_LED2 } if ((this_mod | this_osm) & MOD_MASK_GUI) { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_at(51, 255, 255, GUI_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_at(51, 255, 255, GUI_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } else { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_default_helper(GUI_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_default_helper(GUI_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } if ((this_mod | this_osm) & MOD_MASK_ALT) { -# ifdef ALT_LED1 +# ifdef ALT_LED1 rgblight_sethsv_at(240, 255, 255, ALT_LED1); -# endif // ALT_LED1 -# ifdef GUI_LED2 +# endif // ALT_LED1 +# ifdef GUI_LED2 rgblight_sethsv_at(240, 255, 255, ALT_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } else { -# ifdef GUI_LED1 +# ifdef GUI_LED1 rgblight_sethsv_default_helper(ALT_LED1); -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 rgblight_sethsv_default_helper(ALT_LED2); -# endif // GUI_LED2 +# endif // GUI_LED2 } } } @@ -143,9 +82,9 @@ void matrix_scan_indicator(void) { set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); } } -# endif // INDICATOR_LIGHTS +#endif // INDICATOR_LIGHTS -# ifdef RGBLIGHT_TWINKLE +#if defined(RGBLIGHT_TWINKLE) static rgblight_fadeout lights[RGBLED_NUM]; __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } @@ -153,40 +92,40 @@ __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ bool rgblight_twinkle_is_led_used(uint8_t index) { switch (index) { -# ifdef INDICATOR_LIGHTS -# ifdef SHFT_LED1 +# ifdef INDICATOR_LIGHTS +# ifdef SHFT_LED1 case SHFT_LED1: return true; -# endif // SHFT_LED1 -# ifdef SHFT_LED2 +# endif // SHFT_LED1 +# ifdef SHFT_LED2 case SHFT_LED2: return true; -# endif // SHFT_LED2 -# ifdef CTRL_LED1 +# endif // SHFT_LED2 +# ifdef CTRL_LED1 case CTRL_LED1: return true; -# endif // CTRL_LED1 -# ifdef CTRL_LED2 +# endif // CTRL_LED1 +# ifdef CTRL_LED2 case CTRL_LED2: return true; -# endif // CTRL_LED2 -# ifdef GUI_LED1 +# endif // CTRL_LED2 +# ifdef GUI_LED1 case GUI_LED1: return true; -# endif // GUI_LED1 -# ifdef GUI_LED2 +# endif // GUI_LED1 +# ifdef GUI_LED2 case GUI_LED2: return true; -# endif // GUI_LED2 -# ifdef ALT_LED1 +# endif // GUI_LED2 +# ifdef ALT_LED1 case ALT_LED1: return true; -# endif // ALT_LED1 -# ifdef ALT_LED2 +# endif // ALT_LED1 +# ifdef ALT_LED2 case ALT_LED2: return true; -# endif // ALT_LED2 -# endif // INDICATOR_LIGHTS +# endif // ALT_LED2 +# endif // INDICATOR_LIGHTS default: return rgblight_twinkle_is_led_used_keymap(index); } @@ -259,8 +198,7 @@ void start_rgb_light(void) { rgblight_sethsv_at(light->hue, 255, light->life, light_index); } -# endif -#endif // RGBLIGHT_ENABLE +#endif bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { uint16_t temp_keycode = keycode; @@ -269,15 +207,8 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { temp_keycode &= 0xFF; } -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - hypno_timer = timer_read32(); - if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); - } -#endif - switch (temp_keycode) { -#ifdef RGBLIGHT_TWINKLE +#if defined(RGBLIGHT_TWINKLE) case KC_A ... KC_SLASH: case KC_F1 ... KC_F12: case KC_INSERT ... KC_UP: @@ -290,7 +221,6 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { break; #endif // RGBLIGHT_TWINKLE case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) if (record->event.pressed) { userspace_config.rgb_layer_change ^= 1; dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); @@ -299,38 +229,16 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) } } -#endif // RGBLIGHT_ENABLE - break; - case RGB_IDL: // This allows me to use underglow as layer indication, or as normal -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (record->event.pressed) { - userspace_config.rgb_matrix_idle_anim ^= 1; - dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_matrix_idle_anim) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); - } - } -#endif break; case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions if (record->event.pressed) { bool is_eeprom_updated = false; -#ifdef RGBLIGHT_ENABLE // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled if (userspace_config.rgb_layer_change) { userspace_config.rgb_layer_change = false; dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); is_eeprom_updated = true; } -#endif -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim) { - userspace_config.rgb_matrix_idle_anim = false; - dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); - is_eeprom_updated = true; - } -#endif if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); } @@ -341,8 +249,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { } void keyboard_post_init_rgb(void) { -#if defined(RGBLIGHT_ENABLE) -# if defined(RGBLIGHT_STARTUP_ANIMATION) +#if defined(RGBLIGHT_STARTUP_ANIMATION) bool is_enabled = rgblight_config.enable; if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); @@ -361,44 +268,27 @@ void keyboard_post_init_rgb(void) { rgblight_disable_noeeprom(); } -# endif - layer_state_set_user(layer_state); -#endif -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); - } #endif + layer_state_set_user(layer_state); } void matrix_scan_rgb(void) { -#ifdef RGBLIGHT_ENABLE -# ifdef RGBLIGHT_TWINKLE +#if defined(RGBLIGHT_TWINKLE) scan_rgblight_fadeout(); -# endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE -# ifdef INDICATOR_LIGHTS +#if defined(INDICATOR_LIGHTS) matrix_scan_indicator(); -# endif -#endif - -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { - rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); - } #endif } -#ifdef RGBLIGHT_ENABLE void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { rgblight_sethsv_noeeprom(hue, sat, val); wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly rgblight_mode_noeeprom(mode); } -#endif layer_state_t layer_state_set_rgb(layer_state_t state) { -#ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { switch (get_highest_layer(state)) { case _RAISE: @@ -420,6 +310,9 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { case _DVORAK: rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); break; + case _WORKMAN: + rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); + break; default: rgblight_set_hsv_and_mode(HSV_CYAN, mode); break; @@ -428,44 +321,5 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { } } } -#endif // RGBLIGHT_ENABLE - return state; } - -#ifdef RGB_MATRIX_ENABLE -# include "lib/lib8tion/lib8tion.h" -extern led_config_t g_led_config; - -void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { - HSV hsv = {hue, sat, val}; - if (hsv.v > rgb_matrix_config.hsv.v) { - hsv.v = rgb_matrix_config.hsv.v; - } - - switch (mode) { - case 1: // breathing - { - uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); - hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - } - break; - } - default: // Solid Color - { - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - } - break; - } - } -} -#endif diff --git a/users/curry/rgb_lighting_user.h b/users/curry/rgb_lighting_user.h new file mode 100644 index 000000000000..91d7a7061e57 --- /dev/null +++ b/users/curry/rgb_lighting_user.h @@ -0,0 +1,19 @@ +#pragma once + +typedef struct { + bool enabled; + uint8_t hue; + uint16_t timer; + uint8_t life; +} rgblight_fadeout; + +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); +void keyboard_post_init_rgb(void); +void matrix_scan_rgb(void); +layer_state_t layer_state_set_rgb(layer_state_t state); +layer_state_t default_layer_state_set_rgb(layer_state_t state); +void rgblight_sethsv_default_helper(uint8_t index); + +#if defined(RGBLIGHT_TWINKLE) +void scan_rgblight_fadeout(void); +#endif diff --git a/users/curry/rgb_matrix_user.c b/users/curry/rgb_matrix_user.c new file mode 100644 index 000000000000..d1698b087c47 --- /dev/null +++ b/users/curry/rgb_matrix_user.c @@ -0,0 +1,144 @@ +#include "curry.h" +#include "rgb_matrix_user.h" +#include "lib/lib8tion/lib8tion.h" + +static uint32_t hypno_timer; +extern led_config_t g_led_config; + +#define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL + +void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } + +void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } + +void check_default_layer(uint8_t mode, uint8_t type) { + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); + break; + case _COLEMAK: + rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); + break; + case _DVORAK: + rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); + break; + case _WORKMAN: + rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type); + break; + } +} + +void rgb_matrix_indicators_user(void) { + if (userspace_config.rgb_layer_change && !g_suspend_state && rgb_matrix_config.enable) { + switch (get_highest_layer(layer_state)) { + case _RAISE: + rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + case _LOWER: + rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + case _ADJUST: + rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + default: { + check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); + break; + } + } + check_default_layer(0, LED_FLAG_MODIFIER); + } +} + +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { + uint16_t temp_keycode = keycode; + // Filter out the actual keycode from MT and LT keys. + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + temp_keycode &= 0xFF; + } + + hypno_timer = timer_read32(); + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } + + switch (temp_keycode) { + case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal + if (record->event.pressed) { + userspace_config.rgb_layer_change ^= 1; + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_layer_change) { + layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) + } + } + break; + case RGB_IDL: // This allows me to use underglow as layer indication, or as normal + if (record->event.pressed) { + userspace_config.rgb_matrix_idle_anim ^= 1; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } + } + break; + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions + if (record->event.pressed) { + bool is_eeprom_updated = false; + if (userspace_config.rgb_matrix_idle_anim) { + userspace_config.rgb_matrix_idle_anim = false; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + is_eeprom_updated = true; + } + if (is_eeprom_updated) { + eeconfig_update_user(userspace_config.raw); + } + } + break; + } + return true; +} + +void keyboard_post_init_rgb(void) { + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } +} + +void matrix_scan_rgb(void) { + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } +} + +void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { + HSV hsv = {hue, sat, val}; + if (hsv.v > rgb_matrix_config.hsv.v) { + hsv.v = rgb_matrix_config.hsv.v; + } + + switch (mode) { + case 1: // breathing + { + uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); + hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + break; + } + default: // Solid Color + { + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + break; + } + } +} diff --git a/users/curry/rgb_matrix_user.h b/users/curry/rgb_matrix_user.h new file mode 100644 index 000000000000..d7db29bff90a --- /dev/null +++ b/users/curry/rgb_matrix_user.h @@ -0,0 +1,7 @@ +#pragma once + +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); +void keyboard_post_init_rgb(void); +void matrix_scan_rgb(void); +void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); +void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); diff --git a/users/curry/rgb_stuff.h b/users/curry/rgb_stuff.h deleted file mode 100644 index 50b73c1c3cbe..000000000000 --- a/users/curry/rgb_stuff.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once -#include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -# include "rgb_matrix.h" -#endif - -#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) -typedef struct { - bool enabled; - uint8_t hue; - uint16_t timer; - uint8_t life; -} rgblight_fadeout; -#endif - -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); -void keyboard_post_init_rgb(void); -void matrix_scan_rgb(void); -layer_state_t layer_state_set_rgb(layer_state_t state); -layer_state_t default_layer_state_set_rgb(layer_state_t state); - -#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) -void scan_rgblight_fadeout(void); -#endif -#if defined(RGBLIGHT_ENABLE) -void rgblight_sethsv_default_helper(uint8_t index); -#endif - -#ifdef RGB_MATRIX_ENABLE -void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); -void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); -#endif diff --git a/users/curry/rules.mk b/users/curry/rules.mk index 2ebb807946bb..87d3b38eadf8 100644 --- a/users/curry/rules.mk +++ b/users/curry/rules.mk @@ -1,8 +1,15 @@ SRC += curry.c \ process_records.c -LTO_ENABLE = yes -SPACE_CADET_ENABLE = no +# Common flags +SPACE_CADET_ENABLE = no +LTO_ENABLE = yes +EXTRAKEY_ENABLE = yes +UNICODE_ENABLE = yes +NKRO_ENABLE = yes +EXTRAKEY_ENABLE = yes +LEADER_ENABLE = yes +TAP_DANCE_ENABLE = no ifneq ($(strip $(NO_SECRETS)), yes) ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") @@ -21,8 +28,12 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) SRC += oled.c endif +ifeq ($(strip $(LEADER_ENABLE)), yes) + SRC += leader.c +endif + ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) - SRC += rgb_stuff.c + SRC += rgb_lighting_user.c ifeq ($(strip $(INDICATOR_LIGHTS)), yes) OPT_DEFS += -DINDICATOR_LIGHTS endif @@ -39,10 +50,9 @@ endif RGB_MATRIX_ENABLE ?= no ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) - SRC += rgb_stuff.c + SRC += rgb_matrix_user.c endif - ifdef CONSOLE_ENABLE ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) OPT_DEFS += -DKEYLOGGER_ENABLE diff --git a/users/curry/tap_dances.c b/users/curry/tap_dances.c index fe62def0d4dd..166ea2c686ea 100644 --- a/users/curry/tap_dances.c +++ b/users/curry/tap_dances.c @@ -1,3 +1,4 @@ +#include "tap_dances.h" #include "curry.h" qk_tap_dance_action_t tap_dance_actions[] = {}; diff --git a/users/curry/tap_dances.h b/users/curry/tap_dances.h index 43ce12ffcf81..6f70f09beec2 100644 --- a/users/curry/tap_dances.h +++ b/users/curry/tap_dances.h @@ -1,3 +1 @@ #pragma once -#include "curry.h" - diff --git a/users/curry/wrappers.h b/users/curry/wrappers.h index fa181af2ef85..62e89a71755f 100644 --- a/users/curry/wrappers.h +++ b/users/curry/wrappers.h @@ -15,18 +15,6 @@ expanded before being used as arguments to the LAYOUT_xxx macro. #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) #define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) -/* -Blocks for each of the four major keyboard layouts -Organized so we can quickly adapt and modify all of them -at once, rather than for each keyboard, one at a time. -And this allows for much cleaner blocks in the keymaps. -For instance Tap/Hold for Control on all of the layouts - -NOTE: These are all the same length. If you do a search/replace - then you need to add/remove underscores to keep the - lengths consistent. -*/ - #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 @@ -51,6 +39,14 @@ NOTE: These are all the same length. If you do a search/replace #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_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 #define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 @@ -67,26 +63,26 @@ NOTE: These are all the same length. If you do a search/replace #define _________________LOWER_L1__________________ _________________FUNC_LEFT_________________ #define _________________LOWER_L2__________________ _________________SYM_LEFT__________________ -#define _________________LOWER_L3__________________ KC_DT1, KC_DT2, KC_DT3, KC_DT4, _______ +#define _________________LOWER_L3__________________ KC_DT1, KC_DT2, KC_DT3, KC_DT4, KC_CCCV #define _________________LOWER_R1__________________ _________________FUNC_RIGHT________________ #define _________________LOWER_R2__________________ _________________SYM_RIGHT_________________ -#define _________________LOWER_R3__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR +#define _________________LOWER_R3__________________ KC_DQUO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR #define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ #define _________________RAISE_L2__________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______ -#define _________________RAISE_L3__________________ _______, _______, _______, _______, _______ +#define _________________RAISE_L3__________________ UC_FLIP, UC_TABL, UC_SHRG, UC_DISA, _______ #define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ #define _________________RAISE_R2__________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ -#define _________________RAISE_R3__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC +#define _________________RAISE_R3__________________ KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG #define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, XXXXXXX +#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT // clang-format on From 2cd338cf7ee5671e6fc9ede213c5b13594551e09 Mon Sep 17 00:00:00 2001 From: bottilabo Date: Fri, 10 Jan 2020 06:21:58 +0900 Subject: [PATCH 182/973] Fix matrix_scan_user is not called at stm32 env(projectkb/alice etc..) which using cannonkeys/stm32f072 (#7821) --- keyboards/cannonkeys/stm32f072/keyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c index 32e30f334804..bf35a76c18d1 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.c +++ b/keyboards/cannonkeys/stm32f072/keyboard.c @@ -74,6 +74,7 @@ void matrix_scan_kb(void) #ifdef RGBLIGHT_ENABLE rgblight_task(); #endif + matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { @@ -175,4 +176,4 @@ void via_eeprom_reset(void) eeconfig_disable(); } -#endif // VIA_ENABLE \ No newline at end of file +#endif // VIA_ENABLE From 886eb98e2ae070019dc8032d93d4c751d3588a67 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 9 Jan 2020 14:28:56 -0800 Subject: [PATCH 183/973] KBD67 MKII Notes Update (#7824) * add readme to each of the mkii versions * update the most parent of kbd67 readmes to have history of the new versions * fix up the parent readme for the two types of boards * Update keyboards/kbdfans/kbd67/mkiirgb/readme.md Co-Authored-By: fauxpark * Update keyboards/kbdfans/kbd67/mkiirgb/readme.md Co-Authored-By: fauxpark * Update keyboards/kbdfans/kbd67/mkiirgb/readme.md Co-Authored-By: fauxpark * Update keyboards/kbdfans/kbd67/mkiirgb/readme.md Co-Authored-By: fauxpark * fixup readmes Co-authored-by: fauxpark --- .../kbdfans/kbd67/mkii_soldered/readme.md | 6 ++--- keyboards/kbdfans/kbd67/mkiirgb/readme.md | 15 ++++++++---- keyboards/kbdfans/kbd67/mkiirgb/v1/readme.md | 13 ++++++++++ keyboards/kbdfans/kbd67/mkiirgb/v2/readme.md | 13 ++++++++++ keyboards/kbdfans/kbd67/readme.md | 24 ++++++++++++------- 5 files changed, 54 insertions(+), 17 deletions(-) create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/v1/readme.md create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/v2/readme.md diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/readme.md index 313f244e14c6..d864c9e99b5d 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/readme.md +++ b/keyboards/kbdfans/kbd67/mkii_soldered/readme.md @@ -5,9 +5,9 @@ A simple 65% keyboard This is for the solderable PCB for the MKII. For hotswap PCB firmware, please check the other directories. -Keyboard Maintainer: [ai03](https://github.com/ai03-2725) / [KBDfans](https://kbdfans.cn/) -Hardware Supported: KBD67 MKII Soldered PCB (Not hotswap) -Hardware Availability: KBDfans +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725) / [KBDfans](https://kbdfans.cn/) +* Hardware Supported: KBD67 MKII Soldered PCB (Not hotswap) +* Hardware Availability: KBDfans Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/kbdfans/kbd67/mkiirgb/readme.md b/keyboards/kbdfans/kbd67/mkiirgb/readme.md index 71c2ffad2b2e..3a5621d84449 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/readme.md +++ b/keyboards/kbdfans/kbd67/mkiirgb/readme.md @@ -1,14 +1,19 @@ -# KBD67 Mk.II RGB +# KBD67 Mk.II RGB (Hotswap) A customizable 65% RGB keyboard. -Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) -Hardware Supported: KBD67 Mk.II RGB -Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: KBD67 Mk.II RGB V1 and V2 +* Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) +There are two versions of the KBD67 MKII RGB. 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 kbdfans/kbd67/mkiirgb:default + make kbdfans/kbd67/mkiirgb/v1:default # Arm (STM32F303) + make kbdfans/kbd67/mkiirgb/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/kbdfans/kbd67/mkiirgb/v1/readme.md b/keyboards/kbdfans/kbd67/mkiirgb/v1/readme.md new file mode 100644 index 000000000000..94550ef32000 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/readme.md @@ -0,0 +1,13 @@ +# KBD67 Mk.II RGB V1 (Hotswap) + +A hotswap 65% keyboard with USB C and inswitch RGB. + +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: KBD67 Mk.II RGB V1 +* Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd67/mkiirgb/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/kbdfans/kbd67/mkiirgb/v2/readme.md b/keyboards/kbdfans/kbd67/mkiirgb/v2/readme.md new file mode 100644 index 000000000000..57683caab9d1 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/readme.md @@ -0,0 +1,13 @@ +# KBD67 Mk.II RGB V2 (Hotswap) + +A hotswap 65% keyboard with USB C, inswitch RGB, and ESD protection. + +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: KBD67 Mk.II RGB V2 +* Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd67/mkiirgb/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/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index f1490d5bf141..2f5d10fa079c 100644 --- a/keyboards/kbdfans/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -1,22 +1,28 @@ # KBD67 -A 65% keyboard sold in four variants. -1. Rev1: Typical keyboard that had to be soldered together, supporting multiple layouts. The rev1 PCB is sold under the name "KBD65". -2. HotSwap: Released in late 2018, Hotswap single layout keyboard. -3. Rev2: Released in April/May 2019, the Rev2 also needs to be soldered together and supports multiple layouts. -4. MKII RGB: Released in September 2019. ARM powered hotswap board. +A 65% keyboard sold in several variants. + +1. [Rev1](rev1/): Released in early 2018. Atmega32u4 soldered keyboard. Sold under the name "KBD65". +2. [HotSwap](hotswap/): Released in late 2018. Atmega32U4 hotswap single layout keyboard. +3. [Rev2](rev2/): Released in April/May 2019. Atmega32u4 soldered keyboard. +4. [MKII](mkii_soldered/): Released in September 2019, designed by ai03. Atmega32u4 soldered keyboard. ESD Protected +5. [MKII RGB V1](mkiirgb/v1/): Released in September 2019. Arm hotswap board. +6. [MKII RGB V2](mkiirgb/v2/): Released in December 2019. Atmega32u4 hotswap board. ESD Protected. + **Firmware files are SPECIFIC to each board. Firmware files from one, will not work on the other.** Please use the `.hex` or `.bin` appropriate for your board. -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [moyi4681](https://github.com/moyi4681) -Hardware Supported: KBD67 rev1, rev2, hotswap, mkiirgb -Hardware Availability: KBDFans +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [moyi4681](https://github.com/moyi4681) +* Hardware Supported: KBD67 rev1, rev2, hotswap, mkii, mkiirgb v1, mkiirgb v2 +* Hardware Availability: KBDFans Make examples for this keyboard (after setting up your build environment): make kbdfans/kbd67/rev1:default make kbdfans/kbd67/rev2:default make kbdfans/kbd67/hotswap:default - make kbdfans/kbd67/mkiirgb:default + make kbdfans/kbd67/mkii_soldered:default + make kbdfans/kbd67/mkiirgb/v1:default + make kbdfans/kbd67/mkiirgb/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). From 5a02cc00a43cbeb9cc6ad94811acfb861d8f3929 Mon Sep 17 00:00:00 2001 From: shela Date: Fri, 10 Jan 2020 09:44:16 +0900 Subject: [PATCH 184/973] Fix docker script and document (#7786) Fixed error when keyboard parameter is omitted in interactive mode. --- docs/getting_started_build_tools.md | 4 ++-- util/docker_build.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index 95f17e4b2ecc..fea20e59b4dd 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -120,12 +120,12 @@ If this is a bit complex for you, Docker might be the turnkey solution you need. util/docker_build.sh keyboard:keymap # For example: util/docker_build.sh ergodox_ez:steno ``` -This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`. +This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, all keymaps are used. Note that the parameter format is the same as when building with `make`. You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use: ```bash util/docker_build.sh -# Reads parameters as input (leave blank for defaults) +# Reads parameters as input (leave blank for all keyboards/keymaps) ``` There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: diff --git a/util/docker_build.sh b/util/docker_build.sh index d8c4c759a346..bf13f5097548 100755 --- a/util/docker_build.sh +++ b/util/docker_build.sh @@ -37,6 +37,9 @@ else exit 1 fi fi +if [ -z "$keyboard" ]; then + keyboard=all +fi if [ -n "$target" ]; then if [ "$(uname)" = "Linux" ] || docker-machine active >/dev/null 2>&1; then usb_args="--privileged -v /dev:/dev" From e34af631c2c4b0c9406dead907bf74b460ee9f7f Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 10 Jan 2020 01:31:01 +0000 Subject: [PATCH 185/973] Refactor f103,f072,f042 based keyboards to use new MCU selection defaults (#7705) * refactor keyboards using ST_STM32F072B_DISCOVERY to use 'MCU = STM32F072' * refactor keyboards using GENERIC_STM32_F042X6 to use 'MCU = STM32F042' * refactor keyboards using GENERIC_STM32_F103 to use 'MCU = STM32F103' --- keyboards/at_at/660m/rules.mk | 38 +--------------- keyboards/candybar/rules.mk | 36 +-------------- keyboards/cannonkeys/an_c/rules.mk | 36 +-------------- keyboards/cannonkeys/chimera65/rules.mk | 36 +-------------- keyboards/cannonkeys/instant60/rules.mk | 38 +--------------- keyboards/cannonkeys/iron165/rules.mk | 37 +-------------- keyboards/cannonkeys/ortho48/rules.mk | 44 ++++-------------- keyboards/cannonkeys/ortho60/rules.mk | 44 ++++-------------- keyboards/cannonkeys/ortho75/rules.mk | 45 ++++--------------- keyboards/cannonkeys/practice60/rules.mk | 44 ++++-------------- keyboards/cannonkeys/practice65/rules.mk | 44 ++++-------------- keyboards/cannonkeys/satisfaction75/rules.mk | 34 +------------- keyboards/cannonkeys/savage65/rules.mk | 37 +-------------- keyboards/cannonkeys/tmov2/rules.mk | 45 +------------------ keyboards/converter/siemens_tastatur/rules.mk | 40 +++-------------- keyboards/handwired/ck4x4/rules.mk | 36 +-------------- keyboards/handwired/onekey/bluepill/rules.mk | 41 +++-------------- .../handwired/onekey/stm32f0_disco/rules.mk | 36 +-------------- keyboards/peiorisboards/ixora/rules.mk | 37 +-------------- keyboards/projectkb/alice/rules.mk | 37 ++------------- keyboards/retro_75/rules.mk | 36 +-------------- keyboards/vinta/rules.mk | 38 +--------------- 22 files changed, 83 insertions(+), 776 deletions(-) diff --git a/keyboards/at_at/660m/rules.mk b/keyboards/at_at/660m/rules.mk index 245cf23d575f..b893d8031bf7 100644 --- a/keyboards/at_at/660m/rules.mk +++ b/keyboards/at_at/660m/rules.mk @@ -1,39 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p df11 -v 0483 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk index a0365a20b5f9..0e1a8517fa64 100644 --- a/keyboards/candybar/rules.mk +++ b/keyboards/candybar/rules.mk @@ -1,37 +1,5 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY - -# Cortex version -MCU = cortex-m0 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 - -# 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=0x08005000 -OPT_DEFS = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 +# MCU name +MCU = STM32F072 # 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 f99075d815cf..151f72fd0fc2 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk @@ -1,35 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. @@ -40,8 +10,6 @@ VPATH += keyboards/cannonkeys/stm32f072 SRC = keyboard.c \ led.c -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave - #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/cannonkeys/chimera65/rules.mk b/keyboards/cannonkeys/chimera65/rules.mk index cd6734a312a9..1e300a99c701 100644 --- a/keyboards/cannonkeys/chimera65/rules.mk +++ b/keyboards/cannonkeys/chimera65/rules.mk @@ -1,35 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. @@ -40,8 +10,6 @@ VPATH += keyboards/cannonkeys/stm32f072 SRC = keyboard.c \ led.c -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave - #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index d1dd3b28999b..db753884daba 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -1,39 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/iron165/rules.mk b/keyboards/cannonkeys/iron165/rules.mk index 5480987a3375..edc84edd51f6 100644 --- a/keyboards/cannonkeys/iron165/rules.mk +++ b/keyboards/cannonkeys/iron165/rules.mk @@ -1,35 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. @@ -40,9 +10,6 @@ VPATH += keyboards/cannonkeys/stm32f072 SRC = keyboard.c \ led.c -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p DF11 - BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index 2e483a8c2cc0..4bca8fde0590 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -1,46 +1,18 @@ -# project specific files -VPATH += keyboards/cannonkeys/bluepill -SRC = led.c \ - keyboard.c +# MCU name +MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = GENERIC_STM32_F103 -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index 359f447a9cfc..d2fa535f4143 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -1,46 +1,18 @@ -# project specific files -VPATH += keyboards/cannonkeys/bluepill -SRC = led.c \ - keyboard.c +# MCU name +MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = GENERIC_STM32_F103 -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index 113fff5554d9..5b90e87fd7ef 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -1,47 +1,18 @@ -# project specific files -VPATH += keyboards/cannonkeys/bluepill -SRC = led.c \ - keyboard.c +# MCU name +MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = GENERIC_STM32_F103 -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 -DFU_ARGS = -d 1eaf:0003 -a 2 -R +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index cf8554c0c6ff..7c3fec31e639 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -1,46 +1,18 @@ -# project specific files -VPATH += keyboards/cannonkeys/bluepill -SRC = led.c \ - keyboard.c +# MCU name +MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = GENERIC_STM32_F103 -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index 8bbc910aadef..b43e591aeb64 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -1,46 +1,18 @@ -# project specific files -VPATH += keyboards/cannonkeys/bluepill -SRC = led.c \ - keyboard.c +# MCU name +MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = GENERIC_STM32_F103 -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk index e81448d626ac..7e0b15b92b58 100644 --- a/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -1,35 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. diff --git a/keyboards/cannonkeys/savage65/rules.mk b/keyboards/cannonkeys/savage65/rules.mk index c6789d6c3a7b..199dd10780c8 100644 --- a/keyboards/cannonkeys/savage65/rules.mk +++ b/keyboards/cannonkeys/savage65/rules.mk @@ -1,35 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. @@ -40,9 +10,6 @@ VPATH += keyboards/cannonkeys/stm32f072 SRC = keyboard.c \ led.c -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p DF11 - BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/cannonkeys/tmov2/rules.mk b/keyboards/cannonkeys/tmov2/rules.mk index 828fa8ff805f..e6f0ce30a13b 100644 --- a/keyboards/cannonkeys/tmov2/rules.mk +++ b/keyboards/cannonkeys/tmov2/rules.mk @@ -1,43 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 - -# Build Options -# comment out to disable the options. -# - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. @@ -48,9 +10,6 @@ VPATH += keyboards/cannonkeys/stm32f072 SRC = keyboard.c \ led.c -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p DF11 - BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/converter/siemens_tastatur/rules.mk b/keyboards/converter/siemens_tastatur/rules.mk index 75b3d7b36139..d89f7f5f6090 100644 --- a/keyboards/converter/siemens_tastatur/rules.mk +++ b/keyboards/converter/siemens_tastatur/rules.mk @@ -1,43 +1,15 @@ -SRC = matrix.c +# MCU name +MCU = STM32F103 + # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = GENERIC_STM32_F103 -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 - -DFU_ARGS = -d 1eaf:0003 -a 2 +SRC = matrix.c #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/handwired/ck4x4/rules.mk b/keyboards/handwired/ck4x4/rules.mk index 7ed9022e656d..cd4bc260f3fe 100644 --- a/keyboards/handwired/ck4x4/rules.mk +++ b/keyboards/handwired/ck4x4/rules.mk @@ -1,37 +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) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index aeda2782b91a..69436650b5e6 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -1,41 +1,10 @@ -# GENERIC STM32F103C8T6 board - stm32duino bootloader -BOARD = GENERIC_STM32_F103 +# MCU name +MCU = STM32F103 +# GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS ?= -v 1eaf -p 0003 - -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 diff --git a/keyboards/handwired/onekey/stm32f0_disco/rules.mk b/keyboards/handwired/onekey/stm32f0_disco/rules.mk index 69639f940eaa..fe5e3f824f31 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/rules.mk +++ b/keyboards/handwired/onekey/stm32f0_disco/rules.mk @@ -1,34 +1,2 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p df11 -v 0483 +# MCU name +MCU = STM32F072 diff --git a/keyboards/peiorisboards/ixora/rules.mk b/keyboards/peiorisboards/ixora/rules.mk index 9d89d9663635..0cea106d0581 100644 --- a/keyboards/peiorisboards/ixora/rules.mk +++ b/keyboards/peiorisboards/ixora/rules.mk @@ -1,38 +1,5 @@ -# project specific files - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F042x6 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F042X6 - -# Cortex version -MCU = cortex-m0 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 - -# 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 = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +# MCU name +MCU = STM32F042 # Build Options # comment out to disable the options. diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index 92887833527b..96904aef3d9b 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk @@ -1,35 +1,5 @@ -# project specific files -# SRC = ssd1306.c -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 +# MCU name +MCU = STM32F072 # Build Options # comment out to disable the options. @@ -51,4 +21,5 @@ CUSTOM_MATRIX = no # Custom matrix file # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason RGBLIGHT_ENABLE = yes -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes diff --git a/keyboards/retro_75/rules.mk b/keyboards/retro_75/rules.mk index 82a2cfb06f95..d3ead7f6461c 100644 --- a/keyboards/retro_75/rules.mk +++ b/keyboards/retro_75/rules.mk @@ -1,37 +1,5 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# 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 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p df11 -v 0483 +# MCU name +MCU = STM32F072 # Build Options # change yes to no to disable diff --git a/keyboards/vinta/rules.mk b/keyboards/vinta/rules.mk index 90485c4356d3..6d9fc0da1d60 100644 --- a/keyboards/vinta/rules.mk +++ b/keyboards/vinta/rules.mk @@ -1,39 +1,5 @@ -# project specific files - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F042x6 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F042X6 - -# Cortex version -MCU = cortex-m0 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 - -# 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 = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p DF11 -v 0483 +# MCU name +MCU = STM32F042 # Build Options # comment out to disable the options. From 7f388b65530b06779089be6cb4ddc56b2ecb36ff Mon Sep 17 00:00:00 2001 From: zk-phi Date: Fri, 10 Jan 2020 16:48:06 +0900 Subject: [PATCH 186/973] Add per-key IGNORE_MOD_TAP_INTERRUPT feature (#7838) * Implement IGNORE_MOD_TAP_INTERRUPT_PER_KEY - Add configurable option IGNORE_MOD_TAP_INTERRUPT_PER_KEY - Add function get_ignore_mod_tap_interrupt iff the option is enabled Unless IGNORE_MOD_TAP_INTERRUPT_PER_KEY is defined, this patch does not affect the resulting binary. * Add documentation for IGNORE_MOD_TAP_INTERRUPT_PER_KEY --- docs/config_options.md | 2 ++ docs/custom_quantum_functions.md | 35 +++++++++++++++++++++++++++----- docs/ja/config_options.md | 2 ++ tmk_core/common/action.c | 12 +++++++++-- 4 files changed, 44 insertions(+), 7 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index ea5a8929540e..0b83ed9e4af7 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -143,6 +143,8 @@ If you define these options you will enable the associated feature, which may in * `#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](feature_advanced_keycodes.md#ignore-mod-tap-interrupt) for details +* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY` + * enables handling for per key `IGNORE_MOD_TAP_INTERRUPT` settings * `#define TAPPING_FORCE_HOLD` * 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) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 71a30bc7c6b2..9c8f89ae18d9 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -489,14 +489,24 @@ The `val` is the value of the data that you want to write to EEPROM. And the `e # Custom Tapping Term -By default, the tapping term is defined globally, and is not configurable by key. For most users, this is perfectly fine. But in come cases, dual function keys would be greatly improved by different timeouts than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable `TAPPING_TERM`. +By default, the tapping term and related options (such as `IGNORE_MOD_TAP_INTERRUPT`) are defined globally, and are not configurable by key. For most users, this is perfectly fine. But in some cases, dual function keys would be greatly improved by different timeout behaviors than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable timeout behaviors. -To enable this functionality, you need to add `#define TAPPING_TERM_PER_KEY` to your `config.h`, first. +There are two configurable options to control per-key timeout behaviors: + +- `TAPPING_TERM_PER_KEY` +- `IGNORE_MOD_TAP_INTERRUPT_PER_KEY` + +You need to add `#define` lines to your `config.h` for each feature you want. + +``` +#define TAPPING_TERM_PER_KEY +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY +``` ## Example `get_tapping_term` Implementation -To change the `TAPPING TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file: +To change the `TAPPING_TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file: ```c uint16_t get_tapping_term(uint16_t keycode) { @@ -511,6 +521,21 @@ uint16_t get_tapping_term(uint16_t keycode) { } ``` -### `get_tapping_term` Function Documentation +## Example `get_ignore_mod_tap_interrupt` Implementation + +To change the `IGNORE_MOD_TAP_INTERRUPT` value based on the keycode, you'd want to add something like the following to your `keymap.c` file: + +```c +bool get_ignore_mod_tap_interrupt(uint16_t keycode) { + switch (keycode) { + case SFT_T(KC_SPC): + return true; + default: + return false; + } +} +``` + +## `get_tapping_term` / `get_ignore_mod_tap_interrupt` Function Documentation -Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only a user level function is useful here, so no need to mark it as such. +Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only user level functions are useful here, so no need to mark them as such. diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index a3816f16d76a..6cdbd2cf1f37 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -148,6 +148,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * `#define IGNORE_MOD_TAP_INTERRUPT` * 両方のキーに `TAPPING_TERM` を適用することで、ホールド時に他のキーに変換するキーを使ってローリングコンボ (zx) をすることができるようにします * 詳細は [Mod tap interrupt](ja/feature_advanced_keycodes.md#ignore-mod-tap-interrupt) を見てください +* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY` + * キーごとの `IGNORE_MOD_TAP_INTERRUPT` 設定の処理を有効にします * `#define TAPPING_FORCE_HOLD` * タップされた直後に、デュアルロールキーを修飾子として使用できるようにします * [Hold after tap](ja/feature_advanced_keycodes.md#tapping-force-hold)を見てください diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 7fbdbd8c3cdb..d6062703ee68 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -47,6 +47,10 @@ int retro_tapping_counter = 0; # include #endif +#ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY +__attribute__ ((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode) { return false; } +#endif + #ifndef TAP_CODE_DELAY # define TAP_CODE_DELAY 0 #endif @@ -308,8 +312,12 @@ void process_action(keyrecord_t *record, action_t action) { default: if (event.pressed) { if (tap_count > 0) { -# ifndef IGNORE_MOD_TAP_INTERRUPT - if (record->tap.interrupted) { +# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) + if ( +# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY + !get_ignore_mod_tap_interrupt(get_event_keycode(record->event)) && +# endif + record->tap.interrupted) { dprint("mods_tap: tap: cancel: add_mods\n"); // ad hoc: set 0 to cancel tap record->tap.count = 0; From 9397bffd014c1b7f8db28675c840499f9003098b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 10 Jan 2020 18:50:56 +1100 Subject: [PATCH 187/973] Fix a couple of USB VIDs for the API (#7848) --- keyboards/handwired/promethium/config.h | 13 +++++-------- keyboards/uk78/config.h | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index f05273d25485..f9560206b49c 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -19,15 +19,12 @@ along with this program. If not, see . #include "config_common.h" -#define USB_VENDOR_ID_LENOVO 0x17ef -#define USB_DEVICE_ID_LENOVO_TPKBD 0x6009 -#define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047 -#define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048 -#define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067 - /* USB Device descriptor parameter */ -#define VENDOR_ID USB_VENDOR_ID_LENOVO -#define PRODUCT_ID USB_DEVICE_ID_LENOVO_CBTKBD +#define VENDOR_ID 0x17EF // Lenovo +//#define PRODUCT_ID 0x6009 // ThinkPad Keyboard with TrackPoint +//#define PRODUCT_ID 0x6047 // ThinkPad Compact USB Keyboard with TrackPoint +#define PRODUCT_ID 0x6048 // ThinkPad Compact Bluetooth Keyboard with TrackPoint +//#define PRODUCT_ID 0x6067 // ThinkPad Pro Docking Station #define DEVICE_VER 0x0001 #define MANUFACTURER Priyadi #define PRODUCT Promethium Keyboard diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 879360773faa..5459e687b67e 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -21,8 +21,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x554B /* Ascii */ -#define PRODUCT_ID 0x004E +#define VENDOR_ID 0x554B // "UK" +#define PRODUCT_ID 0x004E // 78 #define DEVICE_VER 0x0002 #define MANUFACTURER UK Keyboards #define PRODUCT UK78 From af77912d2d6b426201d75c84e8836d6d5d8c45c5 Mon Sep 17 00:00:00 2001 From: pngu <34752364+itspngu@users.noreply.github.com> Date: Fri, 10 Jan 2020 09:57:49 +0100 Subject: [PATCH 188/973] [Keyboard] Changes to support latest release of VIA, moved files to "idb" folder in "keymaps" in preparation of adding more boards, made changes to LAYOUT_ macros (#7798) * make vendor folder for idb keyboards * set default debounce to eager_pk, clean up vendor/product ID * refactoring for VIA * made changes to support latest release of VIA, added default keymap that's in line with the most popular configuration * Made suggested formatting changes * rebase to get rid of lufa files * removed idb_60.json that's only meant for via itself * Update keyboards/idb/idb_60/keymaps/via/rules.mk * Update keyboards/idb/idb_60/readme.md * Update keyboards/idb/idb_60/readme.md * Update keyboards/idb/idb_60/readme.md * Update keyboards/idb/idb_60/rules.mk * Update keyboards/idb/idb_60/config.h * Update keyboards/idb/idb_60/readme.md * made suggested formatting changes * fixing lufa * Update keyboards/idb/idb_60/rules.mk * Update keyboards/idb/idb_60/config.h * made suggested changes --- keyboards/{ => idb}/idb_60/config.h | 10 +- keyboards/{ => idb}/idb_60/idb_60.c | 0 keyboards/idb/idb_60/idb_60.h | 60 ++ keyboards/idb/idb_60/info.json | 648 ++++++++++++++++++ .../idb_60/keymaps/all_keys}/keymap.c | 22 +- keyboards/idb/idb_60/keymaps/default/keymap.c | 46 ++ .../{ => idb}/idb_60/keymaps/pngu/keymap.c | 0 keyboards/idb/idb_60/keymaps/via/keymap.c | 46 ++ keyboards/idb/idb_60/keymaps/via/rules.mk | 2 + keyboards/{ => idb}/idb_60/readme.md | 13 +- keyboards/idb/idb_60/rules.mk | 28 + keyboards/idb_60/idb_60.h | 38 - keyboards/idb_60/info.json | 76 -- keyboards/idb_60/rules.mk | 29 - 14 files changed, 864 insertions(+), 154 deletions(-) rename keyboards/{ => idb}/idb_60/config.h (94%) rename keyboards/{ => idb}/idb_60/idb_60.c (100%) create mode 100644 keyboards/idb/idb_60/idb_60.h create mode 100644 keyboards/idb/idb_60/info.json rename keyboards/{idb_60/keymaps/default => idb/idb_60/keymaps/all_keys}/keymap.c (51%) create mode 100644 keyboards/idb/idb_60/keymaps/default/keymap.c rename keyboards/{ => idb}/idb_60/keymaps/pngu/keymap.c (100%) create mode 100644 keyboards/idb/idb_60/keymaps/via/keymap.c create mode 100644 keyboards/idb/idb_60/keymaps/via/rules.mk rename keyboards/{ => idb}/idb_60/readme.md (72%) create mode 100644 keyboards/idb/idb_60/rules.mk delete mode 100644 keyboards/idb_60/idb_60.h delete mode 100644 keyboards/idb_60/info.json delete mode 100644 keyboards/idb_60/rules.mk diff --git a/keyboards/idb_60/config.h b/keyboards/idb/idb_60/config.h similarity index 94% rename from keyboards/idb_60/config.h rename to keyboards/idb/idb_60/config.h index f5538c291edf..f7904cf60442 100644 --- a/keyboards/idb_60/config.h +++ b/keyboards/idb/idb_60/config.h @@ -20,10 +20,10 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x6060 // 24672 -#define PRODUCT_ID 0x6060 // 24672 -#define DEVICE_VER 0x0001 -#define MANUFACTURER pngu +#define VENDOR_ID 0x494B // "IB" for idb Keyboards +#define PRODUCT_ID 0x0001 // idb 60 +#define DEVICE_VER 0x0001 +#define MANUFACTURER idb Keyboards #define PRODUCT idb 60 #define DESCRIPTION QMK keyboard firmware for idb 60 @@ -48,7 +48,7 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +/* Debounce reduces chatter (unintended double-presses) - see https://docs.qmk.fm/#/feature_debounce_type for more information */ #define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ diff --git a/keyboards/idb_60/idb_60.c b/keyboards/idb/idb_60/idb_60.c similarity index 100% rename from keyboards/idb_60/idb_60.c rename to keyboards/idb/idb_60/idb_60.c diff --git a/keyboards/idb/idb_60/idb_60.h b/keyboards/idb/idb_60/idb_60.h new file mode 100644 index 000000000000..c47d6b292726 --- /dev/null +++ b/keyboards/idb/idb_60/idb_60.h @@ -0,0 +1,60 @@ +#pragma once + +#include "quantum.h" + +inline void _idb_60_caps_led_on(void) { + writePinLow(C5); +} + +inline void _idb_60_esc_led_on(void) { + writePinLow(C4); +} + +inline void _idb_60_caps_led_off(void) { + writePinLow(C5); +} + +inline void _idb_60_esc_led_off(void) { + writePinLow(C4); +} + +#define LAYOUT( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76,\ + K80, K90, K81, K93, K95, K86, K96\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, KC_NO, KC_NO, KC_NO, KC_NO, K86 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, K96 } \ +} + +#define LAYOUT_all LAYOUT + +#define LAYOUT_default( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56,\ + K60, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76,\ + K80, K81, K93, K95, K96\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K93, KC_NO, K95, K96 } \ +} + diff --git a/keyboards/idb/idb_60/info.json b/keyboards/idb/idb_60/info.json new file mode 100644 index 000000000000..a4b5d2332d28 --- /dev/null +++ b/keyboards/idb/idb_60/info.json @@ -0,0 +1,648 @@ +{ + "keyboard_name":"idb 60", + "url":"https://idb-keyboards.xyz/60", + "maintainer":"pngu", + "width":15, + "height":5, + "layouts":{ + "LAYOUT":{ + "LAYOUT_default":[ + { + "label":"Esc", + "x":0, + "y":0 + }, + { + "label":"!\n1", + "x":1, + "y":0 + }, + { + "label":"@\n2", + "x":2, + "y":0 + }, + { + "label":"#\n3", + "x":3, + "y":0 + }, + { + "label":"$\n4", + "x":4, + "y":0 + }, + { + "label":"%\n5", + "x":5, + "y":0 + }, + { + "label":"^\n6", + "x":6, + "y":0 + }, + { + "label":"&\n7", + "x":7, + "y":0 + }, + { + "label":"*\n8", + "x":8, + "y":0 + }, + { + "label":"(\n9", + "x":9, + "y":0 + }, + { + "label":")\n0", + "x":10, + "y":0 + }, + { + "label":"_\n-", + "x":11, + "y":0 + }, + { + "label":"+\n=", + "x":12, + "y":0 + }, + { + "label":"BS", + "x":13, + "y":0, + "w":2.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":"{\n[", + "x":11.5, + "y":1 + }, + { + "label":"}\n]", + "x":12.5, + "y":1 + }, + { + "label":"|\n\\", + "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":":\n;", + "x":10.75, + "y":2 + }, + { + "label":"\"\n'", + "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":"<\n,", + "x":9.25, + "y":3 + }, + { + "label":">\n.", + "x":10.25, + "y":3 + }, + { + "label":"?\n/", + "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.5 + }, + { + "label":"Alt", + "x":2.5, + "y":4, + "w":1.5 + }, + { + "label":"", + "x":4, + "y":4, + "w":7 + }, + { + "label":"Alt", + "x":11, + "y":4, + "w":1.5 + }, + { + "label":"Ctrl", + "x":13.5, + "y":4, + "w":1.5 + } + ], + "LAYOUT_all":[ + { + "label":"Esc", + "x":0, + "y":0 + }, + { + "label":"!\n1", + "x":1, + "y":0 + }, + { + "label":"@\n2", + "x":2, + "y":0 + }, + { + "label":"#\n3", + "x":3, + "y":0 + }, + { + "label":"$\n4", + "x":4, + "y":0 + }, + { + "label":"%\n5", + "x":5, + "y":0 + }, + { + "label":"^\n6", + "x":6, + "y":0 + }, + { + "label":"&\n7", + "x":7, + "y":0 + }, + { + "label":"*\n8", + "x":8, + "y":0 + }, + { + "label":"(\n9", + "x":9, + "y":0 + }, + { + "label":")\n0", + "x":10, + "y":0 + }, + { + "label":"_\n-", + "x":11, + "y":0 + }, + { + "label":"+\n=", + "x":12, + "y":0 + }, + { + "label":"BS", + "x":13, + "y":0 + }, + { + "label":"~\n`", + "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":"{\n[", + "x":11.5, + "y":1 + }, + { + "label":"}\n]", + "x":12.5, + "y":1 + }, + { + "label":"|\n\\", + "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":":\n;", + "x":10.75, + "y":2 + }, + { + "label":"\"\n'", + "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":">\n<\n\n|", + "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":"<\n,", + "x":9.25, + "y":3 + }, + { + "label":">\n.", + "x":10.25, + "y":3 + }, + { + "label":"?\n/", + "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.5 + }, + { + "label":"Win", + "x":1.5, + "y":4 + }, + { + "label":"Alt", + "x":2.5, + "y":4, + "w":1.5 + }, + { + "label":"", + "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 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/idb_60/keymaps/default/keymap.c b/keyboards/idb/idb_60/keymaps/all_keys/keymap.c similarity index 51% rename from keyboards/idb_60/keymaps/default/keymap.c rename to keyboards/idb/idb_60/keymaps/all_keys/keymap.c index 48c998774979..9f2ef36a1f27 100644 --- a/keyboards/idb_60/keymaps/default/keymap.c +++ b/keyboards/idb/idb_60/keymaps/all_keys/keymap.c @@ -2,20 +2,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( + [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_NO, 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_NUBS, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_MENU, KC_RCTL ), - [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, _______, _______, + [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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/idb/idb_60/keymaps/default/keymap.c b/keyboards/idb/idb_60/keymaps/default/keymap.c new file mode 100644 index 000000000000..22f208caaca9 --- /dev/null +++ b/keyboards/idb/idb_60/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_default( + 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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_default( + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + +}; + +// Layer LED indicators + +layer_state_t layer_state_set_user(layer_state_t state) { + if (layer_state_cmp(state, 1)) { + _idb_60_esc_led_on(); + } else { + _idb_60_esc_led_off(); + } + + return state; +} \ No newline at end of file diff --git a/keyboards/idb_60/keymaps/pngu/keymap.c b/keyboards/idb/idb_60/keymaps/pngu/keymap.c similarity index 100% rename from keyboards/idb_60/keymaps/pngu/keymap.c rename to keyboards/idb/idb_60/keymaps/pngu/keymap.c diff --git a/keyboards/idb/idb_60/keymaps/via/keymap.c b/keyboards/idb/idb_60/keymaps/via/keymap.c new file mode 100644 index 000000000000..22f208caaca9 --- /dev/null +++ b/keyboards/idb/idb_60/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_default( + 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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_default( + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + +}; + +// Layer LED indicators + +layer_state_t layer_state_set_user(layer_state_t state) { + if (layer_state_cmp(state, 1)) { + _idb_60_esc_led_on(); + } else { + _idb_60_esc_led_off(); + } + + return state; +} \ No newline at end of file diff --git a/keyboards/idb/idb_60/keymaps/via/rules.mk b/keyboards/idb/idb_60/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/idb/idb_60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/idb_60/readme.md b/keyboards/idb/idb_60/readme.md similarity index 72% rename from keyboards/idb_60/readme.md rename to keyboards/idb/idb_60/readme.md index e6ed6822b6ec..df25e8778f55 100644 --- a/keyboards/idb_60/readme.md +++ b/keyboards/idb/idb_60/readme.md @@ -8,10 +8,19 @@ Hardware Availability: [/u/omgitspngu](https://www.reddit.com/user/omgitspngu/) Make example for this keyboard (after setting up your build environment): - make idb_60:default + make idb/idb_60:default Or to make and flash: - make idb_60:default:dfu + make idb/idb_60:default:flash + +To compile VIA firmware: + + make idb/idb_60:via + +LAYOUT_* Macros: + + * *LAYOUT_default*: ANSI WKL with full Backspace + * *LAYOUT_all*: All split keys are available 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/idb/idb_60/rules.mk b/keyboards/idb/idb_60/rules.mk new file mode 100644 index 000000000000..289e77f77161 --- /dev/null +++ b/keyboards/idb/idb_60/rules.mk @@ -0,0 +1,28 @@ +# 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 +# Comment out to disable the options. +BOOTMAGIC_ENABLE = lite +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 +KEYBOARD_LOCK_ENABLE = no # Allow locking of keyboard via magic key +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 +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +DEBOUNCE_TYPE = eager_pk # Eager debounce type diff --git a/keyboards/idb_60/idb_60.h b/keyboards/idb_60/idb_60.h deleted file mode 100644 index e9045f664201..000000000000 --- a/keyboards/idb_60/idb_60.h +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once - -#include "quantum.h" - -inline void _idb_60_caps_led_on(void) { - writePinLow(C5); -} - -inline void _idb_60_esc_led_on(void) { - writePinLow(C4); -} - -inline void _idb_60_caps_led_off(void) { - writePinLow(C5); -} - -inline void _idb_60_esc_led_off(void) { - writePinLow(C4); -} - -#define LAYOUT( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36,\ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56,\ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76,\ - K80, K90, K81, K93, K95, K86, K96\ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16 }, \ - { K20, K21, K22, K23, K24, K25, K26 }, \ - { K30, K31, K32, K33, K34, K35, K36 }, \ - { K40, K41, K42, K43, K44, K45, KC_NO }, \ - { K50, K51, K52, K53, K54, K55, K56 }, \ - { K60, K61, K62, K63, K64, K65, K66 }, \ - { K70, K71, K72, K73, K74, K75, K76 }, \ - { K80, K81, KC_NO, KC_NO, KC_NO, KC_NO, K86 }, \ - { K90, KC_NO, KC_NO, K93, KC_NO, K95, K96 } \ -} diff --git a/keyboards/idb_60/info.json b/keyboards/idb_60/info.json deleted file mode 100644 index 9bbe580bf1fe..000000000000 --- a/keyboards/idb_60/info.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "keyboard_name": "idb_60", - "url": "https://idb-keyboards.xyz/60", - "maintainer": "pngu", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"Esc","x":0,"y":0}, - {"label":"!\n1","x":1,"y":0}, - {"label":"@\n2","x":2,"y":0}, - {"label":"#\n3","x":3,"y":0}, - {"label":"$\n4","x":4,"y":0}, - {"label":"%\n5","x":5,"y":0}, - {"label":"^\n6","x":6,"y":0}, - {"label":"&\n7","x":7,"y":0}, - {"label":"*\n8","x":8,"y":0}, - {"label":"(\n9","x":9,"y":0}, - {"label":")\n0","x":10,"y":0}, - {"label":"_\n-","x":11,"y":0}, - {"label":"+\n=","x":12,"y":0}, - {"label":"BS","x":13,"y":0}, - {"label":"~\n`","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":"{\n[","x":11.5,"y":1}, - {"label":"}\n]","x":12.5,"y":1}, - {"label":"|\n\\","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":":\n;","x":10.75,"y":2}, - {"label":"\"\n'","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":">\n<\n\n|","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":"<\n,","x":9.25,"y":3}, - {"label":">\n.","x":10.25,"y":3}, - {"label":"?\n/","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.5}, - {"label":"Win","x":1.5,"y":4}, - {"label":"Alt","x":2.5,"y":4,"w":1.5}, - {"label":"","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/idb_60/rules.mk b/keyboards/idb_60/rules.mk deleted file mode 100644 index b57f12db6a91..000000000000 --- a/keyboards/idb_60/rules.mk +++ /dev/null @@ -1,29 +0,0 @@ -# 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 -# 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) -# 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 -# 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 -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID From b1b52c37c7e6f198052aa7f1da77db73f893ac9b Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Fri, 10 Jan 2020 03:52:36 -0600 Subject: [PATCH 189/973] [Keymap] Update my iris keymap for LTO and rgbled split (#7849) --- keyboards/keebio/iris/keymaps/sethBarberee/config.h | 1 + keyboards/keebio/iris/keymaps/sethBarberee/rules.mk | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/config.h b/keyboards/keebio/iris/keymaps/sethBarberee/config.h index fd5bda866638..c031c03261ff 100644 --- a/keyboards/keebio/iris/keymaps/sethBarberee/config.h +++ b/keyboards/keebio/iris/keymaps/sethBarberee/config.h @@ -35,6 +35,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +#undef RGBLED_SPLIT #define RGBLED_SPLIT { RGBLED_NUM, 0} // defined to sync animations #define FORCE_NKRO // force NKRO on by default diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk b/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk index d7bc1927dcdf..5df198b7bcc5 100644 --- a/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk +++ b/keyboards/keebio/iris/keymaps/sethBarberee/rules.mk @@ -1,8 +1,9 @@ BOOTMAGIC_ENABLE = no +CONSOLE_ENABLE = no EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 my Red LEDS RGBLIGHT_ENABLE = yes # Enable my RGBS VELOCIKEY_ENABLE = yes # I like RGB TAP_DANCE_ENABLE = yes # fancy fancy Caps -LINK_TIME_OPTIMIZATION = yes # Enable link time optimization +LTO_ENABLE = yes # Enable link time optimization From 7d7bb5bf82cd6527ec779254ccc21270f3eeecb9 Mon Sep 17 00:00:00 2001 From: Patrick Fruh <809734+kaeltis@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:17:45 +0100 Subject: [PATCH 190/973] added ymdk ymd09 keyboard (#7831) * added ymdk ymd09 keyboard * lowercase github username * change rgb keymap to make more sense * fixed number of LEDs * remove configuration for non-existant backlight * use official template and change file permissions * disable unnecessary nkro * Apply suggestions from code review Co-Authored-By: Joel Challis * with easy reset via bootmagic lite, remove RESET from layout Co-authored-by: Joel Challis --- keyboards/ymdk/ymd09/README.md | 15 +++++ keyboards/ymdk/ymd09/config.h | 66 +++++++++++++++++++ keyboards/ymdk/ymd09/info.json | 23 +++++++ keyboards/ymdk/ymd09/keymaps/default/keymap.c | 13 ++++ keyboards/ymdk/ymd09/rules.mk | 32 +++++++++ keyboards/ymdk/ymd09/ymd09.c | 1 + keyboards/ymdk/ymd09/ymd09.h | 13 ++++ 7 files changed, 163 insertions(+) create mode 100644 keyboards/ymdk/ymd09/README.md create mode 100644 keyboards/ymdk/ymd09/config.h create mode 100644 keyboards/ymdk/ymd09/info.json create mode 100644 keyboards/ymdk/ymd09/keymaps/default/keymap.c create mode 100644 keyboards/ymdk/ymd09/rules.mk create mode 100644 keyboards/ymdk/ymd09/ymd09.c create mode 100644 keyboards/ymdk/ymd09/ymd09.h diff --git a/keyboards/ymdk/ymd09/README.md b/keyboards/ymdk/ymd09/README.md new file mode 100644 index 000000000000..dce883c1f5f1 --- /dev/null +++ b/keyboards/ymdk/ymd09/README.md @@ -0,0 +1,15 @@ +# YMD09 + +![YMD09](https://ae01.alicdn.com/kf/HTB1x6BATYvpK1RjSZPiq6zmwXXai/9-Key-QMK-Hotswap-YMDK-RGB-Support-Macro-Function-Type-C-MX-Switches-Mechanical-Keyboard-Numpad.jpg) + +A 9-key macropad by [YMDK](https://ymdk.aliexpress.com/store/429151) with per-key RGB lighting. + +* Keyboard Maintainer: [Patrick Fruh](https://github.com/kaeltis) +* Hardware Supported: YMD09 +* Hardware Availability: [AliExpress](https://www.aliexpress.com/i/4000510880374.html) + +Make example for this keyboard (after setting up your build environment): + + make ymdk/ymd09: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/ymdk/ymd09/config.h b/keyboards/ymdk/ymd09/config.h new file mode 100644 index 000000000000..b7e5539df2ba --- /dev/null +++ b/keyboards/ymdk/ymd09/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2020 Patrick Fruh + +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 0x0909 +#define DEVICE_VER 0x0001 +#define MANUFACTURER YMDK +#define PRODUCT YMD09 +#define DESCRIPTION 9-Key Macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { F5, F4, F1 } +#define MATRIX_COL_PINS { D6, D2, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#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_ANIMATIONS +#endif + +/* 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 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif diff --git a/keyboards/ymdk/ymd09/info.json b/keyboards/ymdk/ymd09/info.json new file mode 100644 index 000000000000..cb11ac97fb36 --- /dev/null +++ b/keyboards/ymdk/ymd09/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "YMD09", + "url": "https://www.aliexpress.com/item/4000510880374.html", + "maintainer": "kaeltis", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "key_count": 9, + "layout": [ + {"label": "7", "x": 0, "y": 0}, + {"label": "8", "x": 1, "y": 0}, + {"label": "9", "x": 2, "y": 0}, + {"label": "4", "x": 0, "y": 1}, + {"label": "5", "x": 1, "y": 1}, + {"label": "6", "x": 2, "y": 1}, + {"label": "1", "x": 0, "y": 2}, + {"label": "2", "x": 1, "y": 2}, + {"label": "3", "x": 2, "y": 2} + ] + } + } +} diff --git a/keyboards/ymdk/ymd09/keymaps/default/keymap.c b/keyboards/ymdk/ymd09/keymaps/default/keymap.c new file mode 100644 index 000000000000..330e41db6311 --- /dev/null +++ b/keyboards/ymdk/ymd09/keymaps/default/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT(KC_KP_7, KC_KP_8, KC_KP_9, + KC_KP_4, LT(1, KC_KP_5), KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3), + + [1] = LAYOUT(RGB_RMOD, RGB_VAI, RGB_MOD, + RGB_HUI, KC_TRNS, RGB_SAI, + RGB_HUD, RGB_VAD, RGB_SAD), + +}; diff --git a/keyboards/ymdk/ymd09/rules.mk b/keyboards/ymdk/ymd09/rules.mk new file mode 100644 index 000000000000..171e9b1fcb3e --- /dev/null +++ b/keyboards/ymdk/ymd09/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 = 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 diff --git a/keyboards/ymdk/ymd09/ymd09.c b/keyboards/ymdk/ymd09/ymd09.c new file mode 100644 index 000000000000..179c0c6b3e74 --- /dev/null +++ b/keyboards/ymdk/ymd09/ymd09.c @@ -0,0 +1 @@ +#include "ymd09.h" diff --git a/keyboards/ymdk/ymd09/ymd09.h b/keyboards/ymdk/ymd09/ymd09.h new file mode 100644 index 000000000000..76cb5d3f0c34 --- /dev/null +++ b/keyboards/ymdk/ymd09/ymd09.h @@ -0,0 +1,13 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22 \ +) { \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 } \ +} From 578f54ee94e8d1db733f842b5db9edee47486c08 Mon Sep 17 00:00:00 2001 From: Daniel Shields <1530706+shieldsd@users.noreply.github.com> Date: Fri, 10 Jan 2020 17:51:19 +0000 Subject: [PATCH 191/973] [Keymap] Add additional dynamic macro key to dshields keymaps. (#7853) --- keyboards/model01/keymaps/dshields/keymap.c | 8 ++++---- keyboards/planck/keymaps/dshields/keymap.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/model01/keymaps/dshields/keymap.c b/keyboards/model01/keymaps/dshields/keymap.c index 7dbfaf0cfb8c..04887124f975 100644 --- a/keyboards/model01/keymaps/dshields/keymap.c +++ b/keyboards/model01/keymaps/dshields/keymap.c @@ -4,7 +4,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEF] = LAYOUT( RESET , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, - KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_TOG, _______, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , + KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_TOG, DM_REC1, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , KC_PGUP, KC_A , KC_S , KC_D , KC_F , KC_G , KC_TAB , KC_ENT , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_PGDN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_ESC , DM_PLY1, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, OSMLCTL, OSMRCTL, @@ -15,9 +15,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [FUN] = LAYOUT( EEP_RST, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_MOD, DM_REC1, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , - KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, RGB_HUI, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, - KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, RGB_HUD, DM_RSTP, _______, _______, _______, _______, KC_BSLS, KC_PIPE, + KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_MOD, DM_REC2, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , + KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, RGB_HUI, DM_RSTP, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, + KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, RGB_HUD, DM_PLY2, _______, _______, _______, _______, KC_BSLS, KC_PIPE, _______, _______, KC_DEL , KC_ENT , _______, _______, diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c index f18102ee2b58..7b768603cbca 100644 --- a/keyboards/planck/keymaps/dshields/keymap.c +++ b/keyboards/planck/keymaps/dshields/keymap.c @@ -11,19 +11,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LWR] = LAYOUT_planck_grid( KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_DEL, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, KC_LCBR, KC_RCBR, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DQUO, KC_PIPE, + _______, _______, _______, _______, _______, _______, DM_PLY2, _______, _______, _______, KC_DQUO, KC_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), [RSE] = LAYOUT_planck_grid( KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0 , KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS, + _______, _______, _______, _______, _______, _______, DM_PLY2, _______, _______, _______, KC_QUOT, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), [FUN] = LAYOUT_planck_grid( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, EEP_RST, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, - LGT_TOG, LGT_MOD, LGT_BRT, LGT_INC, LGT_DEC, DM_REC1, DM_RSTP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, + KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, DM_RSTP, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, + LGT_TOG, LGT_MOD, LGT_BRT, LGT_INC, LGT_DEC, DM_REC1, DM_REC2, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R ) }; From 2d051d8de3787de889ff0f0301153dbb4e2e1272 Mon Sep 17 00:00:00 2001 From: AbstractKB <49011872+AbstractKB@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:25:10 -0500 Subject: [PATCH 192/973] [Keymap] Updated keymaps (#7834) --- keyboards/jj50/keymaps/abstractkb/config.h | 3 + keyboards/jj50/keymaps/abstractkb/keymap.c | 2 +- .../keymaps/abstractkb_gergomatch/config.h | 3 + .../keymaps/abstractkb_gergomatch/keymap.c | 135 ++++++++++++++++++ .../keymaps/abstractkb_gergomatch/readme.md | 4 + 5 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 keyboards/jj50/keymaps/abstractkb/config.h create mode 100644 keyboards/jj50/keymaps/abstractkb_gergomatch/config.h create mode 100644 keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c create mode 100644 keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md diff --git a/keyboards/jj50/keymaps/abstractkb/config.h b/keyboards/jj50/keymaps/abstractkb/config.h new file mode 100644 index 000000000000..9439a929e988 --- /dev/null +++ b/keyboards/jj50/keymaps/abstractkb/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define RGBLIGHT_SLEEP \ No newline at end of file diff --git a/keyboards/jj50/keymaps/abstractkb/keymap.c b/keyboards/jj50/keymaps/abstractkb/keymap.c index 456adeee4b29..2de5ce6b99b5 100644 --- a/keyboards/jj50/keymaps/abstractkb/keymap.c +++ b/keyboards/jj50/keymaps/abstractkb/keymap.c @@ -44,7 +44,7 @@ void keyboard_post_init_user(void) { uint32_t layer_state_set_user(uint32_t state) { switch (biton32(state)) { case _RAISE: - rgblight_sethsv_noeeprom(240,255,255); + rgblight_sethsv_noeeprom(170,255,255); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); break; case _LOWER: diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/config.h b/keyboards/jj50/keymaps/abstractkb_gergomatch/config.h new file mode 100644 index 000000000000..9439a929e988 --- /dev/null +++ b/keyboards/jj50/keymaps/abstractkb_gergomatch/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define RGBLIGHT_SLEEP \ No newline at end of file diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c b/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c new file mode 100644 index 000000000000..9c129ba9ab49 --- /dev/null +++ b/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c @@ -0,0 +1,135 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) +Modified 2019 AbstractKB + +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 LicensezZZ +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _DEFLT, + _FUNC, + _SYM, + _META +}; + +enum custom_keycodes { + MYRGB_TG = SAFE_RANGE +}; + +bool rgbinit = true; +bool rgbon = true; + +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + led_set_user(host_keyboard_leds()); +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _FUNC: + rgblight_sethsv_noeeprom(170,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _SYM: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _META: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + break; + default: //_DEFLT + rgblight_sethsv_noeeprom(0,0,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + } + + return state; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + myrgb_toggle(); + } + return false; + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DEFLT] = LAYOUT( \ + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \ + KC_BSPC, 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(_META), KC_LGUI, KC_LALT, MO(_SYM),KC_SPC,KC_SPC,MO(_FUNC),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + + [_FUNC] = 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, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + + [_SYM] = 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, \ + _______,S(KC_1),S(KC_2),S(KC_LBRC),S(KC_RBRC),S(KC_BSLS),_______, S(KC_MINS), _______, _______, _______, _______, \ + _______, S(KC_3), S(KC_4), S(KC_9), S(KC_0), KC_GRV, S(KC_EQL), KC_MINS, KC_BSLS, S(KC_8), _______, _______, \ + _______, S(KC_5), S(KC_6), KC_LBRC,KC_RBRC,S(KC_GRV), S(KC_7),KC_EQL, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + + [_META] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \ + ) +}; diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md b/keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md new file mode 100644 index 000000000000..a45ece7ff782 --- /dev/null +++ b/keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md @@ -0,0 +1,4 @@ +# My personal layout for the JJ50 + +It is an approximation of a cross between a 60% the gergo function layout +It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file From 70309bef3d47916f1b988aacc2fac598bd1f9d22 Mon Sep 17 00:00:00 2001 From: yiancar Date: Sat, 11 Jan 2020 17:25:27 +0000 Subject: [PATCH 193/973] [Keyboard] NK65 Refactor (#7862) * Nk65 Refractor - Changed Via keymap to via instead of default_via - Moved Caps/Layer indicator code outside of wilba_tech rgb. This is so they can more easily be modified * Update keyboards/nk65/nk65.c --- .../keymaps/{default_via => via}/keymap.c | 0 .../keymaps/{default_via => via}/readme.md | 0 .../keymaps/{default_via => via}/rules.mk | 0 keyboards/nk65/nk65.c | 42 +++++++++++++++++-- keyboards/wilba_tech/wt_rgb_backlight.c | 16 ------- 5 files changed, 39 insertions(+), 19 deletions(-) rename keyboards/nk65/keymaps/{default_via => via}/keymap.c (100%) rename keyboards/nk65/keymaps/{default_via => via}/readme.md (100%) rename keyboards/nk65/keymaps/{default_via => via}/rules.mk (100%) diff --git a/keyboards/nk65/keymaps/default_via/keymap.c b/keyboards/nk65/keymaps/via/keymap.c similarity index 100% rename from keyboards/nk65/keymaps/default_via/keymap.c rename to keyboards/nk65/keymaps/via/keymap.c diff --git a/keyboards/nk65/keymaps/default_via/readme.md b/keyboards/nk65/keymaps/via/readme.md similarity index 100% rename from keyboards/nk65/keymaps/default_via/readme.md rename to keyboards/nk65/keymaps/via/readme.md diff --git a/keyboards/nk65/keymaps/default_via/rules.mk b/keyboards/nk65/keymaps/via/rules.mk similarity index 100% rename from keyboards/nk65/keymaps/default_via/rules.mk rename to keyboards/nk65/keymaps/via/rules.mk diff --git a/keyboards/nk65/nk65.c b/keyboards/nk65/nk65.c index 495246218352..972373e1b254 100755 --- a/keyboards/nk65/nk65.c +++ b/keyboards/nk65/nk65.c @@ -13,6 +13,42 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - #ifndef RGB_BACKLIGHT_NK65 - #error RGB_BACKLIGHT_NK65 not defined, recheck config.h - #endif +#ifndef RGB_BACKLIGHT_NK65 +#error RGB_BACKLIGHT_NK65 not defined, recheck config.h +#endif + +#include "nk65.h" +#include "drivers/issi/is31fl3733.h" + +/* Indicator LEDS are part of the LED driver + * Top LED is blue only. LED driver 2 RGB 7 Green channel + * Middle LED is blue and red. LED driver 2 RGB 6 Red and Blue channel + * Bottom LED is red only LED driver 2 RGB 6 Green channel. + */ +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + if (led_state.caps_lock) { + IS31FL3733_set_color( 7+64-1, 0, 255, 0 ); + } else { + IS31FL3733_set_color( 7+64-1, 0, 0, 0 ); + } + } + return res; +} + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t R = 0; + uint8_t G = 0; + uint8_t B = 0; + if (state & (1UL << 1)) { + R = 255; + B = 255; + } + if (state & (1UL << 2)) { + G = 255; + } + + IS31FL3733_set_color( 6+64-1, R, G, B ); + return state; +} diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 31cfabddd7c3..1ca3117fb44e 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -1551,22 +1551,6 @@ void backlight_effect_indicators(void) { backlight_effect_indicators_set_colors( g_config.caps_lock_indicator.index, g_config.caps_lock_indicator.color ); } - -#if defined(RGB_BACKLIGHT_NK65) - if ( IS_LED_ON(g_indicator_state, USB_LED_CAPS_LOCK) ) { - IS31FL3733_set_color( 7+64-1, 0, 255, 0 ); - } else { - IS31FL3733_set_color( 7+64-1, 0, 0, 0 ); - } - if ( IS_LAYER_ON(1) ) { - IS31FL3733_set_color( 6+64-1, 255, 0, 255 ); - } else if ( IS_LAYER_ON(2) ) { - IS31FL3733_set_color( 6+64-1, 0, 255, 0 ); - } else { - IS31FL3733_set_color( 6+64-1, 0, 0, 0 ); - } -#endif - // This if/else if structure allows higher layers to // override lower ones. If we set layer 3's indicator // to none, then it will NOT show layer 2 or layer 1 From c6f47b5bd76eaa1b64cd4bc97dc0f59ed4d99eb7 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 24 Oct 2019 18:50:35 +0200 Subject: [PATCH 194/973] CLI: Rework ModemManager check and add udev check --- lib/python/qmk/cli/doctor.py | 55 +++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 2421e520e0f6..cbe44c9ae450 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -5,6 +5,7 @@ import platform import shutil import subprocess +import glob from milc import cli @@ -46,23 +47,43 @@ def doctor(cli): elif OS == "Linux": cli.log.info("Detected {fg_cyan}Linux.") - if shutil.which('systemctl'): - mm_check = subprocess.run(['systemctl', 'list-unit-files'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10, universal_newlines=True) - if mm_check.returncode == 0: - mm = False - for line in mm_check.stdout.split('\n'): - if 'ModemManager' in line and 'enabled' in line: - mm = True - - if mm: - cli.log.warn("{bg_yellow}Detected ModemManager. Please disable it if you are using a Pro-Micro.") - - else: - cli.log.error('{bg_red}Could not run `systemctl list-unit-files`:') - cli.log.error(mm_check.stderr) - - else: - cli.log.warn("Can't find systemctl to check for ModemManager.") + # Checking for udev rules + udev_dir = "/etc/udev/rules.d/" + # These are the recommended udev rules + desired_rules = {"dfu": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666"', + 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666"', + 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666"'}, + "tmk": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"'}, + "input-club": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"'}, + "stm32": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666"', + 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"'}, + "catalina": {'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 == "catalina": + 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) else: cli.log.info("Assuming {fg_cyan}Windows.") From e905d86fc5ba839595ba8472f99f74250b053a47 Mon Sep 17 00:00:00 2001 From: Erovia Date: Wed, 30 Oct 2019 08:39:38 +0100 Subject: [PATCH 195/973] Fix Pro Micro's and its bootloader's name --- lib/python/qmk/cli/doctor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index cbe44c9ae450..80bd013b2165 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -57,7 +57,7 @@ def doctor(cli): "input-club": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"'}, "stm32": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666"', 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"'}, - "catalina": {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', + "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)] @@ -74,12 +74,12 @@ def doctor(cli): 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 == "catalina": + 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.") + 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: From 8f47e62b36cae15f989aaaa93caf05d4de258fb7 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 7 Nov 2019 19:53:03 +0100 Subject: [PATCH 196/973] Make the udev rules easier to read and manage --- lib/python/qmk/cli/doctor.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 80bd013b2165..28bf57a7d923 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -2,6 +2,7 @@ Check up for QMK environment. """ +import os import platform import shutil import subprocess @@ -9,6 +10,13 @@ from milc import cli +def _udev_rule(vid, pid = None): + """ Helper function that return udev rules + """ + if pid: + return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", MODE:="0666"' % (vid, pid) + else: + return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid @cli.subcommand('Basic QMK environment checks') def doctor(cli): @@ -18,7 +26,6 @@ def doctor(cli): TODO(unclaimed): * [ ] Compile a trivial program with each compiler - * [ ] Check for udev entries on linux """ cli.log.info('QMK Doctor is checking your environment.') @@ -50,15 +57,17 @@ def doctor(cli): # Checking for udev rules udev_dir = "/etc/udev/rules.d/" # These are the recommended udev rules - desired_rules = {"dfu": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666"', - 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666"', - 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666"'}, - "tmk": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"'}, - "input-club": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"'}, - "stm32": {'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666"', - 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"'}, - "caterina": {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', - 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}} + desired_rules = dict(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 From 81ec3b5f81b3b8f83b763782fffd71ffe3540f56 Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 11 Jan 2020 12:15:28 -0800 Subject: [PATCH 197/973] yapf and style --- lib/python/qmk/cli/doctor.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 28bf57a7d923..6ddc5571b442 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -10,7 +10,8 @@ from milc import cli -def _udev_rule(vid, pid = None): + +def _udev_rule(vid, pid=None): """ Helper function that return udev rules """ if pid: @@ -18,6 +19,7 @@ def _udev_rule(vid, pid = None): else: return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid + @cli.subcommand('Basic QMK environment checks') def doctor(cli): """Basic QMK environment checks. @@ -57,17 +59,14 @@ def doctor(cli): # Checking for udev rules udev_dir = "/etc/udev/rules.d/" # These are the recommended udev rules - desired_rules = dict(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")}, + 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"'}, + } - 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 From 8b9d4fd341c57d1bc38a18a96d213248e9afcc52 Mon Sep 17 00:00:00 2001 From: Adi M Date: Sat, 11 Jan 2020 17:01:48 -0800 Subject: [PATCH 198/973] Adi's DZ65RGB layout (#7845) * Adi's DZ65RGB layout * Update keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/readme.md Co-Authored-By: fauxpark * Rename layers.JSON to layers.json * Update readme.md * Update keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Delete layers.json * Update keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Rename keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/readme.md to keyboards/dztech/dz65rgb/keymaps/adi/readme.md * Rename keyboards/dztech/dz65rgb/keymaps/adi_dz65rgb_ansi/keymap.c to keyboards/dztech/dz65rgb/keymaps/adi/keymap.c Co-authored-by: fauxpark Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/dztech/dz65rgb/keymaps/adi/keymap.c | 19 +++++++++++++++++++ .../dztech/dz65rgb/keymaps/adi/readme.md | 13 +++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 keyboards/dztech/dz65rgb/keymaps/adi/keymap.c create mode 100644 keyboards/dztech/dz65rgb/keymaps/adi/readme.md diff --git a/keyboards/dztech/dz65rgb/keymaps/adi/keymap.c b/keyboards/dztech/dz65rgb/keymaps/adi/keymap.c new file mode 100644 index 000000000000..f3d3cbf9a465 --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/adi/keymap.c @@ -0,0 +1,19 @@ +#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_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_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PGUP, + LCTL_T(KC_CAPS), 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_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLU, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ) + +}; diff --git a/keyboards/dztech/dz65rgb/keymaps/adi/readme.md b/keyboards/dztech/dz65rgb/keymaps/adi/readme.md new file mode 100644 index 000000000000..fd3a6744ca2f --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/adi/readme.md @@ -0,0 +1,13 @@ +# Adi's DZ65RGB 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. +## Step by Step +1. Build your Firmware: run build command in directory +```make dztech/dz65rgb/v1:adi``` +2. Flash your Firmware: + * Open QMK Toolbox Application + * Open firmware file: dztech_dz65rgb_v1_adi.bin + * Unplug keyboard USB-C, and hold the ESC key while plugging it back in + * Check that QMK Toolbox displays: *** STM32 device connected. + * Hit the flash button! From 08cd99683999eb8fa009116a80255c185fdb9a4b Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sat, 11 Jan 2020 19:09:04 -0600 Subject: [PATCH 199/973] Add Lily58 serial to LIB_SRC to avoid LTO issue (#7868) This code is timing sensitive and seems to break with LTO enabled (at least on avr-gcc 8.3.0... it worked on older gcc versions). This is the same workaround as #7558 applied for the Helix. --- keyboards/lily58/rules.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index af25531ecd5f..fce62532f533 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -36,6 +36,11 @@ SRC += i2c.c SRC += serial.c SRC += ssd1306.c +# A workaround until #7089 is merged. +# serial.c must not be compiled with the -lto option. +# The current LIB_SRC has a side effect with the -fno-lto option, so use it. +LIB_SRC += serial.c + # if firmware size over limit, try this option # CFLAGS += -flto From b6917c782fab724c181576164a7512089e54e36e Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 11 Jan 2020 23:11:06 -0800 Subject: [PATCH 200/973] [Keyboard] KPRepublic BM60 RGB (#7842) * initial commit from script * edit all generated files with my name and some basic notes * implement RGB Matrix support * cleanups, file removals, and readme edits * Update keyboards/bm60hsrgb/config.h * rename to bm60rgb * update included library and info.json keyboard name * Update keyboards/bm60rgb/keymaps/default/readme.md --- keyboards/bm60rgb/bm60rgb.c | 73 +++++++++++++++++++ keyboards/bm60rgb/bm60rgb.h | 36 ++++++++++ keyboards/bm60rgb/config.h | 59 +++++++++++++++ keyboards/bm60rgb/info.json | 79 +++++++++++++++++++++ keyboards/bm60rgb/keymaps/default/keymap.c | 34 +++++++++ keyboards/bm60rgb/keymaps/default/readme.md | 1 + keyboards/bm60rgb/readme.md | 13 ++++ keyboards/bm60rgb/rules.mk | 38 ++++++++++ 8 files changed, 333 insertions(+) create mode 100644 keyboards/bm60rgb/bm60rgb.c create mode 100644 keyboards/bm60rgb/bm60rgb.h create mode 100644 keyboards/bm60rgb/config.h create mode 100644 keyboards/bm60rgb/info.json create mode 100644 keyboards/bm60rgb/keymaps/default/keymap.c create mode 100644 keyboards/bm60rgb/keymaps/default/readme.md create mode 100644 keyboards/bm60rgb/readme.md create mode 100644 keyboards/bm60rgb/rules.mk diff --git a/keyboards/bm60rgb/bm60rgb.c b/keyboards/bm60rgb/bm60rgb.c new file mode 100644 index 000000000000..3f301d1d475b --- /dev/null +++ b/keyboards/bm60rgb/bm60rgb.c @@ -0,0 +1,73 @@ +/* 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 "bm60rgb.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); +} + +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, 40, 41, 42 }, + { NO_LED, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56 }, + { 57, 58, 59, NO_LED, NO_LED, NO_LED, NO_LED, 60, NO_LED, NO_LED, 61, 62, 63, 64} +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + { 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 }, { 202, 0 }, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, 1 +} }; diff --git a/keyboards/bm60rgb/bm60rgb.h b/keyboards/bm60rgb/bm60rgb.h new file mode 100644 index 000000000000..705539fc95d8 --- /dev/null +++ b/keyboards/bm60rgb/bm60rgb.h @@ -0,0 +1,36 @@ +/* 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 . + */ +#pragma once + +#include "quantum.h" + +#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, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K46, 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, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ + diff --git a/keyboards/bm60rgb/config.h b/keyboards/bm60rgb/config.h new file mode 100644 index 000000000000..fc550b21b350 --- /dev/null +++ b/keyboards/bm60rgb/config.h @@ -0,0 +1,59 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xEF8C +#define DEVICE_VER 0x0001 +#define MANUFACTURER KP Republic +#define PRODUCT BM60 RGB +#define DESCRIPTION A 60% hotswap inswitch rgb board + +/* 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) + * + */ + +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 69 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 69 + #define RGB_MATRIX_KEYPRESSES +#endif + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/bm60rgb/info.json b/keyboards/bm60rgb/info.json new file mode 100644 index 000000000000..30d55f9a0324 --- /dev/null +++ b/keyboards/bm60rgb/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "BM60 RGB", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 63, + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3, "w":1.75}, + {"label":"K3C (B3,C7)", "x":13, "y":3}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4}, + {"label":"K4A (E6,B6)", "x":11, "y":4}, + {"label":"K4B (E6,C6)", "x":12, "y":4}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} + diff --git a/keyboards/bm60rgb/keymaps/default/keymap.c b/keyboards/bm60rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..9099a0407343 --- /dev/null +++ b/keyboards/bm60rgb/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* 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( + 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/bm60rgb/keymaps/default/readme.md b/keyboards/bm60rgb/keymaps/default/readme.md new file mode 100644 index 000000000000..d45609f3d7eb --- /dev/null +++ b/keyboards/bm60rgb/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm60rgb diff --git a/keyboards/bm60rgb/readme.md b/keyboards/bm60rgb/readme.md new file mode 100644 index 000000000000..dc093c7b40ad --- /dev/null +++ b/keyboards/bm60rgb/readme.md @@ -0,0 +1,13 @@ +# BM60 RGB + +A 60% hotswap inswitch RGB keyboard from KP Republic. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: BM60 RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-60-gh60-hot-swappable-pcb-programmed-qmk-firmware-type-c) + +Make example for this keyboard (after setting up your build environment): + + make bm60rgb: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/bm60rgb/rules.mk b/keyboards/bm60rgb/rules.mk new file mode 100644 index 000000000000..4372a6306885 --- /dev/null +++ b/keyboards/bm60rgb/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 = 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 = 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 +RGB_MATRIX_ENABLE = WS2812 +LINK_TIME_OPTIMIZATION_ENABLE = yes + +# partially generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ From 09b4457bf218ebc8703ba0e154eeb809e312a373 Mon Sep 17 00:00:00 2001 From: Mike Rix Wolfe Date: Sun, 12 Jan 2020 05:42:55 -0600 Subject: [PATCH 201/973] Add user keymaps for KBD67MKII/Lily58 (#7671) * 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 Co-Authored-By: fauxpark * Update keyboards/lily58/keymaps/mikefightsbears/rules.mk Co-Authored-By: fauxpark * Update keyboards/lily58/keymaps/mikefightsbears/rules.mk Co-Authored-By: fauxpark * Update keyboards/lily58/keymaps/mikefightsbears/rules.mk Co-Authored-By: fauxpark * remove unnecessary trailing whacks * remove unneeded file * swap spacebar * update code for comments in PR Co-authored-by: fauxpark --- .../mkiirgb/keymaps/mikefightsbears/keymap.c | 19 ++ .../mkiirgb/keymaps/mikefightsbears/readme.md | 1 + .../lily58/keymaps/mikefightsbears/config.h | 52 ++++ .../lily58/keymaps/mikefightsbears/keymap.c | 232 ++++++++++++++++++ .../lily58/keymaps/mikefightsbears/rules.mk | 18 ++ 5 files changed, 322 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/readme.md create mode 100644 keyboards/lily58/keymaps/mikefightsbears/config.h create mode 100644 keyboards/lily58/keymaps/mikefightsbears/keymap.c create mode 100644 keyboards/lily58/keymaps/mikefightsbears/rules.mk diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/keymap.c new file mode 100644 index 000000000000..bda8fbc7a818 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/keymap.c @@ -0,0 +1,19 @@ +#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_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_HOME, + 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_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_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [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 + ) +}; + diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/readme.md b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/readme.md new file mode 100644 index 000000000000..7e681294f2f4 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/mikefightsbears/readme.md @@ -0,0 +1 @@ +# The default keymap for hotswap diff --git a/keyboards/lily58/keymaps/mikefightsbears/config.h b/keyboards/lily58/keymaps/mikefightsbears/config.h new file mode 100644 index 000000000000..58bbdc5e9d05 --- /dev/null +++ b/keyboards/lily58/keymaps/mikefightsbears/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/mikefightsbears/keymap.c b/keyboards/lily58/keymaps/mikefightsbears/keymap.c new file mode 100644 index 000000000000..51f2ee8b3e20 --- /dev/null +++ b/keyboards/lily58/keymaps/mikefightsbears/keymap.c @@ -0,0 +1,232 @@ +#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 { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC/`| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ESC | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | 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 | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGui | LAlt |LOWER | /Space / \Enter \ |RAISE | - | = | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_GESC, 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_BSLS, \ + 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_RSFT, \ + KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_MINS, KC_EQL \ +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | DEL | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | | | up | | | | | | pgup | | PSCR | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | left | dn | rght | |-------. ,-------| | home | pgdn | end | | INS | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | mute | prev | next | play | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | vol- | vol+ | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_LOWER] = LAYOUT( \ + KC_GRV, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_DEL, \ + KC_F1, _______, _______, KC_UP, _______, _______, _______, _______, KC_PGUP, _______, KC_PSCR, KC_F12, \ + _______, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_HOME, KC_PGDN, KC_END, _______, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, _______, \ + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU \ +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | DEL | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | | | up | | | | | | pgup | | PSCR | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | left | dn | rght | |-------. ,-------| | home | pgdn | end | | INS | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | mute | prev | next | play | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | vol- | vol+ | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + +[_RAISE] = LAYOUT( \ + KC_GRV, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_DEL, \ + KC_F1, _______, _______, KC_UP, _______, _______, _______, _______, KC_PGUP, _______, KC_PSCR, KC_F12, \ + _______, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_HOME, KC_PGDN, KC_END, _______, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, _______, \ + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU \ +), +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | | | / / \ \ | | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_ADJUST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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 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/mikefightsbears/rules.mk b/keyboards/lily58/keymaps/mikefightsbears/rules.mk new file mode 100644 index 000000000000..10793d9a538b --- /dev/null +++ b/keyboards/lily58/keymaps/mikefightsbears/rules.mk @@ -0,0 +1,18 @@ +# 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 +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# 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 21d6cb18edea93ab83d21872397fce5b5622cfa8 Mon Sep 17 00:00:00 2001 From: xyzz <1065521+xyzz@users.noreply.github.com> Date: Sun, 12 Jan 2020 13:42:32 -0500 Subject: [PATCH 202/973] [Keyboard] Add Xiaomi MK02 (#7825) * [Keyboard] Added xiaomi/mk02 * keyboards/xiaomi/mk02: cleanup * keyboards/xiaomi/mk02: add linker script * update readme * update * remove via (crashes during startup) * LAYOUT => LAYOUT_tkl_ansi * Change vid/pid * Add a warning to the readme --- keyboards/xiaomi/mk02/README.md | 104 ++++ keyboards/xiaomi/mk02/chconf.h | 524 ++++++++++++++++++ keyboards/xiaomi/mk02/config.h | 60 ++ keyboards/xiaomi/mk02/halconf.h | 354 ++++++++++++ .../xiaomi/mk02/keymaps/default/keymap.c | 27 + .../mk02/ld/STM32F072_0x2000_bootloader.ld | 85 +++ keyboards/xiaomi/mk02/mcuconf.h | 176 ++++++ keyboards/xiaomi/mk02/mk02.c | 8 + keyboards/xiaomi/mk02/mk02.h | 20 + keyboards/xiaomi/mk02/rules.mk | 17 + 10 files changed, 1375 insertions(+) create mode 100644 keyboards/xiaomi/mk02/README.md create mode 100644 keyboards/xiaomi/mk02/chconf.h create mode 100644 keyboards/xiaomi/mk02/config.h create mode 100644 keyboards/xiaomi/mk02/halconf.h create mode 100644 keyboards/xiaomi/mk02/keymaps/default/keymap.c create mode 100644 keyboards/xiaomi/mk02/ld/STM32F072_0x2000_bootloader.ld create mode 100644 keyboards/xiaomi/mk02/mcuconf.h create mode 100644 keyboards/xiaomi/mk02/mk02.c create mode 100644 keyboards/xiaomi/mk02/mk02.h create mode 100644 keyboards/xiaomi/mk02/rules.mk diff --git a/keyboards/xiaomi/mk02/README.md b/keyboards/xiaomi/mk02/README.md new file mode 100644 index 000000000000..2dea99ff19ad --- /dev/null +++ b/keyboards/xiaomi/mk02/README.md @@ -0,0 +1,104 @@ +# Xiaomi Yuemi Pro MK02 + +A tenkeyless keyboard sold under Xiaomi brand. It uses an STM32F072C8T6 microcontroller and can be flashed with QMK. + +LED backlight is currently not supported. + +* Keyboard Maintainer: [@xyzz](https://github.com/xyzz) +* Hardware Supported: Xiaomi Yuemi Pro MK02 +* Hardware Availability: Aliexpress + +Make example for this keyboard (after setting up your build environment): + + make xiaomi/mk02: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). + +## Installation + +Please understand that following these steps will void your warranty and might irrecoverably damage your keyboard. + +### Installing the bootloader + +You only need to do this step once (unless you destroy your user bootloader which is not possible so long as you follow these steps correctly). + +Unplug the keyboard. Disassemble the keyboard and look at the area around the MCU. Make sure your keyboard looks the same as in the picture and that the chip says STM32F072C8T6 on it: + +![mcu](https://i.imgur.com/HM8tUWU.jpg) + +Using a piece of wire, connect TP28 (indicated in red) and 3v3 (square pad indicated in green) together with tweezers or a piece of wire. Make sure to not touch the case with your wire when shorting!!! Don't push it all the way through the hole. + +Plug the keyboard in with the wire connected. You should see the following device appear: +``` +[5067851.560317] usb 2-1.5.3.1: new full-speed USB device number 6 using ehci-pci +[5067851.670006] usb 2-1.5.3.1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00 +[5067851.670010] usb 2-1.5.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 +[5067851.670013] usb 2-1.5.3.1: Product: STM32 BOOTLOADER +[5067851.670015] usb 2-1.5.3.1: Manufacturer: STMicroelectronics +[5067851.670017] usb 2-1.5.3.1: SerialNumber: FFFFFFFEFFFF +``` + +If you don't see this, you did something wrong. Disconnect the keyboard and try again. + +If you do see this, remove the wire before continuing. + +Make a backup of internal flash memory in case you'd like to revert to the original firmware in the future: +``` +dfu-util -d 0483:df11 -a 0 -s 0x08000000 -U flash-backup.bin +``` + +Ensure the dumped flash is correct: +``` +strings flash.bin | grep KB +``` +(You should see 2 entries of "USB KB") + +Finally, flash the bootloader ([jumploader-xiaomi_mk02-padded.bin](https://github.com/xyzz/stm32f072-keyboard-jumploader/releases/download/r1/jumploader-xiaomi_mk02-padded.bin)) with: +``` +dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D jumploader-xiaomi_mk02-padded.bin +``` + +At this point the keyboard should reboot into bootloader mode; if it doesn't, wait a couple seconds and replug the USB cable. + +### Installing the firmware + +To install QMK, first boot into bootloader mode as detailed below. When the keyboard boots in bootloader mode, you should see the following device: + +``` +[5067851.560317] usb 2-1.5.3.1: new full-speed USB device number 6 using ehci-pci +[5067851.670006] usb 2-1.5.3.1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00 +[5067851.670010] usb 2-1.5.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 +[5067851.670013] usb 2-1.5.3.1: Product: STM32 BOOTLOADER +[5067851.670015] usb 2-1.5.3.1: Manufacturer: STMicroelectronics +[5067851.670017] usb 2-1.5.3.1: SerialNumber: FFFFFFFEFFFF +``` + +Flash the keyboard normally by executing: + +``` +make xiaomi/mk02:default:flash +``` + +Warning! If you flash the firmware manually by using `dfu-util`, make sure to use the following arguments: + +``` +-d 0483:df11 -a 0 -s 0x08002000:leave +``` + +If you don't, you'll blow away the user bootloader and will have to repeat the installation steps. + +## Booting into bootloader + +To boot into bootloader, do either of the following: +- map a RESET key in your keymap and tap it, or +- hold spacebar while plugging in the keyboard. + +If neither of these work, you must have blown away the user bootloader somehow and will need to repeat the installation guide from the first step. + +## Restoring the original firmware + +If you wish to restore the original firmware, boot into the bootloader and then execute: + +``` +dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D flash-backup.bin +``` diff --git a/keyboards/xiaomi/mk02/chconf.h b/keyboards/xiaomi/mk02/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/xiaomi/mk02/chconf.h @@ -0,0 +1,524 @@ +/* + 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 + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @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/xiaomi/mk02/config.h b/keyboards/xiaomi/mk02/config.h new file mode 100644 index 000000000000..14ce3875b14c --- /dev/null +++ b/keyboards/xiaomi/mk02/config.h @@ -0,0 +1,60 @@ +/* +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 0xFEED +#define PRODUCT_ID 0x0B91 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER Xiaomi +#define PRODUCT MK02 +#define DESCRIPTION Yuemi Pro MK02 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +#define MATRIX_ROW_PINS { A3, A4, A5, A6, A7, B0 } +#define MATRIX_COL_PINS { B13, B14, B15, A15, B3, B4, B5, B6, B7, B8, B9, C14, C15, B11, A1, A2, B12 } +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* + * 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/xiaomi/mk02/halconf.h b/keyboards/xiaomi/mk02/halconf.h new file mode 100644 index 000000000000..9bcb477c03c0 --- /dev/null +++ b/keyboards/xiaomi/mk02/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 FALSE +#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/xiaomi/mk02/keymaps/default/keymap.c b/keyboards/xiaomi/mk02/keymaps/default/keymap.c new file mode 100644 index 000000000000..cea3aae57cc6 --- /dev/null +++ b/keyboards/xiaomi/mk02/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* 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_tkl_ansi( /* 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_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/xiaomi/mk02/ld/STM32F072_0x2000_bootloader.ld b/keyboards/xiaomi/mk02/ld/STM32F072_0x2000_bootloader.ld new file mode 100644 index 000000000000..65441f471ae2 --- /dev/null +++ b/keyboards/xiaomi/mk02/ld/STM32F072_0x2000_bootloader.ld @@ -0,0 +1,85 @@ +/* + 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. +*/ + +/* + * STM32F072x8 memory setup - with a 0x2000 user bootloader + */ +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 = 16k + 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/xiaomi/mk02/mcuconf.h b/keyboards/xiaomi/mk02/mcuconf.h new file mode 100644 index 000000000000..43fe0a462ef1 --- /dev/null +++ b/keyboards/xiaomi/mk02/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 FALSE +#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/xiaomi/mk02/mk02.c b/keyboards/xiaomi/mk02/mk02.c new file mode 100644 index 000000000000..d3ecc155f1f7 --- /dev/null +++ b/keyboards/xiaomi/mk02/mk02.c @@ -0,0 +1,8 @@ +#include "mk02.h" + +void bootloader_jump(void) { + uint32_t *magic_address = (void*)0x20000FFC; + *magic_address = 0x626c6472; + + NVIC_SystemReset(); +} diff --git a/keyboards/xiaomi/mk02/mk02.h b/keyboards/xiaomi/mk02/mk02.h new file mode 100644 index 000000000000..12a7c8e1add2 --- /dev/null +++ b/keyboards/xiaomi/mk02/mk02.h @@ -0,0 +1,20 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_tkl_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K412, K414, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514, K515 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, KC_NO, K412, KC_NO, K414, KC_NO, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514, K515, KC_NO } \ +} diff --git a/keyboards/xiaomi/mk02/rules.mk b/keyboards/xiaomi/mk02/rules.mk new file mode 100644 index 000000000000..93ff487dc8ac --- /dev/null +++ b/keyboards/xiaomi/mk02/rules.mk @@ -0,0 +1,17 @@ +# MCU name +MCU = STM32F072 +MCU_LDSCRIPT = STM32F072_0x2000_bootloader + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08002000:leave +DFU_SUFFIX_ARGS = -v 0483 -p DF11 + +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 +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = no From 9bbce7a231a5354dad4773faf23c3d3c508243f7 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 12 Jan 2020 10:50:52 -0800 Subject: [PATCH 203/973] [Keyboard] IDB 60: Configurator bugfix (#7851) * info.json: use debug linting Changes the white space, mostly. * info.json: correct file structure * readme.md: templating --- keyboards/idb/idb_60/info.json | 787 ++++++--------------------------- keyboards/idb/idb_60/readme.md | 6 +- 2 files changed, 143 insertions(+), 650 deletions(-) diff --git a/keyboards/idb/idb_60/info.json b/keyboards/idb/idb_60/info.json index a4b5d2332d28..86574e9d9dcd 100644 --- a/keyboards/idb/idb_60/info.json +++ b/keyboards/idb/idb_60/info.json @@ -1,648 +1,141 @@ { - "keyboard_name":"idb 60", - "url":"https://idb-keyboards.xyz/60", - "maintainer":"pngu", - "width":15, - "height":5, - "layouts":{ - "LAYOUT":{ - "LAYOUT_default":[ - { - "label":"Esc", - "x":0, - "y":0 - }, - { - "label":"!\n1", - "x":1, - "y":0 - }, - { - "label":"@\n2", - "x":2, - "y":0 - }, - { - "label":"#\n3", - "x":3, - "y":0 - }, - { - "label":"$\n4", - "x":4, - "y":0 - }, - { - "label":"%\n5", - "x":5, - "y":0 - }, - { - "label":"^\n6", - "x":6, - "y":0 - }, - { - "label":"&\n7", - "x":7, - "y":0 - }, - { - "label":"*\n8", - "x":8, - "y":0 - }, - { - "label":"(\n9", - "x":9, - "y":0 - }, - { - "label":")\n0", - "x":10, - "y":0 - }, - { - "label":"_\n-", - "x":11, - "y":0 - }, - { - "label":"+\n=", - "x":12, - "y":0 - }, - { - "label":"BS", - "x":13, - "y":0, - "w":2.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":"{\n[", - "x":11.5, - "y":1 - }, - { - "label":"}\n]", - "x":12.5, - "y":1 - }, - { - "label":"|\n\\", - "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":":\n;", - "x":10.75, - "y":2 - }, - { - "label":"\"\n'", - "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":"<\n,", - "x":9.25, - "y":3 - }, - { - "label":">\n.", - "x":10.25, - "y":3 - }, - { - "label":"?\n/", - "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.5 - }, - { - "label":"Alt", - "x":2.5, - "y":4, - "w":1.5 - }, - { - "label":"", - "x":4, - "y":4, - "w":7 - }, - { - "label":"Alt", - "x":11, - "y":4, - "w":1.5 - }, - { - "label":"Ctrl", - "x":13.5, - "y":4, - "w":1.5 - } - ], - "LAYOUT_all":[ - { - "label":"Esc", - "x":0, - "y":0 - }, - { - "label":"!\n1", - "x":1, - "y":0 - }, - { - "label":"@\n2", - "x":2, - "y":0 - }, - { - "label":"#\n3", - "x":3, - "y":0 - }, - { - "label":"$\n4", - "x":4, - "y":0 - }, - { - "label":"%\n5", - "x":5, - "y":0 - }, - { - "label":"^\n6", - "x":6, - "y":0 - }, - { - "label":"&\n7", - "x":7, - "y":0 - }, - { - "label":"*\n8", - "x":8, - "y":0 - }, - { - "label":"(\n9", - "x":9, - "y":0 - }, - { - "label":")\n0", - "x":10, - "y":0 - }, - { - "label":"_\n-", - "x":11, - "y":0 - }, - { - "label":"+\n=", - "x":12, - "y":0 - }, - { - "label":"BS", - "x":13, - "y":0 - }, - { - "label":"~\n`", - "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":"{\n[", - "x":11.5, - "y":1 - }, - { - "label":"}\n]", - "x":12.5, - "y":1 - }, - { - "label":"|\n\\", - "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":":\n;", - "x":10.75, - "y":2 - }, - { - "label":"\"\n'", - "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":">\n<\n\n|", - "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":"<\n,", - "x":9.25, - "y":3 - }, - { - "label":">\n.", - "x":10.25, - "y":3 - }, - { - "label":"?\n/", - "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.5 - }, - { - "label":"Win", - "x":1.5, - "y":4 - }, - { - "label":"Alt", - "x":2.5, - "y":4, - "w":1.5 - }, - { - "label":"", - "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 - } - ] - } - } -} \ No newline at end of file + "keyboard_name": "idb 60", + "url": "https://idb-keyboards.xyz/60", + "maintainer": "pngu", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_default": { + "key_count": 59, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!\n1", "x":1, "y":0}, + {"label":"@\n2", "x":2, "y":0}, + {"label":"#\n3", "x":3, "y":0}, + {"label":"$\n4", "x":4, "y":0}, + {"label":"%\n5", "x":5, "y":0}, + {"label":"^\n6", "x":6, "y":0}, + {"label":"&\n7", "x":7, "y":0}, + {"label":"*\n8", "x":8, "y":0}, + {"label":"(\n9", "x":9, "y":0}, + {"label":")\n0", "x":10, "y":0}, + {"label":"_\n-", "x":11, "y":0}, + {"label":"+\n=", "x":12, "y":0}, + {"label":"BS", "x":13, "y":0, "w":2.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":"{\n[", "x":11.5, "y":1}, + {"label":"}\n]", "x":12.5, "y":1}, + {"label":"|\n\\", "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":":\n;", "x":10.75, "y":2}, + {"label":"\"\n'", "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":"<\n,", "x":9.25, "y":3}, + {"label":">\n.", "x":10.25, "y":3}, + {"label":"?\n/", "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.5}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":7}, + {"label":"Alt", "x":11, "y":4, "w":1.5}, + {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} + ] + }, + "LAYOUT_all": { + "key_count": 63, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!\n1", "x":1, "y":0}, + {"label":"@\n2", "x":2, "y":0}, + {"label":"#\n3", "x":3, "y":0}, + {"label":"$\n4", "x":4, "y":0}, + {"label":"%\n5", "x":5, "y":0}, + {"label":"^\n6", "x":6, "y":0}, + {"label":"&\n7", "x":7, "y":0}, + {"label":"*\n8", "x":8, "y":0}, + {"label":"(\n9", "x":9, "y":0}, + {"label":")\n0", "x":10, "y":0}, + {"label":"_\n-", "x":11, "y":0}, + {"label":"+\n=", "x":12, "y":0}, + {"label":"BS", "x":13, "y":0}, + {"label":"~\n`", "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":"{\n[", "x":11.5, "y":1}, + {"label":"}\n]", "x":12.5, "y":1}, + {"label":"|\n\\", "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":":\n;", "x":10.75, "y":2}, + {"label":"\"\n'", "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":">\n<\n\n|", "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":"<\n,", "x":9.25, "y":3}, + {"label":">\n.", "x":10.25, "y":3}, + {"label":"?\n/", "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.5}, + {"label":"Win", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "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/idb/idb_60/readme.md b/keyboards/idb/idb_60/readme.md index df25e8778f55..13a4841b4aeb 100644 --- a/keyboards/idb/idb_60/readme.md +++ b/keyboards/idb/idb_60/readme.md @@ -2,9 +2,9 @@ Firmware for the idb 60 PCB -Keyboard Maintainer: [/u/omgitspngu](https://github.com/itspngu) -Hardware Supported: idb 60 PCB -Hardware Availability: [/u/omgitspngu](https://www.reddit.com/user/omgitspngu/) +* Keyboard Maintainer: [/u/omgitspngu](https://github.com/itspngu) +* Hardware Supported: idb 60 PCB +* Hardware Availability: [/u/omgitspngu](https://www.reddit.com/user/omgitspngu/) Make example for this keyboard (after setting up your build environment): From b187139f64abe11b0a4c614f727d8bf2784af298 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 12 Jan 2020 10:51:22 -0800 Subject: [PATCH 204/973] [Keyboard] Reviung41: Configurator layout support (#7852) --- keyboards/reviung41/info.json | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/keyboards/reviung41/info.json b/keyboards/reviung41/info.json index e69de29bb2d1..aff1660389f8 100644 --- a/keyboards/reviung41/info.json +++ b/keyboards/reviung41/info.json @@ -0,0 +1,61 @@ +{ + "keyboard_name": "reviung39", + "url": "", + "maintainer": "gtips", + "width": 13, + "height": 4.54, + "layouts": { + "LAYOUT_reviung41": { + "key_count": 41, + "layout": [ + {"label":"K00", "x":0, "y":0.54}, + {"label":"K01", "x":1, "y":0.36}, + {"label":"K02", "x":2, "y":0.18}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0.18}, + {"label":"K05", "x":5, "y":0.36}, + + {"label":"K30", "x":7, "y":0.36}, + {"label":"K31", "x":8, "y":0.18}, + {"label":"K32", "x":9, "y":0}, + {"label":"K33", "x":10, "y":0.18}, + {"label":"K34", "x":11, "y":0.36}, + {"label":"K35", "x":12, "y":0.54}, + + {"label":"K10", "x":0, "y":1.54}, + {"label":"K11", "x":1, "y":1.36}, + {"label":"K12", "x":2, "y":1.18}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1.18}, + {"label":"K15", "x":5, "y":1.36}, + + {"label":"K40", "x":7, "y":1.36}, + {"label":"K41", "x":8, "y":1.18}, + {"label":"K42", "x":9, "y":1}, + {"label":"K43", "x":10, "y":1.18}, + {"label":"K44", "x":11, "y":1.36}, + {"label":"K45", "x":12, "y":1.54}, + + {"label":"K20", "x":0, "y":2.54}, + {"label":"K21", "x":1, "y":2.36}, + {"label":"K22", "x":2, "y":2.18}, + {"label":"K23", "x":3, "y":2}, + {"label":"K24", "x":4, "y":2.18}, + {"label":"K25", "x":5, "y":2.36}, + + {"label":"K50", "x":7, "y":2.36}, + {"label":"K51", "x":8, "y":2.18}, + {"label":"K52", "x":9, "y":2}, + {"label":"K53", "x":10, "y":2.18}, + {"label":"K54", "x":11, "y":2.36}, + {"label":"K55", "x":12, "y":2.54}, + + {"label":"K60", "x":2.875, "y":3.54, "w":1.25}, + {"label":"K61", "x":4.125, "y":3.54, "w":1.25}, + {"label":"K62", "x":5.375, "y":3.54, "w":2.25}, + {"label":"K63", "x":7.625, "y":3.54, "w":1.25}, + {"label":"K64", "x":8.875, "y":3.54, "w":1.25} + ] + } + } +} From 5cb83dd5d7c60f4f19905a6e35f30b6bbfe562be Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sun, 12 Jan 2020 16:10:21 -0600 Subject: [PATCH 205/973] 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 206/973] 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 207/973] [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 208/973] 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 209/973] 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 210/973] 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 211/973] 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 212/973] [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 213/973] [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 214/973] [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 215/973] [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 216/973] [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 217/973] 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 218/973] 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 219/973] 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 220/973] 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 221/973] [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 222/973] 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 223/973] 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 224/973] 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 225/973] 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 226/973] 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 227/973] 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 228/973] 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 229/973] 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 230/973] 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 231/973] 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 232/973] 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 233/973] [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 234/973] [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 235/973] [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 236/973] 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 237/973] [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 238/973] 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 239/973] [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 240/973] [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 241/973] 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 242/973] 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 243/973] 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 244/973] 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 245/973] 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 246/973] 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 247/973] 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 248/973] [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 249/973] [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 250/973] [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 251/973] [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 252/973] 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 253/973] 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 254/973] 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 255/973] 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 256/973] 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 257/973] 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 258/973] [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 259/973] [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 260/973] [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 261/973] 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 262/973] [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 263/973] [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 264/973] [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 265/973] 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 266/973] 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 267/973] 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 268/973] 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 269/973] 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 270/973] 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 271/973] 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 272/973] 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 273/973] [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 274/973] [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 275/973] 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 276/973] 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 277/973] 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 278/973] 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 279/973] 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 280/973] [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 281/973] [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 282/973] [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 283/973] [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 284/973] 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 285/973] [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 286/973] 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 287/973] 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 288/973] [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 289/973] 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 290/973] 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 291/973] [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 292/973] 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 293/973] 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 294/973] 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 295/973] 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 296/973] 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 297/973] 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 298/973] [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 299/973] 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 300/973] 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 301/973] 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 302/973] 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 303/973] [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 304/973] [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 305/973] 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 306/973] 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 307/973] [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 308/973] 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 309/973] 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 310/973] 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 311/973] [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 312/973] 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 313/973] 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 314/973] 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 315/973] 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 316/973] 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 317/973] 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 318/973] 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 319/973] 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 320/973] [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 321/973] 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 322/973] 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 323/973] [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 324/973] 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 325/973] [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 326/973] [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 327/973] [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 328/973] [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 329/973] 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 330/973] [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 331/973] 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 332/973] [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 333/973] 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 334/973] [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 335/973] 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 336/973] 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 337/973] 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 338/973] 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 339/973] [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 340/973] [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 341/973] 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 342/973] 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 343/973] [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 344/973] 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 345/973] 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 346/973] 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 347/973] 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 348/973] [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 349/973] [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 350/973] =?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 351/973] 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 352/973] [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 353/973] [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 354/973] [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 355/973] 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 356/973] [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 357/973] 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 358/973] [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 359/973] [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 360/973] 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 361/973] 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 362/973] 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 363/973] 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 364/973] 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 365/973] 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 366/973] [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 367/973] 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 368/973] 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 369/973] 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 370/973] 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 371/973] [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 372/973] 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 373/973] 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 374/973] 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 375/973] 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 376/973] 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 377/973] 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 378/973] 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 379/973] [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 380/973] 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 381/973] 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 382/973] [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 383/973] 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 384/973] [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 385/973] 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 386/973] [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 387/973] [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 388/973] [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 389/973] 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 390/973] 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 391/973] [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 392/973] 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 393/973] 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 394/973] 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 395/973] [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 396/973] 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 397/973] 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 398/973] =?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 399/973] [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 400/973] 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 401/973] 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 402/973] 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 403/973] 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 404/973] 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 405/973] [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 406/973] [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 407/973] [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 408/973] [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 409/973] [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 410/973] [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 411/973] [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 412/973] [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 413/973] [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 414/973] [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 415/973] [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 416/973] [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 417/973] [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 418/973] [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 419/973] [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 420/973] 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 421/973] 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 422/973] [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 423/973] 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 424/973] 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 425/973] [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 426/973] 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 427/973] 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 428/973] 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 429/973] [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 430/973] [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 431/973] 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 432/973] 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 433/973] [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 434/973] [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 435/973] [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 436/973] 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 437/973] 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 438/973] 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 439/973] [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 440/973] 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 441/973] [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 442/973] 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 443/973] 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 444/973] 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 445/973] 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 446/973] 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 447/973] 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 448/973] 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 449/973] 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 450/973] 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 451/973] 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 452/973] 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 453/973] [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 454/973] [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 455/973] 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 456/973] 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 457/973] 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 458/973] [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 459/973] 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 460/973] 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 461/973] 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 462/973] 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 463/973] 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 464/973] 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 465/973] 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 466/973] 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 467/973] 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 468/973] 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 469/973] 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 470/973] 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 471/973] 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 472/973] 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 473/973] 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 474/973] 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 475/973] 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 476/973] 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 477/973] 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 478/973] [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 479/973] [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 480/973] 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 481/973] [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 482/973] 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 483/973] [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 484/973] [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 485/973] [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 486/973] [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 487/973] 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 488/973] 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 489/973] [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 490/973] 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 491/973] [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 492/973] 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 493/973] 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 494/973] 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 495/973] 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 496/973] 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 497/973] [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 498/973] 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 499/973] 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 500/973] [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 501/973] 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 502/973] 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 503/973] [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 504/973] 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 505/973] 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 506/973] 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 507/973] 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 508/973] 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 509/973] 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 a4af41cb13a76d406ac0be8efbfef695539e33b4 Mon Sep 17 00:00:00 2001 From: Elisiano Petrini Date: Fri, 21 Feb 2020 11:16:39 -0500 Subject: [PATCH 510/973] Added custom keymap for preonic (#7548) * Added custom keymap * Update keyboards/preonic/keymaps/elisiano/keymap.c Co-Authored-By: fauxpark * Address PR comments and added CTL_T(KC_ESC) on other layouts as well Co-authored-by: Ryan --- keyboards/preonic/keymaps/elisiano/config.h | 37 +++ keyboards/preonic/keymaps/elisiano/keymap.c | 307 +++++++++++++++++++ keyboards/preonic/keymaps/elisiano/readme.md | 3 + keyboards/preonic/keymaps/elisiano/rules.mk | 1 + 4 files changed, 348 insertions(+) create mode 100644 keyboards/preonic/keymaps/elisiano/config.h create mode 100644 keyboards/preonic/keymaps/elisiano/keymap.c create mode 100644 keyboards/preonic/keymaps/elisiano/readme.md create mode 100644 keyboards/preonic/keymaps/elisiano/rules.mk diff --git a/keyboards/preonic/keymaps/elisiano/config.h b/keyboards/preonic/keymaps/elisiano/config.h new file mode 100644 index 000000000000..40a9524b469d --- /dev/null +++ b/keyboards/preonic/keymaps/elisiano/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/elisiano/keymap.c b/keyboards/preonic/keymaps/elisiano/keymap.c new file mode 100644 index 000000000000..6da803ce6297 --- /dev/null +++ b/keyboards/preonic/keymaps/elisiano/keymap.c @@ -0,0 +1,307 @@ +/* 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" + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, + _MOUSE +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + EMOJI +}; + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +// replaced BACKLIT with EMOJI since I have no LEDs +[_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, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + EMOJI, KC_LCTL, KC_LALT, KC_LGUI, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |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, + CTL_T(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, + EMOJI, KC_LCTL, KC_LALT, KC_LGUI, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |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, + CTL_T(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, + EMOJI, KC_LCTL, KC_LALT, KC_LGUI, 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 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | ! | @ | # | $ | % | 6 | 7 | SCLK | UP | PAUS | PGUP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | LFT | DOWN | RGT | PGDN | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_6, KC_7, KC_SLCK, KC_UP, KC_PAUS, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, + 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* 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| Mouse| | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_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, TG(_MOUSE), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + + +[_MOUSE] = LAYOUT_preonic_grid( + _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_WH_L, XXXXXXX, KC_WH_R, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +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 EMOJI: + if (record->event.pressed) { + tap_code16(C(G(KC_SPC))); + } + 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; + } + 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) { + 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/elisiano/readme.md b/keyboards/preonic/keymaps/elisiano/readme.md new file mode 100644 index 000000000000..9cfeaa5dbd0b --- /dev/null +++ b/keyboards/preonic/keymaps/elisiano/readme.md @@ -0,0 +1,3 @@ +# Elisiano's Preonic layout - largely based on the Planck's + +All layouts are documented in comments diff --git a/keyboards/preonic/keymaps/elisiano/rules.mk b/keyboards/preonic/keymaps/elisiano/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/elisiano/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 8d11359886d70a7a75c041ac2d9d3ec88a16b7ee Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Fri, 21 Feb 2020 12:22:58 -0500 Subject: [PATCH 511/973] Update TMOv2 for new key (#7759) * Update TMOv2 for new keymap * Update based on PR changes --- keyboards/cannonkeys/an_c/rules.mk | 2 +- keyboards/cannonkeys/chimera65/rules.mk | 2 +- keyboards/cannonkeys/tmov2/config.h | 4 ++-- keyboards/cannonkeys/tmov2/info.json | 2 +- .../cannonkeys/tmov2/keymaps/default/keymap.c | 8 ++++---- keyboards/cannonkeys/tmov2/keymaps/via/keymap.c | 8 ++++---- keyboards/cannonkeys/tmov2/tmov2.h | 16 ++++++++-------- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk index faaed5c1ab7f..7ae14c4986fc 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk @@ -11,7 +11,7 @@ VPATH += keyboards/cannonkeys/stm32f072 SRC = keyboard.c \ led.c -#BOOTMAGIC_ENABLE = yes # 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 = yes # Console for debug diff --git a/keyboards/cannonkeys/chimera65/rules.mk b/keyboards/cannonkeys/chimera65/rules.mk index 7476e5f007a7..795e2baf8d92 100644 --- a/keyboards/cannonkeys/chimera65/rules.mk +++ b/keyboards/cannonkeys/chimera65/rules.mk @@ -11,7 +11,7 @@ VPATH += keyboards/cannonkeys/stm32f072 SRC = keyboard.c \ led.c -#BOOTMAGIC_ENABLE = yes # 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 = yes # Console for debug diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h index 159382fbcb65..e6d2afbbf534 100644 --- a/keyboards/cannonkeys/tmov2/config.h +++ b/keyboards/cannonkeys/tmov2/config.h @@ -29,9 +29,9 @@ along with this program. If not, see . /* key matrix size */ #define MATRIX_ROWS 4 -#define MATRIX_COLS 15 +#define MATRIX_COLS 16 -#define MATRIX_COL_PINS { B14, A14, C13, C14, C15, F0, F1, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_COL_PINS { B14, A14, B1, C13, C14, C15, F0, F1, B9, B8, B7, B6, B5, B4, B3, A15 } #define MATRIX_ROW_PINS { A10, A9, A8, B12 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cannonkeys/tmov2/info.json b/keyboards/cannonkeys/tmov2/info.json index 2734e94e4938..0ee4fed70938 100644 --- a/keyboards/cannonkeys/tmov2/info.json +++ b/keyboards/cannonkeys/tmov2/info.json @@ -6,7 +6,7 @@ "height": 4, "layouts": { "LAYOUT_default": { - "layout": [{"x":0, "y":0}, {"label":"Tab", "x":1.25, "y":0, "w":1.5}, {"label":"Q", "x":2.75, "y":0}, {"label":"W", "x":3.75, "y":0}, {"label":"E", "x":4.75, "y":0}, {"label":"R", "x":5.75, "y":0}, {"label":"T", "x":6.75, "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":"}", "x":13.75, "y":0}, {"label":"Backspace", "x":14.75, "y":0}, {"x":0, "y":1}, {"label":"Caps Lock", "x":1.25, "y":1, "w":1.75}, {"label":"A", "x":3, "y":1}, {"label":"S", "x":4, "y":1}, {"label":"D", "x":5, "y":1}, {"label":"F", "x":6, "y":1}, {"label":"G", "x":7, "y":1}, {"label":"H", "x":8, "y":1}, {"label":"J", "x":9, "y":1}, {"label":"K", "x":10, "y":1}, {"label":"L", "x":11, "y":1}, {"label":":", "x":12, "y":1}, {"label":"\"", "x":13, "y":1}, {"label":"Enter", "x":14, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":2.25}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"?", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2, "w":1.25}, {"x":14.75, "y":2}, {"x":0, "y":3}, {"label":"Win", "x":3.25, "y":3}, {"label":"Alt", "x":4.25, "y":3, "w":1.5}, {"x":5.75, "y":3, "w":2.25}, {"x":8, "y":3, "w":2.75}, {"label":"Alt", "x":10.75, "y":3, "w":1.5}, {"label":"Menu", "x":12.25, "y":3}] + "layout": [{"x":0, "y":0}, {"label":"Tab", "x":1.25, "y":0, "w":1.5}, {"label":"Q", "x":2.75, "y":0}, {"label":"W", "x":3.75, "y":0}, {"label":"E", "x":4.75, "y":0}, {"label":"R", "x":5.75, "y":0}, {"label":"T", "x":6.75, "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":"}", "x":13.75, "y":0}, {"label":"Backspace", "x":14.75, "y":0}, {"x":0, "y":1}, {"label":"Caps Lock", "x":1.25, "y":1, "w":1.75}, {"label":"A", "x":3, "y":1}, {"label":"S", "x":4, "y":1}, {"label":"D", "x":5, "y":1}, {"label":"F", "x":6, "y":1}, {"label":"G", "x":7, "y":1}, {"label":"H", "x":8, "y":1}, {"label":"J", "x":9, "y":1}, {"label":"K", "x":10, "y":1}, {"label":"L", "x":11, "y":1}, {"label":":", "x":12, "y":1}, {"label":"\"", "x":13, "y":1}, {"label":"Enter", "x":14, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":1.25}, {"label":"ISO \\", "x":2.5, "y":2}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"?", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2, "w":1.25}, {"x":14.75, "y":2}, {"x":0, "y":3}, {"label":"Win", "x":3.25, "y":3}, {"label":"Alt", "x":4.25, "y":3, "w":1.5}, {"x":5.75, "y":3, "w":2.25}, {"x":8, "y":3, "w":2.75}, {"label":"Alt", "x":10.75, "y":3, "w":1.5}, {"label":"Menu", "x":12.25, "y":3}] } } } diff --git a/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c b/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c index 9e01965b535b..1d6e4f49cf27 100644 --- a/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/tmov2/keymaps/default/keymap.c @@ -33,28 +33,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_default( BL_INC, 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, BL_DEC, 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, - RGB_MOD, 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(_FN2), + RGB_MOD, 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(_FN2), RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3) ), [_FN1] = LAYOUT_default( KC_TRNS, 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_FN2] = LAYOUT_default( RGB_TOG, 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, 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, - RGB_RMOD, KC_TRNS, 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_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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] = LAYOUT_default( 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 ) }; diff --git a/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c b/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c index 9e01965b535b..1d6e4f49cf27 100644 --- a/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/tmov2/keymaps/via/keymap.c @@ -33,28 +33,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_default( BL_INC, 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, BL_DEC, 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, - RGB_MOD, 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(_FN2), + RGB_MOD, 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(_FN2), RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3) ), [_FN1] = LAYOUT_default( KC_TRNS, 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_FN2] = LAYOUT_default( RGB_TOG, 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, 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, - RGB_RMOD, KC_TRNS, 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_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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] = LAYOUT_default( 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 ) }; diff --git a/keyboards/cannonkeys/tmov2/tmov2.h b/keyboards/cannonkeys/tmov2/tmov2.h index 838075e71b94..f1f3920403ad 100644 --- a/keyboards/cannonkeys/tmov2/tmov2.h +++ b/keyboards/cannonkeys/tmov2/tmov2.h @@ -3,13 +3,13 @@ #include "quantum.h" #define LAYOUT_default( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - 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, K305, K307, K309, K310 \ + K000, K001, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, 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, \ + K300, K303, K304, K306, K308, K310, K311 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO}, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO}, \ - { K300, KC_NO, K302, K303, KC_NO, K305, KC_NO, K307, KC_NO, K309, K310, KC_NO, KC_NO, KC_NO} \ + { K000, K001, KC_NO, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, KC_NO, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, KC_NO }, \ + { K300, KC_NO, KC_NO, K303, K304, KC_NO, K306, KC_NO, K308, KC_NO, K310, K311, KC_NO, KC_NO, KC_NO, KC_NO } \ } From 3157f5f4361fc9b88398da675d2c7feec11957bd Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 21 Feb 2020 10:21:02 -0800 Subject: [PATCH 512/973] VIA Support: KBD75 rev1/rev2 (#8214) * add a VIA keymap for kbd75 * rev2 is a completely different pcb allowing a NEW layout, setting this to have a different product id so users don't get confused when they're able to enable numpad layout on rev1 VIA * Update keyboards/kbdfans/kbd75/rev1/config.h Co-Authored-By: Joel Challis * Update keyboards/kbdfans/kbd75/rev2/config.h Co-Authored-By: Joel Challis Co-authored-by: Joel Challis --- keyboards/kbdfans/kbd75/config.h | 4 +- keyboards/kbdfans/kbd75/keymaps/via/keymap.c | 40 ++++++++++++++++++++ keyboards/kbdfans/kbd75/keymaps/via/rules.mk | 2 + keyboards/kbdfans/kbd75/rev1/config.h | 4 ++ keyboards/kbdfans/kbd75/rev2/config.h | 4 ++ 5 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 keyboards/kbdfans/kbd75/keymaps/via/keymap.c create mode 100644 keyboards/kbdfans/kbd75/keymaps/via/rules.mk create mode 100644 keyboards/kbdfans/kbd75/rev1/config.h create mode 100644 keyboards/kbdfans/kbd75/rev2/config.h diff --git a/keyboards/kbdfans/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h index 09ef6a2f316a..d46ca753517f 100644 --- a/keyboards/kbdfans/kbd75/config.h +++ b/keyboards/kbdfans/kbd75/config.h @@ -3,9 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x4B42 #define MANUFACTURER qmkbuilder #define PRODUCT KBD75 #define DESCRIPTION QMK keyboard firmware for KBD75 diff --git a/keyboards/kbdfans/kbd75/keymaps/via/keymap.c b/keyboards/kbdfans/kbd75/keymaps/via/keymap.c new file mode 100644 index 000000000000..861d711dd13b --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +#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, MO(1), 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_DEL, 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, MO(1), 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/kbdfans/kbd75/keymaps/via/rules.mk b/keyboards/kbdfans/kbd75/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/kbd75/rev1/config.h b/keyboards/kbdfans/kbd75/rev1/config.h new file mode 100644 index 000000000000..4f27efe6483e --- /dev/null +++ b/keyboards/kbdfans/kbd75/rev1/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 diff --git a/keyboards/kbdfans/kbd75/rev2/config.h b/keyboards/kbdfans/kbd75/rev2/config.h new file mode 100644 index 000000000000..a6b9e3eb1624 --- /dev/null +++ b/keyboards/kbdfans/kbd75/rev2/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define PRODUCT_ID 0x6061 +#define DEVICE_VER 0x0002 From d99404388f03f32aaffdf71794c6ebb9f3c92a8d Mon Sep 17 00:00:00 2001 From: Nick Winans Date: Fri, 21 Feb 2020 21:11:25 -0600 Subject: [PATCH 513/973] Fix QWIIC OLED for AVR (#7769) * Fix QWIIC OLED for AVR * Change missed width * width to width * height * Fix typo in comment Co-Authored-By: fauxpark * Fix last incorrect uses of LCDWIDTH Co-authored-by: Ryan --- drivers/qwiic/micro_oled.c | 26 +++++++++++++++++--------- drivers/qwiic/micro_oled.h | 4 ++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c index 597810f339c2..fdb98a852698 100644 --- a/drivers/qwiic/micro_oled.c +++ b/drivers/qwiic/micro_oled.c @@ -40,7 +40,10 @@ const unsigned char* fonts_pointer[] = {font5x7, font8x16}; uint8_t foreColor, drawMode, fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY; uint16_t fontMapWidth; -#define _BV(x) (1 << (x)) +#ifndef _BV +# define _BV(x) (1 << (x)) +#endif + #define swap(a, b) \ { \ uint8_t t = a; \ @@ -49,7 +52,7 @@ uint16_t fontMapWidth; } uint8_t micro_oled_transfer_buffer[20]; -static uint8_t micro_oled_screen_current[LCDWIDTH * LCDWIDTH / 8] = {0}; +static uint8_t micro_oled_screen_current[LCDWIDTH * LCDHEIGHT / 8] = {0}; /* LCD Memory organised in 64 horizontal pixel and 6 rows of byte B B .............B ----- @@ -69,7 +72,7 @@ static uint8_t micro_oled_screen_current[LCDWIDTH * LCDWIDTH / 8] = {0}; */ #if LCDWIDTH == 64 -# if LCDWIDTH == 48 +# if LCDHEIGHT == 48 static uint8_t micro_oled_screen_buffer[] = { // QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php // 64x48 image @@ -79,14 +82,14 @@ static uint8_t micro_oled_screen_buffer[] = { # endif #elif LCDWIDTH == 128 # if LCDHEIGHT == 32 -static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = { +static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = { // 128x32 qmk image 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, 0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xF0, 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, 0x12, 0xB2, 0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, 0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, 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, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, 0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, 0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, 0xFC, 0xFC, 0x60, 0x90, 0x0C, 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, 0x01, 0x03, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; # elif LCDHEIGHT == 64 -static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 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, +static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 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, 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, 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 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, 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, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 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, 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, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 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, @@ -98,13 +101,18 @@ static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0x00, 0x00, // TODO: generate bitmap of QMK logo here # endif #else -// catchall for custom screen szies -static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0}; +// catchall for custom screen sizes +static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0}; #endif void micro_oled_init(void) { i2c_init(); - i2c_start(I2C_ADDRESS_SA0_1); + + #ifdef __AVR__ + i2c_start(I2C_ADDRESS_SA0_1, 100); + #else + i2c_start(I2C_ADDRESS_SA0_1); + #endif // Display Init sequence for 64x48 OLED module send_command(DISPLAYOFF); // 0xAE @@ -205,7 +213,7 @@ void clear_screen(void) { */ void clear_buffer(void) { // 384 - memset(micro_oled_screen_buffer, 0, LCDWIDTH * LCDWIDTH / 8); + memset(micro_oled_screen_buffer, 0, LCDWIDTH * LCDHEIGHT / 8); } /** \brief Invert display. diff --git a/drivers/qwiic/micro_oled.h b/drivers/qwiic/micro_oled.h index 814143df11fe..6f9106f5819b 100644 --- a/drivers/qwiic/micro_oled.h +++ b/drivers/qwiic/micro_oled.h @@ -63,7 +63,7 @@ void draw_string(uint8_t x, uint8_t y, char* string, uint8_t color, uint8_t mode #ifndef LCDWIDTH # define LCDWIDTH 64 #endif -#ifndef LCDWIDTH +#ifndef LCDHEIGHT # define LCDHEIGHT 48 #endif #define FONTHEADERSIZE 6 @@ -131,4 +131,4 @@ typedef enum CMD { CMD_GETLCDHEIGHT, // 16 CMD_SETCOLOR, // 17 CMD_SETDRAWMODE // 18 -} commCommand_t; \ No newline at end of file +} commCommand_t; From 1327208449826c76be02ba5475ac26177dd24c45 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 22 Feb 2020 03:41:27 +0000 Subject: [PATCH 514/973] format code according to conventions [skip ci] --- drivers/qwiic/micro_oled.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c index fdb98a852698..bed6b2507eba 100644 --- a/drivers/qwiic/micro_oled.c +++ b/drivers/qwiic/micro_oled.c @@ -41,7 +41,7 @@ uint8_t foreColor, drawMode, fontWidth, fontHeight, fontType, fontStartChar, fo uint16_t fontMapWidth; #ifndef _BV -# define _BV(x) (1 << (x)) +# define _BV(x) (1 << (x)) #endif #define swap(a, b) \ @@ -90,14 +90,14 @@ static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; # elif LCDHEIGHT == 64 static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 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, 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, 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 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, 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, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 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, 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, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 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, 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, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 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, 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, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, 0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, 0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, 0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, 0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, 0x38, 0x66, 0xC3, 0x01, 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, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 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, 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, 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, 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, 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 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, 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, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 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, 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, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 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, 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, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 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, 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, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, 0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, 0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, 0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, 0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, 0x38, 0x66, 0xC3, 0x01, 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, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 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, 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, 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}; // TODO: generate bitmap of QMK logo here # endif #else @@ -108,11 +108,11 @@ static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0}; void micro_oled_init(void) { i2c_init(); - #ifdef __AVR__ - i2c_start(I2C_ADDRESS_SA0_1, 100); - #else - i2c_start(I2C_ADDRESS_SA0_1); - #endif +#ifdef __AVR__ + i2c_start(I2C_ADDRESS_SA0_1, 100); +#else + i2c_start(I2C_ADDRESS_SA0_1); +#endif // Display Init sequence for 64x48 OLED module send_command(DISPLAYOFF); // 0xAE From eb9c2429c69cf034fb3938f0533d15457a2d7820 Mon Sep 17 00:00:00 2001 From: yiancar Date: Sat, 22 Feb 2020 15:10:41 +0000 Subject: [PATCH 515/973] Update main.c (#8198) --- tmk_core/protocol/vusb/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index 06dc8ae67fee..1e9d65be0bee 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -59,12 +59,12 @@ int main(void) { #endif keyboard_setup(); - keyboard_init(); host_set_driver(vusb_driver()); - debug("initForUsbConnectivity()\n"); initForUsbConnectivity(); + keyboard_init(); + debug("main loop\n"); while (1) { #if USB_COUNT_SOF From b353028ea5e0ac7b69e7fed4f224c7cb07015ec9 Mon Sep 17 00:00:00 2001 From: Akaash Suresh Date: Sat, 22 Feb 2020 22:57:19 -0600 Subject: [PATCH 516/973] New functionality for cformat (#7893) Fixing complexity remove lambda PR review fixes #1 Removing unneccesary string substitution Handle -a and specified files Complexity rewrite, use pathlib --- docs/cli.md | 26 ++++++++- lib/python/qmk/cli/cformat.py | 65 +++++++++++++++-------- lib/python/qmk/path.py | 14 +++++ lib/python/qmk/tests/test_cli_commands.py | 3 +- 4 files changed, 82 insertions(+), 26 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 8ee8ab0e8449..7c3effcc09ea 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -71,14 +71,36 @@ There are some limitations to the local CLI compared to the global CLI: ## `qmk cformat` -This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files. +This command formats C code using clang-format. -**Usage**: +Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b ` + +Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files. + +**Usage for specified files**: ``` qmk cformat [file1] [file2] [...] [fileN] ``` +**Usage for all core files**: + +``` +qmk cformat -a +``` + +**Usage for only changed files against origin/master**: + +``` +qmk cformat +``` + +**Usage for only changed files against branch_name**: + +``` +qmk cformat -b branch_name +``` + ## `qmk compile` 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. diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index de55218ae980..7e3a91dcf079 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -1,16 +1,14 @@ """Format C code according to QMK's style. """ -import os import subprocess from shutil import which from milc import cli +import qmk.path -@cli.argument('files', nargs='*', arg_only=True, help='Filename(s) to format.') -@cli.subcommand("Format C code according to QMK's style.") -def cformat(cli): - """Format C code according to QMK's style. +def cformat_run(files, all_files): + """Spawn clang-format subprocess with proper arguments """ # Determine which version of clang-format to use clang_format = ['clang-format', '-i'] @@ -19,27 +17,48 @@ def cformat(cli): if which(binary): clang_format[0] = binary break - - # Find the list of files to format - 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 any(i in dirpath for i in ignores): - dirnames.clear() - continue - - for name in filenames: - if name.endswith(('.c', '.h', '.cpp')): - cli.args.files.append(os.path.join(dirpath, name)) - - # Run clang-format on the files we've found try: - subprocess.run(clang_format + cli.args.files, check=True) + if not files: + cli.log.warn('No changes detected. Use "qmk cformat -a" to format all files') + return False + if files and all_files: + cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(cli.args.files)) + # 3.6+: Can remove the str casting, python will cast implicitly + subprocess.run(clang_format + [str(file) for file in files], check=True) cli.log.info('Successfully formatted the C code.') except subprocess.CalledProcessError: cli.log.error('Error formatting C code!') return False + + +@cli.argument('-a', '--all-files', arg_only=True, action='store_true', help='Format all core files.') +@cli.argument('-b', '--base-branch', default='origin/master', help='Branch to compare to diffs to.') +@cli.argument('files', nargs='*', arg_only=True, help='Filename(s) to format.') +@cli.subcommand("Format C code according to QMK's style.") +def cformat(cli): + """Format C code according to QMK's style. + """ + # Empty array for files + files = [] + # Core directories for formatting + core_dirs = ['drivers', 'quantum', 'tests', 'tmk_core'] + ignores = ['tmk_core/protocol/usb_hid', 'quantum/template'] + # Find the list of files to format + if cli.args.files: + files.extend(qmk.path.normpath(file) for file in cli.args.files) + # If -a is specified + elif cli.args.all_files: + all_files = qmk.path.c_source_files(core_dirs) + # The following statement checks each file to see if the file path is in the ignored directories. + files.extend(file for file in all_files if not any(i in str(file) for i in ignores)) + # No files specified & no -a flag + else: + base_args = ['git', 'diff', '--name-only', cli.args.base_branch] + out = subprocess.run(base_args + core_dirs, check=True, stdout=subprocess.PIPE) + changed_files = filter(None, out.stdout.decode('UTF-8').split('\n')) + filtered_files = [qmk.path.normpath(file) for file in changed_files if not any(i in file for i in ignores)] + files.extend(file for file in filtered_files if file.exists() and file.suffix in ['.c', '.h', '.cpp']) + + # Run clang-format on the files we've found + cformat_run(files, cli.args.all_files) diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index d16928afb5c1..bfaa439249d3 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -68,3 +68,17 @@ def normpath(path): return Path(path) return Path(os.environ['ORIG_CWD']) / path + + +def c_source_files(dir_names): + """Returns a list of all *.c, *.h, and *.cpp files for a given list of directories + + Args: + + dir_names + List of directories, relative pathing starts at qmk's cwd + """ + files = [] + for dir in dir_names: + files.extend(file for file in Path(dir).glob('**/*') if file.suffix in ['.c', '.h', '.cpp']) + return files diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index bb77952faf68..a2595eb7887f 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -7,7 +7,8 @@ def check_subcommand(command, *args): def test_cformat(): - assert check_subcommand('cformat', 'tmk_core/common/keyboard.c').returncode == 0 + result = check_subcommand('cformat', 'quantum/matrix.c') + assert result.returncode == 0 def test_compile(): From 530c9976382a321d65c0339e0465932bd28f8cb9 Mon Sep 17 00:00:00 2001 From: Jez Cope Date: Sun, 23 Feb 2020 20:50:11 +0000 Subject: [PATCH 517/973] Add link to "Useful functions" in macro docs (#7446) * Add link to "Useful functions" in macro docs Help people find additional features they can activate within a macro * Update docs/feature_macros.md Co-Authored-By: Drashna Jaelre Co-authored-by: skullydazed Co-authored-by: Drashna Jaelre --- docs/feature_macros.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/feature_macros.md b/docs/feature_macros.md index c13ae82061a0..7ca945683ca8 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -154,6 +154,8 @@ SEND_STRING(".."SS_TAP(X_END)); There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple. +?> You can also use the functions described in [Useful function](ref_functions.md) for additional functionality. For example `reset_keyboard()` allows you to reset the keyboard as part of a macro. + ### `record->event.pressed` This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is From f76f9c7d2abd1901be45431c5b2ea435c8c472b2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 23 Feb 2020 22:03:01 +0000 Subject: [PATCH 518/973] Add mouse support to SEND_STRING (#8223) * Add mouse support to SEND_STRING * add short forms --- quantum/send_string_keycodes.h | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/quantum/send_string_keycodes.h b/quantum/send_string_keycodes.h index fc6467a7412f..b4a50f84d37b 100644 --- a/quantum/send_string_keycodes.h +++ b/quantum/send_string_keycodes.h @@ -137,6 +137,24 @@ #define X_BRMU X_PAUSE #define X_BRMD X_SCROLLLOCK +/* Mouse Keys */ +#define X_MS_U X_MS_UP +#define X_MS_D X_MS_DOWN +#define X_MS_L X_MS_LEFT +#define X_MS_R X_MS_RIGHT +#define X_BTN1 X_MS_BTN1 +#define X_BTN2 X_MS_BTN2 +#define X_BTN3 X_MS_BTN3 +#define X_BTN4 X_MS_BTN4 +#define X_BTN5 X_MS_BTN5 +#define X_WH_U X_MS_WH_UP +#define X_WH_D X_MS_WH_DOWN +#define X_WH_L X_MS_WH_LEFT +#define X_WH_R X_MS_WH_RIGHT +#define X_ACL0 X_MS_ACCEL0 +#define X_ACL1 X_MS_ACCEL1 +#define X_ACL2 X_MS_ACCEL2 + /* Keyboard/Keypad Page (0x07) */ #define X_A 04 #define X_B 05 @@ -341,6 +359,24 @@ #define X_BRIGHTNESS_UP bd #define X_BRIGHTNESS_DOWN be +/* Mouse Buttons (unallocated range in HID spec) */ +#define X_MS_UP f0 +#define X_MS_DOWN f1 +#define X_MS_LEFT f2 +#define X_MS_RIGHT f3 +#define X_MS_BTN1 f4 +#define X_MS_BTN2 f5 +#define X_MS_BTN3 f6 +#define X_MS_BTN4 f7 +#define X_MS_BTN5 f8 +#define X_MS_WH_UP f9 +#define X_MS_WH_DOWN fa +#define X_MS_WH_LEFT fb +#define X_MS_WH_RIGHT fc +#define X_MS_ACCEL0 fd +#define X_MS_ACCEL1 fe +#define X_MS_ACCEL2 ff + // Send string macros #define STRINGIZE(z) #z #define ADD_SLASH_X(y) STRINGIZE(\x##y) From 716c29881c0f91e3998e1fc5c49740bd6e65876f Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 24 Feb 2020 10:08:00 +1100 Subject: [PATCH 519/973] Rollback PR #7967 in preference of fixing I2C start/stop properly, in a followup PR. (#8173) --- drivers/arm/i2c_master.c | 63 ++++++++-------------------------------- 1 file changed, 12 insertions(+), 51 deletions(-) diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index b3fabb05e740..21aefd497ccf 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -29,6 +29,8 @@ #include #include +static uint8_t i2c_address; + static const I2CConfig i2cconfig = { #ifdef USE_I2CV1 I2C1_OPMODE, @@ -69,49 +71,27 @@ __attribute__((weak)) void i2c_init(void) { } i2c_status_t i2c_start(uint8_t address) { -#if I2C_USE_MUTUAL_EXCLUSION - i2cAcquireBus(&I2C_DRIVER); -#endif - + i2c_address = address; 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) { -#if I2C_USE_MUTUAL_EXCLUSION - i2cAcquireBus(&I2C_DRIVER); -#endif - + i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (address >> 1), data, length, 0, 0, MS2ST(timeout)); - -#if I2C_USE_MUTUAL_EXCLUSION - i2cReleaseBus(&I2C_DRIVER); -#endif - + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); return chibios_to_qmk(&status); } i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { -#if I2C_USE_MUTUAL_EXCLUSION - i2cAcquireBus(&I2C_DRIVER); -#endif - + i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (address >> 1), data, length, MS2ST(timeout)); - -#if I2C_USE_MUTUAL_EXCLUSION - i2cReleaseBus(&I2C_DRIVER); -#endif - + msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); 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) { -#if I2C_USE_MUTUAL_EXCLUSION - i2cAcquireBus(&I2C_DRIVER); -#endif - + i2c_address = devaddr; i2cStart(&I2C_DRIVER, &i2cconfig); uint8_t complete_packet[length + 1]; @@ -120,34 +100,15 @@ 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, (devaddr >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); - -#if I2C_USE_MUTUAL_EXCLUSION - i2cReleaseBus(&I2C_DRIVER); -#endif - + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); 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) { -#if I2C_USE_MUTUAL_EXCLUSION - i2cAcquireBus(&I2C_DRIVER); -#endif - + i2c_address = devaddr; i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (devaddr >> 1), ®addr, 1, data, length, MS2ST(timeout)); - -#if I2C_USE_MUTUAL_EXCLUSION - i2cReleaseBus(&I2C_DRIVER); -#endif - + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout)); return chibios_to_qmk(&status); } -void i2c_stop(void) { - i2cStop(&I2C_DRIVER); - -#if I2C_USE_MUTUAL_EXCLUSION - i2cReleaseBus(&I2C_DRIVER); -#endif -} +void i2c_stop(void) { i2cStop(&I2C_DRIVER); } From 371ff9dd6f9c4feada34622d9a43480495b07e50 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 24 Feb 2020 10:27:25 +1100 Subject: [PATCH 520/973] A proper `send_string()` for the Unicode feature (#8155) --- docs/feature_unicode.md | 22 +++++++-- .../process_keycode/process_unicode_common.c | 49 +++++++++++++++++++ .../process_keycode/process_unicode_common.h | 1 + 3 files changed, 67 insertions(+), 5 deletions(-) diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index bd1f4fa5ae05..546af2521a47 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -193,12 +193,24 @@ By default, when the keyboard boots, it will initialize the input mode to the la !> Using `UNICODE_SELECTED_MODES` means you don't have to initially set the input mode in `matrix_init_user()` (or a similar function); the Unicode system will do that for you on startup. This has the added benefit of avoiding unnecessary writes to EEPROM. -## `send_unicode_hex_string` +## `send_unicode_string()` -To type multiple characters for things like (ノಠ痊ಠ)ノ彡┻━┻, you can use `send_unicode_hex_string()` much like `SEND_STRING()` except you would use hex values separate by spaces. -For example, the table flip seen above would be `send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B")` +This function is much like `send_string()` but allows you to input UTF-8 characters directly, currently up to code point U+FFFF. Make sure your `keymap.c` is formatted in UTF-8 encoding. -There are many ways to get a hex code, but an easy one is [this site](https://r12a.github.io/app-conversion/). Just make sure to convert to hexadecimal, and that is your string. +```c +send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); +``` + +## `send_unicode_hex_string()` + +Similar to `send_unicode_string()`, but the characters are represented by their code point values in ASCII, separated by spaces. For example, the table flip above would be achieved with: + +```c +send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); +``` + +An easy way to convert your Unicode string to this format is by using [this site](https://r12a.github.io/app-conversion/), and taking the result in the "Hex/UTF-32" section. +Unlike `send_unicode_string()` this function supports code points up to U+10FFFF. ## Additional Language Support @@ -228,6 +240,6 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed. If you enable the US International layout on the system, it will use punctuation to accent the characters. -For instance, typing "`a" will result in à. +For instance, typing "\`a" will result in à. You can find details on how to enable this [here](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout). diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 94383f19b749..4ac305e66176 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -178,6 +178,55 @@ void send_unicode_hex_string(const char *str) { } } +// Borrowed from https://nullprogram.com/blog/2017/10/06/ +const char *decode_utf8(const char *str, int32_t *code_point) { + const char *next; + + if (str[0] < 0x80) { // U+0000-007F + *code_point = str[0]; + next = str + 1; + } else if ((str[0] & 0xE0) == 0xC0) { // U+0080-07FF + *code_point = ((int32_t)(str[0] & 0x1F) << 6) | ((int32_t)(str[1] & 0x3F) << 0); + next = str + 2; + } else if ((str[0] & 0xF0) == 0xE0) { // U+0800-FFFF + *code_point = ((int32_t)(str[0] & 0x0F) << 12) | ((int32_t)(str[1] & 0x3F) << 6) | ((int32_t)(str[2] & 0x3F) << 0); + next = str + 3; + } else if ((str[0] & 0xF8) == 0xF0 && (str[0] <= 0xF4)) { // U+10000-10FFFF + // Skip for now - register_hex() only takes a uint16 + //*code_point = ((int32_t)(str[0] & 0x07) << 18) | ((int32_t)(str[1] & 0x3F) << 12) | ((int32_t)(str[2] & 0x3F) << 6) | ((int32_t)(str[3] & 0x3F) << 0); + *code_point = -1; + next = str + 4; + } else { + *code_point = -1; + next = str + 1; + } + + // part of a UTF-16 surrogate pair - invalid + if (*code_point >= 0xD800 && *code_point <= 0xDFFF) { + *code_point = -1; + } + + return next; +} + +void send_unicode_string(const char *str) { + if (!str) { + return; + } + + int32_t code_point = 0; + + while (*str) { + str = decode_utf8(str, &code_point); + + if (code_point >= 0) { + unicode_input_start(); + register_hex(code_point); + unicode_input_finish(); + } + } +} + bool process_unicode_common(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index cab6eea6eafd..393db2d99eb7 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -80,6 +80,7 @@ void unicode_input_cancel(void); void register_hex(uint16_t hex); void send_unicode_hex_string(const char *str); +void send_unicode_string(const char *str); bool process_unicode_common(uint16_t keycode, keyrecord_t *record); From 156c9c4ec008373f8afa44d76316f554579d079c Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 24 Feb 2020 00:25:18 +0000 Subject: [PATCH 521/973] Gingham Update (#8225) --- keyboards/gingham/config.h | 3 - keyboards/gingham/matrix.c | 176 +++++-------------------------------- keyboards/gingham/rules.mk | 10 +-- 3 files changed, 28 insertions(+), 161 deletions(-) diff --git a/keyboards/gingham/config.h b/keyboards/gingham/config.h index d89120c281ed..4c880a8fcd4c 100644 --- a/keyboards/gingham/config.h +++ b/keyboards/gingham/config.h @@ -84,9 +84,6 @@ along with this program. If not, see . // #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 diff --git a/keyboards/gingham/matrix.c b/keyboards/gingham/matrix.c index 5ac81e791145..47c8830565fa 100644 --- a/keyboards/gingham/matrix.c +++ b/keyboards/gingham/matrix.c @@ -17,160 +17,53 @@ 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 "i2c_master.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 - static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -/* 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< 0) && (x < 12) ) { - setPinInputHigh(col_pins[x]); + setPinInputHigh(col_pins[x]); } } } -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ +void matrix_init_custom(void) { + // TODO: initialize hardware here + // Initialize I2C + i2c_init(); + + // initialize key pins + init_pins(); + wait_ms(50); +} + +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]; @@ -203,7 +96,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) } // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); } // Unselect row @@ -212,36 +105,13 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -void matrix_init(void) { - - // Initialize I2C - i2c_init(); - - // 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; +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; // 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); + matrix_has_changed |= read_cols_on_row(current_matrix, current_row); } - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - - matrix_scan_quantum(); - return (uint8_t)changed; + return matrix_has_changed; } diff --git a/keyboards/gingham/rules.mk b/keyboards/gingham/rules.mk index f8062eb50d57..8448cf646808 100644 --- a/keyboards/gingham/rules.mk +++ b/keyboards/gingham/rules.mk @@ -20,11 +20,11 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # Build Options # 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 = 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 @@ -36,6 +36,6 @@ 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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs -CUSTOM_MATRIX = yes +CUSTOM_MATRIX = lite From 40f7981395f4225c48084c005af981bda2f94d50 Mon Sep 17 00:00:00 2001 From: carlxia Date: Mon, 24 Feb 2020 11:04:26 +0800 Subject: [PATCH 522/973] [Keyboard] Add zfrontier/big_switch (#8205) * add zfrontier/big_switch * Update keyboards/zfrontier/big_switch/config.h Co-Authored-By: Ryan * Update keyboards/zfrontier/big_switch/config.h Co-Authored-By: Ryan * Update keyboards/zfrontier/big_switch/keymaps/longtap/keymap.c Co-Authored-By: Ryan * add overriding keymap makefile * Update keyboards/zfrontier/big_switch/keymaps/longtap/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/zfrontier/big_switch/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * remove redundant defines * taplong no longer needed Co-authored-by: Ryan Co-authored-by: Drashna Jaelre --- keyboards/zfrontier/big_switch/big_switch.c | 17 +++ keyboards/zfrontier/big_switch/big_switch.h | 34 +++++ keyboards/zfrontier/big_switch/config.h | 54 ++++++++ .../big_switch/keymaps/default/keymap.c | 31 +++++ .../big_switch/keymaps/default/readme.md | 1 + .../big_switch/keymaps/longtap/keymap.c | 118 ++++++++++++++++++ .../big_switch/keymaps/longtap/readme.md | 4 + .../big_switch/keymaps/longtap/rules.mk | 1 + keyboards/zfrontier/big_switch/readme.md | 15 +++ keyboards/zfrontier/big_switch/rules.mk | 33 +++++ 10 files changed, 308 insertions(+) create mode 100644 keyboards/zfrontier/big_switch/big_switch.c create mode 100644 keyboards/zfrontier/big_switch/big_switch.h create mode 100644 keyboards/zfrontier/big_switch/config.h create mode 100644 keyboards/zfrontier/big_switch/keymaps/default/keymap.c create mode 100644 keyboards/zfrontier/big_switch/keymaps/default/readme.md create mode 100644 keyboards/zfrontier/big_switch/keymaps/longtap/keymap.c create mode 100644 keyboards/zfrontier/big_switch/keymaps/longtap/readme.md create mode 100644 keyboards/zfrontier/big_switch/keymaps/longtap/rules.mk create mode 100644 keyboards/zfrontier/big_switch/readme.md create mode 100644 keyboards/zfrontier/big_switch/rules.mk diff --git a/keyboards/zfrontier/big_switch/big_switch.c b/keyboards/zfrontier/big_switch/big_switch.c new file mode 100644 index 000000000000..53c3e34e7f53 --- /dev/null +++ b/keyboards/zfrontier/big_switch/big_switch.c @@ -0,0 +1,17 @@ +/* Copyright 2020 zFrontier + * + * 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 "big_switch.h" diff --git a/keyboards/zfrontier/big_switch/big_switch.h b/keyboards/zfrontier/big_switch/big_switch.h new file mode 100644 index 000000000000..d12184932d60 --- /dev/null +++ b/keyboards/zfrontier/big_switch/big_switch.h @@ -0,0 +1,34 @@ +/* Copyright 2020 zFrontier + * + * 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( \ + K00 \ +) \ +{ \ + { K00 } \ +} diff --git a/keyboards/zfrontier/big_switch/config.h b/keyboards/zfrontier/big_switch/config.h new file mode 100644 index 000000000000..6b4111c054e9 --- /dev/null +++ b/keyboards/zfrontier/big_switch/config.h @@ -0,0 +1,54 @@ +/* +Copyright 2020 zFrontier + +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 0x0A01 +#define DEVICE_VER 0x0005 +#define MANUFACTURER zFrontier +#define PRODUCT Red Comet Big Switch +#define DESCRIPTION Big Switch + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { F0 } +#define MATRIX_COL_PINS { F1 } +#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 + +/* RGB light config */ +#define RGB_DI_PIN B6 +#define RGBLED_NUM 4 +#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHE_CENTER 2.0 +#define RGBLIGHT_EFFECT_BREATHE_MAX 255 + +/* long tapping config */ +#define TAPPING_TERM 500 diff --git a/keyboards/zfrontier/big_switch/keymaps/default/keymap.c b/keyboards/zfrontier/big_switch/keymaps/default/keymap.c new file mode 100644 index 000000000000..a30690a39270 --- /dev/null +++ b/keyboards/zfrontier/big_switch/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +/* Copyright 2020 zFrontier + * + * 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_ENTER), +}; + + + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING); + rgblight_sethsv_noeeprom(0,0,128); +} + diff --git a/keyboards/zfrontier/big_switch/keymaps/default/readme.md b/keyboards/zfrontier/big_switch/keymaps/default/readme.md new file mode 100644 index 000000000000..fea7a92a5761 --- /dev/null +++ b/keyboards/zfrontier/big_switch/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for big_switch diff --git a/keyboards/zfrontier/big_switch/keymaps/longtap/keymap.c b/keyboards/zfrontier/big_switch/keymaps/longtap/keymap.c new file mode 100644 index 000000000000..a475421a3ad9 --- /dev/null +++ b/keyboards/zfrontier/big_switch/keymaps/longtap/keymap.c @@ -0,0 +1,118 @@ +/* Copyright 2020 zFrontier + * + * 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 + + +enum { + TD_ENTER = 0, +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( TD(TD_ENTER) ), +}; + + + +void keyboard_post_init_user(void) { + print("zFrontier S01.6 boot...\n"); + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING); + rgblight_sethsv_noeeprom(0,0,128); +} + + +void zf_switch_rgb_mode(void) { + switch (rgblight_get_mode() ) { + case RGBLIGHT_MODE_BREATHING: + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD); + break; + case RGBLIGHT_MODE_RAINBOW_MOOD: + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + break; + case RGBLIGHT_MODE_RAINBOW_SWIRL: + rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE); + break; + case RGBLIGHT_MODE_SNAKE: + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT); + break; + case RGBLIGHT_MODE_KNIGHT: + rgblight_mode_noeeprom(RGBLIGHT_MODE_CHRISTMAS); + break; + case RGBLIGHT_MODE_CHRISTMAS: + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT); + break; + case RGBLIGHT_MODE_STATIC_GRADIENT: + rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); + break; + case RGBLIGHT_MODE_RGB_TEST: + default: + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING); + break; + } +} + +void zf_send_random_string(void) { + uint8_t tmpu8 = (timer_read() & 0x7); + switch (tmpu8) { + case 0: + case 1: + SEND_STRING("Sazabi, launching!"); + break; + case 2: + case 3: + SEND_STRING("I, Char Aznable, will purge them, Amuro!"); + break; + case 4: + case 5: + SEND_STRING("Their souls are weighted down by gravity!"); + break; + case 6: + SEND_STRING("Go, Axis! With my unpleasant memories!"); + break; + case 7: + SEND_STRING("Hello from zFrontier!"); + break; + } + + tap_code(KC_ENT); +} + +void dance_finished(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + register_code(KC_ENTER); + break; + case 2: + zf_switch_rgb_mode(); + break; + default: + zf_send_random_string(); + break; + } +} + +void dance_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_ENTER); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ENTER] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_finished, dance_reset) +}; diff --git a/keyboards/zfrontier/big_switch/keymaps/longtap/readme.md b/keyboards/zfrontier/big_switch/keymaps/longtap/readme.md new file mode 100644 index 000000000000..a94e5c32cb2b --- /dev/null +++ b/keyboards/zfrontier/big_switch/keymaps/longtap/readme.md @@ -0,0 +1,4 @@ +# The longtap keymap for big_switch, the single switch keyboard, +- tap once : send ENTER +- tap twice : change RGB backlight mode +- tap three times : send a pesudo-random string diff --git a/keyboards/zfrontier/big_switch/keymaps/longtap/rules.mk b/keyboards/zfrontier/big_switch/keymaps/longtap/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/zfrontier/big_switch/keymaps/longtap/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/zfrontier/big_switch/readme.md b/keyboards/zfrontier/big_switch/readme.md new file mode 100644 index 000000000000..d0009cfecdca --- /dev/null +++ b/keyboards/zfrontier/big_switch/readme.md @@ -0,0 +1,15 @@ +# zFrontier Big Switch + +![big_switch](https://img.zfrontier.com/cover/20180808/FiuL_XSz1WCP4tm2Q25I-JLtheK3) + +A keyboard designed by zFrontier with RGB backlight and only one switch. + +* Keyboard Maintainer: [carlxia](https://github.com/carlxia) +* Hardware Supported: zFrontier Big Switch +* Hardware Availability: [zFrontier page](https://en.zfrontier.com/products/redcomet-bigswitch-combo) + +Make example for this keyboard (after setting up your build environment): + + make zfrontier/big_switch:longtap + +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/zfrontier/big_switch/rules.mk b/keyboards/zfrontier/big_switch/rules.mk new file mode 100644 index 000000000000..17be8a47aa3f --- /dev/null +++ b/keyboards/zfrontier/big_switch/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 = no # 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 +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 +TAP_DANCE_ENABLE = no From 20e1c8c571ba1d197421ff14555bf2ab873a080f Mon Sep 17 00:00:00 2001 From: ai03 Date: Sun, 23 Feb 2020 21:18:14 -0800 Subject: [PATCH 523/973] [Keyboard] ai03 Equinox (#8224) Re-attempt to add Equinox with newer Via changes * Add nox * Tweak based on previous pullrequests * Add necessary descriptions * Modernize Via config * Modernize old files with massive blocks of unneeded options * Fix missing bootmagic * Update keyboards/ai03/equinox/equinox.h * Update keyboards/ai03/equinox/keymaps/default/keymap.c * Update keyboards/ai03/equinox/keymaps/via/keymap.c * Update keyboards/ai03/equinox/keymaps/via/readme.md * Update keyboards/ai03/equinox/readme.md * Update keyboards/ai03/equinox/readme.md * Update keyboards/ai03/equinox/readme.md * Update keyboards/ai03/equinox/info.json * Update keyboards/ai03/equinox/keymaps/default/keymap.c * Update keyboards/ai03/equinox/keymaps/default/keymap.c * Update keyboards/ai03/equinox/keymaps/proto_via/keymap.c * Update keyboards/ai03/equinox/keymaps/proto_via/keymap.c * Update keyboards/ai03/equinox/keymaps/proto_via/keymap.c * Update keyboards/ai03/equinox/keymaps/proto_via/keymap.c * Update keyboards/ai03/equinox/keymaps/via/keymap.c * Update keyboards/ai03/equinox/keymaps/via/keymap.c * Update keyboards/ai03/equinox/keymaps/via/keymap.c * Fix indents * Update keyboards/ai03/equinox/keymaps/proto_via/rules.mk * Update keyboards/ai03/equinox/rules.mk --- keyboards/ai03/equinox/config.h | 194 ++++++++++++++++++ keyboards/ai03/equinox/equinox.c | 17 ++ keyboards/ai03/equinox/equinox.h | 39 ++++ keyboards/ai03/equinox/info.json | 58 ++++++ .../ai03/equinox/keymaps/default/keymap.c | 43 ++++ .../ai03/equinox/keymaps/default/readme.md | 3 + .../ai03/equinox/keymaps/proto_via/config.h | 23 +++ .../ai03/equinox/keymaps/proto_via/keymap.c | 49 +++++ .../ai03/equinox/keymaps/proto_via/readme.md | 4 + .../ai03/equinox/keymaps/proto_via/rules.mk | 5 + keyboards/ai03/equinox/keymaps/via/keymap.c | 49 +++++ keyboards/ai03/equinox/keymaps/via/readme.md | 3 + keyboards/ai03/equinox/keymaps/via/rules.mk | 1 + keyboards/ai03/equinox/readme.md | 15 ++ keyboards/ai03/equinox/rules.mk | 33 +++ 15 files changed, 536 insertions(+) create mode 100644 keyboards/ai03/equinox/config.h create mode 100644 keyboards/ai03/equinox/equinox.c create mode 100644 keyboards/ai03/equinox/equinox.h create mode 100644 keyboards/ai03/equinox/info.json create mode 100644 keyboards/ai03/equinox/keymaps/default/keymap.c create mode 100644 keyboards/ai03/equinox/keymaps/default/readme.md create mode 100644 keyboards/ai03/equinox/keymaps/proto_via/config.h create mode 100644 keyboards/ai03/equinox/keymaps/proto_via/keymap.c create mode 100644 keyboards/ai03/equinox/keymaps/proto_via/readme.md create mode 100644 keyboards/ai03/equinox/keymaps/proto_via/rules.mk create mode 100644 keyboards/ai03/equinox/keymaps/via/keymap.c create mode 100644 keyboards/ai03/equinox/keymaps/via/readme.md create mode 100644 keyboards/ai03/equinox/keymaps/via/rules.mk create mode 100644 keyboards/ai03/equinox/readme.md create mode 100644 keyboards/ai03/equinox/rules.mk diff --git a/keyboards/ai03/equinox/config.h b/keyboards/ai03/equinox/config.h new file mode 100644 index 000000000000..862b63b2b3ab --- /dev/null +++ b/keyboards/ai03/equinox/config.h @@ -0,0 +1,194 @@ +/* +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 0x0004 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ai03 Design Studio +#define PRODUCT Equinox +#define DESCRIPTION Compact PCB-mount keyboard + +/* 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 { D3, C5, D4, D5 } +#define MATRIX_COL_PINS { D1, D2, C6, C7, B6, B5, B4, B3, B2, B1, B0, 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 5 + +//#define RGB_DI_PIN C4 +//#ifdef RGB_DI_PIN +// #define RGBLED_NUM 12 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 230 /* 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 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/equinox/equinox.c b/keyboards/ai03/equinox/equinox.c new file mode 100644 index 000000000000..a8ea38ecd148 --- /dev/null +++ b/keyboards/ai03/equinox/equinox.c @@ -0,0 +1,17 @@ +/* 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 "equinox.h" + diff --git a/keyboards/ai03/equinox/equinox.h b/keyboards/ai03/equinox/equinox.h new file mode 100644 index 000000000000..e5ac15812486 --- /dev/null +++ b/keyboards/ai03/equinox/equinox.h @@ -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 . + */ +#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, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K304, K306, K308, K309, K310, K311 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, KC_NO, K304, KC_NO, K306, KC_NO, K308, K309, K310, K311 } \ +} diff --git a/keyboards/ai03/equinox/info.json b/keyboards/ai03/equinox/info.json new file mode 100644 index 000000000000..ec7f2938de02 --- /dev/null +++ b/keyboards/ai03/equinox/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "Equinox", + "url": "", + "maintainer": "ai03", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_all": { + "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":"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":"|", "x":11.5, "y":0, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.75}, + {"label":"A", "x":1.75, "y":1}, + {"label":"S", "x":2.75, "y":1}, + {"label":"D", "x":3.75, "y":1}, + {"label":"F", "x":4.75, "y":1}, + {"label":"G", "x":5.75, "y":1}, + {"label":"H", "x":6.75, "y":1}, + {"label":"J", "x":7.75, "y":1}, + {"label":"K", "x":8.75, "y":1}, + {"label":"L", "x":9.75, "y":1}, + {"label":":", "x":10.75, "y":1}, + {"label":"Enter", "x":11.75, "y":1, "w":1.25}, + {"label":"Shift", "x":0, "y":2, "w":1.25}, + {"label":"Fn", "x":1.25, "y":2}, + {"label":"Z", "x":2.25, "y":2}, + {"label":"X", "x":3.25, "y":2}, + {"label":"C", "x":4.25, "y":2}, + {"label":"V", "x":5.25, "y":2}, + {"label":"B", "x":6.25, "y":2}, + {"label":"N", "x":7.25, "y":2}, + {"label":"M", "x":8.25, "y":2}, + {"label":"<", "x":9.25, "y":2}, + {"label":">", "x":10.25, "y":2}, + {"label":"Shift", "x":11.25, "y":2, "w":1.75}, + {"label":"Ctrl", "x":0, "y":3, "w":1.25}, + {"label":"Super", "x":1.25, "y":3}, + {"label":"Alt", "x":2.25, "y":3, "w":1.25}, + {"x":3.5, "y":3, "w":2.25}, + {"x":5.75, "y":3}, + {"x":6.75, "y":3, "w":2.75}, + {"label":"Alt", "x":9.5, "y":3, "w":1.25}, + {"label":"Super", "x":10.75, "y":3}, + {"label":"Ctrl", "x":11.75, "y":3, "w":1.25} + ] + } + } +} diff --git a/keyboards/ai03/equinox/keymaps/default/keymap.c b/keyboards/ai03/equinox/keymaps/default/keymap.c new file mode 100644 index 000000000000..3c2ae4d1a398 --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* 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 +/* + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K304, K306, K308, K309, K310, K311 \ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + MO(2), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_ENT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_GRV, KC_RGUI, KC_DEL + ), + [1] = LAYOUT_all( /* Extra Keys */ + _______, _______, KC_PGUP, _______, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_BSLS, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, KC_PSCR, KC_ESC, KC_QUOT, _______, KC_DOT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( /* Num and FN */ + _______, 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, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/ai03/equinox/keymaps/default/readme.md b/keyboards/ai03/equinox/keymaps/default/readme.md new file mode 100644 index 000000000000..9a8bd56a30ae --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for equinox + +Basic, nothing special \ No newline at end of file diff --git a/keyboards/ai03/equinox/keymaps/proto_via/config.h b/keyboards/ai03/equinox/keymaps/proto_via/config.h new file mode 100644 index 000000000000..4637a3748c14 --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/proto_via/config.h @@ -0,0 +1,23 @@ +/* +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 + +// Fix for prototype missing COL0, COL1, using backlight and RGB underglow I/O pins +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { C4, B7, C6, C7, B6, B5, B4, B3, B2, B1, B0, D6 } + diff --git a/keyboards/ai03/equinox/keymaps/proto_via/keymap.c b/keyboards/ai03/equinox/keymaps/proto_via/keymap.c new file mode 100644 index 000000000000..ff88c3541205 --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/proto_via/keymap.c @@ -0,0 +1,49 @@ +/* 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 +/* + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K304, K306, K308, K309, K310, K311 \ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + MO(2), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_ENT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_GRV, KC_RGUI, KC_DEL + ), + [1] = LAYOUT_all( /* Extra Keys */ + _______, _______, KC_PGUP, _______, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_BSLS, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, KC_PSCR, KC_ESC, KC_QUOT, _______, KC_DOT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( /* Num and FN */ + _______, 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, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( /* Other */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ai03/equinox/keymaps/proto_via/readme.md b/keyboards/ai03/equinox/keymaps/proto_via/readme.md new file mode 100644 index 000000000000..07ef0f533cd9 --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/proto_via/readme.md @@ -0,0 +1,4 @@ +# The proto via keymap for equinox + +Has the necessary tweaks to run on early prototype PCBs. +Not to be used for production run PCBs. \ No newline at end of file diff --git a/keyboards/ai03/equinox/keymaps/proto_via/rules.mk b/keyboards/ai03/equinox/keymaps/proto_via/rules.mk new file mode 100644 index 000000000000..9aa34bbdad87 --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/proto_via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes + +# Fix for prototype missing COL0, COL1, using backlight and RGB underglow I/O pins +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow diff --git a/keyboards/ai03/equinox/keymaps/via/keymap.c b/keyboards/ai03/equinox/keymaps/via/keymap.c new file mode 100644 index 000000000000..a3dc67bb83f2 --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* 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 +/* + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K304, K306, K308, K309, K310, K311 \ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + MO(2), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_ENT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_GRV, KC_RGUI, KC_DEL + ), + [1] = LAYOUT_all( /* Extra Keys */ + _______, _______, KC_PGUP, _______, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_BSLS, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, KC_PSCR, KC_ESC, KC_QUOT, _______, KC_DOT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( /* Num and FN */ + _______, 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, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( /* Other */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ai03/equinox/keymaps/via/readme.md b/keyboards/ai03/equinox/keymaps/via/readme.md new file mode 100644 index 000000000000..c2892a3ad53c --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The via keymap for equinox + +The basic keymap with full support for VIA Configurator diff --git a/keyboards/ai03/equinox/keymaps/via/rules.mk b/keyboards/ai03/equinox/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ai03/equinox/readme.md b/keyboards/ai03/equinox/readme.md new file mode 100644 index 000000000000..beeef864b6a0 --- /dev/null +++ b/keyboards/ai03/equinox/readme.md @@ -0,0 +1,15 @@ +# Equinox + +![Equinox](https://i.imgur.com/BsFtRIA.png) + +Compact Tabbed Gasket-PCB Gravity Mount WKL High-End Keyboard + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725), [Ion Keyboards](https://ionkeyboards.com/) +* Hardware Supported: The Equinox keyboard kit +* Hardware Availability: [CannonKeys](https://cannonkeys.com/products/gb-equinox-keyboard); other proxy vendors + +Make example for this keyboard (after setting up your build environment): + + make ai03/equinox: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/ai03/equinox/rules.mk b/keyboards/ai03/equinox/rules.mk new file mode 100644 index 000000000000..c1de62029602 --- /dev/null +++ b/keyboards/ai03/equinox/rules.mk @@ -0,0 +1,33 @@ +# 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 = 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 = 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 a2c0c1479cbe527cfa223b4957d230bf1e8a431f Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Tue, 25 Feb 2020 01:14:09 +1100 Subject: [PATCH 524/973] Hub16 - Bug removal + clean up code (#8227) * bugfixes + cleaned up code * typo * Update keyboards/hub16/keymaps/no_mod/keymap.c Co-Authored-By: Ryan Co-authored-by: Ryan --- keyboards/hub16/keymaps/default/keymap.c | 19 +++++++----- keyboards/hub16/keymaps/no_mod/keymap.c | 37 +++++++++++++++++------- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/keyboards/hub16/keymaps/default/keymap.c b/keyboards/hub16/keymaps/default/keymap.c index a77c8bc78294..2d12dba0d4f0 100755 --- a/keyboards/hub16/keymaps/default/keymap.c +++ b/keyboards/hub16/keymaps/default/keymap.c @@ -18,16 +18,22 @@ // Function key we are 'wrapping' usual key presses in #define KC_WRAP KC_F24 +// Keyboard Layers +enum keyboard_layers{ + _BASE = 0, + _CONTROL +}; + // Tap Dance Declarations -enum { TD_TO_LED = 0, TD_TO_DEFAULT = 1 }; +enum tap_dance { 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)}; + // Tap once for standard key, twice to toggle to control layer + [TD_TO_LED] = ACTION_TAP_DANCE_DUAL_ROLE(KC_P, _CONTROL), + [TD_TO_DEFAULT] = ACTION_TAP_DANCE_DUAL_ROLE(KC_P, _BASE)}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( /* Base */ + [_BASE] = LAYOUT( /* Base */ KC_S, KC_V, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, @@ -35,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_M, KC_N, KC_O, TD(TD_TO_LED) ), - [1] = LAYOUT( /* LED Control */ + [_CONTROL] = LAYOUT( /* LED Control */ KC_NO, KC_NO, _______, RGB_MOD, RGB_RMOD, RGB_TOG, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, @@ -72,7 +78,6 @@ void encoder_update_user(uint8_t index, bool clockwise) { // 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) { diff --git a/keyboards/hub16/keymaps/no_mod/keymap.c b/keyboards/hub16/keymaps/no_mod/keymap.c index c86ffcc16d27..7c57ffbfe265 100755 --- a/keyboards/hub16/keymaps/no_mod/keymap.c +++ b/keyboards/hub16/keymaps/no_mod/keymap.c @@ -15,19 +15,22 @@ */ #include QMK_KEYBOARD_H -// Function key we are 'wrapping' usual key presses in -#define KC_WRAP KC_F24 +// Keyboard Layers +enum keyboard_layers{ + _BASE = 0, + _CONTROL +}; // Tap Dance Declarations -enum { TD_TO_LED = 0, TD_TO_DEFAULT = 1 }; +enum tap_dance { 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)}; + // Tap once for standard key, twice to toggle to control layer + [TD_TO_LED] = ACTION_TAP_DANCE_DUAL_ROLE(KC_P, _CONTROL), + [TD_TO_DEFAULT] = ACTION_TAP_DANCE_DUAL_ROLE(KC_P, _BASE)}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( /* Base */ + [_BASE] = LAYOUT( /* Base */ KC_S, KC_V, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, @@ -35,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_M, KC_N, KC_O, TD(TD_TO_LED) ), - [1] = LAYOUT( /* LED Control */ + [_CONTROL] = LAYOUT( /* LED Control */ KC_NO, KC_NO, _______, RGB_MOD, RGB_RMOD, RGB_TOG, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, @@ -44,8 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -// 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) { @@ -60,4 +61,18 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_T); } } -} \ No newline at end of file +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Example of "pressing" CONTROL+SHIFT+V instead of "A" on keyboard + // More info: https://docs.qmk.fm/#/feature_macros + // case KC_A: + // if (record->event.pressed) { + // SEND_STRING(SS_LCTL(SS_LSFT("v"))); + // } else { + // } + // break; + } + return true; +}; From f673c965ba79f5354c1634466ef2167304ce9f35 Mon Sep 17 00:00:00 2001 From: holtenc Date: Mon, 24 Feb 2020 08:19:27 -0600 Subject: [PATCH 525/973] Add VIA support for Prime_L (#8233) * Add VIA support for Prime_L * Update keyboards/primekb/prime_l/v1/config.h Co-Authored-By: Drashna Jaelre * Add prime_exl_plus keyboard * Temporary removal of prime_exl_plus Co-authored-by: Drashna Jaelre --- keyboards/primekb/prime_l/config.h | 3 +- .../primekb/prime_l/keymaps/via/keymap.c | 50 +++++++++++++++++++ .../primekb/prime_l/keymaps/via/readme.md | 2 + .../primekb/prime_l/keymaps/via/rules.mk | 1 + keyboards/primekb/prime_l/readme.md | 8 +-- keyboards/primekb/prime_l/v1/config.h | 3 +- keyboards/primekb/prime_l/v2/config.h | 2 +- 7 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 keyboards/primekb/prime_l/keymaps/via/keymap.c create mode 100644 keyboards/primekb/prime_l/keymaps/via/readme.md create mode 100644 keyboards/primekb/prime_l/keymaps/via/rules.mk diff --git a/keyboards/primekb/prime_l/config.h b/keyboards/primekb/prime_l/config.h index 33048ef50440..0b6a4303a125 100644 --- a/keyboards/primekb/prime_l/config.h +++ b/keyboards/primekb/prime_l/config.h @@ -21,8 +21,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x4024 +#define VENDOR_ID 0x5052 #define MANUFACTURER PrimeKB #define DESCRIPTION Custom layout keyboard diff --git a/keyboards/primekb/prime_l/keymaps/via/keymap.c b/keyboards/primekb/prime_l/keymaps/via/keymap.c new file mode 100644 index 000000000000..9fb3da5ef7af --- /dev/null +++ b/keyboards/primekb/prime_l/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* 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 . + */ +#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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLD, KC_VOLU, KC_MUTE, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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 + ) +}; diff --git a/keyboards/primekb/prime_l/keymaps/via/readme.md b/keyboards/primekb/prime_l/keymaps/via/readme.md new file mode 100644 index 000000000000..28baba88e06d --- /dev/null +++ b/keyboards/primekb/prime_l/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA keymap for Prime_L +This keymap is for compatibility with the VIA configurator. \ No newline at end of file diff --git a/keyboards/primekb/prime_l/keymaps/via/rules.mk b/keyboards/primekb/prime_l/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/primekb/prime_l/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/primekb/prime_l/readme.md b/keyboards/primekb/prime_l/readme.md index fb04e1d39bb0..3787d6af9f46 100644 --- a/keyboards/primekb/prime_l/readme.md +++ b/keyboards/primekb/prime_l/readme.md @@ -7,9 +7,11 @@ A compact layout with the footprint of your typical 65% board, featuring a left * [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 examples for this keyboard (after setting up your build environment): - make primekb/prime_l/v1:default - make primekb/prime_l/v2:default + *make primekb/prime_l/v1:default + *make primekb/prime_l/v2:default + *make primekb/prime_l/v1:via + *make primekb/prime_l/v2: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/primekb/prime_l/v1/config.h b/keyboards/primekb/prime_l/v1/config.h index b9ca56364529..afa8c6246035 100644 --- a/keyboards/primekb/prime_l/v1/config.h +++ b/keyboards/primekb/prime_l/v1/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ +#define PRODUCT_ID 0x504C #define DEVICE_VER 0x0001 #define PRODUCT Prime_L V1 @@ -31,4 +32,4 @@ along with this program. If not, see . #define BACKLIGHT_PIN B6 /*#define BACKLIGHT_BREATHING*/ -#define BACKLIGHT_LEVELS 4 \ No newline at end of file +#define BACKLIGHT_LEVELS 4 diff --git a/keyboards/primekb/prime_l/v2/config.h b/keyboards/primekb/prime_l/v2/config.h index 9a3a05d72ec2..1386a127fe56 100644 --- a/keyboards/primekb/prime_l/v2/config.h +++ b/keyboards/primekb/prime_l/v2/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ - +#define PRODUCT_ID 0x5042 #define DEVICE_VER 0x0002 #define PRODUCT Prime_L V2 From ef8878fba5d3786e3f9c66436da63a560cd36ac9 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 24 Feb 2020 12:04:40 -0800 Subject: [PATCH 526/973] Hineybush h87a lock indicators (#8237) * move lighting code from VIA into the keyboard's .c file so that every keymap can access it * after some serious conversations with default and wkl, they agreed to let me modify their keymaps. They weren't too happy --- keyboards/hineybush/h87a/h87a.c | 11 ++++++++- .../hineybush/h87a/keymaps/default/keymap.c | 21 ----------------- keyboards/hineybush/h87a/keymaps/via/keymap.c | 11 --------- keyboards/hineybush/h87a/keymaps/wkl/keymap.c | 23 ------------------- 4 files changed, 10 insertions(+), 56 deletions(-) diff --git a/keyboards/hineybush/h87a/h87a.c b/keyboards/hineybush/h87a/h87a.c index c3bb89080601..a3f511ffcc46 100644 --- a/keyboards/hineybush/h87a/h87a.c +++ b/keyboards/hineybush/h87a/h87a.c @@ -18,7 +18,8 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - + setPinOutput(D5); + setPinOutput(E6); matrix_init_user(); } @@ -42,6 +43,14 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D5, !led_state.caps_lock); + writePin(E6, !led_state.scroll_lock); + } + return true; +} + void eeconfig_init_kb(void) { // EEPROM is getting reset! rgblight_enable(); // Enable RGB by default rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness diff --git a/keyboards/hineybush/h87a/keymaps/default/keymap.c b/keyboards/hineybush/h87a/keymaps/default/keymap.c index 8aa116c93e41..abca0b199c26 100644 --- a/keyboards/hineybush/h87a/keymaps/default/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/default/keymap.c @@ -46,24 +46,3 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } - -void led_init_ports(void) { - DDRD |= (1<<5); // OUT - DDRE |= (1<<6); // OUT -} - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= (1 << 5); PORTD &= ~(1 << 5); - } else { - DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRE |= (1 << 6); PORTE &= ~(1 << 6); - } else { - DDRE &= ~(1 << 6); PORTE &= ~(1 << 6); - } - -} diff --git a/keyboards/hineybush/h87a/keymaps/via/keymap.c b/keyboards/hineybush/h87a/keymaps/via/keymap.c index e4be1cfc9bf8..d248a6d4a3de 100644 --- a/keyboards/hineybush/h87a/keymaps/via/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/via/keymap.c @@ -50,14 +50,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), }; - -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/wkl/keymap.c b/keyboards/hineybush/h87a/keymaps/wkl/keymap.c index e3e410823348..208cd3b3476d 100644 --- a/keyboards/hineybush/h87a/keymaps/wkl/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/wkl/keymap.c @@ -46,26 +46,3 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } - -void led_init_ports(void) { - setPinOutput(D5); - setPinOutput(E6); -} - -void led_set_user(uint8_t usb_led) { - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - setPinOutput(D5); - writePinLow(D5); - } else { - setPinInput(D5); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - setPinOutput(E6); - writePinLow(E6); - } else { - setPinInput(E6); - } - -} From 088b64ab3d598574244db5ac67fec889bdc58119 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 25 Feb 2020 12:18:11 +1100 Subject: [PATCH 527/973] Improvements to extrakey HID descriptors (#8156) --- tmk_core/protocol/arm_atsam/main_arm_atsam.c | 1 - .../protocol/arm_atsam/usb/udi_device_conf.h | 4 +- tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c | 42 ++++++-------- tmk_core/protocol/chibios/usb_main.c | 20 ++++--- tmk_core/protocol/lufa/lufa.c | 2 +- tmk_core/protocol/usb_descriptor.c | 16 +++--- tmk_core/protocol/vusb/vusb.c | 55 +++++++++++++------ 7 files changed, 78 insertions(+), 62 deletions(-) diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 9c8073dd9eb5..e952a427effd 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -130,7 +130,6 @@ 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); #endif // EXTRAKEY_ENABLE } diff --git a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h index f22f5003abad..80556205f2ac 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h +++ b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h @@ -327,7 +327,7 @@ typedef struct { } udi_hid_exk_desc_t; typedef struct { - uint8_t array[54]; + uint8_t array[50]; } udi_hid_exk_report_desc_t; # define UDI_HID_EXK_DESC \ @@ -429,7 +429,7 @@ typedef struct { } udi_hid_raw_desc_t; typedef struct { - uint8_t array[27]; + uint8_t array[26]; } udi_hid_raw_report_desc_t; # define UDI_HID_RAW_DESC \ 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 5b3295407166..cf9297dc7813 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c @@ -377,39 +377,33 @@ 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 = {{ + // clang-format off 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 + 0x19, 0x01, // Usage Minimum (Pointer) + 0x2A, 0xB7, 0x00, // Usage Maximum (System Display LCD Autoscale) + 0x15, 0x01, // Logical Minimum + 0x26, 0xB7, 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 + 0x19, 0x01, // Usage Minimum (Consumer Control) + 0x2A, 0xA0, 0x02, // Usage Maximum (AC Desktop Show All Applications) + 0x15, 0x01, // Logical Minimum + 0x26, 0xA0, 0x02, // Logical Maximum + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) + 0x81, 0x00, // Input (Data, Array, Absolute) + 0xC0 // End Collection + //clang-format on }}; static bool udi_hid_exk_setreport(void); diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index d5eeffcbe476..ec95167cf6d3 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -732,7 +732,7 @@ void shared_in_cb(USBDriver *usbp, usbep_t ep) { */ #ifdef EXTRAKEY_ENABLE -static void send_extra_report(uint8_t report_id, uint16_t data) { +static void send_extra(uint8_t report_id, uint16_t data) { osalSysLock(); if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { osalSysUnlock(); @@ -744,15 +744,19 @@ static void send_extra_report(uint8_t report_id, uint16_t data) { usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)&report, sizeof(report_extra_t)); osalSysUnlock(); } +#endif -void send_system(uint16_t data) { send_extra_report(REPORT_ID_SYSTEM, data); } - -void send_consumer(uint16_t data) { send_extra_report(REPORT_ID_CONSUMER, data); } +void send_system(uint16_t data) { +#ifdef EXTRAKEY_ENABLE + send_extra(REPORT_ID_SYSTEM, data); +#endif +} -#else /* EXTRAKEY_ENABLE */ -void send_system(uint16_t data) { (void)data; } -void send_consumer(uint16_t data) { (void)data; } -#endif /* EXTRAKEY_ENABLE */ +void send_consumer(uint16_t data) { +#ifdef EXTRAKEY_ENABLE + send_extra(REPORT_ID_CONSUMER, data); +#endif +} /* --------------------------------------------------------- * Console functions diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 933b212c960c..738c2a6d31af 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -690,7 +690,7 @@ static void send_extra(uint8_t report_id, uint16_t data) { */ static void send_system(uint16_t data) { #ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data - SYSTEM_POWER_DOWN + 1); + send_extra(REPORT_ID_SYSTEM, data); #endif } diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index 70032d69fa52..f2b91b099e35 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -166,10 +166,10 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { HID_RI_USAGE(8, 0x80), // System Control HID_RI_COLLECTION(8, 0x01), // Application HID_RI_REPORT_ID(8, REPORT_ID_SYSTEM), - HID_RI_USAGE_MINIMUM(16, 0x0081), // System Power Down - HID_RI_USAGE_MAXIMUM(16, 0x0083), // System Wake Up - HID_RI_LOGICAL_MINIMUM(16, 0x0001), - HID_RI_LOGICAL_MAXIMUM(16, 0x0003), + HID_RI_USAGE_MINIMUM(8, 0x01), // Pointer + HID_RI_USAGE_MAXIMUM(16, 0x00B7), // System Display LCD Autoscale + HID_RI_LOGICAL_MINIMUM(8, 0x01), + HID_RI_LOGICAL_MAXIMUM(16, 0x00B7), HID_RI_REPORT_COUNT(8, 1), HID_RI_REPORT_SIZE(8, 16), HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE), @@ -179,10 +179,10 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { HID_RI_USAGE(8, 0x01), // Consumer Control HID_RI_COLLECTION(8, 0x01), // Application HID_RI_REPORT_ID(8, REPORT_ID_CONSUMER), - HID_RI_USAGE_MINIMUM(16, 0x0001), // Consumer Control - HID_RI_USAGE_MAXIMUM(16, 0x029C), // AC Distribute Vertically - HID_RI_LOGICAL_MINIMUM(16, 0x0001), - HID_RI_LOGICAL_MAXIMUM(16, 0x029C), + HID_RI_USAGE_MINIMUM(8, 0x01), // Consumer Control + HID_RI_USAGE_MAXIMUM(16, 0x02A0), // AC Desktop Show All Applications + HID_RI_LOGICAL_MINIMUM(8, 0x01), + HID_RI_LOGICAL_MAXIMUM(16, 0x02A0), HID_RI_REPORT_COUNT(8, 1), HID_RI_REPORT_SIZE(8, 16), HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE), diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 2d2e5ca5c3e8..abf723952e4a 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -129,7 +129,7 @@ static void send_extra(uint8_t report_id, uint16_t data) { static void send_system(uint16_t data) { #ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data - SYSTEM_POWER_DOWN + 1); + send_extra(REPORT_ID_SYSTEM, data); #endif } @@ -251,7 +251,9 @@ const PROGMEM uchar keyboard_hid_report[] = { 0xC0 // End Collection }; -const PROGMEM uchar mouse_hid_report[] = { +#if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) +const PROGMEM uchar mouse_extra_hid_report[] = { +# ifdef MOUSE_ENABLE // Mouse report descriptor 0x05, 0x01, // Usage Page (Generic Desktop) 0x09, 0x02, // Usage (Mouse) @@ -300,17 +302,18 @@ const PROGMEM uchar mouse_hid_report[] = { 0x81, 0x06, // Input (Data, Variable, Relative) 0xC0, // End Collection 0xC0, // End Collection +# endif -#ifdef EXTRAKEY_ENABLE +# 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 + 0x19, 0x01, // Usage Minimum (Pointer) + 0x2A, 0xB7, 0x00, // Usage Maximum (System Display LCD Autoscale) + 0x15, 0x01, // Logical Minimum + 0x26, 0xB7, 0x00, // Logical Maximum 0x95, 0x01, // Report Count (1) 0x75, 0x10, // Report Size (16) 0x81, 0x00, // Input (Data, Array, Absolute) @@ -320,16 +323,17 @@ const PROGMEM uchar mouse_hid_report[] = { 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 + 0x19, 0x01, // Usage Minimum (Consumer Control) + 0x2A, 0xA0, 0x02, // Usage Maximum (AC Desktop Show All Applications) + 0x15, 0x01, // Logical Minimum + 0x26, 0xA0, 0x02, // Logical Maximum 0x95, 0x01, // Report Count (1) 0x75, 0x10, // Report Size (16) 0x81, 0x00, // Input (Data, Array, Absolute) 0xC0 // End Collection -#endif +# endif }; +#endif #ifndef USB_MAX_POWER_CONSUMPTION # define USB_MAX_POWER_CONSUMPTION 500 @@ -350,10 +354,19 @@ const PROGMEM char usbDescriptorConfiguration[] = { /* USB configuration descriptor */ 9, /* sizeof(usbDescriptorConfiguration): length of descriptor in bytes */ USBDESCR_CONFIG, /* descriptor type */ - 9 + (9 + 9 + 7) + (9 + 9 + 7), 0, +# if defined (MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) + 59, // 9 + (9 + 9 + 7) + (9 + 9 + 7) +#else + 34, // 9 + (9 + 9 + 7) +# endif + 0, // 18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT3 + 9, 0, /* total length of data returned (including inlined descriptors) */ +# if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) 2, /* number of interfaces in this configuration */ +# else + 1, +#endif 1, /* index of this configuration */ 0, /* configuration name string index */ # if USB_CFG_IS_SELF_POWERED @@ -391,8 +404,9 @@ const PROGMEM char usbDescriptorConfiguration[] = { USB_POLLING_INTERVAL_MS, /* in ms */ # endif +# if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) /* - * Mouse interface + * Mouse/extrakeys interface */ /* Interface descriptor */ 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ @@ -411,8 +425,8 @@ const PROGMEM char usbDescriptorConfiguration[] = { 0x00, /* target country code */ 0x01, /* number of HID Report (or other HID class) Descriptor infos to follow */ 0x22, /* descriptor type: report */ - sizeof(mouse_hid_report), 0, /* total length of report descriptor */ -# if USB_CFG_HAVE_INTRIN_ENDPOINT3 /* endpoint descriptor for endpoint 3 */ + sizeof(mouse_extra_hid_report), 0, /* total length of report descriptor */ +# if USB_CFG_HAVE_INTRIN_ENDPOINT3 /* endpoint descriptor for endpoint 3 */ /* Endpoint descriptor */ 7, /* sizeof(usbDescrEndpoint) */ USBDESCR_ENDPOINT, /* descriptor type = endpoint */ @@ -420,6 +434,7 @@ const PROGMEM char usbDescriptorConfiguration[] = { 0x03, /* attrib: Interrupt endpoint */ 8, 0, /* maximum packet size */ USB_POLLING_INTERVAL_MS, /* in ms */ +# endif # endif }; #endif @@ -448,10 +463,12 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { usbMsgPtr = (unsigned char *)(usbDescriptorConfiguration + 9 + 9); len = 9; break; +#if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) case 1: usbMsgPtr = (unsigned char *)(usbDescriptorConfiguration + 9 + (9 + 9 + 7) + 9); len = 9; break; +#endif } break; case USBDESCR_HID_REPORT: @@ -461,10 +478,12 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { usbMsgPtr = (unsigned char *)keyboard_hid_report; len = sizeof(keyboard_hid_report); break; +#if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) case 1: - usbMsgPtr = (unsigned char *)mouse_hid_report; - len = sizeof(mouse_hid_report); + usbMsgPtr = (unsigned char *)mouse_extra_hid_report; + len = sizeof(mouse_extra_hid_report); break; +#endif } break; } From 93c5307fd60c35780921570ccf41a1806847eb9c Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 25 Feb 2020 09:36:30 +0800 Subject: [PATCH 528/973] [Keyboard] Add Wete (#8229) * [Keyboard] Add Wete * Fix width and height in Wete info.json * Use default board files, core backlight, and disable RTC * Disable I2C, SPI. Minor corrections * Keymap typo update * Add LAYOUT_all to info.json * Remove extra spaces in README, delete matrix_*_kb functions * Fix layout errors in wete.h, and some minor corrections * Actually fix LAYOUT_all in info.json --- keyboards/wete/chconf.h | 520 ++++++++++++++++++++++++ keyboards/wete/config.h | 75 ++++ keyboards/wete/halconf.h | 354 ++++++++++++++++ keyboards/wete/info.json | 39 ++ keyboards/wete/keymaps/default/keymap.c | 37 ++ keyboards/wete/keymaps/iso/keymap.c | 37 ++ keyboards/wete/keymaps/jis/keymap.c | 39 ++ keyboards/wete/mcuconf.h | 176 ++++++++ keyboards/wete/readme.md | 14 + keyboards/wete/rules.mk | 19 + keyboards/wete/wete.c | 19 + keyboards/wete/wete.h | 222 ++++++++++ 12 files changed, 1551 insertions(+) create mode 100644 keyboards/wete/chconf.h create mode 100644 keyboards/wete/config.h create mode 100644 keyboards/wete/halconf.h create mode 100644 keyboards/wete/info.json create mode 100644 keyboards/wete/keymaps/default/keymap.c create mode 100644 keyboards/wete/keymaps/iso/keymap.c create mode 100644 keyboards/wete/keymaps/jis/keymap.c create mode 100644 keyboards/wete/mcuconf.h create mode 100644 keyboards/wete/readme.md create mode 100644 keyboards/wete/rules.mk create mode 100644 keyboards/wete/wete.c create mode 100644 keyboards/wete/wete.h diff --git a/keyboards/wete/chconf.h b/keyboards/wete/chconf.h new file mode 100644 index 000000000000..89388dd5a3d1 --- /dev/null +++ b/keyboards/wete/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/wete/config.h b/keyboards/wete/config.h new file mode 100644 index 000000000000..c8d66b7a6ee5 --- /dev/null +++ b/keyboards/wete/config.h @@ -0,0 +1,75 @@ +/* +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 0xB16B +#define PRODUCT_ID 0x00B5 +#define DEVICE_VER 0x0012 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER Ramon Imbao +#define PRODUCT Wete +#define DESCRIPTION Southpaw Full-sized Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 20 + +#define MATRIX_COL_PINS { B13, B14, B15, A8, B0, A7, A5, A4, A3, B9, C13, C14, C15, F0, F1, A0, A1, A2, B8, B7 } +#define MATRIX_ROW_PINS { A9, B12, B11, B10, B2, B1 } +#define DIODE_DIRECTION COL2ROW + +//LEDS A6, RGB B15 +#define BACKLIGHT_PIN A6 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_PAL_MODE 1 +#define BACKLIGHT_LEVELS 24 +#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/wete/halconf.h b/keyboards/wete/halconf.h new file mode 100644 index 000000000000..acd7678e7b5e --- /dev/null +++ b/keyboards/wete/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 FALSE +#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 FALSE +#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/wete/info.json b/keyboards/wete/info.json new file mode 100644 index 000000000000..9828946fad56 --- /dev/null +++ b/keyboards/wete/info.json @@ -0,0 +1,39 @@ +{ + "keyboard_name": "Wete", + "url": "", + "maintainer": "Ramon Imbao", + "width": 20.25, + "height": 6.25, + "layouts": { + "LAYOUT_ansi_rhnp": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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, "w":2}, {"x":19.25, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":3, "y":2.25, "h":2}, {"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.25, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "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":19.25, "y":3.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":3, "y":4.25, "h":2}, {"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":19.25, "y":4.25}, {"x":0, "y":5.25, "w":2}, {"x":2, "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":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_ansi_lhnp": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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, "w":2}, {"x":19.25, "y":1.25}, {"x":0, "y":2.25, "h":2}, {"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.25, "y":2.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":19.25, "y":3.25}, {"x":0, "y":4.25, "h":2}, {"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":19.25, "y":4.25}, {"x":1, "y":5.25}, {"x":2, "y":5.25, "w":2}, {"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":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_ansi_macro": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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, "w":2}, {"x":19.25, "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.25, "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":19.25, "y":3.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":19.25, "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":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_iso_rhnp": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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, "w":2}, {"x":19.25, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":3, "y":2.25, "h":2}, {"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":18, "y":2.25, "w":1.25, "h":2}, {"x":19.25, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "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":19.25, "y":3.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":3, "y":4.25, "h":2}, {"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":19.25, "y":4.25}, {"x":0, "y":5.25, "w":2}, {"x":2, "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":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_iso_lhnp": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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, "w":2}, {"x":19.25, "y":1.25}, {"x":0, "y":2.25, "h":2}, {"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":18, "y":2.25, "w":1.25, "h":2}, {"x":19.25, "y":2.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":19.25, "y":3.25}, {"x":0, "y":4.25, "h":2}, {"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":19.25, "y":4.25}, {"x":1, "y":5.25}, {"x":2, "y":5.25, "w":2}, {"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":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_iso_macro": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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, "w":2}, {"x":19.25, "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":18, "y":2.25, "w":1.25, "h":2}, {"x":19.25, "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":19.25, "y":3.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":19.25, "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":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_jis_rhnp": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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.25, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":3, "y":2.25, "h":2}, {"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":18, "y":2.25, "w":1.25, "h":2}, {"x":19.25, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "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":19.25, "y":3.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":3, "y":4.25, "h":2}, {"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}, {"x":17.5, "y":4.25, "w":1.75}, {"x":19.25, "y":4.25}, {"x":0, "y":5.25, "w":2}, {"x":2, "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}, {"x":9.25, "y":5.25, "w":3}, {"x":12.25, "y":5.25}, {"x":13.25, "y":5.25}, {"x":14.25, "y":5.25}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_jis_lhnp": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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.25, "y":1.25}, {"x":0, "y":2.25, "h":2}, {"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":18, "y":2.25, "w":1.25, "h":2}, {"x":19.25, "y":2.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":19.25, "y":3.25}, {"x":0, "y":4.25, "h":2}, {"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}, {"x":17.5, "y":4.25, "w":1.75}, {"x":19.25, "y":4.25}, {"x":1, "y":5.25}, {"x":2, "y":5.25, "w":2}, {"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}, {"x":9.25, "y":5.25, "w":3}, {"x":12.25, "y":5.25}, {"x":13.25, "y":5.25}, {"x":14.25, "y":5.25}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_jis_macro": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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.25, "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":18, "y":2.25, "w":1.25, "h":2}, {"x":19.25, "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":19.25, "y":3.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}, {"x":17.5, "y":4.25, "w":1.75}, {"x":19.25, "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}, {"x":9.25, "y":5.25, "w":3}, {"x":12.25, "y":5.25}, {"x":13.25, "y":5.25}, {"x":14.25, "y":5.25}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + }, + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":16.75, "y":0}, {"x":17.75, "y":0}, {"x":19.25, "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.25, "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.25, "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":19.25, "y":3.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":19.25, "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}, {"x":9.25, "y":5.25, "w":3}, {"x":12.25, "y":5.25}, {"x":13.25, "y":5.25}, {"x":14.25, "y":5.25}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}, {"x":18.25, "y":5.25}, {"x":19.25, "y":5.25}] + } + } +} diff --git a/keyboards/wete/keymaps/default/keymap.c b/keyboards/wete/keymaps/default/keymap.c new file mode 100644 index 000000000000..3b68758a6747 --- /dev/null +++ b/keyboards/wete/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* +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_ansi_rhnp( + KC_INSERT, KC_PSCREEN, KC_PAUSE, KC_SLCK, 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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, 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_HOME, + KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, 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_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_ENTER, KC_PGUP, + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, 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_KP_0, KC_KP_DOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_ansi_rhnp( + KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, 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, 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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_INC, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, BL_OFF, BL_DEC, BL_ON + ) +}; diff --git a/keyboards/wete/keymaps/iso/keymap.c b/keyboards/wete/keymaps/iso/keymap.c new file mode 100644 index 000000000000..203a336c78a6 --- /dev/null +++ b/keyboards/wete/keymaps/iso/keymap.c @@ -0,0 +1,37 @@ +/* +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_iso_rhnp( + KC_INSERT, KC_PSCREEN, KC_PAUSE, KC_SLCK, 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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, 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_HOME, + KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, 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_ENTER, KC_END, + 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_BSLS, KC_PGUP, + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, 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_KP_0, KC_KP_DOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_iso_rhnp( + KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, 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, 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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_INC, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, BL_OFF, BL_DEC, BL_ON + ) +}; diff --git a/keyboards/wete/keymaps/jis/keymap.c b/keyboards/wete/keymaps/jis/keymap.c new file mode 100644 index 000000000000..14dfb1ca6d15 --- /dev/null +++ b/keyboards/wete/keymaps/jis/keymap.c @@ -0,0 +1,39 @@ +/* +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 + +#include "keymap_jp.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_jis_rhnp( + KC_INSERT, KC_PSCREEN, KC_PAUSE, KC_SLCK, 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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, JP_ZHTG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_HOME, + KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_ENTER, KC_END, + 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, JP_SCLN, JP_COLN, JP_RBRC, KC_PGUP, + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_RSFT, KC_PGDN, + KC_KP_0, KC_KP_DOT, KC_LCTL, KC_LGUI, KC_LALT, JP_MHEN, KC_SPC, JP_HENK, JP_KANA, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [1] = LAYOUT_jis_rhnp( + KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, 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, 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, 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, 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_TRNS, BL_OFF, BL_DEC, BL_INC, BL_ON + ) +}; diff --git a/keyboards/wete/mcuconf.h b/keyboards/wete/mcuconf.h new file mode 100644 index 000000000000..ad12562d1702 --- /dev/null +++ b/keyboards/wete/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_NOCLOCK + +/* + * 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/wete/readme.md b/keyboards/wete/readme.md new file mode 100644 index 000000000000..f632ae5f1cf9 --- /dev/null +++ b/keyboards/wete/readme.md @@ -0,0 +1,14 @@ +# Wete + +![Wete Keyboard](https://i.imgur.com/dZ4FRar.jpg) + +A southpaw full-sized keyboard. + +* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make wete: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/wete/rules.mk b/keyboards/wete/rules.mk new file mode 100644 index 000000000000..a01bef1d440f --- /dev/null +++ b/keyboards/wete/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F072xB + +# 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 = 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 +CUSTOM_MATRIX = no # Custom matrix file +BACKLIGHT_ENABLE = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/wete/wete.c b/keyboards/wete/wete.c new file mode 100644 index 000000000000..181183c7047e --- /dev/null +++ b/keyboards/wete/wete.c @@ -0,0 +1,19 @@ +#include "wete.h" + +void keyboard_pre_init_user(void) { + // Initialize indicator LED pins + setPinOutput(A14); // Num Lock + setPinOutput(A15); // Scroll Lock + setPinOutput(B3); // Caps Lock +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(A14, !led_state.num_lock); + writePin(A15, !led_state.scroll_lock); + writePin(B3, !led_state.caps_lock); + } + + return res; +} diff --git a/keyboards/wete/wete.h b/keyboards/wete/wete.h new file mode 100644 index 000000000000..e9f44e185dd7 --- /dev/null +++ b/keyboards/wete/wete.h @@ -0,0 +1,222 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +//////////////////////////////// ANSI //////////////////////////////// +// ANSI layout +// 2u backspace +// Right handed numpad +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 2 keys to the right of space +#define LAYOUT_ansi_rhnp( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k50, k52, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { k30, k31, k32, XXX, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { k50, XXX, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ +} + +// ANSI layout +// 2u backspace +// Left handed numpad +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 2 keys to the right of space +#define LAYOUT_ansi_lhnp( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k51, k52, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { XXX, k51, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ +} + +// ANSI layout +// 2u backspace +// Numpad area is all 1u keys +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 2 keys to the right of space +#define LAYOUT_ansi_macro( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k50, k51, k52, k53, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { k50, k51, k52, k53, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ +} + + +//////////////////////////////// ISO //////////////////////////////// +// ISO layout +// Extra 1u next to Left Shift +// 2u Backspace +// Right handed numpad +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 2 keys to the right of space +#define LAYOUT_iso_rhnp( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k50, k52, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { k30, k31, k32, XXX, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { k50, XXX, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ +} + +// ISO layout +// Extra 1u next to Left Shift +// 2u backspace +// Left handed numpad +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 2 keys to the right of space +#define LAYOUT_iso_lhnp( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k51, k52, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { XXX, k51, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ +} + +// ISO layout +// Extra 1u next to Left Shift +// 2u backspace +// Numpad area is all 1u keys +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 2 keys to the right of space +#define LAYOUT_iso_macro( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k50, k51, k52, k53, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { k50, k51, k52, k53, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ +} + +//////////////////////////////// JIS //////////////////////////////// +// JIS layout +// Split backspace +// Right handed numpad +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 3 keys to the right of space +#define LAYOUT_jis_rhnp( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k50, k52, k54, k55, k56, k57, k5a, k5b, k5c, k5d, k5e, k5f, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { k30, k31, k32, XXX, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { k50, XXX, k52, XXX, k54, k55, k56, k57, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, XXX, k5h, k5i, k5j } \ +} + +// JIS layout +// Split backspace +// Left handed numpad +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 3 keys to the right of space +#define LAYOUT_jis_lhnp( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k51, k52, k54, k55, k56, k57, k5a, k5b, k5c, k5d, k5e, k5f, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { XXX, k51, k52, XXX, k54, k55, k56, k57, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, XXX, k5h, k5i, k5j } \ +} + +// JIS layout +// Split backspace +// Numpad area is all 1u keys +// 1.25-1.25-1.25 or 1.5-1-1.5 bottom row +// 3 keys to the right of space +#define LAYOUT_jis_macro( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k50, k51, k52, k53, k54, k55, k56, k57, k5a, k5b, k5c, k5d, k5e, k5f, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { k50, XXX, k52, XXX, k54, k55, k56, k57, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, XXX, k5h, k5i, k5j } \ +} + +//////////////////////////////// EXPOSED //////////////////////////////// +// All keys are exposed +// Numpad area is 1u keys +// Extra 1u next to Left Shift +// JIS-style bottom row +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k0a, k0b, k0c, k0d, k0f, k0g, k0h, k0i, k0j, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ + k50, k51, k52, k53, k54, k55, k56, k57, k5a, k5b, k5c, k5d, k5e, k5f, k5h, k5i, k5j \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, XXX, k5h, k5i, k5j } \ +} From bb8d4b4d23ee04f6034f8880b8a9f93fa4673c38 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 25 Feb 2020 12:54:51 +1100 Subject: [PATCH 529/973] `send_unicode_string()`: Add support for code points > 0xFFFF (#8236) --- docs/feature_unicode.md | 3 +-- .../process_keycode/process_unicode_common.c | 24 +++++++++++++++---- .../process_keycode/process_unicode_common.h | 1 + quantum/process_keycode/process_unicodemap.c | 20 ---------------- quantum/process_keycode/process_unicodemap.h | 1 - 5 files changed, 22 insertions(+), 27 deletions(-) diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 546af2521a47..697541458809 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -195,7 +195,7 @@ By default, when the keyboard boots, it will initialize the input mode to the la ## `send_unicode_string()` -This function is much like `send_string()` but allows you to input UTF-8 characters directly, currently up to code point U+FFFF. Make sure your `keymap.c` is formatted in UTF-8 encoding. +This function is much like `send_string()` but allows you to input UTF-8 characters directly, and supports all code points (provided the selected input method also supports it). Make sure your `keymap.c` is formatted in UTF-8 encoding. ```c send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); @@ -210,7 +210,6 @@ send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B" ``` An easy way to convert your Unicode string to this format is by using [this site](https://r12a.github.io/app-conversion/), and taking the result in the "Hex/UTF-32" section. -Unlike `send_unicode_string()` this function supports code points up to U+10FFFF. ## Additional Language Support diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 4ac305e66176..fc392813ae84 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -150,6 +150,24 @@ void register_hex(uint16_t hex) { } } +void register_hex32(uint32_t hex) { + bool onzerostart = true; + for (int i = 7; i >= 0; i--) { + if (i <= 3) { + onzerostart = false; + } + uint8_t digit = ((hex >> (i * 4)) & 0xF); + if (digit == 0) { + if (!onzerostart) { + tap_code(hex_to_keycode(digit)); + } + } else { + tap_code(hex_to_keycode(digit)); + onzerostart = false; + } + } +} + void send_unicode_hex_string(const char *str) { if (!str) { return; @@ -192,9 +210,7 @@ const char *decode_utf8(const char *str, int32_t *code_point) { *code_point = ((int32_t)(str[0] & 0x0F) << 12) | ((int32_t)(str[1] & 0x3F) << 6) | ((int32_t)(str[2] & 0x3F) << 0); next = str + 3; } else if ((str[0] & 0xF8) == 0xF0 && (str[0] <= 0xF4)) { // U+10000-10FFFF - // Skip for now - register_hex() only takes a uint16 - //*code_point = ((int32_t)(str[0] & 0x07) << 18) | ((int32_t)(str[1] & 0x3F) << 12) | ((int32_t)(str[2] & 0x3F) << 6) | ((int32_t)(str[3] & 0x3F) << 0); - *code_point = -1; + *code_point = ((int32_t)(str[0] & 0x07) << 18) | ((int32_t)(str[1] & 0x3F) << 12) | ((int32_t)(str[2] & 0x3F) << 6) | ((int32_t)(str[3] & 0x3F) << 0); next = str + 4; } else { *code_point = -1; @@ -221,7 +237,7 @@ void send_unicode_string(const char *str) { if (code_point >= 0) { unicode_input_start(); - register_hex(code_point); + register_hex32(code_point); unicode_input_finish(); } } diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 393db2d99eb7..13b6431bf04d 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -79,6 +79,7 @@ void unicode_input_finish(void); void unicode_input_cancel(void); void register_hex(uint16_t hex); +void register_hex32(uint32_t hex); void send_unicode_hex_string(const char *str); void send_unicode_string(const char *str); diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 4364f156c423..1be51a995c34 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -16,26 +16,6 @@ #include "process_unicodemap.h" -void register_hex32(uint32_t hex) { - bool onzerostart = true; - for (int i = 7; i >= 0; i--) { - if (i <= 3) { - onzerostart = false; - } - uint8_t digit = ((hex >> (i * 4)) & 0xF); - if (digit == 0) { - if (!onzerostart) { - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - } - } else { - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - onzerostart = false; - } - } -} - __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) { if (keycode >= QK_UNICODEMAP_PAIR) { // Keycode is a pair: extract index based on Shift / Caps Lock state diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index a4b6d77f3a59..c429859bbb6a 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -20,6 +20,5 @@ extern const uint32_t PROGMEM unicode_map[]; -void register_hex32(uint32_t hex); uint16_t unicodemap_index(uint16_t keycode); bool process_unicodemap(uint16_t keycode, keyrecord_t *record); From 891d28a37954ada620fab3727499fe2e9ee3fe65 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 25 Feb 2020 11:28:07 +0000 Subject: [PATCH 530/973] Acheron VIA support (#8204) * Update acheron USB IDs * Add shark via keymap * Update austin via keymap * Fix eeprom build error * 3 layers fit --- keyboards/acheron/austin/config.h | 4 +- keyboards/acheron/austin/keymaps/via/config.h | 3 + keyboards/acheron/austin/keymaps/via/keymap.c | 13 +-- keyboards/acheron/austin/keymaps/via/rules.mk | 1 + keyboards/acheron/shark/config.h | 4 +- keyboards/acheron/shark/keymaps/via/keymap.c | 100 ++++++++++++++++++ keyboards/acheron/shark/keymaps/via/rules.mk | 2 + 7 files changed, 112 insertions(+), 15 deletions(-) create mode 100644 keyboards/acheron/austin/keymaps/via/config.h create mode 100644 keyboards/acheron/shark/keymaps/via/keymap.c create mode 100644 keyboards/acheron/shark/keymaps/via/rules.mk diff --git a/keyboards/acheron/austin/config.h b/keyboards/acheron/austin/config.h index 859c9051cd93..c6a41c7bcbd0 100644 --- a/keyboards/acheron/austin/config.h +++ b/keyboards/acheron/austin/config.h @@ -18,8 +18,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0x0159 -#define PRODUCT_ID 0xA71C +#define VENDOR_ID 0xAC11 +#define PRODUCT_ID 0x4175 #define DEVICE_VER 0x0001 #define MANUFACTURER DriftMechanics #define PRODUCT Austin diff --git a/keyboards/acheron/austin/keymaps/via/config.h b/keyboards/acheron/austin/keymaps/via/config.h new file mode 100644 index 000000000000..a3b77a5b4d0b --- /dev/null +++ b/keyboards/acheron/austin/keymaps/via/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/acheron/austin/keymaps/via/keymap.c b/keyboards/acheron/austin/keymaps/via/keymap.c index d745542e0d24..f588185d5434 100644 --- a/keyboards/acheron/austin/keymaps/via/keymap.c +++ b/keyboards/acheron/austin/keymaps/via/keymap.c @@ -35,21 +35,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [2] = 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 index 1e5b99807cb7..ee1e4ceeb4b8 100644 --- a/keyboards/acheron/austin/keymaps/via/rules.mk +++ b/keyboards/acheron/austin/keymaps/via/rules.mk @@ -1 +1,2 @@ VIA_ENABLE = yes +BOOTMAGIC_ENABLE = lite diff --git a/keyboards/acheron/shark/config.h b/keyboards/acheron/shark/config.h index 5a46ac5b79e1..ac6df142447a 100644 --- a/keyboards/acheron/shark/config.h +++ b/keyboards/acheron/shark/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 0xAC11 +#define VENDOR_ID 0xAC11 +#define PRODUCT_ID 0x5368 #define DEVICE_VER 0x0001 #define MANUFACTURER AcheronProject #define PRODUCT SharkPCB diff --git a/keyboards/acheron/shark/keymaps/via/keymap.c b/keyboards/acheron/shark/keymaps/via/keymap.c new file mode 100644 index 000000000000..806d242b0736 --- /dev/null +++ b/keyboards/acheron/shark/keymaps/via/keymap.c @@ -0,0 +1,100 @@ +/* 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 QMK_KEYBOARD_H + +enum layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define LOWER FN_MO13 +#define RAISE FN_MO23 + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | |Lower | Space| 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 , \ + KC_LCTL, KC_LALT, KC_LGUI, _______, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_BSPC, \ + 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, BL_TOGG, BL_INC , BL_DEC , _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_BSPC, \ + 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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, BL_TOGG, BL_INC, BL_DEC , _______, _______, _______, _______, _______, _______, _______, _______ \ +) +}; diff --git a/keyboards/acheron/shark/keymaps/via/rules.mk b/keyboards/acheron/shark/keymaps/via/rules.mk new file mode 100644 index 000000000000..ee1e4ceeb4b8 --- /dev/null +++ b/keyboards/acheron/shark/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +BOOTMAGIC_ENABLE = lite From f6111d49bbfeb90fdb86c4595ba339590b364da7 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 25 Feb 2020 14:10:04 +0000 Subject: [PATCH 531/973] Split - Avoid race condition during matrix_init_quantum (#8235) * Avoid race condition during matrix_init_quantum * spelling is hard --- quantum/split_common/matrix.c | 4 +++- quantum/split_common/split_util.c | 29 ++++++++++++++--------------- quantum/split_common/split_util.h | 3 ++- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index a82334128b87..8b91f8ca8342 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -190,7 +190,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) #endif void matrix_init(void) { - keyboard_split_setup(); + split_pre_init(); // Set pinout for right half if pinout for that half is defined if (!isLeftHand) { @@ -231,6 +231,8 @@ void matrix_init(void) { debounce_init(ROWS_PER_HAND); matrix_init_quantum(); + + split_post_init(); } void matrix_post_scan(void) { diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 103bc97142ee..fb6a3b85af28 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -81,19 +81,8 @@ __attribute__((weak)) bool is_keyboard_master(void) { return (usbstate == MASTER); } -static void keyboard_master_setup(void) { -#if defined(USE_I2C) -# ifdef SSD1306OLED - matrix_master_OLED_init(); -# endif -#endif - transport_master_init(); -} - -static void keyboard_slave_setup(void) { transport_slave_init(); } - // this code runs before the keyboard is fully initialized -void keyboard_split_setup(void) { +void split_pre_init(void) { isLeftHand = is_keyboard_left(); #if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) @@ -106,8 +95,18 @@ void keyboard_split_setup(void) { #endif if (is_keyboard_master()) { - keyboard_master_setup(); - } else { - keyboard_slave_setup(); +#if defined(USE_I2C) && defined(SSD1306OLED) + matrix_master_OLED_init(); +#endif + transport_master_init(); + } +} + +// this code runs after the keyboard is fully initialized +// - avoids race condition during matrix_init_quantum where slave can start +// receiving before the init process has completed +void split_post_init(void) { + if (!is_keyboard_master()) { + transport_slave_init(); } } diff --git a/quantum/split_common/split_util.h b/quantum/split_common/split_util.h index 5d9c523400e1..a4c12519e056 100644 --- a/quantum/split_common/split_util.h +++ b/quantum/split_common/split_util.h @@ -8,4 +8,5 @@ extern volatile bool isLeftHand; void matrix_master_OLED_init(void); -void keyboard_split_setup(void); +void split_pre_init(void); +void split_post_init(void); From b949343b783da729b1dfebd38507cc56a8cd12e3 Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Tue, 25 Feb 2020 13:25:52 -0500 Subject: [PATCH 532/973] New feature: PERMISSIVE_HOLD_PER_KEY (#7994) * Implement 'PERMISSIVE_HOLD_PER_KEY' * Document 'PERMISSIVE_HOLD_PER_KEY' Co-authored-by: GeorgeKoenig <35542036+GeorgeKoenig@users.noreply.github.com> --- docs/config_options.md | 2 ++ docs/feature_advanced_keycodes.md | 19 +++++++++++++++++++ tmk_core/common/action_tapping.c | 15 +++++++++++---- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index d048d176787d..df4b67dc1604 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -142,6 +142,8 @@ If you define these options you will enable the associated feature, which may in * `#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](feature_advanced_keycodes.md#permissive-hold) for details +* `#define PERMISSIVE_HOLD_PER_KEY` + * enabled handling for per key `PERMISSIVE_HOLD` settings * `#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](feature_advanced_keycodes.md#ignore-mod-tap-interrupt) for details diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index ebb24dc990c2..8c3449460573 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -265,6 +265,25 @@ Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this wil ?> If you have `Ignore Mod Tap Interrupt` 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 PERMISSIVE_HOLD_PER_KEY +``` + +You can then add the following function to your keymap: + +```c +bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_A): + return true; + default: + return false; + } +} +``` + ## Ignore Mod Tap Interrupt To enable this setting, add this to your `config.h`: diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index c0f1f694b7e2..65ef0a185982 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -31,6 +31,10 @@ __attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode) { return TAPPI __attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return false; } # endif +# ifdef PERMISSIVE_HOLD_PER_KEY +__attribute__((weak)) bool get_permissive_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; @@ -115,12 +119,15 @@ 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) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) +# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) + else if ( # 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 - else if (IS_RELEASED(event) && waiting_buffer_typed(event)) + (get_tapping_term(get_event_keycode(tapping_key.event)) >= 500) && +# endif +# ifdef PERMISSIVE_HOLD_PER_KEY + !get_permissive_hold(get_event_keycode(tapping_key.event), keyp) && # endif + IS_RELEASED(event) && waiting_buffer_typed(event)) { debug("Tapping: End. No tap. Interfered by typing key\n"); process_record(&tapping_key); From 61b71320f79a663880bd70402d306722c1bbfe3e Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Tue, 25 Feb 2020 18:57:18 +0000 Subject: [PATCH 533/973] format code according to conventions [skip ci] --- tmk_core/common/action_tapping.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index 65ef0a185982..acce3ee5157f 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -122,13 +122,12 @@ bool process_tapping(keyrecord_t *keyp) { # if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) else if ( # ifdef TAPPING_TERM_PER_KEY - (get_tapping_term(get_event_keycode(tapping_key.event)) >= 500) && + (get_tapping_term(get_event_keycode(tapping_key.event)) >= 500) && # endif # ifdef PERMISSIVE_HOLD_PER_KEY - !get_permissive_hold(get_event_keycode(tapping_key.event), keyp) && + !get_permissive_hold(get_event_keycode(tapping_key.event), keyp) && # endif - IS_RELEASED(event) && waiting_buffer_typed(event)) - { + IS_RELEASED(event) && waiting_buffer_typed(event)) { debug("Tapping: End. No tap. Interfered by typing key\n"); process_record(&tapping_key); tapping_key = (keyrecord_t){}; From d52cd8886c2b3d201c8cdb0bf1a45ba98e4d9cf0 Mon Sep 17 00:00:00 2001 From: holtenc Date: Tue, 25 Feb 2020 15:21:59 -0600 Subject: [PATCH 534/973] [Keyboard] Add Prime_EXL Plus to handwired (#8238) * Add VIA support for Prime_L * Update keyboards/primekb/prime_l/v1/config.h * Add prime_exl_plus keyboard * Temporary removal of prime_exl_plus * Add Prime_EXL Plus, including VIA support * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/rules.mk * Update keyboards/handwired/prime_exl_plus/info.json * Update keyboards/handwired/prime_exl_plus/info.json * Update keyboards/handwired/prime_exl_plus/info.json * Update keymap.c * correct spacing of keymaps and layout macro. move indicator logic from user space to keyboard space * further corrections to keymaps and layout macro. * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update prime_exl_plus.c * small edit to prime_exl_plus.c --- keyboards/handwired/prime_exl_plus/config.h | 52 +++++++++++++++++++ keyboards/handwired/prime_exl_plus/info.json | 12 +++++ .../prime_exl_plus/keymaps/default/keymap.c | 50 ++++++++++++++++++ .../prime_exl_plus/keymaps/default/readme.md | 1 + .../prime_exl_plus/keymaps/via/keymap.c | 50 ++++++++++++++++++ .../prime_exl_plus/keymaps/via/readme.md | 1 + .../prime_exl_plus/keymaps/via/rules.mk | 1 + .../handwired/prime_exl_plus/prime_exl_plus.c | 49 +++++++++++++++++ .../handwired/prime_exl_plus/prime_exl_plus.h | 36 +++++++++++++ keyboards/handwired/prime_exl_plus/readme.md | 16 ++++++ keyboards/handwired/prime_exl_plus/rules.mk | 33 ++++++++++++ 11 files changed, 301 insertions(+) create mode 100644 keyboards/handwired/prime_exl_plus/config.h create mode 100644 keyboards/handwired/prime_exl_plus/info.json create mode 100644 keyboards/handwired/prime_exl_plus/keymaps/default/keymap.c create mode 100644 keyboards/handwired/prime_exl_plus/keymaps/default/readme.md create mode 100644 keyboards/handwired/prime_exl_plus/keymaps/via/keymap.c create mode 100644 keyboards/handwired/prime_exl_plus/keymaps/via/readme.md create mode 100644 keyboards/handwired/prime_exl_plus/keymaps/via/rules.mk create mode 100644 keyboards/handwired/prime_exl_plus/prime_exl_plus.c create mode 100644 keyboards/handwired/prime_exl_plus/prime_exl_plus.h create mode 100644 keyboards/handwired/prime_exl_plus/readme.md create mode 100644 keyboards/handwired/prime_exl_plus/rules.mk diff --git a/keyboards/handwired/prime_exl_plus/config.h b/keyboards/handwired/prime_exl_plus/config.h new file mode 100644 index 000000000000..7e9a440d24d5 --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/config.h @@ -0,0 +1,52 @@ +/* +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 0x5052 +#define PRODUCT_ID 0x6579 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PrimeKB +#define PRODUCT Prime_EXL Plus +#define DESCRIPTION Ergo with left numpad + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { D2, D6, B4, F1, E6, F0, F4, B5, D7, D3 } +#define MATRIX_COL_PINS { F5, F6, F7, C7, C6, B6, B7, B3, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D4 +#define RGBLED_NUM 10 +#define RGBLIGHT_ANIMATIONS + +/* 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/handwired/prime_exl_plus/info.json b/keyboards/handwired/prime_exl_plus/info.json new file mode 100644 index 000000000000..3fca8c829cdc --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Prime_EXL Plus", + "url": "https://www.primekb.com", + "maintainer": "holtenc", + "width": 21, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"K040", "x":0, "y":0}, {"label":"K050", "x":1, "y":0}, {"label":"K041", "x":2, "y":0}, {"label":"K051", "x":3, "y":0}, {"label":"K042", "x":4, "y":0}, {"label":"K052", "x":5, "y":0}, {"label":"K043", "x":6.5, "y":0}, {"label":"K053", "x":7.5, "y":0}, {"label":"K044", "x":8.5, "y":0}, {"label":"K054", "x":9.5, "y":0}, {"label":"K045", "x":10.5, "y":0}, {"label":"K055", "x":11.5, "y":0}, {"label":"K046", "x":14, "y":0}, {"label":"K056", "x":15, "y":0}, {"label":"K047", "x":16, "y":0}, {"label":"K057", "x":17, "y":0}, {"label":"K048", "x":18, "y":0}, {"label":"K058", "x":19, "y":0, "w":2}, {"label":"K030", "x":0, "y":1}, {"label":"K060", "x":1, "y":1}, {"label":"K031", "x":2, "y":1}, {"label":"K061", "x":3, "y":1}, {"label":"K032", "x":4, "y":1}, {"label":"K062", "x":5, "y":1}, {"label":"K033", "x":6.5, "y":1}, {"label":"K063", "x":7.5, "y":1}, {"label":"K034", "x":8.5, "y":1}, {"label":"K064", "x":9.5, "y":1}, {"label":"K035", "x":10.5, "y":1}, {"label":"K065", "x":11.5, "y":1}, {"label":"K036", "x":14, "y":1}, {"label":"K066", "x":15, "y":1}, {"label":"K037", "x":16, "y":1}, {"label":"K067", "x":17, "y":1}, {"label":"K038", "x":18, "y":1}, {"label":"K068", "x":19, "y":1}, {"label":"K039", "x":20, "y":1}, {"label":"K020", "x":0, "y":2}, {"label":"K070", "x":1, "y":2}, {"label":"K021", "x":2, "y":2}, {"label":"K071", "x":3, "y":2}, {"label":"K022", "x":4, "y":2}, {"label":"K072", "x":5, "y":2}, {"label":"K023", "x":6.5, "y":2, "w":1.25}, {"label":"K073", "x":7.75, "y":2}, {"label":"K024", "x":8.75, "y":2}, {"label":"K074", "x":9.75, "y":2}, {"label":"K025", "x":10.75, "y":2}, {"label":"K075", "x":11.75, "y":2}, {"label":"K026", "x":14.25, "y":2}, {"label":"K076", "x":15.25, "y":2}, {"label":"K027", "x":16.25, "y":2}, {"label":"K077", "x":17.25, "y":2}, {"label":"K028", "x":18.25, "y":2}, {"label":"K029", "x":19.25, "y":2, "w":1.75}, {"label":"K010", "x":0, "y":3}, {"label":"K080", "x":1, "y":3}, {"label":"K011", "x":2, "y":3}, {"label":"K081", "x":3, "y":3}, {"label":"K012", "x":4, "y":3}, {"label":"K082", "x":5, "y":3}, {"label":"K013", "x":6.5, "y":3, "w":1.75}, {"label":"K083", "x":8.25, "y":3}, {"label":"K014", "x":9.25, "y":3}, {"label":"K084", "x":10.25, "y":3}, {"label":"K015", "x":11.25, "y":3}, {"label":"K085", "x":12.25, "y":3}, {"label":"K016", "x":13.75, "y":3}, {"label":"K086", "x":14.75, "y":3}, {"label":"K017", "x":15.75, "y":3}, {"label":"K087", "x":16.75, "y":3}, {"label":"K018", "x":17.75, "y":3}, {"label":"K088", "x":18.75, "y":3}, {"label":"K019", "x":19.75, "y":3, "w":1.25}, {"label":"K000", "x":0, "y":4}, {"label":"K090", "x":1, "y":4}, {"label":"K001", "x":2, "y":4}, {"label":"K091", "x":3, "y":4}, {"label":"K002", "x":4, "y":4}, {"label":"K092", "x":5, "y":4}, {"label":"K003", "x":6.5, "y":4, "w":1.25}, {"label":"K093", "x":7.75, "y":4, "w":1.25}, {"label":"K004", "x":10.25, "y":4, "w":1.25}, {"label":"K095", "x":11.5, "y":4, "w":1.75}, {"label":"K006", "x":13.75, "y":4, "w":1.75}, {"label":"K097", "x":15.5, "y":4, "w":1.25}, {"label":"K098", "x":18.5, "y":4, "w":1.25}, {"label":"K009", "x":19.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/handwired/prime_exl_plus/keymaps/default/keymap.c b/keyboards/handwired/prime_exl_plus/keymaps/default/keymap.c new file mode 100644 index 000000000000..8f9fa84f7be3 --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* 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] = { + LAYOUT( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_BSPC, 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_P7, KC_P8, KC_P9, KC_DEL, KC_GRV, 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_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, 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_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_F7, KC_F8, TO(1), KC_PDOT, KC_P0, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_MINS, KC_RGUI, KC_RCTL + ), + + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_F9, 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_GRV, 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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_V, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC, KC_LCTL, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_MINS, KC_RGUI, KC_RCTL + ), + + LAYOUT( + KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + RGB_TOG, 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_UP, KC_TRNS, KC_SCLN, KC_BSLS, KC_TRNS, + RGB_VAI, RGB_VAD, 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_TRNS, KC_TRNS, + RGB_M_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, 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/handwired/prime_exl_plus/keymaps/default/readme.md b/keyboards/handwired/prime_exl_plus/keymaps/default/readme.md new file mode 100644 index 000000000000..2df9774487a5 --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for prime_exl plus \ No newline at end of file diff --git a/keyboards/handwired/prime_exl_plus/keymaps/via/keymap.c b/keyboards/handwired/prime_exl_plus/keymaps/via/keymap.c new file mode 100644 index 000000000000..8f9fa84f7be3 --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* 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] = { + LAYOUT( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_BSPC, 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_P7, KC_P8, KC_P9, KC_DEL, KC_GRV, 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_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, 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_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_F7, KC_F8, TO(1), KC_PDOT, KC_P0, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_MINS, KC_RGUI, KC_RCTL + ), + + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_F9, 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_GRV, 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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_V, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC, KC_LCTL, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_MINS, KC_RGUI, KC_RCTL + ), + + LAYOUT( + KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + RGB_TOG, 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_UP, KC_TRNS, KC_SCLN, KC_BSLS, KC_TRNS, + RGB_VAI, RGB_VAD, 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_TRNS, KC_TRNS, + RGB_M_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, 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/handwired/prime_exl_plus/keymaps/via/readme.md b/keyboards/handwired/prime_exl_plus/keymaps/via/readme.md new file mode 100644 index 000000000000..bcd7f1d8beeb --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for Prime_EXL Plus \ No newline at end of file diff --git a/keyboards/handwired/prime_exl_plus/keymaps/via/rules.mk b/keyboards/handwired/prime_exl_plus/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c new file mode 100644 index 000000000000..266a3b638b6a --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c @@ -0,0 +1,49 @@ +/* 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_exl_plus.h" + +void matrix_init_kb(void) { + // set CapsLock LED to output and low + setPinOutput(B0); + writePinLow(B0); + // set NumLock LED to output and low + setPinOutput(B1); + writePinLow(B1); + // set ScrollLock LED to output and low + setPinOutput(B2); + writePinLow(B2); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B1, led_state.num_lock); + writePin(B0, led_state.caps_lock); + //writePin(B2, led_state.scroll_lock); + } + return res; +} + +//function for layer indicator LED +layer_state_t layer_state_set_kb(layer_state_t state) +{ + if (get_highest_layer(state) == 1) { + writePinHigh(B2); + } else { + writePinLow(B2); + } + return layer_state_set_user(state); +} diff --git a/keyboards/handwired/prime_exl_plus/prime_exl_plus.h b/keyboards/handwired/prime_exl_plus/prime_exl_plus.h new file mode 100644 index 000000000000..bb1c8b174383 --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/prime_exl_plus.h @@ -0,0 +1,36 @@ +/* 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 "quantum.h" + +#define LAYOUT( \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K057, K048, K058, \ + K030, K060, K031, K061, K032, K062, K033, K063, K034, K064, K035, K065, K036, K066, K037, K067, K038, K068, K039, \ + K020, K070, K021, K071, K022, K072, K023, K073, K024, K074, K025, K075, K026, K076, K027, K077, K028, K029, \ + K010, K080, K011, K081, K012, K082, K013, K083, K014, K084, K015, K085, K016, K086, K017, K087, K018, K088, K019, \ + K000, K090, K001, K091, K002, K092, K003, K093, K004, K095, K006, K097, K098, K009 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, KC_NO, KC_NO, K009 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028, K029 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038, K039 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048, KC_NO }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058, KC_NO }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, K077, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, K087, K088, KC_NO }, \ + { K090, K091, K092, K093, KC_NO, K095, KC_NO, K097, K098, KC_NO } \ +} diff --git a/keyboards/handwired/prime_exl_plus/readme.md b/keyboards/handwired/prime_exl_plus/readme.md new file mode 100644 index 000000000000..e35fa1f2e0be --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/readme.md @@ -0,0 +1,16 @@ +# Prime_EXL Plus + +![Prime_EXL Plus](https://i.imgur.com/XGj53Nb.jpg) + +An ergonomic 45% keyboard with a numrow and macro/numpad added to the left side. + +* Keyboard Maintainer: [Holtenc](https://github.com/holtenc/) +* Hardware Supported: Prime_EXL Plus PCB, ATmega32U4 +* Hardware Availability: Prototype/personal project + +Make example for this keyboard (after setting up your build environment): + + make handwired/prime_exl_plus:default + make handwired/prime_exl_plus: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/handwired/prime_exl_plus/rules.mk b/keyboards/handwired/prime_exl_plus/rules.mk new file mode 100644 index 000000000000..c0493d993c77 --- /dev/null +++ b/keyboards/handwired/prime_exl_plus/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 = 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 From 4667bc554e8af8f5b1fe0f1931209f936812e44f Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Wed, 26 Feb 2020 10:12:13 +0100 Subject: [PATCH 535/973] Fixed OS detection such that OSX doesn't take over the world (#8248) --- 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 577588492db4..41db41184ff5 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' or 'macos' in OS: + if 'darwin' in OS or 'macos' in OS: if not os_test_macos(): ok = False elif 'linux' in OS: From e18be6910493c132fa84be1f21a579fa9b9e12a9 Mon Sep 17 00:00:00 2001 From: Brandon Schlack Date: Wed, 26 Feb 2020 18:19:34 -0800 Subject: [PATCH 536/973] Add community layout support to KBD67 MKIIRGB v2 (#8249) --- keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk index e10c4010a597..65ee5ae3ecf0 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk @@ -31,3 +31,5 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RGB_MATRIX_ENABLE = yes # Use RGB matrix NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 65_ansi_blocker From 444fd3b1cc07d7f68aa37cbc9e38f2e4ed4d3ea7 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 27 Feb 2020 20:38:19 +1100 Subject: [PATCH 537/973] Add support for delays in send_string. (#8244) --- docs/feature_macros.md | 20 ++++++--- quantum/quantum.c | 79 +++++++++++++++++++++++----------- quantum/send_string_keycodes.h | 10 +++-- 3 files changed, 75 insertions(+), 34 deletions(-) diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 7ca945683ca8..99dd564bf8ae 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -107,6 +107,16 @@ Would tap `KC_HOME` - note how the prefix is now `X_`, and not `KC_`. You can al Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline). +Delays can be also added to the string: + +* `SS_DELAY(msecs)` will delay for the specified number of milliseconds. + +For example: + + SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO"); + +Which would send "VE" followed by a 1-second delay, then a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline, but delayed in the middle). + There's also a couple of mod shortcuts you can use: * `SS_LCTL(string)` @@ -200,11 +210,11 @@ This will clear all mods currently pressed. This will clear all keys besides the mods currently pressed. -## Advanced Example: +## Advanced Example: ### Super ALT↯TAB -This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows. +This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows. ```c bool is_alt_tab_active = false; # ADD this near the begining of keymap.c @@ -221,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (!is_alt_tab_active) { is_alt_tab_active = true; register_code(KC_LALT); - } + } alt_tab_timer = timer_read(); register_code(KC_TAB); } else { @@ -232,7 +242,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_scan_user(void) { # The very important timer. +void matrix_scan_user(void) { # The very important timer. if (is_alt_tab_active) { if (timer_elapsed(alt_tab_timer) > 1000) { unregister_code(KC_LALT); @@ -321,7 +331,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ``` -## Advanced Example: +## Advanced Example: ### Single-Key Copy/Paste diff --git a/quantum/quantum.c b/quantum/quantum.c index 52062bb17482..1b5ce3292cd4 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -14,6 +14,7 @@ * along with this program. If not, see . */ +#include #include "quantum.h" #ifdef PROTOCOL_LUFA @@ -374,19 +375,32 @@ void send_string_with_delay(const char *str, uint8_t interval) { while (1) { char ascii_code = *str; if (!ascii_code) break; - if (ascii_code == SS_TAP_CODE) { - // tap - uint8_t keycode = *(++str); - register_code(keycode); - unregister_code(keycode); - } else if (ascii_code == SS_DOWN_CODE) { - // down - uint8_t keycode = *(++str); - register_code(keycode); - } else if (ascii_code == SS_UP_CODE) { - // up - uint8_t keycode = *(++str); - unregister_code(keycode); + if (ascii_code == SS_QMK_PREFIX) { + ascii_code = *(++str); + if (ascii_code == SS_TAP_CODE) { + // tap + uint8_t keycode = *(++str); + register_code(keycode); + unregister_code(keycode); + } else if (ascii_code == SS_DOWN_CODE) { + // down + uint8_t keycode = *(++str); + register_code(keycode); + } else if (ascii_code == SS_UP_CODE) { + // up + uint8_t keycode = *(++str); + unregister_code(keycode); + } else if (ascii_code == SS_DELAY_CODE) { + // delay + int ms = 0; + uint8_t keycode = *(++str); + while (isdigit(keycode)) { + ms *= 10; + ms += keycode - '0'; + keycode = *(++str); + } + while (ms--) wait_ms(1); + } } else { send_char(ascii_code); } @@ -403,19 +417,32 @@ void send_string_with_delay_P(const char *str, uint8_t interval) { while (1) { char ascii_code = pgm_read_byte(str); if (!ascii_code) break; - if (ascii_code == SS_TAP_CODE) { - // tap - uint8_t keycode = pgm_read_byte(++str); - register_code(keycode); - unregister_code(keycode); - } else if (ascii_code == SS_DOWN_CODE) { - // down - uint8_t keycode = pgm_read_byte(++str); - register_code(keycode); - } else if (ascii_code == SS_UP_CODE) { - // up - uint8_t keycode = pgm_read_byte(++str); - unregister_code(keycode); + if (ascii_code == SS_QMK_PREFIX) { + ascii_code = pgm_read_byte(++str); + if (ascii_code == SS_TAP_CODE) { + // tap + uint8_t keycode = pgm_read_byte(++str); + register_code(keycode); + unregister_code(keycode); + } else if (ascii_code == SS_DOWN_CODE) { + // down + uint8_t keycode = pgm_read_byte(++str); + register_code(keycode); + } else if (ascii_code == SS_UP_CODE) { + // up + uint8_t keycode = pgm_read_byte(++str); + unregister_code(keycode); + } else if (ascii_code == SS_DELAY_CODE) { + // delay + int ms = 0; + uint8_t keycode = pgm_read_byte(++str); + while (isdigit(keycode)) { + ms *= 10; + ms += keycode - '0'; + keycode = pgm_read_byte(++str); + } + while (ms--) wait_ms(1); + } } else { send_char(ascii_code); } diff --git a/quantum/send_string_keycodes.h b/quantum/send_string_keycodes.h index b4a50f84d37b..86dc8bf00c20 100644 --- a/quantum/send_string_keycodes.h +++ b/quantum/send_string_keycodes.h @@ -382,13 +382,17 @@ #define ADD_SLASH_X(y) STRINGIZE(\x##y) #define SYMBOL_STR(x) ADD_SLASH_X(x) +#define SS_QMK_PREFIX 1 + #define SS_TAP_CODE 1 #define SS_DOWN_CODE 2 #define SS_UP_CODE 3 +#define SS_DELAY_CODE 4 -#define SS_TAP(keycode) "\1" SYMBOL_STR(keycode) -#define SS_DOWN(keycode) "\2" SYMBOL_STR(keycode) -#define SS_UP(keycode) "\3" SYMBOL_STR(keycode) +#define SS_TAP(keycode) "\1\1" SYMBOL_STR(keycode) +#define SS_DOWN(keycode) "\1\2" SYMBOL_STR(keycode) +#define SS_UP(keycode) "\1\3" SYMBOL_STR(keycode) +#define SS_DELAY(msecs) "\1\4" STRINGIZE(msecs) "|" // `string` arguments must not be parenthesized #define SS_LCTL(string) SS_DOWN(X_LCTL) string SS_UP(X_LCTL) From ae46e6ace94656ffa3ce12f74022ea62c8786817 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 27 Feb 2020 01:40:31 -0800 Subject: [PATCH 538/973] Fix MCU rule for Wete (#8254) Including the `xB` suffix prevents qmk_compiler (and thus QMK Configurator) from compiling firmware for the Wete. Rolling this change back until we work out a long-term solution for the suffixes. --- keyboards/wete/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/wete/rules.mk b/keyboards/wete/rules.mk index a01bef1d440f..3999511faeb0 100644 --- a/keyboards/wete/rules.mk +++ b/keyboards/wete/rules.mk @@ -1,5 +1,5 @@ # MCU name -MCU = STM32F072xB +MCU = STM32F072 # Build Options # comment out to disable the options. From 7eab5ad60fa95502273ed2b3bb75008fb90b44b6 Mon Sep 17 00:00:00 2001 From: James Young Date: Thu, 27 Feb 2020 11:17:23 -0800 Subject: [PATCH 539/973] Update Breaking Changes timeline I've been working from one timeline while the docs said something different. --- 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 d3af3c79bfb7..aeb9a07426dd 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -17,8 +17,8 @@ The next Breaking Change is scheduled for February 29, 2020. * [x] 2019 Sep 21 - `future` is created. It will be rebased weekly. * [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 27 - `master` is locked, no PR's merged. +* [ ] 2020 Feb 29 - Merge `future` to `master`. * [ ] 2020 Feb 29 - `master` is unlocked. PR's can be merged again. ## What changes will be included? From 85041ff05bf0e5f4ff4535caf6e638491a5614c8 Mon Sep 17 00:00:00 2001 From: James Young Date: Thu, 27 Feb 2020 12:03:30 -0800 Subject: [PATCH 540/973] Update Breaking Changes checklist --- docs/breaking_changes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index aeb9a07426dd..f2122ffa4420 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -17,7 +17,7 @@ The next Breaking Change is scheduled for February 29, 2020. * [x] 2019 Sep 21 - `future` is created. It will be rebased weekly. * [x] 2020 Feb 1 - `future` closed to new PR's. * [x] 2020 Feb 1 - Call for testers. -* [ ] 2020 Feb 27 - `master` is locked, no PR's merged. +* [x] 2020 Feb 27 - `master` is locked, no PR's merged. * [ ] 2020 Feb 29 - Merge `future` to `master`. * [ ] 2020 Feb 29 - `master` is unlocked. PR's can be merged again. From 26eef35f07698d23aafae90e1c230b52e100a334 Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 29 Feb 2020 12:00:00 -0800 Subject: [PATCH 541/973] 2020 February 29 Breaking Changes Update (#8064) --- .gitignore | 3 + .gitmodules | 1 - .vscode/settings.json | 3 +- Makefile | 6 + common_features.mk | 1 + docs/ChangeLog/20200229.md | 75 +++ docs/feature_backlight.md | 20 +- docs/feature_encoders.md | 52 +- drivers/arm/i2c_master.c | 8 +- drivers/arm/ws2812_spi.c | 2 +- drivers/boards/GENERIC_STM32_F072XB/board.c | 207 +++++++- drivers/boards/GENERIC_STM32_F072XB/board.h | 29 +- drivers/boards/GENERIC_STM32_F072XB/board.mk | 4 + .../GENERIC_STM32_F072XB/cfg/board.chcfg | 2 +- .../GENERIC_STM32_F072XB/cfg/board.fmpp | 15 + drivers/boards/GENERIC_STM32_F303XC/board.c | 178 ++++++- .../ugfx/gdisp/is31fl3731c/gdisp_lld_config.h | 8 +- drivers/ugfx/gdisp/st7565/gdisp_lld_config.h | 10 +- keyboards/acheron/austin/chconf.h | 202 +++++++- keyboards/acheron/austin/halconf.h | 265 ++++++++-- keyboards/amj40/keymaps/fabian/keymap.c | 10 +- keyboards/amj40/keymaps/myee/keymap.c | 27 +- .../boards/ST_STM32F072B_DISCOVERY/board.c | 179 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/at_at/660m/chconf.h | 202 +++++++- keyboards/at_at/660m/halconf.h | 265 ++++++++-- .../frosty_flake/keymaps/QFR_JM/keymap.c | 6 +- .../boards/ST_STM32F072B_DISCOVERY/board.c | 177 ++++++- keyboards/candybar/chconf.h | 202 +++++++- keyboards/candybar/halconf.h | 266 ++++++++-- .../boards/ST_STM32F072B_DISCOVERY/board.c | 179 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/cannonkeys/an_c/chconf.h | 202 +++++++- keyboards/cannonkeys/an_c/halconf.h | 265 ++++++++-- keyboards/cannonkeys/bluepill/ws2812.c | 1 + .../boards/ST_STM32F072B_DISCOVERY/board.c | 179 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/cannonkeys/chimera65/chconf.h | 202 +++++++- keyboards/cannonkeys/chimera65/halconf.h | 265 ++++++++-- .../boards/ST_STM32F072B_DISCOVERY/board.c | 179 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/cannonkeys/instant60/chconf.h | 202 +++++++- keyboards/cannonkeys/instant60/halconf.h | 265 ++++++++-- .../boards/ST_STM32F072B_DISCOVERY/board.c | 179 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/cannonkeys/iron165/chconf.h | 202 +++++++- keyboards/cannonkeys/iron165/halconf.h | 265 ++++++++-- keyboards/cannonkeys/ortho48/chconf.h | 202 +++++++- keyboards/cannonkeys/ortho48/halconf.h | 266 ++++++++-- keyboards/cannonkeys/ortho60/chconf.h | 202 +++++++- keyboards/cannonkeys/ortho60/halconf.h | 266 ++++++++-- keyboards/cannonkeys/ortho75/chconf.h | 202 +++++++- keyboards/cannonkeys/ortho75/halconf.h | 266 ++++++++-- keyboards/cannonkeys/practice60/chconf.h | 202 +++++++- keyboards/cannonkeys/practice60/halconf.h | 266 ++++++++-- keyboards/cannonkeys/practice65/chconf.h | 202 +++++++- keyboards/cannonkeys/practice65/halconf.h | 266 ++++++++-- .../boards/ST_STM32F072B_DISCOVERY/board.c | 177 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/cannonkeys/satisfaction75/chconf.h | 202 +++++++- keyboards/cannonkeys/satisfaction75/halconf.h | 265 ++++++++-- .../cannonkeys/satisfaction75/i2c_master.c | 8 +- keyboards/cannonkeys/satisfaction75/mcuconf.h | 187 +++---- .../boards/ST_STM32F072B_DISCOVERY/board.c | 179 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/cannonkeys/savage65/chconf.h | 202 +++++++- keyboards/cannonkeys/savage65/halconf.h | 265 ++++++++-- keyboards/cannonkeys/stm32f072/ws2812.c | 1 + .../boards/ST_STM32F072B_DISCOVERY/board.c | 179 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/cannonkeys/tmov2/chconf.h | 202 +++++++- keyboards/cannonkeys/tmov2/halconf.h | 265 ++++++++-- keyboards/cheshire/curiosity/chconf.h | 206 +++++++- keyboards/cheshire/curiosity/halconf.h | 266 ++++++++-- keyboards/clueboard/60/chconf.h | 202 +++++++- keyboards/clueboard/60/halconf.h | 241 +++++++-- keyboards/clueboard/60/mcuconf.h | 62 ++- keyboards/clueboard/66/rev4/chconf.h | 202 +++++++- keyboards/clueboard/66/rev4/halconf.h | 241 +++++++-- keyboards/clueboard/66/rev4/mcuconf.h | 62 ++- keyboards/clueboard/66_hotswap/gen1/chconf.h | 202 +++++++- keyboards/clueboard/66_hotswap/gen1/halconf.h | 241 +++++++-- keyboards/clueboard/66_hotswap/gen1/mcuconf.h | 62 ++- keyboards/converter/siemens_tastatur/chconf.h | 202 +++++++- .../converter/siemens_tastatur/halconf.h | 266 ++++++++-- keyboards/converter/siemens_tastatur/matrix.c | 89 ++-- .../usb_usb/keymaps/coloneljesus/keymap.c | 4 +- .../ergodox_infinity/board_is31fl3731c.h | 2 +- keyboards/ergodox_infinity/chconf.h | 236 ++++++++- keyboards/ergodox_infinity/halconf.h | 266 ++++++++-- keyboards/ergodox_stm32/chconf.h | 202 +++++++- keyboards/ergodox_stm32/halconf.h | 266 ++++++++-- .../gh60/revc/keymaps/robotmaxtron/keymap.c | 18 +- keyboards/gon/nerd60/config.h | 35 ++ keyboards/gon/nerd60/info.json | 78 +++ keyboards/gon/nerd60/keymaps/default/keymap.c | 20 + .../gon/nerd60/keymaps/default/readme.md | 3 + .../nerd60}/keymaps/mauin/keymap.c | 0 .../nerd60}/keymaps/mauin/readme.md | 0 .../nerd60/keymaps/mauin}/rules.mk | 18 +- keyboards/gon/nerd60/nerd60.c | 1 + keyboards/gon/nerd60/nerd60.h | 22 + keyboards/gon/nerd60/readme.md | 27 + keyboards/{gonnerd => gon/nerd60}/rules.mk | 13 +- keyboards/{gonnerd => gon/nerdtkl}/config.h | 11 +- keyboards/gon/nerdtkl/info.json | 104 ++++ .../gon/nerdtkl/keymaps/default/keymap.c | 24 + .../gon/nerdtkl/keymaps/default/readme.md | 3 + .../nerdtkl}/keymaps/gam3cat/config.h | 0 .../nerdtkl}/keymaps/gam3cat/keymap.c | 0 .../nerdtkl}/keymaps/gam3cat/readme.md | 0 .../gon/nerdtkl/keymaps/gam3cat/rules.mk | 26 + keyboards/gon/nerdtkl/nerdtkl.c | 1 + keyboards/gon/nerdtkl/nerdtkl.h | 24 + keyboards/{gonnerd => gon/nerdtkl}/readme.md | 13 +- keyboards/gon/nerdtkl/rules.mk | 36 ++ keyboards/gon/readme.md | 9 + keyboards/gonnerd/gonnerd.c | 1 - keyboards/gonnerd/gonnerd.h | 42 -- keyboards/gonnerd/info.json | 18 - keyboards/gonnerd/keymaps/default/keymap.c | 22 - keyboards/gonnerd/keymaps/gam3cat/rules.mk | 24 - keyboards/gonnerd/keymaps/mauin/rules.mk | 18 - keyboards/gonnerd/keymaps/tkl/keymap.c | 27 - keyboards/gonnerd/keymaps/tkl/rules.mk | 18 - keyboards/hadron/ver3/chconf.h | 202 +++++++- keyboards/hadron/ver3/halconf.h | 241 +++++++-- keyboards/hadron/ver3/mcuconf.h | 62 ++- .../handwired/bluepill/bluepill70/chconf.h | 202 +++++++- .../handwired/bluepill/bluepill70/halconf.h | 267 ++++++++-- keyboards/handwired/ck4x4/chconf.h | 202 +++++++- keyboards/handwired/ck4x4/halconf.h | 266 ++++++++-- keyboards/handwired/co60/rev6/chconf.h | 202 +++++++- keyboards/handwired/co60/rev6/halconf.h | 241 +++++++-- keyboards/handwired/co60/rev6/mcuconf.h | 62 ++- keyboards/handwired/co60/rev7/chconf.h | 202 +++++++- keyboards/handwired/co60/rev7/halconf.h | 241 +++++++-- keyboards/handwired/co60/rev7/mcuconf.h | 62 ++- .../keymaps/milestogo/keymap.c | 12 +- keyboards/handwired/onekey/bluepill/chconf.h | 202 +++++++- keyboards/handwired/onekey/bluepill/halconf.h | 266 ++++++++-- .../handwired/onekey/stm32f0_disco/chconf.h | 202 +++++++- .../handwired/onekey/stm32f0_disco/halconf.h | 266 ++++++++-- keyboards/handwired/onekey/teensy_32/chconf.h | 202 +++++++- .../handwired/onekey/teensy_32/halconf.h | 267 ++++++++-- keyboards/handwired/onekey/teensy_lc/chconf.h | 202 +++++++- .../handwired/onekey/teensy_lc/halconf.h | 267 ++++++++-- keyboards/handwired/steamvan/rev1/chconf.h | 202 +++++++- keyboards/handwired/steamvan/rev1/halconf.h | 241 +++++++-- keyboards/handwired/steamvan/rev1/mcuconf.h | 62 ++- keyboards/hhkb/keymaps/shela/keymap.c | 9 +- keyboards/hs60/v2/chconf.h | 202 +++++++- keyboards/hs60/v2/halconf.h | 241 +++++++-- keyboards/hs60/v2/mcuconf.h | 62 ++- keyboards/infinity60/chconf.h | 202 +++++++- keyboards/infinity60/halconf.h | 266 ++++++++-- keyboards/infinity60/led_controller.c | 10 +- keyboards/jd45/keymaps/mjt6u/keymap.c | 12 +- keyboards/jm60/chconf.h | 202 +++++++- keyboards/jm60/halconf.h | 266 ++++++++-- keyboards/k_type/chconf.h | 202 +++++++- keyboards/k_type/halconf.h | 266 ++++++++-- .../katana60/keymaps/rominronin/keymap.c | 22 - .../keebio/nyquist/keymaps/DivergeJM/keymap.c | 9 +- keyboards/kinesis/keymaps/milestogo/keymap.c | 14 +- keyboards/lets_split/keymaps/adam/keymap.c | 9 +- keyboards/matrix/noah/boards/noah_bd/board.c | 157 +++++- keyboards/matrix/noah/chconf.h | 209 +++++++- keyboards/matrix/noah/config.h | 7 +- keyboards/matrix/noah/halconf.h | 241 +++++++-- keyboards/matrix/noah/noah.c | 3 +- keyboards/matrix/noah/rules.mk | 2 +- keyboards/matrix/noah/ws2812_f4.c | 272 ---------- keyboards/matrix/noah/ws2812_f4.h | 102 ---- keyboards/nk65/chconf.h | 202 +++++++- keyboards/nk65/halconf.h | 241 +++++++-- keyboards/nk65/mcuconf.h | 62 ++- .../ixora/boards/GENERIC_STM32_F042X6/board.c | 187 ++++++- keyboards/peiorisboards/ixora/chconf.h | 205 +++++++- keyboards/peiorisboards/ixora/halconf.h | 271 ++++++++-- keyboards/planck/keymaps/ab/keymap.c | 62 +-- keyboards/planck/keymaps/alexey/keymap.c | 41 +- keyboards/planck/keymaps/altgr/beakl.h | 482 +++++++++--------- keyboards/planck/keymaps/altgr/colemak.h | 96 ++-- .../keymaps/altgr/common/chord_layout.h | 24 +- .../keymaps/altgr/common/number_fkey_layout.h | 52 +- .../keymaps/altgr/common/steno_layout.h | 24 +- .../altgr/common/symbol_guifn_layout.h | 48 +- .../keymaps/altgr/common/toggle_layout.h | 62 +-- keyboards/planck/keymaps/altgr/keymap.c | 27 +- keyboards/planck/keymaps/altgr/qwerty.h | 48 +- .../planck/keymaps/andylikescandy/keymap.c | 112 ++-- .../planck/keymaps/angerthosenear/keymap.c | 50 +- keyboards/planck/keymaps/austin/keymap.c | 50 +- keyboards/planck/keymaps/aviator/keymap.c | 64 ++- keyboards/planck/keymaps/basic/keymap.c | 39 +- keyboards/planck/keymaps/bone2planck/keymap.c | 80 ++- keyboards/planck/keymaps/brandon/keymap.c | 113 ++-- keyboards/planck/keymaps/cbbrowne/keymap.c | 70 ++- keyboards/planck/keymaps/chance/keymap.c | 107 ++-- keyboards/planck/keymaps/charlie/keymap.c | 38 +- keyboards/planck/keymaps/circuit/keymap.c | 80 ++- .../planck/keymaps/coloneljesus/keymap.c | 88 ++-- keyboards/planck/keymaps/corvec/keymap.c | 16 +- keyboards/planck/keymaps/daniel/keymap.c | 50 +- .../planck/keymaps/danielhklein/keymap.c | 52 +- keyboards/planck/keymaps/david/keymap.c | 50 +- keyboards/planck/keymaps/dbroqua/keymap.c | 75 ++- keyboards/planck/keymaps/dc/keymap.c | 67 ++- keyboards/planck/keymaps/dcompact/keymap.c | 88 ++-- keyboards/planck/keymaps/dlaroe/keymap.c | 92 ++-- keyboards/planck/keymaps/dodger/keymap.c | 76 ++- keyboards/planck/keymaps/dr0ck/keymap.c | 100 ++-- .../planck/keymaps/dudeofawesome/keymap.c | 101 ++-- keyboards/planck/keymaps/dzobert/keymap.c | 50 +- keyboards/planck/keymaps/emilyh/keymap.c | 92 ++-- keyboards/planck/keymaps/espynn/keymap.c | 62 +-- .../planck/keymaps/experimental/keymap.c | 105 ++-- keyboards/planck/keymaps/gabriel/keymap.c | 51 +- .../planck/keymaps/grahampheath/keymap.c | 101 ++-- keyboards/planck/keymaps/gunp/keymap.c | 160 +++--- .../keymaps/handwired_binaryplease/keymap.c | 92 ++-- .../planck/keymaps/hiea/common/chord_layout.h | 24 +- .../keymaps/hiea/common/number_fkey_layout.h | 26 +- .../planck/keymaps/hiea/common/steno_layout.h | 24 +- .../keymaps/hiea/common/symbol_guifn_layout.h | 24 +- .../keymaps/hiea/common/toggle_layout.h | 62 +-- keyboards/planck/keymaps/hiea/config.h | 2 +- keyboards/planck/keymaps/hiea/hiea.h | 50 +- keyboards/planck/keymaps/hiea/keymap.c | 27 +- .../keymaps/hieax/common/chord_layout.h | 24 +- .../keymaps/hieax/common/number_fkey_layout.h | 26 +- .../keymaps/hieax/common/steno_layout.h | 24 +- .../hieax/common/symbol_guifn_layout.h | 24 +- .../keymaps/hieax/common/toggle_layout.h | 62 +-- keyboards/planck/keymaps/hieax/config.h | 2 +- keyboards/planck/keymaps/hieax/hiea.h | 72 +-- keyboards/planck/keymaps/hieax/keymap.c | 27 +- keyboards/planck/keymaps/impossible/keymap.c | 80 ++- keyboards/planck/keymaps/jacob/keymap.c | 43 +- keyboards/planck/keymaps/jeebak/keymap.c | 116 ++--- keyboards/planck/keymaps/jeremy-dev/keymap.c | 65 ++- keyboards/planck/keymaps/jhenahan/config.h | 1 + keyboards/planck/keymaps/jhenahan/keymap.c | 92 ++-- keyboards/planck/keymaps/jirgn/keymap.c | 76 ++- keyboards/planck/keymaps/joe/keymap.c | 91 ++-- keyboards/planck/keymaps/johannes/keymap.c | 51 +- keyboards/planck/keymaps/kelorean/keymap.c | 88 ++-- keyboards/planck/keymaps/khord/keymap.c | 52 +- keyboards/planck/keymaps/kloki/keymap.c | 64 ++- keyboards/planck/keymaps/kmontag42/keymap.c | 64 ++- keyboards/planck/keymaps/kyle/keymap.c | 50 +- keyboards/planck/keymaps/lae3/keymap.c | 92 ++-- keyboards/planck/keymaps/leo/keymap.c | 50 +- keyboards/planck/keymaps/lucas/keymap.c | 92 ++-- keyboards/planck/keymaps/lukas/keymap.c | 42 +- keyboards/planck/keymaps/luke/keymap.c | 111 ++-- keyboards/planck/keymaps/mason/keymap.c | 51 +- keyboards/planck/keymaps/matrixman/keymap.c | 78 ++- keyboards/planck/keymaps/max/keymap.c | 50 +- keyboards/planck/keymaps/mitch/keymap.c | 39 +- keyboards/planck/keymaps/mjt/keymap.c | 80 ++- keyboards/planck/keymaps/mjtnumsym/keymap.c | 80 ++- keyboards/planck/keymaps/mollat/keymap.c | 75 ++- keyboards/planck/keymaps/myoung34/config.h | 1 + keyboards/planck/keymaps/myoung34/keymap.c | 54 +- keyboards/planck/keymaps/neo2planck/keymap.c | 54 +- keyboards/planck/keymaps/nico/keymap.c | 72 ++- .../planck/keymaps/not-quite-neo/keymap.c | 63 ++- keyboards/planck/keymaps/originerd/keymap.c | 56 +- keyboards/planck/keymaps/paget/keymap.c | 40 +- keyboards/planck/keymaps/palleiko/keymap.c | 112 ++-- keyboards/planck/keymaps/pete/keymap.c | 126 +++-- keyboards/planck/keymaps/phreed/keymap.c | 76 ++- keyboards/planck/keymaps/piemod/keymap.c | 135 +++-- keyboards/planck/keymaps/pok3r/keymap.c | 100 ++-- keyboards/planck/keymaps/premek/keymap.c | 94 ++-- keyboards/planck/keymaps/pvc/keymap.c | 78 ++- keyboards/planck/keymaps/rai-suta/keymap.c | 39 +- keyboards/planck/keymaps/rodhaene/keymap.c | 64 ++- keyboards/planck/keymaps/sdothum/beakl.h | 434 ++++++++-------- keyboards/planck/keymaps/sdothum/colemak.h | 98 ++-- .../keymaps/sdothum/common/chord_layout.h | 24 +- .../sdothum/common/number_fkey_layout.h | 52 +- .../keymaps/sdothum/common/steno_layout.h | 24 +- .../sdothum/common/symbol_guifn_layout.h | 48 +- .../keymaps/sdothum/common/toggle_layout.h | 62 +-- keyboards/planck/keymaps/sdothum/config.h | 2 +- keyboards/planck/keymaps/sdothum/keymap.c | 27 +- keyboards/planck/keymaps/sdothum/qwerty.h | 48 +- keyboards/planck/keymaps/sean/keymap.c | 113 ++-- keyboards/planck/keymaps/sgoodwin/keymap.c | 68 ++- keyboards/planck/keymaps/smt/keymap.c | 80 ++- keyboards/planck/keymaps/steno/keymap.c | 88 ++-- keyboards/planck/keymaps/tak3over/keymap.c | 66 ++- keyboards/planck/keymaps/tehwalris/keymap.c | 76 ++- .../planck/keymaps/that_canadian/keymap.c | 68 ++- .../planck/keymaps/thermal_printer/keymap.c | 92 ++-- keyboards/planck/keymaps/tong92/keymap.c | 89 ++-- keyboards/planck/keymaps/unicode/keymap.c | 92 ++-- keyboards/planck/keymaps/yale/keymap.c | 54 +- keyboards/planck/keymaps/yang/keymap.c | 84 ++- keyboards/planck/keymaps/zach/keymap.c | 75 ++- keyboards/planck/keymaps/zrichard/keymap.c | 78 ++- .../boards/ST_STM32F072B_DISCOVERY/board.c | 179 ++++++- .../boards/ST_STM32F072B_DISCOVERY/board.h | 26 +- keyboards/projectkb/alice/chconf.h | 202 +++++++- keyboards/projectkb/alice/halconf.h | 264 ++++++++-- keyboards/retro_75/chconf.h | 206 +++++++- keyboards/retro_75/halconf.h | 266 ++++++++-- .../s60_x/keymaps/ansi_qwertz/keymap.c | 4 +- keyboards/sentraq/s60_x/keymaps/hasu/keymap.c | 9 +- keyboards/sentraq/s60_x/keymaps/jpec/keymap.c | 9 +- .../sentraq/s60_x/keymaps/spacefn/keymap.c | 5 +- .../sentraq/s65_x/keymaps/kelorean/keymap.c | 7 +- keyboards/sentraq/s65_x/keymaps/nall/keymap.c | 3 +- .../minivan/keymaps/mjt/keymap.c | 9 +- .../minivan/keymaps/tong92/keymap.c | 9 +- .../vinta/boards/GENERIC_STM32_F042X6/board.c | 187 ++++++- keyboards/vinta/chconf.h | 205 +++++++- keyboards/vinta/halconf.h | 271 ++++++++-- keyboards/wete/chconf.h | 202 +++++++- keyboards/wete/halconf.h | 265 ++++++++-- keyboards/whitefox/board_is31fl3731c.h | 2 +- keyboards/whitefox/chconf.h | 202 +++++++- keyboards/whitefox/halconf.h | 266 ++++++++-- keyboards/xiaomi/mk02/chconf.h | 206 +++++++- keyboards/xiaomi/mk02/halconf.h | 265 ++++++++-- layouts/community/60_iso/unxmaal/keymap.c | 2 - layouts/community/ergodox/adam/keymap.c | 7 - layouts/community/ergodox/guni/keymap.c | 7 +- layouts/community/ergodox/townk_osx/keymap.c | 3 +- lib/chibios | 2 +- lib/chibios-contrib | 2 +- lib/ugfx | 2 +- quantum/audio/audio_arm.c | 10 +- quantum/backlight/backlight_avr.c | 58 ++- quantum/encoder.c | 15 +- quantum/keymap_common.c | 20 - quantum/process_keycode/process_backlight.c | 51 ++ quantum/process_keycode/process_backlight.h | 21 + quantum/quantum.c | 3 + quantum/quantum.h | 4 + quantum/serial_link/system/serial_link.c | 4 +- quantum/stm32/chconf.h | 269 ++++++++-- quantum/stm32/halconf.h | 166 +++++- quantum/stm32/mcuconf.h | 62 ++- quantum/visualizer/common_gfxconf.h | 453 ++++++++-------- quantum/visualizer/visualizer.c | 4 +- quantum/visualizer/visualizer.h | 4 +- readme.md | 6 + tmk_core/chibios.mk | 18 +- tmk_core/common.mk | 5 + tmk_core/common/action.c | 26 - tmk_core/common/action_code.h | 33 +- tmk_core/common/chibios/timer.c | 44 +- tmk_core/common/command.c | 6 + tmk_core/common/timer.h | 5 +- tmk_core/protocol/chibios.mk | 1 + tmk_core/protocol/chibios/usb_driver.c | 10 +- tmk_core/protocol/chibios/usb_main.c | 8 +- util/chibios-upgrader.sh | 172 +++++++ 362 files changed, 27657 insertions(+), 8695 deletions(-) create mode 100644 docs/ChangeLog/20200229.md create mode 100644 drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp create mode 100644 keyboards/gon/nerd60/config.h create mode 100644 keyboards/gon/nerd60/info.json create mode 100644 keyboards/gon/nerd60/keymaps/default/keymap.c create mode 100644 keyboards/gon/nerd60/keymaps/default/readme.md rename keyboards/{gonnerd => gon/nerd60}/keymaps/mauin/keymap.c (100%) rename keyboards/{gonnerd => gon/nerd60}/keymaps/mauin/readme.md (100%) rename keyboards/{gonnerd/keymaps/default => gon/nerd60/keymaps/mauin}/rules.mk (55%) create mode 100644 keyboards/gon/nerd60/nerd60.c create mode 100644 keyboards/gon/nerd60/nerd60.h create mode 100644 keyboards/gon/nerd60/readme.md rename keyboards/{gonnerd => gon/nerd60}/rules.mk (62%) rename keyboards/{gonnerd => gon/nerdtkl}/config.h (83%) create mode 100644 keyboards/gon/nerdtkl/info.json create mode 100644 keyboards/gon/nerdtkl/keymaps/default/keymap.c create mode 100644 keyboards/gon/nerdtkl/keymaps/default/readme.md rename keyboards/{gonnerd => gon/nerdtkl}/keymaps/gam3cat/config.h (100%) rename keyboards/{gonnerd => gon/nerdtkl}/keymaps/gam3cat/keymap.c (100%) rename keyboards/{gonnerd => gon/nerdtkl}/keymaps/gam3cat/readme.md (100%) create mode 100644 keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk create mode 100644 keyboards/gon/nerdtkl/nerdtkl.c create mode 100644 keyboards/gon/nerdtkl/nerdtkl.h rename keyboards/{gonnerd => gon/nerdtkl}/readme.md (69%) create mode 100644 keyboards/gon/nerdtkl/rules.mk create mode 100644 keyboards/gon/readme.md delete mode 100644 keyboards/gonnerd/gonnerd.c delete mode 100644 keyboards/gonnerd/gonnerd.h delete mode 100644 keyboards/gonnerd/info.json delete mode 100644 keyboards/gonnerd/keymaps/default/keymap.c delete mode 100644 keyboards/gonnerd/keymaps/gam3cat/rules.mk delete mode 100644 keyboards/gonnerd/keymaps/mauin/rules.mk delete mode 100644 keyboards/gonnerd/keymaps/tkl/keymap.c delete mode 100644 keyboards/gonnerd/keymaps/tkl/rules.mk delete mode 100644 keyboards/matrix/noah/ws2812_f4.c delete mode 100644 keyboards/matrix/noah/ws2812_f4.h mode change 100755 => 100644 keyboards/nk65/chconf.h mode change 100755 => 100644 keyboards/nk65/halconf.h mode change 100755 => 100644 keyboards/nk65/mcuconf.h create mode 100644 quantum/process_keycode/process_backlight.c create mode 100644 quantum/process_keycode/process_backlight.h create mode 100755 util/chibios-upgrader.sh diff --git a/.gitignore b/.gitignore index c2738311bdf7..0e80cdb6c4bf 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,6 @@ id_rsa_* # python things __pycache__ + +# prerequisites for updating ChibiOS +/util/fmpp* diff --git a/.gitmodules b/.gitmodules index f2e96bedc851..930fa0e75b24 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,7 +4,6 @@ [submodule "lib/chibios-contrib"] path = lib/chibios-contrib url = https://github.com/qmk/ChibiOS-Contrib - branch = k-type-fix [submodule "lib/ugfx"] path = lib/ugfx url = https://github.com/qmk/uGFX diff --git a/.vscode/settings.json b/.vscode/settings.json index e5089a55badd..0caee2241dc2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,7 +5,8 @@ // Configure glob patterns for excluding files and folders. "files.exclude": { "**/.build": true, - "**/*.hex": true + "**/*.hex": true, + "**/*.bin": true }, "files.associations": { "*.h": "c", diff --git a/Makefile b/Makefile index 8f02eea04969..9478c14f8c2a 100644 --- a/Makefile +++ b/Makefile @@ -623,13 +623,19 @@ endif # Generate the version.h file ifndef SKIP_GIT GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") + CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") + CHIBIOS_CONTRIB_VERSION := $(shell cd lib/chibios-contrib && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") else GIT_VERSION := NA + CHIBIOS_VERSION := NA + CHIBIOS_CONTRIB_VERSION := NA endif ifndef SKIP_VERSION BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) +$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h) +$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h) else BUILD_DATE := NA endif diff --git a/common_features.mk b/common_features.mk index 425d5b47326c..f7e4c3286d7c 100644 --- a/common_features.mk +++ b/common_features.mk @@ -298,6 +298,7 @@ VALID_BACKLIGHT_TYPES := pwm software custom BACKLIGHT_ENABLE ?= no BACKLIGHT_DRIVER ?= pwm ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),) $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) endif diff --git a/docs/ChangeLog/20200229.md b/docs/ChangeLog/20200229.md new file mode 100644 index 000000000000..398fe01c0d04 --- /dev/null +++ b/docs/ChangeLog/20200229.md @@ -0,0 +1,75 @@ +# QMK Breaking Change - 2020 Feb 29 Changelog + +Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps. + + +## Update ChibiOS/ChibiOS-Contrib/uGFX submodules + +* General Notes + * A `make git-submodule` may be required after pulling the latest QMK firmware code to update affected submodules to the upgraded revisions + * Enabling link-time-optimization (`LINK_TIME_OPTIMIZATION_ENABLE = yes`) should work on a lot more boards +* Upgrade to ChibiOS ver19.1.3 + * This will allow QMK to update to upstream ChibiOS a lot easier -- the old version was ~2 years out of date. Automated update scripts have been made available to simplify future upgrades. + * Includes improved MCU support and bugfixes + * ChibiOS revision is now included in Command output + * Timers should now be more accurate +* Upgrade to newer ChibiOS-Contrib + * Also includes improved MCU support and bugfixes + * ChibiOS-Contrib revision is now included in Command output +* Upgrade to newer uGFX + * Required in order to support updated ChibiOS + + +## Fix ChibiOS timer overflow for 16-bit SysTick devices + +* On 16-bit SysTick devices, the timer subsystem in QMK was incorrectly dealing with overflow. + * When running at a 100000 SysTick frequency (possible on 16-bit devices, but uncommon), this overflow would occur after 0.65 seconds. +* Timers are now correctly handling this overflow case and timing should now be correct on ChibiOS/ARM. + + +## Update LUFA submodule + +* Updates the LUFA submodule to include updates from upstream (abcminiuser/lufa) +* Includes some cleanup for QMK DFU generation + + +## Encoder flip + +* Flips the encoder direction so that `clockwise == true` is for actually turning the knob clockwise +* Adds `ENCODER_DIRECTION_FLIP` define, so that reversing the expected dirction is simple for users. +* Cleans up documentation page for encoders + + +## Adding support for `BACKLIGHT_ON_STATE` for hardware PWM backlight + +* Previously, the define only affected software PWM, and hardware PWM always assumed an N-channel MOSFET. +* The hardware PWM backlight setup has been updated to respect this option. +* The default "on" state has been changed to `1` - **this impacts all keyboards using software PWM backlight that do not define it explicitly**. If your keyboard's backlight is acting strange, it may have a P-channel MOSFET, and will need to have `#define BACKLIGHT_ON_STATE 0` added to the keyboard-level `config.h`. Please see the PR for more detailed information. + + +## Migrating `ACTION_LAYER_TAP_KEY()` entries in `fn_actions` to `LT()` keycodes + +* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()` +* The end result of removing this obsolete feature should result in a decent reduction in firmware size and code complexity +* All keymaps affected are recommended to switch away from `fn_actions` in favour of the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features + + +## Moving backlight keycode handling to `process_keycode/` + +* This refactors the backlight keycode logic to be clearer and more modular. +* All backlight-related keycodes are now actioned in a single file. +* The `ACTION_BACKLIGHT_*` macros have also been deleted. If you are still using these in a `fn_actions[]` block, please switch to using the backlight keycodes or functions directly. + + +## Refactor Planck keymaps to use Layout Macros + +* Refactor Planck keymaps to use layout macros instead of raw matrix assignments +* Makes keymaps revision-agnostic +* Should reduce noise and errors in Travis CI logs + + +## GON NerD codebase refactor + +* Splits the codebase for GON NerD 60 and NerdD TKL PCBs into two separate directories. +* If your keymap is for a NerD 60 PCB, your `make` command is now `make gon/nerd60:`. +* If your keymap is for a NerD TKL PCB, your `make` command is now `make gon/nerdtkl:`. diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index e74aab1e378d..7c68d74e1cf9 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -119,10 +119,22 @@ When both timers are in use for Audio, the backlight PWM will not use a hardware To change the behavior of the backlighting, `#define` these in your `config.h`: -|Define |Default |Description | -|---------------------|-------------|--------------------------------------------------------------------------------------------------------------| -|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this | -|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | +|Define |Default |Description | +|---------------------|-------------|-------------------------------------------------------------------------------------------------------------| +|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | +|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) | +|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | +|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | +|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | +|`BACKLIGHT_ON_STATE` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | + +### Backlight On State + +Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*. +Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead. + +This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define. ### Multiple backlight pins diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index cbf72914e928..4a0ae60c314c 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -2,23 +2,35 @@ Basic encoders are supported by adding this to your `rules.mk`: - ENCODER_ENABLE = yes +```make +ENCODER_ENABLE = yes +``` and this to your `config.h`: - #define ENCODERS_PAD_A { B12 } - #define ENCODERS_PAD_B { B13 } +```c +#define ENCODERS_PAD_A { B12 } +#define ENCODERS_PAD_B { B13 } +``` Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.: - #define ENCODERS_PAD_A { encoder1a, encoder2a } - #define ENCODERS_PAD_B { encoder1b, encoder2b } +```c +#define ENCODERS_PAD_A { encoder1a, encoder2a } +#define ENCODERS_PAD_B { encoder1b, encoder2b } +``` + +If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. They can also be flipped with a define: -If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. +```c +#define ENCODER_DIRECTION_FLIP +``` Additionally, the resolution can be specified in the same file (the default & suggested is 4): - #define ENCODER_RESOLUTION 4 +```c +#define ENCODER_RESOLUTION 4 +``` ## Split Keyboards @@ -33,27 +45,31 @@ If you are using different pinouts for the encoders on each half of a split keyb The callback functions can be inserted into your `.c`: - void encoder_update_kb(uint8_t index, bool clockwise) { - encoder_update_user(index, clockwise); - } +```c +void encoder_update_kb(uint8_t index, bool clockwise) { + encoder_update_user(index, clockwise); +} +``` or `keymap.c`: - void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { /* First encoder */ +```c +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ if (clockwise) { - tap_code(KC_PGDN); + tap_code(KC_PGDN); } else { - tap_code(KC_PGUP); + tap_code(KC_PGUP); } - } else if (index == 1) { /* Second encoder */ + } else if (index == 1) { /* Second encoder */ if (clockwise) { - tap_code(KC_UP); + tap_code(KC_DOWN); } else { - tap_code(KC_DOWN); + tap_code(KC_UP); } - } } +} +``` ## Hardware diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index 21aefd497ccf..ede915fa4ab4 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -79,14 +79,14 @@ i2c_status_t i2c_start(uint8_t address) { i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { i2c_address = address; 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, (i2c_address >> 1), data, length, 0, 0, TIME_MS2I(timeout)); 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; i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); + msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, TIME_MS2I(timeout)); return chibios_to_qmk(&status); } @@ -100,14 +100,14 @@ 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, (i2c_address >> 1), complete_packet, length + 1, 0, 0, TIME_MS2I(timeout)); 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; 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, (i2c_address >> 1), ®addr, 1, data, length, TIME_MS2I(timeout)); return chibios_to_qmk(&status); } diff --git a/drivers/arm/ws2812_spi.c b/drivers/arm/ws2812_spi.c index 0e954ec5069c..36e08e39ed37 100644 --- a/drivers/arm/ws2812_spi.c +++ b/drivers/arm/ws2812_spi.c @@ -60,7 +60,7 @@ void ws2812_init(void) { // TODO: more dynamic baudrate static const SPIConfig spicfg = { - NULL, PAL_PORT(RGB_DI_PIN), PAL_PAD(RGB_DI_PIN), + 0, NULL, PAL_PORT(RGB_DI_PIN), PAL_PAD(RGB_DI_PIN), SPI_CR1_BR_1 | SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us (2.25 MHz) }; diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.c b/drivers/boards/GENERIC_STM32_F072XB/board.c index dcbb94310f24..c91136e8f664 100644 --- a/drivers/boards/GENERIC_STM32_F072XB/board.c +++ b/drivers/boards/GENERIC_STM32_F072XB/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,56 +20,209 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; -#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. + * @brief Type of STM32 GPIO initialization data. */ -const PALConfig pal_default_config = { -# if STM32_HAS_GPIOA +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; + +/** + * @brief STM32 GPIO static initialization data. + */ +static const gpio_config_t gpio_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 +#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 +#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 +#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 +#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 +#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 +#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 +#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 +#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_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} +#endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); +#endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); #endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ __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. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { enter_bootloader_mode_if_requested(); + + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.h b/drivers/boards/GENERIC_STM32_F072XB/board.h index c625a4330adb..87570e62d2ab 100644 --- a/drivers/boards/GENERIC_STM32_F072XB/board.h +++ b/drivers/boards/GENERIC_STM32_F072XB/board.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for Generic STM32_F072 Board */ @@ -167,11 +171,9 @@ #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) @@ -179,10 +181,25 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ + /* * I/O ports initial setup, this configuration is established soon after reset * in the initialization code. @@ -373,6 +390,10 @@ #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)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ + #if !defined(_FROM_ASM_) # ifdef __cplusplus extern "C" { diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.mk b/drivers/boards/GENERIC_STM32_F072XB/board.mk index c136f705a636..bd6f878269bc 100644 --- a/drivers/boards/GENERIC_STM32_F072XB/board.mk +++ b/drivers/boards/GENERIC_STM32_F072XB/board.mk @@ -3,3 +3,7 @@ BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB/board.c # Required include directories BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg index 9c7cf4fd76a3..e6ceecb62e89 100644 --- a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg +++ b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg @@ -6,7 +6,7 @@ resources/gencfg/processors/boards/stm32f0xx/templates .. - 3.0.x + 5.0.x ST STM32F072B-Discovery ST_STM32F072B_DISCOVERY diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp new file mode 100644 index 000000000000..55cd396e41cf --- /dev/null +++ b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp @@ -0,0 +1,15 @@ +sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f0xx/templates +outputRoot: .. +dataRoot: . + +freemarkerLinks: { + lib: ../../../../../tools/ftl/libs +} + +data : { + doc1:xml ( + board.chcfg + { + } + ) +} diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.c b/drivers/boards/GENERIC_STM32_F303XC/board.c index 60c191d9b1d2..9b0fc1b6b958 100644 --- a/drivers/boards/GENERIC_STM32_F303XC/board.c +++ b/drivers/boards/GENERIC_STM32_F303XC/board.c @@ -14,44 +14,172 @@ limitations under the License. */ +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { -# if STM32_HAS_GPIOA +static const gpio_config_t gpio_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 +#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 +#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 +#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 +#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 +#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 +#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 +#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 +#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_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} +#endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); #endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); +#endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} void enter_bootloader_mode_if_requested(void); @@ -62,6 +190,8 @@ void enter_bootloader_mode_if_requested(void); */ void __early_init(void) { enter_bootloader_mode_if_requested(); + + stm32_gpio_init(); stm32_clock_init(); } diff --git a/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h b/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h index 1b9fadba16ac..403c6b0409cf 100644 --- a/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h +++ b/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h @@ -24,10 +24,10 @@ along with this program. If not, see . /* Driver hardware support. */ /*===========================================================================*/ -# define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing -# define GDISP_HARDWARE_DRAWPIXEL TRUE -# define GDISP_HARDWARE_PIXELREAD TRUE -# define GDISP_HARDWARE_CONTROL TRUE +# define GDISP_HARDWARE_FLUSH GFXON // This controller requires flushing +# define GDISP_HARDWARE_DRAWPIXEL GFXON +# define GDISP_HARDWARE_PIXELREAD GFXON +# define GDISP_HARDWARE_CONTROL GFXON # define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_GRAY256 diff --git a/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h b/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h index 9ab5daac1c2c..6052058ec233 100644 --- a/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h +++ b/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h @@ -14,11 +14,11 @@ /* Driver hardware support. */ /*===========================================================================*/ -# define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing -# define GDISP_HARDWARE_DRAWPIXEL TRUE -# define GDISP_HARDWARE_PIXELREAD TRUE -# define GDISP_HARDWARE_CONTROL TRUE -# define GDISP_HARDWARE_BITFILLS TRUE +# define GDISP_HARDWARE_FLUSH GFXON // This controller requires flushing +# define GDISP_HARDWARE_DRAWPIXEL GFXON +# define GDISP_HARDWARE_PIXELREAD GFXON +# define GDISP_HARDWARE_CONTROL GFXON +# define GDISP_HARDWARE_BITFILLS GFXON # define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO diff --git a/keyboards/acheron/austin/chconf.h b/keyboards/acheron/austin/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/acheron/austin/chconf.h +++ b/keyboards/acheron/austin/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/acheron/austin/halconf.h b/keyboards/acheron/austin/halconf.h index 38743e0904fd..adb1a907154b 100644 --- a/keyboards/acheron/austin/halconf.h +++ b/keyboards/acheron/austin/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c index 360424f300d7..a35337a4e21a 100755 --- a/keyboards/amj40/keymaps/fabian/keymap.c +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, F(0), RAISE, KC_RGUI, KC_RALT, KC_RCTL \ + KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), RAISE, KC_RGUI, KC_RALT, KC_RCTL \ ), /* Colemak @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ - KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, F(0), RAISE, KC_RGUI, KC_RALT, KC_RCTL \ + KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), RAISE, KC_RGUI, KC_RALT, KC_RCTL \ ), /* Dvorak @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ - KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, F(0), RAISE, KC_RGUI, KC_RALT, KC_RCTL \ + KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), RAISE, KC_RGUI, KC_RALT, KC_RCTL \ ), /* Lower @@ -168,10 +168,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: diff --git a/keyboards/amj40/keymaps/myee/keymap.c b/keyboards/amj40/keymaps/myee/keymap.c index 7642ede34da7..ec8cdd87dbcf 100644 --- a/keyboards/amj40/keymaps/myee/keymap.c +++ b/keyboards/amj40/keymaps/myee/keymap.c @@ -13,7 +13,9 @@ #define _RAISE 2 #define _ADJUST 3 - +#define LOW_SPC LT(_LOWER, KC_SPC) +#define RSE_SPC LT(_RAISE, KC_SPC) +#define ADJ_TAB LT(ADJUST, KC_TAB) enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -26,9 +28,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = 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,\ - F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, \ + ADJ_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, F(0), F(1), KC_RGUI,KC_RALT, KC_RCTL \ + KC_LCTL, KC_LGUI,KC_LALT, LOW_SPC, RSE_SPC, KC_RGUI,KC_RALT, KC_RCTL \ ), [_LOWER] = LAYOUT( \ @@ -54,25 +56,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -enum function_id { - LAUNCH, - RGBLED_TOGGLE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), - [2] = ACTION_LAYER_TAP_KEY(_ADJUST,KC_TAB), - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - - return MACRO_NONE; -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { diff --git a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c index 9d10fbd754da..7c09bd997cb1 100644 --- a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/at_at/660m/chconf.h b/keyboards/at_at/660m/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/at_at/660m/chconf.h +++ b/keyboards/at_at/660m/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/at_at/660m/halconf.h b/keyboards/at_at/660m/halconf.h index 38743e0904fd..adb1a907154b 100644 --- a/keyboards/at_at/660m/halconf.h +++ b/keyboards/at_at/660m/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c index d9a81b195af0..20ce6bd15f51 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c +++ b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c @@ -21,11 +21,7 @@ enum custom_macros { R_POINT }; - const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, - }; - -#define SPC_LW FUNC(0) +#define SPC_LW LT(_LOWER, KC_SPC) #define MSE MO(_MOUSE) #define PIPE M(R_PIPE) #define POINT M(R_POINT) diff --git a/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c index 7e9f90853e3e..7c09bd997cb1 100644 --- a/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; -#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. + * @brief Type of STM32 GPIO initialization data. */ -const PALConfig pal_default_config = { +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; + +/** + * @brief STM32 GPIO static initialization data. + */ +static const gpio_config_t gpio_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}, @@ -62,24 +124,117 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); +#endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); #endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** @@ -108,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/candybar/chconf.h b/keyboards/candybar/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/candybar/chconf.h +++ b/keyboards/candybar/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/candybar/halconf.h b/keyboards/candybar/halconf.h index 8b9724b1a30e..16f32117d51b 100644 --- a/keyboards/candybar/halconf.h +++ b/keyboards/candybar/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c index 9d10fbd754da..7c09bd997cb1 100644 --- a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/cannonkeys/an_c/chconf.h b/keyboards/cannonkeys/an_c/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/cannonkeys/an_c/chconf.h +++ b/keyboards/cannonkeys/an_c/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/an_c/halconf.h b/keyboards/cannonkeys/an_c/halconf.h index 38743e0904fd..adb1a907154b 100644 --- a/keyboards/cannonkeys/an_c/halconf.h +++ b/keyboards/cannonkeys/an_c/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/bluepill/ws2812.c b/keyboards/cannonkeys/bluepill/ws2812.c index 7d0f909c0c72..d30806d564a6 100644 --- a/keyboards/cannonkeys/bluepill/ws2812.c +++ b/keyboards/cannonkeys/bluepill/ws2812.c @@ -45,6 +45,7 @@ static THD_FUNCTION(ledsThread, arg) { } static const SPIConfig spicfg = { + false, NULL, PORT_WS2812, PIN_WS2812, diff --git a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c index 9d10fbd754da..7c09bd997cb1 100644 --- a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/cannonkeys/chimera65/chconf.h b/keyboards/cannonkeys/chimera65/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/cannonkeys/chimera65/chconf.h +++ b/keyboards/cannonkeys/chimera65/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/chimera65/halconf.h b/keyboards/cannonkeys/chimera65/halconf.h index 64cf68298bc9..a406166756c5 100644 --- a/keyboards/cannonkeys/chimera65/halconf.h +++ b/keyboards/cannonkeys/chimera65/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c index 9d10fbd754da..7c09bd997cb1 100644 --- a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/cannonkeys/instant60/chconf.h b/keyboards/cannonkeys/instant60/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/cannonkeys/instant60/chconf.h +++ b/keyboards/cannonkeys/instant60/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/instant60/halconf.h b/keyboards/cannonkeys/instant60/halconf.h index 38743e0904fd..adb1a907154b 100644 --- a/keyboards/cannonkeys/instant60/halconf.h +++ b/keyboards/cannonkeys/instant60/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c index 9d10fbd754da..7c09bd997cb1 100644 --- a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/cannonkeys/iron165/chconf.h b/keyboards/cannonkeys/iron165/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/cannonkeys/iron165/chconf.h +++ b/keyboards/cannonkeys/iron165/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/iron165/halconf.h b/keyboards/cannonkeys/iron165/halconf.h index acd7678e7b5e..ff5ae7e8a5f6 100644 --- a/keyboards/cannonkeys/iron165/halconf.h +++ b/keyboards/cannonkeys/iron165/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/ortho48/chconf.h b/keyboards/cannonkeys/ortho48/chconf.h index 9299be587ec6..f5e471640c56 100644 --- a/keyboards/cannonkeys/ortho48/chconf.h +++ b/keyboards/cannonkeys/ortho48/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/ortho48/halconf.h b/keyboards/cannonkeys/ortho48/halconf.h index 72879a575b9c..921803762eaf 100644 --- a/keyboards/cannonkeys/ortho48/halconf.h +++ b/keyboards/cannonkeys/ortho48/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/ortho60/chconf.h b/keyboards/cannonkeys/ortho60/chconf.h index 9299be587ec6..f5e471640c56 100644 --- a/keyboards/cannonkeys/ortho60/chconf.h +++ b/keyboards/cannonkeys/ortho60/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/ortho60/halconf.h b/keyboards/cannonkeys/ortho60/halconf.h index 72879a575b9c..921803762eaf 100644 --- a/keyboards/cannonkeys/ortho60/halconf.h +++ b/keyboards/cannonkeys/ortho60/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/ortho75/chconf.h b/keyboards/cannonkeys/ortho75/chconf.h index 9299be587ec6..f5e471640c56 100644 --- a/keyboards/cannonkeys/ortho75/chconf.h +++ b/keyboards/cannonkeys/ortho75/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/ortho75/halconf.h b/keyboards/cannonkeys/ortho75/halconf.h index 72879a575b9c..921803762eaf 100644 --- a/keyboards/cannonkeys/ortho75/halconf.h +++ b/keyboards/cannonkeys/ortho75/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/practice60/chconf.h b/keyboards/cannonkeys/practice60/chconf.h index 9299be587ec6..f5e471640c56 100644 --- a/keyboards/cannonkeys/practice60/chconf.h +++ b/keyboards/cannonkeys/practice60/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/practice60/halconf.h b/keyboards/cannonkeys/practice60/halconf.h index 72879a575b9c..921803762eaf 100644 --- a/keyboards/cannonkeys/practice60/halconf.h +++ b/keyboards/cannonkeys/practice60/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/practice65/chconf.h b/keyboards/cannonkeys/practice65/chconf.h index 9299be587ec6..f5e471640c56 100644 --- a/keyboards/cannonkeys/practice65/chconf.h +++ b/keyboards/cannonkeys/practice65/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/practice65/halconf.h b/keyboards/cannonkeys/practice65/halconf.h index 72879a575b9c..921803762eaf 100644 --- a/keyboards/cannonkeys/practice65/halconf.h +++ b/keyboards/cannonkeys/practice65/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c index d9f7bc329e6d..7c09bd997cb1 100644 --- a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/cannonkeys/satisfaction75/chconf.h b/keyboards/cannonkeys/satisfaction75/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/cannonkeys/satisfaction75/chconf.h +++ b/keyboards/cannonkeys/satisfaction75/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/satisfaction75/halconf.h b/keyboards/cannonkeys/satisfaction75/halconf.h index 9a9ab838e64e..7347a42536a9 100644 --- a/keyboards/cannonkeys/satisfaction75/halconf.h +++ b/keyboards/cannonkeys/satisfaction75/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC TRUE +#define HAL_USE_RTC TRUE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c index 0e3adbbf16f7..d87f7668d55e 100644 --- a/keyboards/cannonkeys/satisfaction75/i2c_master.c +++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c @@ -81,7 +81,7 @@ i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); i2cAcquireBus(&I2C_DRIVER); - msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, TIME_MS2I(timeout)); i2cReleaseBus(&I2C_DRIVER); return chibios_to_qmk(status); } @@ -90,7 +90,7 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16 { i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); - msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); + msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, TIME_MS2I(timeout)); return chibios_to_qmk(status); } @@ -106,7 +106,7 @@ 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, (i2c_address >> 1), complete_packet, length + 1, 0, 0, TIME_MS2I(timeout)); return chibios_to_qmk(status); } @@ -114,7 +114,7 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16 { i2c_address = devaddr; 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, (i2c_address >> 1), ®addr, 1, data, length, TIME_MS2I(timeout)); return chibios_to_qmk(status); } diff --git a/keyboards/cannonkeys/satisfaction75/mcuconf.h b/keyboards/cannonkeys/satisfaction75/mcuconf.h index 6d8985796286..b39e33513453 100644 --- a/keyboards/cannonkeys/satisfaction75/mcuconf.h +++ b/keyboards/cannonkeys/satisfaction75/mcuconf.h @@ -37,140 +37,141 @@ /* * 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 TRUE -#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_LSE +#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 TRUE +#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_LSE /* - * ADC driver system settings. + * IRQ 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 +#define STM32_IRQ_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI16_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI17_20_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI21_22_IRQ_PRIORITY 3 /* - * EXT driver system settings. + * ADC 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 +#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 /* * 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 +#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") +#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 +#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 +#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 +#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") +#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 +#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") +#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 +#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/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c index 9d10fbd754da..7c09bd997cb1 100644 --- a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/cannonkeys/savage65/chconf.h b/keyboards/cannonkeys/savage65/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/cannonkeys/savage65/chconf.h +++ b/keyboards/cannonkeys/savage65/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/savage65/halconf.h b/keyboards/cannonkeys/savage65/halconf.h index 9bcb477c03c0..921803762eaf 100644 --- a/keyboards/cannonkeys/savage65/halconf.h +++ b/keyboards/cannonkeys/savage65/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cannonkeys/stm32f072/ws2812.c b/keyboards/cannonkeys/stm32f072/ws2812.c index 665763931e31..b2f2384f2ce7 100644 --- a/keyboards/cannonkeys/stm32f072/ws2812.c +++ b/keyboards/cannonkeys/stm32f072/ws2812.c @@ -61,6 +61,7 @@ static THD_FUNCTION(hsv_transThread, arg) { #endif static const SPIConfig spicfg = { + false, NULL, GPIOB, 15, diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c index 9d10fbd754da..7c09bd997cb1 100644 --- a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/cannonkeys/tmov2/chconf.h b/keyboards/cannonkeys/tmov2/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/cannonkeys/tmov2/chconf.h +++ b/keyboards/cannonkeys/tmov2/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cannonkeys/tmov2/halconf.h b/keyboards/cannonkeys/tmov2/halconf.h index 38743e0904fd..adb1a907154b 100644 --- a/keyboards/cannonkeys/tmov2/halconf.h +++ b/keyboards/cannonkeys/tmov2/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/cheshire/curiosity/chconf.h b/keyboards/cheshire/curiosity/chconf.h index 99fa8ce39822..8d66b51d2350 100644 --- a/keyboards/cheshire/curiosity/chconf.h +++ b/keyboards/cheshire/curiosity/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,11 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #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 +#endif /** @} */ @@ -126,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -144,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -152,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -161,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -169,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -180,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -188,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -198,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -208,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -218,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -226,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -236,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -245,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -256,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -266,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -275,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -287,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -296,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -307,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -323,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -332,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -341,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -351,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -359,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -378,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -388,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -399,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -410,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -419,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/cheshire/curiosity/halconf.h b/keyboards/cheshire/curiosity/halconf.h index 8b9724b1a30e..16f32117d51b 100644 --- a/keyboards/cheshire/curiosity/halconf.h +++ b/keyboards/cheshire/curiosity/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/clueboard/60/chconf.h b/keyboards/clueboard/60/chconf.h index 1d9f12ff1f8b..aac33037058e 100644 --- a/keyboards/clueboard/60/chconf.h +++ b/keyboards/clueboard/60/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/clueboard/60/halconf.h b/keyboards/clueboard/60/halconf.h index e617fdffc790..6517357194ca 100644 --- a/keyboards/clueboard/60/halconf.h +++ b/keyboards/clueboard/60/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/clueboard/60/mcuconf.h b/keyboards/clueboard/60/mcuconf.h index 94cb540ec9f8..5127682f52ff 100644 --- a/keyboards/clueboard/60/mcuconf.h +++ b/keyboards/clueboard/60/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/clueboard/66/rev4/chconf.h b/keyboards/clueboard/66/rev4/chconf.h index 1d9f12ff1f8b..aac33037058e 100644 --- a/keyboards/clueboard/66/rev4/chconf.h +++ b/keyboards/clueboard/66/rev4/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/clueboard/66/rev4/halconf.h b/keyboards/clueboard/66/rev4/halconf.h index e617fdffc790..6517357194ca 100644 --- a/keyboards/clueboard/66/rev4/halconf.h +++ b/keyboards/clueboard/66/rev4/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/clueboard/66/rev4/mcuconf.h b/keyboards/clueboard/66/rev4/mcuconf.h index 94cb540ec9f8..5127682f52ff 100644 --- a/keyboards/clueboard/66/rev4/mcuconf.h +++ b/keyboards/clueboard/66/rev4/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/clueboard/66_hotswap/gen1/chconf.h b/keyboards/clueboard/66_hotswap/gen1/chconf.h index 1d9f12ff1f8b..aac33037058e 100644 --- a/keyboards/clueboard/66_hotswap/gen1/chconf.h +++ b/keyboards/clueboard/66_hotswap/gen1/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/clueboard/66_hotswap/gen1/halconf.h b/keyboards/clueboard/66_hotswap/gen1/halconf.h index eda293c49b8b..0cb7998f5ed6 100644 --- a/keyboards/clueboard/66_hotswap/gen1/halconf.h +++ b/keyboards/clueboard/66_hotswap/gen1/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/clueboard/66_hotswap/gen1/mcuconf.h b/keyboards/clueboard/66_hotswap/gen1/mcuconf.h index 226da48d5936..2098fd2320c8 100644 --- a/keyboards/clueboard/66_hotswap/gen1/mcuconf.h +++ b/keyboards/clueboard/66_hotswap/gen1/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/converter/siemens_tastatur/chconf.h b/keyboards/converter/siemens_tastatur/chconf.h index 9299be587ec6..f5e471640c56 100644 --- a/keyboards/converter/siemens_tastatur/chconf.h +++ b/keyboards/converter/siemens_tastatur/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/converter/siemens_tastatur/halconf.h b/keyboards/converter/siemens_tastatur/halconf.h index 4ffc50fb1181..f486da5bf280 100644 --- a/keyboards/converter/siemens_tastatur/halconf.h +++ b/keyboards/converter/siemens_tastatur/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT TRUE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS TRUE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/converter/siemens_tastatur/matrix.c b/keyboards/converter/siemens_tastatur/matrix.c index b7654e6e12f1..9fcfe9fdf458 100644 --- a/keyboards/converter/siemens_tastatur/matrix.c +++ b/keyboards/converter/siemens_tastatur/matrix.c @@ -33,58 +33,53 @@ volatile uint16_t portb_buffer = 0; static uint32_t switch_buffer = 0; +static void pal_cb(void* unused); + +static void enable_input_events(void) +{ + palDisablePadEventI(GPIOA, 0); + palDisablePadEventI(GPIOA, 1); + palDisablePadEventI(GPIOA, 2); + palDisablePadEventI(GPIOA, 9); + palDisablePadEventI(GPIOA, 10); + palDisablePadEventI(GPIOB, 12); + palDisablePadEventI(GPIOB, 13); + palDisablePadEventI(GPIOB, 14); + palDisablePadEventI(GPIOB, 15); + + palEnablePadEventI(GPIOA, 0, PAL_EVENT_MODE_FALLING_EDGE); + palEnablePadEventI(GPIOA, 1, PAL_EVENT_MODE_FALLING_EDGE); + palEnablePadEventI(GPIOA, 2, PAL_EVENT_MODE_FALLING_EDGE); + palEnablePadEventI(GPIOA, 9, PAL_EVENT_MODE_FALLING_EDGE); + palEnablePadEventI(GPIOA, 10, PAL_EVENT_MODE_FALLING_EDGE); + palEnablePadEventI(GPIOB, 12, PAL_EVENT_MODE_FALLING_EDGE); + palEnablePadEventI(GPIOB, 13, PAL_EVENT_MODE_FALLING_EDGE); + palEnablePadEventI(GPIOB, 14, PAL_EVENT_MODE_FALLING_EDGE); + palEnablePadEventI(GPIOB, 15, PAL_EVENT_MODE_FALLING_EDGE); + + palSetPadCallbackI(GPIOA, 0, &pal_cb, 0); + palSetPadCallbackI(GPIOA, 1, &pal_cb, 0); + palSetPadCallbackI(GPIOA, 2, &pal_cb, 0); + palSetPadCallbackI(GPIOA, 9, &pal_cb, 0); + palSetPadCallbackI(GPIOA, 10, &pal_cb, 0); + palSetPadCallbackI(GPIOB, 12, &pal_cb, 0); + palSetPadCallbackI(GPIOB, 13, &pal_cb, 0); + palSetPadCallbackI(GPIOB, 14, &pal_cb, 0); + palSetPadCallbackI(GPIOB, 15, &pal_cb, 0); +} + // Trigger on negative edge of any of the sense lines. -static void extcb1(EXTDriver *extp, expchannel_t channel) { +static void pal_cb(void* unused) { - (void)extp; - (void)channel; + (void)unused; chSysLockFromISR(); porta_buffer = palReadPort(GPIOA); portb_buffer = palReadPort(GPIOB); //Disable further interrupts that might occur on same button press. - extChannelDisable(&EXTD1,0); - extChannelDisable(&EXTD1,1); - extChannelDisable(&EXTD1,2); - extChannelDisable(&EXTD1,9); - extChannelDisable(&EXTD1,10); - extChannelDisable(&EXTD1,12); - extChannelDisable(&EXTD1,13); - extChannelDisable(&EXTD1,14); - extChannelDisable(&EXTD1,15); - - extChannelEnable(&EXTD1,0); - extChannelEnable(&EXTD1,1); - extChannelEnable(&EXTD1,2); - extChannelEnable(&EXTD1,9); - extChannelEnable(&EXTD1,10); - extChannelEnable(&EXTD1,12); - extChannelEnable(&EXTD1,13); - extChannelEnable(&EXTD1,14); - extChannelEnable(&EXTD1,15); + enable_input_events(); chSysUnlockFromISR(); } -static const EXTConfig extcfg = { - { - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //0 - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //1 - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //2 - {EXT_CH_MODE_DISABLED, NULL}, - {EXT_CH_MODE_DISABLED, NULL}, - {EXT_CH_MODE_DISABLED, NULL}, - {EXT_CH_MODE_DISABLED, NULL}, - {EXT_CH_MODE_DISABLED, NULL}, - {EXT_CH_MODE_DISABLED, NULL}, - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //9 - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //10 - {EXT_CH_MODE_DISABLED, NULL}, - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //12 - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //13 - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //14 - {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 } //15 - }, -}; - void matrix_init(void) { //Set I/O as pull-up inputs to read states setPinInputHigh(A0); @@ -115,8 +110,10 @@ void matrix_init(void) { memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); matrix_init_quantum(); - //Start interrupt driver - extStart(&EXTD1, &extcfg); + + osalSysLock(); + enable_input_events(); + osalSysUnlock(); } uint8_t matrix_scan(void) { @@ -202,7 +199,7 @@ uint8_t matrix_scan(void) { case 0x18FEB: matrix[3] = 0x10000; break; case 0x3FF69: matrix[3] = 0x20000; break; case 0x3A37B: matrix[3] = 0x40000; break; - default: + default: if ((portb_buffer & 0x1000) == 0) { matrix[1] = 0x4000; break; } if ((portb_buffer & 0x2000) == 0) { matrix[3] = 0x4000; break; } if ((portb_buffer & 0x4000) == 0) { matrix[0] = 0x4000; break; } diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c index 6dfd1ad79e60..7e399081951d 100644 --- a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c @@ -229,6 +229,7 @@ void led_set_user(uint8_t usb_led) { LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT ), +#define KC_LT1 LT(1, KC_SPC) /* * SpaceFN layout @@ -260,7 +261,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, - LCTL,LGUI,LALT,MHEN,HANJ, FN0, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + LCTL,LGUI,LALT,MHEN,HANJ, LT1, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT ), /* 1: SpaceFN @@ -288,7 +289,6 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const action_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde }; diff --git a/keyboards/ergodox_infinity/board_is31fl3731c.h b/keyboards/ergodox_infinity/board_is31fl3731c.h index f248cc25baf6..b2ed2b003103 100644 --- a/keyboards/ergodox_infinity/board_is31fl3731c.h +++ b/keyboards/ergodox_infinity/board_is31fl3731c.h @@ -104,7 +104,7 @@ static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) { static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { (void) g; - i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, US2ST(IS31_TIMEOUT)); + i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, TIME_US2I(IS31_TIMEOUT)); } #endif /* _GDISP_LLD_BOARD_H */ diff --git a/keyboards/ergodox_infinity/chconf.h b/keyboards/ergodox_infinity/chconf.h index d59c35eb68bf..7f767b6ddc78 100644 --- a/keyboards/ergodox_infinity/chconf.h +++ b/keyboards/ergodox_infinity/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -25,10 +25,11 @@ * @{ */ -#ifndef _CHCONF_H_ -#define _CHCONF_H_ +#ifndef CHCONF_H +#define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 20 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,15 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE - -/** - * @brief I/O Queues APIs. - * @details If enabled then the I/O queues APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_QUEUES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -279,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -291,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -300,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -311,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -327,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -336,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -345,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -355,16 +513,28 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. - * @details If enabled then the context switch circular trace buffer is - * activated. + * @details If enabled then the trace buffer is activated. * - * @note The default is @p FALSE. + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ -#define CH_DBG_ENABLE_TRACE FALSE +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -376,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -386,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -397,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -408,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -417,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ @@ -429,10 +621,6 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. - * - * @note It is inserted into lock zone. - * @note It is also invoked when the threads simply return in order to - * terminate. */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -467,6 +655,7 @@ * @note This macro can be used to activate a power saving mode. */ #define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ } /** @@ -476,6 +665,7 @@ * @note This macro can be used to deactivate a power saving mode. */ #define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ } /** @@ -519,6 +709,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* _CHCONF_H_ */ +#endif /* CHCONF_H */ /** @} */ diff --git a/keyboards/ergodox_infinity/halconf.h b/keyboards/ergodox_infinity/halconf.h index ade55ae72d9a..af31e509ae4e 100644 --- a/keyboards/ergodox_infinity/halconf.h +++ b/keyboards/ergodox_infinity/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL TRUE +#define HAL_USE_SERIAL TRUE #endif /** * @brief Enables the SERIAL over USB subsystem. */ #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 128 +#define SERIAL_BUFFERS_SIZE 128 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/ergodox_stm32/chconf.h b/keyboards/ergodox_stm32/chconf.h index 513ae821db07..7f767b6ddc78 100644 --- a/keyboards/ergodox_stm32/chconf.h +++ b/keyboards/ergodox_stm32/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 20 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/ergodox_stm32/halconf.h b/keyboards/ergodox_stm32/halconf.h index b87b0635c476..de0f29ce6ed0 100644 --- a/keyboards/ergodox_stm32/halconf.h +++ b/keyboards/ergodox_stm32/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c index 2f3f10f5c730..d7d8316c66a0 100644 --- a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c +++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT( F(12),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, \ - F(2),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, \ + LT(2, 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_LSFT,KC_NO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_NO,KC_RSFT, \ KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_NO,KC_RALT,MO(2),KC_APP,KC_RCTL), @@ -107,7 +107,6 @@ enum function_id { const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode @@ -120,21 +119,6 @@ const uint16_t PROGMEM fn_actions[] = { [12] = ACTION_FUNCTION(SHIFT_ESC), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - void matrix_scan_user(void) { // Layer LED indicators diff --git a/keyboards/gon/nerd60/config.h b/keyboards/gon/nerd60/config.h new file mode 100644 index 000000000000..090b50cb6ad2 --- /dev/null +++ b/keyboards/gon/nerd60/config.h @@ -0,0 +1,35 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6FD7 +#define DEVICE_VER 0x0001 +#define MANUFACTURER GON +#define PRODUCT NerD 60 +#define DESCRIPTION QMK port for the GON NerD 60 PCB + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* backlight */ +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 + +/* matrix pins */ +#define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 } +#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5 } +#define UNUSED_PINS + +/* COL2ROW or 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/gon/nerd60/info.json b/keyboards/gon/nerd60/info.json new file mode 100644 index 000000000000..85e0fe9d5458 --- /dev/null +++ b/keyboards/gon/nerd60/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "GON NerD 60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60": { + "key_count": 64, + "layout": [ + {"label":"K80", "x":0, "y":0}, + {"label":"K10", "x":1, "y":0}, + {"label":"K01", "x":2, "y":0}, + {"label":"K11", "x":3, "y":0}, + {"label":"K02", "x":4, "y":0}, + {"label":"K12", "x":5, "y":0}, + {"label":"K03", "x":6, "y":0}, + {"label":"K13", "x":7, "y":0}, + {"label":"K04", "x":8, "y":0}, + {"label":"K14", "x":9, "y":0}, + {"label":"K05", "x":10, "y":0}, + {"label":"K15", "x":11, "y":0}, + {"label":"K06", "x":12, "y":0}, + {"label":"K16", "x":13, "y":0, "w":2}, + {"label":"K20", "x":0, "y":1, "w":1.5}, + {"label":"K30", "x":1.5, "y":1}, + {"label":"K21", "x":2.5, "y":1}, + {"label":"K31", "x":3.5, "y":1}, + {"label":"K22", "x":4.5, "y":1}, + {"label":"K32", "x":5.5, "y":1}, + {"label":"K23", "x":6.5, "y":1}, + {"label":"K33", "x":7.5, "y":1}, + {"label":"K24", "x":8.5, "y":1}, + {"label":"K34", "x":9.5, "y":1}, + {"label":"K25", "x":10.5, "y":1}, + {"label":"K35", "x":11.5, "y":1}, + {"label":"K26", "x":12.5, "y":1}, + {"label":"K36", "x":13.5, "y":1, "w":1.5}, + {"label":"K40", "x":0, "y":2, "w":1.75}, + {"label":"K41", "x":1.75, "y":2}, + {"label":"K51", "x":2.75, "y":2}, + {"label":"K42", "x":3.75, "y":2}, + {"label":"K52", "x":4.75, "y":2}, + {"label":"K43", "x":5.75, "y":2}, + {"label":"K53", "x":6.75, "y":2}, + {"label":"K44", "x":7.75, "y":2}, + {"label":"K54", "x":8.75, "y":2}, + {"label":"K45", "x":9.75, "y":2}, + {"label":"K55", "x":10.75, "y":2}, + {"label":"K46", "x":11.75, "y":2}, + {"label":"K17", "x":12.75, "y":2}, + {"label":"K56", "x":13.75, "y":2, "w":1.25}, + {"label":"K70", "x":0, "y":3, "w":1.25}, + {"label":"K97", "x":1.25, "y":3}, + {"label":"K61", "x":2.25, "y":3}, + {"label":"K71", "x":3.25, "y":3}, + {"label":"K62", "x":4.25, "y":3}, + {"label":"K72", "x":5.25, "y":3}, + {"label":"K63", "x":6.25, "y":3}, + {"label":"K73", "x":7.25, "y":3}, + {"label":"K64", "x":8.25, "y":3}, + {"label":"K74", "x":9.25, "y":3}, + {"label":"K65", "x":10.25, "y":3}, + {"label":"K75", "x":11.25, "y":3}, + {"label":"K66", "x":12.25, "y":3, "w":1.75}, + {"label":"K76", "x":14, "y":3}, + {"label":"K60", "x":0, "y":4, "w":1.25}, + {"label":"K50", "x":1.25, "y":4, "w":1.25}, + {"label":"K87", "x":2.5, "y":4, "w":1.25}, + {"label":"K07", "x":3.75, "y":4, "w":6.25}, + {"label":"K27", "x":10, "y":4, "w":1.25}, + {"label":"K37", "x":11.25, "y":4, "w":1.25}, + {"label":"K47", "x":12.5, "y":4, "w":1.25}, + {"label":"K57", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/gon/nerd60/keymaps/default/keymap.c b/keyboards/gon/nerd60/keymaps/default/keymap.c new file mode 100644 index 000000000000..d205e06de1fa --- /dev/null +++ b/keyboards/gon/nerd60/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +// Keymap layers +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60( /* 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_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_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(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60( /* System layer to have access to RESET button */ + 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_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, _______, _______, + _______, _______, KC_APP, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/gon/nerd60/keymaps/default/readme.md b/keyboards/gon/nerd60/keymaps/default/readme.md new file mode 100644 index 000000000000..b7d46191e685 --- /dev/null +++ b/keyboards/gon/nerd60/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for GON NerD 60 + +![keymap](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/gon/nerd60/keymaps/default/keymap.png) diff --git a/keyboards/gonnerd/keymaps/mauin/keymap.c b/keyboards/gon/nerd60/keymaps/mauin/keymap.c similarity index 100% rename from keyboards/gonnerd/keymaps/mauin/keymap.c rename to keyboards/gon/nerd60/keymaps/mauin/keymap.c diff --git a/keyboards/gonnerd/keymaps/mauin/readme.md b/keyboards/gon/nerd60/keymaps/mauin/readme.md similarity index 100% rename from keyboards/gonnerd/keymaps/mauin/readme.md rename to keyboards/gon/nerd60/keymaps/mauin/readme.md diff --git a/keyboards/gonnerd/keymaps/default/rules.mk b/keyboards/gon/nerd60/keymaps/mauin/rules.mk similarity index 55% rename from keyboards/gonnerd/keymaps/default/rules.mk rename to keyboards/gon/nerd60/keymaps/mauin/rules.mk index c1019c7f412c..625fc9c0292e 100644 --- a/keyboards/gonnerd/keymaps/default/rules.mk +++ b/keyboards/gon/nerd60/keymaps/mauin/rules.mk @@ -1,18 +1,20 @@ # 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 = 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 = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 +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 -RGBLIGHT_ENABLE = no # 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 diff --git a/keyboards/gon/nerd60/nerd60.c b/keyboards/gon/nerd60/nerd60.c new file mode 100644 index 000000000000..5022732b8095 --- /dev/null +++ b/keyboards/gon/nerd60/nerd60.c @@ -0,0 +1 @@ +#include "nerd60.h" diff --git a/keyboards/gon/nerd60/nerd60.h b/keyboards/gon/nerd60/nerd60.h new file mode 100644 index 000000000000..3f8f538e2733 --- /dev/null +++ b/keyboards/gon/nerd60/nerd60.h @@ -0,0 +1,22 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_60( \ + K80, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, \ + K40, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K17, K56, \ + K70, K97, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, \ + K60, K50, K87, K07, K27, K37, K47, K57 \ +) { \ + { KC_NO, 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, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, KC_NO }, \ + { K70, K71, K72, K73, K74, K75, K76, KC_NO }, \ + { K80, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K97 } \ +} diff --git a/keyboards/gon/nerd60/readme.md b/keyboards/gon/nerd60/readme.md new file mode 100644 index 000000000000..1b4689ea0330 --- /dev/null +++ b/keyboards/gon/nerd60/readme.md @@ -0,0 +1,27 @@ +# GON NerD 60 + +A Korean Custom 60%. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: GON NerD 60 PCB +* Hardware Availability: [gonskeyboardworks.com](http://www.gonskeyboardworks.com/pcbs-and-controllers/113-nerd-60-ver20-pcb.html) + +Make example for this keyboard (after setting up your build environment): + + make gon/nerd60: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). + +## Changing Bootloader + +It's not possible to simply flash this firmware on the GON NerD keyboard as the original bootloader does not support DFU connections. + +It is possible to change the bootloader of the GON NerD with an ISP programmer. A guide on how to change the bootloader on your GON NerD can be found here: +[Converting NerD60 to TMK](https://deskthority.net/wiki/Converting_NerD60_to_TMK). After changing the bootloader you can flash your QMK keymap onto the keyboard. + +_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will +not work anymore. You will lose your warranty and official support from GON!_ + +## Reset button + +To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins. diff --git a/keyboards/gonnerd/rules.mk b/keyboards/gon/nerd60/rules.mk similarity index 62% rename from keyboards/gonnerd/rules.mk rename to keyboards/gon/nerd60/rules.mk index 798f96f4c486..8446dd39ca94 100644 --- a/keyboards/gonnerd/rules.mk +++ b/keyboards/gon/nerd60/rules.mk @@ -22,12 +22,15 @@ 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 +# 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 controls +# 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 diff --git a/keyboards/gonnerd/config.h b/keyboards/gon/nerdtkl/config.h similarity index 83% rename from keyboards/gonnerd/config.h rename to keyboards/gon/nerdtkl/config.h index 5b22495db72b..48f6c93c9338 100644 --- a/keyboards/gonnerd/config.h +++ b/keyboards/gon/nerdtkl/config.h @@ -1,15 +1,14 @@ -#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 PRODUCT_ID 0x6965 #define DEVICE_VER 0x0001 #define MANUFACTURER GON -#define PRODUCT NerD -#define DESCRIPTION QMK port for the GON Nerd PCB +#define PRODUCT NerD TKL +#define DESCRIPTION QMK port for the GON NerD TKL PCB /* key matrix size */ #define MATRIX_ROWS 10 @@ -34,5 +33,3 @@ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/gon/nerdtkl/info.json b/keyboards/gon/nerdtkl/info.json new file mode 100644 index 000000000000..475632ebf3ff --- /dev/null +++ b/keyboards/gon/nerdtkl/info.json @@ -0,0 +1,104 @@ +{ + "keyboard_name": "GON NerD TKL", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_tkl": { + "key_count": 90, + "layout": [ + {"label":"K80", "x":0, "y":0}, + {"label":"K90", "x":2, "y":0}, + {"label":"K81", "x":3, "y":0}, + {"label":"K91", "x":4, "y":0}, + {"label":"K82", "x":5, "y":0}, + {"label":"K92", "x":6.5, "y":0}, + {"label":"K83", "x":7.5, "y":0}, + {"label":"K93", "x":8.5, "y":0}, + {"label":"K84", "x":9.5, "y":0}, + {"label":"K94", "x":11, "y":0}, + {"label":"K85", "x":12, "y":0}, + {"label":"K95", "x":13, "y":0}, + {"label":"K86", "x":14, "y":0}, + {"label":"K96", "x":15.25, "y":0}, + {"label":"K88", "x":16.25, "y":0}, + {"label":"K98", "x":17.25, "y":0}, + {"label":"K00", "x":0, "y":1.25}, + {"label":"K10", "x":1, "y":1.25}, + {"label":"K01", "x":2, "y":1.25}, + {"label":"K11", "x":3, "y":1.25}, + {"label":"K02", "x":4, "y":1.25}, + {"label":"K12", "x":5, "y":1.25}, + {"label":"K03", "x":6, "y":1.25}, + {"label":"K13", "x":7, "y":1.25}, + {"label":"K04", "x":8, "y":1.25}, + {"label":"K14", "x":9, "y":1.25}, + {"label":"K05", "x":10, "y":1.25}, + {"label":"K15", "x":11, "y":1.25}, + {"label":"K06", "x":12, "y":1.25}, + {"label":"K16", "x":13, "y":1.25, "w":2}, + {"label":"K08", "x":15.25, "y":1.25}, + {"label":"K18", "x":16.25, "y":1.25}, + {"label":"K48", "x":17.25, "y":1.25}, + {"label":"K20", "x":0, "y":2.25, "w":1.5}, + {"label":"K30", "x":1.5, "y":2.25}, + {"label":"K21", "x":2.5, "y":2.25}, + {"label":"K31", "x":3.5, "y":2.25}, + {"label":"K22", "x":4.5, "y":2.25}, + {"label":"K32", "x":5.5, "y":2.25}, + {"label":"K23", "x":6.5, "y":2.25}, + {"label":"K33", "x":7.5, "y":2.25}, + {"label":"K24", "x":8.5, "y":2.25}, + {"label":"K34", "x":9.5, "y":2.25}, + {"label":"K25", "x":10.5, "y":2.25}, + {"label":"K35", "x":11.5, "y":2.25}, + {"label":"K26", "x":12.5, "y":2.25}, + {"label":"K36", "x":13.5, "y":2.25, "w":1.5}, + {"label":"K28", "x":15.25, "y":2.25}, + {"label":"K38", "x":16.25, "y":2.25}, + {"label":"K58", "x":17.25, "y":2.25}, + {"label":"K40", "x":0, "y":3.25, "w":1.75}, + {"label":"K41", "x":1.75, "y":3.25}, + {"label":"K51", "x":2.75, "y":3.25}, + {"label":"K42", "x":3.75, "y":3.25}, + {"label":"K52", "x":4.75, "y":3.25}, + {"label":"K43", "x":5.75, "y":3.25}, + {"label":"K53", "x":6.75, "y":3.25}, + {"label":"K44", "x":7.75, "y":3.25}, + {"label":"K54", "x":8.75, "y":3.25}, + {"label":"K45", "x":9.75, "y":3.25}, + {"label":"K55", "x":10.75, "y":3.25}, + {"label":"K46", "x":11.75, "y":3.25}, + {"label":"K17", "x":12.75, "y":3.25}, + {"label":"K56", "x":13.75, "y":3.25, "w":1.25}, + {"label":"K70", "x":0, "y":4.25, "w":1.25}, + {"label":"K97", "x":1.25, "y":4.25}, + {"label":"K61", "x":2.25, "y":4.25}, + {"label":"K71", "x":3.25, "y":4.25}, + {"label":"K62", "x":4.25, "y":4.25}, + {"label":"K72", "x":5.25, "y":4.25}, + {"label":"K63", "x":6.25, "y":4.25}, + {"label":"K73", "x":7.25, "y":4.25}, + {"label":"K64", "x":8.25, "y":4.25}, + {"label":"K74", "x":9.25, "y":4.25}, + {"label":"K65", "x":10.25, "y":4.25}, + {"label":"K75", "x":11.25, "y":4.25}, + {"label":"K66", "x":12.25, "y":4.25, "w":1.75}, + {"label":"K76", "x":14, "y":4.25}, + {"label":"K68", "x":16.25, "y":4.25}, + {"label":"K60", "x":0, "y":5.25, "w":1.25}, + {"label":"K50", "x":1.25, "y":5.25, "w":1.25}, + {"label":"K87", "x":2.5, "y":5.25, "w":1.25}, + {"label":"K07", "x":3.75, "y":5.25, "w":6.25}, + {"label":"K27", "x":10, "y":5.25, "w":1.25}, + {"label":"K37", "x":11.25, "y":5.25, "w":1.25}, + {"label":"K47", "x":12.5, "y":5.25, "w":1.25}, + {"label":"K57", "x":13.75, "y":5.25, "w":1.25}, + {"label":"K67", "x":15.25, "y":5.25}, + {"label":"K77", "x":16.25, "y":5.25}, + {"label":"K78", "x":17.25, "y":5.25} + ] + } + } +} diff --git a/keyboards/gon/nerdtkl/keymaps/default/keymap.c b/keyboards/gon/nerdtkl/keymaps/default/keymap.c new file mode 100644 index 000000000000..cca8e9108ad2 --- /dev/null +++ b/keyboards/gon/nerdtkl/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +// Keymap layers +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl( \ + 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_LCTL, 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(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl( \ + RESET, 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) + +}; diff --git a/keyboards/gon/nerdtkl/keymaps/default/readme.md b/keyboards/gon/nerdtkl/keymaps/default/readme.md new file mode 100644 index 000000000000..648157a05168 --- /dev/null +++ b/keyboards/gon/nerdtkl/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for GON NerD TKL + +![keymap](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/gon/nerdtkl/keymaps/default/keymap.png) diff --git a/keyboards/gonnerd/keymaps/gam3cat/config.h b/keyboards/gon/nerdtkl/keymaps/gam3cat/config.h similarity index 100% rename from keyboards/gonnerd/keymaps/gam3cat/config.h rename to keyboards/gon/nerdtkl/keymaps/gam3cat/config.h diff --git a/keyboards/gonnerd/keymaps/gam3cat/keymap.c b/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c similarity index 100% rename from keyboards/gonnerd/keymaps/gam3cat/keymap.c rename to keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c diff --git a/keyboards/gonnerd/keymaps/gam3cat/readme.md b/keyboards/gon/nerdtkl/keymaps/gam3cat/readme.md similarity index 100% rename from keyboards/gonnerd/keymaps/gam3cat/readme.md rename to keyboards/gon/nerdtkl/keymaps/gam3cat/readme.md diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk new file mode 100644 index 000000000000..65c2a5d62246 --- /dev/null +++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk @@ -0,0 +1,26 @@ +# 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 - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended 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 +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings +KEY_LOCK_ENABLE = no # This enables key lock +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common +TAP_DANCE_ENABLE = no # Enable TapDance functionality diff --git a/keyboards/gon/nerdtkl/nerdtkl.c b/keyboards/gon/nerdtkl/nerdtkl.c new file mode 100644 index 000000000000..e221e9e78e18 --- /dev/null +++ b/keyboards/gon/nerdtkl/nerdtkl.c @@ -0,0 +1 @@ +#include "nerdtkl.h" diff --git a/keyboards/gon/nerdtkl/nerdtkl.h b/keyboards/gon/nerdtkl/nerdtkl.h new file mode 100644 index 000000000000..9dbc03619463 --- /dev/null +++ b/keyboards/gon/nerdtkl/nerdtkl.h @@ -0,0 +1,24 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_tkl( \ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K88, K98, \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K08, K18, K48, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K28, K38, K58, \ + K40, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K17, K56, \ + K70, K97, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K68, \ + K60, K50, K87, K07, K27, K37, K47, K57, K67, K77, K78 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { K90, K91, K92, K93, K94, K95, K96, K97, K98 } \ +} diff --git a/keyboards/gonnerd/readme.md b/keyboards/gon/nerdtkl/readme.md similarity index 69% rename from keyboards/gonnerd/readme.md rename to keyboards/gon/nerdtkl/readme.md index 223fdf3d3ff9..f8e982e77071 100644 --- a/keyboards/gonnerd/readme.md +++ b/keyboards/gon/nerdtkl/readme.md @@ -1,17 +1,16 @@ -GON NerD -======== +# GON NerD TKL A Korean Custom TKL. -Keyboard Maintainer: QMK Community -Hardware Supported: GON NerD TKL PCB -Hardware Availability: [gonskeyboardworks.com](http://www.gonskeyboardworks.com/pcbs-and-controllers/60-nerd-tkl-ver20-pcb.html) +* Keyboard Maintainer: QMK Community +* Hardware Supported: GON NerD TKL PCB +* Hardware Availability: [gonskeyboardworks.com](http://www.gonskeyboardworks.com/pcbs-and-controllers/60-nerd-tkl-ver20-pcb.html) Make example for this keyboard (after setting up your build environment): - make gonnerd:default + make gon/nerdtkl: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). ## Changing Bootloader diff --git a/keyboards/gon/nerdtkl/rules.mk b/keyboards/gon/nerdtkl/rules.mk new file mode 100644 index 000000000000..8446dd39ca94 --- /dev/null +++ b/keyboards/gon/nerdtkl/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# 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 = 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 +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 diff --git a/keyboards/gon/readme.md b/keyboards/gon/readme.md new file mode 100644 index 000000000000..22837c5a2e88 --- /dev/null +++ b/keyboards/gon/readme.md @@ -0,0 +1,9 @@ +# GON + +Gon's Keyboard Works is a Korean online mechanical keyboard retailer. + +Website: [gonskeyboardworks.com](https://www.gonskeyboardworks.com/) + +* Keyboards Supported: + * [GON NerD 60](nerd60/) + * [GON NerD TKL](nerdtkl/) diff --git a/keyboards/gonnerd/gonnerd.c b/keyboards/gonnerd/gonnerd.c deleted file mode 100644 index f25d3a85f230..000000000000 --- a/keyboards/gonnerd/gonnerd.c +++ /dev/null @@ -1 +0,0 @@ -#include "gonnerd.h" diff --git a/keyboards/gonnerd/gonnerd.h b/keyboards/gonnerd/gonnerd.h deleted file mode 100644 index 0b9f5259dda8..000000000000 --- a/keyboards/gonnerd/gonnerd.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef GONNERD_H -#define GONNERD_H - -#include "quantum.h" - -#define LAYOUT_tkl( \ - K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \ - K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \ - K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \ - K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \ - K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, K86, \ - K06, K05, K78, K70, K72, K73, K74, K75, K76, K77, K87 \ -) \ -{ \ - { K00, K10, K20, K30, K40, K50, K60, K70, K80 }, \ - { K01, K11, K21, K31, K41, 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, K74, K84 }, \ - { K05, K15, K25, K35, K45, K55, K65, K75, K85 }, \ - { K06, K16, K26, K36, K46, K56, K66, K76, K86 }, \ - { K07, K17, K27, K37, K47, K57, K67, K77, K87 }, \ - { K08, K18, K28, K38, K48, K58, K68, K78, K88 }, \ - { K09, K19, K29, K39, K49, K59, K69, K79, K89 } \ -} - -#define LAYOUT_60( \ - K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, \ - K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \ - K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \ - K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, \ - K06, K05, K78, K70, K72, K73, K74, K75 \ -) LAYOUT_tkl( \ - K08, 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, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, KC_NO, KC_NO, KC_NO, \ - K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, KC_NO, KC_NO, KC_NO, \ - K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \ - K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, KC_NO, \ - K06, K05, K78, K70, K72, K73, K74, K75, KC_NO, KC_NO, KC_NO \ -) - -#endif diff --git a/keyboards/gonnerd/info.json b/keyboards/gonnerd/info.json deleted file mode 100644 index 542eccd09653..000000000000 --- a/keyboards/gonnerd/info.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "keyboard_name": "GON NerD", - "url": "", - "maintainer": "qmk", - "width": 18.25, - "height": 6.5, - "layouts": { - "LAYOUT_tkl": { - "key_count": 90, - "layout": [{"label":"K08", "x":0, "y":0}, {"label":"K09", "x":2, "y":0}, {"label":"K18", "x":3, "y":0}, {"label":"K19", "x":4, "y":0}, {"label":"K28", "x":5, "y":0}, {"label":"K29", "x":6.5, "y":0}, {"label":"K38", "x":7.5, "y":0}, {"label":"K39", "x":8.5, "y":0}, {"label":"K48", "x":9.5, "y":0}, {"label":"K49", "x":11, "y":0}, {"label":"K58", "x":12, "y":0}, {"label":"K59", "x":13, "y":0}, {"label":"K68", "x":14, "y":0}, {"label":"K69", "x":15.25, "y":0}, {"label":"K88", "x":16.25, "y":0}, {"label":"K89", "x":17.25, "y":0}, {"label":"K00", "x":0, "y":1.5}, {"label":"K01", "x":1, "y":1.5}, {"label":"K10", "x":2, "y":1.5}, {"label":"K11", "x":3, "y":1.5}, {"label":"K20", "x":4, "y":1.5}, {"label":"K21", "x":5, "y":1.5}, {"label":"K30", "x":6, "y":1.5}, {"label":"K31", "x":7, "y":1.5}, {"label":"K40", "x":8, "y":1.5}, {"label":"K41", "x":9, "y":1.5}, {"label":"K50", "x":10, "y":1.5}, {"label":"K51", "x":11, "y":1.5}, {"label":"K60", "x":12, "y":1.5}, {"label":"K61", "x":13, "y":1.5, "w":2}, {"label":"K80", "x":15.25, "y":1.5}, {"label":"K81", "x":16.25, "y":1.5}, {"label":"K84", "x":17.25, "y":1.5}, {"label":"K02", "x":0, "y":2.5, "w":1.5}, {"label":"K03", "x":1.5, "y":2.5}, {"label":"K12", "x":2.5, "y":2.5}, {"label":"K13", "x":3.5, "y":2.5}, {"label":"K22", "x":4.5, "y":2.5}, {"label":"K23", "x":5.5, "y":2.5}, {"label":"K32", "x":6.5, "y":2.5}, {"label":"K33", "x":7.5, "y":2.5}, {"label":"K42", "x":8.5, "y":2.5}, {"label":"K43", "x":9.5, "y":2.5}, {"label":"K52", "x":10.5, "y":2.5}, {"label":"K53", "x":11.5, "y":2.5}, {"label":"K62", "x":12.5, "y":2.5}, {"label":"K63", "x":13.5, "y":2.5, "w":1.5}, {"label":"K82", "x":15.25, "y":2.5}, {"label":"K83", "x":16.25, "y":2.5}, {"label":"K85", "x":17.25, "y":2.5}, {"label":"K04", "x":0, "y":3.5, "w":1.75}, {"label":"K14", "x":1.75, "y":3.5}, {"label":"K15", "x":2.75, "y":3.5}, {"label":"K24", "x":3.75, "y":3.5}, {"label":"K25", "x":4.75, "y":3.5}, {"label":"K34", "x":5.75, "y":3.5}, {"label":"K35", "x":6.75, "y":3.5}, {"label":"K44", "x":7.75, "y":3.5}, {"label":"K45", "x":8.75, "y":3.5}, {"label":"K54", "x":9.75, "y":3.5}, {"label":"K55", "x":10.75, "y":3.5}, {"label":"K64", "x":11.75, "y":3.5}, {"label":"K71", "x":12.75, "y":3.5}, {"label":"K65", "x":13.75, "y":3.5, "w":1.25}, {"label":"K07", "x":0, "y":4.5, "w":1.25}, {"label":"K79", "x":1.25, "y":4.5}, {"label":"K16", "x":2.25, "y":4.5}, {"label":"K17", "x":3.25, "y":4.5}, {"label":"K26", "x":4.25, "y":4.5}, {"label":"K27", "x":5.25, "y":4.5}, {"label":"K36", "x":6.25, "y":4.5}, {"label":"K37", "x":7.25, "y":4.5}, {"label":"K46", "x":8.25, "y":4.5}, {"label":"K47", "x":9.25, "y":4.5}, {"label":"K56", "x":10.25, "y":4.5}, {"label":"K57", "x":11.25, "y":4.5}, {"label":"K66", "x":12.25, "y":4.5, "w":1.75}, {"label":"K67", "x":14, "y":4.5}, {"label":"K86", "x":16.25, "y":4.5}, {"label":"K06", "x":0, "y":5.5, "w":1.25}, {"label":"K05", "x":1.25, "y":5.5, "w":1.25}, {"label":"K78", "x":2.5, "y":5.5, "w":1.25}, {"label":"K70", "x":3.75, "y":5.5, "w":6.25}, {"label":"K72", "x":10, "y":5.5, "w":1.25}, {"label":"K73", "x":11.25, "y":5.5, "w":1.25}, {"label":"K74", "x":12.5, "y":5.5, "w":1.25}, {"label":"K75", "x":13.75, "y":5.5, "w":1.25}, {"label":"K76", "x":15.25, "y":5.5}, {"label":"K77", "x":16.25, "y":5.5}, {"label":"K87", "x":17.25, "y":5.5}] - }, - - "LAYOUT_60": { - "key_count": 64, - "layout": [{"label":"K08", "x":0, "y":0}, {"label":"K01", "x":1, "y":0}, {"label":"K10", "x":2, "y":0}, {"label":"K11", "x":3, "y":0}, {"label":"K20", "x":4, "y":0}, {"label":"K21", "x":5, "y":0}, {"label":"K30", "x":6, "y":0}, {"label":"K31", "x":7, "y":0}, {"label":"K40", "x":8, "y":0}, {"label":"K41", "x":9, "y":0}, {"label":"K50", "x":10, "y":0}, {"label":"K51", "x":11, "y":0}, {"label":"K60", "x":12, "y":0}, {"label":"K61", "x":13, "y":0, "w":2}, {"label":"K02", "x":0, "y":1, "w":1.5}, {"label":"K03", "x":1.5, "y":1}, {"label":"K12", "x":2.5, "y":1}, {"label":"K13", "x":3.5, "y":1}, {"label":"K22", "x":4.5, "y":1}, {"label":"K23", "x":5.5, "y":1}, {"label":"K32", "x":6.5, "y":1}, {"label":"K33", "x":7.5, "y":1}, {"label":"K42", "x":8.5, "y":1}, {"label":"K43", "x":9.5, "y":1}, {"label":"K52", "x":10.5, "y":1}, {"label":"K53", "x":11.5, "y":1}, {"label":"K62", "x":12.5, "y":1}, {"label":"K63", "x":13.5, "y":1, "w":1.5}, {"label":"K04", "x":0, "y":2, "w":1.75}, {"label":"K14", "x":1.75, "y":2}, {"label":"K15", "x":2.75, "y":2}, {"label":"K24", "x":3.75, "y":2}, {"label":"K25", "x":4.75, "y":2}, {"label":"K34", "x":5.75, "y":2}, {"label":"K35", "x":6.75, "y":2}, {"label":"K44", "x":7.75, "y":2}, {"label":"K45", "x":8.75, "y":2}, {"label":"K54", "x":9.75, "y":2}, {"label":"K55", "x":10.75, "y":2}, {"label":"K64", "x":11.75, "y":2}, {"label":"K71", "x":12.75, "y":2}, {"label":"K65", "x":13.75, "y":2, "w":1.25}, {"label":"K07", "x":0, "y":3, "w":1.25}, {"label":"K79", "x":1.25, "y":3}, {"label":"K16", "x":2.25, "y":3}, {"label":"K17", "x":3.25, "y":3}, {"label":"K26", "x":4.25, "y":3}, {"label":"K27", "x":5.25, "y":3}, {"label":"K36", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K46", "x":8.25, "y":3}, {"label":"K47", "x":9.25, "y":3}, {"label":"K56", "x":10.25, "y":3}, {"label":"K57", "x":11.25, "y":3}, {"label":"K66", "x":12.25, "y":3, "w":1.75}, {"label":"K67", "x":14, "y":3}, {"label":"K06", "x":0, "y":4, "w":1.25}, {"label":"K05", "x":1.25, "y":4, "w":1.25}, {"label":"K78", "x":2.5, "y":4, "w":1.25}, {"label":"K70", "x":3.75, "y":4, "w":6.25}, {"label":"K72", "x":10, "y":4, "w":1.25}, {"label":"K73", "x":11.25, "y":4, "w":1.25}, {"label":"K74", "x":12.5, "y":4, "w":1.25}, {"label":"K75", "x":13.75, "y":4, "w":1.25}] - } - } -} diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c deleted file mode 100644 index 19b796016170..000000000000 --- a/keyboards/gonnerd/keymaps/default/keymap.c +++ /dev/null @@ -1,22 +0,0 @@ -#include QMK_KEYBOARD_H - -#define __x__ KC_NO - -// Keymap layers -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_60( /* 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_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \ - KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL \ - ), - - [1] = LAYOUT_60( /* System layer to have access to RESET button */ - RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ - __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ - __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ - __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ - __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \ - ), -}; diff --git a/keyboards/gonnerd/keymaps/gam3cat/rules.mk b/keyboards/gonnerd/keymaps/gam3cat/rules.mk deleted file mode 100644 index 6eab033cc0c0..000000000000 --- a/keyboards/gonnerd/keymaps/gam3cat/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# 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 -# -TAP_DANCE_ENABLE = no # Enable TapDance functionality -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+1500) -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 # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = no # Enable extended unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. -#VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) -KEY_LOCK_ENABLE = no # This enables key lock(+260) -SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/gonnerd/keymaps/mauin/rules.mk b/keyboards/gonnerd/keymaps/mauin/rules.mk deleted file mode 100644 index 6de64fcf894b..000000000000 --- a/keyboards/gonnerd/keymaps/mauin/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# 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 = yes # 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 -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. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/gonnerd/keymaps/tkl/keymap.c b/keyboards/gonnerd/keymaps/tkl/keymap.c deleted file mode 100644 index 404f3825f65b..000000000000 --- a/keyboards/gonnerd/keymaps/tkl/keymap.c +++ /dev/null @@ -1,27 +0,0 @@ -#include QMK_KEYBOARD_H - -#define _x_ KC_NO -#define TRN KC_TRNS - -// Keymap layers -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_tkl( \ - 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _x_, KC_ENT, \ - KC_LSFT, _x_, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _x_, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ - ), - - [1] = LAYOUT_tkl( \ - RESET, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ - _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ - _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ - _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ - _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ - _x_, _x_, _x_, _x_, _x_, _x_, TRN, _x_, _x_, _x_, _x_ \ - ) - -}; diff --git a/keyboards/gonnerd/keymaps/tkl/rules.mk b/keyboards/gonnerd/keymaps/tkl/rules.mk deleted file mode 100644 index 4026390c4e23..000000000000 --- a/keyboards/gonnerd/keymaps/tkl/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# 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 -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 -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. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/hadron/ver3/chconf.h b/keyboards/hadron/ver3/chconf.h index ce44925f3c72..c8dbb85a84d0 100644 --- a/keyboards/hadron/ver3/chconf.h +++ b/keyboards/hadron/ver3/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 1000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/hadron/ver3/halconf.h b/keyboards/hadron/ver3/halconf.h index a14ace02b4b0..b916cd13e361 100644 --- a/keyboards/hadron/ver3/halconf.h +++ b/keyboards/hadron/ver3/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#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 QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 TRUE +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/hadron/ver3/mcuconf.h b/keyboards/hadron/ver3/mcuconf.h index 94d761cfba7b..0307251ec3c7 100644 --- a/keyboards/hadron/ver3/mcuconf.h +++ b/keyboards/hadron/ver3/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 TRUE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/handwired/bluepill/bluepill70/chconf.h b/keyboards/handwired/bluepill/bluepill70/chconf.h index fdbc4aed0454..23af0349ce3e 100644 --- a/keyboards/handwired/bluepill/bluepill70/chconf.h +++ b/keyboards/handwired/bluepill/bluepill70/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 16 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 2000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/bluepill/bluepill70/halconf.h b/keyboards/handwired/bluepill/bluepill70/halconf.h index 5be284cd35fa..db65fadea3cf 100644 --- a/keyboards/handwired/bluepill/bluepill70/halconf.h +++ b/keyboards/handwired/bluepill/bluepill70/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,12 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ -// Modified by Xydane #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -326,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/handwired/ck4x4/chconf.h b/keyboards/handwired/ck4x4/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/handwired/ck4x4/chconf.h +++ b/keyboards/handwired/ck4x4/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/ck4x4/halconf.h b/keyboards/handwired/ck4x4/halconf.h index 8b9724b1a30e..16f32117d51b 100644 --- a/keyboards/handwired/ck4x4/halconf.h +++ b/keyboards/handwired/ck4x4/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/handwired/co60/rev6/chconf.h b/keyboards/handwired/co60/rev6/chconf.h index 1d9f12ff1f8b..aac33037058e 100644 --- a/keyboards/handwired/co60/rev6/chconf.h +++ b/keyboards/handwired/co60/rev6/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/co60/rev6/halconf.h b/keyboards/handwired/co60/rev6/halconf.h index 5e5d70219e2b..ccac2f8f74d6 100644 --- a/keyboards/handwired/co60/rev6/halconf.h +++ b/keyboards/handwired/co60/rev6/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#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 QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 TRUE +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/handwired/co60/rev6/mcuconf.h b/keyboards/handwired/co60/rev6/mcuconf.h index 69bf9185d170..6f0b99fe00d7 100644 --- a/keyboards/handwired/co60/rev6/mcuconf.h +++ b/keyboards/handwired/co60/rev6/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 TRUE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/handwired/co60/rev7/chconf.h b/keyboards/handwired/co60/rev7/chconf.h index 1d9f12ff1f8b..aac33037058e 100644 --- a/keyboards/handwired/co60/rev7/chconf.h +++ b/keyboards/handwired/co60/rev7/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/co60/rev7/halconf.h b/keyboards/handwired/co60/rev7/halconf.h index 7363a21a2131..610bee5b5900 100644 --- a/keyboards/handwired/co60/rev7/halconf.h +++ b/keyboards/handwired/co60/rev7/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#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 QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 TRUE +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/handwired/co60/rev7/mcuconf.h b/keyboards/handwired/co60/rev7/mcuconf.h index 7ad013744665..eefee306b56c 100644 --- a/keyboards/handwired/co60/rev7/mcuconf.h +++ b/keyboards/handwired/co60/rev7/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 TRUE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c index c5ed18797fbf..602bdd157bcc 100644 --- a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c @@ -25,8 +25,9 @@ TRAN // Custom macros /* Fn Keys */ +#define LT_SYM LT(_SYM, KC_SPC) #define TT_SYM MO(_SYM) -#define TT_MOV KC_FN2 +#define TT_MOV LT(_MOV,KC_BSPC) #define TT_NUM MO(_NUM) #define SSFT ACTION_MODS_ONESHOT(MOD_LSFT) @@ -59,7 +60,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,\ TT_MOV, 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_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + KC_LCTL, KC_LGUI, KC_LALT, LT_SYM, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), [_CDH] = LAYOUT(\ @@ -68,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\ TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_2,\ KC_LSFT, KC_Z, KC_X, KC_C, M(DHPASTE), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, KC_1,\ - ____, ____, ____ , KC_FN1, ____, ____, ____, ____, ____, ____ + ____, ____, ____ , LT_SYM, ____, ____, ____, ____, ____, ____ ), @@ -131,11 +132,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { -[1] = ACTION_LAYER_TAP_KEY(_SYM,KC_SPACE), -[2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC) -}; - #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); diff --git a/keyboards/handwired/onekey/bluepill/chconf.h b/keyboards/handwired/onekey/bluepill/chconf.h index 9299be587ec6..f5e471640c56 100644 --- a/keyboards/handwired/onekey/bluepill/chconf.h +++ b/keyboards/handwired/onekey/bluepill/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/onekey/bluepill/halconf.h b/keyboards/handwired/onekey/bluepill/halconf.h index 53b2f91e33c0..ff5ae7e8a5f6 100644 --- a/keyboards/handwired/onekey/bluepill/halconf.h +++ b/keyboards/handwired/onekey/bluepill/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/handwired/onekey/stm32f0_disco/chconf.h b/keyboards/handwired/onekey/stm32f0_disco/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/chconf.h +++ b/keyboards/handwired/onekey/stm32f0_disco/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/onekey/stm32f0_disco/halconf.h b/keyboards/handwired/onekey/stm32f0_disco/halconf.h index 53b2f91e33c0..ff5ae7e8a5f6 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/halconf.h +++ b/keyboards/handwired/onekey/stm32f0_disco/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/handwired/onekey/teensy_32/chconf.h b/keyboards/handwired/onekey/teensy_32/chconf.h index 1919fcb97cf6..09903ca2dbce 100644 --- a/keyboards/handwired/onekey/teensy_32/chconf.h +++ b/keyboards/handwired/onekey/teensy_32/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 1000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 20 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK TRUE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS TRUE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS TRUE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS TRUE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/onekey/teensy_32/halconf.h b/keyboards/handwired/onekey/teensy_32/halconf.h index 1b6f2adc2069..16f32117d51b 100644 --- a/keyboards/handwired/onekey/teensy_32/halconf.h +++ b/keyboards/handwired/onekey/teensy_32/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,10 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE #endif -#endif /* _HALCONF_H_ */ +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif -/** @} */ +#endif /* HALCONF_H */ +/** @} */ diff --git a/keyboards/handwired/onekey/teensy_lc/chconf.h b/keyboards/handwired/onekey/teensy_lc/chconf.h index 1919fcb97cf6..09903ca2dbce 100644 --- a/keyboards/handwired/onekey/teensy_lc/chconf.h +++ b/keyboards/handwired/onekey/teensy_lc/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 1000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 20 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK TRUE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS TRUE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS TRUE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS TRUE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/onekey/teensy_lc/halconf.h b/keyboards/handwired/onekey/teensy_lc/halconf.h index 1b6f2adc2069..16f32117d51b 100644 --- a/keyboards/handwired/onekey/teensy_lc/halconf.h +++ b/keyboards/handwired/onekey/teensy_lc/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,10 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE #endif -#endif /* _HALCONF_H_ */ +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif -/** @} */ +#endif /* HALCONF_H */ +/** @} */ diff --git a/keyboards/handwired/steamvan/rev1/chconf.h b/keyboards/handwired/steamvan/rev1/chconf.h index 1d9f12ff1f8b..aac33037058e 100644 --- a/keyboards/handwired/steamvan/rev1/chconf.h +++ b/keyboards/handwired/steamvan/rev1/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/handwired/steamvan/rev1/halconf.h b/keyboards/handwired/steamvan/rev1/halconf.h index 7363a21a2131..610bee5b5900 100644 --- a/keyboards/handwired/steamvan/rev1/halconf.h +++ b/keyboards/handwired/steamvan/rev1/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#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 QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 TRUE +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/handwired/steamvan/rev1/mcuconf.h b/keyboards/handwired/steamvan/rev1/mcuconf.h index 7ad013744665..eefee306b56c 100644 --- a/keyboards/handwired/steamvan/rev1/mcuconf.h +++ b/keyboards/handwired/steamvan/rev1/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 TRUE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/keymaps/shela/keymap.c index dae85ad9ca5a..2d5f4c64ac3a 100644 --- a/keyboards/hhkb/keymaps/shela/keymap.c +++ b/keyboards/hhkb/keymaps/shela/keymap.c @@ -36,7 +36,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_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, OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), - KC_LALT, KC_LGUI, KC_FN2, KC_RGUI, KC_RALT), + KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT), /* Layer 1: Pseudo US Layout Layer * ,-----------------------------------------------------------------------------------------. @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, MO(HHKB), - KC_LGUI, KC_FN3, KC_FN2, KC_FN4, KC_RGUI), + KC_LGUI, KC_FN3, LT(SPACE_FN, KC_SPACE), KC_FN4, KC_RGUI), /* Layer 2: Dvorak Layer * ,-----------------------------------------------------------------------------------------. @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, 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(HHKB), - KC_LALT, KC_LGUI, KC_FN2, KC_RGUI, KC_RALT), + KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT), /* Layer 3: Mouse layer * ,-----------------------------------------------------------------------------------------. @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_PENT, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, MO(HHKB), - KC_TRNS, KC_TRNS, KC_FN2, KC_KP_0, KC_PDOT), + KC_TRNS, KC_TRNS, LT(SPACE_FN, KC_SPACE), KC_KP_0, KC_PDOT), /* Layer 5: HHKB mode (HHKB Fn) * ,-----------------------------------------------------------------------------------------. @@ -183,7 +183,6 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) */ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), - [2] = ACTION_LAYER_TAP_KEY(SPACE_FN, KC_SPACE), [3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN), [4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_KANA), [5] = ACTION_DEFAULT_LAYER_SET(BASE), diff --git a/keyboards/hs60/v2/chconf.h b/keyboards/hs60/v2/chconf.h index 1d9f12ff1f8b..aac33037058e 100644 --- a/keyboards/hs60/v2/chconf.h +++ b/keyboards/hs60/v2/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/hs60/v2/halconf.h b/keyboards/hs60/v2/halconf.h index eda293c49b8b..0cb7998f5ed6 100644 --- a/keyboards/hs60/v2/halconf.h +++ b/keyboards/hs60/v2/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/hs60/v2/mcuconf.h b/keyboards/hs60/v2/mcuconf.h index ce608f904ede..ed227b79679f 100644 --- a/keyboards/hs60/v2/mcuconf.h +++ b/keyboards/hs60/v2/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/infinity60/chconf.h b/keyboards/infinity60/chconf.h index 513ae821db07..7f767b6ddc78 100644 --- a/keyboards/infinity60/chconf.h +++ b/keyboards/infinity60/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 20 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/infinity60/halconf.h b/keyboards/infinity60/halconf.h index b87b0635c476..de0f29ce6ed0 100644 --- a/keyboards/infinity60/halconf.h +++ b/keyboards/infinity60/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/infinity60/led_controller.c b/keyboards/infinity60/led_controller.c index f319f8c68830..bc24574553f1 100644 --- a/keyboards/infinity60/led_controller.c +++ b/keyboards/infinity60/led_controller.c @@ -110,26 +110,26 @@ uint8_t pwm_register_array[9] = {0}; msg_t is31_select_page(uint8_t page) { tx[0] = IS31_COMMANDREGISTER; tx[1] = page; - return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, US2ST(IS31_TIMEOUT)); + return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, TIME_US2I(IS31_TIMEOUT)); } msg_t is31_write_data(uint8_t page, uint8_t *buffer, uint8_t size) { is31_select_page(page); - return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, buffer, size, NULL, 0, US2ST(IS31_TIMEOUT)); + return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, buffer, size, NULL, 0, TIME_US2I(IS31_TIMEOUT)); } msg_t is31_write_register(uint8_t page, uint8_t reg, uint8_t data) { is31_select_page(page); tx[0] = reg; tx[1] = data; - return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, US2ST(IS31_TIMEOUT)); + return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, TIME_US2I(IS31_TIMEOUT)); } msg_t is31_read_register(uint8_t page, uint8_t reg, uint8_t *result) { is31_select_page(page); tx[0] = reg; - return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 1, result, 1, US2ST(IS31_TIMEOUT)); + return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 1, result, 1, TIME_US2I(IS31_TIMEOUT)); } /* ======================== @@ -194,7 +194,7 @@ static THD_FUNCTION(LEDthread, arg) { // wait for a message (asynchronous) // (messages are queued (up to LED_MAILBOX_NUM_MSGS) if they can't // be processed right away - chMBFetch(&led_mailbox, &msg, TIME_INFINITE); + chMBFetchTimeout(&led_mailbox, &msg, TIME_INFINITE); msg_type = msg & 0xFF; //first byte is action information msg_args[0] = (msg >> 8) & 0xFF; msg_args[1] = (msg >> 16) & 0XFF; diff --git a/keyboards/jd45/keymaps/mjt6u/keymap.c b/keyboards/jd45/keymaps/mjt6u/keymap.c index 4c0b8828a585..6fda6ac95fab 100644 --- a/keyboards/jd45/keymaps/mjt6u/keymap.c +++ b/keyboards/jd45/keymaps/mjt6u/keymap.c @@ -26,9 +26,9 @@ enum jd45_keycodes #define LAYER_TOGGLE_DELAY 900 #define __MOD__ KC_TRNS -#define F_FNSPC F(0) -#define F_NUMSPC F(1) -#define F_FNTAB F(2) +#define F_FNSPC LT(_NUMSYM, KC_SPC) +#define F_NUMSPC LT(_NUMPAD, KC_SPC) +#define F_FNTAB LT(_FUNCTION, KC_TAB) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( \ @@ -81,12 +81,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC), - [1] = ACTION_LAYER_TAP_KEY(_NUMPAD, KC_SPC), - [2] = ACTION_LAYER_TAP_KEY(_FUNCTION, KC_TAB), -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); diff --git a/keyboards/jm60/chconf.h b/keyboards/jm60/chconf.h index 513ae821db07..7f767b6ddc78 100644 --- a/keyboards/jm60/chconf.h +++ b/keyboards/jm60/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 20 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/jm60/halconf.h b/keyboards/jm60/halconf.h index 8b9724b1a30e..16f32117d51b 100644 --- a/keyboards/jm60/halconf.h +++ b/keyboards/jm60/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/k_type/chconf.h b/keyboards/k_type/chconf.h index 513ae821db07..7f767b6ddc78 100644 --- a/keyboards/k_type/chconf.h +++ b/keyboards/k_type/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 20 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/k_type/halconf.h b/keyboards/k_type/halconf.h index b87b0635c476..de0f29ce6ed0 100644 --- a/keyboards/k_type/halconf.h +++ b/keyboards/k_type/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/katana60/keymaps/rominronin/keymap.c b/keyboards/katana60/keymaps/rominronin/keymap.c index 7af9ab87f333..754b552b24e0 100644 --- a/keyboards/katana60/keymaps/rominronin/keymap.c +++ b/keyboards/katana60/keymaps/rominronin/keymap.c @@ -64,28 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC), - [1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } diff --git a/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c index ba12e1bf53b3..605e9f1004d9 100644 --- a/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c @@ -43,13 +43,8 @@ enum { [TD_ZERO_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_ENT) }; */ - // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, - }; -#define SPC_LW FUNC(0) -#define ENT_RS FUNC(1) +#define SPC_LW LT(_LOWER, KC_SPC) +#define ENT_RS LT(_RAISE, KC_ENT) #define FNC MO(_FUNCTION) #define MSE MO(_MOUSE) #define PIPE M(R_PIPE) diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index f3eb24eb0579..024df591271c 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , TT(_MOUSE) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , - KC_GRAVE, KC_ESC, KC_FN4, KC_FN5, + KC_GRAVE, KC_ESC, KC_FN4, LT(_SYMB, KC_RIGHT), KC_LCTL,KC_LALT, KC_DEL, KC_BSPC, KC_DEL ,TT(_MOUSE) , @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT, - KC_FN6, KC_FN7, KC_LBRC ,KC_RBRC, + LT(_SYMB, KC_UP), KC_FN7, KC_LBRC ,KC_RBRC, KC_RALT,KC_RGUI, KC_PGUP, KC_PGDN,KC_ENTER ,KC_SPC @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_CIRC, KC_LCBR, KC_RCBR, KC_AT, KC_PERC, _______, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_TILD, _______, KC_6, KC_7, KC_8, KC_9, KC_PIPE, - _______, KC_COLON, KC_FN4, KC_FN5, + _______, KC_COLON, KC_FN4, LT(_SYMB, KC_RIGHT), _______, _______, _______, _______, _______, RESET, @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______, KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV, KC_DLR, KC_2, KC_3, KC_4, KC_5, XXXXXXX, - KC_FN6, KC_FN7, KC_BSLS, XXXXXXX, + LT(_SYMB, KC_UP), KC_FN7, KC_BSLS, XXXXXXX, _______, _______, _______, _______, _______, _______ @@ -149,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_SLSH, RSFT(KC_COMM), RSFT(KC_DOT), _______, _______, _______, _______, RSFT(KC_LBRC), RSFT(KC_RBRC), _______, _______, _______, KC_EQL, RSFT(KC_9), RSFT(KC_0), _______, _______, - _______, _______, KC_FN4, KC_FN5, + _______, _______, KC_FN4, LT(_SYMB, KC_RIGHT), _______, _______, _______, _______, _______, RESET, @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_PLUS, KC_MINS, _______, _______, _______, _______, KC_EQL, KC_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, - KC_FN6, KC_FN7, _______, _______, + LT(_SYMB, KC_UP), KC_FN7, _______, _______, _______, _______, _______, _______, _______, _______ @@ -265,9 +265,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TOGGLE(_MOUSE) , - [5]= ACTION_LAYER_TAP_KEY(_SYMB,KC_RIGHT), [4]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_LEFT), - [6]= ACTION_LAYER_TAP_KEY(_SYMB,KC_UP), [7]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_DOWN), diff --git a/keyboards/lets_split/keymaps/adam/keymap.c b/keyboards/lets_split/keymaps/adam/keymap.c index a5ad8e32e8bb..baa4e0852a6a 100644 --- a/keyboards/lets_split/keymaps/adam/keymap.c +++ b/keyboards/lets_split/keymaps/adam/keymap.c @@ -11,6 +11,9 @@ extern keymap_config_t keymap_config; #define FLOCK 1 // symbols arrows and F keys on F held down #define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down +#define FLOCK_F LT(FLOCK, KC_F) +#define FLOCK_J LT(JLOCK, KC_J) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -27,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT ( \ TD(1), KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, \ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - SFT_T(KC_A), ALT_T(KC_S),CTL_T(KC_D), F(FLOCK), GUI_T(KC_G), KC_BSPC, KC_DELETE, GUI_T(KC_H), F(JLOCK), CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN), \ + SFT_T(KC_A), ALT_T(KC_S),CTL_T(KC_D), FLOCK_F, GUI_T(KC_G), KC_BSPC, KC_DELETE, GUI_T(KC_H), FLOCK_J, CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN), \ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOTE ), [FLOCK] = LAYOUT ( \ @@ -44,10 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [FLOCK] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F), - [JLOCK] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J) -}; #ifdef TAP_DANCE_ENABLE void tap_1(qk_tap_dance_state_t *state, void *user_data) { switch (state->count) { diff --git a/keyboards/matrix/noah/boards/noah_bd/board.c b/keyboards/matrix/noah/boards/noah_bd/board.c index 7fd6a60b5ffa..68cf23cddc4a 100644 --- a/keyboards/matrix/noah/boards/noah_bd/board.c +++ b/keyboards/matrix/noah/boards/noah_bd/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,20 +124,94 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB1(STM32_GPIO_EN_MASK); + rccEnableAHB1(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); +#endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); #endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + + stm32_gpio_init(); stm32_clock_init(); } @@ -128,4 +264,5 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + } diff --git a/keyboards/matrix/noah/chconf.h b/keyboards/matrix/noah/chconf.h index 228a0827d8a8..7dc4f84a8a00 100644 --- a/keyboards/matrix/noah/chconf.h +++ b/keyboards/matrix/noah/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,12 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #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 +#endif /** @} */ @@ -127,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -145,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -153,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -162,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -170,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -181,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -189,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -199,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -209,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -219,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -227,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -237,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -246,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -257,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -267,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -276,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -288,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -297,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -308,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -324,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -333,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -342,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -352,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -360,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -379,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -389,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -400,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -411,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -420,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ @@ -459,8 +648,6 @@ /* IRQ epilogue code here.*/ \ } -#define ARM_WFI_IMPL __WFI - /** * @brief Idle thread enter hook. * @note This hook is invoked within a critical zone, no OS functions diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h index a5a77067a607..ccedd43ccfb1 100644 --- a/keyboards/matrix/noah/config.h +++ b/keyboards/matrix/noah/config.h @@ -39,12 +39,7 @@ /* indicator rgb */ #define WS2812_LED_N 7 #define RGBLED_NUM WS2812_LED_N -#define WS2812_TIM_N 3 -#define WS2812_TIM_CH 3 -#define PORT_WS2812 GPIOB -#define PIN_WS2812 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) -#define WS2812_DMA_CHANNEL 5 // DMA channel for TIMx_UP +#define RGB_DI_PIN B1 #define RGBLIGHT_ANIMATIONS //#define WS2812_EXTERNAL_PULLUP diff --git a/keyboards/matrix/noah/halconf.h b/keyboards/matrix/noah/halconf.h index 8c4257198367..2fccb45e1d8f 100644 --- a/keyboards/matrix/noah/halconf.h +++ b/keyboards/matrix/noah/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#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 QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 256 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 FALSE +#define SPI_USE_MUTUAL_EXCLUSION FALSE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/matrix/noah/noah.c b/keyboards/matrix/noah/noah.c index 184be4370440..64069148e55b 100644 --- a/keyboards/matrix/noah/noah.c +++ b/keyboards/matrix/noah/noah.c @@ -7,7 +7,7 @@ #ifdef RGBLIGHT_ENABLE #include #include "rgblight.h" -#include "ws2812_f4.h" +#include "ws2812.h" extern rgblight_config_t rgblight_config; // led 0 for caps lock, led 1 for scroll lock, led 3 for num lock @@ -58,7 +58,6 @@ void matrix_init_kb(void) { __attribute__((weak)) void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE - ws2812_init(); rgblight_enable(); #endif diff --git a/keyboards/matrix/noah/rules.mk b/keyboards/matrix/noah/rules.mk index 68163386f1c3..c24cfd9069af 100644 --- a/keyboards/matrix/noah/rules.mk +++ b/keyboards/matrix/noah/rules.mk @@ -53,4 +53,4 @@ RGBLIGHT_CUSTOM_DRIVER = yes # project specific files SRC += \ matrix.c \ - ws2812_f4.c + ws2812.c diff --git a/keyboards/matrix/noah/ws2812_f4.c b/keyboards/matrix/noah/ws2812_f4.c deleted file mode 100644 index 7536d6d8c260..000000000000 --- a/keyboards/matrix/noah/ws2812_f4.c +++ /dev/null @@ -1,272 +0,0 @@ -/** - * @file ws2812.c - * @author Austin Glaser , Joerg Wangemann - * @brief WS2812 LED driver - * - * Copyright (C) 2016 Austin Glaser, 2017 Joerg Wangemann - * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. - * - * @todo Put in names and descriptions of variables which need to be defined to use this file - * - * @addtogroup WS2812 - * @{ - */ - -/* --- PRIVATE DEPENDENCIES ------------------------------------------------- */ - -// This Driver -#include "ws2812_f4.h" - -// Standard -#include - -// ChibiOS -#include "ch.h" -#include "hal.h" - -#include "wait.h" -// Application -//#include "board.h" - -// TODO: Add these #define's to the headers of your project. -// Pin, timer and dma are all connected, check them all if you change one. -// Tested with STM32F4, working at 144 or 168 MHz. -//#define WS2812_LED_N 2 // Number of LEDs -//#define PORT_WS2812 GPIOB -//#define PIN_WS2812 9 -//#define WS2812_TIM_N 4 // timer, 1-11 -//#define WS2812_TIM_CH 3 // timer channel, 0-3 -//#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) -//#define WS2812_DMA_CHANNEL 6 // DMA channel for TIMx_UP -// The WS2812 expects 5V signal level (or at least 0.7 * VDD). Sometimes it works -// with a 3V signal level, otherwise the easiest way to get the signal level to 5V -// is to add an external pullup resistor from the DI pin to 5V (10k will do) and -// configure the pin as open drain. -// (An SMD resistor is easily solders on the connections of a light strip) -// Uncomment the next line if an external pullup resistor is used. -//#define WS2812_EXTERNAL_PULLUP - -/* --- CONFIGURATION CHECK -------------------------------------------------- */ - -#if !defined(WS2812_LED_N) - #error WS2812 LED chain length not specified -#elif WS2812_LED_N <= 0 - #error WS2812 LED chain length set to invalid value -#endif - -#if !defined(WS2812_TIM_N) - #error WS2812 timer not specified -#endif -#if defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32F7XX) - #if WS2812_TIM_N <= 2 - #define WS2812_AF 1 - #elif WS2812_TIM_N <= 5 - #define WS2812_AF 2 - #elif WS2812_TIM_N <= 11 - #define WS2812_AF 3 - #endif -#elif !defined(WS2812_AF) - #error WS2812_AF timer alternate function not specified -#endif - -#if !defined(WS2812_TIM_CH) - #error WS2812 timer channel not specified -#elif WS2812_TIM_CH >= 4 - #error WS2812 timer channel set to invalid value -#endif - -/* --- PRIVATE CONSTANTS ---------------------------------------------------- */ - -#define WS2812_PWM_FREQUENCY (STM32_SYSCLK/2) /**< Clock frequency of PWM, must be valid with respect to system clock! */ -#define WS2812_PWM_PERIOD (WS2812_PWM_FREQUENCY/800000) /**< Clock period in ticks. 1 / 800kHz = 1.25 uS (as per datasheet) */ - -/** - * @brief Number of bit-periods to hold the data line low at the end of a frame - * - * The reset period for each frame must be at least 50 uS; so we add in 50 bit-times - * of zeroes at the end. (50 bits)*(1.25 uS/bit) = 62.5 uS, which gives us some - * slack in the timing requirements - */ -#define WS2812_RESET_BIT_N (50) -#define WS2812_COLOR_BIT_N (WS2812_LED_N*24) /**< Number of data bits */ -#define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */ - -/** - * @brief High period for a zero, in ticks - * - * Per the datasheet: - * WS2812: - * - T0H: 200 nS to 500 nS, inclusive - * - T0L: 650 nS to 950 nS, inclusive - * WS2812B: - * - T0H: 200 nS to 500 nS, inclusive - * - T0L: 750 nS to 1050 nS, inclusive - * - * The duty cycle is calculated for a high period of 350 nS. - */ -#define WS2812_DUTYCYCLE_0 (WS2812_PWM_FREQUENCY/(1000000000/450)) - -/** - * @brief High period for a one, in ticks - * - * Per the datasheet: - * WS2812: - * - T1H: 550 nS to 850 nS, inclusive - * - T1L: 450 nS to 750 nS, inclusive - * WS2812B: - * - T1H: 750 nS to 1050 nS, inclusive - * - T1L: 200 nS to 500 nS, inclusive - * - * The duty cycle is calculated for a high period of 800 nS. - * This is in the middle of the specifications of the WS2812 and WS2812B. - */ -#define WS2812_DUTYCYCLE_1 (WS2812_PWM_FREQUENCY/(1000000000/900)) - -/* --- PRIVATE MACROS ------------------------------------------------------- */ - -/** - * @brief Generates a reference to a numbered PWM driver - * - * @param[in] n: The driver (timer) number - * - * @return A reference to the driver - */ -#define PWMD(n) CONCAT_EXPANDED_SYMBOLS(PWMD, n) - -#define WS2812_PWMD PWMD(WS2812_TIM_N) /**< The PWM driver to use for the LED chain */ - -/** - * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given bit - * - * @param[in] led: The led index [0, @ref WS2812_LED_N) - * @param[in] byte: The byte number [0, 2] - * @param[in] bit: The bit number [0, 7] - * - * @return The bit index - */ -#define WS2812_BIT(led, byte, bit) (24*(led) + 8*(byte) + (7 - (bit))) - -/** - * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit - * - * @note The red byte is the middle byte in the color packet - * - * @param[in] led: The led index [0, @ref WS2812_LED_N) - * @param[in] bit: The bit number [0, 7] - * - * @return The bit index - */ -#define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit)) - -/** - * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit - * - * @note The green byte is the first byte in the color packet - * - * @param[in] led: The led index [0, @ref WS2812_LED_N) - * @param[in] bit: The bit number [0, 7] - * - * @return The bit index - */ -#define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit)) - -/** - * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit - * - * @note The blue byte is the last byte in the color packet - * - * @param[in] led: The led index [0, @ref WS2812_LED_N) - * @param[in] bit: The bit index [0, 7] - * - * @return The bit index - */ -#define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit)) - -/* --- PRIVATE VARIABLES ---------------------------------------------------- */ - -static uint32_t ws2812_frame_buffer[WS2812_BIT_N + 1]; /**< Buffer for a frame */ - -/* --- PUBLIC FUNCTIONS ----------------------------------------------------- */ -/* - * Gedanke: Double-buffer type transactions: double buffer transfers using two memory pointers for -the memory (while the DMA is reading/writing from/to a buffer, the application can -write/read to/from the other buffer). - */ - -void ws2812_init(void) -{ - // Initialize led frame buffer - uint32_t i; - for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle - for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero - // Configure pin as AF output. If there's an external pull up resistor the signal level is brought to 5V using open drain mode. -#ifdef WS2812_EXTERNAL_PULLUP - palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(WS2812_AF) | PAL_STM32_OTYPE_OPENDRAIN); -#else - palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(WS2812_AF) | PAL_STM32_OTYPE_PUSHPULL); //PAL_MODE_STM32_ALTERNATE_PUSHPULL); -#endif - //palClearPad(PORT_WS2812, PIN_WS2812); - //wait_ms(1); - // PWM Configuration - #pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config - static const PWMConfig ws2812_pwm_config = { - .frequency = WS2812_PWM_FREQUENCY, - .period = WS2812_PWM_PERIOD, //Mit dieser Periode wird UDE-Event erzeugt und ein neuer Wert (Länge WS2812_BIT_N) vom DMA ins CCR geschrieben - .callback = NULL, - .channels = { - [0 ... 3] = {.mode = PWM_OUTPUT_DISABLED, .callback = NULL}, // Channels default to disabled - [WS2812_TIM_CH] = {.mode = PWM_OUTPUT_ACTIVE_HIGH, .callback = NULL}, // Turn on the channel we care about - }, - .cr2 = 0, - .dier = TIM_DIER_UDE, // DMA on update event for next period - }; - #pragma GCC diagnostic pop // Restore command-line warning options - - // Configure DMA - //dmaInit(); // Joe added this - dmaStreamAllocate(WS2812_DMA_STREAM, 10, NULL, NULL); - dmaStreamSetPeripheral(WS2812_DMA_STREAM, &(WS2812_PWMD.tim->CCR[WS2812_TIM_CH])); // Ziel ist der An-Zeit im Cap-Comp-Register - dmaStreamSetMemory0(WS2812_DMA_STREAM, ws2812_frame_buffer); - dmaStreamSetTransactionSize(WS2812_DMA_STREAM, WS2812_BIT_N); - dmaStreamSetMode(WS2812_DMA_STREAM, - STM32_DMA_CR_CHSEL(WS2812_DMA_CHANNEL) | STM32_DMA_CR_DIR_M2P | STM32_DMA_CR_PSIZE_WORD | STM32_DMA_CR_MSIZE_WORD | - STM32_DMA_CR_MINC | STM32_DMA_CR_CIRC | STM32_DMA_CR_PL(3)); - // M2P: Memory 2 Periph; PL: Priority Level - - // Start DMA - dmaStreamEnable(WS2812_DMA_STREAM); - - // Configure PWM - // NOTE: It's required that preload be enabled on the timer channel CCR register. This is currently enabled in the - // ChibiOS driver code, so we don't have to do anything special to the timer. If we did, we'd have to start the timer, - // disable counting, enable the channel, and then make whatever configuration changes we need. - pwmStart(&WS2812_PWMD, &ws2812_pwm_config); - pwmEnableChannel(&WS2812_PWMD, WS2812_TIM_CH, 0); // Initial period is 0; output will be low until first duty cycle is DMA'd in -} - -ws2812_err_t ws2812_write_led(uint32_t led_number, uint8_t r, uint8_t g, uint8_t b) -{ - // Check for valid LED - if (led_number > WS2812_LED_N) return WS2812_LED_INVALID; - - // Write color to frame buffer - for (uint32_t bit = 0; bit < 8; bit++) { - ws2812_frame_buffer[WS2812_RED_BIT(led_number, bit)] = ((r >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; - ws2812_frame_buffer[WS2812_GREEN_BIT(led_number, bit)] = ((g >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; - ws2812_frame_buffer[WS2812_BLUE_BIT(led_number, bit)] = ((b >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; - } - - // Success - return WS2812_SUCCESS; -} - -void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) -{ - for(int i = 0; i < number_of_leds; i++) { - ws2812_write_led(i, ledarray[i].r, ledarray[i].g, ledarray[i].b); - } -} - -/** @} addtogroup WS2812 */ diff --git a/keyboards/matrix/noah/ws2812_f4.h b/keyboards/matrix/noah/ws2812_f4.h deleted file mode 100644 index 245bd15fef01..000000000000 --- a/keyboards/matrix/noah/ws2812_f4.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @file ws2812.h - * @author Austin Glaser - * @brief Interface to WS2812 LED driver - * - * Copyright (C) 2016 Austin Glaser - * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. - * - * @todo Put in names and descriptions of variables which need to be defined to use this file - */ - -#ifndef WS2812_H_ -#define WS2812_H_ - -/** - * @defgroup WS2812 WS2812 Driver - * @{ - * - * @brief DMA-based WS2812 LED driver - * - * A driver for WS2812 LEDs - */ - -/* --- PUBLIC DEPENDENCIES -------------------------------------------------- */ - -// Standard -#include -#include "color.h" - -/* --- PUBLIC MACROS -------------------------------------------------------- */ - -/** - * @brief Concatenates two symbols s1 and s2 exactly, without expanding either - * - * @param[in] s1: The first symbol to concatenate - * @param[in] s2: The second symbol to concatenate - * - * @return A single symbol containing s1 and s2 concatenated without expansion - */ -#define CONCAT_SYMBOLS(s1, s2) s1##s2 - -/** - * @brief Concatenate the symbols s1 and s2, expanding both of them - * - * This is important because simply applying s1##s2 doesn't expand them if they're - * preprocessor tokens themselves - * - * @param[in] s1: The first symbol to concatenate - * @param[in] s2: The second symbol to concatenate - * - * @return A single symbol containing s1 expanded followed by s2 expanded - */ -#define CONCAT_EXPANDED_SYMBOLS(s1, s2) CONCAT_SYMBOLS(s1, s2) - -/* --- PUBLIC CONSTANTS ----------------------------------------------------- */ - -/** - * @brief Return codes from ws2812 interface functions - */ -typedef enum { - WS2812_SUCCESS = 0x00, /**< Operation completeed successfully */ - WS2812_LED_INVALID, /**< Attempted to index an invalid LED (@ref WS2812_N_LEDS) */ - MAX_WS2812_ERR, /**< Total number of possible error codes */ - WS2812_ERR_INVALID /**< Invalid error value */ -} ws2812_err_t; - -/* --- PUBLIC FUNCTIONS ----------------------------------------------------- */ - -/** - * @brief Initialize the driver - * - * After this function is called, all necessary background tasks will be started. - * The frame is initially dark. - */ -void ws2812_init(void); - -/** - * @brief Write the value of a single LED in the chain - * - * The color value is written to a frame buffer, and will not - * be updated until the next frame is written. Frames are written - * at the maximum possible speed -- the longest latency between a - * call to this function and the value being displayed is - * 1.25uS*(24*@ref WS2812_LED_N + 50) - * - * @param[in] led_number: The index of the LED to be written. Must be strictly less than - * @ref WS2812_N_LEDS - * @param[in] r: The red level of the LED - * @param[in] g: The green level of the LED - * @param[in] b: The blue level of the LED - * - * @retval WS2812_SUCCESS: The write was successful - * @retval WS2812_LED_INVALID: The write was to an invalid LED index - */ -ws2812_err_t ws2812_write_led(uint32_t led_number, uint8_t r, uint8_t g, uint8_t b); - -void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); -/** @} defgroup WS2812 */ - -#endif // ifndef WS2812_H_ diff --git a/keyboards/nk65/chconf.h b/keyboards/nk65/chconf.h old mode 100755 new mode 100644 index 1d9f12ff1f8b..aac33037058e --- a/keyboards/nk65/chconf.h +++ b/keyboards/nk65/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/nk65/halconf.h b/keyboards/nk65/halconf.h old mode 100755 new mode 100644 index c3e0cbb728c7..9306b2cfd8e9 --- a/keyboards/nk65/halconf.h +++ b/keyboards/nk65/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,153 +28,190 @@ #ifndef HALCONF_H #define HALCONF_H +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + #include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE +#define HAL_USE_GPT TRUE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 TRUE +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -186,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -194,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -205,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -224,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -250,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -262,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -271,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -281,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -294,7 +394,7 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#define SERIAL_DEFAULT_BITRATE 38400 #endif /** @@ -305,7 +405,7 @@ * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -320,7 +420,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** @@ -328,7 +428,7 @@ * @note The default is 2 buffers. */ #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -340,15 +440,32 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE #endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif /*===========================================================================*/ @@ -360,7 +477,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE +#define UART_USE_WAIT FALSE #endif /** @@ -368,7 +485,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -380,7 +497,27 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif #endif /* HALCONF_H */ diff --git a/keyboards/nk65/mcuconf.h b/keyboards/nk65/mcuconf.h old mode 100755 new mode 100644 index ce608f904ede..ed227b79679f --- a/keyboards/nk65/mcuconf.h +++ b/keyboards/nk65/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c index 19adfb933e52..754dc5c4dd05 100644 --- a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c +++ b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c @@ -1,9 +1,12 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -11,15 +14,82 @@ limitations under the License. */ +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -54,23 +124,119 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); #endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); +#endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -98,4 +264,5 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + } diff --git a/keyboards/peiorisboards/ixora/chconf.h b/keyboards/peiorisboards/ixora/chconf.h index e811705ba3d1..6d169b36e9d3 100644 --- a/keyboards/peiorisboards/ixora/chconf.h +++ b/keyboards/peiorisboards/ixora/chconf.h @@ -1,9 +1,12 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -12,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -26,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -38,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -55,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -78,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -91,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -100,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -119,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -137,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -145,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -154,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -162,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -173,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -181,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -191,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -201,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -211,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -219,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -229,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -238,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -249,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -259,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -268,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -280,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -289,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -300,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -316,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -325,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -334,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -344,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -352,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -371,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -381,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -392,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -403,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -412,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/peiorisboards/ixora/halconf.h b/keyboards/peiorisboards/ixora/halconf.h index bc2b66f2e1e1..25f3fe5edf08 100644 --- a/keyboards/peiorisboards/ixora/halconf.h +++ b/keyboards/peiorisboards/ixora/halconf.h @@ -1,9 +1,12 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -22,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -31,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 TRUE +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -176,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT FALSE +#define ADC_USE_WAIT FALSE #endif /** @@ -184,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION FALSE +#define ADC_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -195,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -206,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -214,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -240,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -252,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -261,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -271,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -284,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -306,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -322,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT FALSE +#define SPI_USE_WAIT FALSE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 FALSE +#define SPI_USE_MUTUAL_EXCLUSION FALSE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -342,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ -/** @} */ \ No newline at end of file +/** @} */ diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c index 50123f2ee9db..c028e7949f89 100644 --- a/keyboards/planck/keymaps/ab/keymap.c +++ b/keyboards/planck/keymaps/ab/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -30,8 +24,8 @@ extern keymap_config_t keymap_config; #define CUS2 M(_CUS2) // Func macro definitions. -#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER -#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE +#define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER +#define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE #define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) #define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift #define ZM_NRM FUNC(4) // Zoom normal @@ -41,8 +35,6 @@ extern keymap_config_t keymap_config; // Enable these functions using FUNC(n) macro. const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN), - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP), [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), @@ -53,30 +45,30 @@ const uint16_t PROGMEM fn_actions[] = { // This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = { /* QWERTY */ - {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, SFT_ENT}, - {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_LOWER] = { /* LOWER */ - {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {BL, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[_RAISE] = { /* RAISE */ - {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_BSLS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE} -}, -[_CUSTOM] = { /* CUSTOM */ - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MOB, KC_TRNS, CUS1, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -} +[_QWERTY] = LAYOUT_planck_grid( /* QWERTY */ + 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, SFT_ENT, + KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_LOWER] = LAYOUT_planck_grid( /* LOWER */ + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[_RAISE] = LAYOUT_planck_grid( /* RAISE */ + 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_BSLS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE +), +[_CUSTOM] = LAYOUT_planck_grid( /* CUSTOM */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MOB, KC_TRNS, CUS1, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) }; // Set a layer persistently. diff --git a/keyboards/planck/keymaps/alexey/keymap.c b/keyboards/planck/keymaps/alexey/keymap.c index 90bdd2c37f09..44befdc971c1 100644 --- a/keyboards/planck/keymaps/alexey/keymap.c +++ b/keyboards/planck/keymaps/alexey/keymap.c @@ -1,7 +1,4 @@ -#include "keymap.h" -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "backlight.h" +#include QMK_KEYBOARD_H #define _QW 0 #define _LW 1 @@ -10,24 +7,24 @@ // This layout tries to imitate the Atreus keyboard const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QW] = { /* Qwerty */ - {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, MO(_LW)}, - {KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS}, - {M(0), KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_SPC, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT, KC_TRNS} -}, -[_RS] = { /* RAISE */ - {KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS}, - {KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS}, - {KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_EQL, KC_TRNS} -}, -[_LW] = { /* LOWER */ - {KC_TRNS, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_DELETE, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_F4, KC_F5, KC_F6, KC_F11, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_TRNS} -} +[_QW] = LAYOUT_planck_grid( /* Qwerty */ + 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, MO(_LW), + KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, + M(0), KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_SPC, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT, KC_TRNS +), +[_RS] = LAYOUT_planck_grid( /* RAISE */ + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_EQL, KC_TRNS +), +[_LW] = LAYOUT_planck_grid( /* LOWER */ + KC_TRNS, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_DELETE, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_F4, KC_F5, KC_F6, KC_F11, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_TRNS +) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/altgr/beakl.h b/keyboards/planck/keymaps/altgr/beakl.h index a684a6c43db0..650613a9d9c5 100644 --- a/keyboards/planck/keymaps/altgr/beakl.h +++ b/keyboards/planck/keymaps/altgr/beakl.h @@ -13,19 +13,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V }, - {KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W }, - {KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, - - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, - {KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V , + KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W , + KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), + + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W), + KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | @@ -37,12 +37,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, - {TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W), + TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | @@ -54,12 +54,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, - {TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W), + TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ..................................................................... BEAKL 8 @@ -74,19 +74,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z }, - {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z , + KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | @@ -98,12 +98,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | @@ -115,12 +115,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL 8P @@ -135,19 +135,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, - {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X , + KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | R | F | X | @@ -159,12 +159,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | F | X | @@ -176,12 +176,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ................................................................... BEAKL 8TX @@ -196,19 +196,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B }, - {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B , + KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | $ | { | } | J | ^Alt | ^GUI | G | D | R | F | X | @@ -220,12 +220,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | J | ^Alt | ^GUI | G | [ | ] | ^ | X | @@ -237,12 +237,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)}, - {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B), + S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ................................................................... BEAKL 8TT @@ -257,19 +257,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B }, - {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B , + KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | $ | { | } | J | Fn | Caps | G | D | R | F | X | @@ -281,12 +281,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | J | Fn | Caps | G | [ | ] | ^ | X | @@ -298,12 +298,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)}, - {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B), + S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL 10 @@ -318,19 +318,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V }, - {KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V , + KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W , + KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)}, - {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V), + S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | [ | ! | ] | X | ^Alt | ^GUI | G | D | N | M | V | @@ -342,12 +342,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)}, - {S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)}, - {S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V), + S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W), + S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | H | O | U | X | ^Alt | ^GUI | G | { | + | } | V | @@ -359,12 +359,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V)}, - {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V), + S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ............................................................... BEAKL Mash Up @@ -379,19 +379,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | N | M | X | @@ -403,12 +403,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | M | X | @@ -420,12 +420,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL MU @@ -440,19 +440,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | $ | { | } | Z | Fn | Caps | G | D | N | M | X | @@ -464,12 +464,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Fn | Caps | G | [ | ] | ^ | X | @@ -481,12 +481,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL SP @@ -501,19 +501,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X | @@ -525,12 +525,12 @@ // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X | @@ -542,12 +542,12 @@ // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL GR @@ -562,19 +562,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X | @@ -586,12 +586,12 @@ // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {SM_K, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + SM_K, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X | @@ -603,10 +603,10 @@ // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W }, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W , + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT + ), #endif diff --git a/keyboards/planck/keymaps/altgr/colemak.h b/keyboards/planck/keymaps/altgr/colemak.h index 8810ba82a5bb..694f16328955 100644 --- a/keyboards/planck/keymaps/altgr/colemak.h +++ b/keyboards/planck/keymaps/altgr/colemak.h @@ -13,19 +13,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, - {KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O }, - {KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O , + KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : | @@ -37,12 +37,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : | @@ -54,12 +54,12 @@ // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ..................................................................... ColemaX @@ -74,19 +74,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, - {KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O }, - {KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O , + KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : | @@ -98,12 +98,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : | @@ -115,10 +115,10 @@ // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif diff --git a/keyboards/planck/keymaps/altgr/common/chord_layout.h b/keyboards/planck/keymaps/altgr/common/chord_layout.h index 2c785d56ca75..b6922705f3a5 100644 --- a/keyboards/planck/keymaps/altgr/common/chord_layout.h +++ b/keyboards/planck/keymaps/altgr/common/chord_layout.h @@ -14,12 +14,12 @@ // | | | | | | | | f() | | | | | see _PLOVER // '-----------------------------------------------------------------------------------' - [_EDIT] = { - {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______}, - {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______}, - {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______}, - }, + [_EDIT] = LAYOUT_planck_grid( + _______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______, + UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______, + _______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______ + ), // ................................................................ Adjust Layer @@ -33,9 +33,9 @@ // | | | | f() | | | | | f() | | | | // `-----------------------------------------------------------------------------------' - [_ADJUST] = { - {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______}, - }, + [_ADJUST] = LAYOUT_planck_grid( + PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h b/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h index 528020e7417f..102d736acb71 100644 --- a/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h +++ b/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h @@ -14,16 +14,16 @@ // | | | | f() | | | | = | 0 | | | | // '-----------------------------------------------------------------------------------' - [_NUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_NUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___ #else - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___ #endif - }, + ), #else // .-----------------------------------------------------------------------------------. // | | F | E | D | | | | / | 7 | 8 | 9 | * | @@ -36,16 +36,16 @@ // | | f() | | = | 0 | | // '-----------------------------------------------------------------------------------' - [_NUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_GUI, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_NUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_GUI, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___ #else - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___ #endif - }, + ), // .-----------------------------------------------------------------------------------. // | | | | | | | | { | & | ? | : | } | @@ -57,12 +57,12 @@ // | | f() | | \ | | | | // '-----------------------------------------------------------------------------------' - [_NUMSYM] = { - {_______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR}, - {___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN}, - {_______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC}, - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___}, - }, + [_NUMSYM] = LAYOUT_planck_grid( + _______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR, + ___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN, + _______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___ + ), #endif // ............ .................................................. Function Keys @@ -78,9 +78,9 @@ // | | | | | f() | | | + | | | | | see _PLOVER // '-----------------------------------------------------------------------------------' - [_FNCKEY] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, - {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, - }, + [_FNCKEY] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 , + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 , + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 , + _______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/altgr/common/steno_layout.h b/keyboards/planck/keymaps/altgr/common/steno_layout.h index ab4a6fe011cb..c1f2b5b24ab7 100644 --- a/keyboards/planck/keymaps/altgr/common/steno_layout.h +++ b/keyboards/planck/keymaps/altgr/common/steno_layout.h @@ -13,12 +13,12 @@ // | | A | O | E | U | | // `-----------------------------------------------------------------------------------' - [_PLOVER] = { - {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, - {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, - {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, - {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______}, - }, + [_PLOVER] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + _______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______ + ), #else // ,-----------------------------------------------------------------------------------. // | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | @@ -30,10 +30,10 @@ // | | A | O | E | U | | // `-----------------------------------------------------------------------------------' - [_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______}, - }, + [_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + _______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______ + ), #endif diff --git a/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h index 79861087075c..e5c902f2dfa9 100644 --- a/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h +++ b/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h @@ -13,12 +13,12 @@ // | |Adjust| \ | | f() | | // '-----------------------------------------------------------------------------------' - [_SYMBOL] = { - {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, - {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, - }, + [_SYMBOL] = LAYOUT_planck_grid( + _______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + ___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___ + ), #else // .-----------------------------------------------------------------------------------. // | { | . | * | & | } | | | | Home | Up | End | PgUp | @@ -30,12 +30,12 @@ // | | | | \ | | f() | | // '-----------------------------------------------------------------------------------' - [_SYMBOL] = { - {KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN}, - {KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______}, - {___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, - }, + [_SYMBOL] = LAYOUT_planck_grid( + KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN, + KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______, + ___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___ + ), // .-----------------------------------------------------------------------------------. // | | ? | + | ~ | | | | | | | | | @@ -47,12 +47,12 @@ // | | | | | f() | | // '-----------------------------------------------------------------------------------' - [_SYMREG] = { - {___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___}, - {___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___}, - {___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______}, - {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, - }, + [_SYMREG] = LAYOUT_planck_grid( + ___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, + ___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___, + ___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______, + ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___ + ), #endif // ............................................................... Mouse Actions @@ -67,9 +67,9 @@ // | | | f() | | f() | | // '-----------------------------------------------------------------------------------' - [_MOUSE] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, - {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______}, - }, + [_MOUSE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, + _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/altgr/common/toggle_layout.h b/keyboards/planck/keymaps/altgr/common/toggle_layout.h index 713d27bbcfc4..ed74f42522d8 100644 --- a/keyboards/planck/keymaps/altgr/common/toggle_layout.h +++ b/keyboards/planck/keymaps/altgr/common/toggle_layout.h @@ -14,16 +14,16 @@ // | | | | f() | Space| | | = | 0 | | | | // '-----------------------------------------------------------------------------------' - [_TTNUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_TTNUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______}, + _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______ #else - {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______}, + _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______ #endif - }, + ), // ............ .................................................. Function Keys @@ -37,12 +37,12 @@ // | | | | f() | | | | + | | | | | // '-----------------------------------------------------------------------------------' - [_TTFNCKEY] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, - {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______}, - }, + [_TTFNCKEY] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 , + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 , + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 , + _______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______ + ), // ....................................................................... Regex @@ -56,12 +56,12 @@ // | | | | f() | - | | | + | Space| | | | // `-----------------------------------------------------------------------------------' - [_TTREGEX] = { - {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___}, - {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___}, - {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___}, - {_______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______}, - }, + [_TTREGEX] = LAYOUT_planck_grid( + ___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___, + ___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___, + ___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___, + _______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______ + ), // ............................................................ Navigation Layer @@ -75,12 +75,12 @@ // | | | | f() | | | | | | | | | // '-----------------------------------------------------------------------------------' - [_TTCURSOR] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_TTCURSOR] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______ + ), // ............................................................... Mouse Actions @@ -94,9 +94,9 @@ // | | | | f() | | | | | | | | | // '-----------------------------------------------------------------------------------' - [_TTMOUSE] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, - {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_TTMOUSE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, + _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/altgr/keymap.c b/keyboards/planck/keymaps/altgr/keymap.c index 5f4d1fdfdbe0..3ef9690a0a84 100644 --- a/keyboards/planck/keymaps/altgr/keymap.c +++ b/keyboards/planck/keymaps/altgr/keymap.c @@ -66,17 +66,10 @@ // sudo CPATH=/common make ... -#include "config.h" -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #ifdef STENO_ENABLE #include "keymap_steno.h" #endif -#ifdef AUDIO_ENABLE -#include "audio.h" -#endif -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -183,7 +176,7 @@ enum planck_keycodes { #define S_TAB S (KC_TAB) #define S_UP S (KC_UP) -#include "tapdance.h" +#include "common/tapdance.h" // keycodes #define ___x___ KC_TRNS @@ -256,35 +249,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #include "beakl.h" #include "colemak.h" #include "qwerty.h" -#include "steno_layout.h" +#include "common/steno_layout.h" // ...................................................... Number / Function Keys -#include "number_fkey_layout.h" +#include "common/number_fkey_layout.h" // ......................................................... Symbol / Navigation -#include "symbol_guifn_layout.h" +#include "common/symbol_guifn_layout.h" // ............................................................... Toggle Layers #ifdef CENTER_TT -#include "toggle_layout.h" +#include "common/toggle_layout.h" #endif // ......................................................... Short Cuts / Adjust -#include "chord_layout.h" +#include "common/chord_layout.h" }; // ...................................................................... Sounds -#include "sounds.h" +#include "common/sounds.h" // ........................................................... User Keycode Trap -#include "keycode_functions.h" +#include "common/keycode_functions.h" #define BASE_1 1 #define BASE_2 2 @@ -486,4 +479,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) return true; } -#include "init.h" +#include "common/init.h" diff --git a/keyboards/planck/keymaps/altgr/qwerty.h b/keyboards/planck/keymaps/altgr/qwerty.h index d11d0478b3f4..eed52f0af8e6 100644 --- a/keyboards/planck/keymaps/altgr/qwerty.h +++ b/keyboards/planck/keymaps/altgr/qwerty.h @@ -13,19 +13,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, - {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), + S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN, + S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | @@ -37,12 +37,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, - {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), + S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN, + S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | @@ -54,11 +54,11 @@ // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, - {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), + S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN, + S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif diff --git a/keyboards/planck/keymaps/andylikescandy/keymap.c b/keyboards/planck/keymaps/andylikescandy/keymap.c index f9a773398487..295616f015a3 100644 --- a/keyboards/planck/keymaps/andylikescandy/keymap.c +++ b/keyboards/planck/keymaps/andylikescandy/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -60,12 +58,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = { - {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, SFT_T(KC_ENT) }, - {KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, + [_QWERTY] = LAYOUT_planck_grid( + 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, SFT_T(KC_ENT) , + KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -78,12 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_COLEMAK] = { - {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, SFT_T(KC_ENT) }, - {KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, + [_COLEMAK] = LAYOUT_planck_grid( + 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, SFT_T(KC_ENT) , + KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Dvorak REUSED AS COLEMAK * ,-----------------------------------------------------------------------------------. @@ -96,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_DVORAK] = { - {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_QUOT}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT) }, - {KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, + [_DVORAK] = LAYOUT_planck_grid( + 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_QUOT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT) , + KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), // /* Dvorak // * ,-----------------------------------------------------------------------------------. // * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | @@ -113,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | // * `-----------------------------------------------------------------------------------' // */ - // [_DVORAK] = { - // {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 }, - // {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, NAVSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - // }, + // [_DVORAK] = LAYOUT_planck_grid( + // 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 , + // BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, NAVSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + // ), // // /* Lower // * ,-----------------------------------------------------------------------------------. @@ -131,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // * | | | | | | | | HOME | PGDN | PGUP | END | // * `-----------------------------------------------------------------------------------' // */ -[_LOWER] = { - { KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC }, - { KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE }, - { _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, KC_ENT }, - { _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END } -}, +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC , + KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE , + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, KC_ENT , + _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -149,12 +147,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | HOME | PGDN | PGUP | END | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - { 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_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT }, - { _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END } -}, +[_RAISE] = LAYOUT_planck_grid( + 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_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , + _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -168,12 +166,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -186,12 +184,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | |Qwerty|Colemk|Dvorak|Plover| * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - {LALT(LCTL(KC_DEL)), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_CAPSLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX}, - {_______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, XXXXXXX} //PLOVER} -}, +[_ADJUST] = LAYOUT_planck_grid( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , + LALT(LCTL(KC_DEL)), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_CAPSLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, XXXXXXX //PLOVER +), /* Navigation * ,-----------------------------------------------------------------------------------. * | | | | | | | | Home | PgDn | PgUp | End |ctlBsp| @@ -203,12 +201,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |C+A+S | | | | | | |C+Left|C+Down| C+Up |C+Right| * `-----------------------------------------------------------------------------------' */ -[_NAVIGATION] = { - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) }, - {KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL}, - {LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT}, - {_______, _______, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT), _______} -} +[_NAVIGATION] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) , + KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, + LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT, + _______, _______, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT), _______ +) }; diff --git a/keyboards/planck/keymaps/angerthosenear/keymap.c b/keyboards/planck/keymaps/angerthosenear/keymap.c index f22bb1f622aa..6a497641e6ba 100644 --- a/keyboards/planck/keymaps/angerthosenear/keymap.c +++ b/keyboards/planck/keymaps/angerthosenear/keymap.c @@ -1,31 +1,31 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* Qwerty */ - {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_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_QUOT}, - {KC_LCTL, KC_LGUI, KC_LALT, BL_STEP, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[0] = LAYOUT_planck_grid( /* Qwerty */ + 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_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_QUOT, + KC_LCTL, KC_LGUI, KC_LALT, BL_STEP, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommodate for both spacebar wiring positions -}, -[1] = { /* WASD + NumPad */ - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_PMNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PPLS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PENT, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_SPC, KC_P0, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[2] = { /* RAISE */ - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, - {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* LOWER */ - {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_DEL}, - {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -} +), +[1] = LAYOUT_planck_grid( /* WASD + NumPad */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_PMNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PPLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PENT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_SPC, KC_P0, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[2] = LAYOUT_planck_grid( /* RAISE */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_planck_grid( /* LOWER */ + S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_DEL, + KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END +) }; diff --git a/keyboards/planck/keymaps/austin/keymap.c b/keyboards/planck/keymaps/austin/keymap.c index 23dc2d4150fb..16bca7951056 100644 --- a/keyboards/planck/keymaps/austin/keymap.c +++ b/keyboards/planck/keymaps/austin/keymap.c @@ -1,31 +1,31 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* Qwerty */ - {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}, - {BL_STEP, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[0] = LAYOUT_planck_grid( /* Qwerty */ + 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, + BL_STEP, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommadate for both spacebar wiring positions -}, -[1] = { /* Colemak */ - {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}, - {KC_FN3, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[2] = { /* RAISE */ - {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, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* LOWER */ - {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -} +), +[1] = LAYOUT_planck_grid( /* Colemak */ + 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, + KC_FN3, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[2] = LAYOUT_planck_grid( /* RAISE */ + 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, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_planck_grid( /* LOWER */ + S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, + KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +) }; diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c index ca11be8255ac..8fe66b37812e 100644 --- a/keyboards/planck/keymaps/aviator/keymap.c +++ b/keyboards/planck/keymaps/aviator/keymap.c @@ -4,9 +4,7 @@ * Designed for aeronautical data entry on the OLKB Planck. */ - #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" - #include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -41,12 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Data * ,-----------------------------------------------------------------------------------. @@ -59,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . |Shift |Enter | * `-----------------------------------------------------------------------------------' */ -[_DATA] = { - {KC_ESC, KC_HOME, KC_UP, KC_END, ___x___, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC}, - {KC_TAB, KC_LEFT, KC_DOWN, KC_RIGHT, ___x___, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, KC_ENT}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_0, KC_DOT, KC_RSFT, KC_ENT} -}, +[_DATA] = LAYOUT_planck_grid( + KC_ESC, KC_HOME, KC_UP, KC_END, ___x___, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC, + KC_TAB, KC_LEFT, KC_DOWN, KC_RIGHT, ___x___, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_0, KC_DOT, KC_RSFT, KC_ENT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -77,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home |Pg Dn |Pg Up | End | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_DEL, 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_GRV, ___x___, ___x___, ___x___, ___x___, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS}, - {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_LOWER] = LAYOUT_planck_grid( + KC_DEL, 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_GRV, ___x___, ___x___, ___x___, ___x___, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, + _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -95,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | 0 | . |Shift |Enter | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC}, - {_______, KC_F5, KC_F6, KC_F7, KC_F8, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB}, - {_______, KC_F9, KC_F10, KC_F11, KC_F12, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, _______,}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_RSFT, KC_ENT} -}, +[_RAISE] = LAYOUT_planck_grid( + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC, + _______, KC_F5, KC_F6, KC_F7, KC_F8, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB, + _______, KC_F9, KC_F10, KC_F11, KC_F12, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_RSFT, KC_ENT +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -113,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {KC_ESC, RESET, DEBUG, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_DEL}, - {_______, ___x___, ___x___, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DATA, ___x___, ___x___, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, ___x___, ___x___, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + KC_ESC, RESET, DEBUG, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_DEL, + _______, ___x___, ___x___, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DATA, ___x___, ___x___, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, ___x___, ___x___, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/planck/keymaps/basic/keymap.c b/keyboards/planck/keymaps/basic/keymap.c index 4458c32a7627..09efbc146fbd 100644 --- a/keyboards/planck/keymaps/basic/keymap.c +++ b/keyboards/planck/keymaps/basic/keymap.c @@ -1,5 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#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. @@ -19,12 +18,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[0] = { - {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_RSFT, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[0] = LAYOUT_planck_grid( + 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_RSFT, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -37,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Reset | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[1] = { - {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_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),_______, _______, _______}, - {RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[1] = LAYOUT_planck_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_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),_______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -55,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Reset | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[2] = { - {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_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, _______, _______, _______}, - {RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[2] = LAYOUT_planck_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_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, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), }; diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 263c4102df59..81ba356d3da6 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -1,8 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif +#include QMK_KEYBOARD_H #include "keymap_german.h" // for intellisense, has to be commented for building @@ -32,13 +28,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ -[0] = { - { DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q }, - //{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, - { MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, - { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, - { KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } -}, +[0] = LAYOUT_planck_grid( + DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q , + // LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) , + MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) , + KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT , + KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL +), /* M1 Special Characters * very ergonomic placement for coding @@ -52,12 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ -[1] = { - { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT }, - { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ }, - { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } -}, +[1] = LAYOUT_planck_grid( + DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT , + _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ , + _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* M2 Navigation & Number Blocks * very easy to get used to & intuituve placement @@ -71,12 +67,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ -[2] = { - { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS }, - { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT }, - { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ }, - { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } -}, +[2] = LAYOUT_planck_grid( + XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS , + KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT , + _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ , + _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ +), /* M3 Switched Navigation & Number Blocks for one handed use * accessed by sliding from M2 to M3 with thumb @@ -91,12 +87,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[3] = { - { KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX }, - { _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, - { _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ }, - { _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ } -}, +[3] = LAYOUT_planck_grid( + KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX , + _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ , + _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ , + _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ +), /* M4 Function & Media Keys @@ -110,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ -[4] = { - { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX }, - { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT }, - { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, - { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ } -}, +[4] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX , + KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT , + _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ , + _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ +), /* M5 Switched Function & Media Keys| @@ -130,12 +126,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ -[5] = { - { XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX }, - { _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ }, - { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ }, - { _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ } -} +[5] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX , + _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ , + _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ , + _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ +) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c index 47eb338a6e41..ade4ea30f070 100644 --- a/keyboards/planck/keymaps/brandon/keymap.c +++ b/keyboards/planck/keymaps/brandon/keymap.c @@ -1,9 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "keymap_plover.h" -#include "action_tapping.h" extern keymap_config_t keymap_config; @@ -46,6 +42,11 @@ enum planck_macros { #define WM_W LALT(LGUI(KC_LEFT)) #define WM_CNTR LALT(LGUI(KC_C)) +#define LT_NAVS LT(NAVIGATION_LAYER, KC_SCLN) +#define LT_NAVO LT(NAVIGATION_LAYER, KC_O) +#define LT_GUIL LT(GUI_LAYER, KC_LBRC) +#define LT_GUIR LT(GUI_LAYER, KC_RBRC) + // Special key codes enum planck_keycodes { QWERTY = SAFE_RANGE, @@ -83,12 +84,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * / / * Tap for ] [ --------'-----------------------------------------------------' */ - [BASE_QWERTY_LAYER] = { - {TD(TD_ESC_GRV), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT}, - {F(5), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, F(1), F(6)}, - {KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC}, - {F(3), ALL_T(KC_RBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_LBRC), F(4)} - }, + [BASE_QWERTY_LAYER] = LAYOUT_planck_grid( + TD(TD_ESC_GRV), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + F(5), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_NAVS, F(6), + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + LT_GUIL, ALL_T(KC_RBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_LBRC), LT_GUIR + ), /* Base layer (Colemak) * ,-----------------------------------------------------------------------. @@ -101,12 +102,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------' */ - [BASE_COLEMAK_LAYER] = { - {_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______}, - {_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, F(2), _______}, - {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - }, + [BASE_COLEMAK_LAYER] = LAYOUT_planck_grid( + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, LT_NAVO, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* Base layer (Qwerty-Steno) * ,-----------------------------------------------------------------------. @@ -119,12 +120,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Exit | | | A | O | | E | U | | | | * `-----------------------------------------------------------------------' */ - [BASE_STENO_LAYER] = { - {PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM}, - {PV_LOOK, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD}, - {PV_LOOK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ}, - {PV_EXIT, ___x___, ___x___, PV_A, PV_O, _______, _______, PV_E, PV_U, ___x___, ___x___, ___x___} - }, + [BASE_STENO_LAYER] = LAYOUT_planck_grid( + PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, + PV_LOOK, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, + PV_LOOK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, + PV_EXIT, ___x___, ___x___, PV_A, PV_O, _______, _______, PV_E, PV_U, ___x___, ___x___, ___x___ + ), /* Numeric layer * ,-----------------------------------------------------------------------. @@ -137,12 +138,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Backspace | | | | | | * `-----------------------------------------------------------------------' */ - [LOWER_LAYER] = { - {LGUI(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3)}, - {F(5), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, F(6)}, - {KC_LSPO, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC}, - {F(3), ALL_T(KC_LBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_BSPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_RBRC), F(4)} - }, + [LOWER_LAYER] = LAYOUT_planck_grid( + LGUI(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3), + F(5), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, F(6), + KC_LSPO, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + LT_GUIL, ALL_T(KC_LBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_BSPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_RBRC), LT_GUIR + ), /* Symbol layer * ,-----------------------------------------------------------------------. @@ -155,12 +156,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Delete | | | | | | * `-----------------------------------------------------------------------' */ - [RAISE_LAYER] = { - {_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(KC_3)}, - {_______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_QUOT, S(KC_QUOT), _______}, - {_______, KC_UNDS, KC_PLUS, KC_TILD, KC_PIPE, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, KC_DEL, KC_DEL, _______, _______, _______, _______, _______} - }, + [RAISE_LAYER] = LAYOUT_planck_grid( + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(KC_3), + _______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_QUOT, S(KC_QUOT), _______, + _______, KC_UNDS, KC_PLUS, KC_TILD, KC_PIPE, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, KC_DEL, KC_DEL, _______, _______, _______, _______, _______ + ), /* Directional navigation layer * @@ -175,12 +176,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------' */ - [NAVIGATION_LAYER] = { - {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, - {_______, ___x___, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, F(1), _______}, - {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______}, - {_______, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, _______} - }, + [NAVIGATION_LAYER] = LAYOUT_planck_grid( + ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, + _______, ___x___, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, LT_NAVS, _______, + _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______, + _______, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, _______ + ), /* GUI (window management/mouse/media controls) layer * @@ -196,12 +197,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------' * \___ Media ___/ \___ Screen/sleep __/ \___ Volume __/ */ - [GUI_LAYER] = { - {_______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, ___x___, ___x___, WM_PREV, WM_NW, WM_N, WM_NE, _______}, - {_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, ___x___, ___x___, WM_FULL, WM_W, WM_CNTR, WM_E, _______}, - {_______, KC_WH_L, KC_BTN3, KC_WH_R, ___x___, ___x___, ___x___, WM_NEXT, WM_SW, WM_S, WM_SE, _______}, - {_______, KC_MPRV, KC_MPLY, KC_MNXT, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, KC_MUTE, KC_VOLD, KC_VOLU, _______} - }, + [GUI_LAYER] = LAYOUT_planck_grid( + _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, ___x___, ___x___, WM_PREV, WM_NW, WM_N, WM_NE, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, ___x___, ___x___, WM_FULL, WM_W, WM_CNTR, WM_E, _______, + _______, KC_WH_L, KC_BTN3, KC_WH_R, ___x___, ___x___, ___x___, WM_NEXT, WM_SW, WM_S, WM_SE, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, KC_MUTE, KC_VOLD, KC_VOLU, _______ + ), /* Keyboard settings layer * ,-----------------------------------------------------------------------. @@ -215,21 +216,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------' * \_____________\_ Backlight _/ */ - [KEYBOARD_LAYER] = { - {___x___, RESET, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, - {___x___, QWERTY, COLEMAK, STENO, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, - {___x___, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, AU_ON, AU_OFF, ___x___}, - {___x___, ___x___, ___x___, ___x___, LOWER, BL_TOGG, BL_TOGG, RAISE, BL_TOGG, BL_DEC, BL_INC, ___x___} - } + [KEYBOARD_LAYER] = LAYOUT_planck_grid( + ___x___, RESET, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, + ___x___, QWERTY, COLEMAK, STENO, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, + ___x___, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, AU_ON, AU_OFF, ___x___, + ___x___, ___x___, ___x___, ___x___, LOWER, BL_TOGG, BL_TOGG, RAISE, BL_TOGG, BL_DEC, BL_INC, ___x___ + ) }; const uint16_t PROGMEM fn_actions[] = { - // Layer switching - [1] = ACTION_LAYER_TAP_KEY(NAVIGATION_LAYER, KC_SCOLON), - [2] = ACTION_LAYER_TAP_KEY(NAVIGATION_LAYER, KC_O), - [3] = ACTION_LAYER_TAP_KEY(GUI_LAYER, KC_LBRACKET), - [4] = ACTION_LAYER_TAP_KEY(GUI_LAYER, KC_RBRACKET), - // Modifiers [5] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), [6] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT), diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index f5e9cdbcd8c0..683b9342d80b 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -1,10 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#include "config.h" -#include "quantum.h" +#include QMK_KEYBOARD_H #include "version.h" /* Each layer is given a name to aid in readability, which is then @@ -119,38 +113,38 @@ enum macro_id { /* Note that Planck has dimensions 4 rows x 12 columns */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = { /* Qwerty */ - {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_SCLN, CTLENTER}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE }, - {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, ALTRIGHT} +[_QWERTY] = LAYOUT_planck_grid( /* Qwerty */ + 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_SCLN, CTLENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE , + KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, ALTRIGHT /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ -}, -[_RAISE] = { /* RAISE */ - {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_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, - {_______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP} -}, -[_LOWER] = { /* LOWER */ - {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_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, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______}, - {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP} - }, -[_KEYPAD] = { /* Key Pad */ - {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, - {KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, - {KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, - {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, - -[_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ - {ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } -} +), +[_RAISE] = LAYOUT_planck_grid( /* RAISE */ + 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_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______, + _______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP +), +[_LOWER] = LAYOUT_planck_grid( /* LOWER */ + 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_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, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______, + _______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP + ), +[_KEYPAD] = LAYOUT_planck_grid( /* Key Pad */ + KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC, + KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE, + KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER, + KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), + +[_ADJUST] = LAYOUT_planck_grid( /* Adjustments - gonna shift the wild tools in here */ + ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; /* This bit of logic seeds a wee linear congruential random number generator */ diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index df57d5828b28..23af2277bd64 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c @@ -1,14 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -51,12 +42,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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, F(0) }, - {KC_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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, F(0) , + KC_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -69,12 +60,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -87,12 +78,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -105,12 +96,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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, _______}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} -}, +[_LOWER] = LAYOUT_planck_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_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, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT +), \ /* Raise * ,-----------------------------------------------------------------------------------. @@ -123,12 +114,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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, _______}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} -}, +[_RAISE] = LAYOUT_planck_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_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, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -142,12 +133,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Numpad * ,-----------------------------------------------------------------------------------. @@ -160,12 +151,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Exit | Ctrl | Alt | Gui | | 0 | . | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = { - {KC_TAB, XXXXXXX, XXXXXXX, KC_CIRC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_EQL, XXXXXXX, KC_BSPC}, - {KC_ESC, XXXXXXX, XXXXXXX, KC_PERC, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LPRN, KC_RPRN, XXXXXXX}, - {KC_LSFT, XXXXXXX, XXXXXXX, KC_DLR, KC_DEL, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LBRC, KC_RBRC, KC_ENT }, - {EXT_NUM, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_P0, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_NUMPAD] = LAYOUT_planck_grid( + KC_TAB, XXXXXXX, XXXXXXX, KC_CIRC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_EQL, XXXXXXX, KC_BSPC, + KC_ESC, XXXXXXX, XXXXXXX, KC_PERC, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LPRN, KC_RPRN, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, KC_DLR, KC_DEL, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LBRC, KC_RBRC, KC_ENT , + EXT_NUM, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_P0, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -178,12 +169,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - { M(1) , _______, _______, _______, _______, _______, NUMPAD, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {KC_CAPS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + M(1) , _______, _______, _______, _______, _______, NUMPAD, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + KC_CAPS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/charlie/keymap.c b/keyboards/planck/keymaps/charlie/keymap.c index d5e17d7f9c20..29d05022381c 100644 --- a/keyboards/planck/keymaps/charlie/keymap.c +++ b/keyboards/planck/keymaps/charlie/keymap.c @@ -1,24 +1,24 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Native */ - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, FUNC(2)}, - {KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {KC_DEL, KC_LCTL, KC_NO, KC_LSFT, KC_LALT, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, - [1] = { /* QWERTY->PHOTOSHOP */ - {KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, FUNC(1)}, - {KC_O, KC_G, KC_S, KC_U, KC_T, FUNC(27), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9}, - {KC_TAB, FUNC(4), FUNC(5), FUNC(6), KC_F1, FUNC(7), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, FUNC(9)}, - {KC_COMM, KC_DOT, KC_R, FUNC(11), MO(2), KC_SPC, FUNC(12), KC_F2, FUNC(8), KC_F3, KC_F14} - }, - [2] = { /* 2: FUNC(3 PHOTOSHOP */ - {KC_ESC, FUNC(25), FUNC(26), 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, FUNC(19), FUNC(20), FUNC(21)}, - {KC_C, KC_NO, FUNC(22), FUNC(5), KC_NO, FUNC(23), KC_NO, KC_NO, KC_NO, KC_NO, FUNC(13), KC_NO}, - {FUNC(14), FUNC(15), FUNC(16), FUNC(17), MO(2), KC_SPC, FUNC(18), KC_NO, KC_NO, KC_F24, KC_NO} - } + [0] = LAYOUT_planck_grid( /* Native */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, FUNC(2), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_DEL, KC_LCTL, KC_NO, KC_LSFT, KC_LALT, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + [1] = LAYOUT_planck_grid( /* QWERTY->PHOTOSHOP */ + KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, FUNC(1), + KC_O, KC_G, KC_S, KC_U, KC_T, FUNC(27), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9, + KC_TAB, FUNC(4), FUNC(5), FUNC(6), KC_F1, FUNC(7), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, FUNC(9), + KC_COMM, KC_DOT, KC_R, FUNC(11), MO(2), KC_SPC, FUNC(12), KC_F2, FUNC(8), KC_F3, KC_F14 + ), + [2] = LAYOUT_planck_grid( /* 2: FUNC(3 PHOTOSHOP */ + KC_ESC, FUNC(25), FUNC(26), 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, FUNC(19), FUNC(20), FUNC(21), + KC_C, KC_NO, FUNC(22), FUNC(5), KC_NO, FUNC(23), KC_NO, KC_NO, KC_NO, KC_NO, FUNC(13), KC_NO, + FUNC(14), FUNC(15), FUNC(16), FUNC(17), MO(2), KC_SPC, FUNC(18), KC_NO, KC_NO, KC_F24, KC_NO + ) }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index c2399bf3053e..018cff4e54d8 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c @@ -1,12 +1,6 @@ // Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6 -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE -#include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -67,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Cmd | Vol- | ACTN | Space | NUMS | Vol+ | Left | Down | Left | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_SCLN, KC_QUOT}, - {SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT}, - {KC_LCTL, KC_LALT, KC_LGUI, KC_VOLD, ACTION, KC_SPC, KC_SPC, NUMBER, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_SCLN, KC_QUOT, + SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_VOLD, ACTION, KC_SPC, KC_SPC, NUMBER, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT +), /* DVORAK * ,-----------------------------------------------------------------------------------. @@ -85,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______}, - {_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_Z }, - {_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_DVORAK] = LAYOUT_planck_grid( + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_Z , + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* LOCK * ,-----------------------------------------------------------------------------------. @@ -103,12 +97,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | NULL | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_LOCKED] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_LOCKED] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* NUMBERS * ,-----------------------------------------------------------------------------------. @@ -121,12 +115,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | NULL | | | | | | * `-----------------------------------------------------------------------------------' */ -[_NUMBER] = { - {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {_______, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUES, KC_SLSH}, - {_______, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______}, - {_______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______} -}, +[_NUMBER] = LAYOUT_planck_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUES, KC_SLSH, + _______, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ +), /* ACTIONS * ,-----------------------------------------------------------------------------------. @@ -139,12 +133,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | Mute | | NULL | | NULL | Home | PgDn | End | * `-----------------------------------------------------------------------------------' */ -[_ACTION] = { - {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT }, - {_______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END } -}, +[_ACTION] = LAYOUT_planck_grid( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT , + _______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END +), /* FUNCTIONS * ,-----------------------------------------------------------------------------------. @@ -157,12 +151,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Reset| NULL | Lock | NULL | | NULL | | NULL | NULL | NULL | NULL | * `-----------------------------------------------------------------------------------' */ -[_FUNCTN] = { - {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 }, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -} +[_FUNCTN] = LAYOUT_planck_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 , + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 , + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) }; diff --git a/keyboards/planck/keymaps/coloneljesus/keymap.c b/keyboards/planck/keymaps/coloneljesus/keymap.c index 022d5520ee4d..f60adc43e650 100644 --- a/keyboards/planck/keymaps/coloneljesus/keymap.c +++ b/keyboards/planck/keymaps/coloneljesus/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -54,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | App |Lower | Space |Raise | - | = | \ | Alt | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_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, RSFT_T(KC_ENT) }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_MINS, KC_EQL, KC_BSLS, KC_RALT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_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, RSFT_T(KC_ENT) , + KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_MINS, KC_EQL, KC_BSLS, KC_RALT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -72,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -90,12 +88,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -108,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Mute | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_LCBR, KC_RCBR, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______}, - {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_NUHS), KC_MPRV, KC_MNXT, S(KC_NUBS), _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE} -}, +[_LOWER] = LAYOUT_planck_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_LCBR, KC_RCBR, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_NUHS), KC_MPRV, KC_MNXT, S(KC_NUBS), _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -126,12 +124,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Mute | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_LBRC, KC_RBRC, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_MPRV, KC_MNXT, KC_NUBS, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE} -}, +[_RAISE] = LAYOUT_planck_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_LBRC, KC_RBRC, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_MPRV, KC_MNXT, KC_NUBS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -145,12 +143,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -163,12 +161,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/corvec/keymap.c b/keyboards/planck/keymaps/corvec/keymap.c index 758a9310f8ef..3099a783453f 100644 --- a/keyboards/planck/keymaps/corvec/keymap.c +++ b/keyboards/planck/keymaps/corvec/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -140,12 +138,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {COLEMAK, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, QWERTY }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, KC_ASON, KC_ASUP}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,KC_ASRP, KC_ASOFF,KC_ASDN}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } -} +[_ADJUST] = LAYOUT_planck_grid( + COLEMAK, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, QWERTY , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, KC_ASON, KC_ASUP, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,KC_ASRP, KC_ASOFF,KC_ASDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +) }; diff --git a/keyboards/planck/keymaps/daniel/keymap.c b/keyboards/planck/keymaps/daniel/keymap.c index ae47b9ba3d27..e5b52022368e 100644 --- a/keyboards/planck/keymaps/daniel/keymap.c +++ b/keyboards/planck/keymaps/daniel/keymap.c @@ -1,30 +1,30 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* Qwerty */ - {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_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}, - {MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[0] = LAYOUT_planck_grid( /* Qwerty */ + 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_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, + MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommadate for both spacebar wiring positions -}, -[1] = { /* RAISE */ - {KC_GRV, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_EQL}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, S(KC_MINS), KC_BSLS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[2] = { /* LOWER */ - {S(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_EQL)}, - {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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ENT}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* Qwerty */ - {KC_ESC, 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_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_TRNS, KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +), +[1] = LAYOUT_planck_grid( /* RAISE */ + KC_GRV, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_EQL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, S(KC_MINS), KC_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[2] = LAYOUT_planck_grid( /* LOWER */ + S(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_EQL), + 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_planck_grid( /* Qwerty */ + KC_ESC, 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_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_TRNS, KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommadate for both spacebar wiring positions -} +) }; diff --git a/keyboards/planck/keymaps/danielhklein/keymap.c b/keyboards/planck/keymaps/danielhklein/keymap.c index 25463cf17c8f..a62138e33193 100644 --- a/keyboards/planck/keymaps/danielhklein/keymap.c +++ b/keyboards/planck/keymaps/danielhklein/keymap.c @@ -1,6 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -36,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, - {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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {ARROW, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_MINS} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + ARROW, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_MINS +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -55,12 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PSLS, KC_BSLS, KC_GRV}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PAST, KC_LPRN, KC_RPRN}, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, KC_LBRC, KC_RBRC}, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_0, KC_DOT, KC_PEQL, KC_PPLS, KC_LCBR, KC_RCBR} -}, +[_LOWER] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PSLS, KC_BSLS, KC_GRV, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PAST, KC_LPRN, KC_RPRN, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, KC_LBRC, KC_RBRC, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_0, KC_DOT, KC_PEQL, KC_PPLS, KC_LCBR, KC_RCBR +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -74,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_RAISE] = LAYOUT_planck_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), /* Arrow * ,----------------------------------------------------------------------------------. @@ -93,12 +91,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------' */ -[_ARROW] = { - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {_______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_ARROW] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), }; diff --git a/keyboards/planck/keymaps/david/keymap.c b/keyboards/planck/keymaps/david/keymap.c index bb0abaab7c1c..57aafed2a0d8 100644 --- a/keyboards/planck/keymaps/david/keymap.c +++ b/keyboards/planck/keymaps/david/keymap.c @@ -1,31 +1,31 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* Qwerty */ - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {M(10), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[0] = LAYOUT_planck_grid( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + M(10), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommadate for both spacebar wiring positions -}, -[1] = { /* Colemak */ - {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}, - {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[2] = { /* RAISE */ - {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, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F11, KC_F12, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* LOWER */ - {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {KC_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -} +), +[1] = LAYOUT_planck_grid( /* Colemak */ + 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, + KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[2] = LAYOUT_planck_grid( /* RAISE */ + 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, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_F11, KC_F12, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_planck_grid( /* LOWER */ + S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, + KC_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +) }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c index 256e6c4a0f16..75087eb9c90e 100644 --- a/keyboards/planck/keymaps/dbroqua/keymap.c +++ b/keyboards/planck/keymaps/dbroqua/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -27,12 +21,7 @@ enum planck_keycodes { }; // Func macro definitions. -#define SFT_TAB FUNC(0) // Tap for Enter, hold for Shift - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_MULTIMEDIA, KC_TAB) - }; +#define SFT_TAB LT(_MULTIMEDIA, KC_TAB) // Tap for Enter, hold for Shift const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -47,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | AltGr| Alt | Lower| Space | Raise| Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {SFT_TAB, 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, KC_RALT, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + SFT_TAB, 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, KC_RALT, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -65,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home | PgDwn| PgUp | End | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_LOWER] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -83,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_BSLS, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_RAISE] = LAYOUT_planck_grid( + 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_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* _MULTIMEDIA * ,-----------------------------------------------------------------------------------. @@ -101,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Prev | Play | Next | Del | * `-----------------------------------------------------------------------------------' */ -[_MULTIMEDIA] = { - {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_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, KC_INS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL} -}, +[_MULTIMEDIA] = LAYOUT_planck_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, + _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL +), /* Adjust (Lower + Raise) @@ -120,12 +109,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/dc/keymap.c b/keyboards/planck/keymaps/dc/keymap.c index 0990cae90f30..cab66434cfa6 100644 --- a/keyboards/planck/keymaps/dc/keymap.c +++ b/keyboards/planck/keymaps/dc/keymap.c @@ -1,9 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +#include QMK_KEYBOARD_H enum planck_layers { _DVORAK, @@ -62,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Action| Ctrl | GUI | Alt |Number| Space/Enter |Symbol| Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ - [_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLASH}, - {KC_LSFT, TD(0), TD(1), TD(2), KC_K, KC_X, KC_B, KC_M, TD(3), TD(4), TD(5), MT(MOD_RSFT, KC_ENT)}, - {MO(ACTIONS), KC_LCTRL, KC_LGUI, KC_LALT, NUMBERS, KC_SPACE, KC_SPACE, SYMBOLS,KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}, - }, + [_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLASH, + KC_LSFT, TD(0), TD(1), TD(2), KC_K, KC_X, KC_B, KC_M, TD(3), TD(4), TD(5), MT(MOD_RSFT, KC_ENT), + MO(ACTIONS), KC_LCTRL, KC_LGUI, KC_LALT, NUMBERS, KC_SPACE, KC_SPACE, SYMBOLS,KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), /* Numbers * ,-----------------------------------------------------------------------------------. @@ -80,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_NUMBERS] = { - {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_KP_ASTERISK, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_KP_MINUS, _______}, - {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_KP_PLUS, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_NUMBERS] = LAYOUT_planck_grid( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_KP_ASTERISK, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_KP_MINUS, _______, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_KP_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* Symbols * ,-----------------------------------------------------------------------------------. @@ -98,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_SYMBOLS] = { - {KC_GRV, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, KC_DEL}, - {KC_CAPS, _______, KC_INS, KC_PGUP, _______, _______, _______, KC_UNDS, KC_PLUS, _______, _______, KC_BSLS}, - {_______, KC_HOME, KC_END, KC_PGDN, _______, _______, _______, KC_MINUS, KC_EQL, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_SYMBOLS] = LAYOUT_planck_grid( + KC_GRV, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, KC_DEL, + KC_CAPS, _______, KC_INS, KC_PGUP, _______, _______, _______, KC_UNDS, KC_PLUS, _______, _______, KC_BSLS, + _______, KC_HOME, KC_END, KC_PGDN, _______, _______, _______, KC_MINUS, KC_EQL, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* Actions * ,-----------------------------------------------------------------------------------. @@ -116,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ACTIONS] = { - {BL_STEP, _______, _______, _______, _______, KC_SLEP, RESET, _______, _______, _______, _______, KC_DEL}, - {_______, LCTL(KC_Y), _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______}, - {_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_ACTIONS] = LAYOUT_planck_grid( + BL_STEP, _______, _______, _______, _______, KC_SLEP, RESET, _______, _______, _______, _______, KC_DEL, + _______, LCTL(KC_Y), _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* Special * ,-----------------------------------------------------------------------------------. @@ -134,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_SPECIAL] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - } + [_SPECIAL] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c index 0893059a0d43..0e53d305d524 100644 --- a/keyboards/planck/keymaps/dcompact/keymap.c +++ b/keyboards/planck/keymaps/dcompact/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #include "keymap_steno.h" // Custom Keycodes and Combinations Used @@ -64,12 +62,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl |Plover| GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter | * `-----------------------------------------------------------------------------------' */ -[_BASE] = { - { 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_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - { DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC}, - { KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT} -}, +[_BASE] = LAYOUT_planck_grid( + 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_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC, + KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -82,12 +80,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | |Raise | | | | | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX}, - { XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX}, - { XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX}, - { _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_LOWER] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, + XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, + _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -100,12 +98,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Lower | < | > | | 0 | . | , | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - { QUAKE, KC_GRV, KC_TILD, KC_BSLS, KC_PIPE, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL}, - { XXXXXXX, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_ASTR, KC_PLUS}, - { XXXXXXX, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_MINS, KC_BSPC}, - { _______, XXXXXXX, _______, _______, _______, KC_LABK, KC_RABK, _______, KC_0, KC_DOT, KC_COMM, XXXXXXX} -}, +[_RAISE] = LAYOUT_planck_grid( + QUAKE, KC_GRV, KC_TILD, KC_BSLS, KC_PIPE, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL, + XXXXXXX, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_ASTR, KC_PLUS, + XXXXXXX, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_MINS, KC_BSPC, + _______, XXXXXXX, _______, _______, _______, KC_LABK, KC_RABK, _______, KC_0, KC_DOT, KC_COMM, XXXXXXX +), /* Func * ,-----------------------------------------------------------------------------------. @@ -118,12 +116,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = { - { XXXXXXX, KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, - { XXXXXXX, KC_WAKE, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, - { XXXXXXX, KC_PWR, KC_MRWD, KC_MPLY, KC_MFFD, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, - { _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX} -}, +[_FUNC] = LAYOUT_planck_grid( + XXXXXXX, KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, + XXXXXXX, KC_WAKE, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, + XXXXXXX, KC_PWR, KC_MRWD, KC_MPLY, KC_MFFD, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX +), /* Mouse (Not Reachable on Planck) * ,-----------------------------------------------------------------------------------. @@ -136,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_MOUSE] = { - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - { XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX}, - { XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX}, - { _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX} -}, +[_MOUSE] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -155,12 +153,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, - {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, - {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, - {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2} -}, +[_PLOVER] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -173,12 +171,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - { _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, RGB_TOG, RGB_MOD, _______, _______, _______}, - { _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_VAD, RGB_VAI, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, RGB_TOG, RGB_MOD, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_VAD, RGB_VAI, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/dlaroe/keymap.c b/keyboards/planck/keymaps/dlaroe/keymap.c index 28d2ec1f6264..41b30641320c 100644 --- a/keyboards/planck/keymaps/dlaroe/keymap.c +++ b/keyboards/planck/keymaps/dlaroe/keymap.c @@ -1,13 +1,7 @@ // Can't Remember Sh*t Keymap for Planck // http://www.keyboard-layout-editor.com/#/gists/c6c0ac051b2b118a34ef84ebadab54c7 -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -47,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | \ | Alt | Lower| Space |Raise | [ | - | = | ] | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_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, SFT_T(KC_ENT) }, - {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, LT(_LOWER, KC_LBRC), KC_MINS, KC_EQL, MT(MOD_RCTL, KC_RBRC)} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_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, SFT_T(KC_ENT) , + KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, LT(_LOWER, KC_LBRC), KC_MINS, KC_EQL, MT(MOD_RCTL, KC_RBRC) +), /* Arrow * ,-----------------------------------------------------------------------------------. @@ -65,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | \ | Alt | Lower| Space |Raise | Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ -[_ARROW] = { - {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_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, SFT_T(KC_ENT) }, - {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, +[_ARROW] = LAYOUT_planck_grid( + 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_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, SFT_T(KC_ENT) , + KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), /* Game @@ -84,12 +78,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Alt | 4 | 3 | 2 | Lower| Space |Raise | Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ -[_GAME] = { - { KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {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_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ }, - {KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, +[_GAME] = LAYOUT_planck_grid( + KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ , + KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), /* Lower (switched to # because KP# were weird in terminal emulators) @@ -103,12 +97,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Esc | | | | | 0 | | | | KP_+ | | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - { KC_DEL, 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_4, KC_5, KC_6, KC_DOT, KC_ASTR}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______}, - {KC_ESC, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______, KC_PLUS, _______} -}, +[_LOWER] = LAYOUT_planck_grid( + KC_DEL, 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_4, KC_5, KC_6, KC_DOT, KC_ASTR, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______, + KC_ESC, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______, KC_PLUS, _______ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -121,12 +115,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | App | | | | Ins | | Home | PGDN | PGUP | End | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV}, - {_______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______}, - {_______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_RAISE] = LAYOUT_planck_grid( + 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_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV, + _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______, + _______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -140,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -158,12 +152,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| | | | | Play/Pause | | BL_T |BL_DEC|BL_INC|BL_ST | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, PLOVER, LALT(LCTL(KC_DEL))}, - {KC_CAPS, ARROW, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, KC_PSCR, KC_SLCK, KC_PAUS, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, - {BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP} -} +[_ADJUST] = LAYOUT_planck_grid( + LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, PLOVER, LALT(LCTL(KC_DEL)), + KC_CAPS, ARROW, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP +) }; diff --git a/keyboards/planck/keymaps/dodger/keymap.c b/keyboards/planck/keymaps/dodger/keymap.c index 2dd6af266880..421c719c2536 100644 --- a/keyboards/planck/keymaps/dodger/keymap.c +++ b/keyboards/planck/keymaps/dodger/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; bool isGame = false; @@ -74,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt |lenny |Lower | shift|space |Raise | macro|macro2|macro3|QWERTY| * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL}, - {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_MINS}, - {KC_LCTL, KC_LGUI, KC_LALT, LENNY, LOWER, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, COMMENTHEAD, RICKANDMORT, KC_LEFT, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL, + 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_MINS, + KC_LCTL, KC_LGUI, KC_LALT, LENNY, LOWER, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, COMMENTHEAD, RICKANDMORT, KC_LEFT, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -92,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {_______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, _______, S(KC_EQL)}, - {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_UNDS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_grid( + _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, _______, S(KC_EQL), + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_UNDS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -110,12 +108,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | bl- | bl+ | GCTG | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, MCTOGG, GCTOGG} -}, +[_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, MCTOGG, GCTOGG +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -128,26 +126,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, COLEMAK, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, COLEMAK, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), -[_GAME] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL}, - {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_MINS}, - {KC_LCTL, RAISE, KC_LALT, LOWER, KC_SPC, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, +[_GAME] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL, + 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_MINS, + KC_LCTL, RAISE, KC_LALT, LOWER, KC_SPC, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), -[_MUSIC] = { - {MARIO, MARIOE, OVERWATCH, DOOM, DISNEY, NUMBERONE, CABBAGE, OLDSPICE, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_MUSIC] = LAYOUT_planck_grid( + MARIO, MARIOE, OVERWATCH, DOOM, DISNEY, NUMBERONE, CABBAGE, OLDSPICE, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/dr0ck/keymap.c b/keyboards/planck/keymaps/dr0ck/keymap.c index 2c6d02f236bc..0d28698d29d9 100644 --- a/keyboards/planck/keymaps/dr0ck/keymap.c +++ b/keyboards/planck/keymaps/dr0ck/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -56,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | Esc |Lower |Enter |Space |Raise | Func | Alt |Prt Sc| Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {FUNCTION,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_LGUI, KC_ESC, LOWER, KC_ENT, KC_SPC, RAISE, FUNCTION, KC_RALT,KC_PSCR, KC_RCTL} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + FUNCTION,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_LGUI, KC_ESC, LOWER, KC_ENT, KC_SPC, RAISE, FUNCTION, KC_RALT,KC_PSCR, KC_RCTL +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -74,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {FUNCTION,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 }, - {KC_LCTL, KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + FUNCTION,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 , + KC_LCTL, KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -92,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {FUNCTION,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 }, - {KC_LCTL, KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + FUNCTION,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 , + KC_LCTL, KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -110,12 +108,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home |Pg Up |Pg Dn | End | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END} -}, +[_LOWER] = LAYOUT_planck_grid( + 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -128,12 +126,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home |Pg Up |Pg Dn | End | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END} -}, +[_RAISE] = LAYOUT_planck_grid( + 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_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -147,12 +145,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -165,12 +163,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Function * ,-----------------------------------------------------------------------------------. @@ -183,12 +181,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | | | | |Enter |Space | | | | | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_FUNCTION] = { - {KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_F5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______}, - {KC_LSFT, _______, _______, _______, _______, _______, KC_END , _______, _______, _______, _______, KC_RSFT}, - {KC_LCTL, _______, _______, _______, KC_ENT, KC_SPC, _______, _______, _______, _______, _______, KC_RCTL} -} +[_FUNCTION] = LAYOUT_planck_grid( + KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_F5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL, + _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, KC_END , _______, _______, _______, _______, KC_RSFT, + KC_LCTL, _______, _______, _______, KC_ENT, KC_SPC, _______, _______, _______, _______, _______, KC_RCTL +) }; diff --git a/keyboards/planck/keymaps/dudeofawesome/keymap.c b/keyboards/planck/keymaps/dudeofawesome/keymap.c index ab1dd5f1e0b4..c28b8dfdd29d 100644 --- a/keyboards/planck/keymaps/dudeofawesome/keymap.c +++ b/keyboards/planck/keymaps/dudeofawesome/keymap.c @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -55,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = { - {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, RSFT_T(KC_ENT)}, - {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } - }, + [_QWERTY] = LAYOUT_planck_grid( + 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, RSFT_T(KC_ENT), + TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Workman * ,-----------------------------------------------------------------------------------. @@ -73,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ - [_WORKMAN] = { - {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC }, - {KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT }, - {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT)}, - {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } - }, + [_WORKMAN] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC , + KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT , + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), + TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -91,12 +88,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ - [_COLEMAK] = { - {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, RSFT_T(KC_ENT)}, - {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, + [_COLEMAK] = LAYOUT_planck_grid( + 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, RSFT_T(KC_ENT), + TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -109,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ - [_DVORAK] = { - {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, RSFT_T(KC_ENT)}, - {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } - }, + [_DVORAK] = LAYOUT_planck_grid( + 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, RSFT_T(KC_ENT), + TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -127,12 +124,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = { - {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_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_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} - }, + [_LOWER] = LAYOUT_planck_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_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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -145,12 +142,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = { - {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_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_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} - }, + [_RAISE] = LAYOUT_planck_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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -163,12 +160,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, - {KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_M_R, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - }, + [_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL , + KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_M_R, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* Numpad * ,-----------------------------------------------------------------------------------. @@ -181,12 +178,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | ✗ | | 0 | 0 | . | / | = | * `-----------------------------------------------------------------------------------' */ - [_NUMPAD] = { - {_______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______}, - {_______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_NO}, - {_______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, KC_P1, KC_P2, KC_P3, KC_PAST, KC_PENT}, - {_______, _______, _______, _______, KC_NO, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PSLS, KC_PEQL} - } + [_NUMPAD] = LAYOUT_planck_grid( + _______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + _______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_NO, + _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, KC_P1, KC_P2, KC_P3, KC_PAST, KC_PENT, + _______, _______, _______, _______, KC_NO, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PSLS, KC_PEQL + ) }; diff --git a/keyboards/planck/keymaps/dzobert/keymap.c b/keyboards/planck/keymaps/dzobert/keymap.c index 3cd8731b060d..17b1bef01930 100644 --- a/keyboards/planck/keymaps/dzobert/keymap.c +++ b/keyboards/planck/keymaps/dzobert/keymap.c @@ -1,31 +1,31 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* Qwerty */ - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB}, - {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC}, - {KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {KC_FN4, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[0] = LAYOUT_planck_grid( /* Qwerty */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC, + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_FN4, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommadate for both spacebar wiring positions -}, -[1] = { /* Colemak */ - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB}, - {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_BSPC}, - {KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, - {KC_FN3, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[2] = { /* RAISE */ - {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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_DEL}, - {KC_TRNS, KC_GRV, KC_MINS, KC_EQL, KC_QUOT, S(KC_QUOT), S(KC_LBRC), S(KC_RBRC), KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGUP, KC_PGDN, KC_END} -}, -[3] = { /* LOWER */ - {KC_POWER,KC_PSCR, KC_SLCK, KC_PAUSE, KC_NLCK, KC_EXECUTE, KC_MENU, KC_APP, KC_7, KC_8, KC_9, KC_KP_SLASH}, - {KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_CAPS, KC_CANCEL, KC_UNDO, KC_AGAIN, KC_4, KC_5, KC_6, KC_KP_ASTERISK}, - {KC_TRNS, KC_INSERT,KC_CUT, KC_COPY, KC_PASTE, KC_BSLS, KC_9, KC_0, KC_1, KC_2, KC_3, KC_KP_MINUS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS} -} +), +[1] = LAYOUT_planck_grid( /* Colemak */ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_BSPC, + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_FN3, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[2] = LAYOUT_planck_grid( /* RAISE */ + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_DEL, + KC_TRNS, KC_GRV, KC_MINS, KC_EQL, KC_QUOT, S(KC_QUOT), S(KC_LBRC), S(KC_RBRC), KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGUP, KC_PGDN, KC_END +), +[3] = LAYOUT_planck_grid( /* LOWER */ + KC_POWER,KC_PSCR, KC_SLCK, KC_PAUSE, KC_NLCK, KC_EXECUTE, KC_MENU, KC_APP, KC_7, KC_8, KC_9, KC_KP_SLASH, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_CAPS, KC_CANCEL, KC_UNDO, KC_AGAIN, KC_4, KC_5, KC_6, KC_KP_ASTERISK, + KC_TRNS, KC_INSERT,KC_CUT, KC_COPY, KC_PASTE, KC_BSLS, KC_9, KC_0, KC_1, KC_2, KC_3, KC_KP_MINUS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS +) }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c index e8a1d437a99b..4a8a7d0c5118 100644 --- a/keyboards/planck/keymaps/emilyh/keymap.c +++ b/keyboards/planck/keymaps/emilyh/keymap.c @@ -1,13 +1,7 @@ // This is the canonical layout file for the Quantum project. If you want to add another keyboard, // this is the style you want to emulate. -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -50,12 +44,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Brite| GUI | Alt |Lower | Space |Raise | / | Left | Down |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT }, - {KC_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , + KC_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -68,12 +62,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -86,12 +80,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -104,12 +98,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | End | Prev | Vol- | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_TILD, 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), KC_HOME, KC_MNXT, KC_VOLU, KC_MUTE}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_MPRV, KC_VOLD, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_grid( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_TILD, 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), KC_HOME, KC_MNXT, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_MPRV, KC_VOLD, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -122,12 +116,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | |Pg Dn | Prev | Vol- | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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, TO(_PLOVER), KC_PGUP, KC_MNXT, KC_VOLU, KC_MUTE}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MPRV, KC_VOLD, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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, TO(_PLOVER), KC_PGUP, KC_MNXT, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MPRV, KC_VOLD, KC_MPLY +), /* Numpad Layer * ,-----------------------------------------------------------------------------------. @@ -141,12 +135,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_ESC , XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN,XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC}, - {KC_TAB , KC_PPLS, KC_PMNS, KC_PAST, KC_PSLS,XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_UP, _______}, - {TO(_QWERTY),KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX, KC_SPC, KC_SPC, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_ESC , XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN,XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC, + KC_TAB , KC_PPLS, KC_PMNS, KC_PAST, KC_PSLS,XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_UP, _______, + TO(_QWERTY),KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX, KC_SPC, KC_SPC, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -159,12 +153,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c index 5615a78bf75e..924a8c35c681 100644 --- a/keyboards/planck/keymaps/espynn/keymap.c +++ b/keyboards/planck/keymaps/espynn/keymap.c @@ -1,10 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; // Symbolic names for macro IDs. @@ -40,8 +34,8 @@ extern keymap_config_t keymap_config; #define CUT M(_CUT) // Func macro definitions. -#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER -#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE +#define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER +#define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE #define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) #define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift #define ZM_NRM FUNC(4) // Zoom normal @@ -50,8 +44,6 @@ extern keymap_config_t keymap_config; // Enable these functions using FUNC(n) macro. const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN), - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP), [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), @@ -62,30 +54,30 @@ const uint16_t PROGMEM fn_actions[] = { // This config can be found at Keyboard layout editor site: https://goo.gl/cF7uIO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = { /* QWERTY */ - {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_DEL, 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, SFT_ENT}, - {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_LOWER] = { /* LOWER */ - {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_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_MINS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[_RAISE] = { /* RAISE */ - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, S(KC_COMM), S(KC_DOT), KC_BSLS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[_CUSTOM] = { /* CUSTOM */ - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, CUS4, KC_TRNS, KC_F12, KC_TRNS}, - {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {BL, RESET, LALT(LCTL(KC_DEL)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -} +[_QWERTY] = LAYOUT_planck_grid( /* QWERTY */ + 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_DEL, 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, SFT_ENT, + KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_LOWER] = LAYOUT_planck_grid( /* LOWER */ + 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_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_MINS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[_RAISE] = LAYOUT_planck_grid( /* RAISE */ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, S(KC_COMM), S(KC_DOT), KC_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[_CUSTOM] = LAYOUT_planck_grid( /* CUSTOM */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, CUS4, KC_TRNS, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL, RESET, LALT(LCTL(KC_DEL)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) }; // Set a layer persistently. diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index 0c592ce6e603..2024552004fb 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -1,13 +1,6 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #include "keymap_steno.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif - -#include "eeconfig.h" #include "version.h" extern keymap_config_t keymap_config; @@ -46,12 +39,12 @@ enum planck_keycodes { #define SW_SPC SH_T(KC_SPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { - {QWERTY, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, - {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, - {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, - {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL} -}, +[0] = LAYOUT_planck_grid( + QWERTY, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, + KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, + KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, + KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL +), /* Qwerty ,-----------------------------------------------------------------------------------. @@ -64,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -82,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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 }, - {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -100,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -118,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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} -}, +[_LOWER] = LAYOUT_planck_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_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 * ,-----------------------------------------------------------------------------------. @@ -136,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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_NUHS, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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_NUHS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -155,12 +148,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, - {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, - {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, - {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2} -}, +[_PLOVER] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -173,12 +166,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/gabriel/keymap.c b/keyboards/planck/keymaps/gabriel/keymap.c index e0f74804f7da..d0f792c3128c 100644 --- a/keyboards/planck/keymaps/gabriel/keymap.c +++ b/keyboards/planck/keymaps/gabriel/keymap.c @@ -1,5 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#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. @@ -26,12 +25,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | fn | ctl | alt | cmd |lower| spc |raise|left |down | up |right| * `-----------------------------------------------------------------------' */ -[_QW] = { /* QWERTY */ - {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_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 }, - {MO(_FN), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QW] = LAYOUT_planck_grid( /* QWERTY */ + 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_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 , + MO(_FN), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* MIT Layout (Raised layer) * * ,-----------------------------------------------------------------------. @@ -44,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------' */ -[_RS] = { /* RAISE */ - {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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE}, - {KC_TRNS, 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} -}, +[_RS] = LAYOUT_planck_grid( /* RAISE */ + 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE, + KC_TRNS, 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 +), /* MIT Layout (Lowered layer) * * ,-----------------------------------------------------------------------. @@ -62,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------' */ -[_LW] = { /* LOWER */ - {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_BSLS}, - {KC_TRNS, 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} -}, +[_LW] = LAYOUT_planck_grid( /* LOWER */ + 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_BSLS, + KC_TRNS, 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 +), /* MIT Layout (FN layer) * * ,-----------------------------------------------------------------------. @@ -80,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | |home |pgdn |pgup | end | * `-----------------------------------------------------------------------' */ -[_FN] = { /* FUNCTION */ - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -} +[_FN] = LAYOUT_planck_grid( /* FUNCTION */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END +) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/grahampheath/keymap.c b/keyboards/planck/keymaps/grahampheath/keymap.c index 51b8617ad6d6..babe67c442c4 100644 --- a/keyboards/planck/keymaps/grahampheath/keymap.c +++ b/keyboards/planck/keymaps/grahampheath/keymap.c @@ -13,10 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "action_code.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -86,12 +83,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * - Right Shift: Tap for Enter, hold for shift. * - Escape: Tap for Esc, hold for Ctrl. */ -[_QWERTY] = { - {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_X0, 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_X1 }, - {KC_MOUS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_X0, 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_X1 , + KC_MOUS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -104,12 +101,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -122,12 +119,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Emoji Layer @@ -142,12 +139,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ │Brig-│ Sleep │Brig+│ 👈 │ 👎 | 👍 │ 👉 │ * └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘ */ -[_EMOJI] = { - {HYPR_0, _______, WINK, _______, _______, TOUNGE, _______, _______, CRY, FLIP, _______, _______}, - {HYPR_1, ABOVE, SHRUG, _______, FROWN, _______, HEART, JOY, _______, LLAP, _______, _______}, - {HYPR_2, _______, _______, _______, CONFUSED, _______, _______, GRIN, SHIT, _______, _______, _______}, - {_______, _______, _______, _______, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, FNGLEFT, THMBDN, THMBUP, FNGRIGHT} -}, +[_EMOJI] = LAYOUT_planck_grid( + HYPR_0, _______, WINK, _______, _______, TOUNGE, _______, _______, CRY, FLIP, _______, _______, + HYPR_1, ABOVE, SHRUG, _______, FROWN, _______, HEART, JOY, _______, LLAP, _______, _______, + HYPR_2, _______, _______, _______, CONFUSED, _______, _______, GRIN, SHIT, _______, _______, _______, + _______, _______, _______, _______, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, FNGLEFT, THMBDN, THMBUP, FNGRIGHT +), /* Lower @@ -161,12 +158,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | |Tab-L | 👎 | 👍 |Tab-R | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______}, - {_______, _______, _______, _______, _______, KC_QS, KC_QS, _______, KC_TABL, THMBDN, THMBUP, KC_TABR} -}, +[_LOWER] = LAYOUT_planck_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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______, + _______, _______, _______, _______, _______, KC_QS, KC_QS, _______, KC_TABL, THMBDN, THMBUP, KC_TABR +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -179,12 +176,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Left | Down | Right| * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, KC_UP, KC_X2}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT} -}, +[_RAISE] = LAYOUT_planck_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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, KC_UP, KC_X2, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -197,12 +194,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Exit | | | A | O | | E | U | | | | * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -215,12 +212,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Brite | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/gunp/keymap.c b/keyboards/planck/keymaps/gunp/keymap.c index 49776cefe39b..a2a04a8e9b8a 100644 --- a/keyboards/planck/keymaps/gunp/keymap.c +++ b/keyboards/planck/keymaps/gunp/keymap.c @@ -16,9 +16,7 @@ /* modified by Gun Pinyo */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -57,84 +55,84 @@ enum planck_keycodes { #define XX XXXXXXX const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[LY_0000] = { - {KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB}, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_M, FN_A, FN_B, FN_C, XX, KC_LSFT}, - {XX,KC_F21,KC_F22,KC_ESC,KC_SPC,KC_F23,KC_F24,KC_LCTL,KC_LSFT,KC_LALT,FN_D,XX} -}, -[LY_1000] = { - {UC(L'∃'), KC_SLSH, KC_RCBR, KC_RPRN, KC_RBRC, KC_GT, MFN_R1}, - {UC(L'∀'), KC_BSLS, KC_LCBR, KC_LPRN, KC_LBRC, KC_LT, MFN_R2}, - {KC_AMPR, KC_PIPE, KC_AT, KC_TILD, KC_DLR, KC_CIRC, MFN_R3}, - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MFN_R4}, -}, -[LY_0010] = { - {UC(L'×'), KC_ASTR, KC_QUES, KC_EXLM, KC_GRV, KC_HASH, MFN_R1}, - {UC(L'→'), KC_MINS, KC_COMM, KC_DOT, KC_QUOT, KC_EQL, MFN_R2}, - {UC(L'∘'), KC_PLUS, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS, MFN_R3}, - {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MFN_R4}, -}, -[LY_1010] = { - {UC(L'⊗'), UC(L'⊕'), KC_7, KC_8, KC_9, UC(L'┻'), MFN_R1}, - {UC(L'⊚'), KC_0, KC_1, KC_2, KC_3, UC(L'┃'), MFN_R2}, - {UC(L'┏'), UC(L'┓'), KC_4, KC_5, KC_6, UC(L'┳'), MFN_R3}, - {UC(L'┗'), UC(L'┛'), UC(L'┫'), UC(L'━'), UC(L'┣'), UC(L'╋'), MFN_R4} -}, -[LY_0100] = { - {KC_F13, KC_WSCH, KC_HOME, KC_UP, KC_END, KC_PGUP, MFN_R1}, - {KC_F14, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, MFN_R2}, - {KC_F15, KC_WBAK, KC_WFWD, MC(KC_A), MC(KC_Z), MSC(KC_Z), MFN_R3}, - {KC_F16, MA(KC_LEFT), MC(KC_LEFT), MC(KC_F), MC(KC_RGHT),MA(KC_RGHT), MFN_R4}, -}, -[LY_1100] = { - {KC_F17, MC(KC_WSCH), S(KC_HOME), S(KC_UP), S(KC_END), MC(KC_PGUP), MFN_R1}, - {KC_F18, XXXXXXX, S(KC_LEFT), S(KC_DOWN),S(KC_RGHT), MC(KC_PGDN), MFN_R2}, - {KC_F19, MC(KC_S), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L), MFN_R3}, - {KC_F20, MCA(KC_LEFT),MSC(KC_LEFT),MCA(KC_F),MSC(KC_RGHT),MCA(KC_RGHT),MFN_R4}, -}, -[LY_0110] = { - {MC(KC_F1) ,MC(KC_F2) ,MC(KC_F3) ,MC(KC_F4) ,MC(KC_F5) ,MC(KC_F6) , MFN_R1}, - {MC(KC_F7) ,MC(KC_F8) ,MC(KC_F9) ,MC(KC_F10),MC(KC_F11),MC(KC_F12), MFN_R2}, - {MC(KC_F13),MC(KC_F14),MC(KC_F15),MC(KC_F16),MC(KC_F17),MC(KC_F18), MFN_R3}, - {MC(KC_F19),MC(KC_F20),MC(KC_F21),MC(KC_F22),MC(KC_F23),MC(KC_F24), MFN_R4} -}, -[LY_1110] = { - {MG(KC_F1) ,MG(KC_F2) ,MG(KC_F3) ,MG(KC_F4) ,MG(KC_F5) ,MG(KC_F6) , MFN_R1}, - {MG(KC_F7) ,MG(KC_F8) ,MG(KC_F9) ,MG(KC_F10),MG(KC_F11),MG(KC_F12), MFN_R2}, - {MG(KC_F13),MG(KC_F14),MG(KC_F15),MG(KC_F16),MG(KC_F17),MG(KC_F18), MFN_R3}, - {MG(KC_F19),MG(KC_F20),MG(KC_F21),MG(KC_F22),MG(KC_F23),MG(KC_F24), MFN_R4} -}, -[LY_1111] = { - {KC_MPRV, DYN_REC_STOP, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, MFN_R1}, - {KC_CAPS, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, MFN_R2}, - {KC_MNXT, DYN_MACRO_PLAY2, DYN_MACRO_PLAY1, KC_MPLY, KC_MRWD, KC_MFFD, MFN_R3}, - {KC_MSTP, DYN_REC_START2, DYN_REC_START1, KC_BTN2, KC_BTN1, KC_BTN3, MFN_R4}, -}, -[LY_1101] = { - {XXXXXXX, MU_ON, MU_OFF, PRINT_ON, PRINT_OFF, DEBUG, MFN_R1}, - {XXXXXXX, KC_APP, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, MFN_R2}, - {XXXXXXX, KC_MAIL, S(KC_VOLD), KC_INS, S(KC_VOLU), KC_PSCR, MFN_R3}, - {XXXXXXX, MUV_DE, MUV_IN, AU_ON, AU_OFF, RESET, MFN_R4}, -}, -[LY_0011] = { - {UC(L'็'), UC(L'์'), UC(L'่'), UC(L'้'), UC(L'๊'), UC(L'๋'), MFN_R1}, - {UC(L'โ'), UC(L'แ'), UC(L'เ'), UC(L'า'), UC(L'ั'), UC(L'ะ'), MFN_R2}, - {UC(L'ไ'), UC(L'ใ'), UC(L'ิ'), UC(L'ี'), UC(L'ึ'), UC(L'ื'), MFN_R3}, - {UC(L'ๅ'), UC(L'ฺ'), UC(L'ํ'), UC(L'ุ'), UC(L'ู'), UC(L'ำ'), MFN_R4}, -}, -[LY_1011] = { - {UC(L'ฐ'), UC(L'ฎ'), UC(L'ฏ'), UC(L'ฮ'), UC(L'ข'), UC(L'ฃ'), MFN_R1}, - {UC(L'ถ'), UC(L'ด'), UC(L'ต'), UC(L'อ'), UC(L'ก'), UC(L'จ'), MFN_R2}, - {UC(L'ภ'), UC(L'บ'), UC(L'ป'), UC(L'ส'), UC(L'ห'), UC(L'ฉ'), MFN_R3}, - {UC(L'ฯ'), UC(L'ผ'), UC(L'ฝ'), UC(L'ศ'), UC(L'ษ'), UC(L'ๆ'), MFN_R4}, -}, -[LY_0111] = { - {UC(L'ฒ'), UC(L'ฤ'), UC(L'ฦ'), UC(L'ม'), UC(L'ค'), UC(L'ฅ'), MFN_R1}, - {UC(L'ณ'), UC(L'ร'), UC(L'ล'), UC(L'น'), UC(L'ว'), UC(L'ง'), MFN_R2}, - {UC(L'ญ'), UC(L'ช'), UC(L'ซ'), UC(L'ย'), UC(L'ท'), UC(L'ฑ'), MFN_R3}, - {UC(L'ฌ'), UC(L'ฬ'), UC(L'ฟ'), UC(L'พ'), UC(L'ธ'), UC(L'ฆ'), MFN_R4}, -}, +[LY_0000] = LAYOUT_planck_grid( + KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_M, FN_A, FN_B, FN_C, XX, KC_LSFT, + XX,KC_F21,KC_F22,KC_ESC,KC_SPC,KC_F23,KC_F24,KC_LCTL,KC_LSFT,KC_LALT,FN_D,XX +), +[LY_1000] = LAYOUT_planck_grid( + UC(L'∃'), KC_SLSH, KC_RCBR, KC_RPRN, KC_RBRC, KC_GT, MFN_R1, + UC(L'∀'), KC_BSLS, KC_LCBR, KC_LPRN, KC_LBRC, KC_LT, MFN_R2, + KC_AMPR, KC_PIPE, KC_AT, KC_TILD, KC_DLR, KC_CIRC, MFN_R3, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MFN_R4, +), +[LY_0010] = LAYOUT_planck_grid( + UC(L'×'), KC_ASTR, KC_QUES, KC_EXLM, KC_GRV, KC_HASH, MFN_R1, + UC(L'→'), KC_MINS, KC_COMM, KC_DOT, KC_QUOT, KC_EQL, MFN_R2, + UC(L'∘'), KC_PLUS, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS, MFN_R3, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MFN_R4, +), +[LY_1010] = LAYOUT_planck_grid( + UC(L'⊗'), UC(L'⊕'), KC_7, KC_8, KC_9, UC(L'┻'), MFN_R1, + UC(L'⊚'), KC_0, KC_1, KC_2, KC_3, UC(L'┃'), MFN_R2, + UC(L'┏'), UC(L'┓'), KC_4, KC_5, KC_6, UC(L'┳'), MFN_R3, + UC(L'┗'), UC(L'┛'), UC(L'┫'), UC(L'━'), UC(L'┣'), UC(L'╋'), MFN_R4 +), +[LY_0100] = LAYOUT_planck_grid( + KC_F13, KC_WSCH, KC_HOME, KC_UP, KC_END, KC_PGUP, MFN_R1, + KC_F14, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, MFN_R2, + KC_F15, KC_WBAK, KC_WFWD, MC(KC_A), MC(KC_Z), MSC(KC_Z), MFN_R3, + KC_F16, MA(KC_LEFT), MC(KC_LEFT), MC(KC_F), MC(KC_RGHT),MA(KC_RGHT), MFN_R4, +), +[LY_1100] = LAYOUT_planck_grid( + KC_F17, MC(KC_WSCH), S(KC_HOME), S(KC_UP), S(KC_END), MC(KC_PGUP), MFN_R1, + KC_F18, XXXXXXX, S(KC_LEFT), S(KC_DOWN),S(KC_RGHT), MC(KC_PGDN), MFN_R2, + KC_F19, MC(KC_S), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L), MFN_R3, + KC_F20, MCA(KC_LEFT),MSC(KC_LEFT),MCA(KC_F),MSC(KC_RGHT),MCA(KC_RGHT),MFN_R4, +), +[LY_0110] = LAYOUT_planck_grid( + MC(KC_F1) ,MC(KC_F2) ,MC(KC_F3) ,MC(KC_F4) ,MC(KC_F5) ,MC(KC_F6) , MFN_R1, + MC(KC_F7) ,MC(KC_F8) ,MC(KC_F9) ,MC(KC_F10),MC(KC_F11),MC(KC_F12), MFN_R2, + MC(KC_F13),MC(KC_F14),MC(KC_F15),MC(KC_F16),MC(KC_F17),MC(KC_F18), MFN_R3, + MC(KC_F19),MC(KC_F20),MC(KC_F21),MC(KC_F22),MC(KC_F23),MC(KC_F24), MFN_R4 +), +[LY_1110] = LAYOUT_planck_grid( + MG(KC_F1) ,MG(KC_F2) ,MG(KC_F3) ,MG(KC_F4) ,MG(KC_F5) ,MG(KC_F6) , MFN_R1, + MG(KC_F7) ,MG(KC_F8) ,MG(KC_F9) ,MG(KC_F10),MG(KC_F11),MG(KC_F12), MFN_R2, + MG(KC_F13),MG(KC_F14),MG(KC_F15),MG(KC_F16),MG(KC_F17),MG(KC_F18), MFN_R3, + MG(KC_F19),MG(KC_F20),MG(KC_F21),MG(KC_F22),MG(KC_F23),MG(KC_F24), MFN_R4 +), +[LY_1111] = LAYOUT_planck_grid( + KC_MPRV, DYN_REC_STOP, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, MFN_R1, + KC_CAPS, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, MFN_R2, + KC_MNXT, DYN_MACRO_PLAY2, DYN_MACRO_PLAY1, KC_MPLY, KC_MRWD, KC_MFFD, MFN_R3, + KC_MSTP, DYN_REC_START2, DYN_REC_START1, KC_BTN2, KC_BTN1, KC_BTN3, MFN_R4, +), +[LY_1101] = LAYOUT_planck_grid( + XXXXXXX, MU_ON, MU_OFF, PRINT_ON, PRINT_OFF, DEBUG, MFN_R1, + XXXXXXX, KC_APP, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, MFN_R2, + XXXXXXX, KC_MAIL, S(KC_VOLD), KC_INS, S(KC_VOLU), KC_PSCR, MFN_R3, + XXXXXXX, MUV_DE, MUV_IN, AU_ON, AU_OFF, RESET, MFN_R4, +), +[LY_0011] = LAYOUT_planck_grid( + UC(L'็'), UC(L'์'), UC(L'่'), UC(L'้'), UC(L'๊'), UC(L'๋'), MFN_R1, + UC(L'โ'), UC(L'แ'), UC(L'เ'), UC(L'า'), UC(L'ั'), UC(L'ะ'), MFN_R2, + UC(L'ไ'), UC(L'ใ'), UC(L'ิ'), UC(L'ี'), UC(L'ึ'), UC(L'ื'), MFN_R3, + UC(L'ๅ'), UC(L'ฺ'), UC(L'ํ'), UC(L'ุ'), UC(L'ู'), UC(L'ำ'), MFN_R4, +), +[LY_1011] = LAYOUT_planck_grid( + UC(L'ฐ'), UC(L'ฎ'), UC(L'ฏ'), UC(L'ฮ'), UC(L'ข'), UC(L'ฃ'), MFN_R1, + UC(L'ถ'), UC(L'ด'), UC(L'ต'), UC(L'อ'), UC(L'ก'), UC(L'จ'), MFN_R2, + UC(L'ภ'), UC(L'บ'), UC(L'ป'), UC(L'ส'), UC(L'ห'), UC(L'ฉ'), MFN_R3, + UC(L'ฯ'), UC(L'ผ'), UC(L'ฝ'), UC(L'ศ'), UC(L'ษ'), UC(L'ๆ'), MFN_R4, +), +[LY_0111] = LAYOUT_planck_grid( + UC(L'ฒ'), UC(L'ฤ'), UC(L'ฦ'), UC(L'ม'), UC(L'ค'), UC(L'ฅ'), MFN_R1, + UC(L'ณ'), UC(L'ร'), UC(L'ล'), UC(L'น'), UC(L'ว'), UC(L'ง'), MFN_R2, + UC(L'ญ'), UC(L'ช'), UC(L'ซ'), UC(L'ย'), UC(L'ท'), UC(L'ฑ'), MFN_R3, + UC(L'ฌ'), UC(L'ฬ'), UC(L'ฟ'), UC(L'พ'), UC(L'ธ'), UC(L'ฆ'), MFN_R4, +), [LY_0001] = UNUSED_LAYER [LY_0101] = UNUSED_LAYER [LY_1001] = UNUSED_LAYER diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c index a4d1f7cb09bc..58f9cea2a54a 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c +++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -48,12 +42,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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, _______, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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, _______, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -66,12 +60,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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 }, - {KC_LCTL, KC_LGUI, XXXXXXX, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + KC_LCTL, KC_LGUI, XXXXXXX, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -84,12 +78,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -/*[_DVORAK] = {*/ - /*{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 },*/ - /*{KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}*/ -/*},*/ +/*[_DVORAK] = LAYOUT_planck_grid(*/ + /*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 ,*/ + /*KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT*/ +/*),*/ /* Lower * ,-----------------------------------------------------------------------------------. @@ -102,12 +96,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -120,12 +114,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -139,12 +133,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -/*[_PLOVER] = {*/ - /*{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },*/ - /*{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},*/ - /*{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},*/ - /*{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}*/ -/*},*/ +/*[_PLOVER] = LAYOUT_planck_grid(*/ + /*KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,*/ + /*XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,*/ + /*XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,*/ + /*EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX*/ +/*),*/ /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -157,12 +151,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, QWERTY, COLEMAK}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, QWERTY, COLEMAK, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/hiea/common/chord_layout.h b/keyboards/planck/keymaps/hiea/common/chord_layout.h index 2c785d56ca75..b6922705f3a5 100644 --- a/keyboards/planck/keymaps/hiea/common/chord_layout.h +++ b/keyboards/planck/keymaps/hiea/common/chord_layout.h @@ -14,12 +14,12 @@ // | | | | | | | | f() | | | | | see _PLOVER // '-----------------------------------------------------------------------------------' - [_EDIT] = { - {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______}, - {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______}, - {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______}, - }, + [_EDIT] = LAYOUT_planck_grid( + _______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______, + UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______, + _______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______ + ), // ................................................................ Adjust Layer @@ -33,9 +33,9 @@ // | | | | f() | | | | | f() | | | | // `-----------------------------------------------------------------------------------' - [_ADJUST] = { - {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______}, - }, + [_ADJUST] = LAYOUT_planck_grid( + PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h b/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h index 321482b2919a..c3d5c2d874e3 100644 --- a/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h +++ b/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h @@ -14,16 +14,16 @@ // | | | | f() | | | | = | 0 | | | | // '-----------------------------------------------------------------------------------' - [_NUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_NUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___ #else - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___ #endif - }, + ), // ............ .................................................. Function Keys @@ -38,9 +38,9 @@ // | | | | | f() | | | + | | | | | see _PLOVER // '-----------------------------------------------------------------------------------' - [_FNCKEY] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, - {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, - }, + [_FNCKEY] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 , + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 , + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 , + _______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/hiea/common/steno_layout.h b/keyboards/planck/keymaps/hiea/common/steno_layout.h index ab4a6fe011cb..c1f2b5b24ab7 100644 --- a/keyboards/planck/keymaps/hiea/common/steno_layout.h +++ b/keyboards/planck/keymaps/hiea/common/steno_layout.h @@ -13,12 +13,12 @@ // | | A | O | E | U | | // `-----------------------------------------------------------------------------------' - [_PLOVER] = { - {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, - {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, - {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, - {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______}, - }, + [_PLOVER] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + _______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______ + ), #else // ,-----------------------------------------------------------------------------------. // | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | @@ -30,10 +30,10 @@ // | | A | O | E | U | | // `-----------------------------------------------------------------------------------' - [_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______}, - }, + [_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + _______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______ + ), #endif diff --git a/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h index 677e46409baa..4a32f71bd9cb 100644 --- a/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h +++ b/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h @@ -13,12 +13,12 @@ // | |Adjust| \ | | f() | | // '-----------------------------------------------------------------------------------' - [_SYMBOL] = { - {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, - {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, - }, + [_SYMBOL] = LAYOUT_planck_grid( + _______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + ___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___ + ), // ............................................................... Mouse Actions @@ -32,9 +32,9 @@ // | | | f() | | f() | | // '-----------------------------------------------------------------------------------' - [_MOUSE] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, - {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______}, - }, + [_MOUSE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, + _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/hiea/common/toggle_layout.h b/keyboards/planck/keymaps/hiea/common/toggle_layout.h index 713d27bbcfc4..ed74f42522d8 100644 --- a/keyboards/planck/keymaps/hiea/common/toggle_layout.h +++ b/keyboards/planck/keymaps/hiea/common/toggle_layout.h @@ -14,16 +14,16 @@ // | | | | f() | Space| | | = | 0 | | | | // '-----------------------------------------------------------------------------------' - [_TTNUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_TTNUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______}, + _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______ #else - {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______}, + _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______ #endif - }, + ), // ............ .................................................. Function Keys @@ -37,12 +37,12 @@ // | | | | f() | | | | + | | | | | // '-----------------------------------------------------------------------------------' - [_TTFNCKEY] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, - {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______}, - }, + [_TTFNCKEY] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 , + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 , + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 , + _______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______ + ), // ....................................................................... Regex @@ -56,12 +56,12 @@ // | | | | f() | - | | | + | Space| | | | // `-----------------------------------------------------------------------------------' - [_TTREGEX] = { - {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___}, - {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___}, - {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___}, - {_______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______}, - }, + [_TTREGEX] = LAYOUT_planck_grid( + ___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___, + ___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___, + ___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___, + _______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______ + ), // ............................................................ Navigation Layer @@ -75,12 +75,12 @@ // | | | | f() | | | | | | | | | // '-----------------------------------------------------------------------------------' - [_TTCURSOR] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_TTCURSOR] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______ + ), // ............................................................... Mouse Actions @@ -94,9 +94,9 @@ // | | | | f() | | | | | | | | | // '-----------------------------------------------------------------------------------' - [_TTMOUSE] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, - {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_TTMOUSE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, + _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/hiea/config.h b/keyboards/planck/keymaps/hiea/config.h index 655cdf5db31f..eb867045786b 100644 --- a/keyboards/planck/keymaps/hiea/config.h +++ b/keyboards/planck/keymaps/hiea/config.h @@ -14,7 +14,7 @@ // #define MOUSEKEY_WHEEL_DELAY 0 // compile time macro string, see functions/hardware planck script (undefine otherwise) -#define PRIVATE_STRING +//#define PRIVATE_STRING // compile time macro string, must be in quotes #define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n" diff --git a/keyboards/planck/keymaps/hiea/hiea.h b/keyboards/planck/keymaps/hiea/hiea.h index 093802aef16b..d396ff79fdd5 100644 --- a/keyboards/planck/keymaps/hiea/hiea.h +++ b/keyboards/planck/keymaps/hiea/hiea.h @@ -13,19 +13,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, - - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W , + KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), + + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X | @@ -37,12 +37,12 @@ // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {SM_H, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + SM_H, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X | @@ -54,10 +54,10 @@ // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W }, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W , + S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT + ), #endif diff --git a/keyboards/planck/keymaps/hiea/keymap.c b/keyboards/planck/keymaps/hiea/keymap.c index c09fd41f20b9..eed4954096d5 100644 --- a/keyboards/planck/keymaps/hiea/keymap.c +++ b/keyboards/planck/keymaps/hiea/keymap.c @@ -66,17 +66,10 @@ // sudo CPATH=/common make ... -#include "config.h" -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #ifdef STENO_ENABLE #include "keymap_steno.h" #endif -#ifdef AUDIO_ENABLE -#include "audio.h" -#endif -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -166,7 +159,7 @@ enum planck_keycodes { #define S_TAB S (KC_TAB) #define S_UP S (KC_UP) -#include "tapdance.h" +#include "common/tapdance.h" // keycodes #define ___x___ KC_TRNS @@ -223,35 +216,35 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #include "hiea.h" -#include "steno_layout.h" +#include "common/steno_layout.h" // ...................................................... Number / Function Keys -#include "number_fkey_layout.h" +#include "common/number_fkey_layout.h" // ......................................................... Symbol / Navigation -#include "symbol_guifn_layout.h" +#include "common/symbol_guifn_layout.h" // ............................................................... Toggle Layers #ifdef CENTER_TT -#include "toggle_layout.h" +#include "common/toggle_layout.h" #endif // ......................................................... Short Cuts / Adjust -#include "chord_layout.h" +#include "common/chord_layout.h" }; // ...................................................................... Sounds -#include "sounds.h" +#include "common/sounds.h" // ........................................................... User Keycode Trap -#include "keycode_functions.h" +#include "common/keycode_functions.h" #define BASE_1 1 #define BASE_2 2 @@ -425,4 +418,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) return true; } -#include "init.h" +#include "common/init.h" diff --git a/keyboards/planck/keymaps/hieax/common/chord_layout.h b/keyboards/planck/keymaps/hieax/common/chord_layout.h index 2c785d56ca75..b6922705f3a5 100644 --- a/keyboards/planck/keymaps/hieax/common/chord_layout.h +++ b/keyboards/planck/keymaps/hieax/common/chord_layout.h @@ -14,12 +14,12 @@ // | | | | | | | | f() | | | | | see _PLOVER // '-----------------------------------------------------------------------------------' - [_EDIT] = { - {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______}, - {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______}, - {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______}, - }, + [_EDIT] = LAYOUT_planck_grid( + _______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______, + UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______, + _______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______ + ), // ................................................................ Adjust Layer @@ -33,9 +33,9 @@ // | | | | f() | | | | | f() | | | | // `-----------------------------------------------------------------------------------' - [_ADJUST] = { - {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______}, - }, + [_ADJUST] = LAYOUT_planck_grid( + PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h b/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h index 321482b2919a..c3d5c2d874e3 100644 --- a/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h +++ b/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h @@ -14,16 +14,16 @@ // | | | | f() | | | | = | 0 | | | | // '-----------------------------------------------------------------------------------' - [_NUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_NUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___ #else - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___ #endif - }, + ), // ............ .................................................. Function Keys @@ -38,9 +38,9 @@ // | | | | | f() | | | + | | | | | see _PLOVER // '-----------------------------------------------------------------------------------' - [_FNCKEY] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, - {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, - }, + [_FNCKEY] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 , + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 , + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 , + _______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/hieax/common/steno_layout.h b/keyboards/planck/keymaps/hieax/common/steno_layout.h index ab4a6fe011cb..c1f2b5b24ab7 100644 --- a/keyboards/planck/keymaps/hieax/common/steno_layout.h +++ b/keyboards/planck/keymaps/hieax/common/steno_layout.h @@ -13,12 +13,12 @@ // | | A | O | E | U | | // `-----------------------------------------------------------------------------------' - [_PLOVER] = { - {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, - {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, - {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, - {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______}, - }, + [_PLOVER] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + _______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______ + ), #else // ,-----------------------------------------------------------------------------------. // | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | @@ -30,10 +30,10 @@ // | | A | O | E | U | | // `-----------------------------------------------------------------------------------' - [_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______}, - }, + [_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + _______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______ + ), #endif diff --git a/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h index 677e46409baa..4a32f71bd9cb 100644 --- a/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h +++ b/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h @@ -13,12 +13,12 @@ // | |Adjust| \ | | f() | | // '-----------------------------------------------------------------------------------' - [_SYMBOL] = { - {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, - {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, - }, + [_SYMBOL] = LAYOUT_planck_grid( + _______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + ___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___ + ), // ............................................................... Mouse Actions @@ -32,9 +32,9 @@ // | | | f() | | f() | | // '-----------------------------------------------------------------------------------' - [_MOUSE] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, - {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______}, - }, + [_MOUSE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, + _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/hieax/common/toggle_layout.h b/keyboards/planck/keymaps/hieax/common/toggle_layout.h index ea4ead56b922..cf3138d6e338 100644 --- a/keyboards/planck/keymaps/hieax/common/toggle_layout.h +++ b/keyboards/planck/keymaps/hieax/common/toggle_layout.h @@ -14,16 +14,16 @@ // | | | | f() | Space| | | = | 0 | | | | // '-----------------------------------------------------------------------------------' - [_TTNUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_TTNUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______}, + _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______ #else - {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______}, + _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______ #endif - }, + ), // ............ .................................................. Function Keys @@ -37,12 +37,12 @@ // | | | | f() | | | | + | | | | | // '-----------------------------------------------------------------------------------' - [_TTFNCKEY] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, - {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______}, - }, + [_TTFNCKEY] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 , + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 , + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 , + _______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______ + ), // ....................................................................... Regex @@ -56,12 +56,12 @@ // | | | | f() | = | | | + | Space| | | | // `-----------------------------------------------------------------------------------' - [_TTREGEX] = { - {___x___, KC_DOT, KC_ASTR, KC_AMPR, KC_TILD, ___x___, ___x___, KC_GRV, KC_LBRC, KC_RBRC, KC_CIRC, ___x___}, - {___x___, KC_LT, KC_PERC, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___}, - {___x___, KC_COLN, KC_AT, KC_EXLM, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, ___x___}, - {_______, _______, _______, TT_ESC, KC_EQL, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______}, - }, + [_TTREGEX] = LAYOUT_planck_grid( + ___x___, KC_DOT, KC_ASTR, KC_AMPR, KC_TILD, ___x___, ___x___, KC_GRV, KC_LBRC, KC_RBRC, KC_CIRC, ___x___, + ___x___, KC_LT, KC_PERC, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___, + ___x___, KC_COLN, KC_AT, KC_EXLM, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, ___x___, + _______, _______, _______, TT_ESC, KC_EQL, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______ + ), // ............................................................ Navigation Layer @@ -75,12 +75,12 @@ // | | | | f() | | | | | | | | | // '-----------------------------------------------------------------------------------' - [_TTCURSOR] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_TTCURSOR] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______ + ), // ............................................................... Mouse Actions @@ -94,9 +94,9 @@ // | | | | f() | | | | | | | | | // '-----------------------------------------------------------------------------------' - [_TTMOUSE] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, - {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_TTMOUSE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, + _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/hieax/config.h b/keyboards/planck/keymaps/hieax/config.h index 655cdf5db31f..eb867045786b 100644 --- a/keyboards/planck/keymaps/hieax/config.h +++ b/keyboards/planck/keymaps/hieax/config.h @@ -14,7 +14,7 @@ // #define MOUSEKEY_WHEEL_DELAY 0 // compile time macro string, see functions/hardware planck script (undefine otherwise) -#define PRIVATE_STRING +//#define PRIVATE_STRING // compile time macro string, must be in quotes #define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n" diff --git a/keyboards/planck/keymaps/hieax/hiea.h b/keyboards/planck/keymaps/hieax/hiea.h index 64541d633e74..38077e8eebec 100644 --- a/keyboards/planck/keymaps/hieax/hiea.h +++ b/keyboards/planck/keymaps/hieax/hiea.h @@ -13,19 +13,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W , + KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | @@ -37,12 +37,12 @@ // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | @@ -54,12 +54,12 @@ // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT + ), #ifdef HOME_MODS // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Fn | Caps | ` | [ | ] | ^ | X | @@ -71,12 +71,12 @@ // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | + | Space| Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSYMBOL] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, TD_GRV, KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, - {HOME_H, HOME_I, HOME_E, ___fn__, KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, KC_PLUS, SL_SPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_LSYMBOL] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, TD_GRV, KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X), + HOME_H, HOME_I, HOME_E, ___fn__, KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, KC_PLUS, SL_SPC, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | . | * | & | ~ | Fn | Caps | G | D | N | M | X | @@ -89,11 +89,11 @@ // | | ↑Tab | = | Ent | Bksp | | // `-----------------------------------------------------------------------------------' - [_RSYMBOL] = { - {S(KC_Q), KC_DOT, KC_ASTR, KC_AMPR, TD_TILD, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_H), TD_LT, KC_PERC, TD_GT, KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), ___fn__, HOME_R, HOME_S, HOME_W }, - {S(KC_J), TD_COLN, KC_AT, KC_EXLM, KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, S_TAB, TD_EQL, LT_INS, SP_LEFT, TD_ENT, LT_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_RSYMBOL] = LAYOUT_planck_grid( + S(KC_Q), KC_DOT, KC_ASTR, KC_AMPR, TD_TILD, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_H), TD_LT, KC_PERC, TD_GT, KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), ___fn__, HOME_R, HOME_S, HOME_W , + S(KC_J), TD_COLN, KC_AT, KC_EXLM, KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, S_TAB, TD_EQL, LT_INS, SP_LEFT, TD_ENT, LT_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), #endif #endif diff --git a/keyboards/planck/keymaps/hieax/keymap.c b/keyboards/planck/keymaps/hieax/keymap.c index 2b08506f25f4..80de85b884e9 100644 --- a/keyboards/planck/keymaps/hieax/keymap.c +++ b/keyboards/planck/keymaps/hieax/keymap.c @@ -66,17 +66,10 @@ // sudo CPATH=/common make ... -#include "config.h" -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #ifdef STENO_ENABLE #include "keymap_steno.h" #endif -#ifdef AUDIO_ENABLE -#include "audio.h" -#endif -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -171,7 +164,7 @@ enum planck_keycodes { #define S_TAB S (KC_TAB) #define S_UP S (KC_UP) -#include "tapdance.h" +#include "common/tapdance.h" // keycodes #define ___x___ KC_TRNS @@ -229,35 +222,35 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #include "hiea.h" -#include "steno_layout.h" +#include "common/steno_layout.h" // ...................................................... Number / Function Keys -#include "number_fkey_layout.h" +#include "common/number_fkey_layout.h" // ......................................................... Symbol / Navigation -#include "symbol_guifn_layout.h" +#include "common/symbol_guifn_layout.h" // ............................................................... Toggle Layers #ifdef CENTER_TT -#include "toggle_layout.h" +#include "common/toggle_layout.h" #endif // ......................................................... Short Cuts / Adjust -#include "chord_layout.h" +#include "common/chord_layout.h" }; // ...................................................................... Sounds -#include "sounds.h" +#include "common/sounds.h" // ........................................................... User Keycode Trap -#include "keycode_functions.h" +#include "common/keycode_functions.h" #define BASE_1 1 #define BASE_2 2 @@ -442,4 +435,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) return true; } -#include "init.h" +#include "common/init.h" diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index b53023dd96ff..63541d57981a 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -41,12 +35,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------------' */ -[_WORKMAN] = { - {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, - {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, - {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENT), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJ, KC_ENT)} -}, +[_WORKMAN] = LAYOUT_planck_grid( + KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9, + KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6, + KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3, + ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENT), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJ, KC_ENT) +), /* FN-key held (Workman) * ,-----------------------------------------------------------------------------------------------. @@ -60,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------------' */ -[_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, - {KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {KC_MENU, _______, _______, KC_EQUAL, KC_BSLS, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, _______} -}, +[_FN] = LAYOUT_planck_grid( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9, + KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6, + KC_MENU, _______, _______, KC_EQUAL, KC_BSLS, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3, + _______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, _______ +), /* Qwerty * ,-----------------------------------------------------------------------------------------------. @@ -79,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------------' */ -[_QWERTY] = { - {GUI_T(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_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QW_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJ, KC_ENT)}, -}, +[_QWERTY] = LAYOUT_planck_grid( + GUI_T(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_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QW_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJ, KC_ENT) +), /* FN-key held (Qwerty) * ,-----------------------------------------------------------------------------------------------. @@ -98,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------------' */ -[_QW_FN] = { - {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, - {_______, KC_GRAVE, KC_LBRC, KC_PGUP, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_UP, KC_EQUAL, XXXXXXX, KC_F12}, - {_______, KC_TAB, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX}, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______} -}, +[_QW_FN] = LAYOUT_planck_grid( + KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_GRAVE, KC_LBRC, KC_PGUP, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_UP, KC_EQUAL, XXXXXXX, KC_F12, + _______, KC_TAB, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______ +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------------------. @@ -117,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX}, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX}, - {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LT(_ADJ, KC_ENT)} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX, + KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LT(_ADJ, KC_ENT) +), /* Adjust * ,-----------------------------------------------------------------------------------------------. @@ -136,12 +130,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------------' */ -[_ADJ] = { - {_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_PAUSE, RESET}, - {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______} -} +[_ADJ] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_PAUSE, RESET, + _______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______, + _______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______, + _______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______ +) }; diff --git a/keyboards/planck/keymaps/jacob/keymap.c b/keyboards/planck/keymaps/jacob/keymap.c index 5d823157bbe9..f9a0465d2d8e 100644 --- a/keyboards/planck/keymaps/jacob/keymap.c +++ b/keyboards/planck/keymaps/jacob/keymap.c @@ -1,9 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#include QMK_KEYBOARD_H //Simple Keymap where CTRL, WINKEY, and ALT keys are placed in a more familiar location for Windows users. //Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck. @@ -14,24 +9,24 @@ #define _RS 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = { /* Qwerty */ - {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, MT(MOD_RSFT, KC_ENT)}, - {KC_LCTL, KC_LGUI, KC_LALT, M(0), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, - [_RS] = { /* RAISE */ - {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, 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} - }, - [_LW] = { /* LOWER */ - {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, 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} - } + [_QW] = LAYOUT_planck_grid( /* Qwerty */ + 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, MT(MOD_RSFT, KC_ENT), + KC_LCTL, KC_LGUI, KC_LALT, M(0), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [_RS] = LAYOUT_planck_grid( /* RAISE */ + 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, 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 + ), + [_LW] = LAYOUT_planck_grid( /* LOWER */ + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, 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 + ) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/jeebak/keymap.c b/keyboards/planck/keymaps/jeebak/keymap.c index 86a2c4c76ad2..9ac547bb8290 100644 --- a/keyboards/planck/keymaps/jeebak/keymap.c +++ b/keyboards/planck/keymaps/jeebak/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -91,12 +85,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | PrntScrn | RGUI | Alt | GUI |Lower | TC/Space |Raise | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------------' */ -[_QWERTY] = { - {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {CTL_ESC, KC_A, KC_S, LT_MC(KC_D),KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, - {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_QWERTY] = LAYOUT_planck_grid( + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_ESC, KC_A, KC_S, LT_MC(KC_D),KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, + KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Colemak * ,-----------------------------------------------------------------------------------------. @@ -109,12 +103,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | PrntScrn | RGUI | Alt | GUI |Lower | TC/Space |Raise | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {CTL_ESC, KC_A, KC_R, LT_MC(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, SFT_ENT}, - {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_COLEMAK] = LAYOUT_planck_grid( + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + CTL_ESC, KC_A, KC_R, LT_MC(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, SFT_ENT, + KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Dvorak * ,-----------------------------------------------------------------------------------------. @@ -127,12 +121,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | PrntScrn | RGUI | Alt | GUI |Lower | TC/Space |Raise | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------------' */ -[_DVORAK] = { - {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {CTL_ESC, KC_A, KC_O, LT_MC(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, SFT_ENT}, - {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_DVORAK] = LAYOUT_planck_grid( + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + CTL_ESC, KC_A, KC_O, LT_MC(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, SFT_ENT, + KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -145,12 +139,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Brite | | | | | | | Prev | Stop | Slct | Mute | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE} -}, +[_LOWER] = LAYOUT_planck_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_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -163,12 +157,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Brite | | | | | | | Prev | Stop | Slct | Mute | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE}, - {KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE} -}, +[_RAISE] = LAYOUT_planck_grid( + 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_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE, + KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE +), /* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations * ,-----------------------------------------------------------------------------------. @@ -185,12 +179,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * seem to work on Mac. Presumably they'll work under Windows. */ -[_TOUCHCURSOR] = { - {ALT_TAB, CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______}, - {_______, KC_LALT, KC_SPC, AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R }, - {_______, AG_UNDO, AG_CUT, AG_COPY, AG_PASTE,KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R, CMD_SLSH,_______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_TOUCHCURSOR] = LAYOUT_planck_grid( + ALT_TAB, CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, + _______, KC_LALT, KC_SPC, AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R , + _______, AG_UNDO, AG_CUT, AG_COPY, AG_PASTE,KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R, CMD_SLSH,_______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Mouse Layer * ,-----------------------------------------------------------------------------------. @@ -204,12 +198,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_MOUSECURSOR] = { - {_______, _______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______}, - {_______, KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5}, - {_______, _______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_MOUSECURSOR] = LAYOUT_planck_grid( + _______, _______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______, + _______, KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5, + _______, _______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -223,12 +217,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -241,12 +235,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | |Reset | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +) }; diff --git a/keyboards/planck/keymaps/jeremy-dev/keymap.c b/keyboards/planck/keymaps/jeremy-dev/keymap.c index de679a3fc0bd..787bdd23c1b7 100644 --- a/keyboards/planck/keymaps/jeremy-dev/keymap.c +++ b/keyboards/planck/keymaps/jeremy-dev/keymap.c @@ -2,10 +2,7 @@ // Configuration options -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. enum my_layers { @@ -32,36 +29,36 @@ enum my_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [ALPH] = { - {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_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)}, - {CTL_T(KC_TAB), OSL(FKEY), OSL(NUMS), OSL(SYMB), KC_SPC, ALT_T(KC_BSPC), GUI_T(KC_DEL), KC_ENT, OSL(SYMB), OSL(CURS), TG(CURS), CTL_T(KC_ESC)} - }, - [NUMS] = { - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_COMM, KC_7, KC_8, KC_9, KC_SLSH}, - {KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_TRNS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS}, - {KC_NO, KC_NO, KC_TRNS, TG(NUMS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS} - }, - [CURS] = { - {KC_MPLY, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, - {KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT}, - {KC_VOLD, KC_NO, MY_ABVE, MY_TERM, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT}, - {KC_MUTE, KC_NO, MY_BELW, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO} - }, - [SYMB] = { - {MY_DEQL, MY_MEQL, MY_SEQL, MY_PEQL, MY_NEQL, KC_NO, KC_NO, MY_LTGT, KC_LABK, KC_RABK, KC_COLN, KC_DLR}, - {KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL, KC_NO, KC_PIPE, MY_DPIP, KC_GRV, KC_QUOT, KC_DQUO, KC_HASH}, - {KC_BSLS, KC_CIRC, KC_PERC, KC_UNDS, KC_NO, KC_NO, KC_AMPR, MY_DAMP, KC_TILD, KC_AT, KC_EXLM, KC_QUES}, - {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO} - }, - [FKEY] = { - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12}, - {KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4}, - {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} - } + [ALPH] = LAYOUT_planck_grid( + 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_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + CTL_T(KC_TAB), OSL(FKEY), OSL(NUMS), OSL(SYMB), KC_SPC, ALT_T(KC_BSPC), GUI_T(KC_DEL), KC_ENT, OSL(SYMB), OSL(CURS), TG(CURS), CTL_T(KC_ESC) + ), + [NUMS] = LAYOUT_planck_grid( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_COMM, KC_7, KC_8, KC_9, KC_SLSH, + KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_TRNS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS, + KC_NO, KC_NO, KC_TRNS, TG(NUMS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS + ), + [CURS] = LAYOUT_planck_grid( + KC_MPLY, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, + KC_VOLD, KC_NO, MY_ABVE, MY_TERM, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT, + KC_MUTE, KC_NO, MY_BELW, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO + ), + [SYMB] = LAYOUT_planck_grid( + MY_DEQL, MY_MEQL, MY_SEQL, MY_PEQL, MY_NEQL, KC_NO, KC_NO, MY_LTGT, KC_LABK, KC_RABK, KC_COLN, KC_DLR, + KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL, KC_NO, KC_PIPE, MY_DPIP, KC_GRV, KC_QUOT, KC_DQUO, KC_HASH, + KC_BSLS, KC_CIRC, KC_PERC, KC_UNDS, KC_NO, KC_NO, KC_AMPR, MY_DAMP, KC_TILD, KC_AT, KC_EXLM, KC_QUES, + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO + ), + [FKEY] = LAYOUT_planck_grid( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, + KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) }; void press_key(uint16_t key) { diff --git a/keyboards/planck/keymaps/jhenahan/config.h b/keyboards/planck/keymaps/jhenahan/config.h index 1e42b92b9c3e..4dbcdd639e43 100644 --- a/keyboards/planck/keymaps/jhenahan/config.h +++ b/keyboards/planck/keymaps/jhenahan/config.h @@ -4,6 +4,7 @@ #include "../../config.h" #define FORCE_NKRO +#undef WORKMAN_SOUND #define WORKMAN_SOUND COLEMAK_SOUND /* diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c index ea7a536102d6..e8d745604001 100644 --- a/keyboards/planck/keymaps/jhenahan/keymap.c +++ b/keyboards/planck/keymaps/jhenahan/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -46,12 +40,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_WORKMAN] = { - {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC}, - {MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DEAD, KC_DOT, KC_SLSH, KC_ENT}, - {KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_WORKMAN] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DEAD, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Workman Dead Layer * ,-----------------------------------------------------------------------------------. @@ -64,12 +58,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | < | ~ | ` | , | # | ^ | > | | | * `-----------------------------------------------------------------------------------' */ -[_DEAD] = { - {XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, XXXXXXX}, - {XXXXXXX, KC_SLSH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, XXXXXXX}, - {XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, KC_3, KC_4, KC_5, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_LT, KC_TILD, KC_GRV, KC_COMM, KC_COMM, KC_HASH, KC_CIRC, KC_GT, XXXXXXX, XXXXXXX} -}, +[_DEAD] = LAYOUT_planck_grid( + XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, XXXXXXX, + XXXXXXX, KC_SLSH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, XXXXXXX, + XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, KC_3, KC_4, KC_5, XXXXXXX, + XXXXXXX, XXXXXXX, KC_LT, KC_TILD, KC_GRV, KC_COMM, KC_COMM, KC_HASH, KC_CIRC, KC_GT, XXXXXXX, XXXXXXX +), /* Qwerty * ,-----------------------------------------------------------------------------------. @@ -82,12 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -100,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Prev | Next | Vol- | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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_VOLU, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MPLY +), /* Raise - KWM Interaction * ,-----------------------------------------------------------------------------------. @@ -118,12 +112,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {LCAG(KC_Q), XXXXXXX, LCAG(KC_S), LCAG(KC_W), LCAG(KC_D), LCAG(KC_F), LCTL(S(KC_X)), LCTL(S(KC_H)), LCTL(S(KC_J)), LCTL(S(KC_K)), LCTL(S(KC_L)), XXXXXXX}, - {XXXXXXX, LCAG(KC_M), LGUI(LCTL(KC_R)), LCAG(KC_DOT), LCAG(KC_T), LGUI(LCTL(KC_A)), LCTL(LALT(KC_M)), LCTL(LALT(KC_H)), LCTL(LALT(KC_J)), LCTL(LALT(KC_K)), LCTL(LALT(KC_L)), XXXXXXX}, - {_______, LCAG(KC_H), LCAG(KC_J), LCAG(KC_K), LCAG(KC_L), LGUI(LCTL(KC_S)), LGUI(LCTL(KC_D)), LGUI(LALT(KC_H)), LGUI(LALT(KC_J)), LGUI(LALT(KC_K)), LGUI(LALT(KC_L)), _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_RAISE] = LAYOUT_planck_grid( + LCAG(KC_Q), XXXXXXX, LCAG(KC_S), LCAG(KC_W), LCAG(KC_D), LCAG(KC_F), LCTL(S(KC_X)), LCTL(S(KC_H)), LCTL(S(KC_J)), LCTL(S(KC_K)), LCTL(S(KC_L)), XXXXXXX, + XXXXXXX, LCAG(KC_M), LGUI(LCTL(KC_R)), LCAG(KC_DOT), LCAG(KC_T), LGUI(LCTL(KC_A)), LCTL(LALT(KC_M)), LCTL(LALT(KC_H)), LCTL(LALT(KC_J)), LCTL(LALT(KC_K)), LCTL(LALT(KC_L)), XXXXXXX, + _______, LCAG(KC_H), LCAG(KC_J), LCAG(KC_K), LCAG(KC_L), LGUI(LCTL(KC_S)), LGUI(LCTL(KC_D)), LGUI(LALT(KC_H)), LGUI(LALT(KC_J)), LGUI(LALT(KC_K)), LGUI(LALT(KC_L)), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -137,12 +131,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC}, - {TOG_PLV, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_M, KC_C, XXXXXXX, XXXXXXX, KC_L, KC_COMM, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + TOG_PLV, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_M, KC_C, XXXXXXX, XXXXXXX, KC_L, KC_COMM, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -155,12 +149,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, PLOVER, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, PLOVER, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/jirgn/keymap.c b/keyboards/planck/keymaps/jirgn/keymap.c index 3917355a8713..d89d702c2cb6 100644 --- a/keyboards/planck/keymaps/jirgn/keymap.c +++ b/keyboards/planck/keymaps/jirgn/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -58,12 +56,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Hyper| Alt | Super| Lower| Space | Raise| Super| ALt | Hyper| | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {CTL_T(KC_ESC), NAV_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NAV_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, SFT_T(KC_ENT)}, - {___x___, KC_HYPR, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LGUI, KC_LALT, KC_HYPR, ___x___} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_T(KC_ESC), NAV_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NAV_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, SFT_T(KC_ENT), + ___x___, KC_HYPR, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LGUI, KC_LALT, KC_HYPR, ___x___ +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -76,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_TILD, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {CTL_DEL, LALT(KC_1), LALT(KC_2), KC_EUR, LALT(KC_4), LALT(KC_5), LALT(KC_6), KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, S(KC_NUHS), S(KC_NUBS), _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, + CTL_DEL, LALT(KC_1), LALT(KC_2), KC_EUR, LALT(KC_4), LALT(KC_5), LALT(KC_6), KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, S(KC_NUHS), S(KC_NUBS), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -94,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {CTL_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, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_RAISE] = LAYOUT_planck_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, + CTL_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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Navigation * ,-----------------------------------------------------------------------------------. @@ -112,12 +110,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_NAVIGATION] = { - {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, - {_______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END , KC_LEFT, KC_DOWN, KC_UP , KC_RIGHT, _______, ___x___}, - {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______}, - {___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, ___x___} -}, +[_NAVIGATION] = LAYOUT_planck_grid( + ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, + _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END , KC_LEFT, KC_DOWN, KC_UP , KC_RIGHT, _______, ___x___, + _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______, + ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, ___x___ +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -131,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {___x___, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {___x___, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, ___x___, ___x___, KC_C, KC_V, ___x___, ___x___, KC_N, KC_M, ___x___, ___x___, ___x___} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + ___x___, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + ___x___, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, ___x___, ___x___, KC_C, KC_V, ___x___, ___x___, KC_N, KC_M, ___x___, ___x___, ___x___ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -149,12 +147,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, PLOVER, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, PLOVER, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/joe/keymap.c b/keyboards/planck/keymaps/joe/keymap.c index ff17fa23662d..b759a86cea98 100644 --- a/keyboards/planck/keymaps/joe/keymap.c +++ b/keyboards/planck/keymaps/joe/keymap.c @@ -1,55 +1,54 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H #include "keymap_colemak.h" +#define FN3_ESC LT(6, KC_ESC) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Joe colemak */ - {F(3), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, - {F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT}, - {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} - }, - [1] = { /* Joe soft Colemak */ - {F(3), CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_MINS}, - {KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_ENT }, - {F(15), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT}, - {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} - }, - [2] = { /* Joe NUMPAD */ - {F(3), KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, LSFT(KC_9), LSFT(KC_0), KC_PSLS, KC_P7, KC_P8, KC_P9 }, - {KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, LSFT(KC_5), KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6 }, - {F(15), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_PPLS, KC_P0, KC_PDOT, KC_PENT} - }, - [3] = { /* Joe 1337 haxOr5*/ - {F(3), KC_Q, KC_W, KC_F, KC_P, KC_6, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, - {KC_BSPC, KC_4, KC_R, KC_5, KC_7, KC_D, KC_H, KC_N, KC_3, KC_1, KC_0, KC_ENT }, - {F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT}, - {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} - }, - [4] = { /* Joe LOWER fn1 */ - {KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(3), M(2), M(1), M(0) }, - {KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, - {KC_BSLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_PGUP, KC_EQL }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_NO, KC_HOME, KC_PGDN, KC_END } - }, - [5] = { /* Joe UPPER fn2 */ - {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_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_WH_U, KC_BTN4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO }, - {KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_L, KC_WH_D, KC_WH_R, KC_NO, KC_NO, LCTL(KC_PGUP), LCTL(LALT(KC_UP)), LCTL(KC_PGDN) }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_NO, KC_NO, MO(5), KC_NO, LCTL(LALT(KC_LEFT)), LCTL(LALT(KC_DOWN)), LCTL(LALT(KC_RGHT))} - }, - [6] = { /* Joe SPECIAL fn3 */ - {KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, - {KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, 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, KC_NO, KC_NO, KC_NO }, - {F(6), F(7), F(8), F(9), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L))} - } + [0] = LAYOUT_planck_grid( /* Joe colemak */ + FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT , + F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_planck_grid( /* Joe soft Colemak */ + FN3_ESC, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_MINS, + KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_ENT , + F(15), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + ), + [2] = LAYOUT_planck_grid( /* Joe NUMPAD */ + FN3_ESC, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, LSFT(KC_9), LSFT(KC_0), KC_PSLS, KC_P7, KC_P8, KC_P9 , + KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, LSFT(KC_5), KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6 , + F(15), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 , + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_PPLS, KC_P0, KC_PDOT, KC_PENT + ), + [3] = LAYOUT_planck_grid( /* Joe 1337 haxOr5*/ + FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_6, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, + KC_BSPC, KC_4, KC_R, KC_5, KC_7, KC_D, KC_H, KC_N, KC_3, KC_1, KC_0, KC_ENT , + F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + ), + [4] = LAYOUT_planck_grid( /* Joe LOWER fn1 */ + KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(3), M(2), M(1), M(0) , + KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_BSLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_PGUP, KC_EQL , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_NO, KC_HOME, KC_PGDN, KC_END + ), + [5] = LAYOUT_planck_grid( /* Joe UPPER fn2 */ + 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_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_WH_U, KC_BTN4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO , + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_L, KC_WH_D, KC_WH_R, KC_NO, KC_NO, LCTL(KC_PGUP), LCTL(LALT(KC_UP)), LCTL(KC_PGDN) , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_NO, KC_NO, MO(5), KC_NO, LCTL(LALT(KC_LEFT)), LCTL(LALT(KC_DOWN)), LCTL(LALT(KC_RGHT)) + ), + [6] = LAYOUT_planck_grid( /* Joe SPECIAL fn3 */ + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , + KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, 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, KC_NO, KC_NO, KC_NO , + F(6), F(7), F(8), F(9), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L)) + ) }; const uint16_t PROGMEM fn_actions[] = { - /* ESC on tap, fn3 on hold */ - [3] = ACTION_LAYER_TAP_KEY(6, KC_ESC), - /* toggle layers */ [6] = ACTION_DEFAULT_LAYER_SET(0), [7] = ACTION_DEFAULT_LAYER_SET(1), diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index b0636d3147dd..274a3b57fb2d 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -1,5 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#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. @@ -24,12 +23,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | alt |play/p| super|shift | Space|Raise | lower| alt | altgr| |fn | * `-----------------------------------------------------------------------------------' */ -[QWERTY] = { - {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_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {_______, KC_LALT, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT, KC_SPC, MO(RAISE), MO(LOWER), KC_LALT, KC_RALT, XXXXXXX, MO(FUNCTION)} -}, +[QWERTY] = LAYOUT_planck_grid( + 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_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + _______, KC_LALT, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT, KC_SPC, MO(RAISE), MO(LOWER), KC_LALT, KC_RALT, XXXXXXX, MO(FUNCTION) +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -42,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[LOWER] = { - {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_LCBR, KC_RCBR, KC_PLUS, _______, _______, RALT(KC_W), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______}, - {_______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[LOWER] = LAYOUT_planck_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_LCBR, KC_RCBR, KC_PLUS, _______, _______, RALT(KC_W), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______, + _______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -60,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[RAISE] = { - {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_LBRC, KC_RBRC, KC_EQL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_MINS, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[RAISE] = LAYOUT_planck_grid( + 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_LBRC, KC_RBRC, KC_EQL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_MINS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Fn * ,-----------------------------------------------------------------------------------. @@ -78,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | CAPS | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[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_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_NEXT_TRACK, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______}, - {_______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______} -}, +[FUNCTION] = LAYOUT_planck_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, + _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_NEXT_TRACK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______, + _______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______ +), }; diff --git a/keyboards/planck/keymaps/kelorean/keymap.c b/keyboards/planck/keymaps/kelorean/keymap.c index 03268d160a97..f6bc65b62b30 100644 --- a/keyboards/planck/keymaps/kelorean/keymap.c +++ b/keyboards/planck/keymaps/kelorean/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -54,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt| * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC}, - {KC_BSPC, 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, SFT_T(KC_ENT)}, - {KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, + KC_BSPC, 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, SFT_T(KC_ENT), + KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT) +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -72,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt| * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC}, - {KC_BSPC, 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, SFT_T(KC_ENT)}, - {KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)} -}, +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC, + KC_BSPC, 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, SFT_T(KC_ENT), + KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT) +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -90,12 +88,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt| * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_ESC}, - {KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)} -}, +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_ESC, + KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT), + KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT) +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -108,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -126,12 +124,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -145,12 +143,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -163,12 +161,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 8677e7b20f6e..ccd4386c9220 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -1,6 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -53,12 +51,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {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}, - {TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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, + TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -71,12 +69,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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, W10SLP, _______, KC_END, KC_HOME, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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, W10SLP, _______, KC_END, KC_HOME, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -89,12 +87,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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_PGDN, KC_PGUP, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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_PGDN, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -107,12 +105,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | CADel| * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF, ADMIN, SMSPC1, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, M_BRDFT, M_BRINC, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, M_BRTOG, M_BRDEC, C_A_INS}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_DEL} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF, ADMIN, SMSPC1, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, M_BRDFT, M_BRINC, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, M_BRTOG, M_BRDEC, C_A_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_DEL +) }; diff --git a/keyboards/planck/keymaps/kloki/keymap.c b/keyboards/planck/keymaps/kloki/keymap.c index 99f00a5f383c..c22ca15b4e86 100644 --- a/keyboards/planck/keymaps/kloki/keymap.c +++ b/keyboards/planck/keymaps/kloki/keymap.c @@ -1,6 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; enum planck_layers { @@ -31,20 +29,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | GUI | Alt | Alt | [ | ] | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_WORKMAN] = { - {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC }, - {CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT }, - {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, - {KC_LGUI, KC_LALT, KC_LBRC, KC_RBRC, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } -}, +[_WORKMAN] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC , + CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT , + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT , + KC_LGUI, KC_LALT, KC_LBRC, KC_RBRC, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), -[_QWERTY] = { - {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, - {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, - {_______, _______, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______} -}, +[_QWERTY] = LAYOUT_planck_grid( + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT , + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______ +), /* LOWER * ,-----------------------------------------------------------------------------------. @@ -57,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* RAISE * ,-----------------------------------------------------------------------------------. @@ -75,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_TILD, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_ASTR, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, - {KC_DEL, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_UNDS, KC_PLUS, KC_EQL, KC_BSLS, _______}, - {_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_LABK, KC_RABK, KC_HOME, KC_END, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_ASTR, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , + KC_DEL, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_UNDS, KC_PLUS, KC_EQL, KC_BSLS, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_LABK, KC_RABK, KC_HOME, KC_END, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), @@ -96,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, WORKMAN, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, WORKMAN, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/kmontag42/keymap.c b/keyboards/planck/keymaps/kmontag42/keymap.c index fc418f4e8eb2..6910dbc2509f 100644 --- a/keyboards/planck/keymaps/kmontag42/keymap.c +++ b/keyboards/planck/keymaps/kmontag42/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -50,12 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | GUI | Ctrl | Alt | ) |Lower | Space |Raise | Left | Down | Up |Right | * `--------------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {KC_LGUI, KC_LCTL, KC_LALT, KC_RPRN, LOWER, KC_LEAD, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LGUI, KC_LCTL, KC_LALT, KC_RPRN, LOWER, KC_LEAD, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -68,12 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -86,12 +84,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -105,12 +103,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -123,12 +121,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/kyle/keymap.c b/keyboards/planck/keymaps/kyle/keymap.c index eee509013995..a788aa859f89 100644 --- a/keyboards/planck/keymaps/kyle/keymap.c +++ b/keyboards/planck/keymaps/kyle/keymap.c @@ -1,31 +1,31 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* Qwerty */ - {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_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_RCTL, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[0] = LAYOUT_planck_grid( /* Qwerty */ + 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_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_RCTL, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommadate for both spacebar wiring positions -}, -[1] = { /* Colemak */ - {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_TAB, 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}, - {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[2] = { /* RAISE */ - {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, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* LOWER */ - {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -} +), +[1] = LAYOUT_planck_grid( /* Colemak */ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, 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, + KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[2] = LAYOUT_planck_grid( /* RAISE */ + 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, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_planck_grid( /* LOWER */ + S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, + KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +) }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c index 59bb36038bd7..249bcb87a75c 100644 --- a/keyboards/planck/keymaps/lae3/keymap.c +++ b/keyboards/planck/keymaps/lae3/keymap.c @@ -1,10 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE -#include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -57,12 +51,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | Move |Lower | Space |Raise | Move | Alt | GUI | Ctrl | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = { - {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_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(_MV), LOWER, KC_SPC, KC_SPC, RAISE, MO(_MV), KC_RALT, KC_RGUI, KC_RCTL} - }, + [_QWERTY] = LAYOUT_planck_grid( + 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_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(_MV), LOWER, KC_SPC, KC_SPC, RAISE, MO(_MV), KC_RALT, KC_RGUI, KC_RCTL + ), /* Arrow * ,-----------------------------------------------------------------------------------. @@ -75,12 +69,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Left | Down | Right| * `-----------------------------------------------------------------------------------' */ - [_ARROW] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT} - }, + [_ARROW] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT + ), /* Numpad * ,-----------------------------------------------------------------------------------. @@ -93,12 +87,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | 0 | . | + | | * `-----------------------------------------------------------------------------------' */ - [_NUMPAD] = { - {_______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______}, - {_______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS, _______} - }, + [_NUMPAD] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS, _______ + ), /* Movement * ,-----------------------------------------------------------------------------------. @@ -111,12 +105,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_MOVEMENT] = { - {_______, KC_MB2, KC_MUP, KC_MB1, KC_MWUP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______}, - {_______, KC_MLFT, KC_MDN, KC_MRGT, KC_MWDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - }, + [_MOVEMENT] = LAYOUT_planck_grid( + _______, KC_MB2, KC_MUP, KC_MB1, KC_MWUP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, KC_MLFT, KC_MDN, KC_MRGT, KC_MWDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -129,12 +123,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_DEL, KC_END, KC_PGDN, _______}, - {KC_CAPS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, XXXXXXX, _______}, - {_______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - }, + [_LOWER] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_DEL, KC_END, KC_PGDN, _______, + KC_CAPS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, XXXXXXX, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -147,12 +141,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_INS, KC_HOME, KC_PGUP, _______}, - {KC_CAPS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_PIPE, KC_DQUO, XXXXXXX, _______}, - {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - }, + [_RAISE] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_INS, KC_HOME, KC_PGUP, _______, + KC_CAPS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_PIPE, KC_DQUO, XXXXXXX, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -165,12 +159,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = { - {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, BL_STEP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, QWERTY, ARROW, NUMPAD, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - } + [_ADJUST] = LAYOUT_planck_grid( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_STEP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, QWERTY, ARROW, NUMPAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; diff --git a/keyboards/planck/keymaps/leo/keymap.c b/keyboards/planck/keymaps/leo/keymap.c index d45f87a5d232..5a4a720fffa2 100644 --- a/keyboards/planck/keymaps/leo/keymap.c +++ b/keyboards/planck/keymaps/leo/keymap.c @@ -1,28 +1,28 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* BASE */ - {KC_ESC, KC_LBRC, KC_QUOT, KC_SCLN, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT}, - {KC_LSFT, KC_DOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_COMM}, - {KC_LCTL, KC_LALT, KC_LGUI, MO(4), MO(3), KC_SPC, KC_SPC, MO(2), MO(4), KC_RGUI, KC_RALT, KC_RCTL} -}, -[2] = { /* RAISE */ - {RALT(KC_RBRC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_RBRC)}, - {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {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] = { /* LOWER */ - {S(KC_EQL),S(KC_1),S(KC_2),S(KC_3),RALT(KC_5),S(KC_5), S(KC_6), S(KC_7),RALT(KC_7),RALT(KC_0),S(KC_0), KC_MINS}, - {KC_TRNS,RALT(KC_2),S(KC_SLSH),KC_NUBS,S(KC_NUBS),RALT(KC_MINS),RALT(KC_NUBS), KC_NUHS, S(KC_8), S(KC_9), S(KC_MINS), KC_SLSH}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_8), RALT(KC_9), KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[4] = { /* META */ - {KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_DEL}, - {KC_TRNS, KC_RGHT, KC_DOWN, KC_LEFT, KC_PGUP, KC_TRNS, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_PGDN, KC_TRNS, 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} -} +[0] = LAYOUT_planck_grid( /* BASE */ + KC_ESC, KC_LBRC, KC_QUOT, KC_SCLN, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, + KC_LSFT, KC_DOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_COMM, + KC_LCTL, KC_LALT, KC_LGUI, MO(4), MO(3), KC_SPC, KC_SPC, MO(2), MO(4), KC_RGUI, KC_RALT, KC_RCTL +), +[2] = LAYOUT_planck_grid( /* RAISE */ + RALT(KC_RBRC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_RBRC), + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_planck_grid( /* LOWER */ + S(KC_EQL),S(KC_1),S(KC_2),S(KC_3),RALT(KC_5),S(KC_5), S(KC_6), S(KC_7),RALT(KC_7),RALT(KC_0),S(KC_0), KC_MINS, + KC_TRNS,RALT(KC_2),S(KC_SLSH),KC_NUBS,S(KC_NUBS),RALT(KC_MINS),RALT(KC_NUBS), KC_NUHS, S(KC_8), S(KC_9), S(KC_MINS), KC_SLSH, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_8), RALT(KC_9), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[4] = LAYOUT_planck_grid( /* META */ + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_DEL, + KC_TRNS, KC_RGHT, KC_DOWN, KC_LEFT, KC_PGUP, KC_TRNS, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_PGDN, KC_TRNS, 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/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c index 96393bc35d3a..9bd4b7a60b68 100644 --- a/keyboards/planck/keymaps/lucas/keymap.c +++ b/keyboards/planck/keymaps/lucas/keymap.c @@ -8,14 +8,13 @@ The "Gaming" layer is mainly customized for CS:GO. If you have any question about this keymap feel free to shoot me a message on reddit! */ -#include "keymap.h" +#include QMK_KEYBOARD_H #include "keymap_german.h" -#include "backlight.h" -#include "debug.h" -#include "action_layer.h" + +#define LT_SPC LT(4, KC_SPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* Colemak +[0] = LAYOUT_planck_grid( /* Colemak * ,-----------------------------------------------------------------------. * | Esc | q | w | f | p | g | j | l | u | y | ; | - | * |-----------------------------------------------------------------------| @@ -26,12 +25,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | CTL | GUI | Tab | ALT |Lower| Space |Raise|Left |Down | Up |Right| * `-----------------------------------------------------------------------' */ - {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Z, DE_SCLN, DE_MINS}, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, DE_QUOT}, - {M(0), KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, DE_COMM, DE_DOT, DE_SLSH, KC_ENT}, - {KC_LCTL, KC_LGUI, KC_TAB, KC_LALT, MO(3),F(3), F(3), MO(2),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[1] = { /* Symbols + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Z, DE_SCLN, DE_MINS, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, DE_QUOT, + M(0), KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, DE_COMM, DE_DOT, DE_SLSH, KC_ENT, + KC_LCTL, KC_LGUI, KC_TAB, KC_LALT, MO(3), LT_SPC, LT_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[1] = LAYOUT_planck_grid( /* Symbols * ,-----------------------------------------------------------------------. * | | | | | | | | | | | : | | * |-----------------------------------------------------------------------| @@ -42,12 +41,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, DE_DOT, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQOT}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_MORE, DE_QST, KC_TRNS}, - {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] = { /* Raise + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DOT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_MORE, DE_QST, KC_TRNS, + 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_planck_grid( /* Raise * ,-----------------------------------------------------------------------. * | | Ä | | | | | | | Ü | Ö | |Game | * |-----------------------------------------------------------------------| @@ -58,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |LCTL |LGUI | Tab |LALT |Lower| Space | |Mute |Vol- |Vol+ | P/P | * `-----------------------------------------------------------------------' */ - {KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, F(4)}, - {KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12)}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11)}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* Lower + KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, F(4), + KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12), + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_planck_grid( /* Lower * ,-----------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | + | * |-----------------------------------------------------------------------| @@ -74,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |LCTL |LGUI | Tab |LALT | | Space |Raise|Home |PgDn |PgUp | End | * `-----------------------------------------------------------------------' */ - {DE_TILD, DE_EXLM, DE_AT, DE_HASH, DE_DLR, DE_PERC, DE_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, DE_PLUS}, - {DE_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_EQL}, - {KC_NO, KC_NO, KC_NO, DE_PIPE, DE_LBRC, DE_RBRC, DE_LCBR, DE_RCBR, DE_EURO, KC_NO, DE_BSLS, KC_ENT}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, -[4] = { /* Function + DE_TILD, DE_EXLM, DE_AT, DE_HASH, DE_DLR, DE_PERC, DE_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, DE_PLUS, + DE_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_EQL, + KC_NO, KC_NO, KC_NO, DE_PIPE, DE_LBRC, DE_RBRC, DE_LCBR, DE_RCBR, DE_EURO, KC_NO, DE_BSLS, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), +[4] = LAYOUT_planck_grid( /* Function * ,-----------------------------------------------------------------------. * | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | * |-----------------------------------------------------------------------| @@ -90,12 +89,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |Light|BL DN|BL UP| | | | |Mute |Vol- |Vol+ | P/P | * `-----------------------------------------------------------------------' */ - {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_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, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_NO, KC_NO, KC_NO, RESET, KC_NO}, - {KC_NO, BL_TOGG, BL_DEC, BL_INC, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[5] = { /* Gaming + 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_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, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_NO, KC_NO, KC_NO, RESET, KC_NO, + KC_NO, BL_TOGG, BL_DEC, BL_INC, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY +), +[5] = LAYOUT_planck_grid( /* Gaming * ,-----------------------------------------------------------------------. * | Buy | ESC | q | w | e | r | t | y | u | i | o | p | * |-----------------------------------------------------------------------| @@ -106,12 +105,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Tab | ALT | | Space |CrJmp| GUI |Left |Down |Right| * `-----------------------------------------------------------------------' */ - {MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, F(4)}, - {KC_ENT, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN}, - {KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_DOT, KC_UP, DE_SLSH}, - {KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT} -}, -[6] = { /* Gaming + MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, F(4), + KC_ENT, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN, + KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_DOT, KC_UP, DE_SLSH, + KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT +), +[6] = LAYOUT_planck_grid( /* Gaming * CS:GO buy binds * ,-----------------------------------------------------------------------. * | | | | | | | | | 7 | 8 | 9 | | @@ -123,15 +122,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Tab | ALT | | Space |CrJmp| | 0 | KP+ |PEnt | * `-----------------------------------------------------------------------' */ - {KC_TRNS, KC_NO, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_P7, KC_P8, KC_P9, KC_NO}, - {KC_BSPC, KC_NO, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_P4, KC_P5, KC_P6, KC_END}, - {KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_P1, KC_P2, KC_P3, KC_PGDN}, - {KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_NO, KC_P0, KC_PDOT, KC_PENT} -}, + KC_TRNS, KC_NO, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_P7, KC_P8, KC_P9, KC_NO, + KC_BSPC, KC_NO, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_P4, KC_P5, KC_P6, KC_END, + KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_P1, KC_P2, KC_P3, KC_PGDN, + KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_NO, KC_P0, KC_PDOT, KC_PENT +), }; const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_LAYER_TAP_KEY(4,KC_SPC), // to Function [4] = ACTION_LAYER_TOGGLE(5), // toggle Gaming [5] = ACTION_MODS_TAP_KEY(KC_LSFT, KC_CAPS), //Shift on press, Caps on tap }; diff --git a/keyboards/planck/keymaps/lukas/keymap.c b/keyboards/planck/keymaps/lukas/keymap.c index 7adb6a3dd0ec..510cb147bd80 100644 --- a/keyboards/planck/keymaps/lukas/keymap.c +++ b/keyboards/planck/keymaps/lukas/keymap.c @@ -1,8 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#include QMK_KEYBOARD_H // This simple keymap is optimized for xmonad users using super as their modifier key. // M(1) makes it possible to change virtual screens and swap windows between them. @@ -13,24 +9,24 @@ #define _RS 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = { /* Qwerty */ - {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, M(1), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, - [_RS] = { /* RAISE */ - {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} - }, - [_LW] = { /* LOWER */ - {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, 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} - } + [_QW] = LAYOUT_planck_grid( /* Qwerty */ + 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, M(1), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [_RS] = LAYOUT_planck_grid( /* RAISE */ + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [_LW] = LAYOUT_planck_grid( /* LOWER */ + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, 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 + ) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c index 2ee8a5072e37..1fa0ea0745ee 100644 --- a/keyboards/planck/keymaps/luke/keymap.c +++ b/keyboards/planck/keymaps/luke/keymap.c @@ -41,8 +41,7 @@ */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#include QMK_KEYBOARD_H // Layers #define _COLEMAK 0 @@ -112,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, - {CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) , + CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV) +), @@ -133,12 +132,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, - {CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) , + CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), /* Symbols @@ -153,12 +152,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_SYM] = { - {KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC}, - {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS}, - {KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT }, - {THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______} -}, +[_SYM] = LAYOUT_planck_grid( + KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC, + FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS, + KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT , + THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______ +), /* Numbers @@ -173,12 +172,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_NUM] = { - {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT }, - {KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT }, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______} -}, +[_NUM] = LAYOUT_planck_grid( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT , + KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT , + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______ +), /* Gr layer / international keys @@ -193,20 +192,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_GR] = { - {_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______}, - {_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______}, - {MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S)}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_GR] = LAYOUT_planck_grid( + _______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______, + _______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______, + MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), // Shifted layer of the above -[_GR_S] = { - {_______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______}, - {_______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______}, - {MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S)}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_GR_S] = LAYOUT_planck_grid( + _______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______, + _______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______, + MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Adjust Layer (Gr + Num) @@ -221,12 +220,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_ADJ] = { - {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, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_ADJ] = LAYOUT_planck_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 , + XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Navigation @@ -241,12 +240,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_NAV] = { - {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC}, - {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT }, - {XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT }, - {_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______} -}, +[_NAV] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC, + XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT , + XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT , + _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______ +), /* Plover Layer * ,-----------------------------------------------------------------------------------. @@ -260,12 +259,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -} +[_PLOVER] = LAYOUT_planck_grid( + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) }; diff --git a/keyboards/planck/keymaps/mason/keymap.c b/keyboards/planck/keymaps/mason/keymap.c index 3843bf210052..9cf65c172d37 100644 --- a/keyboards/planck/keymaps/mason/keymap.c +++ b/keyboards/planck/keymaps/mason/keymap.c @@ -1,5 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#include QMK_KEYBOARD_H enum planck_layers { _QWERTY, @@ -26,12 +25,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Caps | Esc | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = { - {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_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, + [_QWERTY] = LAYOUT_planck_grid( + 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_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -44,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} - }, + [_LOWER] = LAYOUT_planck_grid( + _______, 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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -62,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = { - {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {_______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, - {_______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} - }, + [_RAISE] = LAYOUT_planck_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -80,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER}, - {_______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - } + [_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/planck/keymaps/matrixman/keymap.c b/keyboards/planck/keymaps/matrixman/keymap.c index 583967f63a6b..20982a24ea2f 100644 --- a/keyboards/planck/keymaps/matrixman/keymap.c +++ b/keyboards/planck/keymaps/matrixman/keymap.c @@ -1,8 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif +#include QMK_KEYBOARD_H // http://www.keyboard-layout-editor.com/#/gists/eb0696806831fc0d93c9 @@ -14,47 +10,47 @@ #define _NAV_ALT 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_PROSE] = { - {LT(_NAV_L,KC_Q), KC_W, KC_E, KC_R, KC_T, KC_DELETE, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, LT(_NAV_R,KC_P)} - ,{KC_A, KC_S, KC_D, KC_F, KC_G, CTL_T(KC_ESC), CTL_T(KC_SCLN), KC_H, KC_J, KC_K, KC_L, KC_QUOT} - ,{SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), ALT_T(KC_INS), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)} - ,{KC_LCTRL, KC_LGUI, KC_FN0, KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, KC_FN0, KC_RCTRL, KC_ENT} -}, +[_PROSE] = LAYOUT_planck_grid( + LT(_NAV_L,KC_Q), KC_W, KC_E, KC_R, KC_T, KC_DELETE, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, LT(_NAV_R,KC_P) + ,KC_A, KC_S, KC_D, KC_F, KC_G, CTL_T(KC_ESC), CTL_T(KC_SCLN), KC_H, KC_J, KC_K, KC_L, KC_QUOT + ,SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), ALT_T(KC_INS), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) + ,KC_LCTRL, KC_LGUI, KC_FN0, KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, KC_FN0, KC_RCTRL, KC_ENT +), // accessed via the left symb-layer key, includes a semicolon where the right symb-layer key was -[_SYMB_L] = { - {KC_GRV, KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE} - ,{KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_4, KC_5, KC_6, KC_MINS} - ,{KC_EQL , KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_TRNS, KC_TRNS, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS} - ,{LSFT(KC_QUOT), KC_TRNS, KC_COMM, LSFT(KC_SLSH), KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_0, KC_DOT, KC_DOT, KC_TRNS} -}, +[_SYMB_L] = LAYOUT_planck_grid( + KC_GRV, KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE + ,KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_4, KC_5, KC_6, KC_MINS + ,KC_EQL , KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_TRNS, KC_TRNS, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS + ,LSFT(KC_QUOT), KC_TRNS, KC_COMM, LSFT(KC_SLSH), KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_0, KC_DOT, KC_DOT, KC_TRNS +), // accessed via the right symb-layer key, includes a colon where the left symb-layer key was -[_SYMB_R] = { - {KC_GRV, KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE} - ,{KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_4, KC_5, KC_6, KC_MINS} - ,{KC_EQL , KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_TRNS, KC_TRNS, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS} - ,{LSFT(KC_QUOT), KC_TRNS, KC_COMM, LSFT(KC_SLSH), KC_COLN, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TRNS, KC_TRNS} -}, +[_SYMB_R] = LAYOUT_planck_grid( + KC_GRV, KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE + ,KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_4, KC_5, KC_6, KC_MINS + ,KC_EQL , KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_TRNS, KC_TRNS, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS + ,LSFT(KC_QUOT), KC_TRNS, KC_COMM, LSFT(KC_SLSH), KC_COLN, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TRNS, KC_TRNS +), // accessed via the left nav-layer key, includes a F10 where the right nav-layer key was -[_NAV_L] = { - {KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10} - ,{KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11} - ,{KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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} -}, +[_NAV_L] = LAYOUT_planck_grid( + KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + ,KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11 + ,KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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 +), // accessed via the right nav-layer key, includes a F1 where the left nav-layer key was -[_NAV_R] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_TRNS} - ,{KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11} - ,{KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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} -}, +[_NAV_R] = LAYOUT_planck_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_TRNS + ,KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11 + ,KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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 +), // accessed via the lower alt keys, moves tab and delete to make alt+tab and ctrl+alt+del feel more standard -[_NAV_ALT] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_DELETE} - ,{KC_TAB, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11} - ,{KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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} -} +[_NAV_ALT] = LAYOUT_planck_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_DELETE + ,KC_TAB, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11 + ,KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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 +) }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/planck/keymaps/max/keymap.c b/keyboards/planck/keymaps/max/keymap.c index a80d677c64df..1e5d6a61c2fe 100644 --- a/keyboards/planck/keymaps/max/keymap.c +++ b/keyboards/planck/keymaps/max/keymap.c @@ -1,31 +1,31 @@ -#include "keymap.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { /* Qwerty */ - {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_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_QUOT}, - {KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[0] = LAYOUT_planck_grid( /* Qwerty */ + 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_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_QUOT, + KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommadate for both spacebar wiring positions -}, -[1] = { /* Colemak */ - {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, 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_QUOT}, - {KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[2] = { /* RAISE */ - {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, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS}, - {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_BSLS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* LOWER */ - {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_BSLS)}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -} +), +[1] = LAYOUT_planck_grid( /* Colemak */ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, 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_QUOT, + KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[2] = LAYOUT_planck_grid( /* RAISE */ + 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, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_planck_grid( /* LOWER */ + S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, + KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_BSLS), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +) }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/planck/keymaps/mitch/keymap.c b/keyboards/planck/keymaps/mitch/keymap.c index 3887881a9ce6..814a28deb8b3 100644 --- a/keyboards/planck/keymaps/mitch/keymap.c +++ b/keyboards/planck/keymaps/mitch/keymap.c @@ -1,5 +1,4 @@ -#include "keymap.h" -#include "quantum.h" +#include QMK_KEYBOARD_H #define QWERTY 0 #define LOWER 1 @@ -21,12 +20,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Esc | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[QWERTY] = { - {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, MT(MOD_RSFT, KC_ENT) }, - {KC_ESC, KC_DEL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[QWERTY] = LAYOUT_planck_grid( + 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, MT(MOD_RSFT, KC_ENT) , + KC_ESC, KC_DEL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -39,12 +38,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Enter | | | PgUp | PgUn | | * `-----------------------------------------------------------------------------------' */ -[LOWER] = { - {GUI_GRV, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_BSLS, KC_ENT}, - {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______} -}, +[LOWER] = LAYOUT_planck_grid( + GUI_GRV, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_BSLS, KC_ENT, + _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -58,10 +57,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[RAISE] = { - {KC_GRV, KC_GRV, KC_TILD, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_0, _______}, - {_______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, _______, KC_BSLS}, - {_______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, KC_1, KC_2, KC_3, _______, KC_ENT}, - {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______} -} +[RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_GRV, KC_TILD, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, _______, KC_BSLS, + _______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, KC_1, KC_2, KC_3, _______, KC_ENT, + _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______ +) }; diff --git a/keyboards/planck/keymaps/mjt/keymap.c b/keyboards/planck/keymaps/mjt/keymap.c index 8179f4ab6483..4862526e12a4 100644 --- a/keyboards/planck/keymaps/mjt/keymap.c +++ b/keyboards/planck/keymaps/mjt/keymap.c @@ -1,12 +1,6 @@ // This is MJT's bastardization of the planck and minivan defaults -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -50,12 +44,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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, SFT_T(KC_ENT) }, - {MO(_DYN), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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, SFT_T(KC_ENT) , + MO(_DYN), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -68,12 +62,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_grid( + 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -86,12 +80,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home |Pg Dn |Pg Up | End | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_RAISE] = LAYOUT_planck_grid( + 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_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -105,12 +99,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -123,18 +117,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |TogLED| | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL }, - {_______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______}, - {_______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -[_DYN] = { - {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ }, - {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL , + _______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______, + _______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +[_DYN] = LAYOUT_planck_grid( + _______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ , + _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______ +) }; diff --git a/keyboards/planck/keymaps/mjtnumsym/keymap.c b/keyboards/planck/keymaps/mjtnumsym/keymap.c index af72699a5013..6274a9a6023d 100644 --- a/keyboards/planck/keymaps/mjtnumsym/keymap.c +++ b/keyboards/planck/keymaps/mjtnumsym/keymap.c @@ -1,12 +1,6 @@ // This is MJT's bastardization of the planck and minivan defaults -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -49,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |FKEYS | Space |NUMSYM | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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, SFT_T(KC_ENT) }, - {KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, FKEYS, KC_SPC, KC_SPC, NUMSYM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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, SFT_T(KC_ENT) , + KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, FKEYS, KC_SPC, KC_SPC, NUMSYM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* FKEYS * ,-----------------------------------------------------------------------------------. @@ -67,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_FKEYS] = { - {KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______}, - {KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F6, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2}, - {_______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, DYN_REC_STOP}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_FKEYS] = LAYOUT_planck_grid( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F6, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2, + _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, DYN_REC_STOP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* NUMSYM * ,-----------------------------------------------------------------------------------. @@ -85,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home |Pg Dn |Pg Up | End | * `-----------------------------------------------------------------------------------' */ -[_NUMSYM] = { - {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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, - {_______,KC_UNDS, KC_PLUS,KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_NUMSYM] = LAYOUT_planck_grid( + 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______,KC_UNDS, KC_PLUS,KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -104,12 +98,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (FKEYS + NUMSYM) * ,-----------------------------------------------------------------------------------. @@ -122,18 +116,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |TogLED| | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL }, - {_______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______}, - {_______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} /*, -[_DYN] = { - {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ }, - {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______} -}*/ +[_ADJUST] = LAYOUT_planck_grid( + _______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL , + _______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______, + _______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) /*, +[_DYN] = LAYOUT_planck_grid( + _______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ , + _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______ +)*/ }; diff --git a/keyboards/planck/keymaps/mollat/keymap.c b/keyboards/planck/keymaps/mollat/keymap.c index 0bcafa08a645..2952a0ca8fcf 100644 --- a/keyboards/planck/keymaps/mollat/keymap.c +++ b/keyboards/planck/keymaps/mollat/keymap.c @@ -11,8 +11,7 @@ // this fork for updates as I probably won't bother jack with my pull requests frequently. // -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _HIGH 1 @@ -25,22 +24,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = { /* Qwerty */ - { LT(_MOUSE, KC_ESC),KC_Q,KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, - { LT(_FN, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - { __________, __________, KC_LGUI, KC_LALT, KC_LCTL,LT(_TMUX, KC_SPC),LT(_HIGH, KC_SPC),MO(_LOW),KC_RALT,KC_RGUI, __________, __________ } -}, +[_QWERTY] = LAYOUT_planck_grid( /* Qwerty */ + LT(_MOUSE, KC_ESC),KC_Q,KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , + LT(_FN, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), + __________, __________, KC_LGUI, KC_LALT, KC_LCTL,LT(_TMUX, KC_SPC),LT(_HIGH, KC_SPC),MO(_LOW),KC_RALT,KC_RGUI, __________, __________ +), // missing keys regarding to the form factor // keeping the dot and comma for typing faster IP addresses and (german) float values // putting the backslash on the slash's place -[_HIGH] = { - { KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, 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_COMM, KC_DOT, KC_BSLS, LSFT(KC_BSLS)}, - { __________, __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________, __________ } -}, +[_HIGH] = LAYOUT_planck_grid( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, 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_COMM, KC_DOT, KC_BSLS, LSFT(KC_BSLS), + __________, __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________, __________ +), // classic Fn-Layer triggered with 'CapsLock-key' like on Pok3r // SPC and ENT are doubled for using repeat (which I switched off, see https://github.com/tmk/tmk_keyboard/issues/287) @@ -50,37 +49,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // del besides backspace (had no better place for it because of the umlauts) // pg-down at 'f' (forward in vi), pg-up at 'b' (back in 'vi') // -[_FN] = { - { __________, __________, __________, KC_END, __________, __________, __________, __________, KC_INS, __________, KC_DEL, RALT(KC_Y) }, - { KC_TRNS, __________, RALT(KC_S), __________, KC_PGDN, RALT(KC_5), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, RALT(KC_P), RALT(KC_Q) }, - { __________, KC_HOME, __________, __________, __________, KC_PGUP, __________, __________, __________, __________, __________, KC_ENT }, - { RESET, __________, __________, __________, __________, KC_SPC, KC_SPC, __________, __________, __________, __________, __________ } -}, +[_FN] = LAYOUT_planck_grid( + __________, __________, __________, KC_END, __________, __________, __________, __________, KC_INS, __________, KC_DEL, RALT(KC_Y) , + KC_TRNS, __________, RALT(KC_S), __________, KC_PGDN, RALT(KC_5), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, RALT(KC_P), RALT(KC_Q) , + __________, KC_HOME, __________, __________, __________, KC_PGUP, __________, __________, __________, __________, __________, KC_ENT , + RESET, __________, __________, __________, __________, KC_SPC, KC_SPC, __________, __________, __________, __________, __________ +), // function key layer and some shift + (missing key at the small form factor) -[_LOW] = { - { KC_TILD, __________, __________, __________, __________, __________, __________, __________, __________, KC_LCBR, KC_RCBR, KC_UNDS }, - { __________, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_LBRC, KC_RBRC, KC_PLUS }, - { __________, __________, __________, __________, __________, KC_F9, KC_F10, KC_F11, KC_F12, __________, __________, __________ }, - { __________, __________, __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________ } -}, +[_LOW] = LAYOUT_planck_grid( + KC_TILD, __________, __________, __________, __________, __________, __________, __________, __________, KC_LCBR, KC_RCBR, KC_UNDS , + __________, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_LBRC, KC_RBRC, KC_PLUS , + __________, __________, __________, __________, __________, KC_F9, KC_F10, KC_F11, KC_F12, __________, __________, __________ , + __________, __________, __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________ +), // most macros will switch tmux screens // two macros are for vi's save/quit at 'w' and 'q' -[_TMUX] = { - { __________, M(14), M(13), __________, __________, __________, __________, __________, __________, __________, M(11), __________ }, - { M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), __________, __________ }, - { __________, __________, __________, M(12), __________, __________, M(10), __________, __________, __________, __________, __________ }, - { __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________, __________, __________ } -}, +[_TMUX] = LAYOUT_planck_grid( + __________, M(14), M(13), __________, __________, __________, __________, __________, __________, __________, M(11), __________ , + M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), __________, __________ , + __________, __________, __________, M(12), __________, __________, M(10), __________, __________, __________, __________, __________ , + __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________, __________, __________ +), // mouse movement can be improved (e.g. can't press hj at once), but I will use this seldom, so I stick with hjkl keys. -[_MOUSE] = { - { KC_TRNS, __________, __________, __________, __________, __________, __________, __________, __________, __________, __________, __________ }, - { __________, __________, __________, __________, KC_WH_D, __________, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, __________, __________ }, - { __________, __________, __________, __________, __________, KC_WH_U, __________, __________, __________, __________, __________, __________ }, - { __________, __________, __________, KC_ACL2, KC_ACL1, KC_ACL0, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, __________, __________, __________ } -} +[_MOUSE] = LAYOUT_planck_grid( + KC_TRNS, __________, __________, __________, __________, __________, __________, __________, __________, __________, __________, __________ , + __________, __________, __________, __________, KC_WH_D, __________, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, __________, __________ , + __________, __________, __________, __________, __________, KC_WH_U, __________, __________, __________, __________, __________, __________ , + __________, __________, __________, KC_ACL2, KC_ACL1, KC_ACL0, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, __________, __________, __________ +) }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/planck/keymaps/myoung34/config.h b/keyboards/planck/keymaps/myoung34/config.h index 68d447dec8fe..d855da868347 100644 --- a/keyboards/planck/keymaps/myoung34/config.h +++ b/keyboards/planck/keymaps/myoung34/config.h @@ -3,6 +3,7 @@ #include "../../config.h" +#undef WORKMAN_SOUND #define WORKMAN_SOUND COLEMAK_SOUND #ifdef AUDIO_ENABLE diff --git a/keyboards/planck/keymaps/myoung34/keymap.c b/keyboards/planck/keymaps/myoung34/keymap.c index 0bb9e7c9582d..2529df742243 100644 --- a/keyboards/planck/keymaps/myoung34/keymap.c +++ b/keyboards/planck/keymaps/myoung34/keymap.c @@ -14,11 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" -#include "backlight.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -49,12 +45,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = { - {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_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RSFT_T(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_QUOT }, - {_______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } - }, + [_QWERTY] = LAYOUT_planck_grid( + 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_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RSFT_T(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_QUOT , + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -67,12 +63,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | BL | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = { - {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_TAB, 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_HOME, KC_END, _______}, - {BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} - }, + [_LOWER] = LAYOUT_planck_grid( + 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_TAB, 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_HOME, KC_END, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -85,12 +81,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | BL | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = { - {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_TAB, 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_PGUP, KC_PGDN, _______}, - {BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} - }, + [_RAISE] = LAYOUT_planck_grid( + 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_TAB, 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_PGUP, KC_PGDN, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -103,12 +99,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_M_R, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - } + [_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_M_R, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; diff --git a/keyboards/planck/keymaps/neo2planck/keymap.c b/keyboards/planck/keymaps/neo2planck/keymap.c index 7b9d459fa27f..6579ad9bc7ab 100644 --- a/keyboards/planck/keymaps/neo2planck/keymap.c +++ b/keyboards/planck/keymaps/neo2planck/keymap.c @@ -1,8 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif +#include QMK_KEYBOARD_H #include "keymap_german.h" // for intellisense, has to be commented for building @@ -30,12 +26,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------' */ -[0] = { - { KC_ESC, DE_X, DE_V, DE_L, DE_C, DE_W, DE_K, DE_H, DE_G, DE_F, DE_Q, KC_BSPC }, - { KC_ENT, DE_U, DE_I, DE_A, DE_E, DE_O, DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y }, - { KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT }, - { KC_LCTL , KC_RGUI, KC_LALT, MO(2), MO(1), KC_SPC, KC_SPC, MO(1), MO(2), KC_RALT, KC_BTN2, KC_RCTL } -}, +[0] = LAYOUT_planck_grid( + KC_ESC, DE_X, DE_V, DE_L, DE_C, DE_W, DE_K, DE_H, DE_G, DE_F, DE_Q, KC_BSPC , + KC_ENT, DE_U, DE_I, DE_A, DE_E, DE_O, DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y , + KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT , + KC_LCTL , KC_RGUI, KC_LALT, MO(2), MO(1), KC_SPC, KC_SPC, MO(1), MO(2), KC_RALT, KC_BTN2, KC_RCTL +), /* M1 ,-----------------------------------------------------------------------------------. @@ -48,12 +44,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Ctrl | GUI | Alt | M2 | M1 | Space | M1 | M2 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' */ -[1] = { - { _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_SS }, - { KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT }, - { _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, - { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } -}, +[1] = LAYOUT_planck_grid( + _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_SS , + KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT , + _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ , + _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ +), /* M2 Navigation & Number Blocks * very easy to get used to & intuituve placement @@ -67,12 +63,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | M2 | M1 | Space | M1 | M2 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ -[2] = { - { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS }, - { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT }, - { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ }, - { _______, _______, _______, _______, MO(3), _______, _______, MO(3), _______, _______, _______, _______ } -}, +[2] = LAYOUT_planck_grid( + XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS , + KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT , + _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ , + _______, _______, _______, _______, MO(3), _______, _______, MO(3), _______, _______, _______, _______ +), /* M3 Function & Media Keys * ,-----------------------------------------------------------------------------------. @@ -85,12 +81,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | M2 | M1 | Space | M1 | M2 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ -[3] = { - { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX }, - { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT }, - { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } -}, +[3] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX , + KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT , + _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/nico/keymap.c b/keyboards/planck/keymaps/nico/keymap.c index 4efc271fc377..78365178900a 100644 --- a/keyboards/planck/keymaps/nico/keymap.c +++ b/keyboards/planck/keymaps/nico/keymap.c @@ -1,7 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "backlight.h" +#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. @@ -13,42 +11,40 @@ #define _LW 3 #define _RS 4 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QW] = { /* Qwerty */ - {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 }, - {M(0), KC_ESC, KC_LALT, KC_LGUI, F(1), KC_SPC, KC_SPC, F(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_CM] = { /* Colemak */ - {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 }, - {M(0), KC_ESC, KC_LALT, KC_LGUI, F(1), KC_SPC, KC_SPC, F(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_DV] = { /* Dvorak */ - {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 }, - {M(0), KC_ESC, KC_LALT, KC_LGUI, F(1), KC_SPC, KC_SPC, F(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_RS] = { /* RAISE */ - {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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS}, - {M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[_LW] = { /* LOWER */ - {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS}, - {M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY} -} -}; +#define LW_BSPC LT(_LW, KC_BSPC) +#define RS_ENT LT(_RS, KC_ENT) -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_KEY(MO(_LW), KC_BSPC), // Tap for backspace, hold for LOWER - [2] = ACTION_LAYER_TAP_KEY(MO(_RS), KC_ENT), // Tap for enter, hold for RAISE +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = LAYOUT_planck_grid( /* Qwerty */ + 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 , + M(0), KC_ESC, KC_LALT, KC_LGUI, LW_BSPC, KC_SPC, KC_SPC, RS_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_CM] = LAYOUT_planck_grid( /* Colemak */ + 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 , + M(0), KC_ESC, KC_LALT, KC_LGUI, LW_BSPC, KC_SPC, KC_SPC, RS_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_DV] = LAYOUT_planck_grid( /* Dvorak */ + 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 , + M(0), KC_ESC, KC_LALT, KC_LGUI, LW_BSPC, KC_SPC, KC_SPC, RS_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_RS] = LAYOUT_planck_grid( /* RAISE */ + 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS, + M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY +), +[_LW] = LAYOUT_planck_grid( /* LOWER */ + 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS, + M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY +) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/not-quite-neo/keymap.c b/keyboards/planck/keymaps/not-quite-neo/keymap.c index d5f0d9c4b35c..42ed71d0ad4d 100644 --- a/keyboards/planck/keymaps/not-quite-neo/keymap.c +++ b/keyboards/planck/keymaps/not-quite-neo/keymap.c @@ -4,8 +4,7 @@ A layout based on the */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#include QMK_KEYBOARD_H #include "nqn-keys-on-quertz-de-latin1.h" #include "nqn-basic-layout.h" @@ -35,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | CTLR | GUI | ALT | L05 | L04 | SPACE| SPACE| L04 | L05 | ALTGR| LFN | CTLR | * `-----------------------------------------------------------------------------------' */ -[L01] = { - {KC_ESC, L01_LEFT_01, L01_RIGHT_01, KC_ENTER}, - {MO(L03), L01_LEFT_02, L01_RIGHT_02, MO(L03)}, - {KC_LSHIFT, L01_LEFT_03, L01_RIGHT_03, KC_RSFT}, - {KC_LCTRL,KC_LGUI, KC_LALT, MO(L05), MO(L04), KC_SPC, KC_SPC, MO(L04), MO(L05), KC_RALT, MO(LFN), KC_RCTRL} -}, +[L01] = LAYOUT_planck_grid( + KC_ESC, L01_LEFT_01, L01_RIGHT_01, KC_ENTER, + MO(L03), L01_LEFT_02, L01_RIGHT_02, MO(L03), + KC_LSHIFT, L01_LEFT_03, L01_RIGHT_03, KC_RSFT, + KC_LCTRL,KC_LGUI, KC_LALT, MO(L05), MO(L04), KC_SPC, KC_SPC, MO(L04), MO(L05), KC_RALT, MO(LFN), KC_RCTRL +), /* @@ -59,12 +58,12 @@ L02 -> MO(L02): SHIFT (as a layer not used, not defined, not reachable) * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[L03] = { - {_______, L03_LEFT_01, L03_RIGHT_01, _______}, - {_______, L03_LEFT_02, L03_RIGHT_02, _______}, - {_______, L03_LEFT_03, L03_RIGHT_03, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[L03] = LAYOUT_planck_grid( + _______, L03_LEFT_01, L03_RIGHT_01, _______, + _______, L03_LEFT_02, L03_RIGHT_02, _______, + _______, L03_LEFT_03, L03_RIGHT_03, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* L04 -> MO(L04): NAVIGATION AND NUMBERS @@ -78,12 +77,12 @@ L02 -> MO(L02): SHIFT (as a layer not used, not defined, not reachable) * | | | | | | | 0 | | | | | | * `-----------------------------------------------------------------------------------' */ -[L04] = { - {_______, L04_LEFT_01, L04_RIGHT_01, _______}, - {_______, L04_LEFT_02, L04_RIGHT_02, _______}, - {_______, L04_LEFT_03, L04_RIGHT_03, _______}, - {_______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______, _______} -}, +[L04] = LAYOUT_planck_grid( + _______, L04_LEFT_01, L04_RIGHT_01, _______, + _______, L04_LEFT_02, L04_RIGHT_02, _______, + _______, L04_LEFT_03, L04_RIGHT_03, _______, + _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______, _______ +), /* L05 -> MO(L05): ALTERNATE @@ -97,12 +96,12 @@ L02 -> MO(L02): SHIFT (as a layer not used, not defined, not reachable) * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[L05] = { - {_______, L05_LEFT_01, L05_RIGHT_01, _______}, - {_______, L05_LEFT_02, L05_RIGHT_02, _______}, - {_______, L05_LEFT_03, L05_RIGHT_03, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[L05] = LAYOUT_planck_grid( + _______, L05_LEFT_01, L05_RIGHT_01, _______, + _______, L05_LEFT_02, L05_RIGHT_02, _______, + _______, L05_LEFT_03, L05_RIGHT_03, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* @@ -121,10 +120,10 @@ L06 -> : UNSPECIFIED * |VOICE-|VOICE+|MUS ON|MUS OF| LIGHT| | | VOL+ | VOL- | MUTE | | | * `-----------------------------------------------------------------------------------' */ -[LFN] = { - {RESET, L06_LEFT_01, L06_RIGHT_01, KC_BSPC}, - {_______, L06_LEFT_02, L06_RIGHT_02, KC_INS}, - {_______, L06_LEFT_03, L06_RIGHT_03, KC_DEL}, - {MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______} -} +[LFN] = LAYOUT_planck_grid( + RESET, L06_LEFT_01, L06_RIGHT_01, KC_BSPC, + _______, L06_LEFT_02, L06_RIGHT_02, KC_INS, + _______, L06_LEFT_03, L06_RIGHT_03, KC_DEL, + MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c index 27aa9d93cbb2..76049591197a 100644 --- a/keyboards/planck/keymaps/originerd/keymap.c +++ b/keyboards/planck/keymaps/originerd/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -40,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | DEL | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_NERD] = { - {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_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_DEL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_NERD] = LAYOUT_planck_grid( + 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_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_DEL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower @@ -59,12 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -77,12 +71,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Adjust (Lower + Raise) @@ -96,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, NERD, _______, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, NERD, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/paget/keymap.c b/keyboards/planck/keymaps/paget/keymap.c index eb3c0f020399..599380ea37b7 100755 --- a/keyboards/planck/keymaps/paget/keymap.c +++ b/keyboards/planck/keymaps/paget/keymap.c @@ -1,8 +1,6 @@ //Keymap I created to suit my working style -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H //Define the layers #define _QWERTY 0 @@ -23,12 +21,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_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_ENT, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_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_ENT, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), /* * ,-----------------------------------------------------------------------------------. @@ -41,12 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | | | |Lower | Space |Raise | | | | | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC}, - {KC_TRNS, KC_NUBS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NUHS, KC_TRNS}, - {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO} -}, +[_LOWER] = LAYOUT_planck_grid( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC, + KC_TRNS, KC_NUBS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NUHS, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO +), /* * ,-----------------------------------------------------------------------------------. @@ -60,11 +58,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO}, - {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_TRNS}, - {KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_NO} -} +[_RAISE] = LAYOUT_planck_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, + KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_NO +) }; diff --git a/keyboards/planck/keymaps/palleiko/keymap.c b/keyboards/planck/keymaps/palleiko/keymap.c index a980939388d8..d3798c651837 100644 --- a/keyboards/planck/keymaps/palleiko/keymap.c +++ b/keyboards/planck/keymaps/palleiko/keymap.c @@ -16,9 +16,7 @@ * Palleiko Layout */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -76,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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, S_ENT }, - {KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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, S_ENT , + KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -94,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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, S_ENT }, - {KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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, S_ENT , + KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -112,12 +110,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM | * `----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -130,12 +128,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -148,12 +146,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Hex Numpad * ,-----------------------------------------------------------------------------------. @@ -166,12 +164,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | 0 | | | | * `-----------------------------------------------------------------------------------' */ -[_NUM] = { - {_______, ___x___, ___x___, KC_LCBR, KC_RCBR, KC_A, KC_B, KC_7, KC_8, KC_9, ___x___, _______}, - {_______, ___x___, ___x___, KC_LPRN, KC_RPRN, KC_C, KC_D, KC_4, KC_5, KC_6, ___x___, _______}, - {_______, ___x___, ___x___, KC_LBRC, KC_RBRC, KC_E, KC_F, KC_1, KC_2, KC_3, ___x___, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______} -}, +[_NUM] = LAYOUT_planck_grid( + _______, ___x___, ___x___, KC_LCBR, KC_RCBR, KC_A, KC_B, KC_7, KC_8, KC_9, ___x___, _______, + _______, ___x___, ___x___, KC_LPRN, KC_RPRN, KC_C, KC_D, KC_4, KC_5, KC_6, ___x___, _______, + _______, ___x___, ___x___, KC_LBRC, KC_RBRC, KC_E, KC_F, KC_1, KC_2, KC_3, ___x___, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______ +), /* WM (i3 window binds) * ,-----------------------------------------------------------------------------------. @@ -184,12 +182,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | WM0 | | | | * `-----------------------------------------------------------------------------------' */ -[_WM] = { - {_______, WM_1, WM_2, WM_3, WM_4, WM_5, WM_6, WM_7, WM_8, WM_9, WM_0, _______}, - {_______, _______, _______, _______, _______, _______, _______, WM_4, WM_5, WM_6, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, WM_1, WM_2 , WM_3, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, WM_0, _______, _______, _______} -}, +[_WM] = LAYOUT_planck_grid( + _______, WM_1, WM_2, WM_3, WM_4, WM_5, WM_6, WM_7, WM_8, WM_9, WM_0, _______, + _______, _______, _______, _______, _______, _______, _______, WM_4, WM_5, WM_6, _______, _______, + _______, _______, _______, _______, _______, _______, _______, WM_1, WM_2 , WM_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, WM_0, _______, _______, _______ +), /* Navigation Layer (Vim-like arrow binds & i3 binds) * ,-----------------------------------------------------------------------------------. @@ -202,12 +200,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_NAV] = { - {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, - {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ___x___, ___x___}, - {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_NAV] = LAYOUT_planck_grid( + ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, + ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ___x___, ___x___, + _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -220,12 +218,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Reset| Debug| | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, _______, _______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c index 6f8f8579c190..6b95a2eafb94 100644 --- a/keyboards/planck/keymaps/pete/keymap.c +++ b/keyboards/planck/keymaps/pete/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -50,65 +44,65 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = { - {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 }, - {OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, - -[_COLEMAK] = { - {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 }, - {OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, - -[_DVORAK] = { - {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 }, - {OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, - -[_LOWER] = { - {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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, - -[_RAISE] = { - {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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_RAISE, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, - -[_SETUP] = { /* Setup */ - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, WIN, MAC, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______} -}, -[_MAC] = { /* Mac */ - {CYCLWIN,MACSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL }, - {_______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, MACPRNT,MACPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, - {_______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, - {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END } -}, -[_WIN] = { /* Windows */ - {CYCLWIN,WINSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL }, - {_______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, WINPRNT,WINPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, - {_______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, - {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END } -}, -[_LIN] = { /* Linux */ - {KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_QWERTY] = LAYOUT_planck_grid( + 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 , + OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_DVORAK] = LAYOUT_planck_grid( + 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 , + OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_LOWER] = LAYOUT_planck_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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +[_RAISE] = LAYOUT_planck_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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _RAISE, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +[_SETUP] = LAYOUT_planck_grid( /* Setup */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, WIN, MAC, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ +), +[_MAC] = LAYOUT_planck_grid( /* Mac */ + CYCLWIN,MACSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL , + _______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, MACPRNT,MACPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, + _______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END +), +[_WIN] = LAYOUT_planck_grid( /* Windows */ + CYCLWIN,WINSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL , + _______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, WINPRNT,WINPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, + _______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END +), +[_LIN] = LAYOUT_planck_grid( /* Linux */ + KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/phreed/keymap.c b/keyboards/planck/keymaps/phreed/keymap.c index 05574a938d70..bf68288220e8 100644 --- a/keyboards/planck/keymaps/phreed/keymap.c +++ b/keyboards/planck/keymaps/phreed/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -31,47 +29,47 @@ enum planck_layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERT__Y] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_ESC), GUI_T(KC_BSLS), KC_Y, KC_U, KC_I, KC_O, KC_P}, - {KC_A, KC_S, KC_D, LT(_NP,KC_F), KC_G, ALT_T(KC_TAB), ALT_T(KC_QUOT), KC_H, LT(_FN,KC_J), KC_K, KC_L, KC_SCLN}, - {KC_Z, KC_X, KC_C, LT(_SC,KC_V), KC_B, KC_LBRC, KC_RBRC, KC_N, LT(_CD,KC_M), KC_COMM, KC_DOT, KC_SLSH}, - {KC_LEFT, KC_DOWN, KC_BSPC, KC_ENT, KC_LSPO,CTL_T(KC_MINS), CTL_T(KC_EQL),KC_RSPC, KC_SPC, KC_DEL, KC_UP, KC_RGHT} -}, +[_QWERT__Y] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_ESC), GUI_T(KC_BSLS), KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, LT(_NP,KC_F), KC_G, ALT_T(KC_TAB), ALT_T(KC_QUOT), KC_H, LT(_FN,KC_J), KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, LT(_SC,KC_V), KC_B, KC_LBRC, KC_RBRC, KC_N, LT(_CD,KC_M), KC_COMM, KC_DOT, KC_SLSH, + KC_LEFT, KC_DOWN, KC_BSPC, KC_ENT, KC_LSPO,CTL_T(KC_MINS), CTL_T(KC_EQL),KC_RSPC, KC_SPC, KC_DEL, KC_UP, KC_RGHT +), -[_NP] = { - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_7, KC_8, KC_9, KC_DOT}, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_LALT, KC_PPLS, KC_PMNS, KC_4, KC_5, KC_6, KC_0}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_PSLS, KC_1, KC_2, KC_3, KC_EQL}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_NP] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_7, KC_8, KC_9, KC_DOT, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_LALT, KC_PPLS, KC_PMNS, KC_4, KC_5, KC_6, KC_0, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_PSLS, KC_1, KC_2, KC_3, KC_EQL, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), -[_SC] = { - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_ASTR, KC_TILD, XXXXXXX }, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, KC_DLR, KC_PERC, KC_CIRC, KC_GRV}, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_EXLM, KC_AT, KC_HASH, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_SC] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_ASTR, KC_TILD, XXXXXXX , + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, KC_DLR, KC_PERC, KC_CIRC, KC_GRV, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_EXLM, KC_AT, KC_HASH, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), -[_FN] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LALT, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_FN] = LAYOUT_planck_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LALT, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), -[_CD] = { - {KC_HOME, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_PGUP, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_PGDN, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_CD] = LAYOUT_planck_grid( + KC_HOME, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_PGUP, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_PGDN, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -} +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) }; diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c index 12f1be2ae1e9..57002cc38672 100644 --- a/keyboards/planck/keymaps/piemod/keymap.c +++ b/keyboards/planck/keymaps/piemod/keymap.c @@ -1,10 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H #define DVORAK 0 #define ARROW 1 //F(1) @@ -15,62 +9,70 @@ #define CUSTOM_MACROS 6 // F(6) #define MOUSE 7 // F(7) +#define LT_1A LT(1, KC_A) +#define LT_2O LT(2, KC_O) +#define LT_3E LT(3, KC_E) +#define LT_4U LT(4, KC_U) +#define LT_5Q LT(5, KC_Q) +#define LT_6CTL LT(6, KC_LCTL) +#define LT_7COM LT(7, KC_COMM) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DVORAK] = { - {KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE}, - {KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER}, - {KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS}, - {F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}, - }, - - [ARROW] = { - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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} - }, - - [SYMBOL] = { - {KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, - {KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21)}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL} - }, - - [NUMBER] = { - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO}, - {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL} - }, - - [FUNCTION] = { - {KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE}, - {RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END} - }, - - [EMACS] = { - {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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} - }, - - [CUSTOM_MACROS] = { - {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, 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_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} - }, - - [MOUSE] = { - {KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, 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_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO} - }, + [DVORAK] = LAYOUT_planck_grid( + KC_ESC, KC_QUOTE, LT_7COM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, + KC_TAB, LT_1A, LT_2O, LT_3E, LT_4U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, + KC_LSHIFT, KC_SCOLON, LT_5Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, + F(10), LT_6CTL, KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [ARROW] = LAYOUT_planck_grid( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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 + ), + + [SYMBOL] = LAYOUT_planck_grid( + KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21), + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL + ), + + [NUMBER] = LAYOUT_planck_grid( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL + ), + + [FUNCTION] = LAYOUT_planck_grid( + KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + [EMACS] = LAYOUT_planck_grid( + 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, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + + [CUSTOM_MACROS] = LAYOUT_planck_grid( + 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, 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_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + + [MOUSE] = LAYOUT_planck_grid( + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, 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_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO + ), }; @@ -94,15 +96,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // MACROS 6, F(6) // MOUSE 7, F(7) - // Layers - [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A. - [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. - [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. - [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. - [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. - [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. - [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. - // Special Keys [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. diff --git a/keyboards/planck/keymaps/pok3r/keymap.c b/keyboards/planck/keymaps/pok3r/keymap.c index ad83701425c0..8c10ee3401df 100644 --- a/keyboards/planck/keymaps/pok3r/keymap.c +++ b/keyboards/planck/keymaps/pok3r/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -56,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Up | Down |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {FUNCTION , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT)}, - {KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + FUNCTION , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT), + KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -74,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_TAB , KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {FUNCTION , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT)}, - {KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB , KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + FUNCTION , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT), + KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -92,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {KC_TAB , KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {FUNCTION , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, - {SFT_T(KC_ESC) , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MT(MOD_RSFT, KC_ENT)}, - {KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB , KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + FUNCTION , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + SFT_T(KC_ESC) , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MT(MOD_RSFT, KC_ENT), + KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -110,12 +108,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home |Pg Up |Pg Dn | End | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END} -}, +[_LOWER] = LAYOUT_planck_grid( + 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -128,12 +126,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home |Pg Up |Pg Dn | End | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END} -}, +[_RAISE] = LAYOUT_planck_grid( + 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_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -147,12 +145,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -165,12 +163,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, KC_CAPS}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, KC_CAPS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Function * ,-----------------------------------------------------------------------------------. @@ -183,12 +181,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | Esc | | Esc | Home |Pg Up |Pg Dn | End | * `-----------------------------------------------------------------------------------' */ -[_FUNCTION] = { - {KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL}, - {_______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, KC_ESC , _______, _______, KC_ESC , KC_HOME, KC_PGUP, KC_PGDN, KC_END} -} +[_FUNCTION] = LAYOUT_planck_grid( + KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL, + _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_ESC , _______, _______, KC_ESC , KC_HOME, KC_PGUP, KC_PGDN, KC_END +) }; diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c index 28fc8f3ad1ff..4bcfbd91a0f6 100644 --- a/keyboards/planck/keymaps/premek/keymap.c +++ b/keyboards/planck/keymaps/premek/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -34,49 +28,49 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_LGUI, _______, _______, KC_LALT, LOWER, MT(MOD_LSFT, KC_SPC), KC_ENT, KC_SPC, RAISE, KC_RALT, _______, KC_RGUI} -}, -[_COLEMAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_DVORAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_LOWER] = { - {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_F6, KC_HOME, KC_PGDN, KC_PGUP, KC_END }, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -[_RAISE] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, - {_______, _______, _______, KC_QUOT, KC_MINS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}, - {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MS_BTN3} -}, - -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LGUI, _______, _______, KC_LALT, LOWER, MT(MOD_LSFT, KC_SPC), KC_ENT, KC_SPC, RAISE, KC_RALT, _______, KC_RGUI +), +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_DVORAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_LOWER] = LAYOUT_planck_grid( + 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_F6, KC_HOME, KC_PGDN, KC_PGUP, KC_END , + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +[_RAISE] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + _______, _______, _______, KC_QUOT, KC_MINS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + _______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MS_BTN3 +), + +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index a6ecf16115f5..78123c44ce90 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -1,8 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" -#include "led.h" +#include QMK_KEYBOARD_H #include "mousekey.h" #ifdef AUDIO_ENABLE @@ -121,12 +117,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | OSHIFT | LEFT | DOWN | RIGHT | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_QWERTY] = { - { 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_UP , KC_ENT }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT } -}, +[LAYER_QWERTY] = LAYOUT_planck_grid( + 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_UP , KC_ENT , + KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT +), /* LAYER = LAYER_UPPER .-----------------------------------------------------------------------------------------------------------. | PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL | @@ -138,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ______ | ______ | ______ | ______ | UPPER | KP 0 | KP 0 | ______ | RALT | KP . | KP ENT | END | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_UPPER] = { - { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL }, - { KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS }, - { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME }, - { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END } -}, +[LAYER_UPPER] = LAYOUT_planck_grid( + KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL , + KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS , + _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME , + _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END +), /* LAYER = LAYER_LOWER .-----------------------------------------------------------------------------------------------------------. | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP | @@ -155,12 +151,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ______ | ______ | ______ | ______ | ______ | ______ | ______ | LOWER | ______ | ______ | ______ | END | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_LOWER] = { - { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP }, - { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN }, - { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME }, - { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END } -}, +[LAYER_LOWER] = LAYOUT_planck_grid( + _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP , + _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN , + _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME , + _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END +), /* LAYER = LAYER_FUNCTION .-----------------------------------------------------------------------------------------------------------. | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | @@ -172,12 +168,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_FUNCTION] = { - { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE }, - { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } -}, +[LAYER_FUNCTION] = LAYOUT_planck_grid( + XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , + XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , + _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE , + _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT +), /* LAYER = LAYER_MOUSE .-----------------------------------------------------------------------------------------------------------. | ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR | @@ -189,12 +185,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_MOUSE] = { - { KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R }, - { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U }, - { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } -}, +[LAYER_MOUSE] = LAYOUT_planck_grid( + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R , + XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U , + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D , + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R +), /* LAYER = LAYER_ADJUST .-----------------------------------------------------------------------------------------------------------. | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | MUSIC | AUDIO | @@ -206,12 +202,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX | XXXXXX | LOWER | XXXXXX | TEMPO- | VOICE- | TEMPO+ | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_ADJUST] = { - { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG }, - { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } -}, +[LAYER_ADJUST] = LAYOUT_planck_grid( + XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG , + XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , + XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX , + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP +), }; diff --git a/keyboards/planck/keymaps/rai-suta/keymap.c b/keyboards/planck/keymaps/rai-suta/keymap.c index e4934dbc4599..8cc37dc651f2 100644 --- a/keyboards/planck/keymaps/rai-suta/keymap.c +++ b/keyboards/planck/keymaps/rai-suta/keymap.c @@ -1,7 +1,6 @@ // This keymap assumes that the keyboard is recognized as JIS keyboard from the OS. -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#include QMK_KEYBOARD_H #include "version.h" #include "sendstring_jis.h" @@ -46,26 +45,26 @@ enum keymap_layer { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [KL_QWERTY] = { - { 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, JK_CLN}, - {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_ZKHK, KC_KANA, KC_LGUI, KC_LALT, M_MHEN, KC_SPC, KC_SPC, M_HENK, KC_RALT, KC_RGUI, KC_APP, KC_ENT} - }, + [KL_QWERTY] = LAYOUT_planck_grid( + 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, JK_CLN, + 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_ZKHK, KC_KANA, KC_LGUI, KC_LALT, M_MHEN, KC_SPC, KC_SPC, M_HENK, KC_RALT, KC_RGUI, KC_APP, KC_ENT + ), - [KL_LOWER] = { - {KC_GESC, KC_EXLM, JK_DQT, KC_HASH, KC_DLR, KC_PERC, JK_AMPR, JK_SQT, JK_LPRN, JK_RPRN, JK_S0, KC_DEL}, - {_______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, JK_EQ, JK_TLD, JK_GRV, JK_LCBR, JK_PIPE}, - {_______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), C(KC_Y), XXXXXXX, KC_ENT, KC_LABK, KC_RABK, JK_RCBR, JK_UNDS}, - { RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - }, + [KL_LOWER] = LAYOUT_planck_grid( + KC_GESC, KC_EXLM, JK_DQT, KC_HASH, KC_DLR, KC_PERC, JK_AMPR, JK_SQT, JK_LPRN, JK_RPRN, JK_S0, KC_DEL, + _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, JK_EQ, JK_TLD, JK_GRV, JK_LCBR, JK_PIPE, + _______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), C(KC_Y), XXXXXXX, KC_ENT, KC_LABK, KC_RABK, JK_RCBR, JK_UNDS, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), - [KL_RAISE] = { - {KC_CAPS, 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, JK_CIRC, JK_AT, JK_LBRC, KC_JYEN}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_COMM, KC_DOT, JK_RBRC, JK_BSLS}, - {M_DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - }, + [KL_RAISE] = LAYOUT_planck_grid( + KC_CAPS, 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, JK_CIRC, JK_AT, JK_LBRC, KC_JYEN, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_COMM, KC_DOT, JK_RBRC, JK_BSLS, + M_DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/planck/keymaps/rodhaene/keymap.c b/keyboards/planck/keymaps/rodhaene/keymap.c index d866684dd8cb..8aded36b8266 100644 --- a/keyboards/planck/keymaps/rodhaene/keymap.c +++ b/keyboards/planck/keymaps/rodhaene/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -50,12 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | | Alt | GUI |Lower |Enter |Space |Raise | Left | Up | Down |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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_SCLN, 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_QUOT }, - {KC_LCTL, _______, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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_SCLN, 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_QUOT , + KC_LCTL, _______, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT +), /* Number Pad * ,-----------------------------------------------------------------------------------. @@ -68,12 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Exit | | | | | | | | 0 | . | | | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = { - {_______, _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , KC_BSPC }, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_4 , KC_5 , KC_6 , KC_ENT }, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_1 , KC_2 , KC_3 , _______}, - {EXT_NUMPAD, _______, _______, _______, _______, _______, _______, _______, KC_0 , KC_DOT , _______, _______} -}, +[_NUMPAD] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , KC_BSPC , + _______, _______, _______, _______, _______, _______, _______, _______, KC_4 , KC_5 , KC_6 , KC_ENT , + _______, _______, _______, _______, _______, _______, _______, _______, KC_1 , KC_2 , KC_3 , _______, + EXT_NUMPAD, _______, _______, _______, _______, _______, _______, _______, KC_0 , KC_DOT , _______, _______ +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -86,12 +84,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -104,12 +102,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -122,12 +120,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Brite | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, NUMPAD, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, NUMPAD, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/sdothum/beakl.h b/keyboards/planck/keymaps/sdothum/beakl.h index de3da34a5d39..999f0aac95a7 100644 --- a/keyboards/planck/keymaps/sdothum/beakl.h +++ b/keyboards/planck/keymaps/sdothum/beakl.h @@ -13,19 +13,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V }, - {KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W }, - {KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, - - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, - {KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V , + KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W , + KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), + + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W), + KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | @@ -37,12 +37,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, - {TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W), + TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | @@ -54,12 +54,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, - {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, - {TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V), + S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W), + TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ..................................................................... BEAKL 8 @@ -74,19 +74,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z }, - {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z , + KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | @@ -98,12 +98,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT , + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | @@ -115,12 +115,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL 8P @@ -135,19 +135,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, - {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X , + KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + , - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + , // ,-----------------------------------------------------------------------------------. // | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | R | F | X | @@ -159,12 +159,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | F | X | @@ -176,12 +176,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ................................................................... BEAKL 8TX @@ -196,19 +196,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B }, - {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B , + KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | $ | { | } | J | ^Alt | ^GUI | G | D | R | F | X | @@ -220,12 +220,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | J | ^Alt | ^GUI | G | [ | ] | ^ | X | @@ -237,12 +237,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)}, - {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B), + S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ................................................................... BEAKL 8TT @@ -257,19 +257,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B }, - {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B , + KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | $ | { | } | J | Fn | Caps | G | D | R | F | X | @@ -281,12 +281,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, - {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X), + S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | J | Fn | Caps | G | [ | ] | ^ | X | @@ -298,12 +298,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)}, - {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B), + S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL 10 @@ -318,19 +318,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V }, - {KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V , + KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W , + KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)}, - {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V), + S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | [ | ! | ] | X | ^Alt | ^GUI | G | D | N | M | V | @@ -342,12 +342,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)}, - {S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)}, - {S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V), + S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W), + S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | H | O | U | X | ^Alt | ^GUI | G | { | + | } | V | @@ -359,12 +359,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V)}, - {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V), + S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ............................................................... BEAKL Mash Up @@ -379,19 +379,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | N | M | X | @@ -403,12 +403,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | M | X | @@ -420,12 +420,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL MU @@ -440,19 +440,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | $ | { | } | Z | Fn | Caps | G | D | N | M | X | @@ -464,12 +464,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Fn | Caps | G | [ | ] | ^ | X | @@ -481,12 +481,12 @@ // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // .................................................................... BEAKL SP @@ -501,19 +501,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, - {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, - {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X , + HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W , + KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V , + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X | @@ -525,12 +525,12 @@ // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, - {S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, - {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X), + S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W), + S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X | @@ -542,10 +542,10 @@ // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)}, - {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, - {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, - {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X), + S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W), + S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V), + OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT + ), #endif diff --git a/keyboards/planck/keymaps/sdothum/colemak.h b/keyboards/planck/keymaps/sdothum/colemak.h index b7e9df22c151..3d8f0d4863df 100644 --- a/keyboards/planck/keymaps/sdothum/colemak.h +++ b/keyboards/planck/keymaps/sdothum/colemak.h @@ -13,19 +13,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, - {KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O }, - {KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, - - [_SHIFT] = { - {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O , + KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), + + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : | @@ -37,12 +37,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : | @@ -54,12 +54,12 @@ // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif // ..................................................................... ColemaX @@ -74,19 +74,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, - {KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O }, - {KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O , + KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : | @@ -98,12 +98,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : | @@ -115,11 +115,11 @@ // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, - {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, - {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN, + S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O), + S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif diff --git a/keyboards/planck/keymaps/sdothum/common/chord_layout.h b/keyboards/planck/keymaps/sdothum/common/chord_layout.h index 2c785d56ca75..b6922705f3a5 100644 --- a/keyboards/planck/keymaps/sdothum/common/chord_layout.h +++ b/keyboards/planck/keymaps/sdothum/common/chord_layout.h @@ -14,12 +14,12 @@ // | | | | | | | | f() | | | | | see _PLOVER // '-----------------------------------------------------------------------------------' - [_EDIT] = { - {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______}, - {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______}, - {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______}, - }, + [_EDIT] = LAYOUT_planck_grid( + _______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______, + UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______, + _______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______ + ), // ................................................................ Adjust Layer @@ -33,9 +33,9 @@ // | | | | f() | | | | | f() | | | | // `-----------------------------------------------------------------------------------' - [_ADJUST] = { - {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______}, - }, + [_ADJUST] = LAYOUT_planck_grid( + PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h b/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h index 4824b82a0705..e19a6097c10f 100644 --- a/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h +++ b/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h @@ -14,16 +14,16 @@ // | | | | f() | | | | = | 0 | | | | // '-----------------------------------------------------------------------------------' - [_NUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_NUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___ #else - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___ #endif - }, + ), #else // .-----------------------------------------------------------------------------------. // | | F | E | D | | | | / | 7 | 8 | 9 | * | @@ -36,16 +36,16 @@ // | | | | f() | | | | = | 0 | | | | // '-----------------------------------------------------------------------------------' - [_NUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_CTL, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_NUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_CTL, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___ #else - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___ #endif - }, + ), // .-----------------------------------------------------------------------------------. // | | | | | | | | { | & | ? | : | } | @@ -57,12 +57,12 @@ // | | | | f() | | | | \ | | | | | | // '-----------------------------------------------------------------------------------' - [_NUMSYM] = { - {_______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR}, - {___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN}, - {_______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC}, - {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___}, - }, + [_NUMSYM] = LAYOUT_planck_grid( + _______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR, + ___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN, + _______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC, + ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___ + ), #endif // ............ .................................................. Function Keys @@ -78,10 +78,10 @@ // | | | | | f() | | | + | | | | | see _PLOVER // '-----------------------------------------------------------------------------------' - [_FNCKEY] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, - {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, - {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, - }, + [_FNCKEY] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 , + OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 , + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 , + _______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/sdothum/common/steno_layout.h b/keyboards/planck/keymaps/sdothum/common/steno_layout.h index ab4a6fe011cb..c1f2b5b24ab7 100644 --- a/keyboards/planck/keymaps/sdothum/common/steno_layout.h +++ b/keyboards/planck/keymaps/sdothum/common/steno_layout.h @@ -13,12 +13,12 @@ // | | A | O | E | U | | // `-----------------------------------------------------------------------------------' - [_PLOVER] = { - {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, - {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, - {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, - {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______}, - }, + [_PLOVER] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + _______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______ + ), #else // ,-----------------------------------------------------------------------------------. // | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | @@ -30,10 +30,10 @@ // | | A | O | E | U | | // `-----------------------------------------------------------------------------------' - [_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______}, - }, + [_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + _______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______ + ), #endif diff --git a/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h index 2edfe1a04a55..d33ca8baa80c 100644 --- a/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h +++ b/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h @@ -13,12 +13,12 @@ // | | | |Adjust| \ | | | | f() | | | | // '-----------------------------------------------------------------------------------' - [_SYMBOL] = { - {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {OS_CTL, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, - {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, - }, + [_SYMBOL] = LAYOUT_planck_grid( + _______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + OS_CTL, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + ___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___ + ), #else // .-----------------------------------------------------------------------------------. // | { | . | * | & | } | | | | Home | Up | End | PgUp | @@ -30,12 +30,12 @@ // | | | | | | \ | | | | f() | | | | // '-----------------------------------------------------------------------------------' - [_SYMBOL] = { - {KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN}, - {KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______}, - {___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, - }, + [_SYMBOL] = LAYOUT_planck_grid( + KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN, + KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______, + ___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___ + ), // .-----------------------------------------------------------------------------------. // | | ? | + | ~ | | | | | | | | | @@ -47,12 +47,12 @@ // | | | | | | | | | f() | | | | // '-----------------------------------------------------------------------------------' - [_SYMREG] = { - {___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___}, - {___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___}, - {___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______}, - {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, - }, + [_SYMREG] = LAYOUT_planck_grid( + ___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, + ___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___, + ___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______, + ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___ + ), #endif // ............................................................... Mouse Actions @@ -67,9 +67,9 @@ // | | | | | f() | | | | f() | | | | // '-----------------------------------------------------------------------------------' - [_MOUSE] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, - {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______}, - }, + [_MOUSE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, + _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/sdothum/common/toggle_layout.h b/keyboards/planck/keymaps/sdothum/common/toggle_layout.h index 504a1ff579e2..ae44576df9d8 100644 --- a/keyboards/planck/keymaps/sdothum/common/toggle_layout.h +++ b/keyboards/planck/keymaps/sdothum/common/toggle_layout.h @@ -14,16 +14,16 @@ // | | f() | Space| = | 0 | | // '-----------------------------------------------------------------------------------' - [_TTNUMBER] = { - {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, - {OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, - {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, + [_TTNUMBER] = LAYOUT_planck_grid( + _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS, + _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS, #ifdef THUMB_0 - {_______, _______, _______, _______, TT_ESC, KC_SPC, KC_0, LT_EQL, _______, _______, _______, _______}, + _______, _______, _______, _______, TT_ESC, KC_SPC, KC_0, LT_EQL, _______, _______, _______, _______ #else - {_______, _______, _______, _______, TT_ESC, KC_SPC, KC_EQL, LT_0, _______, _______, _______, _______}, + _______, _______, _______, _______, TT_ESC, KC_SPC, KC_EQL, LT_0, _______, _______, _______, _______ #endif - }, + ), // ............ .................................................. Function Keys @@ -37,12 +37,12 @@ // | | f() | | + | | | // '-----------------------------------------------------------------------------------' - [_TTFNCKEY] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, - {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, - {_______, _______, _______, _______, TT_ESC, _______, KC_PLUS, _______, _______, _______, _______, _______}, - }, + [_TTFNCKEY] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 , + OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 , + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 , + _______, _______, _______, _______, TT_ESC, _______, KC_PLUS, _______, _______, _______, _______, _______ + ), // ....................................................................... Regex @@ -56,12 +56,12 @@ // | | f() | - | + | Space| | // `-----------------------------------------------------------------------------------' - [_TTREGEX] = { - {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___}, - {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___}, - {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___}, - {_______, _______, _______, _______, TT_ESC, KC_MINS, KC_PLUS, KC_SPC, _______, _______, _______, _______}, - }, + [_TTREGEX] = LAYOUT_planck_grid( + ___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___, + ___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___, + ___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___, + _______, _______, _______, _______, TT_ESC, KC_MINS, KC_PLUS, KC_SPC, _______, _______, _______, _______ + ), // ............................................................ Navigation Layer @@ -75,12 +75,12 @@ // | | f() | | | | | // '-----------------------------------------------------------------------------------' - [_TTCURSOR] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, - {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______}, - }, + [_TTCURSOR] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______ + ), // ............................................................... Mouse Actions @@ -94,9 +94,9 @@ // | | f() | | | | | // '-----------------------------------------------------------------------------------' - [_TTMOUSE] = { - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, - {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, - {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______}, - }, + [_TTMOUSE] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, + _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______, + _______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______ + ), diff --git a/keyboards/planck/keymaps/sdothum/config.h b/keyboards/planck/keymaps/sdothum/config.h index 8bed79e6f7c8..903bbe8095d9 100644 --- a/keyboards/planck/keymaps/sdothum/config.h +++ b/keyboards/planck/keymaps/sdothum/config.h @@ -14,7 +14,7 @@ // #define MOUSEKEY_WHEEL_DELAY 0 // compile time macro string, see functions/hardware planck script (undefine otherwise) -#define PRIVATE_STRING +//#define PRIVATE_STRING // compile time macro string, must be in quotes #define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n" diff --git a/keyboards/planck/keymaps/sdothum/keymap.c b/keyboards/planck/keymaps/sdothum/keymap.c index 59a4a25e32af..597466ba4729 100644 --- a/keyboards/planck/keymaps/sdothum/keymap.c +++ b/keyboards/planck/keymaps/sdothum/keymap.c @@ -66,17 +66,10 @@ // sudo CPATH=/common make ... -#include "config.h" -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #ifdef STENO_ENABLE #include "keymap_steno.h" #endif -#ifdef AUDIO_ENABLE -#include "audio.h" -#endif -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -181,7 +174,7 @@ enum planck_keycodes { #define S_TAB S (KC_TAB) #define S_UP S (KC_UP) -#include "tapdance.h" +#include "common/tapdance.h" // keycodes #define ___x___ KC_TRNS @@ -254,35 +247,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #include "beakl.h" #include "colemak.h" #include "qwerty.h" -#include "steno_layout.h" +#include "common/steno_layout.h" // ...................................................... Number / Function Keys -#include "number_fkey_layout.h" +#include "common/number_fkey_layout.h" // ......................................................... Symbol / Navigation -#include "symbol_guifn_layout.h" +#include "common/symbol_guifn_layout.h" // ............................................................... Toggle Layers #ifdef CENTER_TT -#include "toggle_layout.h" +#include "common/toggle_layout.h" #endif // ......................................................... Short Cuts / Adjust -#include "chord_layout.h" +#include "common/chord_layout.h" }; // ...................................................................... Sounds -#include "sounds.h" +#include "common/sounds.h" // ........................................................... User Keycode Trap -#include "keycode_functions.h" +#include "common/keycode_functions.h" #define BASE_1 1 #define BASE_2 2 @@ -476,4 +469,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) return true; } -#include "init.h" +#include "common/init.h" diff --git a/keyboards/planck/keymaps/sdothum/qwerty.h b/keyboards/planck/keymaps/sdothum/qwerty.h index d11d0478b3f4..3bfdb3e70430 100644 --- a/keyboards/planck/keymaps/sdothum/qwerty.h +++ b/keyboards/planck/keymaps/sdothum/qwerty.h @@ -13,19 +13,19 @@ // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_BASE] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_BASE] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), - [_SHIFT] = { - {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, - {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, - }, + [_SHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), + S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN, + S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | @@ -37,12 +37,12 @@ // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_LSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, - {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_LSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), + S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN, + S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), // ,-----------------------------------------------------------------------------------. // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | @@ -54,11 +54,11 @@ // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| // `-----------------------------------------------------------------------------------' - [_RSHIFT] = { - {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, - {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, - {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT}, - {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, - }, + [_RSHIFT] = LAYOUT_planck_grid( + S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), + S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN, + S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT, + OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT + ), #endif diff --git a/keyboards/planck/keymaps/sean/keymap.c b/keyboards/planck/keymaps/sean/keymap.c index 497efeaab25e..b4024909f51c 100644 --- a/keyboards/planck/keymaps/sean/keymap.c +++ b/keyboards/planck/keymaps/sean/keymap.c @@ -1,10 +1,7 @@ // This is Sean Hunter's keymap file, customized from the canonical layout file for the Quantum project. // If you want to add another keyboard, that is the style you want to emulate. -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "mymappings.h" extern keymap_config_t keymap_config; @@ -50,12 +47,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Sft | Ctl | Alt | Gui |Lower | Space |Raise | < | v | ^ | > | * `-----------------------------------------------------------------------------------' */ -[_DVRK] = { - {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_SLSH, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L}, - {KC_A, KC_O, KC_E, KC_U, KC_I, KC_ESC, KC_BSPC, KC_D, KC_H, KC_T, KC_N, KC_S}, - {KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB, KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z}, - {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, +[_DVRK] = LAYOUT_planck_grid( + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_SLSH, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L, + KC_A, KC_O, KC_E, KC_U, KC_I, KC_ESC, KC_BSPC, KC_D, KC_H, KC_T, KC_N, KC_S, + KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB, KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z, + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), /* Lower @@ -69,12 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Sft | Ctl | Alt | Gui |Lower | |Raise | Home | PgDn | PgUp | End | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10}, - {KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0}, - {KC_TILD, KC_PIPE, KC_GRV, KC_MINS, KC_UNDS, KC_INS, KC_DEL, KC_LPRN, KC_RPRN, KC_PLUS, KC_EQL, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_LOWER] = LAYOUT_planck_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TILD, KC_PIPE, KC_GRV, KC_MINS, KC_UNDS, KC_INS, KC_DEL, KC_LPRN, KC_RPRN, KC_PLUS, KC_EQL, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Raise @@ -88,12 +85,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Sft | Ctl | Alt | Gui |Lower | |Raise | Gui | Alt | Ctl | Sft | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - { KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20}, - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_SLEP, KC_WAKE, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, - { GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, _______, _______, GUI_6, GUI_7, GUI_8, GUI_9, GUI_10}, - {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT} -}, +[_RAISE] = LAYOUT_planck_grid( + KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_SLEP, KC_WAKE, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, _______, _______, GUI_6, GUI_7, GUI_8, GUI_9, GUI_10, + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT +), /* 'Software Dvorak': Designed to look like dvorak in the mapping but depend on software * dvorak (ie the OS keymapping changed to dvorak). @@ -107,12 +104,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Sft | Ctl | Alt | Gui |SLower| Space |SRaise| < | v | ^ | > | * `-----------------------------------------------------------------------------------' */ -[_SDRK] = { - {DV_QUOT, DV_COMM, DV_DOT, DV_P, DV_Y, DV_SLSH, DV_EQL, DV_F, DV_G, DV_C, DV_R, DV_L}, - {DV_A, DV_O, DV_E, DV_U, DV_I, KC_ESC, KC_BSPC, DV_D, DV_H, DV_T, DV_N, DV_S}, - {DV_SCLN, DV_Q, DV_J, DV_K, DV_X, KC_TAB, KC_ENT, DV_B, DV_M, DV_W, DV_V, DV_Z}, - {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, SLWER, KC_SPC, KC_SPC, SRAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -}, +[_SDRK] = LAYOUT_planck_grid( + DV_QUOT, DV_COMM, DV_DOT, DV_P, DV_Y, DV_SLSH, DV_EQL, DV_F, DV_G, DV_C, DV_R, DV_L, + DV_A, DV_O, DV_E, DV_U, DV_I, KC_ESC, KC_BSPC, DV_D, DV_H, DV_T, DV_N, DV_S, + DV_SCLN, DV_Q, DV_J, DV_K, DV_X, KC_TAB, KC_ENT, DV_B, DV_M, DV_W, DV_V, DV_Z, + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, SLWER, KC_SPC, KC_SPC, SRAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), /* 'Software dvorak lower mode': Puts all the braces etc in the right places so it works @@ -128,12 +125,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Sft | Ctl | Alt | Gui |SLower| |SRaise| Home | PgDn | PgUp | End | * `-----------------------------------------------------------------------------------' */ -[_SLWER] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, DV_LCBR, DV_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10}, - {DV_1, DV_2, DV_3, DV_4, DV_5, DV_LBRC, DV_RBRC, DV_6, DV_7, DV_8, DV_9, DV_0}, - {DV_TILD, DV_PIPE, DV_GRV, DV_MINS, DV_UNDS, KC_INS, KC_DEL, DV_LPRN, DV_RPRN, DV_PLUS, DV_EQL, DV_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_SLWER] = LAYOUT_planck_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, DV_LCBR, DV_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + DV_1, DV_2, DV_3, DV_4, DV_5, DV_LBRC, DV_RBRC, DV_6, DV_7, DV_8, DV_9, DV_0, + DV_TILD, DV_PIPE, DV_GRV, DV_MINS, DV_UNDS, KC_INS, KC_DEL, DV_LPRN, DV_RPRN, DV_PLUS, DV_EQL, DV_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* 'Software dvorak raise mode' @@ -147,12 +144,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Sft | Ctl | Alt | Gui |Lower | |Raise | Gui | Alt | Ctl | Sft | * `-----------------------------------------------------------------------------------' */ -[_SRAIS] = { - { KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20}, - {DV_EXLM, DV_AT, DV_HASH, DV_DLR, DV_PERC, KC_SLEP, KC_WAKE, DV_CIRC, DV_AMPR, DV_ASTR, DV_LPRN, DV_RPRN}, - { GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, _______, _______, GUI_6, GUI_7, GUI_8, GUI_9, GUI_10}, - {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, SLWER, KC_SPC, KC_SPC, SRAIS, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT} -}, +[_SRAIS] = LAYOUT_planck_grid( + KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, + DV_EXLM, DV_AT, DV_HASH, DV_DLR, DV_PERC, KC_SLEP, KC_WAKE, DV_CIRC, DV_AMPR, DV_ASTR, DV_LPRN, DV_RPRN, + GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, _______, _______, GUI_6, GUI_7, GUI_8, GUI_9, GUI_10, + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, SLWER, KC_SPC, KC_SPC, SRAIS, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT +), /* Adjust (Lower + Raise or SLower + SRaise) @@ -166,12 +163,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Brite |BToggl| | | | | | Gui | Alt | Ctl | Sft | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, HRVL, HRESET, HMENU}, - { KC_PWR, KC_EJCT, CUT, COPY, PASTE, KC_PSCR, KC_SYSREQ, KC_CAPS, KC_MRWD, KC_MFFD, KC_MUTE, KC_MSTP}, - { DVRK, TO(_NMPD), TO(_MVMT), SDRK, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}, - {BACKLIT, BACKTOG, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT} -}, +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, HRVL, HRESET, HMENU, + KC_PWR, KC_EJCT, CUT, COPY, PASTE, KC_PSCR, KC_SYSREQ, KC_CAPS, KC_MRWD, KC_MFFD, KC_MUTE, KC_MSTP, + DVRK, TO(_NMPD), TO(_MVMT), SDRK, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + BACKLIT, BACKTOG, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT +), /* Numpad @@ -185,12 +182,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | 0 | . | + | * `-----------------------------------------------------------------------------------' */ -[_NMPD] = { - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST}, - {TO(_DVRK),TO(_NMPD),TO(_MVMT),SDRK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PMNS}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS} -}, +[_NMPD] = LAYOUT_planck_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST, + TO(_DVRK),TO(_NMPD),TO(_MVMT),SDRK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PMNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS +), /* Movement @@ -204,12 +201,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Sft | Ctl | Alt | Gui | | | | Gui | Alt | Ctl | Sft | * `-----------------------------------------------------------------------------------' */ -[_MVMT] = { - {KC_MB2, KC_MWDN, KC_MWUP, KC_MB1, KC_MB3, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END}, - {KC_MLFT, KC_MDN, KC_MUP, KC_MRGT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}, - {TO(_DVRK),TO(_NMPD),TO(_MVMT),SDRK,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT} -}, +[_MVMT] = LAYOUT_planck_grid( + KC_MB2, KC_MWDN, KC_MWUP, KC_MB1, KC_MB3, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + KC_MLFT, KC_MDN, KC_MUP, KC_MRGT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + TO(_DVRK),TO(_NMPD),TO(_MVMT),SDRK,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT +), }; diff --git a/keyboards/planck/keymaps/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c index f5efeef4597f..1b705248257f 100644 --- a/keyboards/planck/keymaps/sgoodwin/keymap.c +++ b/keyboards/planck/keymaps/sgoodwin/keymap.c @@ -2,13 +2,7 @@ // It doesn't have Plover or Dvorak layers because he doesn't use that. // It Also doesn't allow for swapping alt with CMD because that only happens in error. -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -43,12 +37,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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, MT(MOD_RSFT, KC_ENT) }, - {ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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, MT(MOD_RSFT, KC_ENT) , + ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Qwerty * ,-----------------------------------------------------------------------------------. @@ -61,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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, MT(MOD_RSFT, KC_ENT) }, - {ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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, MT(MOD_RSFT, KC_ENT) , + ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -79,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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),_______, _______, _______}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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),_______, _______, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -97,12 +91,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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, _______, _______, _______}, - {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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, _______, _______, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -115,12 +109,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, _______, _______, QWERTY, COLEMAK, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, _______, _______, QWERTY, COLEMAK, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 1426b62a6879..55115b0c84a2 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -1,10 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -47,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {CTL_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, SFT_ENT}, - {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_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, SFT_ENT, + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -65,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {CTL_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, SFT_ENT}, - {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + CTL_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, SFT_ENT, + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -83,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT}, - {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -101,12 +95,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_grid( + ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -119,12 +113,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {ALL_T(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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_RAISE] = LAYOUT_planck_grid( + ALL_T(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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -137,12 +131,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/steno/keymap.c b/keyboards/planck/keymaps/steno/keymap.c index 849fefa5c4ce..c2db4746cc3e 100644 --- a/keyboards/planck/keymaps/steno/keymap.c +++ b/keyboards/planck/keymaps/steno/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #include "keymap_steno.h" extern keymap_config_t keymap_config; @@ -58,12 +56,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -76,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -94,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -112,12 +110,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -130,12 +128,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_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_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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -149,12 +147,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, - {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, - {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, - {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2} -}, +[_PLOVER] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -167,12 +165,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, ST_BOLT, ST_GEM}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, ST_BOLT, ST_GEM, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/tak3over/keymap.c b/keyboards/planck/keymaps/tak3over/keymap.c index 8b26520bf9bf..1b9f91b0bd67 100644 --- a/keyboards/planck/keymaps/tak3over/keymap.c +++ b/keyboards/planck/keymaps/tak3over/keymap.c @@ -1,11 +1,7 @@ // //Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now. -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#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. @@ -30,12 +26,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QW] = { - {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(_FN), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QW] = LAYOUT_planck_grid( + 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(_FN), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | @@ -47,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right * `-----------------------------------------------------------------------------------' */ -[_CM] = { - {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 }, - {KC_LCTL, KC_LALT, KC_LGUI, MO(_FN), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_CM] = LAYOUT_planck_grid( + 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 , + KC_LCTL, KC_LALT, KC_LGUI, MO(_FN), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Raise * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp @@ -64,12 +60,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_RS] = { - {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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE}, - {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, +[_RS] = LAYOUT_planck_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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), /* Lower * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | @@ -81,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_LW] = { - {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_TRNS, RESET, KC_INS, KC_HOME, KC_PGUP, DF(_CM), KC_LEFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, M(0), KC_DEL, KC_END, KC_PGDN, DF(_QW), KC_DEL, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, +[_LW] = LAYOUT_planck_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_TRNS, RESET, KC_INS, KC_HOME, KC_PGUP, DF(_CM), KC_LEFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, M(0), KC_DEL, KC_END, KC_PGDN, DF(_QW), KC_DEL, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), /* Function * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | @@ -98,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_FN] = { - {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_RGUI, KC_X, KC_C, KC_V, KC_Z, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_BSLS}, - {KC_TRNS, KC_RCTL, KC_X, KC_C, KC_V, KC_Z, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -} +[_FN] = LAYOUT_planck_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_RGUI, KC_X, KC_C, KC_V, KC_Z, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_BSLS, + KC_TRNS, KC_RCTL, KC_X, KC_C, KC_V, KC_Z, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/tehwalris/keymap.c b/keyboards/planck/keymaps/tehwalris/keymap.c index 0af864d9e0d1..f2a9fd909a2a 100644 --- a/keyboards/planck/keymaps/tehwalris/keymap.c +++ b/keyboards/planck/keymaps/tehwalris/keymap.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -37,47 +35,47 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, OSL(OVL_C)}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, 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 }, - {KC_LGUI, MO(OVL_N), KC_LCTL, KC_RCTL, KC_BSPC, MO(OVL_L), MO(OVL_R), KC_SPC, KC_LALT, MO(OVL_F), KC_RALT, KC_RGUI } -}, +[DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, OSL(OVL_C), + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, 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 , + KC_LGUI, MO(OVL_N), KC_LCTL, KC_RCTL, KC_BSPC, MO(OVL_L), MO(OVL_R), KC_SPC, KC_LALT, MO(OVL_F), KC_RALT, KC_RGUI +), -[OVL_L] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RGHT, _______}, - {_______, KC_UNDS, KC_MINS, KC_BSLS, KC_SLSH, KC_PLUS, KC_DLR, KC_LEFT, KC_EQL, KC_LCBR, KC_RCBR, _______}, - {_______, KC_SCLN, _______, _______, _______, _______, _______, _______, KC_GRV, KC_HASH, KC_PIPE, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[OVL_L] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RGHT, _______, + _______, KC_UNDS, KC_MINS, KC_BSLS, KC_SLSH, KC_PLUS, KC_DLR, KC_LEFT, KC_EQL, KC_LCBR, KC_RCBR, _______, + _______, KC_SCLN, _______, _______, _______, _______, _______, _______, KC_GRV, KC_HASH, KC_PIPE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), -[OVL_R] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_EXLM, KC_CIRC, KC_QUES, KC_PERC, KC_AMPR, KC_ASTR, _______}, - {_______, KC_TILD, KC_AT, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[OVL_R] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_EXLM, KC_CIRC, KC_QUES, KC_PERC, KC_AMPR, KC_ASTR, _______, + _______, KC_TILD, KC_AT, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), -[OVL_C] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, _______}, - {_______, UMLT_A, UMLT_O, _______, UMLT_U, _______, _______, KC_HOME, _______, _______, _______, _______}, - {_______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______} -}, +[OVL_C] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, _______, + _______, UMLT_A, UMLT_O, _______, UMLT_U, _______, _______, KC_HOME, _______, _______, _______, _______, + _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______ +), -[OVL_N] = { - {_______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______}, - {_______, KC_PLUS, KC_UNDS, KC_LPRN, KC_RPRN, _______, _______, KC_4, KC_5, KC_6, _______, _______}, - {_______, KC_ASTR, KC_SLSH, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQL, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______} -}, +[OVL_N] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, + _______, KC_PLUS, KC_UNDS, KC_LPRN, KC_RPRN, _______, _______, KC_4, KC_5, KC_6, _______, _______, + _______, KC_ASTR, KC_SLSH, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQL, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______ +), -[OVL_F] = { - {_______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_F4, KC_F5, KC_F6, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_F10, KC_F11, KC_F12, _______, _______} -} +[OVL_F] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_F4, KC_F5, KC_F6, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_F10, KC_F11, KC_F12, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c index 131bf4108a2a..178422cd8b9e 100644 --- a/keyboards/planck/keymaps/that_canadian/keymap.c +++ b/keyboards/planck/keymaps/that_canadian/keymap.c @@ -1,13 +1,7 @@ // This is the canonical layout file for the Quantum project. If you want to add another keyboard, // this is the style you want to emulate. -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -46,12 +40,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, - {OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, - {KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -64,12 +58,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_ESC, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE}, - {_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_grid( + KC_ESC, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -82,12 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, - {KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS}, - {_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_planck_grid( + 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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -100,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | RESET| * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET} -}, +[_ADJUST] = LAYOUT_planck_grid( + TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +), /* Function * ,-----------------------------------------------------------------------------------. @@ -118,12 +112,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNCTION] = { - {_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______}, - {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_FUNCTION] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/thermal_printer/keymap.c b/keyboards/planck/keymaps/thermal_printer/keymap.c index e43e13cd2781..9a1d0d04949f 100644 --- a/keyboards/planck/keymaps/thermal_printer/keymap.c +++ b/keyboards/planck/keymaps/thermal_printer/keymap.c @@ -1,11 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -45,12 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -63,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -81,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -99,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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} -}, +[_LOWER] = LAYOUT_planck_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_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 * ,-----------------------------------------------------------------------------------. @@ -117,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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} -}, +[_RAISE] = LAYOUT_planck_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_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 +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -136,12 +130,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -154,12 +148,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, PRINT_ON, PRINT_OFF, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, PRINT_ON, PRINT_OFF, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/tong92/keymap.c b/keyboards/planck/keymaps/tong92/keymap.c index bdde285690c1..de43024c403f 100644 --- a/keyboards/planck/keymaps/tong92/keymap.c +++ b/keyboards/planck/keymaps/tong92/keymap.c @@ -1,9 +1,6 @@ //Author: tong92 -#include "planck.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#include QMK_KEYBOARD_H enum planck_layers { _WINDOW, @@ -41,12 +38,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt | * `-----------------------------------------------------------------------' */ -[_WINDOW] ={ -{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_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}, -{WINDOW_SHORTCUT, KC_RCTL,KC_LGUI,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT} -}, +[_WINDOW] = LAYOUT_planck_grid( +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_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, +WINDOW_SHORTCUT, KC_RCTL,KC_LGUI,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT +), /* Mac - Qwerty * ,-----------------------------------------------------------------------. * |Tab | q | w | e | r | t | y | u | i | o | p | BS | @@ -58,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Fn |Lang |Ctrl | Alt |Lower| Space |Upper| ' | [ | ] |SPOT | * `-----------------------------------------------------------------------' */ -[_MAC] ={ -{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_LGUI,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}, -{MAC_SHORTCUT, LCTL(KC_SPC),KC_LCTL,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,LGUI(KC_SPC)} -}, +[_MAC] = LAYOUT_planck_grid( +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_LGUI,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, +MAC_SHORTCUT, LCTL(KC_SPC),KC_LCTL,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,LGUI(KC_SPC) +), /* LOWER * ,-----------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS | @@ -75,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | SPACE | | END | LEFT| DOWN|RIGHT| * `-----------------------------------------------------------------------' */ -[_LOWER] ={ -{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS }, -{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,KC_F12,_______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN }, -{XXXXXXX,_______,_______,_______,_______,KC_SPC,KC_SPC,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT} -}, +[_LOWER] = LAYOUT_planck_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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS , +_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,KC_F12,_______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN , +XXXXXXX,_______,_______,_______,_______,KC_SPC,KC_SPC,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT +), /* RAISE * ,-----------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS | @@ -92,12 +89,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | SPACE | | END | LEFT| DOWN|RIGHT| * `-----------------------------------------------------------------------' */ -[_RAISE] ={ -{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE }, -{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN }, -{XXXXXXX,_______,_______,_______,_______,KC_SPC, KC_SPC, _______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT} -}, +[_RAISE] = LAYOUT_planck_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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE , +_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN , +XXXXXXX,_______,_______,_______,_______,KC_SPC, KC_SPC, _______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT +), /* Window Shortcut * ,-----------------------------------------------------------------------. * | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL | @@ -109,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED | * `-----------------------------------------------------------------------' */ -[_WINDOW_SHORTCUT] ={ -{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL}, -{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX}, -{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX}, -{KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DEL)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT} -}, +[_WINDOW_SHORTCUT] = LAYOUT_planck_grid( +KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL, +_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX, +_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX, +KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DEL)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT +), /* Mac Shortcut * ,-----------------------------------------------------------------------. * | ESC |CmdUp|CmdDo| | | | | PgUp| UP | PgDo|PrtSc| DEL | @@ -126,12 +123,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | MOUSE | | | | | LED | * `-----------------------------------------------------------------------' */ -[_MAC_SHORTCUT] ={ -{KC_ESC ,LGUI(KC_UP) ,LGUI(KC_DOWN) ,XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL}, -{_______,LALT(LSFT(KC_LEFT)),LALT(LSFT(KC_RIGHT)),XXXXXXX,LGUI(LCTL(KC_F)),XXXXXXX,KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX}, -{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX}, -{KC_TRNS,_______ ,_______ ,MOUSE ,MOUSE ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT} -}, +[_MAC_SHORTCUT] = LAYOUT_planck_grid( +KC_ESC ,LGUI(KC_UP) ,LGUI(KC_DOWN) ,XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL, +_______,LALT(LSFT(KC_LEFT)),LALT(LSFT(KC_RIGHT)),XXXXXXX,LGUI(LCTL(KC_F)),XXXXXXX,KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX, +_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX, +KC_TRNS,_______ ,_______ ,MOUSE ,MOUSE ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT +), /* 10: mouse layer * ,-----------------------------------------------------------------------. * | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET| @@ -143,12 +140,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | GO_DEFT | | | | | MAC | * `-----------------------------------------------------------------------' */ -[_MOUSE] ={ -{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET}, -{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX}, -{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,WINDOW}, -{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,EXT_MOUSE,EXT_MOUSE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,MAC} -} +[_MOUSE] = LAYOUT_planck_grid( +XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET, +XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX, +XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,WINDOW, +XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,EXT_MOUSE,EXT_MOUSE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,MAC +) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index bc9e5326a3eb..215acaa3ab00 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c @@ -21,13 +21,7 @@ */ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -67,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {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 }, - {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_planck_grid( + 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 , + M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -85,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_TAB, UC_q, UC_w, UC_f, UC_p, UC_g, UC_j, UC_l, UC_u, UC_y, UC_SCLN, UC_BSPC}, - {KC_ESC, UC_a, UC_r, UC_s, UC_t, UC_d, UC_h, UC_n, UC_e, UC_i, UC_o, UC_QUOT}, - {KC_LSFT, UC_z, UC_x, UC_c, UC_v, UC_b, UC_k, UC_m, UC_COMM, UC_DOT, UC_SLSH, KC_ENT}, - {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, UC_q, UC_w, UC_f, UC_p, UC_g, UC_j, UC_l, UC_u, UC_y, UC_SCLN, UC_BSPC, + KC_ESC, UC_a, UC_r, UC_s, UC_t, UC_d, UC_h, UC_n, UC_e, UC_i, UC_o, UC_QUOT, + KC_LSFT, UC_z, UC_x, UC_c, UC_v, UC_b, UC_k, UC_m, UC_COMM, UC_DOT, UC_SLSH, KC_ENT, + KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -103,12 +97,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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 }, - {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_planck_grid( + 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 , + M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -121,12 +115,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_planck_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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -139,12 +133,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_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} -}, +[_RAISE] = LAYOUT_planck_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_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 +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -158,12 +152,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {TOG_OUT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + TOG_OUT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -176,12 +170,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index f6ece4d1e787..60bbc758d78e 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -1,10 +1,6 @@ // -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#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. @@ -28,12 +24,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | GUI | Num | Space | FN | GUI | Alt | Ctrl | Enter| * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_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_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} -}, +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_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_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT +), /* _NUM * ,-----------------------------------------------------------------------------------. @@ -46,12 +42,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ____ | ___ | ___ | ___ | XXXX | ______ | ____ | ____ | ____ | __ | ____ | * `-----------------------------------------------------------------------------------' */ -[_NUM] = { - {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, - {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, - {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______} -}, +[_NUM] = LAYOUT_planck_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______ +), /* _FUNC * ,-----------------------------------------------------------------------------------. @@ -64,19 +60,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ____ | ____ | ____ | ____ | ____ | _____ | XXXX | ____ | ____ | ____ | ____ | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = { - {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______}, - {_______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______}, - {_______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______} -}, +[_FUNC] = LAYOUT_planck_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______, + _______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______ +), -[_NAV] = { - {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX}, - {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX}, - {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_NAV] = LAYOUT_planck_grid( + KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX, + KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), }; diff --git a/keyboards/planck/keymaps/yang/keymap.c b/keyboards/planck/keymaps/yang/keymap.c index 477eb5031220..e9c69c9989eb 100644 --- a/keyboards/planck/keymaps/yang/keymap.c +++ b/keyboards/planck/keymaps/yang/keymap.c @@ -1,9 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#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. @@ -16,48 +12,46 @@ #define _RS 4 #define _RGB 5 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QW] = { /* Qwerty */ - {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 }, - {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), F(0), F(0), MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_CM] = { /* Colemak */ - {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 }, - {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), F(0), F(0), MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_DV] = { /* Dvorak */ - {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 }, - {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), F(0), F(0), MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[_RS] = { /* RAISE */ - {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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[_LW] = { /* LOWER */ - {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[_RGB] = { /* RGBLIGHT */ - {KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL}, - {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_TRNS}, - {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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +#define RGB_SPC LT(_RGB, KC_SPC) -} -}; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = LAYOUT_planck_grid( /* Qwerty */ + 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 , + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), RGB_SPC, RGB_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_CM] = LAYOUT_planck_grid( /* Colemak */ + 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 , + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), RGB_SPC, RGB_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_DV] = LAYOUT_planck_grid( /* Dvorak */ + 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 , + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), RGB_SPC, RGB_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[_RS] = LAYOUT_planck_grid( /* RAISE */ + 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[_LW] = LAYOUT_planck_grid( /* LOWER */ + 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[_RGB] = LAYOUT_planck_grid( /* RGBLIGHT */ + KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_TRNS, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_RGB, KC_SPC), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/zach/keymap.c b/keyboards/planck/keymaps/zach/keymap.c index ef1ac0fef7de..ba0338e39af4 100644 --- a/keyboards/planck/keymaps/zach/keymap.c +++ b/keyboards/planck/keymaps/zach/keymap.c @@ -1,49 +1,48 @@ // Zach Nielsen Custom Planck Keyboard layout -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#include QMK_KEYBOARD_H #define PLANCK_YES // This is the Planck #include "zach_common_functions.c" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_COLEMAK] = { /* Base Layer */ - {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC}, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT}, - {SHFT_CAP,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_planck_grid( /* Base Layer */ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + SHFT_CAP,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), -[_SWCOLE] = { /* Software Colemak */ - {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______}, - {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______}, - {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_SWCOLE] = LAYOUT_planck_grid( /* Software Colemak */ + _______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______, + _______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______, + _______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), -[_RAISE] = { /* RAISE - Numpad and Unicode symbols */ - {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______}, - {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, PENGY, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR}, - {_______, KC_COLN, TFLIP, LAROW, RAROW, DUCK, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS}, - {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL} -}, +[_RAISE] = LAYOUT_planck_grid( /* RAISE - Numpad and Unicode symbols */ + KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______, + KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, PENGY, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR, + _______, KC_COLN, TFLIP, LAROW, RAROW, DUCK, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS, + _______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL +), -[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */ - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, - {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP}, - {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN}, - {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______} -}, +[_LOWER] = LAYOUT_planck_grid( /* LOWER - Symbols, Paging, CtrAltDel */ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL, + KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP, + CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN, + _______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______ +), -[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */ - {UNIWIN, XXXXXXX, XXXXXXX, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, - {UNILIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, - {_______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, - {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_ADJUST] = LAYOUT_planck_grid( /* ADJUST - Macros, Layer Switching, Function Keys */ + UNIWIN, XXXXXXX, XXXXXXX, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, + UNILIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, + _______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, + _______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), -[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ - {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______}, - {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, - {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, - {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} -} +[_UNICODES] = LAYOUT_planck_grid( /* UNICODES - Extra layer for unicode stuff */ + _______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______, + KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______, + XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX, + _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index a792560bd4ee..550117d00068 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c @@ -1,8 +1,4 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" -#include "led.h" +#include QMK_KEYBOARD_H #include "mousekey.h" #ifdef AUDIO_ENABLE @@ -130,12 +126,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | LCTRL | LWIN | FN | LALT | LOWER | SPACE | SPACE | UPPER | MENU | LEFT | DOWN | RIGHT | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_QWERTY] = { - { 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_SCLN, KC_QUOT }, - { KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_UP , KC_SFTENT /*M_SHENT*/ }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_LOWER, KC_SPC , KC_SPC , M_UPPER, KC_APP , KC_LEFT, KC_DOWN, KC_RGHT } -}, +[LAYER_QWERTY] = LAYOUT_planck_grid( + 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_SCLN, KC_QUOT , + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_UP , KC_SFTENT /*M_SHENT*/ , + KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_LOWER, KC_SPC , KC_SPC , M_UPPER, KC_APP , KC_LEFT, KC_DOWN, KC_RGHT +), /* LAYER = LAYER_UPPER .-----------------------------------------------------------------------------------------------------------. | PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL | @@ -147,12 +143,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ______ | ______ | ______ | ______ | LOWER | KP 0 | KP 0 | ______ | RALT | KP 0 | KP ENT | RTCTRL | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_UPPER] = { - { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL }, - { KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_HOME }, - { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_END }, - { _______, _______, _______, _______, M_LOWER, KC_KP_0, KC_KP_0, _______, KC_KP_0, KC_PDOT, KC_PENT, KC_RCTL } -}, +[LAYER_UPPER] = LAYOUT_planck_grid( + KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL , + KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_HOME , + _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_END , + _______, _______, _______, _______, M_LOWER, KC_KP_0, KC_KP_0, _______, KC_KP_0, KC_PDOT, KC_PENT, KC_RCTL +), /* LAYER = LAYER_LOWER .-----------------------------------------------------------------------------------------------------------. | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP | @@ -164,12 +160,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ______ | ______ | ______ | ______ | ______ | ______ | ______ | UPPER | ______ | ______ | ______ | END | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_LOWER] = { - { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP }, - { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN }, - { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME }, - { _______, _______, _______, _______, _______, _______, _______, M_UPPER, _______, _______, _______, KC_END } -}, +[LAYER_LOWER] = LAYOUT_planck_grid( + _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP , + _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN , + _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME , + _______, _______, _______, _______, _______, _______, _______, M_UPPER, _______, _______, _______, KC_END +), /* LAYER = LAYER_FUNCTION .-----------------------------------------------------------------------------------------------------------. | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | @@ -181,12 +177,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_FUNCTION] = { - { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE }, - { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } -}, +[LAYER_FUNCTION] = LAYOUT_planck_grid( + XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , + XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , + _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE , + _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT +), /* LAYER = LAYER_MOUSE .-----------------------------------------------------------------------------------------------------------. | ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR | @@ -198,12 +194,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_MOUSE] = { - { KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R }, - { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U }, - { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } -}, +[LAYER_MOUSE] = LAYOUT_planck_grid( + KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R , + XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U , + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D , + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R +), /* LAYER = LAYER_ADJUST .-----------------------------------------------------------------------------------------------------------. | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | MUSIC | AUDIO | @@ -215,12 +211,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | XXXXXX | XXXXXX | XXXXXX | XXXXXX | LOWER | XXXXXX | XXXXXX | UPPER | XXXXXX | TEMPO- | VOICE- | TEMPO+ | '-----------------------------------------------------------------------------------------------------------' */ -[LAYER_ADJUST] = { - { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG }, - { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , MY_MACRO}, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } -}, +[LAYER_ADJUST] = LAYOUT_planck_grid( + XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG , + XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , + XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , MY_MACRO, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP +), }; diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c index 9d10fbd754da..7c09bd997cb1 100644 --- a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -20,14 +20,76 @@ */ #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); +#endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); #endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1ceb0..57636d1f12f5 100644 --- a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h @@ -22,6 +22,10 @@ #ifndef BOARD_H #define BOARD_H +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /* * Setup for ST STM32F072B-Discovery board. */ @@ -166,11 +170,9 @@ #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) @@ -178,11 +180,24 @@ #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) +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ -#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ /* * I/O ports initial setup, this configuration is established soon after reset @@ -908,6 +923,9 @@ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ PIN_AFIO_AF(GPIOF_PIN15, 0U)) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ #if !defined(_FROM_ASM_) #ifdef __cplusplus diff --git a/keyboards/projectkb/alice/chconf.h b/keyboards/projectkb/alice/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/projectkb/alice/chconf.h +++ b/keyboards/projectkb/alice/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/projectkb/alice/halconf.h b/keyboards/projectkb/alice/halconf.h index da08cdbae2c9..adb1a907154b 100644 --- a/keyboards/projectkb/alice/halconf.h +++ b/keyboards/projectkb/alice/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,7 +25,11 @@ * @{ */ -#pragma once +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -33,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -178,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -186,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -197,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -208,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -216,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -242,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -254,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -263,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -273,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -286,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -308,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -324,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -345,7 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE #endif +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + /** @} */ diff --git a/keyboards/retro_75/chconf.h b/keyboards/retro_75/chconf.h index 99fa8ce39822..8d66b51d2350 100644 --- a/keyboards/retro_75/chconf.h +++ b/keyboards/retro_75/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,11 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #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 +#endif /** @} */ @@ -126,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -144,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -152,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -161,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -169,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -180,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -188,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -198,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -208,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -218,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -226,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -236,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -245,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -256,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -266,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -275,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -287,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -296,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -307,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -323,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -332,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -341,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -351,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -359,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -378,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -388,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -399,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -410,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -419,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/retro_75/halconf.h b/keyboards/retro_75/halconf.h index 8b9724b1a30e..16f32117d51b 100644 --- a/keyboards/retro_75/halconf.h +++ b/keyboards/retro_75/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c index f7a66b96f58c..cfeda0a245d5 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c @@ -28,14 +28,13 @@ along with this program. If not, see . //GamingMode Lock (disables SpaceFn and OneShot LShift) //Function //Mute microphone -#define KC_SPACEFN KC_FN0 +#define KC_SPACEFN LT(2, KC_SPACE) #define KC_OSLS KC_FN3 #define KC_GMLK KC_FN1 #define KC_FUNC MO(2) #define MICMUTE RCTL(KC_LCTL) enum function_codes { - F_SPACEFN = 0, F_OSLS = 3, F_GMLK = 1, }; @@ -151,7 +150,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Fn action definition */ const uint16_t PROGMEM fn_actions[] = { - [F_SPACEFN] = ACTION_LAYER_TAP_KEY(2, KC_SPACE), // SpaceFn layout 1 [F_GMLK] = ACTION_LAYER_TOGGLE(1), // Disable SpaceFn and Oneshot Shift [F_OSLS] = ACTION_MODS_ONESHOT(MOD_LSFT) // Oneshot Leftshift }; diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c index 077f1c6277b0..c72c37d9d305 100644 --- a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c @@ -4,6 +4,9 @@ #define KC_MO6 MO(6) #define KC_MO7 MO(7) +#define KC_LT5 LT(5, KC_SLSH) +#define KC_LT6 LT(6, KC_SCLN) + /* * Hasu */ @@ -24,8 +27,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ - CAPS, A, S, D, F, G, H, J, K, L, FN2, QUOT, NO, ENT, \ - LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, FN1, NO, FN9, NO, \ + CAPS, A, S, D, F, G, H, J, K, L, LT6, QUOT, NO, ENT, \ + LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, FN9, NO, \ LCTL, LGUI, LALT, SPC, RALT, MO6, MO6, MO4), /* Keymap 1: colemak ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -173,8 +176,6 @@ Lw: set Workman layout * Fn action definition */ const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_KEY(5, KC_SLASH), - [2] = ACTION_LAYER_TAP_KEY(6, KC_SCLN), [5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout [6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout [7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout diff --git a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c index 4b7208a9e20b..014554019819 100644 --- a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c @@ -17,6 +17,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H #define KC_MO1 MO(1) +#define KC_SPFN LT(1, KC_SPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layout 0: Default Layer @@ -37,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NUHS, ENT, \ LSFT, NUBS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - MO1, LGUI, LALT, FN0, RALT, RGUI, APP, RCTL), + MO1, LGUI, LALT, SPFN, RALT, RGUI, APP, RCTL), /* Layout 1: Function Layer * ,-----------------------------------------------------------. @@ -64,17 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Fn action definition */ const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), /* SpaceFn layout 1 */ [2] = ACTION_MODS_KEY(MOD_LSFT, KC_DEL), /* Cut */ [3] = ACTION_MODS_KEY(MOD_LCTL, KC_INS), /* Copy */ [4] = ACTION_MODS_KEY(MOD_LSFT, KC_INS), /* Paste */ }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -}; - void matrix_init_user(void) { diff --git a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c index b0d08202dac9..ee7ec6cd6875 100644 --- a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c @@ -1,5 +1,7 @@ #include QMK_KEYBOARD_H +#define KC_LT1 LT(1, KC_SPC) + /* * SpaceFN * http://geekhack.org/index.php?topic=51069.0 @@ -23,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \ LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, FN0, RALT, RGUI, APP, RCTL), + LCTL, LGUI, LALT, LT1, RALT, RGUI, APP, RCTL), /* Overlay 1: SpaceFN ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -50,6 +52,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Fn action definition */ const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde }; diff --git a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c index 371c2b8ef6ec..d5b4937aa591 100644 --- a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_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_END, \ - F(4), 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, \ + LT(_FL, KC_BSPC), 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(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CM] = 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_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_BSLS, KC_END, \ - F(4), 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_PGUP, \ + LT(_FL, KC_BSPC), 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_PGUP, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, 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(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DV] = 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_LBRC, KC_RBRC, KC_BSPC, 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_BSLS, KC_END, \ - F(4), 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_PGUP, \ + LT(_FL, KC_BSPC), 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_PGUP, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_PGDN, \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), @@ -143,7 +143,6 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TOGGLE(_CM), //Toggle Colemak Layer overlay [2] = ACTION_LAYER_TOGGLE(_DV), // Toggle Dvorak Layer overlay [3] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [4] = ACTION_LAYER_TAP_KEY(_FL, KC_BSPC), // Tap to Backspace and hold to activate function layer [5] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay }; diff --git a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c index 37bd742b5926..093070cb4b8c 100644 --- a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_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_END, \ - F(2), 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, \ + LT(_FL, 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN, \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), @@ -95,7 +95,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay }; diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c index 10e9b9dcdf4b..6e22e9e23af0 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c @@ -20,9 +20,9 @@ enum planck_keycodes { DYNAMIC_MACRO_RANGE, }; -#define FKEYS F(_FKEYS) +#define FKEYS LT(_FKEYS, KC_TAB) #define NUMSYM TT(_NUMSYM) -#define FKEYGRV F(_FKEYGRV) +#define FKEYGRV LT(_FKEYS, KC_GRV) #define MACSLEEP M(5) #define PLOVER M(6) #define LAYERRESET M(7) @@ -82,11 +82,6 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [_FKEYS] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_TAB), - [_FKEYGRV] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_GRV), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c index 6f7167cbbe86..b4d52345610d 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c @@ -25,8 +25,8 @@ enum tv44_keycodes { EXT_MOUSE }; -#define LOWER F(_LOWER) -#define RAISE F(_RAISE) +#define LOWER LT(_LOWER, KC_SPC) +#define RAISE LT(_RAISE, KC_SPC) #define WINDOW_SHORTCUT MO(_WINDOW_SHORTCUT) #define MAC_SHORTCUT MO(_MAC_SHORTCUT) @@ -153,11 +153,6 @@ XXXXXXX,XXXXXXX,XXXXXXX, EXT_MOUSE,EXT_MOUSE, XXXXXXX,XXXX ) }; -const uint16_t PROGMEM fn_actions[] = { - [_LOWER] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), - [_RAISE] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC) -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case WINDOW: diff --git a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c b/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c index 19adfb933e52..754dc5c4dd05 100644 --- a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c +++ b/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c @@ -1,9 +1,12 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -11,15 +14,82 @@ limitations under the License. */ +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + #include "hal.h" +#include "stm32_gpio.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/** + * @brief Type of STM32 GPIO port setup. + */ +typedef struct { + uint32_t moder; + uint32_t otyper; + uint32_t ospeedr; + uint32_t pupdr; + uint32_t odr; + uint32_t afrl; + uint32_t afrh; +} gpio_setup_t; + +/** + * @brief Type of STM32 GPIO initialization data. + */ +typedef struct { +#if STM32_HAS_GPIOA || defined(__DOXYGEN__) + gpio_setup_t PAData; +#endif +#if STM32_HAS_GPIOB || defined(__DOXYGEN__) + gpio_setup_t PBData; +#endif +#if STM32_HAS_GPIOC || defined(__DOXYGEN__) + gpio_setup_t PCData; +#endif +#if STM32_HAS_GPIOD || defined(__DOXYGEN__) + gpio_setup_t PDData; +#endif +#if STM32_HAS_GPIOE || defined(__DOXYGEN__) + gpio_setup_t PEData; +#endif +#if STM32_HAS_GPIOF || defined(__DOXYGEN__) + gpio_setup_t PFData; +#endif +#if STM32_HAS_GPIOG || defined(__DOXYGEN__) + gpio_setup_t PGData; +#endif +#if STM32_HAS_GPIOH || defined(__DOXYGEN__) + gpio_setup_t PHData; +#endif +#if STM32_HAS_GPIOI || defined(__DOXYGEN__) + gpio_setup_t PIData; +#endif +#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) + gpio_setup_t PJData; +#endif +#if STM32_HAS_GPIOK || defined(__DOXYGEN__) + gpio_setup_t PKData; +#endif +} gpio_config_t; -#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. + * @brief STM32 GPIO static initialization data. */ -const PALConfig pal_default_config = { +static const gpio_config_t gpio_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}, @@ -54,23 +124,119 @@ const PALConfig pal_default_config = { #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} + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, +#endif +#if STM32_HAS_GPIOJ + {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, + VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, +#endif +#if STM32_HAS_GPIOK + {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, + VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} #endif }; + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { + + gpiop->OTYPER = config->otyper; + gpiop->OSPEEDR = config->ospeedr; + gpiop->PUPDR = config->pupdr; + gpiop->ODR = config->odr; + gpiop->AFRL = config->afrl; + gpiop->AFRH = config->afrh; + gpiop->MODER = config->moder; +} + +static void stm32_gpio_init(void) { + + /* Enabling GPIO-related clocks, the mask comes from the + registry header file.*/ + rccResetAHB(STM32_GPIO_EN_MASK); + rccEnableAHB(STM32_GPIO_EN_MASK, true); + + /* Initializing all the defined GPIO ports.*/ +#if STM32_HAS_GPIOA + gpio_init(GPIOA, &gpio_default_config.PAData); #endif +#if STM32_HAS_GPIOB + gpio_init(GPIOB, &gpio_default_config.PBData); +#endif +#if STM32_HAS_GPIOC + gpio_init(GPIOC, &gpio_default_config.PCData); +#endif +#if STM32_HAS_GPIOD + gpio_init(GPIOD, &gpio_default_config.PDData); +#endif +#if STM32_HAS_GPIOE + gpio_init(GPIOE, &gpio_default_config.PEData); +#endif +#if STM32_HAS_GPIOF + gpio_init(GPIOF, &gpio_default_config.PFData); +#endif +#if STM32_HAS_GPIOG + gpio_init(GPIOG, &gpio_default_config.PGData); +#endif +#if STM32_HAS_GPIOH + gpio_init(GPIOH, &gpio_default_config.PHData); +#endif +#if STM32_HAS_GPIOI + gpio_init(GPIOI, &gpio_default_config.PIData); +#endif +#if STM32_HAS_GPIOJ + gpio_init(GPIOJ, &gpio_default_config.PJData); +#endif +#if STM32_HAS_GPIOK + gpio_init(GPIOK, &gpio_default_config.PKData); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ -void enter_bootloader_mode_if_requested(void); +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ /** * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. + * @details GPIO ports and system clocks are initialized before everything + * else. */ void __early_init(void) { + extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); + + stm32_gpio_init(); stm32_clock_init(); } +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) /** * @brief MMC_SPI card detection. @@ -98,4 +264,5 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) { * @todo Add your board-specific code, if any. */ void boardInit(void) { + } diff --git a/keyboards/vinta/chconf.h b/keyboards/vinta/chconf.h index e811705ba3d1..6d169b36e9d3 100644 --- a/keyboards/vinta/chconf.h +++ b/keyboards/vinta/chconf.h @@ -1,9 +1,12 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -12,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -26,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -38,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -55,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -78,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -91,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -100,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -119,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -137,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -145,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -154,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -162,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -173,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -181,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -191,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -201,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -211,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -219,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -229,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -238,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -249,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -259,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -268,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -280,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -289,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -300,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -316,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -325,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -334,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -344,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -352,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -371,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -381,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -392,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -403,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -412,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/vinta/halconf.h b/keyboards/vinta/halconf.h index bc2b66f2e1e1..25f3fe5edf08 100644 --- a/keyboards/vinta/halconf.h +++ b/keyboards/vinta/halconf.h @@ -1,9 +1,12 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -22,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -31,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 TRUE +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -176,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT FALSE +#define ADC_USE_WAIT FALSE #endif /** @@ -184,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION FALSE +#define ADC_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -195,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -206,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -214,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -240,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -252,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -261,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -271,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -284,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -306,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -322,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT FALSE +#define SPI_USE_WAIT FALSE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 FALSE +#define SPI_USE_MUTUAL_EXCLUSION FALSE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -342,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ -/** @} */ \ No newline at end of file +/** @} */ diff --git a/keyboards/wete/chconf.h b/keyboards/wete/chconf.h index 89388dd5a3d1..4640ff5332b0 100644 --- a/keyboards/wete/chconf.h +++ b/keyboards/wete/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/wete/halconf.h b/keyboards/wete/halconf.h index acd7678e7b5e..ff5ae7e8a5f6 100644 --- a/keyboards/wete/halconf.h +++ b/keyboards/wete/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/whitefox/board_is31fl3731c.h b/keyboards/whitefox/board_is31fl3731c.h index d59b2ff43a64..238d30cb44e4 100644 --- a/keyboards/whitefox/board_is31fl3731c.h +++ b/keyboards/whitefox/board_is31fl3731c.h @@ -100,7 +100,7 @@ static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) { static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { (void) g; - i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, US2ST(IS31_TIMEOUT)); + i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, TIME_US2I(IS31_TIMEOUT)); } #endif /* _GDISP_LLD_BOARD_H */ diff --git a/keyboards/whitefox/chconf.h b/keyboards/whitefox/chconf.h index 513ae821db07..7f767b6ddc78 100644 --- a/keyboards/whitefox/chconf.h +++ b/keyboards/whitefox/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 0 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 20 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -406,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -415,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/whitefox/halconf.h b/keyboards/whitefox/halconf.h index b87b0635c476..de0f29ce6ed0 100644 --- a/keyboards/whitefox/halconf.h +++ b/keyboards/whitefox/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE +#define HAL_USE_I2C TRUE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM FALSE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,15 +440,52 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE #endif /*===========================================================================*/ @@ -345,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/keyboards/xiaomi/mk02/chconf.h b/keyboards/xiaomi/mk02/chconf.h index 99fa8ce39822..8d66b51d2350 100644 --- a/keyboards/xiaomi/mk02/chconf.h +++ b/keyboards/xiaomi/mk02/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ +#if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ +#if !defined(CH_CFG_ST_FREQUENCY) #define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ +#if !defined(CH_CFG_ST_TIMEDELTA) #define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -81,7 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ +#if !defined(CH_CFG_TIME_QUANTUM) #define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ +#if !defined(CH_CFG_MEMCORE_SIZE) #define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -103,11 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) #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 +#endif /** @} */ @@ -126,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) #define CH_CFG_OPTIMIZE_SPEED FALSE +#endif /** @} */ @@ -144,7 +171,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_TM) #define CH_CFG_USE_TM FALSE +#endif /** * @brief Threads registry APIs. @@ -152,7 +181,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_REGISTRY) #define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -161,7 +192,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_WAITEXIT) #define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -169,7 +202,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_SEMAPHORES) #define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -180,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -188,7 +225,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MUTEXES) #define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -198,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -208,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ +#if !defined(CH_CFG_USE_CONDVARS) #define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -218,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif /** * @brief Events Flags APIs. @@ -226,7 +271,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_EVENTS) #define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -236,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) #define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -245,7 +294,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MESSAGES) #define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -256,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) #define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif /** * @brief Mailboxes APIs. @@ -266,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ +#if !defined(CH_CFG_USE_MAILBOXES) #define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -275,7 +330,9 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMCORE) #define CH_CFG_USE_MEMCORE FALSE +#endif /** * @brief Heap Allocator APIs. @@ -287,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ +#if !defined(CH_CFG_USE_HEAP) #define CH_CFG_USE_HEAP FALSE +#endif /** * @brief Memory Pools Allocator APIs. @@ -296,7 +355,31 @@ * * @note The default is @p TRUE. */ +#if !defined(CH_CFG_USE_MEMPOOLS) #define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -307,7 +390,80 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ +#if !defined(CH_CFG_USE_DYNAMIC) #define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -323,7 +479,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_STATISTICS) #define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -332,7 +490,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -341,7 +501,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_CHECKS) #define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -351,7 +513,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_ENABLE_ASSERTS) #define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -359,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ +#if !defined(CH_DBG_TRACE_MASK) #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @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. */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) #define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -378,7 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) #define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif /** * @brief Debug option, stacks initialization. @@ -388,7 +558,9 @@ * * @note The default is @p FALSE. */ +#if !defined(CH_DBG_FILL_THREADS) #define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -399,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ +#if !defined(CH_DBG_THREADS_PROFILING) #define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -410,6 +584,22 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -419,9 +609,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ diff --git a/keyboards/xiaomi/mk02/halconf.h b/keyboards/xiaomi/mk02/halconf.h index 9bcb477c03c0..921803762eaf 100644 --- a/keyboards/xiaomi/mk02/halconf.h +++ b/keyboards/xiaomi/mk02/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -25,8 +25,11 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ #include "mcuconf.h" @@ -34,140 +37,181 @@ * @brief Enables the PAL subsystem. */ #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE +#define HAL_USE_PAL TRUE #endif /** * @brief Enables the ADC subsystem. */ #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE +#define HAL_USE_ADC FALSE #endif /** * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE +#define HAL_USE_CAN FALSE #endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE #endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE #endif /** * @brief Enables the GPT subsystem. */ #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE +#define HAL_USE_GPT FALSE #endif /** * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C FALSE #endif /** * @brief Enables the I2S subsystem. */ #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE +#define HAL_USE_I2S FALSE #endif /** * @brief Enables the ICU subsystem. */ #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE +#define HAL_USE_ICU FALSE #endif /** * @brief Enables the MAC subsystem. */ #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE +#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 +#define HAL_USE_MMC_SPI FALSE #endif /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM TRUE #endif /** * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE +#define HAL_USE_RTC FALSE #endif /** * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC FALSE #endif /** * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#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 +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE #endif /** * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI TRUE +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE #endif /** * @brief Enables the UART subsystem. */ #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE +#define HAL_USE_UART FALSE #endif /** * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB TRUE #endif /** * @brief Enables the WDG subsystem. */ #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE #endif /*===========================================================================*/ @@ -179,7 +223,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE +#define ADC_USE_WAIT TRUE #endif /** @@ -187,7 +231,7 @@ * @note Disabling this option saves both code and data space. */ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE +#define ADC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -198,7 +242,56 @@ * @brief Sleep mode related APIs inclusion switch. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -209,7 +302,7 @@ * @brief Enables the mutual exclusion APIs on the I2C bus. */ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE +#define I2C_USE_MUTUAL_EXCLUSION TRUE #endif /*===========================================================================*/ @@ -217,17 +310,17 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE +#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 +#define MAC_USE_EVENTS TRUE #endif /*===========================================================================*/ @@ -243,7 +336,7 @@ * use a DMA channel and heavily loads the CPU. */ #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE +#define MMC_NICE_WAITING TRUE #endif /*===========================================================================*/ @@ -255,7 +348,7 @@ * @note Attempts are performed at 10mS intervals. */ #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 +#define SDC_INIT_RETRY 100 #endif /** @@ -264,7 +357,7 @@ * at @p FALSE. */ #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE +#define SDC_MMC_SUPPORT FALSE #endif /** @@ -274,7 +367,21 @@ * lower priority, this may slow down the driver a bit however. */ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U #endif /*===========================================================================*/ @@ -287,18 +394,18 @@ * default configuration. */ #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 +#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 + * @note The default is 16 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 +#define SERIAL_BUFFERS_SIZE 16 #endif /*===========================================================================*/ @@ -309,11 +416,19 @@ * @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 + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 1 +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 #endif /*===========================================================================*/ @@ -325,17 +440,53 @@ * @note Disabling this option saves both code and data space. */ #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE #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 +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE #endif +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -346,9 +497,29 @@ * @note Disabling this option saves both code and data space. */ #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE #endif -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/layouts/community/60_iso/unxmaal/keymap.c b/layouts/community/60_iso/unxmaal/keymap.c index 07fca874e4be..455d969f4707 100644 --- a/layouts/community/60_iso/unxmaal/keymap.c +++ b/layouts/community/60_iso/unxmaal/keymap.c @@ -109,7 +109,6 @@ enum function_id { const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode @@ -120,7 +119,6 @@ const uint16_t PROGMEM fn_actions[] = { [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), [12] = ACTION_FUNCTION(SHIFT_ESC), - [13] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/layouts/community/ergodox/adam/keymap.c b/layouts/community/ergodox/adam/keymap.c index 100bb6819817..d17f0b83b6de 100644 --- a/layouts/community/ergodox/adam/keymap.c +++ b/layouts/community/ergodox/adam/keymap.c @@ -127,13 +127,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F), - [2] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J), - [11] = ACTION_LAYER_TAP_KEY(FLOCK,LSFT(KC_F)), - [12] = ACTION_LAYER_TAP_KEY(JLOCK,LSFT(KC_J)) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/guni/keymap.c b/layouts/community/ergodox/guni/keymap.c index 021271c2e151..14d6f8d3ad1a 100644 --- a/layouts/community/ergodox/guni/keymap.c +++ b/layouts/community/ergodox/guni/keymap.c @@ -8,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, + LT(1, KC_CAPS) , KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, KC_NO , KC_NO , @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, - KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, + KC_H , KC_J, KC_K , KC_L, KC_SCLN,LT(1, KC_QUOT), KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, KC_NO , KC_NO, @@ -133,12 +133,9 @@ const uint16_t PROGMEM fn_actions[] = { [24] = ACTION_LAYER_SET(2, ON_PRESS), [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), [26] = ACTION_LAYER_SET(1, ON_PRESS), - [27] = ACTION_LAYER_TAP_KEY(1, KC_CAPS), [28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS), //[29] = ACTION_LAYER_TOGGLE(4), [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), - [30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT), - //[] = ACTION_LAYER_TAP_KEY(4, KC_S), }; diff --git a/layouts/community/ergodox/townk_osx/keymap.c b/layouts/community/ergodox/townk_osx/keymap.c index e36d71432d1e..55394fab214c 100644 --- a/layouts/community/ergodox/townk_osx/keymap.c +++ b/layouts/community/ergodox/townk_osx/keymap.c @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH_T(KC_F17), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTL_T(KC_QUOT), ALL_T(KC_F19), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN2, - KC_RGUI, KC_RALT, CTL_T(KC_LBRC), KC_FN3, KC_FN1, + KC_RGUI, KC_RALT, CTL_T(KC_LBRC), LT(KEYPAD, KC_RBRC), KC_FN1, M_OSXCPY, M_OSXPST, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC), @@ -197,7 +197,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_ONESHOT(FN), [2] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift. - [3] = ACTION_LAYER_TAP_KEY(KEYPAD, KC_RBRC), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/lib/chibios b/lib/chibios index 587968d6cbc2..313416b8fda9 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 587968d6cbc2b0e1c7147540872f2a67e59ca18b +Subproject commit 313416b8fda90d9973a749a0a35970956852c286 diff --git a/lib/chibios-contrib b/lib/chibios-contrib index ede48346eee4..e3a3a2404771 160000 --- a/lib/chibios-contrib +++ b/lib/chibios-contrib @@ -1 +1 @@ -Subproject commit ede48346eee4b8d6847c19bc01420bee76a5e486 +Subproject commit e3a3a24047717af33b098266e11c2e4e5102206a diff --git a/lib/ugfx b/lib/ugfx index 3e97b74e03c9..40b48f470add 160000 --- a/lib/ugfx +++ b/lib/ugfx @@ -1 +1 @@ -Subproject commit 3e97b74e03c93631cdd3ddb2ce43b963fdce19b2 +Subproject commit 40b48f470addad6a4fb1177de1a69a181158739b diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index e4483c302895..fba7c5987364 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c @@ -218,17 +218,11 @@ static const dacsample_t dac_buffer_2[DAC_BUFFER_SIZE] = { /* * DAC streaming callback. */ -size_t nx = 0, ny = 0, nz = 0; -static void end_cb1(DACDriver *dacp, dacsample_t *buffer, size_t n) { +size_t nz = 0; +static void end_cb1(DACDriver *dacp) { (void)dacp; nz++; - if (dac_buffer == buffer) { - nx += n; - } else { - ny += n; - } - if ((nz % 1000) == 0) { // palTogglePad(GPIOD, GPIOD_LED3); } diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c index 7cf1e0fb3043..519c0c2cf27f 100644 --- a/quantum/backlight/backlight_avr.c +++ b/quantum/backlight/backlight_avr.c @@ -22,12 +22,15 @@ # define TOIEx TOIE1 # if BACKLIGHT_PIN == B5 +# define COMxx0 COM1A0 # define COMxx1 COM1A1 # define OCRxx OCR1A # elif BACKLIGHT_PIN == B6 +# define COMxx0 COM1B0 # define COMxx1 COM1B1 # define OCRxx OCR1B # elif BACKLIGHT_PIN == B7 +# define COMxx0 COM1C0 # define COMxx1 COM1C1 # define OCRxx OCR1C # endif @@ -44,6 +47,7 @@ # if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) # error This MCU has no C4 pin! # else +# define COMxx0 COM3C0 # define COMxx1 COM3C1 # define OCRxx OCR3C # endif @@ -51,10 +55,12 @@ # if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) # error This MCU has no C5 pin! # else +# define COMxx0 COM3B0 # define COMxx1 COM3B1 # define OCRxx OCR3B # endif # elif BACKLIGHT_PIN == C6 +# define COMxx0 COM3A0 # define COMxx1 COM3A1 # define OCRxx OCR3A # endif @@ -68,12 +74,15 @@ # define TOIEx TOIE1 # if BACKLIGHT_PIN == B7 +# define COMxx0 COM1C0 # define COMxx1 COM1C1 # define OCRxx OCR1C # elif BACKLIGHT_PIN == C5 +# define COMxx0 COM1B0 # define COMxx1 COM1B1 # define OCRxx OCR1B # elif BACKLIGHT_PIN == C6 +# define COMxx0 COM1A0 # define COMxx1 COM1A1 # define OCRxx OCR1A # endif @@ -87,9 +96,11 @@ # define TOIEx TOIE1 # if BACKLIGHT_PIN == D4 +# define COMxx0 COM1B0 # define COMxx1 COM1B1 # define OCRxx OCR1B # elif BACKLIGHT_PIN == D5 +# define COMxx0 COM1A0 # define COMxx1 COM1A1 # define OCRxx OCR1A # endif @@ -103,9 +114,11 @@ # define TOIEx TOIE1 # if BACKLIGHT_PIN == B1 +# define COMxx0 COM1A0 # define COMxx1 COM1A1 # define OCRxx OCR1A # elif BACKLIGHT_PIN == B2 +# define COMxx0 COM1B0 # define COMxx1 COM1B1 # define OCRxx OCR1B # endif @@ -156,22 +169,22 @@ # endif # ifndef BACKLIGHT_ON_STATE -# define BACKLIGHT_ON_STATE 0 +# define BACKLIGHT_ON_STATE 1 # endif void backlight_on(pin_t backlight_pin) { -# if BACKLIGHT_ON_STATE == 0 - writePinLow(backlight_pin); -# else +# if BACKLIGHT_ON_STATE == 1 writePinHigh(backlight_pin); +# else + writePinLow(backlight_pin); # endif } void backlight_off(pin_t backlight_pin) { -# if BACKLIGHT_ON_STATE == 0 - writePinHigh(backlight_pin); -# else +# if BACKLIGHT_ON_STATE == 1 writePinLow(backlight_pin); +# else + writePinHigh(backlight_pin); # endif } @@ -199,6 +212,22 @@ static const pin_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT; # else // full hardware PWM +static inline void enable_pwm(void) { +# if BACKLIGHT_ON_STATE == 1 + TCCRxA |= _BV(COMxx1); +# else + TCCRxA |= _BV(COMxx1) | _BV(COMxx0); +# endif +} + +static inline void disable_pwm(void) { +# if BACKLIGHT_ON_STATE == 1 + TCCRxA &= ~(_BV(COMxx1)); +# else + TCCRxA &= ~(_BV(COMxx1) | _BV(COMxx0)); +# endif +} + // we support only one backlight pin static const pin_t backlight_pin = BACKLIGHT_PIN; # define FOR_EACH_LED(x) x @@ -309,12 +338,12 @@ void backlight_set(uint8_t level) { if (OCRxx) { TIMSKx &= ~(_BV(OCIExA)); TIMSKx &= ~(_BV(TOIEx)); - FOR_EACH_LED(backlight_off(backlight_pin);) } # else // Turn off PWM control on backlight pin - TCCRxA &= ~(_BV(COMxx1)); + disable_pwm(); # endif + FOR_EACH_LED(backlight_off(backlight_pin);) } else { # ifdef BACKLIGHT_PWM_TIMER if (!OCRxx) { @@ -323,7 +352,7 @@ void backlight_set(uint8_t level) { } # else // Turn on PWM control of backlight pin - TCCRxA |= _BV(COMxx1); + enable_pwm(); # endif } // Set the brightness @@ -471,8 +500,13 @@ void backlight_init_ports(void) { "In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]." "In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)." */ - TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010; - TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; +# if BACKLIGHT_ON_STATE == 1 + TCCRxA = _BV(COMxx1) | _BV(WGM11); +# else + TCCRxA = _BV(COMxx1) | _BV(COMxx0) | _BV(WGM11); +# endif + + TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); # endif // Use full 16-bit resolution. Counter counts to ICR1 before reset to 0. ICRx = TIMER_TOP; diff --git a/quantum/encoder.c b/quantum/encoder.c index 8e11562eb720..81ec1bb376c8 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -35,6 +35,13 @@ static pin_t encoders_pad_a[] = ENCODERS_PAD_A; static pin_t encoders_pad_b[] = ENCODERS_PAD_B; +#ifndef ENCODER_DIRECTION_FLIP +# define ENCODER_CLOCKWISE true +# define ENCODER_COUNTER_CLOCKWISE false +#else +# define ENCODER_CLOCKWISE false +# define ENCODER_COUNTER_CLOCKWISE true +#endif 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}; @@ -86,11 +93,11 @@ static void encoder_update(int8_t index, uint8_t state) { encoder_pulses[i] += encoder_LUT[state & 0xF]; if (encoder_pulses[i] >= ENCODER_RESOLUTION) { encoder_value[index]++; - encoder_update_kb(index, true); + encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE); } if (encoder_pulses[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise encoder_value[index]--; - encoder_update_kb(index, false); + encoder_update_kb(index, ENCODER_CLOCKWISE); } encoder_pulses[i] %= ENCODER_RESOLUTION; } @@ -113,12 +120,12 @@ void encoder_update_raw(uint8_t* slave_state) { while (delta > 0) { delta--; encoder_value[index]++; - encoder_update_kb(index, true); + encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE); } while (delta < 0) { delta++; encoder_value[index]--; - encoder_update_kb(index, false); + encoder_update_kb(index, ENCODER_CLOCKWISE); } } } diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index c82c44639937..f34ba26e5acc 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -139,26 +139,6 @@ action_t action_for_key(uint8_t layer, keypos_t key) { mod = mod_config((keycode >> 0x8) & 0x1F); action.code = ACTION_MODS_TAP_KEY(mod, keycode & 0xFF); break; -#ifdef BACKLIGHT_ENABLE - case BL_ON: - action.code = ACTION_BACKLIGHT_ON(); - break; - case BL_OFF: - action.code = ACTION_BACKLIGHT_OFF(); - break; - case BL_DEC: - action.code = ACTION_BACKLIGHT_DECREASE(); - break; - case BL_INC: - action.code = ACTION_BACKLIGHT_INCREASE(); - break; - case BL_TOGG: - action.code = ACTION_BACKLIGHT_TOGGLE(); - break; - case BL_STEP: - action.code = ACTION_BACKLIGHT_STEP(); - break; -#endif #ifdef SWAP_HANDS_ENABLE case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: action.code = ACTION(ACT_SWAP_HANDS, keycode & 0xff); diff --git a/quantum/process_keycode/process_backlight.c b/quantum/process_keycode/process_backlight.c new file mode 100644 index 000000000000..4d12f6813a92 --- /dev/null +++ b/quantum/process_keycode/process_backlight.c @@ -0,0 +1,51 @@ +/* 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 "process_backlight.h" + +#include "backlight.h" + +bool process_backlight(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case BL_ON: + backlight_level(BACKLIGHT_LEVELS); + return false; + case BL_OFF: + backlight_level(0); + return false; + case BL_DEC: + backlight_decrease(); + return false; + case BL_INC: + backlight_increase(); + return false; + case BL_TOGG: + backlight_toggle(); + return false; + case BL_STEP: + backlight_step(); + return false; +#ifdef BACKLIGHT_BREATHING + case BL_BRTG: + backlight_toggle_breathing(); + return false; +#endif + } + } + + return true; +} diff --git a/quantum/process_keycode/process_backlight.h b/quantum/process_keycode/process_backlight.h new file mode 100644 index 000000000000..7fe887ae6752 --- /dev/null +++ b/quantum/process_keycode/process_backlight.h @@ -0,0 +1,21 @@ +/* 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 "quantum.h" + +bool process_backlight(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum.c b/quantum/quantum.c index 1b5ce3292cd4..7c19a3bbb6c0 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -224,6 +224,9 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef AUDIO_ENABLE process_audio(keycode, record) && #endif +#ifdef BACKLIGHT_ENABLE + process_backlight(keycode, record) && +#endif #ifdef STENO_ENABLE process_steno(keycode, record) && #endif diff --git a/quantum/quantum.h b/quantum/quantum.h index fbd5e9079271..7dc14e62807f 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -88,6 +88,10 @@ extern layer_state_t layer_state; # include "process_music.h" #endif +#ifdef BACKLIGHT_ENABLE +# include "process_backlight.h" +#endif + #ifdef LEADER_ENABLE # include "process_leader.h" #endif diff --git a/quantum/serial_link/system/serial_link.c b/quantum/serial_link/system/serial_link.c index feac64e297db..c59c06894423 100644 --- a/quantum/serial_link/system/serial_link.c +++ b/quantum/serial_link/system/serial_link.c @@ -119,7 +119,7 @@ static THD_FUNCTION(serialThread, arg) { eventflags_t flags1 = 0; eventflags_t flags2 = 0; if (need_wait) { - eventmask_t mask = chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(1000)); + eventmask_t mask = chEvtWaitAnyTimeout(ALL_EVENTS, TIME_MS2I(1000)); if (mask & EVENT_MASK(1)) { flags1 = chEvtGetAndClearFlags(&sd1_listener); print_error("DOWNLINK", flags1, &SD1); @@ -192,7 +192,7 @@ void serial_link_update(void) { systime_t current_time = chVTGetSystemTimeX(); systime_t delta = current_time - last_update; - if (changed || delta > US2ST(5000)) { + if (changed || delta > TIME_US2I(5000)) { last_update = current_time; last_matrix = matrix; matrix_object_t* m = begin_write_keyboard_matrix(); diff --git a/quantum/stm32/chconf.h b/quantum/stm32/chconf.h index 6b691950a619..b6e66f9e4988 100644 --- a/quantum/stm32/chconf.h +++ b/quantum/stm32/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -15,7 +15,7 @@ */ /** - * @file templates/chconf.h + * @file rt/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. @@ -29,6 +29,7 @@ # define CHCONF_H # define _CHIBIOS_RT_CONF_ +# define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -41,14 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ -# define CH_CFG_ST_RESOLUTION 32 +# if !defined(CH_CFG_ST_RESOLUTION) +# define CH_CFG_ST_RESOLUTION 32 +# endif /** * @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 100000 +# if !defined(CH_CFG_ST_FREQUENCY) +# define CH_CFG_ST_FREQUENCY 100000 +# endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +# if !defined(CH_CFG_INTERVALS_SIZE) +# define CH_CFG_INTERVALS_SIZE 32 +# endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +# if !defined(CH_CFG_TIME_TYPES_SIZE) +# define CH_CFG_TIME_TYPES_SIZE 32 +# endif /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ -# define CH_CFG_ST_TIMEDELTA 2 +# if !defined(CH_CFG_ST_TIMEDELTA) +# define CH_CFG_ST_TIMEDELTA 2 +# endif /** @} */ @@ -81,7 +104,9 @@ * @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 +# if !defined(CH_CFG_TIME_QUANTUM) +# define CH_CFG_TIME_QUANTUM 0 +# endif /** * @brief Managed RAM size. @@ -94,7 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ -# define CH_CFG_MEMCORE_SIZE 0 +# if !defined(CH_CFG_MEMCORE_SIZE) +# define CH_CFG_MEMCORE_SIZE 0 +# endif /** * @brief Idle thread automatic spawn suppression. @@ -103,7 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ -# define CH_CFG_NO_IDLE_THREAD FALSE +# if !defined(CH_CFG_NO_IDLE_THREAD) +# define CH_CFG_NO_IDLE_THREAD FALSE +# endif /** @} */ @@ -122,7 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ -# define CH_CFG_OPTIMIZE_SPEED TRUE +# if !defined(CH_CFG_OPTIMIZE_SPEED) +# define CH_CFG_OPTIMIZE_SPEED TRUE +# endif /** @} */ @@ -140,7 +171,9 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_TM TRUE +# if !defined(CH_CFG_USE_TM) +# define CH_CFG_USE_TM TRUE +# endif /** * @brief Threads registry APIs. @@ -148,7 +181,9 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_REGISTRY TRUE +# if !defined(CH_CFG_USE_REGISTRY) +# define CH_CFG_USE_REGISTRY TRUE +# endif /** * @brief Threads synchronization APIs. @@ -157,7 +192,9 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_WAITEXIT TRUE +# if !defined(CH_CFG_USE_WAITEXIT) +# define CH_CFG_USE_WAITEXIT TRUE +# endif /** * @brief Semaphores APIs. @@ -165,7 +202,9 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_SEMAPHORES TRUE +# if !defined(CH_CFG_USE_SEMAPHORES) +# define CH_CFG_USE_SEMAPHORES TRUE +# endif /** * @brief Semaphores queuing mode. @@ -176,7 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ -# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +# endif /** * @brief Mutexes APIs. @@ -184,7 +225,9 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_MUTEXES TRUE +# if !defined(CH_CFG_USE_MUTEXES) +# define CH_CFG_USE_MUTEXES TRUE +# endif /** * @brief Enables recursive behavior on mutexes. @@ -194,7 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ -# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +# endif /** * @brief Conditional Variables APIs. @@ -204,7 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ -# define CH_CFG_USE_CONDVARS TRUE +# if !defined(CH_CFG_USE_CONDVARS) +# define CH_CFG_USE_CONDVARS TRUE +# endif /** * @brief Conditional Variables APIs with timeout. @@ -214,7 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ -# define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +# define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +# endif /** * @brief Events Flags APIs. @@ -222,7 +271,9 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_EVENTS TRUE +# if !defined(CH_CFG_USE_EVENTS) +# define CH_CFG_USE_EVENTS TRUE +# endif /** * @brief Events Flags APIs with timeout. @@ -232,7 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ -# define CH_CFG_USE_EVENTS_TIMEOUT TRUE +# if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +# define CH_CFG_USE_EVENTS_TIMEOUT TRUE +# endif /** * @brief Synchronous Messages APIs. @@ -241,7 +294,9 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_MESSAGES TRUE +# if !defined(CH_CFG_USE_MESSAGES) +# define CH_CFG_USE_MESSAGES TRUE +# endif /** * @brief Synchronous Messages queuing mode. @@ -252,7 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ -# define CH_CFG_USE_MESSAGES_PRIORITY TRUE +# if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +# define CH_CFG_USE_MESSAGES_PRIORITY TRUE +# endif /** * @brief Mailboxes APIs. @@ -262,7 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ -# define CH_CFG_USE_MAILBOXES TRUE +# if !defined(CH_CFG_USE_MAILBOXES) +# define CH_CFG_USE_MAILBOXES TRUE +# endif /** * @brief Core Memory Manager APIs. @@ -271,7 +330,9 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_MEMCORE TRUE +# if !defined(CH_CFG_USE_MEMCORE) +# define CH_CFG_USE_MEMCORE TRUE +# endif /** * @brief Heap Allocator APIs. @@ -283,7 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ -# define CH_CFG_USE_HEAP TRUE +# if !defined(CH_CFG_USE_HEAP) +# define CH_CFG_USE_HEAP TRUE +# endif /** * @brief Memory Pools Allocator APIs. @@ -292,7 +355,31 @@ * * @note The default is @p TRUE. */ -# define CH_CFG_USE_MEMPOOLS TRUE +# if !defined(CH_CFG_USE_MEMPOOLS) +# define CH_CFG_USE_MEMPOOLS TRUE +# endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +# if !defined(CH_CFG_USE_OBJ_FIFOS) +# define CH_CFG_USE_OBJ_FIFOS TRUE +# endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +# if !defined(CH_CFG_USE_PIPES) +# define CH_CFG_USE_PIPES TRUE +# endif /** * @brief Dynamic Threads APIs. @@ -303,7 +390,80 @@ * @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 TRUE +# if !defined(CH_CFG_USE_DYNAMIC) +# define CH_CFG_USE_DYNAMIC TRUE +# endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +# if !defined(CH_CFG_USE_FACTORY) +# define CH_CFG_USE_FACTORY TRUE +# endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +# endif + +/** + * @brief Enables the registry of generic objects. + */ +# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +# define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +# endif + +/** + * @brief Enables factory for generic buffers. + */ +# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +# define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +# endif + +/** + * @brief Enables factory for semaphores. + */ +# if !defined(CH_CFG_FACTORY_SEMAPHORES) +# define CH_CFG_FACTORY_SEMAPHORES TRUE +# endif + +/** + * @brief Enables factory for mailboxes. + */ +# if !defined(CH_CFG_FACTORY_MAILBOXES) +# define CH_CFG_FACTORY_MAILBOXES TRUE +# endif + +/** + * @brief Enables factory for objects FIFOs. + */ +# if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +# define CH_CFG_FACTORY_OBJ_FIFOS TRUE +# endif + +/** + * @brief Enables factory for Pipes. + */ +# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +# define CH_CFG_FACTORY_PIPES TRUE +# endif /** @} */ @@ -319,7 +479,9 @@ * * @note The default is @p FALSE. */ -# define CH_DBG_STATISTICS FALSE +# if !defined(CH_DBG_STATISTICS) +# define CH_DBG_STATISTICS FALSE +# endif /** * @brief Debug option, system state check. @@ -328,7 +490,9 @@ * * @note The default is @p FALSE. */ -# define CH_DBG_SYSTEM_STATE_CHECK FALSE +# if !defined(CH_DBG_SYSTEM_STATE_CHECK) +# define CH_DBG_SYSTEM_STATE_CHECK FALSE +# endif /** * @brief Debug option, parameters checks. @@ -337,7 +501,9 @@ * * @note The default is @p FALSE. */ -# define CH_DBG_ENABLE_CHECKS FALSE +# if !defined(CH_DBG_ENABLE_CHECKS) +# define CH_DBG_ENABLE_CHECKS FALSE +# endif /** * @brief Debug option, consistency checks. @@ -347,7 +513,9 @@ * * @note The default is @p FALSE. */ -# define CH_DBG_ENABLE_ASSERTS FALSE +# if !defined(CH_DBG_ENABLE_ASSERTS) +# define CH_DBG_ENABLE_ASSERTS FALSE +# endif /** * @brief Debug option, trace buffer. @@ -355,14 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ -# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +# if !defined(CH_DBG_TRACE_MASK) +# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +# endif /** * @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 +# if !defined(CH_DBG_TRACE_BUFFER_SIZE) +# define CH_DBG_TRACE_BUFFER_SIZE 128 +# endif /** * @brief Debug option, stack checks. @@ -374,7 +546,9 @@ * @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 TRUE +# if !defined(CH_DBG_ENABLE_STACK_CHECK) +# define CH_DBG_ENABLE_STACK_CHECK TRUE +# endif /** * @brief Debug option, stacks initialization. @@ -384,7 +558,9 @@ * * @note The default is @p FALSE. */ -# define CH_DBG_FILL_THREADS FALSE +# if !defined(CH_DBG_FILL_THREADS) +# define CH_DBG_FILL_THREADS FALSE +# endif /** * @brief Debug option, threads profiling. @@ -395,7 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ -# define CH_DBG_THREADS_PROFILING FALSE +# if !defined(CH_DBG_THREADS_PROFILING) +# define CH_DBG_THREADS_PROFILING FALSE +# endif /** @} */ @@ -406,6 +584,21 @@ */ /*===========================================================================*/ +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +# define CH_CFG_SYSTEM_INIT_HOOK() \ + { /* Add threads initialization code here.*/ \ + } + /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -414,9 +607,9 @@ /** * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. + * @details User initialization code added to the @p _thread_init() function. * - * @note It is invoked from within @p chThdInit() and implicitly from all + * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ # define CH_CFG_THREAD_INIT_HOOK(tp) \ diff --git a/quantum/stm32/halconf.h b/quantum/stm32/halconf.h index 72e011d3dc6b..106f0f5755f9 100644 --- a/quantum/stm32/halconf.h +++ b/quantum/stm32/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -28,6 +28,9 @@ #ifndef HALCONF_H # define HALCONF_H +# define _CHIBIOS_HAL_CONF_ +# define _CHIBIOS_HAL_CONF_VER_7_0_ + # include "mcuconf.h" /** @@ -52,17 +55,17 @@ # endif /** - * @brief Enables the DAC subsystem. + * @brief Enables the cryptographic subsystem. */ -# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -# define HAL_USE_DAC TRUE +# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +# define HAL_USE_CRY FALSE # endif /** - * @brief Enables the EXT subsystem. + * @brief Enables the DAC subsystem. */ -# if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -# define HAL_USE_EXT FALSE +# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +# define HAL_USE_DAC TRUE # endif /** @@ -114,13 +117,6 @@ # define HAL_USE_PWM TRUE # endif -/** - * @brief Enables the QSPI subsystem. - */ -# if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -# define HAL_USE_QSPI FALSE -# endif - /** * @brief Enables the RTC subsystem. */ @@ -149,6 +145,13 @@ # define HAL_USE_SERIAL_USB TRUE # endif +/** + * @brief Enables the SIO subsystem. + */ +# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +# define HAL_USE_SIO FALSE +# endif + /** * @brief Enables the SPI subsystem. */ @@ -156,6 +159,13 @@ # define HAL_USE_SPI FALSE # endif +/** + * @brief Enables the TRNG subsystem. + */ +# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +# define HAL_USE_TRNG FALSE +# endif + /** * @brief Enables the UART subsystem. */ @@ -177,6 +187,33 @@ # define HAL_USE_WDG FALSE # endif +/** + * @brief Enables the WSPI subsystem. + */ +# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +# define HAL_USE_WSPI FALSE +# endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +# define PAL_USE_CALLBACKS FALSE +# endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +# define PAL_USE_WAIT FALSE +# endif + /*===========================================================================*/ /* ADC driver related settings. */ /*===========================================================================*/ @@ -208,6 +245,55 @@ # define CAN_USE_SLEEP_MODE TRUE # endif +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +# define CAN_ENFORCE_USE_CALLBACKS FALSE +# endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +# define HAL_CRY_USE_FALLBACK FALSE +# endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +# define HAL_CRY_ENFORCE_FALLBACK FALSE +# endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +# define DAC_USE_WAIT TRUE +# endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +# define DAC_USE_MUTUAL_EXCLUSION TRUE +# endif + /*===========================================================================*/ /* I2C driver related settings. */ /*===========================================================================*/ @@ -224,7 +310,7 @@ /*===========================================================================*/ /** - * @brief Enables an event sources for incoming packets. + * @brief Enables the zero-copy API. */ # if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) # define MAC_USE_ZERO_COPY FALSE @@ -284,6 +370,20 @@ # define SDC_NICE_WAITING TRUE # endif +/** + * @brief OCR initialization constant for V20 cards. + */ +# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +# define SDC_INIT_OCR_V20 0x50FF8000U +# endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +# define SDC_INIT_OCR 0x80100000U +# endif + /*===========================================================================*/ /* SERIAL driver related settings. */ /*===========================================================================*/ @@ -343,6 +443,14 @@ # define SPI_USE_WAIT TRUE # endif +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +# define SPI_USE_CIRCULAR FALSE +# endif + /** * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @note Disabling this option saves both code and data space. @@ -351,6 +459,14 @@ # define SPI_USE_MUTUAL_EXCLUSION TRUE # endif +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +# endif + /*===========================================================================*/ /* UART driver related settings. */ /*===========================================================================*/ @@ -383,6 +499,26 @@ # define USB_USE_WAIT TRUE # endif +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +# define WSPI_USE_WAIT TRUE +# endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +# define WSPI_USE_MUTUAL_EXCLUSION TRUE +# endif + #endif /* HALCONF_H */ /** @} */ diff --git a/quantum/stm32/mcuconf.h b/quantum/stm32/mcuconf.h index 4490dfed7e47..ca4ad7b515e9 100644 --- a/quantum/stm32/mcuconf.h +++ b/quantum/stm32/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2018 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. @@ -32,6 +32,7 @@ */ #define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF /* * HAL driver system settings. @@ -66,9 +67,28 @@ #define STM32_USB_CLOCK_REQUIRED TRUE #define STM32_USBPRE STM32_USBPRE_DIV1P5 -#undef STM32_HSE_BYPASS -// #error "oh no" -// #endif +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 /* * ADC driver system settings. @@ -114,25 +134,6 @@ #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 - /* * GPT driver system settings. */ @@ -143,6 +144,9 @@ #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 #define STM32_GPT_TIM2_IRQ_PRIORITY 7 #define STM32_GPT_TIM3_IRQ_PRIORITY 7 @@ -172,6 +176,7 @@ #define STM32_ICU_USE_TIM3 FALSE #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE #define STM32_ICU_TIM1_IRQ_PRIORITY 7 #define STM32_ICU_TIM2_IRQ_PRIORITY 7 #define STM32_ICU_TIM3_IRQ_PRIORITY 7 @@ -187,12 +192,23 @@ #define STM32_PWM_USE_TIM3 TRUE #define STM32_PWM_USE_TIM4 TRUE #define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 #define STM32_PWM_TIM2_IRQ_PRIORITY 7 #define STM32_PWM_TIM3_IRQ_PRIORITY 7 #define STM32_PWM_TIM4_IRQ_PRIORITY 7 #define STM32_PWM_TIM8_IRQ_PRIORITY 7 +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + /* * SERIAL driver system settings. */ diff --git a/quantum/visualizer/common_gfxconf.h b/quantum/visualizer/common_gfxconf.h index 865e58869309..e5bbddbb02ba 100644 --- a/quantum/visualizer/common_gfxconf.h +++ b/quantum/visualizer/common_gfxconf.h @@ -22,295 +22,336 @@ #ifndef COMMON_GFXCONF_H #define COMMON_GFXCONF_H +/////////////////////////////////////////////////////////////////////////// +// GFX - Compatibility options // +/////////////////////////////////////////////////////////////////////////// +//#define GFX_COMPAT_V2 GFXON +//#define GFX_COMPAT_OLDCOLORS GFXON + /////////////////////////////////////////////////////////////////////////// // GOS - One of these must be defined, preferably in your Makefile // /////////////////////////////////////////////////////////////////////////// -//#define GFX_USE_OS_CHIBIOS TRUE -//#define GFX_USE_OS_FREERTOS FALSE -// #define GFX_FREERTOS_USE_TRACE FALSE -//#define GFX_USE_OS_WIN32 FALSE -//#define GFX_USE_OS_LINUX FALSE -//#define GFX_USE_OS_OSX FALSE -//#define GFX_USE_OS_ECOS FALSE -//#define GFX_USE_OS_RAWRTOS FALSE -//#define GFX_USE_OS_ARDUINO FALSE -//#define GFX_USE_OS_KEIL FALSE -//#define GFX_USE_OS_CMSIS FALSE -//#define GFX_USE_OS_RAW32 FALSE +//#define GFX_USE_OS_CHIBIOS GFXOFF +//#define GFX_USE_OS_FREERTOS GFXOFF +// #define GFX_FREERTOS_USE_TRACE GFXOFF +//#define GFX_USE_OS_WIN32 GFXOFF +//#define GFX_USE_OS_LINUX GFXOFF +//#define GFX_USE_OS_OSX GFXOFF +//#define GFX_USE_OS_ECOS GFXOFF +//#define GFX_USE_OS_RAWRTOS GFXOFF +//#define GFX_USE_OS_ARDUINO GFXOFF +//#define GFX_USE_OS_KEIL GFXOFF +//#define GFX_USE_OS_RTX5 GFXOFF +//#define GFX_USE_OS_CMSIS GFXOFF +//#define GFX_USE_OS_CMSIS2 GFXOFF +//#define GFX_USE_OS_RAW32 GFXOFF +//#define GFX_USE_OS_ZEPHYR GFXOFF +//#define GFX_USE_OS_NIOS GFXOFF +//#define GFX_USE_OS_QT GFXOFF // #define INTERRUPTS_OFF() optional_code // #define INTERRUPTS_ON() optional_code -// These are not defined by default for some reason -#define GOS_NEED_X_THREADS FALSE -#define GOS_NEED_X_HEAP FALSE // Options that (should where relevant) apply to all operating systems -#define GFX_NO_INLINE FALSE +#define GFX_NO_INLINE GFXON // #define GFX_COMPILER GFX_COMPILER_UNKNOWN +// #define GFX_SHOW_COMPILER GFXOFF // #define GFX_CPU GFX_CPU_UNKNOWN +// #define GFX_CPU_NO_ALIGNMENT_FAULTS GFXOFF +// #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_UNKNOWN // #define GFX_OS_HEAP_SIZE 0 -// #define GFX_OS_NO_INIT FALSE -// #define GFX_OS_INIT_NO_WARNING FALSE +// #define GFX_OS_NO_INIT GFXOFF +// #define GFX_OS_INIT_NO_WARNING GFXOFF // #define GFX_OS_PRE_INIT_FUNCTION myHardwareInitRoutine // #define GFX_OS_EXTRA_INIT_FUNCTION myOSInitRoutine // #define GFX_OS_EXTRA_DEINIT_FUNCTION myOSDeInitRoutine +// #define GFX_OS_CALL_UGFXMAIN GFXOFF +// #define GFX_OS_UGFXMAIN_STACKSIZE 0 +// #define GFX_EMULATE_MALLOC GFXOFF +// #define GFX_MEM_LT64K GFXOFF /////////////////////////////////////////////////////////////////////////// // GDISP // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GDISP TRUE - -//#define GDISP_NEED_AUTOFLUSH FALSE -//#define GDISP_NEED_TIMERFLUSH FALSE -//#define GDISP_NEED_VALIDATION TRUE -//#define GDISP_NEED_CLIP TRUE -#define GDISP_NEED_CIRCLE TRUE -#define GDISP_NEED_ELLIPSE TRUE -#define GDISP_NEED_ARC TRUE -#define GDISP_NEED_ARCSECTORS TRUE -#define GDISP_NEED_CONVEX_POLYGON TRUE -//#define GDISP_NEED_SCROLL FALSE -#define GDISP_NEED_PIXELREAD TRUE -#define GDISP_NEED_CONTROL TRUE -//#define GDISP_NEED_QUERY FALSE -//#define GDISP_NEED_MULTITHREAD FALSE -//#define GDISP_NEED_STREAMING FALSE -#define GDISP_NEED_TEXT TRUE -// #define GDISP_NEED_TEXT_WORDWRAP FALSE -// #define GDISP_NEED_ANTIALIAS FALSE -// #define GDISP_NEED_UTF8 FALSE -#define GDISP_NEED_TEXT_KERNING TRUE -// #define GDISP_INCLUDE_FONT_UI1 FALSE -// #define GDISP_INCLUDE_FONT_UI2 FALSE // The smallest preferred font. -// #define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS10 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS12 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS16 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS20 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS24 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS32 FALSE -#define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12 TRUE -// #define GDISP_INCLUDE_FONT_FIXED_10X20 FALSE -// #define GDISP_INCLUDE_FONT_FIXED_7X14 FALSE -#define GDISP_INCLUDE_FONT_FIXED_5X8 TRUE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS16_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS20_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS32_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12_AA FALSE -// #define GDISP_INCLUDE_USER_FONTS FALSE - -//#define GDISP_NEED_IMAGE FALSE -// #define GDISP_NEED_IMAGE_NATIVE FALSE -// #define GDISP_NEED_IMAGE_GIF FALSE -// #define GDISP_NEED_IMAGE_BMP FALSE -// #define GDISP_NEED_IMAGE_BMP_1 FALSE -// #define GDISP_NEED_IMAGE_BMP_4 FALSE -// #define GDISP_NEED_IMAGE_BMP_4_RLE FALSE -// #define GDISP_NEED_IMAGE_BMP_8 FALSE -// #define GDISP_NEED_IMAGE_BMP_8_RLE FALSE -// #define GDISP_NEED_IMAGE_BMP_16 FALSE -// #define GDISP_NEED_IMAGE_BMP_24 FALSE -// #define GDISP_NEED_IMAGE_BMP_32 FALSE -// #define GDISP_NEED_IMAGE_JPG FALSE -// #define GDISP_NEED_IMAGE_PNG FALSE -// #define GDISP_NEED_IMAGE_ACCOUNTING FALSE -#ifdef EMULATOR -# define GDISP_NEED_PIXMAP TRUE -#endif -// #define GDISP_NEED_PIXMAP_IMAGE FALSE - -//#define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE // If not defined the native hardware orientation is used. +#define GFX_USE_GDISP GFXON + +//#define GDISP_NEED_AUTOFLUSH GFXOFF +//#define GDISP_NEED_TIMERFLUSH GFXOFF +//#define GDISP_NEED_VALIDATION GFXON +//#define GDISP_NEED_CLIP GFXON +#define GDISP_NEED_CIRCLE GFXON +//#define GDISP_NEED_DUALCIRCLE GFXOFF +#define GDISP_NEED_ELLIPSE GFXON +#define GDISP_NEED_ARC GFXON +#define GDISP_NEED_ARCSECTORS GFXON +#define GDISP_NEED_CONVEX_POLYGON GFXON +//#define GDISP_NEED_SCROLL GFXOFF +#define GDISP_NEED_PIXELREAD GFXON +#define GDISP_NEED_CONTROL GFXON +//#define GDISP_NEED_QUERY GFXOFF +//#define GDISP_NEED_MULTITHREAD GFXOFF +//#define GDISP_NEED_STREAMING GFXOFF +#define GDISP_NEED_TEXT GFXON +// #define GDISP_NEED_TEXT_WORDWRAP GFXOFF +// #define GDISP_NEED_TEXT_BOXPADLR 1 +// #define GDISP_NEED_TEXT_BOXPADTB 1 +// #define GDISP_NEED_ANTIALIAS GFXOFF +// #define GDISP_NEED_UTF8 GFXOFF +#define GDISP_NEED_TEXT_KERNING GFXON +// #define GDISP_INCLUDE_FONT_UI1 GFXOFF +// #define GDISP_INCLUDE_FONT_UI2 GFXOFF // The smallest preferred font. +// #define GDISP_INCLUDE_FONT_LARGENUMBERS GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS10 GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS12 GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS16 GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS20 GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS24 GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS32 GFXOFF +#define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12 GFXON +// #define GDISP_INCLUDE_FONT_FIXED_10X20 GFXOFF +// #define GDISP_INCLUDE_FONT_FIXED_7X14 GFXOFF +#define GDISP_INCLUDE_FONT_FIXED_5X8 GFXON +// #define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS16_AA GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS20_AA GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANS32_AA GFXOFF +// #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12_AA GFXOFF +// #define GDISP_INCLUDE_USER_FONTS GFXOFF + +//#define GDISP_NEED_IMAGE GFXOFF +// #define GDISP_NEED_IMAGE_NATIVE GFXOFF +// #define GDISP_NEED_IMAGE_GIF GFXOFF +// #define GDISP_IMAGE_GIF_BLIT_BUFFER_SIZE 32 +// #define GDISP_NEED_IMAGE_BMP GFXOFF +// #define GDISP_NEED_IMAGE_BMP_1 GFXON +// #define GDISP_NEED_IMAGE_BMP_4 GFXON +// #define GDISP_NEED_IMAGE_BMP_4_RLE GFXON +// #define GDISP_NEED_IMAGE_BMP_8 GFXON +// #define GDISP_NEED_IMAGE_BMP_8_RLE GFXON +// #define GDISP_NEED_IMAGE_BMP_16 GFXON +// #define GDISP_NEED_IMAGE_BMP_24 GFXON +// #define GDISP_NEED_IMAGE_BMP_32 GFXON +// #define GDISP_IMAGE_BMP_BLIT_BUFFER_SIZE 32 +// #define GDISP_NEED_IMAGE_JPG GFXOFF +// #define GDISP_NEED_IMAGE_PNG GFXOFF +// #define GDISP_NEED_IMAGE_PNG_INTERLACED GFXOFF +// #define GDISP_NEED_IMAGE_PNG_TRANSPARENCY GFXON +// #define GDISP_NEED_IMAGE_PNG_BACKGROUND GFXON +// #define GDISP_NEED_IMAGE_PNG_ALPHACLIFF 32 +// #define GDISP_NEED_IMAGE_PNG_PALETTE_124 GFXON +// #define GDISP_NEED_IMAGE_PNG_PALETTE_8 GFXON +// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_124 GFXON +// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_8 GFXON +// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_16 GFXON +// #define GDISP_NEED_IMAGE_PNG_GRAYALPHA_8 GFXON +// #define GDISP_NEED_IMAGE_PNG_GRAYALPHA_16 GFXON +// #define GDISP_NEED_IMAGE_PNG_RGB_8 GFXON +// #define GDISP_NEED_IMAGE_PNG_RGB_16 GFXON +// #define GDISP_NEED_IMAGE_PNG_RGBALPHA_8 GFXON +// #define GDISP_NEED_IMAGE_PNG_RGBALPHA_16 GFXON +// #define GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE 32 +// #define GDISP_IMAGE_PNG_FILE_BUFFER_SIZE 8 +// #define GDISP_IMAGE_PNG_Z_BUFFER_SIZE 32768 +// #define GDISP_NEED_IMAGE_ACCOUNTING GFXOFF + +//#define GDISP_NEED_PIXMAP GFXOFF +// #define GDISP_NEED_PIXMAP_IMAGE GFXOFF + +//#define GDISP_DEFAULT_ORIENTATION gOrientationLandscape // If not defined the native hardware orientation is used. //#define GDISP_LINEBUF_SIZE 128 -//#define GDISP_STARTUP_COLOR Black -#define GDISP_NEED_STARTUP_LOGO FALSE +//#define GDISP_STARTUP_COLOR GFX_BLACK +#define GDISP_NEED_STARTUP_LOGO GFXOFF -//#define GDISP_TOTAL_DISPLAYS 2 +//#define GDISP_TOTAL_DISPLAYS 1 +//#define GDISP_DRIVER_LIST GDISPVMT_Win32, GDISPVMT_Win32 #ifdef GDISP_DRIVER_LIST -// For code and speed optimization define as TRUE or FALSE if all controllers have the same capability -# define GDISP_HARDWARE_STREAM_WRITE FALSE -# define GDISP_HARDWARE_STREAM_READ FALSE -# define GDISP_HARDWARE_STREAM_POS FALSE -# define GDISP_HARDWARE_DRAWPIXEL TRUE -# define GDISP_HARDWARE_CLEARS FALSE -# define GDISP_HARDWARE_FILLS FALSE -//#define GDISP_HARDWARE_BITFILLS FALSE -# define GDISP_HARDWARE_SCROLL FALSE -# define GDISP_HARDWARE_PIXELREAD TRUE -# define GDISP_HARDWARE_CONTROL TRUE -# define GDISP_HARDWARE_QUERY FALSE -# define GDISP_HARDWARE_CLIP FALSE +// // For code and speed optimization define as GFXON or GFXOFF if all controllers have the same capability +# define GDISP_HARDWARE_STREAM_WRITE GFXOFF +# define GDISP_HARDWARE_STREAM_READ GFXOFF +# define GDISP_HARDWARE_STREAM_POS GFXOFF +# define GDISP_HARDWARE_DRAWPIXEL GFXON +# define GDISP_HARDWARE_CLEARS GFXOFF +# define GDISP_HARDWARE_FILLS GFXOFF +//#define GDISP_HARDWARE_BITFILLS GFXOFF +# define GDISP_HARDWARE_SCROLL GFXOFF +# define GDISP_HARDWARE_PIXELREAD GFXON +# define GDISP_HARDWARE_CONTROL GFXON +# define GDISP_HARDWARE_QUERY GFXOFF +# define GDISP_HARDWARE_CLIP GFXOFF # define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB888 #endif -// The custom format is not defined for some reason, so define it as error -// so we don't get compiler warnings -#define GDISP_PIXELFORMAT_CUSTOM GDISP_PIXELFORMAT_ERROR - -#define GDISP_USE_GFXNET FALSE +#define GDISP_USE_GFXNET GFXOFF // #define GDISP_GFXNET_PORT 13001 -// #define GDISP_GFXNET_CUSTOM_LWIP_STARTUP FALSE -// #define GDISP_DONT_WAIT_FOR_NET_DISPLAY FALSE -// #define GDISP_GFXNET_UNSAFE_SOCKETS FALSE +// #define GDISP_GFXNET_CUSTOM_LWIP_STARTUP GFXOFF +// #define GDISP_DONT_WAIT_FOR_NET_DISPLAY GFXOFF +// #define GDISP_GFXNET_UNSAFE_SOCKETS GFXOFF /////////////////////////////////////////////////////////////////////////// // GWIN // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GWIN FALSE +#define GFX_USE_GWIN GFXOFF -//#define GWIN_NEED_WINDOWMANAGER FALSE -// #define GWIN_REDRAW_IMMEDIATE FALSE -// #define GWIN_REDRAW_SINGLEOP FALSE -// #define GWIN_NEED_FLASHING FALSE +//#define GWIN_NEED_WINDOWMANAGER GFXOFF +// #define GWIN_REDRAW_IMMEDIATE GFXOFF +// #define GWIN_REDRAW_SINGLEOP GFXOFF +// #define GWIN_NEED_FLASHING GFXOFF // #define GWIN_FLASHING_PERIOD 250 -//#define GWIN_NEED_CONSOLE FALSE -// #define GWIN_CONSOLE_USE_HISTORY FALSE -// #define GWIN_CONSOLE_HISTORY_AVERAGING FALSE -// #define GWIN_CONSOLE_HISTORY_ATCREATE FALSE -// #define GWIN_CONSOLE_ESCSEQ FALSE -// #define GWIN_CONSOLE_USE_BASESTREAM FALSE -// #define GWIN_CONSOLE_USE_FLOAT FALSE -//#define GWIN_NEED_GRAPH FALSE -//#define GWIN_NEED_GL3D FALSE - -//#define GWIN_NEED_WIDGET FALSE +//#define GWIN_NEED_CONSOLE GFXOFF +// #define GWIN_CONSOLE_USE_HISTORY GFXOFF +// #define GWIN_CONSOLE_HISTORY_AVERAGING GFXOFF +// #define GWIN_CONSOLE_HISTORY_ATCREATE GFXOFF +// #define GWIN_CONSOLE_ESCSEQ GFXOFF +// #define GWIN_CONSOLE_USE_BASESTREAM GFXOFF +// #define GWIN_CONSOLE_USE_FLOAT GFXOFF +//#define GWIN_NEED_GRAPH GFXOFF +//#define GWIN_NEED_GL3D GFXOFF + +//#define GWIN_NEED_WIDGET GFXOFF //#define GWIN_FOCUS_HIGHLIGHT_WIDTH 1 -// #define GWIN_NEED_LABEL FALSE -// #define GWIN_LABEL_ATTRIBUTE FALSE -// #define GWIN_NEED_BUTTON FALSE -// #define GWIN_BUTTON_LAZY_RELEASE FALSE -// #define GWIN_NEED_SLIDER FALSE -// #define GWIN_SLIDER_NOSNAP FALSE +// #define GWIN_NEED_LABEL GFXOFF +// #define GWIN_LABEL_ATTRIBUTE GFXOFF +// #define GWIN_NEED_BUTTON GFXOFF +// #define GWIN_BUTTON_LAZY_RELEASE GFXOFF +// #define GWIN_NEED_SLIDER GFXOFF +// #define GWIN_SLIDER_NOSNAP GFXOFF // #define GWIN_SLIDER_DEAD_BAND 5 // #define GWIN_SLIDER_TOGGLE_INC 20 -// #define GWIN_NEED_CHECKBOX FALSE -// #define GWIN_NEED_IMAGE FALSE -// #define GWIN_NEED_IMAGE_ANIMATION FALSE -// #define GWIN_NEED_RADIO FALSE -// #define GWIN_NEED_LIST FALSE -// #define GWIN_NEED_LIST_IMAGES FALSE -// #define GWIN_NEED_PROGRESSBAR FALSE -// #define GWIN_PROGRESSBAR_AUTO FALSE -// #define GWIN_NEED_KEYBOARD FALSE +// #define GWIN_NEED_CHECKBOX GFXOFF +// #define GWIN_NEED_IMAGE GFXOFF +// #define GWIN_NEED_IMAGE_ANIMATION GFXOFF +// #define GWIN_NEED_RADIO GFXOFF +// #define GWIN_NEED_LIST GFXOFF +// #define GWIN_NEED_LIST_IMAGES GFXOFF +// #define GWIN_NEED_PROGRESSBAR GFXOFF +// #define GWIN_PROGRESSBAR_AUTO GFXOFF +// #define GWIN_NEED_KEYBOARD GFXOFF // #define GWIN_KEYBOARD_DEFAULT_LAYOUT VirtualKeyboard_English1 -// #define GWIN_NEED_KEYBOARD_ENGLISH1 TRUE -// #define GWIN_NEED_TEXTEDIT FALSE -// #define GWIN_FLAT_STYLING FALSE -// #define GWIN_WIDGET_TAGS FALSE - -//#define GWIN_NEED_CONTAINERS FALSE -// #define GWIN_NEED_CONTAINER FALSE -// #define GWIN_NEED_FRAME FALSE -// #define GWIN_NEED_TABSET FALSE +// #define GWIN_NEED_KEYBOARD_ENGLISH1 GFXON +// #define GWIN_NEED_TEXTEDIT GFXOFF +// #define GWIN_FLAT_STYLING GFXOFF +// #define GWIN_WIDGET_TAGS GFXOFF + +//#define GWIN_NEED_CONTAINERS GFXOFF +// #define GWIN_NEED_CONTAINER GFXOFF +// #define GWIN_NEED_FRAME GFXOFF +// #define GWIN_NEED_TABSET GFXOFF // #define GWIN_TABSET_TABHEIGHT 18 +/////////////////////////////////////////////////////////////////////////// +// GTRANS // +/////////////////////////////////////////////////////////////////////////// +//#define GFX_USE_GTRANS GFXOFF + /////////////////////////////////////////////////////////////////////////// // GEVENT // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GEVENT TRUE +#define GFX_USE_GEVENT GFXON -//#define GEVENT_ASSERT_NO_RESOURCE FALSE +//#define GEVENT_ASSERT_NO_RESOURCE GFXOFF //#define GEVENT_MAXIMUM_SIZE 32 //#define GEVENT_MAX_SOURCE_LISTENERS 32 /////////////////////////////////////////////////////////////////////////// // GTIMER // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GTIMER FALSE +#define GFX_USE_GTIMER GFXOFF -//#define GTIMER_THREAD_PRIORITY HIGH_PRIORITY +//#define GTIMER_THREAD_PRIORITY gThreadpriorityHigh //#define GTIMER_THREAD_WORKAREA_SIZE 2048 /////////////////////////////////////////////////////////////////////////// // GQUEUE // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GQUEUE FALSE +#define GFX_USE_GQUEUE GFXOFF -//#define GQUEUE_NEED_ASYNC FALSE -//#define GQUEUE_NEED_GSYNC FALSE -//#define GQUEUE_NEED_FSYNC FALSE -//#define GQUEUE_NEED_BUFFERS FALSE +//#define GQUEUE_NEED_ASYNC GFXOFF +//#define GQUEUE_NEED_GSYNC GFXOFF +//#define GQUEUE_NEED_FSYNC GFXOFF +//#define GQUEUE_NEED_BUFFERS GFXOFF /////////////////////////////////////////////////////////////////////////// // GINPUT // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GINPUT FALSE +#define GFX_USE_GINPUT GFXOFF -//#define GINPUT_NEED_MOUSE FALSE -// #define GINPUT_TOUCH_STARTRAW FALSE -// #define GINPUT_TOUCH_NOTOUCH FALSE -// #define GINPUT_TOUCH_NOCALIBRATE FALSE -// #define GINPUT_TOUCH_NOCALIBRATE_GUI FALSE +//#define GINPUT_NEED_MOUSE GFXOFF +// #define GINPUT_TOUCH_STARTRAW GFXOFF +// #define GINPUT_TOUCH_NOTOUCH GFXOFF +// #define GINPUT_TOUCH_NOCALIBRATE GFXOFF +// #define GINPUT_TOUCH_NOCALIBRATE_GUI GFXOFF // #define GINPUT_MOUSE_POLL_PERIOD 25 // #define GINPUT_MOUSE_CLICK_TIME 300 // #define GINPUT_TOUCH_CXTCLICK_TIME 700 -// #define GINPUT_TOUCH_USER_CALIBRATION_LOAD FALSE -// #define GINPUT_TOUCH_USER_CALIBRATION_SAVE FALSE +// #define GINPUT_TOUCH_USER_CALIBRATION_LOAD GFXOFF +// #define GINPUT_TOUCH_USER_CALIBRATION_SAVE GFXOFF // #define GMOUSE_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32 -//#define GINPUT_NEED_KEYBOARD FALSE +// #define GINPUT_TOUCH_CALIBRATION_FONT1 "* Double" +// #define GINPUT_TOUCH_CALIBRATION_FONT2 "* Narrow" +// #define GINPUT_TOUCH_CALIBRATION_TITLE "Calibration" +// #define GINPUT_TOUCH_CALIBRATION_ERROR "Calibration Failed!" +//#define GINPUT_NEED_KEYBOARD GFXOFF // #define GINPUT_KEYBOARD_POLL_PERIOD 200 // #define GKEYBOARD_DRIVER_LIST GKEYBOARDVMT_Win32, GKEYBOARDVMT_Win32 -// #define GKEYBOARD_LAYOUT_OFF FALSE -// #define GKEYBOARD_LAYOUT_SCANCODE2_US FALSE -//#define GINPUT_NEED_TOGGLE FALSE -//#define GINPUT_NEED_DIAL FALSE +// #define GKEYBOARD_LAYOUT_OFF GFXOFF +// #define GKEYBOARD_LAYOUT_SCANCODE2_US GFXOFF +//#define GINPUT_NEED_TOGGLE GFXOFF +//#define GINPUT_NEED_DIAL GFXOFF /////////////////////////////////////////////////////////////////////////// // GFILE // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GFILE FALSE - -//#define GFILE_NEED_PRINTG FALSE -//#define GFILE_NEED_SCANG FALSE -//#define GFILE_NEED_STRINGS FALSE -//#define GFILE_NEED_FILELISTS FALSE -//#define GFILE_NEED_STDIO FALSE -//#define GFILE_NEED_NOAUTOMOUNT FALSE -//#define GFILE_NEED_NOAUTOSYNC FALSE - -//#define GFILE_NEED_MEMFS FALSE -//#define GFILE_NEED_ROMFS FALSE -//#define GFILE_NEED_RAMFS FALSE -//#define GFILE_NEED_FATFS FALSE -//#define GFILE_NEED_NATIVEFS FALSE -//#define GFILE_NEED_CHBIOSFS FALSE - -//#define GFILE_ALLOW_FLOATS FALSE -//#define GFILE_ALLOW_DEVICESPECIFIC FALSE +#define GFX_USE_GFILE GFXOFF + +//#define GFILE_NEED_PRINTG GFXOFF +//#define GFILE_NEED_SCANG GFXOFF +//#define GFILE_NEED_STRINGS GFXOFF +//#define GFILE_NEED_FILELISTS GFXOFF +//#define GFILE_NEED_STDIO GFXOFF +//#define GFILE_NEED_NOAUTOMOUNT GFXOFF +//#define GFILE_NEED_NOAUTOSYNC GFXOFF + +//#define GFILE_NEED_MEMFS GFXOFF +//#define GFILE_NEED_ROMFS GFXOFF +//#define GFILE_NEED_RAMFS GFXOFF +//#define GFILE_NEED_FATFS GFXOFF +//#define GFILE_NEED_NATIVEFS GFXOFF +//#define GFILE_NEED_CHBIOSFS GFXOFF +//#define GFILE_NEED_USERFS GFXOFF + +//#define GFILE_ALLOW_FLOATS GFXOFF +//#define GFILE_ALLOW_DEVICESPECIFIC GFXOFF //#define GFILE_MAX_GFILES 3 /////////////////////////////////////////////////////////////////////////// // GADC // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GADC FALSE - -//#define GADC_MAX_LOWSPEED_DEVICES 4 +#define GFX_USE_GADC GFXOFF +// #define GADC_MAX_LOWSPEED_DEVICES 4 /////////////////////////////////////////////////////////////////////////// // GAUDIO // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GAUDIO FALSE -// There seems to be a bug in the ugfx code, the wrong define is used -// So define it in order to avoid warnings -#define GFX_USE_GAUDIN GFX_USE_GAUDIO -// #define GAUDIO_NEED_PLAY FALSE -// #define GAUDIO_NEED_RECORD FALSE +#define GFX_USE_GAUDIO GFXOFF +// #define GAUDIO_NEED_PLAY GFXOFF +// #define GAUDIO_NEED_RECORD GFXOFF /////////////////////////////////////////////////////////////////////////// // GMISC // /////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GMISC TRUE - -//#define GMISC_NEED_ARRAYOPS FALSE -//#define GMISC_NEED_FASTTRIG FALSE -//#define GMISC_NEED_FIXEDTRIG FALSE -//#define GMISC_NEED_INVSQRT FALSE -// #define GMISC_INVSQRT_MIXED_ENDIAN FALSE -// #define GMISC_INVSQRT_REAL_SLOW FALSE -#define GMISC_NEED_MATRIXFLOAT2D TRUE -#define GMISC_NEED_MATRIXFIXED2D FALSE +#define GFX_USE_GMISC GFXON + +//#define GMISC_NEED_ARRAYOPS GFXOFF +//#define GMISC_NEED_FASTTRIG GFXOFF +//#define GMISC_NEED_FIXEDTRIG GFXOFF +//#define GMISC_NEED_INVSQRT GFXOFF +// #define GMISC_INVSQRT_MIXED_ENDIAN GFXOFF +// #define GMISC_INVSQRT_REAL_SLOW GFXOFF +#define GMISC_NEED_MATRIXFLOAT2D GFXON +#define GMISC_NEED_MATRIXFIXED2D GFXOFF +//#define GMISC_NEED_HITTEST_POLY GFXOFF #endif /* COMMON_GFXCONF_H */ diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c index 3f182e74d852..9e9cb6d41057 100644 --- a/quantum/visualizer/visualizer.c +++ b/quantum/visualizer/visualizer.c @@ -352,7 +352,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) { // On windows the system ticks is the same as milliseconds anyway if (sleep_time != TIME_INFINITE) { - sleep_time = ST2MS(sleep_time); + sleep_time = TIME_I2MS(sleep_time); } #endif geventEventWait(&event_listener, sleep_time); @@ -400,7 +400,7 @@ void update_status(bool changed) { static systime_t last_update = 0; systime_t current_update = chVTGetSystemTimeX(); systime_t delta = current_update - last_update; - if (changed || delta > MS2ST(10)) { + if (changed || delta > TIME_MS2I(10)) { last_update = current_update; visualizer_keyboard_status_t* r = begin_write_current_status(); *r = current_status; diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h index 7ca6837ce60a..488d130decdb 100644 --- a/quantum/visualizer/visualizer.h +++ b/quantum/visualizer/visualizer.h @@ -97,8 +97,8 @@ typedef struct visualizer_state_t { uint32_t current_lcd_color; uint32_t prev_lcd_color; #ifdef LCD_ENABLE - font_t font_fixed5x8; - font_t font_dejavusansbold12; + gFont font_fixed5x8; + gFont font_dejavusansbold12; #endif } visualizer_state_t; diff --git a/readme.md b/readme.md index 6092f209be1a..6fba4ba231fe 100644 --- a/readme.md +++ b/readme.md @@ -7,6 +7,12 @@ [![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) [![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) +# THIS IS THE FUTURE BRANCH + +Warning- This is the `future` branch of QMK Firmware. You may encounter broken code here. Please see [Breaking Changes](https://docs.qmk.fm/#/breaking_changes) for more information. + +# Original readme continues + This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](https://olkb.com), the [ErgoDox EZ](https://ergodox-ez.com) keyboard, and the [Clueboard product line](https://clueboard.co). ## Documentation diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index f9e52aed23ec..73c01c7b4817 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -110,6 +110,8 @@ 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 ifneq ("$(wildcard $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld else LDSCRIPT = $(STARTUPLD)/$(MCU_LDSCRIPT).ld endif @@ -120,17 +122,18 @@ CHIBISRC = $(STARTUPSRC) \ $(OSALSRC) \ $(HALSRC) \ $(PLATFORMSRC) \ + $(PLATFORMSRC_CONTRIB) \ $(BOARDSRC) \ - $(STREAMSSRC) \ - $(STARTUPASM) \ - $(PORTASM) \ - $(OSALASM) + $(STREAMSSRC) + +# Ensure the ASM files are not subjected to LTO -- it'll strip out interrupt handlers otherwise. +QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM) CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC)) -EXTRAINCDIRS += $(CHIBIOS)/os/license \ +EXTRAINCDIRS += $(CHIBIOS)/os/license $(CHIBIOS)/os/oslib/include \ $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ - $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ + $(HALINC) $(PLATFORMINC) $(PLATFORMINC_CONTRIB) $(BOARDINC) $(TESTINC) \ $(STREAMSINC) $(CHIBIOS)/os/various $(COMMON_VPATH) # @@ -179,6 +182,9 @@ LDFLAGS += -Wl,--script=$(LDSCRIPT)$(LDSYMBOLS) OPT_DEFS += -DPROTOCOL_CHIBIOS +# Workaround to stop ChibiOS from complaining about new GCC -- it's been fixed for 7/8/9 already +OPT_DEFS += -DPORT_IGNORE_GCC_VERSION_CHECK=1 + MCUFLAGS = -mcpu=$(MCU) # FPU options default (Cortex-M4 and Cortex-M7 single precision). diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 5f149d8f4dc7..24b764800f48 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -172,11 +172,16 @@ ifeq ($(strip $(LTO_ENABLE)), yes) endif ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes) + ifeq ($(PLATFORM),CHIBIOS) + $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.) + $(info If unsure, set LINK_TIME_OPTIMIZATION_ENABLE = no.) + endif EXTRAFLAGS += -flto TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE TMK_COMMON_DEFS += -DNO_ACTION_MACRO TMK_COMMON_DEFS += -DNO_ACTION_FUNCTION endif + # Bootloader address ifdef STM32_BOOTLOADER_ADDRESS TMK_COMMON_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index d572b7056449..0ec4a43eee78 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -561,32 +561,6 @@ void process_action(keyrecord_t *record, action_t action) { case ACT_MACRO: action_macro_play(action_get_macro(record, action.func.id, action.func.opt)); break; -#endif -#if defined(BACKLIGHT_ENABLE) || defined(LED_MATRIX_ENABLE) - case ACT_BACKLIGHT: - if (!event.pressed) { - switch (action.backlight.opt) { - case BACKLIGHT_INCREASE: - backlight_increase(); - break; - case BACKLIGHT_DECREASE: - backlight_decrease(); - break; - case BACKLIGHT_TOGGLE: - backlight_toggle(); - break; - case BACKLIGHT_STEP: - backlight_step(); - break; - case BACKLIGHT_ON: - backlight_level(BACKLIGHT_LEVELS); - break; - case BACKLIGHT_OFF: - backlight_level(0); - break; - } - } - break; #endif case ACT_COMMAND: break; diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index 03fcb3382bbb..6c005b76d149 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h @@ -86,8 +86,7 @@ along with this program. If not, see . * 1100|opt | id(8) Macro play? * 1100|1111| id(8) Macro record? * - * ACT_BACKLIGHT(1101): - * 1101|opt |level(8) Backlight commands + * 1101|xxxx xxxx xxxx (reserved) * * ACT_COMMAND(1110): * 1110|opt | id(8) Built-in Command exec @@ -115,10 +114,9 @@ enum action_kind_id { ACT_LAYER_TAP = 0b1010, /* Layer 0-15 */ ACT_LAYER_TAP_EXT = 0b1011, /* Layer 16-31 */ /* Extensions */ - ACT_MACRO = 0b1100, - ACT_BACKLIGHT = 0b1101, - ACT_COMMAND = 0b1110, - ACT_FUNCTION = 0b1111 + ACT_MACRO = 0b1100, + ACT_COMMAND = 0b1110, + ACT_FUNCTION = 0b1111 }; /** \brief Action Code Struct @@ -169,11 +167,6 @@ typedef union { uint8_t page : 2; uint8_t kind : 4; } usage; - struct action_backlight { - uint8_t level : 8; - uint8_t opt : 4; - uint8_t kind : 4; - } backlight; struct action_command { uint8_t id : 8; uint8_t opt : 4; @@ -290,28 +283,10 @@ enum layer_param_tap_op { #define ACTION_DEFAULT_LAYER_BIT_XOR(part, bits) ACTION_LAYER_BITOP(OP_BIT_XOR, (part), (bits), 0) #define ACTION_DEFAULT_LAYER_BIT_SET(part, bits) ACTION_LAYER_BITOP(OP_BIT_SET, (part), (bits), 0) -/** \brief Extensions - */ -enum backlight_opt { - BACKLIGHT_INCREASE = 0, - BACKLIGHT_DECREASE = 1, - BACKLIGHT_TOGGLE = 2, - BACKLIGHT_STEP = 3, - BACKLIGHT_ON = 4, - BACKLIGHT_OFF = 5, -}; - /* Macro */ #define ACTION_MACRO(id) ACTION(ACT_MACRO, (id)) #define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP << 8 | (id)) #define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt) << 8 | (id)) -/* Backlight */ -#define ACTION_BACKLIGHT_INCREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_INCREASE << 8) -#define ACTION_BACKLIGHT_DECREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE << 8) -#define ACTION_BACKLIGHT_TOGGLE() ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE << 8) -#define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8) -#define ACTION_BACKLIGHT_ON() ACTION(ACT_BACKLIGHT, BACKLIGHT_ON << 8) -#define ACTION_BACKLIGHT_OFF() ACTION(ACT_BACKLIGHT, BACKLIGHT_OFF << 8) /* Command */ #define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt) << 8 | (id)) /* Function */ diff --git a/tmk_core/common/chibios/timer.c b/tmk_core/common/chibios/timer.c index ed5cfe1b055e..ac5a5af63822 100644 --- a/tmk_core/common/chibios/timer.c +++ b/tmk_core/common/chibios/timer.c @@ -2,30 +2,44 @@ #include "timer.h" -static systime_t last_systime = 0; -static systime_t overflow = 0; -static uint32_t current_time_ms = 0; +static uint32_t reset_point = 0; +#if CH_CFG_ST_RESOLUTION < 32 +static uint32_t last_systime = 0; +static uint32_t overflow = 0; +#endif void timer_init(void) { timer_clear(); } void timer_clear(void) { - last_systime = chVTGetSystemTime(); - overflow = 0; - current_time_ms = 0; + reset_point = (uint32_t)chVTGetSystemTime(); +#if CH_CFG_ST_RESOLUTION < 32 + last_systime = reset_point; + overflow = 0; +#endif } uint16_t timer_read(void) { return (uint16_t)timer_read32(); } uint32_t timer_read32(void) { - // Note: We assume that the timer update is called at least once betweeen every wrap around of the system time - systime_t current_systime = chVTGetSystemTime(); - systime_t elapsed = current_systime - last_systime + overflow; - uint32_t elapsed_ms = ST2MS(elapsed); - current_time_ms += elapsed_ms; - overflow = elapsed - MS2ST(elapsed_ms); - last_systime = current_systime; - - return current_time_ms; + uint32_t systime = (uint32_t)chVTGetSystemTime(); + +#if CH_CFG_ST_RESOLUTION < 32 + // If/when we need to support 64-bit chips, this may need to be modified to match the native bit-ness of the MCU. + // At this point, the only SysTick resolution allowed other than 32 is 16 bit. + // In the 16-bit case, at: + // - CH_CFG_ST_FREQUENCY = 100000, overflow will occur every ~0.65 seconds + // - CH_CFG_ST_FREQUENCY = 10000, overflow will occur every ~6.5 seconds + // - CH_CFG_ST_FREQUENCY = 1000, overflow will occur every ~65 seconds + // With this implementation, as long as we ensure a timer read happens at least once during the overflow period, timing should be accurate. + if (systime < last_systime) { + overflow += ((uint32_t)1) << CH_CFG_ST_RESOLUTION; + } + + last_systime = systime; + return (uint32_t)TIME_I2MS(systime - reset_point + overflow); +#else + return (uint32_t)TIME_I2MS(systime - reset_point); +#endif } uint16_t timer_elapsed(uint16_t last) { return TIMER_DIFF_16(timer_read(), last); } diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index 900de5410311..77a205eac4cb 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -153,6 +153,9 @@ static void print_version(void) { print("BUILD: (" __DATE__ ")\n"); #else print("BUILD: " STR(QMK_VERSION) " (" __TIME__ " " __DATE__ ")\n"); +# ifdef PROTOCOL_CHIBIOS + print("CHIBIOS: " STR(CHIBIOS_VERSION) ", CONTRIB: " STR(CHIBIOS_CONTRIB_VERSION) "\n"); +# endif #endif /* build options */ @@ -182,6 +185,9 @@ static void print_version(void) { #ifdef NKRO_ENABLE " NKRO" #endif +#ifdef LINK_TIME_OPTIMIZATION_ENABLE + " LTO" +#endif " " STR(BOOTLOADER_SIZE) "\n"); diff --git a/tmk_core/common/timer.h b/tmk_core/common/timer.h index 378cf7892c1c..bbaae109d0f3 100644 --- a/tmk_core/common/timer.h +++ b/tmk_core/common/timer.h @@ -45,9 +45,8 @@ uint16_t timer_elapsed(uint16_t last); uint32_t timer_elapsed32(uint32_t last); // Utility functions to check if a future time has expired & autmatically handle time wrapping if checked / reset frequently (half of max value) -inline bool timer_expired(uint16_t current, uint16_t future) { return (uint16_t)(current - future) < 0x8000; } - -inline bool timer_expired32(uint32_t current, uint32_t future) { return (uint32_t)(current - future) < 0x80000000; } +#define timer_expired(current, future) (((uint16_t)current - (uint16_t)future) < 0x8000) +#define timer_expired32(current, future) (((uint32_t)current - (uint32_t)future) < 0x80000000) #ifdef __cplusplus } diff --git a/tmk_core/protocol/chibios.mk b/tmk_core/protocol/chibios.mk index 222fb4dad41d..2070420f56b8 100644 --- a/tmk_core/protocol/chibios.mk +++ b/tmk_core/protocol/chibios.mk @@ -6,6 +6,7 @@ SRC += $(CHIBIOS_DIR)/usb_main.c SRC += $(CHIBIOS_DIR)/main.c SRC += usb_descriptor.c SRC += $(CHIBIOS_DIR)/usb_driver.c +SRC += $(LIBSRC) VPATH += $(TMK_PATH)/$(PROTOCOL_DIR) VPATH += $(TMK_PATH)/$(CHIBIOS_DIR) diff --git a/tmk_core/protocol/chibios/usb_driver.c b/tmk_core/protocol/chibios/usb_driver.c index 28a8c666355d..22d3c91f5a38 100644 --- a/tmk_core/protocol/chibios/usb_driver.c +++ b/tmk_core/protocol/chibios/usb_driver.c @@ -88,15 +88,15 @@ static msg_t _put(void *ip, uint8_t b) { return obqPutTimeout(&((QMKUSBDriver *) static msg_t _get(void *ip) { return ibqGetTimeout(&((QMKUSBDriver *)ip)->ibqueue, TIME_INFINITE); } -static msg_t _putt(void *ip, uint8_t b, systime_t timeout) { return obqPutTimeout(&((QMKUSBDriver *)ip)->obqueue, b, timeout); } +static msg_t _putt(void *ip, uint8_t b, sysinterval_t timeout) { return obqPutTimeout(&((QMKUSBDriver *)ip)->obqueue, b, timeout); } -static msg_t _gett(void *ip, systime_t timeout) { return ibqGetTimeout(&((QMKUSBDriver *)ip)->ibqueue, timeout); } +static msg_t _gett(void *ip, sysinterval_t timeout) { return ibqGetTimeout(&((QMKUSBDriver *)ip)->ibqueue, timeout); } -static size_t _writet(void *ip, const uint8_t *bp, size_t n, systime_t timeout) { return obqWriteTimeout(&((QMKUSBDriver *)ip)->obqueue, bp, n, timeout); } +static size_t _writet(void *ip, const uint8_t *bp, size_t n, sysinterval_t timeout) { return obqWriteTimeout(&((QMKUSBDriver *)ip)->obqueue, bp, n, timeout); } -static size_t _readt(void *ip, uint8_t *bp, size_t n, systime_t timeout) { return ibqReadTimeout(&((QMKUSBDriver *)ip)->ibqueue, bp, n, timeout); } +static size_t _readt(void *ip, uint8_t *bp, size_t n, sysinterval_t timeout) { return ibqReadTimeout(&((QMKUSBDriver *)ip)->ibqueue, bp, n, timeout); } -static const struct QMKUSBDriverVMT vmt = {_write, _read, _put, _get, _putt, _gett, _writet, _readt}; +static const struct QMKUSBDriverVMT vmt = {0, _write, _read, _put, _get, _putt, _gett, _writet, _readt}; /** * @brief Notification of empty buffer released into the input buffers queue. diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index ec95167cf6d3..ecc83d9ecc94 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -469,7 +469,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) { #endif /* NKRO_ENABLE */ /* arm the idle timer if boot protocol & idle */ osalSysLockFromISR(); - chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); + chVTSetI(&keyboard_idle_timer, 4 * TIME_MS2I(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); osalSysUnlockFromISR(); } } @@ -486,7 +486,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) { if (keyboard_idle) { #endif /* NKRO_ENABLE */ osalSysLockFromISR(); - chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); + chVTSetI(&keyboard_idle_timer, 4 * TIME_MS2I(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); osalSysUnlockFromISR(); } usbSetupTransfer(usbp, NULL, 0, NULL); @@ -601,7 +601,7 @@ static void keyboard_idle_timer_cb(void *arg) { usbStartTransmitI(usbp, KEYBOARD_IN_EPNUM, (uint8_t *)&keyboard_report_sent, KEYBOARD_EPSIZE); } /* rearm the timer */ - chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); + chVTSetI(&keyboard_idle_timer, 4 * TIME_MS2I(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); } /* do not rearm the timer if the condition above fails @@ -700,7 +700,7 @@ void send_mouse(report_mouse_t *report) { * 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 */ - if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[MOUSE_IN_EPNUM]->in_state->thread, MS2ST(10)) == MSG_TIMEOUT) { + if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[MOUSE_IN_EPNUM]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) { osalSysUnlock(); return; } diff --git a/util/chibios-upgrader.sh b/util/chibios-upgrader.sh new file mode 100755 index 000000000000..4f271259572a --- /dev/null +++ b/util/chibios-upgrader.sh @@ -0,0 +1,172 @@ +#!/bin/bash + +set -eEuo pipefail +umask 022 + +sinfo() { echo "$@" >&2 ; } +shead() { sinfo "" ; sinfo "---------------------------------" ; sinfo "-- $@" ; sinfo "---------------------------------" ; } +havecmd() { command command type "${1}" >/dev/null 2>&1 || return 1 ; } + +this_script="$(realpath "${BASH_SOURCE[0]}")" +script_dir="$(realpath "$(dirname "$this_script")")" +qmk_firmware_dir="$(realpath "$script_dir/../")" + +declare -A file_hashes + +export PATH="$PATH:$script_dir/fmpp/bin" + +build_fmpp() { + [ -f "$script_dir/fmpp.tar.gz" ] \ + || wget -O"$script_dir/fmpp.tar.gz" https://github.com/freemarker/fmpp/archive/v0.9.16.tar.gz + [ -d "$script_dir/fmpp" ] \ + || { mkdir "$script_dir/fmpp" && tar xf "$script_dir/fmpp.tar.gz" -C "$script_dir/fmpp" --strip-components=1 ; } + pushd "$script_dir/fmpp" >/dev/null 2>&1 + sed -e "s#bootclasspath.path=.*#bootclasspath.path=$(find /usr/lib/jvm -name 'rt.jar' | sort | tail -n1)#g" \ + -e "s#ant.jar.path=.*#ant.jar.path=$(find /usr/share/java -name 'ant-1*.jar' | sort | tail -n1)#g" \ + build.properties.sample > build.properties + sed -e 's#source="1.5"#source="1.8"#g' \ + -e 's#target="1.5"#target="1.8"#g' \ + build.xml > build.xml.new + mv build.xml.new build.xml + ant clean + ant + chmod +x "$script_dir/fmpp/bin/fmpp" + popd >/dev/null 2>&1 +} + +find_chibi_files() { + local search_path="$1" + shift + local conditions=( "$@" ) + find "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort +} + +revert_chibi_files() { + local search_path="$1" + shead "Reverting ChibiOS config/board files..." + for file in $(find_chibi_files "$search_path" -name chconf.h -or -name halconf.h -or -name mcuconf.h -or -name board.c -or -name board.h -or -name board.mk -or -name board.chcfg) ; do + pushd "$search_path" >/dev/null 2>&1 + local relpath=$(realpath --relative-to="$search_path" "$file") + git checkout upstream/master -- "$relpath" || git checkout origin/master -- "$relpath" || true + popd >/dev/null 2>&1 + done +} + +populate_file_hashes() { + local search_path="$1" + shead "Determining duplicate config/board files..." + for file in $(find_chibi_files "$search_path" -name chconf.h -or -name halconf.h -or -name mcuconf.h -or -name board.c -or -name board.h) ; do + local key="file_$(clang-format "$file" | sha1sum | cut -d' ' -f1)" + local relpath=$(realpath --relative-to="$search_path" "$file") + file_hashes[$key]="${file_hashes[$key]:-} $relpath" + done + for file in $(find_chibi_files "$search_path" -name board.mk -or -name board.chcfg) ; do + local key="file_$(cat "$file" | sha1sum | cut -d' ' -f1)" + local relpath=$(realpath --relative-to="$search_path" "$file") + file_hashes[$key]="${file_hashes[$key]:-} $relpath" + done +} + +determine_equivalent_files() { + local search_file="$1" + for K in "${!file_hashes[@]}"; do + for V in ${file_hashes[$K]}; do + if [[ "$V" == "$search_file" ]] ; then + for V in ${file_hashes[$K]}; do + echo "$V" + done + return 0 + fi + done + done + return 1 +} + +deploy_staged_files() { + shead "Deploying staged files..." + for file in $(find "$qmk_firmware_dir/util/chibios-upgrade-staging" -type f) ; do + local relpath=$(realpath --relative-to="$qmk_firmware_dir/util/chibios-upgrade-staging" "$file") + sinfo "Deploying staged file: $relpath" + for other in $(determine_equivalent_files "$relpath") ; do + sinfo " => $other" + cp "$qmk_firmware_dir/util/chibios-upgrade-staging/$relpath" "$qmk_firmware_dir/$other" + done + done +} + +swap_mcuconf_f3xx_f303() { + shead "Swapping STM32F3xx_MCUCONF -> STM32F303_MCUCONF..." + for file in $(find_chibi_files "$qmk_firmware_dir" -name mcuconf.h) ; do + sed -i 's#STM32F3xx_MCUCONF#STM32F303_MCUCONF#g' "$file" + dos2unix "$file" >/dev/null 2>&1 + done +} + +upgrade_conf_files_generic() { + local search_filename="$1" + local update_script="$2" + shead "Updating $search_filename files ($update_script)..." + pushd "$qmk_firmware_dir/lib/chibios/tools/updater" >/dev/null 2>&1 + for file in $(find_chibi_files "$qmk_firmware_dir" -name "$search_filename") ; do + cp -f "$file" "$file.orig" + clang-format --style='{IndentPPDirectives: None}' -i "$file" + cp -f "$file" "$file.formatted" + bash "$update_script" "$file" + if ! diff "$file" "$file.formatted" >/dev/null 2>&1 ; then + dos2unix "$file" >/dev/null 2>&1 + else + cp -f "$file.orig" "$file" + fi + rm -f "$file.orig" "$file.formatted" + done + popd >/dev/null 2>&1 +} + +upgrade_chconf_files() { + upgrade_conf_files_generic chconf.h update_chconf_rt.sh +} + +upgrade_halconf_files() { + upgrade_conf_files_generic halconf.h update_halconf.sh +} + +upgrade_mcuconf_files() { + pushd "$qmk_firmware_dir/lib/chibios/tools/updater" >/dev/null 2>&1 + for f in $(find . -name 'update_mcuconf*') ; do + upgrade_conf_files_generic mcuconf.h $f + done + popd >/dev/null 2>&1 +} + +update_staged_files() { + shead "Updating staged files with ChibiOS upgraded versions..." + for file in $(find "$qmk_firmware_dir/util/chibios-upgrade-staging" -type f) ; do + local relpath=$(realpath --relative-to="$qmk_firmware_dir/util/chibios-upgrade-staging" "$file") + sinfo "Updating staged file: $relpath" + cp "$qmk_firmware_dir/$relpath" "$qmk_firmware_dir/util/chibios-upgrade-staging/$relpath" + done +} + +havecmd fmpp || build_fmpp +revert_chibi_files "$qmk_firmware_dir" +populate_file_hashes "$qmk_firmware_dir" + +shead "Showing duplicate ChibiOS files..." +for K in "${!file_hashes[@]}"; do + sinfo ${K#file_}: + for V in ${file_hashes[$K]}; do + sinfo " $V" + done +done + +if [ "${1:-}" == "-r" ] ; then + exit 0 +fi + +swap_mcuconf_f3xx_f303 + +deploy_staged_files +upgrade_mcuconf_files +upgrade_chconf_files +upgrade_halconf_files +update_staged_files From cae91510dc488bf81d8497252d58014353093872 Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 29 Feb 2020 12:30:38 -0800 Subject: [PATCH 542/973] Breaking Changes documentation fixes --- docs/breaking_changes.md | 15 ++++++++------- readme.md | 6 ------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index f2122ffa4420..280a302bafd6 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -6,20 +6,21 @@ The breaking change period is when we will merge PR's that change QMK in dangero ## What has been included in past Breaking Changes? +* [2020 Feb 29](ChangeLog/20200229.md) * [2019 Aug 30](ChangeLog/20190830.md) ## When is the next Breaking Change? -The next Breaking Change is scheduled for February 29, 2020. +The next Breaking Change is scheduled for May 30, 2020. ### Important Dates -* [x] 2019 Sep 21 - `future` is created. It will be rebased weekly. -* [x] 2020 Feb 1 - `future` closed to new PR's. -* [x] 2020 Feb 1 - Call for testers. -* [x] 2020 Feb 27 - `master` is locked, no PR's merged. -* [ ] 2020 Feb 29 - Merge `future` to `master`. -* [ ] 2020 Feb 29 - `master` is unlocked. PR's can be merged again. +* [x] 2019 Feb 29 - `future` is created. It will be rebased weekly. +* [ ] 2020 May 2 - `future` closed to new PR's. +* [ ] 2020 May 2 - Call for testers. +* [ ] 2020 May 28 - `master` is locked, no PR's merged. +* [ ] 2020 May 30 - Merge `future` to `master`. +* [ ] 2020 May 30 - `master` is unlocked. PR's can be merged again. ## What changes will be included? diff --git a/readme.md b/readme.md index 6fba4ba231fe..6092f209be1a 100644 --- a/readme.md +++ b/readme.md @@ -7,12 +7,6 @@ [![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) [![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) -# THIS IS THE FUTURE BRANCH - -Warning- This is the `future` branch of QMK Firmware. You may encounter broken code here. Please see [Breaking Changes](https://docs.qmk.fm/#/breaking_changes) for more information. - -# Original readme continues - This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](https://olkb.com), the [ErgoDox EZ](https://ergodox-ez.com) keyboard, and the [Clueboard product line](https://clueboard.co). ## Documentation From 8d9c800da0cfcf109f264b695123b55282bc52df Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 29 Feb 2020 22:45:21 +0000 Subject: [PATCH 543/973] Unconditionally enable ChibiOS syscalls (#8268) * Enable syscalls all the time * fix whitespace --- tmk_core/chibios.mk | 3 ++- tmk_core/common.mk | 14 ++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 73c01c7b4817..d447bc13eec4 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -124,7 +124,8 @@ CHIBISRC = $(STARTUPSRC) \ $(PLATFORMSRC) \ $(PLATFORMSRC_CONTRIB) \ $(BOARDSRC) \ - $(STREAMSSRC) + $(STREAMSSRC) \ + $(CHIBIOS)/os/various/syscalls.c # Ensure the ASM files are not subjected to LTO -- it'll strip out interrupt handlers otherwise. QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM) diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 24b764800f48..6863929cee50 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -27,22 +27,12 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \ ifeq ($(PLATFORM),AVR) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S -endif - -ifeq ($(PLATFORM),CHIBIOS) +else ifeq ($(PLATFORM),CHIBIOS) 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) - TMK_COMMON_SRC += $(CHIBIOS)/os/various/syscalls.c - endif -endif - -ifeq ($(PLATFORM),ARM_ATSAM) +else ifeq ($(PLATFORM),ARM_ATSAM) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c endif - # Option modules BOOTMAGIC_ENABLE ?= no VALID_MAGIC_TYPES := yes full lite From c775104b9f60d738fd69166da33972d60034c639 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 1 Mar 2020 00:49:16 +0000 Subject: [PATCH 544/973] Use nano specs (#8270) --- tmk_core/chibios.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index d447bc13eec4..358c3d099c0c 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -180,6 +180,7 @@ LDFLAGS += -mno-thumb-interwork -mthumb LDSYMBOLS =,--defsym=__process_stack_size__=$(USE_PROCESS_STACKSIZE) LDSYMBOLS :=$(LDSYMBOLS),--defsym=__main_stack_size__=$(USE_EXCEPTIONS_STACKSIZE) LDFLAGS += -Wl,--script=$(LDSCRIPT)$(LDSYMBOLS) +LDFLAGS += --specs=nano.specs OPT_DEFS += -DPROTOCOL_CHIBIOS From d0c3acbe3e58c1ad8bc74a8a53522cbe523eea53 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 1 Mar 2020 11:50:49 +1100 Subject: [PATCH 545/973] Allow for ChibiOS 20.x (master), as well as enabling ChibiOS-Contrib HAL. (#8272) --- drivers/boards/ld/MK20DX256.ld | 101 ----------------- keyboards/handwired/bluepill/ld/MKL26Z64.ld | 105 ------------------ keyboards/handwired/onekey/teensy_lc/rules.mk | 1 + tmk_core/chibios.mk | 30 ++++- util/chibios-upgrader.sh | 2 +- 5 files changed, 29 insertions(+), 210 deletions(-) delete mode 100644 drivers/boards/ld/MK20DX256.ld delete mode 100644 keyboards/handwired/bluepill/ld/MKL26Z64.ld diff --git a/drivers/boards/ld/MK20DX256.ld b/drivers/boards/ld/MK20DX256.ld deleted file mode 100644 index 66bc6b81e28b..000000000000 --- a/drivers/boards/ld/MK20DX256.ld +++ /dev/null @@ -1,101 +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. - */ - -/* - * MK20DX256 memory setup. - */ -MEMORY -{ - flash0 : org = 0x00000000, len = 0x400 - flash1 : org = 0x00000400, len = 0x10 - flash2 : org = 0x00000410, len = 256k - 0x410 - 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 = 0x1FFF8000, len = 64k - 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); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/keyboards/handwired/bluepill/ld/MKL26Z64.ld b/keyboards/handwired/bluepill/ld/MKL26Z64.ld deleted file mode 100644 index c4ca8b874cca..000000000000 --- a/keyboards/handwired/bluepill/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/handwired/onekey/teensy_lc/rules.mk b/keyboards/handwired/onekey/teensy_lc/rules.mk index c30730725275..b3daabe317d9 100644 --- a/keyboards/handwired/onekey/teensy_lc/rules.mk +++ b/keyboards/handwired/onekey/teensy_lc/rules.mk @@ -1,5 +1,6 @@ # MCU name MCU = MKL26Z64 +USE_CHIBIOS_CONTRIB = yes # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 358c3d099c0c..577603080b17 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -80,7 +80,8 @@ ifeq ("$(wildcard $(BOARD_MK))","") endif include $(BOARD_MK) -include $(CHIBIOS)/os/hal/osal/rt/osal.mk +-include $(CHIBIOS)/os/hal/osal/rt/osal.mk # ChibiOS <= 19.x +-include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # ChibiOS >= 20.x # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk # Compability with old version @@ -112,6 +113,7 @@ else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/ld/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(TOP_DIR)/drivers/boards/ld/$(MCU_LDSCRIPT).ld else ifneq ("$(wildcard $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld + USE_CHIBIOS_CONTRIB = yes else LDSCRIPT = $(STARTUPLD)/$(MCU_LDSCRIPT).ld endif @@ -122,7 +124,6 @@ CHIBISRC = $(STARTUPSRC) \ $(OSALSRC) \ $(HALSRC) \ $(PLATFORMSRC) \ - $(PLATFORMSRC_CONTRIB) \ $(BOARDSRC) \ $(STREAMSSRC) \ $(CHIBIOS)/os/various/syscalls.c @@ -134,9 +135,32 @@ CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC)) EXTRAINCDIRS += $(CHIBIOS)/os/license $(CHIBIOS)/os/oslib/include \ $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ - $(HALINC) $(PLATFORMINC) $(PLATFORMINC_CONTRIB) $(BOARDINC) $(TESTINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(STREAMSINC) $(CHIBIOS)/os/various $(COMMON_VPATH) +# +# ChibiOS-Contrib +############################################################################## + +# Work out if we're using ChibiOS-Contrib by checking if halconf_community.h exists +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +endif + +ifeq ($(strip $(USE_CHIBIOS_CONTRIB)),yes) + include $(CHIBIOS_CONTRIB)/os/hal/hal.mk + CHIBISRC += $(PLATFORMSRC_CONTRIB) $(HALSRC_CONTRIB) + EXTRAINCDIRS += $(PLATFORMINC_CONTRIB) $(HALINC_CONTRIB) $(CHIBIOS_CONTRIB)/os/various +endif + # # Project, sources and paths ############################################################################## diff --git a/util/chibios-upgrader.sh b/util/chibios-upgrader.sh index 4f271259572a..2174da3cf133 100755 --- a/util/chibios-upgrader.sh +++ b/util/chibios-upgrader.sh @@ -38,7 +38,7 @@ find_chibi_files() { local search_path="$1" shift local conditions=( "$@" ) - find "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort + find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort } revert_chibi_files() { From f5d1409c26582a2751e36f5fd93c4c19c67b9201 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 1 Mar 2020 11:51:38 +1100 Subject: [PATCH 546/973] Track master branches for lib/chibios, lib/chibios-contrib, lib/ugfx. (#8273) --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitmodules b/.gitmodules index 930fa0e75b24..6d8ab8b94633 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,15 @@ [submodule "lib/chibios"] path = lib/chibios url = https://github.com/qmk/ChibiOS + branch = master [submodule "lib/chibios-contrib"] path = lib/chibios-contrib url = https://github.com/qmk/ChibiOS-Contrib + branch = master [submodule "lib/ugfx"] path = lib/ugfx url = https://github.com/qmk/uGFX + branch = master [submodule "lib/googletest"] path = lib/googletest url = https://github.com/google/googletest From bb472364909aa8ad0ff8efb76a428df2960e1a7c Mon Sep 17 00:00:00 2001 From: holtenc Date: Sat, 29 Feb 2020 19:42:50 -0600 Subject: [PATCH 547/973] Add VIA support to Prime_M. Clean up all files (#8247) * Add VIA support for Prime_L * Update keyboards/primekb/prime_l/v1/config.h * Add prime_exl_plus keyboard * Temporary removal of prime_exl_plus * Add Prime_EXL Plus, including VIA support * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/rules.mk * Update keyboards/handwired/prime_exl_plus/info.json * Update keyboards/handwired/prime_exl_plus/info.json * Update keyboards/handwired/prime_exl_plus/info.json * Update keymap.c * correct spacing of keymaps and layout macro. move indicator logic from user space to keyboard space * further corrections to keymaps and layout macro. * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update prime_exl_plus.c * small edit to prime_exl_plus.c * Add via support to Prime_M and clean things up * Update rules.mk * Update keyboards/primekb/prime_m/readme.md * Update keyboards/primekb/prime_m/readme.md * Update keyboards/primekb/prime_m/config.h --- keyboards/primekb/prime_m/config.h | 5 +- .../primekb/prime_m/keymaps/default/config.h | 19 ------- .../primekb/prime_m/keymaps/default/keymap.c | 40 --------------- .../primekb/prime_m/keymaps/default/readme.md | 2 +- .../primekb/prime_m/keymaps/numpad/config.h | 19 ------- .../primekb/prime_m/keymaps/numpad/readme.md | 2 +- .../primekb/prime_m/keymaps/via/keymap.c | 51 +++++++++++++++++++ .../primekb/prime_m/keymaps/via/readme.md | 1 + .../primekb/prime_m/keymaps/via/rules.mk | 1 + keyboards/primekb/prime_m/prime_m.c | 28 +--------- keyboards/primekb/prime_m/readme.md | 7 +-- keyboards/primekb/prime_m/rules.mk | 24 ++++----- 12 files changed, 75 insertions(+), 124 deletions(-) delete mode 100644 keyboards/primekb/prime_m/keymaps/default/config.h delete mode 100644 keyboards/primekb/prime_m/keymaps/numpad/config.h create mode 100644 keyboards/primekb/prime_m/keymaps/via/keymap.c create mode 100644 keyboards/primekb/prime_m/keymaps/via/readme.md create mode 100644 keyboards/primekb/prime_m/keymaps/via/rules.mk diff --git a/keyboards/primekb/prime_m/config.h b/keyboards/primekb/prime_m/config.h index 75731abf78f8..55c470b8036a 100644 --- a/keyboards/primekb/prime_m/config.h +++ b/keyboards/primekb/prime_m/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 @@ -20,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 0x4024 +#define VENDOR_ID 0x5052 // "PR" +#define PRODUCT_ID 0x504D // "PM" #define DEVICE_VER 0x0001 #define MANUFACTURER PrimeKB #define PRODUCT Prime_M diff --git a/keyboards/primekb/prime_m/keymaps/default/config.h b/keyboards/primekb/prime_m/keymaps/default/config.h deleted file mode 100644 index 95917a65cd43..000000000000 --- a/keyboards/primekb/prime_m/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_m/keymaps/default/keymap.c b/keyboards/primekb/prime_m/keymaps/default/keymap.c index 6834624d83cb..101e82f82ece 100644 --- a/keyboards/primekb/prime_m/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_m/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_ortho_5x6( KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC), @@ -46,37 +40,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, KC_MUTE, KC_VOLD ) }; - -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_m/keymaps/default/readme.md b/keyboards/primekb/prime_m/keymaps/default/readme.md index 5654918abb2e..35a3edc8f33f 100644 --- a/keyboards/primekb/prime_m/keymaps/default/readme.md +++ b/keyboards/primekb/prime_m/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap for prime_m \ No newline at end of file +# The default keymap for Prime_M \ No newline at end of file diff --git a/keyboards/primekb/prime_m/keymaps/numpad/config.h b/keyboards/primekb/prime_m/keymaps/numpad/config.h deleted file mode 100644 index 95917a65cd43..000000000000 --- a/keyboards/primekb/prime_m/keymaps/numpad/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_m/keymaps/numpad/readme.md b/keyboards/primekb/prime_m/keymaps/numpad/readme.md index 5654918abb2e..cd975583152e 100644 --- a/keyboards/primekb/prime_m/keymaps/numpad/readme.md +++ b/keyboards/primekb/prime_m/keymaps/numpad/readme.md @@ -1 +1 @@ -# The default keymap for prime_m \ No newline at end of file +# The numpad keymap for Prime_M \ No newline at end of file diff --git a/keyboards/primekb/prime_m/keymaps/via/keymap.c b/keyboards/primekb/prime_m/keymaps/via/keymap.c new file mode 100644 index 000000000000..e8c360f8a89b --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* 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_ortho_5x6( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC), + KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL, + KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_LCTL, KC_LALT, TO(1), KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT_ortho_5x6( + KC_ESC, KC_1, KC_2, KC_3, KC_4, LT(2, KC_F9), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC + ), + + [2] = LAYOUT_ortho_5x6( + BL_TOGG, BL_STEP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, KC_MUTE, KC_VOLD + ), + + [3] = LAYOUT_ortho_5x6( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/primekb/prime_m/keymaps/via/readme.md b/keyboards/primekb/prime_m/keymaps/via/readme.md new file mode 100644 index 000000000000..3283f6356775 --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA keymap for Prime_M \ No newline at end of file diff --git a/keyboards/primekb/prime_m/keymaps/via/rules.mk b/keyboards/primekb/prime_m/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/primekb/prime_m/prime_m.c b/keyboards/primekb/prime_m/prime_m.c index a33db95d83fc..168fec4edfd8 100644 --- a/keyboards/primekb/prime_m/prime_m.c +++ b/keyboards/primekb/prime_m/prime_m.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 @@ -14,30 +15,3 @@ * along with this program. If not, see . */ #include "prime_m.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/primekb/prime_m/readme.md b/keyboards/primekb/prime_m/readme.md index 668b29e4aea5..704b3286c320 100644 --- a/keyboards/primekb/prime_m/readme.md +++ b/keyboards/primekb/prime_m/readme.md @@ -4,12 +4,13 @@ The Prime_M is a premium input device that is designed to be flexible so that it can cover many needs. The case is milled from a solid block of aluminum and features an integrated switch plate, which is 4.75mm thick yet designed to allow MX style switches to properly snap in. The bottom cover is machine from solid brass and is pre-drilled/countersunk for use with optional feet to give the device a slight tilt. -Keyboard Maintainer: [MxBlue](https://github.com/MxBlu) -Hardware Supported: Prime_M PCB, ATMega32u2 -Hardware Availability: [GB Post](https://geekhack.org/index.php?topic=91821.0), [B-Stock Listing](https://www.primekb.com/products/prime_m) +* Keyboard Maintainer: [holtenc](https://github.com/holtenc), [MxBlue](https://github.com/MxBlu) +* Hardware Supported: Prime_M PCB, ATMega32u2 +* Hardware Availability: [GB Post](https://geekhack.org/index.php?topic=91821.0), [B-Stock Listing](https://www.primekb.com/products/prime_m) Make example for this keyboard (after setting up your build environment): make primekb/prime_m:default + make primekb/prime_m: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/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk index 160ed208859f..1a1eabc8c2d9 100644 --- a/keyboards/primekb/prime_m/rules.mk +++ b/keyboards/primekb/prime_m/rules.mk @@ -15,21 +15,21 @@ BOOTLOADER = atmel-dfu # 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 +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 +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 = 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 +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 +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 = ortho_5x6 numpad_5x6 From f74c769a19662147ead15dcd14777afe5e53c167 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 1 Mar 2020 02:05:56 +0000 Subject: [PATCH 548/973] PWM DMA based RGB Underglow for STM32 (#7928) * Add pwm ws2812 driver * Add docs for pwm ws2812 driver * Update ws2812_pwm for ChibiOS 19 Co-Authored-By: Nick Brassel Co-authored-by: Nick Brassel --- docs/ws2812_driver.md | 36 ++++++- drivers/arm/ws2812_pwm.c | 208 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 241 insertions(+), 3 deletions(-) diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index 80b6948586ef..51b053b9b4a0 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -15,7 +15,7 @@ These LEDs are called "addressable" because instead of using a wire per color, e | bit bang | :heavy_check_mark: | :heavy_check_mark: | | I2C | :heavy_check_mark: | | | SPI | | :heavy_check_mark: | -| PWM | | Soon™ | +| PWM | | :heavy_check_mark: | ## Driver configuration @@ -66,4 +66,36 @@ While not an exhaustive list, the following table provides the scenarios that ha | f103 | A7 :heavy_check_mark: | B15 :heavy_check_mark: | N/A | | f303 | A7 :heavy_check_mark: B5 :heavy_check_mark: | B15 :heavy_check_mark: | B5 :heavy_check_mark: | -*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.* \ No newline at end of file +*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.* + +### PWM + +Targeting STM32 boards where WS2812 support is offloaded to an PWM timer and DMA stream. The advantage is that the use of DMA offloads processing of the WS2812 protocol from the MCU. To configure it, add this to your rules.mk: + +```make +WS2812_DRIVER = pwm +``` + +Configure the hardware via your config.h: +```c +#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 +#define WS2812_PWM_CHANNEL 2 // default: 2 +#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +``` + +You must also turn on the PWM feature in your halconf.h and mcuconf.h + +#### Testing Notes + +While not an exhaustive list, the following table provides the scenarios that have been partially validated: + +| | Status | +|-|-| +| f072 | ? | +| f103 | :heavy_check_mark: | +| f303 | :heavy_check_mark: | +| f401/f411 | :heavy_check_mark: | + +*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.* diff --git a/drivers/arm/ws2812_pwm.c b/drivers/arm/ws2812_pwm.c index 2094e50098af..1a172102987b 100644 --- a/drivers/arm/ws2812_pwm.c +++ b/drivers/arm/ws2812_pwm.c @@ -1 +1,207 @@ -#error("NOT SUPPORTED") \ No newline at end of file +#include "ws2812.h" +#include "quantum.h" +#include "hal.h" + +/* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */ + +#ifdef RGBW +# error "RGBW not supported" +#endif + +#ifndef WS2812_PWM_DRIVER +# define WS2812_PWM_DRIVER PWMD2 // TIMx +#endif +#ifndef WS2812_PWM_CHANNEL +# define WS2812_PWM_CHANNEL 2 // Channel +#endif +#ifndef WS2812_PWM_PAL_MODE +# define WS2812_PWM_PAL_MODE 2 // DI Pin's alternate function value +#endif +#ifndef WS2812_DMA_STREAM +# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP +#endif +#ifndef WS2812_DMA_CHANNEL +# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP +#endif + +#ifndef WS2812_PWM_TARGET_PERIOD +//# define WS2812_PWM_TARGET_PERIOD 800000 // Original code is 800k...? +# define WS2812_PWM_TARGET_PERIOD 80000 // TODO: work out why 10x less on f303/f4x1 +#endif + +/* --- PRIVATE CONSTANTS ---------------------------------------------------- */ + +#define WS2812_PWM_FREQUENCY (STM32_SYSCLK / 2) /**< Clock frequency of PWM, must be valid with respect to system clock! */ +#define WS2812_PWM_PERIOD (WS2812_PWM_FREQUENCY / WS2812_PWM_TARGET_PERIOD) /**< Clock period in ticks. 1 / 800kHz = 1.25 uS (as per datasheet) */ + +/** + * @brief Number of bit-periods to hold the data line low at the end of a frame + * + * The reset period for each frame must be at least 50 uS; so we add in 50 bit-times + * of zeroes at the end. (50 bits)*(1.25 uS/bit) = 62.5 uS, which gives us some + * slack in the timing requirements + */ +#define WS2812_RESET_BIT_N (50) +#define WS2812_COLOR_BIT_N (RGBLED_NUM * 24) /**< Number of data bits */ +#define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */ + +/** + * @brief High period for a zero, in ticks + * + * Per the datasheet: + * WS2812: + * - T0H: 200 nS to 500 nS, inclusive + * - T0L: 650 nS to 950 nS, inclusive + * WS2812B: + * - T0H: 200 nS to 500 nS, inclusive + * - T0L: 750 nS to 1050 nS, inclusive + * + * The duty cycle is calculated for a high period of 350 nS. + */ +#define WS2812_DUTYCYCLE_0 (WS2812_PWM_FREQUENCY / (1000000000 / 350)) + +/** + * @brief High period for a one, in ticks + * + * Per the datasheet: + * WS2812: + * - T1H: 550 nS to 850 nS, inclusive + * - T1L: 450 nS to 750 nS, inclusive + * WS2812B: + * - T1H: 750 nS to 1050 nS, inclusive + * - T1L: 200 nS to 500 nS, inclusive + * + * The duty cycle is calculated for a high period of 800 nS. + * This is in the middle of the specifications of the WS2812 and WS2812B. + */ +#define WS2812_DUTYCYCLE_1 (WS2812_PWM_FREQUENCY / (1000000000 / 800)) + +/* --- PRIVATE MACROS ------------------------------------------------------- */ + +/** + * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given bit + * + * @param[in] led: The led index [0, @ref RGBLED_NUM) + * @param[in] byte: The byte number [0, 2] + * @param[in] bit: The bit number [0, 7] + * + * @return The bit index + */ +#define WS2812_BIT(led, byte, bit) (24 * (led) + 8 * (byte) + (7 - (bit))) + +/** + * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit + * + * @note The red byte is the middle byte in the color packet + * + * @param[in] led: The led index [0, @ref RGBLED_NUM) + * @param[in] bit: The bit number [0, 7] + * + * @return The bit index + */ +#define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit)) + +/** + * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit + * + * @note The red byte is the first byte in the color packet + * + * @param[in] led: The led index [0, @ref RGBLED_NUM) + * @param[in] bit: The bit number [0, 7] + * + * @return The bit index + */ +#define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit)) + +/** + * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit + * + * @note The red byte is the last byte in the color packet + * + * @param[in] led: The led index [0, @ref RGBLED_NUM) + * @param[in] bit: The bit index [0, 7] + * + * @return The bit index + */ +#define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit)) + +/* --- PRIVATE VARIABLES ---------------------------------------------------- */ + +static uint32_t ws2812_frame_buffer[WS2812_BIT_N + 1]; /**< Buffer for a frame */ + +/* --- PUBLIC FUNCTIONS ----------------------------------------------------- */ +/* + * Gedanke: Double-buffer type transactions: double buffer transfers using two memory pointers for +the memory (while the DMA is reading/writing from/to a buffer, the application can +write/read to/from the other buffer). + */ + +void ws2812_init(void) { + // Initialize led frame buffer + uint32_t i; + for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle + for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero + +#if defined(USE_GPIOV1) + palSetLineMode(RGB_DI_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL); +#else + palSetLineMode(RGB_DI_PIN, PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING); +#endif + + // PWM Configuration + //#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config + static const PWMConfig ws2812_pwm_config = { + .frequency = WS2812_PWM_FREQUENCY, + .period = WS2812_PWM_PERIOD, // Mit dieser Periode wird UDE-Event erzeugt und ein neuer Wert (Länge WS2812_BIT_N) vom DMA ins CCR geschrieben + .callback = NULL, + .channels = + { + [0 ... 3] = {.mode = PWM_OUTPUT_DISABLED, .callback = NULL}, // Channels default to disabled + [WS2812_PWM_CHANNEL - 1] = {.mode = PWM_OUTPUT_ACTIVE_HIGH, .callback = NULL}, // Turn on the channel we care about + }, + .cr2 = 0, + .dier = TIM_DIER_UDE, // DMA on update event for next period + }; + //#pragma GCC diagnostic pop // Restore command-line warning options + + // Configure DMA + // dmaInit(); // Joe added this + dmaStreamAlloc(WS2812_DMA_STREAM - STM32_DMA1_STREAM1, 10, NULL, NULL); + dmaStreamSetPeripheral(WS2812_DMA_STREAM, &(WS2812_PWM_DRIVER.tim->CCR[WS2812_PWM_CHANNEL - 1])); // Ziel ist der An-Zeit im Cap-Comp-Register + dmaStreamSetMemory0(WS2812_DMA_STREAM, ws2812_frame_buffer); + dmaStreamSetTransactionSize(WS2812_DMA_STREAM, WS2812_BIT_N); + dmaStreamSetMode(WS2812_DMA_STREAM, STM32_DMA_CR_CHSEL(WS2812_DMA_CHANNEL) | STM32_DMA_CR_DIR_M2P | STM32_DMA_CR_PSIZE_WORD | STM32_DMA_CR_MSIZE_WORD | STM32_DMA_CR_MINC | STM32_DMA_CR_CIRC | STM32_DMA_CR_PL(3)); + // M2P: Memory 2 Periph; PL: Priority Level + + // Start DMA + dmaStreamEnable(WS2812_DMA_STREAM); + + // Configure PWM + // NOTE: It's required that preload be enabled on the timer channel CCR register. This is currently enabled in the + // ChibiOS driver code, so we don't have to do anything special to the timer. If we did, we'd have to start the timer, + // disable counting, enable the channel, and then make whatever configuration changes we need. + pwmStart(&WS2812_PWM_DRIVER, &ws2812_pwm_config); + pwmEnableChannel(&WS2812_PWM_DRIVER, WS2812_PWM_CHANNEL - 1, 0); // Initial period is 0; output will be low until first duty cycle is DMA'd in +} + +void ws2812_write_led(uint16_t led_number, uint8_t r, uint8_t g, uint8_t b) { + // Write color to frame buffer + for (uint8_t bit = 0; bit < 8; bit++) { + ws2812_frame_buffer[WS2812_RED_BIT(led_number, bit)] = ((r >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; + ws2812_frame_buffer[WS2812_GREEN_BIT(led_number, bit)] = ((g >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; + ws2812_frame_buffer[WS2812_BLUE_BIT(led_number, bit)] = ((b >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; + } +} + +// Setleds for standard RGB +void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) { + static bool s_init = false; + if (!s_init) { + ws2812_init(); + s_init = true; + } + + for (uint16_t i = 0; i < leds; i++) { + ws2812_write_led(i, ledarray[i].r, ledarray[i].g, ledarray[i].b); + } +} From 21715210e2ac052633b3625861997ee609abd163 Mon Sep 17 00:00:00 2001 From: s-show Date: Sun, 1 Mar 2020 13:22:15 +0900 Subject: [PATCH 549/973] [Docs] translated 'feature_tap_dance.md' to japanese. (#8137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * complete translation. * Update docs/ja/feature_tap_dance.md Update the file based on the suggestions. * Update docs/ja/feature_tap_dance.md Update the file based on the suggestions. * Apply suggestions from code review Update the file based on the suggestions. * Apply suggestions from code review Update the file based on the suggestions (Part 2). * Apply suggestions from code review Update the file based on the suggestions (Part 3). * Apply suggestions from code review Update the file based on the suggestions (Part 3). * Apply suggestions from code review Update the file based on the suggestions (Part 4). * Apply suggestions from code review Update the file based on the suggestions (Part 5). ご提案いただいた修正案は全て確認できました。 続いて、コメント行の調整、「打つ・叩く」の変更、その他の修正を行います。 * fixed typo. * Update the file based on the suggestions (Part 6). * Update the file based on the suggestions (Part 7). * Fixed sentence. * Update docs/ja/feature_tap_dance.md Update the file based on the suggestions (Part 8). * Update the file based on the suggestions (Part 9). Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Co-Authored-By: shela --- docs/ja/feature_tap_dance.md | 547 +++++++++++++++++++++++++++++++++++ 1 file changed, 547 insertions(+) create mode 100644 docs/ja/feature_tap_dance.md diff --git a/docs/ja/feature_tap_dance.md b/docs/ja/feature_tap_dance.md new file mode 100644 index 000000000000..5583b04ce484 --- /dev/null +++ b/docs/ja/feature_tap_dance.md @@ -0,0 +1,547 @@ +# タップダンス: 1つのキーが3つ、5つまたは100の異なる動作をします + + + +## イントロダクション + +セミコロンキーを1回叩くと、セミコロンが送信されます。2回素早く叩くと、コロンが送信されます。3回叩くと、あなたのキーボードのLEDが激しく踊るように明滅します。これは、タップダンスでできることの一例です。それは、コミュニティが提案したとても素敵なファームウェアの機能の1つで、[algernon](https://github.com/algernon) がプルリクエスト [#451](https://github.com/qmk/qmk_firmware/pull/451) で考えて作ったものです。algernon が述べる機能は次の通りです: + +この機能を使うと、特定のキーが、タップした回数に基づいて異なる振る舞いをします。そして、割り込みがあった時は、割り込み前に上手く処理されます。 + +## `ACTION_FUNCTION_TAP` との比較について + +`ACTION_FUNCTION_TAP` はタップダンスに似た機能を提供しますが、注目すべきいくつかの重要な違いがあります。違いを確認するため、いくつかの設定を調べてみましょう。1つのキーを1回タップすると `Space` キーが送信され、2回タップすると `Enter` キーが送信されるよう設定します。 + +`ACTION_FUNCTION_TAP` では、これを設定するのはかなり大変で、キーの順番が割り込まれた時に割り込んだキーが最初に送られるという問題に直面します。例えば、`SPC a` は、もし `SPC` と `a` が `TAPPING_TERM` で設定した時間内に両方とも入力された場合、結果として `a SPC` が送信されます。タップダンス機能を使う場合、正しく `SPC a` が送信されます(`TAPPING_TERM` で設定した時間内に `SPC` と `a` を入力した場合であっても)。 + +割り込みを正しくハンドリングして目的を達成するため、タップダンスの実装ではシステムの2つの部分をフックします: `process_record_quantum()` とマトリックススキャンです。この2つの部分については以下で説明しますが、今注意すべき点は、マトリックススキャンでは、キーが押されていない時でもタップのシーケンスをタイムアウトにできる必要があるということです。そうすれば、`TAPPING_TERM` の時間が経過した後、`SPC` だけがタイムアウトになって登録されます。 + +## タップダンスの使い方 + +一般論は十分です。タップダンスの実際の使い方を見てみましょう! + +最初に、あなたの `rules.mk` ファイルで `TAP_DANCE_ENABLE=yes` と設定する必要があります。なぜならば、デフォルトでは無効になっているからです。これでファームウェアのサイズが1キロバイトほど増加します。 + +オプションで、あなたの `config.h` ファイルに次のような設定を追加して、`TAPPING_TERM` の時間をカスタマイズしたほうが良いです。 + +``` +#define TAPPING_TERM 175 +``` + +`TAPPING_TERM` の時間は、あなたのタップダンスのキーのタップとタップの間の時間として許可された最大の時間で、ミリ秒単位で計測されます。例えば、もし、あなたがこの上にある `#define` ステートメントを使い、1回タップすると `Space` が送信され、2回タップすると `Enter` が送信されるタップダンスキーをセットアップした場合、175ミリ秒以内に2回キーをタップすれば `ENT` だけが送信されるでしょう。もし、1回タップしてから175ミリ秒以上待ってからもう一度タップすると、`SPC SPC` が送信されます。 + +次に、いくつかのタップダンスのキーを定義するためには、`TD()` マクロ — `F()` マクロに似ています — を使うのが最も簡単です。これは数字を受け取り、この数字は後で `tap_dance-actions` 配列のインデックスとして使われます。 + +その後、`tap_dance_actions` 配列を使って、タップダンスキーを押した時のアクションを定義します。現在は、5つの可能なオプションがあります: + +* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: 1回タップすると `kc1` キーコードを送信し、2回タップすると `kc2` キーコードを送信します。キーを押し続けているときは、適切なキーコードが登録されます: キーを押し続けた場合は `kc1`、一度タップしてから続けてもう一度キーを押してそのまま押し続けたときは、 `kc2` が登録されます。 +* `ACTION_TAP_DANCE_LAYER_MOVE(kc, layer)`: 1回タップすると `kc` キーコードが送信され、2回タップすると `layer` レイヤーに移動します(これは `TO` レイヤーキーコードのように機能します)。 + * この機能は `ACTION_TAP_DANCE_DUAL_ROLE` と同じですが、機能が明確になるように関数名を変更しました。どちらの関数名でも実行できます。 +* `ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer)`: 1回タップすると `kc` キーコードが送信され、2回タップすると `layer` の状態をトグルします(これは `TG` レイヤーキーコードのように機能します)。 +* `ACTION_TAP_DANCE_FN(fn)`: ユーザーキーマップに定義した指定の関数が呼び出されます。タップダンス実行の回数分タップすると、最後の時点で呼び出されます。 +* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: タップする度にユーザーキーマップに定義した最初の関数が呼び出されます。タップダンスの実行が終わった時点で2番目の関数が呼び出され、タップダンスの実行をリセットするときに最後の関数が呼び出されます。 +* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: これは `ACTION_TAP_DANCE_FN_ADVANCED` と同じように機能します。しかし、`TAPPING_TERM` で事前に定義した時間に代えて、カスタマイズしたタップ時間を使えます。 + +最初のオプションで、1つのキーに2つの役割を持たせる大抵のケースには十分です。例えば、`ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` は、1回タップすると `Space` を送信し、2回タップすると `Enter` を送信します。 + +!> ここでは [基本的なキーコード](ja/keycodes_basic.md) だけがサポートされていることを覚えておいてください。カスタムキーコードはサポートされていません。 + +最初のオプションに似ていますが、2番目のオプションは単純なレイヤー切替のケースに適しています。 + +これ以上に複雑なケースの場合、3番目か4番目のオプションを使います。(以下でそれらの例を列挙します) + +最後に、5番目のオプションは、もし、タップダンスキーをコードに追加した後、非タップダンスキーが奇妙な振る舞いを始めた時に特に役に立ちます。ありうる問題は、あなたがタップダンスキーを使いやすくするために `TAPPING_TERM` の時間を変更した結果、その他のキーが割り込みを処理する方法が変わってしまったというものです。 + + +## 実装の詳細 + +さて、説明の大部分はここまでです! 以下に挙げているいくつかの例に取り組むことができるようになり、あなた自身のタップダンスの機能を開発できるようになります。しかし、もし、あなたが裏側で起きていることをより深く理解したいのであれば、続けてそれが全てどのように機能するかの説明を読みましょう! + +メインエントリーポイントは、`process_tap_dance()` で、`process_record_quantum()` から呼び出されます。これはキーを押すたびに実行され、ハンドラは早期に実行されます。この関数は、押されたキーがタップダンスキーがどうか確認します。 +もし、押されたキーがタップダンスキーではなく、かつ、タップダンスが実行されていたなら、最初にそれを処理し、新しく押されたキーをキューに格納します。 +もし、押されたキーがタップダンスキーであるなら、既にアクティブなタップダンスと同じキーか確認します(もしアクティブなものがある場合、それと)。 +異なる場合、まず、古いタップダンスを処理し、続いて新しいタップダンスを登録します。 +同じ場合、カウンタの値を増やし、タイマーをリセットします。 + +このことは、あなたは再びキーをタップするまでの時間として `TAPPING_TERM` の時間を持っていることを意味します。そのため、あなたは1つの `TAPPING_TERM` の時間内に全てのタップを行う必要はありません。これにより、キーの反応への影響を最小限に抑えながら、より長いタップ回数を可能にします。 + +次は `matrix_scan_tap_dance()` です。この関数はタップダンスキーのタイムアウトを制御します。 + +柔軟性のために、タップダンスは、キーコードの組み合わせにも、ユーザー関数にもなることができます。後者は、より高度なタップ回数の制御や、LED を点滅させたり、バックライトをいじったり、等々の制御を可能にします。これは、1つの共用体と、いくつかの賢いマクロによって成し遂げられています。 + +# 実装例 + +## シンプルな実装例 + +ここに1つの定義のための簡単な例があります。 + +1. `rules.mk` に `TAP_DANCE_ENABLE = yes` を追加します。 +2. `config.h` ファイル(`qmk_firmware/keyboards/planck/config.h` からあなたのキーマップディレクトリにコピーできます)に `#define TAPPING_TERM 200` を追加します。 +3. `keymap.c` ファイルに変数とタップダンスの定義を定義し、それからキーマップに追加します。 + +```c +// タップダンスの宣言 +enum { + TD_ESC_CAPS = 0 +}; + +// タップダンスの定義 +qk_tap_dance_action_t tap_dance_actions[] = { + // 1回タップすると Escape キー、2回タップすると Caps Lock。 + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) +// ほかの宣言もカンマで区切ってここに記述します +}; + +// レイヤー定義で、キーコードの代わりにタップダンスキーを追加します +TD(TD_ESC_CAPS) +``` + +## 複雑な実装例 + +このセクションでは、いくつかの複雑なタップダンスの例を詳しく説明します。 +例で使われている全ての列挙型はこのように宣言します。 + +```c +// 全ての例のための列挙型定義 +enum { + CT_SE = 0, + CT_CLN, + CT_EGG, + CT_FLSH, + X_TAP_DANCE +}; +``` +### 例1: 1回タップすると `:` を送信し、2回タップすると `;` を送信する + +```c +void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_RSFT); + register_code (KC_SCLN); + } else { + register_code (KC_SCLN); + } +} + +void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_RSFT); + unregister_code (KC_SCLN); + } else { + unregister_code (KC_SCLN); + } +} + +// 全てのタップダンス関数はここに定義します。ここでは1つだけ示します。 +qk_tap_dance_action_t tap_dance_actions[] = { + [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) +}; +``` + +### 例2: 100回タップした後に "Safety Dance!" を送信します + +```c +void dance_egg (qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 100) { + SEND_STRING ("Safety dance!"); + reset_tap_dance (state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) +}; +``` + +### 例3: 1つずつ LED を点灯させてから消灯する + +```c +// タップする毎に、LED を右から左に点灯します。 +// 4回目のタップで、右から左に消灯します。 +void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + ergodox_right_led_3_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_1_on(); + break; + case 4: + ergodox_right_led_3_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_1_off(); + } +} + +// 4回目のタップで、キーボードをフラッシュ状態にセットします。 +void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 4) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +// もしフラッシュ状態にならない場合、LED を左から右に消灯します。 +void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) { + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); +} + +// 全てのタップダンス関数を一緒に表示しています。この例3は "CT_FLASH" です。 +qk_tap_dance_action_t tap_dance_actions[] = { + [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT) + ,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) + ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) + ,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset) +}; +``` + +### 例4: クアッドファンクションのタップダンス + +[DanielGGordon](https://github.com/danielggordon) によるもの + +キーを押す回数と、キーを押し続けるかタップするかによって、1つのキーに4つ(またはそれ以上)の機能を持たせることができるようになります。 + +以下に例をあげます: +* 1回タップ = `x` を送信 +* 押し続ける = `Control` を送信 +* 2回タップ = `Escape` を送信 +* 2回タップして押し続ける = `Alt` を送信 + +## 準備 + +'クアッドファンクションのタップダンス' を利用できるようにするには、いくつかのものが必要になります。 + +`keymap.c` ファイルの先頭、つまりキーマップの前に、以下のコードを追加します。 + +```c +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, //シングルタップを2回送信 + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 +}; + +// タップダンスの列挙型 +enum { + X_CTL = 0, + SOME_OTHER_DANCE +}; + +int cur_dance (qk_tap_dance_state_t *state); + +//xタップダンスのための関数。キーマップで利用できるようにするため、ここに置きます。 +void x_finished (qk_tap_dance_state_t *state, void *user_data); +void x_reset (qk_tap_dance_state_t *state, void *user_data); + +``` + +次に、`keymap.c` ファイルの末尾に、次のコードを追加する必要があります。 + +```c +/* 実行されるタップダンスの種類に対応する整数を返します。 + * + * タップダンスの状態を判別する方法: 割り込みと押下。 + * + * 割り込み: + * タップダンスの状態が「割り込み」の場合、他のキーがタップ時間中に押されたことを意味します。 + * これは通常、キーを「タップ」しようとしていることを示します。 + * + * 押下: + * キーがまだ押されているかどうか。この値が true の場合、タップ時間が終了したことを意味しますが、 + * キーはまだ押されたままです。これは通常、キーが「ホールド」されていることを意味します。 + * + * タップダンスに関して、qmk ソフトウェアで現在不可能なことの1つは、"permissive hold" 機能を + * 模倣することです。 + * 一般に、高度なタップダンスは一般的に入力される文字で使われた場合にうまく機能しません。 + * 例えば "A" の場合。タップダンスは文字の入力中に入力しない文字以外のキーで使うのが最適です。 + * + * 高度なタップダンスを配置するのに適した場所: + * z、q、x、j、k、v、b、ファンクションキー、home/end、コンマ、セミコロン + * + * タップダンスキーの「最適な配置場所」の基準: + * 文章中で頻繁に入力するキーでないこと + * ダブルタップに頻繁に使われるキーでないこと。例えば、'tab' はターミナルやウェブフォームで + * しばしばダブルタップされます。そのため、タップダンスでは 'tab' は良い選択ではありません。 + * 一般的な単語で2回続けて使われる文字でないこと。例えば 'pepper' 中の 'p'。もしタップダンス機能が + * 文字 'p' に存在する場合、'pepper' という単語は入力するのが非常にいらだたしいものになるでしょう。 + * + * 3つ目の点については、'DOUBLE_SINGLE_TAP' が存在しますが、これは完全にはテストされていません + * + */ +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + //キーは割り込まれていませんが、まだ押し続けられています。'HOLD' を送信することを意味します。 + else return SINGLE_HOLD; + } + else if (state->count == 2) { + /* + * DOUBLE_SINGLE_TAP は "pepper" と入力することと、'pp' と入力したときに実際に + * ダブルタップしたい場合とを区別するためのものです。 + * この戻り値の推奨されるユースケースは、'ダブルタップ' 動作やマクロではなく、 + * そのキーの2つのキー入力を送信したい場合です。 + */ + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + //誰も同じ文字を3回入力しようとしていないと仮定します(少なくとも高速には)。 + //タップダンスキーが 'KC_W' で、"www." と高速に入力したい場合、ここに例外を追加して + //'TRIPLE_SINGLE_TAP' を返し、'DOUBLE_SINGLE_TAP' のようにその列挙型を定義する + //必要があります。 + if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; //マジックナンバー。いつかこのメソッドはより多くの押下に対して機能するよう拡張されるでしょう +} + +//'x' タップダンスの 'tap' のインスタンスをインスタンス化します +static tap xtap_state = { + .is_press_action = true, + .state = 0 +}; + +void x_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: register_code(KC_X); break; + case SINGLE_HOLD: register_code(KC_LCTRL); break; + case DOUBLE_TAP: register_code(KC_ESC); break; + case DOUBLE_HOLD: register_code(KC_LALT); break; + case DOUBLE_SINGLE_TAP: register_code(KC_X); unregister_code(KC_X); register_code(KC_X); + //最後の case は高速入力用です。キーが `f` であると仮定します: + //例えば、`buffer` という単語を入力するとき、`Esc` ではなく `ff` を送信するようにします。 + //高速入力時に `ff` と入力するには、次の文字は `TAPPING_TERM` 以内に入力する必要があります。 + //`TAPPING_TERM` はデフォルトでは 200ms です。 + } +} + +void x_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: unregister_code(KC_X); break; + case SINGLE_HOLD: unregister_code(KC_LCTRL); break; + case DOUBLE_TAP: unregister_code(KC_ESC); break; + case DOUBLE_HOLD: unregister_code(KC_LALT); + case DOUBLE_SINGLE_TAP: unregister_code(KC_X); + } + xtap_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,x_finished, x_reset) +}; +``` + +これで、キーマップのどこでも簡単に `TD(X_CTL)` マクロが使えます。 + +もし、この機能をユーザスペースで実現したい場合、 [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) がユーザスペースでどのように実装しているか確認してください。 + +> この設定の "hold" は、タップダンスのタイムアウト(`ACTION_TAP_DANCE_FN_ADVANCED_TIME` 参照)の **後** に起こります。即座に "hold" を得るためには、条件から `state->interrupted` の確認を除きます。結果として、複数回のタップのための時間をより多く持つことで快適な長いタップの期限を使うことができ、そして、"hold" のために長く待たないようにすることができます(2倍の `TAPPING TERM` で開始してみてください)。 + +### 例5: タップダンスを高度なモッドタップとレイヤータップキーに使う :id=example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys + +タップダンスは、タップされたコードが基本的なキーコード以外の場合に、 `MT()` と `LT()` マクロをエミュレートするのに利用できます。これは、通常 `Shift` を必要とする '(' や '{' のようなキーや、`Control + X` のように他の修飾されたキーコードをタップされたキーコードとして送信することに役立ちます。 + +あなたのレイヤーとカスタムキーコードの下に、以下のコードを追加します。 + +```c +//タップダンスのキーコード +enum td_keycodes { + ALT_LP //例: 押していると `LALT`、タップすると `(`。それぞれのタップダンスの追加のキーコードを追加します +}; + +//必要な数のタップダンス状態を含むタイプを定義します +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_SINGLE_TAP +} td_state_t; + +//タップダンスの状態の型のグローバルインスタンスを作ります +static td_state_t td_state; + +//タップダンス関数を宣言します: + +//現在のタップダンスの状態を特定するための関数 +int cur_dance (qk_tap_dance_state_t *state); + +//それぞれのタップダンスキーコードに適用する `finished` と `reset` 関数 +void altlp_finished (qk_tap_dance_state_t *state, void *user_data); +void altlp_reset (qk_tap_dance_state_t *state, void *user_data); +``` + +キーレイアウト(`LAYOUT`)の下に、タップダンスの関数を定義します。 + +```c +// 返却するタップダンス状態を特定します +int cur_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_SINGLE_TAP; } + else { return 3; } // 上記で返却する最大の状態の値より大きい任意の数 +} + +// 定義する各タップダンスキーコードのとりうる状態を制御します: + +void altlp_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_LPRN); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); // レイヤータップキーの場合、ここでは `layer_on(_MY_LAYER)` を使います + break; + case DOUBLE_SINGLE_TAP: // タップ時間内に2つの括弧 `((` の入れ子を可能にします + tap_code16(KC_LPRN); + register_code16(KC_LPRN); + } +} + +void altlp_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + unregister_code16(KC_LPRN); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LALT)); // レイヤータップキーの場合、ここでは `layer_off(_MY_LAYER)` を使います + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(KC_LPRN); + } +} + +// 各タップダンスキーコードの `ACTION_TAP_DANCE_FN_ADVANCED()` を定義し、`finished` と `reset` 関数を渡します +qk_tap_dance_action_t tap_dance_actions[] = { + [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset) +}; +``` + +それぞれのタップダンスキーコードをキーマップに含めるときは、`TD()` マクロでキーコードをラップします。例: `TD(ALT_LP)` + +### 例6: タップダンスを一時的なレイヤー切り替えとレイヤートグルキーに使う + +タップダンスは、MO(layer) と TG(layer) 機能を模倣することにも使用できます。この例では、1回タップすると `KC_QUOT` 、1回押してそのまま押し続けたら `MO(_MY_LAYER)` 、2回タップしたときは `TG(_MY_LAYER)` として機能するキーを設定します。 + +最初のステップは、あなたの `keymap.c` ファイルの最初のあたりに以下のコードを追加します。 + +```c +typedef struct { + bool is_press_action; + int state; +} tap; + +//必要な数のタップダンス状態のタイプを定義します +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3 +}; + +enum { + QUOT_LAYR = 0 //カスタムタップダンスキー。他のタップダンスキーはこの列挙型に追加します +}; + +//タップダンスキーで使われる関数を宣言します + +//全てのタップダンスに関連する関数 +int cur_dance (qk_tap_dance_state_t *state); + +//個別のタップダンスに関連する関数 +void ql_finished (qk_tap_dance_state_t *state, void *user_data); +void ql_reset (qk_tap_dance_state_t *state, void *user_data); +``` + +あなたの `keymap.c` ファイルの最後の方に以下のコードを追加します。 + +```c +//現在のタップダンスの状態を決定します +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; +} + +//この例のタップダンスキーに関連付けられた "tap" 構造体を初期化します +static tap ql_tap_state = { + .is_press_action = true, + .state = 0 +}; + +//タップダンスキーの動作をコントロールする関数 +void ql_finished (qk_tap_dance_state_t *state, void *user_data) { + ql_tap_state.state = cur_dance(state); + switch (ql_tap_state.state) { + case SINGLE_TAP: + tap_code(KC_QUOT); + break; + case SINGLE_HOLD: + layer_on(_MY_LAYER); + break; + case DOUBLE_TAP: + //レイヤーが既にセットされているか確認します + if (layer_state_is(_MY_LAYER)) { + //レイヤーが既にセットされていたら、オフにします。 + layer_off(_MY_LAYER); + } else { + //レイヤーがセットされていなかったら、オンにします。 + layer_on(_MY_LAYER); + } + break; + } +} + +void ql_reset (qk_tap_dance_state_t *state, void *user_data) { + //キーを押し続けていて今離したら、レイヤーをオフに切り替えます。 + if (ql_tap_state.state==SINGLE_HOLD) { + layer_off(_MY_LAYER); + } + ql_tap_state.state = 0; +} + +//タップダンスキーを機能に関連付けます +qk_tap_dance_action_t tap_dance_actions[] = { + [QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275) +}; +``` + +上記のコードは、前の例で使われたコードに似ています。注意する1つのポイントは、必要に応じてレイヤーを切り替えられるように、どのレイヤーがアクティブになっているかいつでも確認できる必要があることです。これを実現するために、引数で与えられた `layer` がアクティブなら `true` を返す `layer_state_is( layer )` を使います。 + +`cur_dance()` と `ql_tap_state` の使い方は、上の例と似ています。 + +`ql_finished` 関数における `case:SINGLE_TAP` は、上の例と似ています。`case:SINGLE_HOLD` は、`ql_reset()` と連動してタップダンスキーを押している間 `_MY_LAYER` に切り替わり、キーを離した時に `_MY_LAYER` から離れます。これは、`MO(_MY_LAYER)` に似ています。`case:DOUBLE_TAP` は、`_MY_LAYER` がアクティブレイヤーかどうかを確認することによって動きます。そして、その結果に基づいてレイヤーのオン・オフをトグルします。これは `TG(_MY_LAYER)` に似ています。 + +`tap_dance_actions[]` は、上の例に似ています。 `ACTION_TAP_DANCE_FN_ADVANCED()` の代わりに `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` を使ったことに注意してください。 +この理由は、私は、非タップダンスキーを使うにあたり `TAPPING_TERM` が短い(175ミリ秒以内)方が好きなのですが、タップダンスのアクションを確実に完了させるには短すぎるとわかったからです——そのため、ここでは時間を275ミリ秒に増やしています。 + +最後に、このタップダンスキーを動かすため、忘れずに `TD(QUOT_LAYR)` を `keymaps[]` に加えてください。 From f513a9193cdde47d1da7f647088beec8f280e4f3 Mon Sep 17 00:00:00 2001 From: James Young Date: Sat, 29 Feb 2020 20:46:48 -0800 Subject: [PATCH 550/973] Fix the Breaking Changes doc again WHAT YEAR IS IT?! --- docs/breaking_changes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index 280a302bafd6..12bc0db9dae9 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -15,7 +15,7 @@ The next Breaking Change is scheduled for May 30, 2020. ### Important Dates -* [x] 2019 Feb 29 - `future` is created. It will be rebased weekly. +* [x] 2020 Feb 29 - `future` is created. It will be rebased weekly. * [ ] 2020 May 2 - `future` closed to new PR's. * [ ] 2020 May 2 - Call for testers. * [ ] 2020 May 28 - `master` is locked, no PR's merged. From c9e3fa6f702d7b814c408f1476e43ce6cdd8f7d8 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 1 Mar 2020 17:56:50 +1100 Subject: [PATCH 551/973] Clean up includes for glcdfont headers (#7745) * Clean up includes for glcdfont headers * Remove pragma once, most of these are not headers * Missed these --- drivers/avr/glcdfont.c | 13 +------------ drivers/oled/glcdfont.c | 11 +---------- drivers/oled/oled_driver.c | 11 +++-------- keyboards/claw44/lib/glcdfont.c | 13 +------------ keyboards/comet46/lib/glcdfont.c | 13 +------------ keyboards/comet46/lib/keylogger.c | 8 +------- keyboards/crkbd/keymaps/drashna/glcdfont.c | 11 +---------- keyboards/crkbd/keymaps/kidbrazil/glcdfont.c | 13 +------------ keyboards/crkbd/keymaps/rpbaptist/glcdfont.c | 11 +---------- keyboards/crkbd/keymaps/soundmonster/glcdfont.c | 11 +---------- keyboards/crkbd/lib/glcdfont.c | 13 +------------ keyboards/gergo/keymaps/oled/glcdfont.c | 3 +-- .../owlet60/keymaps/oled_testing/customfont.c | 11 +---------- keyboards/helix/common/glcdfont.c | 13 +------------ keyboards/helix/rev2/keymaps/froggy/helixfont.h | 13 ++----------- keyboards/lily58/lib/glcdfont.c | 13 +------------ keyboards/orthodox/common/glcdfont.c | 13 +------------ keyboards/rgbkb/sol/common/glcdfont.c | 11 +---------- keyboards/rgbkb/zen/common/glcdfont.c | 11 +---------- keyboards/rgbkb/zygomorph/common/glcdfont.c | 13 +------------ keyboards/treadstone48/common/glcdfont.c | 13 +------------ keyboards/uzu42/keymaps/default/glcdfont_uzu42.c | 13 +------------ keyboards/yosino58/lib/glcdfont.c | 13 +------------ keyboards/yosino58/lib/glcdfont_.c | 13 +------------ tmk_core/common/progmem.h | 5 +---- users/drashna/font_gmk_bad.h | 9 +-------- users/drashna/hue_manitee_font.h | 9 +-------- users/tominabox1/doug.c | 13 +------------ 28 files changed, 31 insertions(+), 286 deletions(-) diff --git a/drivers/avr/glcdfont.c b/drivers/avr/glcdfont.c index 2c332ea6db41..5e763b054f89 100644 --- a/drivers/avr/glcdfont.c +++ b/drivers/avr/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -31,4 +21,3 @@ static const unsigned char font[] PROGMEM = { 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP }; -#endif // FONT5X7_H diff --git a/drivers/oled/glcdfont.c b/drivers/oled/glcdfont.c index 95c5d2ebf417..de5896018986 100644 --- a/drivers/oled/glcdfont.c +++ b/drivers/oled/glcdfont.c @@ -1,13 +1,4 @@ -#pragma once - -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo // Online editor: http://teripom.x0.com/ diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index e541228ea92d..d03b2de3a20f 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -22,15 +22,10 @@ along with this program. If not, see . #include -#if defined(__AVR__) -# include -# include -#elif defined(ESP8266) -# include -#else // defined(ESP8266) -# define PROGMEM +#include "progmem.h" +#ifndef __AVR__ # define memcpy_P(des, src, len) memcpy(des, src, len) -#endif // defined(__AVR__) +#endif // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf // for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf diff --git a/keyboards/claw44/lib/glcdfont.c b/keyboards/claw44/lib/glcdfont.c index 91f53d9c24ea..9fa1c806aa72 100644 --- a/keyboards/claw44/lib/glcdfont.c +++ b/keyboards/claw44/lib/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/comet46/lib/glcdfont.c b/keyboards/comet46/lib/glcdfont.c index e912d2233c42..361d0c3dc65c 100644 --- a/keyboards/comet46/lib/glcdfont.c +++ b/keyboards/comet46/lib/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -145,4 +135,3 @@ const unsigned char font[] PROGMEM = { 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00 }; -#endif // FONT5X7_H diff --git a/keyboards/comet46/lib/keylogger.c b/keyboards/comet46/lib/keylogger.c index 184f601095a1..a0abdd79abcf 100644 --- a/keyboards/comet46/lib/keylogger.c +++ b/keyboards/comet46/lib/keylogger.c @@ -1,11 +1,5 @@ #include - -#ifdef __AVR__ - #include - #include -#else - #define PROGMEM -#endif +#include "progmem.h" #define NUM_USB_HID_KEYCODES 255 #define LEN_KEYCODE_STR 4 diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c index 2bfc3fac6d44..10ce3b345737 100644 --- a/keyboards/crkbd/keymaps/drashna/glcdfont.c +++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c @@ -1,13 +1,4 @@ -#pragma once - -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ diff --git a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c index a67c329242ed..ea1f3bd76b0d 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c +++ b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c index 044c16d9c16b..ac1f11dbbe2b 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c +++ b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c @@ -1,13 +1,4 @@ -#pragma once - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo // Online editor: http://teripom.x0.com/ diff --git a/keyboards/crkbd/keymaps/soundmonster/glcdfont.c b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c index 291445b5e3df..588ecfd8c886 100644 --- a/keyboards/crkbd/keymaps/soundmonster/glcdfont.c +++ b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c @@ -1,13 +1,4 @@ -#pragma once - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ diff --git a/keyboards/crkbd/lib/glcdfont.c b/keyboards/crkbd/lib/glcdfont.c index f7567c57c6c8..41041f12bb3f 100644 --- a/keyboards/crkbd/lib/glcdfont.c +++ b/keyboards/crkbd/lib/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/gergo/keymaps/oled/glcdfont.c b/keyboards/gergo/keymaps/oled/glcdfont.c index cf189e6e5a6d..687f1a6a92f6 100644 --- a/keyboards/gergo/keymaps/oled/glcdfont.c +++ b/keyboards/gergo/keymaps/oled/glcdfont.c @@ -1,7 +1,6 @@ // 'loveLain', 128x32px -#include -#include +#include "progmem.h" static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c index b7ad73bfa25d..181b073ab5f5 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c @@ -1,13 +1,4 @@ -#pragma once - -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo // Online editor: http://teripom.x0.com/ diff --git a/keyboards/helix/common/glcdfont.c b/keyboards/helix/common/glcdfont.c index 89665ba07432..697d58886ec5 100644 --- a/keyboards/helix/common/glcdfont.c +++ b/keyboards/helix/common/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -241,4 +231,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#endif // FONT5X7_H diff --git a/keyboards/helix/rev2/keymaps/froggy/helixfont.h b/keyboards/helix/rev2/keymaps/froggy/helixfont.h index 7f54748151a4..5360eace95b6 100644 --- a/keyboards/helix/rev2/keymaps/froggy/helixfont.h +++ b/keyboards/helix/rev2/keymaps/froggy/helixfont.h @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -241,4 +233,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#endif // FONT5X7_H diff --git a/keyboards/lily58/lib/glcdfont.c b/keyboards/lily58/lib/glcdfont.c index c691ea9d0be0..94f026ba971e 100644 --- a/keyboards/lily58/lib/glcdfont.c +++ b/keyboards/lily58/lib/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/orthodox/common/glcdfont.c b/keyboards/orthodox/common/glcdfont.c index 6f88bd23a781..d607d34b7795 100644 --- a/keyboards/orthodox/common/glcdfont.c +++ b/keyboards/orthodox/common/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -273,4 +263,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP }; -#endif // FONT5X7_H diff --git a/keyboards/rgbkb/sol/common/glcdfont.c b/keyboards/rgbkb/sol/common/glcdfont.c index 61b40c092ef2..6b75af8483cb 100644 --- a/keyboards/rgbkb/sol/common/glcdfont.c +++ b/keyboards/rgbkb/sol/common/glcdfont.c @@ -1,13 +1,4 @@ -#pragma once - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Helidox 8x6 font with RGBKB SOL Logo // Online editor: http://teripom.x0.com/ diff --git a/keyboards/rgbkb/zen/common/glcdfont.c b/keyboards/rgbkb/zen/common/glcdfont.c index 3b4ccfa95c64..bc68c872969e 100644 --- a/keyboards/rgbkb/zen/common/glcdfont.c +++ b/keyboards/rgbkb/zen/common/glcdfont.c @@ -1,15 +1,6 @@ // This is the SOL 6x8 font -#pragma once - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/keyboards/rgbkb/zygomorph/common/glcdfont.c b/keyboards/rgbkb/zygomorph/common/glcdfont.c index 89665ba07432..697d58886ec5 100644 --- a/keyboards/rgbkb/zygomorph/common/glcdfont.c +++ b/keyboards/rgbkb/zygomorph/common/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -241,4 +231,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#endif // FONT5X7_H diff --git a/keyboards/treadstone48/common/glcdfont.c b/keyboards/treadstone48/common/glcdfont.c index 32c688e2bb38..003ce1a87bde 100644 --- a/keyboards/treadstone48/common/glcdfont.c +++ b/keyboards/treadstone48/common/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -241,4 +231,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c index f5524ec73710..5c3fa80d70ba 100644 --- a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c +++ b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/yosino58/lib/glcdfont.c b/keyboards/yosino58/lib/glcdfont.c index 01b656cc6266..f393df33423d 100644 --- a/keyboards/yosino58/lib/glcdfont.c +++ b/keyboards/yosino58/lib/glcdfont.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -272,4 +262,3 @@ const unsigned char font[] PROGMEM = { 0xF0, 0xF8, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F }; -#endif // FONT5X7_H diff --git a/keyboards/yosino58/lib/glcdfont_.c b/keyboards/yosino58/lib/glcdfont_.c index 122b26afa361..ad7a564a6c0e 100644 --- a/keyboards/yosino58/lib/glcdfont_.c +++ b/keyboards/yosino58/lib/glcdfont_.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#endif // FONT5X7_H diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index 88373f478b3f..a06d0f940fbb 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -1,5 +1,4 @@ -#ifndef PROGMEM_H -#define PROGMEM_H 1 +#pragma once #if defined(__AVR__) # include @@ -9,5 +8,3 @@ # define pgm_read_word(p) *((uint16_t*)(p)) # define pgm_read_dword(p) *((uint32_t*)(p)) #endif - -#endif diff --git a/users/drashna/font_gmk_bad.h b/users/drashna/font_gmk_bad.h index c1c5c390a95a..2f660d7eb58d 100644 --- a/users/drashna/font_gmk_bad.h +++ b/users/drashna/font_gmk_bad.h @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ diff --git a/users/drashna/hue_manitee_font.h b/users/drashna/hue_manitee_font.h index 72d50f7a6ab4..2deb4d32dc37 100644 --- a/users/drashna/hue_manitee_font.h +++ b/users/drashna/hue_manitee_font.h @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ diff --git a/users/tominabox1/doug.c b/users/tominabox1/doug.c index d1f92ecf30f8..fccb1bb6fd95 100644 --- a/users/tominabox1/doug.c +++ b/users/tominabox1/doug.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H From ce604e1629cf9efd2d7751ff60e927ad0a09b35a Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 2 Mar 2020 00:22:21 +1100 Subject: [PATCH 552/973] Remove duplicate BRTG case (#8277) --- quantum/quantum.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 7c19a3bbb6c0..a8d3305a654d 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -314,11 +314,6 @@ bool process_record_quantum(keyrecord_t *record) { case OUT_BT: set_output(OUTPUT_BLUETOOTH); return false; -#endif -#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_BREATHING) - case BL_BRTG: - backlight_toggle_breathing(); - return false; #endif } } From 1ec8a7205f1719496e043776edcc972125fc57e3 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sun, 1 Mar 2020 13:54:25 +0000 Subject: [PATCH 553/973] format code according to conventions [skip ci] --- quantum/quantum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index a8d3305a654d..633492f905a1 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -643,7 +643,7 @@ void matrix_scan_quantum() { // void send_dword(uint32_t number) { // this might not actually work - uint16_t word = (number >> 16); + uint16_tword = (number >> 16); send_word(word); send_word(number & 0xFFFFUL); } From 629950e51bb0f3f12d84520426f93449e0e4e9b7 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 1 Mar 2020 17:55:43 +0000 Subject: [PATCH 554/973] Fix recent clang-format breaking quantum.c (#8282) --- quantum/quantum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 633492f905a1..37c374ece98a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -642,8 +642,8 @@ void matrix_scan_quantum() { // Functions for spitting out values // -void send_dword(uint32_t number) { // this might not actually work - uint16_tword = (number >> 16); +void send_dword(uint32_t number) { + uint16_t word = (number >> 16); send_word(word); send_word(number & 0xFFFFUL); } From e7fb873ee281d93dbf96f369bd3a0a50e766eda3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 1 Mar 2020 18:46:40 +0000 Subject: [PATCH 555/973] Short term fix for conflicting types for 'tfp_printf' (#8157) --- tmk_core/common/chibios/printf.c | 14 +++++++++----- tmk_core/common/chibios/printf.h | 6 +++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tmk_core/common/chibios/printf.c b/tmk_core/common/chibios/printf.c index 3a81acd3126c..17c1e6341666 100644 --- a/tmk_core/common/chibios/printf.c +++ b/tmk_core/common/chibios/printf.c @@ -96,8 +96,8 @@ static int a2d(char ch) { return -1; } -static char a2i(char ch, char** src, int base, int* nump) { - char* p = *src; +static char a2i(char ch, const char** src, int base, int* nump) { + const char* p = *src; int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { @@ -119,7 +119,7 @@ static void putchw(void* putp, putcf putf, int n, char z, char* bf) { while ((ch = *bf++)) putf(putp, ch); } -void tfp_format(void* putp, putcf putf, char* fmt, va_list va) { +void tfp_format(void* putp, putcf putf, const char* fmt, va_list va) { // This used to handle max of 12, but binary support jumps this to at least 32 char bf[36]; @@ -211,19 +211,23 @@ void init_printf(void* putp, void (*putf)(void*, char)) { stdout_putp = putp; } -void tfp_printf(char* fmt, ...) { +int tfp_printf(const char* fmt, ...) { va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); va_end(va); + + return 1; } static void putcp(void* p, char c) { *(*((char**)p))++ = c; } -void tfp_sprintf(char* s, char* fmt, ...) { +int tfp_sprintf(char* s, const char* fmt, ...) { va_list va; va_start(va, fmt); tfp_format(&s, putcp, fmt, va); putcp(&s, 0); va_end(va); + + return 1; } diff --git a/tmk_core/common/chibios/printf.h b/tmk_core/common/chibios/printf.h index 2cdf55ed9045..775459e1e8af 100644 --- a/tmk_core/common/chibios/printf.h +++ b/tmk_core/common/chibios/printf.h @@ -99,10 +99,10 @@ regs Kusti, 23.10.2004 void init_printf(void* putp, void (*putf)(void*, char)); -void tfp_printf(char* fmt, ...); -void tfp_sprintf(char* s, char* fmt, ...); +int tfp_printf(const char* fmt, ...); +int tfp_sprintf(char* s, const char* fmt, ...); -void tfp_format(void* putp, void (*putf)(void*, char), char* fmt, va_list va); +void tfp_format(void* putp, void (*putf)(void*, char), const char* fmt, va_list va); #define printf tfp_printf #define sprintf tfp_sprintf From 95124bf9331e67a7373ed4e3fc4d14f23e18a85b Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sun, 1 Mar 2020 19:20:09 +0000 Subject: [PATCH 556/973] format code according to conventions [skip ci] --- tmk_core/common/chibios/printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/chibios/printf.c b/tmk_core/common/chibios/printf.c index 17c1e6341666..a99752bb3d44 100644 --- a/tmk_core/common/chibios/printf.c +++ b/tmk_core/common/chibios/printf.c @@ -98,8 +98,8 @@ static int a2d(char ch) { static char a2i(char ch, const char** src, int base, int* nump) { const char* p = *src; - int num = 0; - int digit; + int num = 0; + int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; From 3dc061ac783df2222d284696a974c3faab8715f9 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Sun, 1 Mar 2020 15:16:43 -0500 Subject: [PATCH 557/973] Make a fix to savage65 and tmov2 for via (#8286) --- keyboards/cannonkeys/savage65/keymaps/via/rules.mk | 3 +-- keyboards/cannonkeys/tmov2/keymaps/via/rules.mk | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/keyboards/cannonkeys/savage65/keymaps/via/rules.mk b/keyboards/cannonkeys/savage65/keymaps/via/rules.mk index d12497792d56..925eb95d6b20 100644 --- a/keyboards/cannonkeys/savage65/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/savage65/keymaps/via/rules.mk @@ -1,5 +1,4 @@ # rules.mk overrides to enable VIA -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk b/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk index d12497792d56..925eb95d6b20 100644 --- a/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/tmov2/keymaps/via/rules.mk @@ -1,5 +1,4 @@ # rules.mk overrides to enable VIA -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes From 88356c85c412253ba239e855b7ab0b2431547fab Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 1 Mar 2020 20:22:13 +0000 Subject: [PATCH 558/973] Prune out pure software pwm && custom driver && remove wrapping BACKLIGHT_PIN (#8041) --- quantum/backlight/backlight_avr.c | 525 ++++++++++++++---------------- 1 file changed, 241 insertions(+), 284 deletions(-) diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c index 519c0c2cf27f..ce6611fb5aca 100644 --- a/quantum/backlight/backlight_avr.c +++ b/quantum/backlight/backlight_avr.c @@ -2,7 +2,9 @@ #include "backlight.h" #include "debug.h" -#if defined(BACKLIGHT_ENABLE) && (defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS)) +#if !defined(BACKLIGHT_PIN) && !defined(BACKLIGHT_PINS) +# error "Backlight pin/pins not defined. Please configure." +#endif // This logic is a bit complex, we support 3 setups: // @@ -12,262 +14,223 @@ // depends on the Audio setup (Audio wins over Backlight). // 3. Full software PWM, driven by the matrix scan, if both timers are used by Audio. -# if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == B5 || BACKLIGHT_PIN == B6 || BACKLIGHT_PIN == B7) -# define HARDWARE_PWM -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_OVF_vect TIMER1_OVF_vect -# define TIMSKx TIMSK1 -# define TOIEx TOIE1 - -# if BACKLIGHT_PIN == B5 -# define COMxx0 COM1A0 -# define COMxx1 COM1A1 -# define OCRxx OCR1A -# elif BACKLIGHT_PIN == B6 -# define COMxx0 COM1B0 -# define COMxx1 COM1B1 -# define OCRxx OCR1B -# elif BACKLIGHT_PIN == B7 -# define COMxx0 COM1C0 -# define COMxx1 COM1C1 -# define OCRxx OCR1C -# endif -# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == C4 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) -# define HARDWARE_PWM -# define ICRx ICR3 -# define TCCRxA TCCR3A -# define TCCRxB TCCR3B -# define TIMERx_OVF_vect TIMER3_OVF_vect -# define TIMSKx TIMSK3 -# define TOIEx TOIE3 - -# if BACKLIGHT_PIN == C4 -# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) -# error This MCU has no C4 pin! -# else -# define COMxx0 COM3C0 -# define COMxx1 COM3C1 -# define OCRxx OCR3C -# endif -# elif BACKLIGHT_PIN == C5 -# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) -# error This MCU has no C5 pin! -# else -# define COMxx0 COM3B0 -# define COMxx1 COM3B1 -# define OCRxx OCR3B -# endif -# elif BACKLIGHT_PIN == C6 -# define COMxx0 COM3A0 -# define COMxx1 COM3A1 -# define OCRxx OCR3A +#if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == B5 || BACKLIGHT_PIN == B6 || BACKLIGHT_PIN == B7) +# define HARDWARE_PWM +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TIMSKx TIMSK1 +# define TOIEx TOIE1 + +# if BACKLIGHT_PIN == B5 +# define COMxx0 COM1A0 +# define COMxx1 COM1A1 +# define OCRxx OCR1A +# elif BACKLIGHT_PIN == B6 +# define COMxx0 COM1B0 +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# elif BACKLIGHT_PIN == B7 +# define COMxx0 COM1C0 +# define COMxx1 COM1C1 +# define OCRxx OCR1C +# endif +#elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) && (BACKLIGHT_PIN == C4 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) +# define HARDWARE_PWM +# define ICRx ICR3 +# define TCCRxA TCCR3A +# define TCCRxB TCCR3B +# define TIMERx_OVF_vect TIMER3_OVF_vect +# define TIMSKx TIMSK3 +# define TOIEx TOIE3 + +# if BACKLIGHT_PIN == C4 +# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) +# error This MCU has no C4 pin! +# else +# define COMxx0 COM3C0 +# define COMxx1 COM3C1 +# define OCRxx OCR3C # endif -# elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) -# define HARDWARE_PWM -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_OVF_vect TIMER1_OVF_vect -# define TIMSKx TIMSK1 -# define TOIEx TOIE1 - -# if BACKLIGHT_PIN == B7 -# define COMxx0 COM1C0 -# define COMxx1 COM1C1 -# define OCRxx OCR1C -# elif BACKLIGHT_PIN == C5 -# define COMxx0 COM1B0 -# define COMxx1 COM1B1 -# define OCRxx OCR1B -# elif BACKLIGHT_PIN == C6 -# define COMxx0 COM1A0 -# define COMxx1 COM1A1 -# define OCRxx OCR1A +# elif BACKLIGHT_PIN == C5 +# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) +# error This MCU has no C5 pin! +# else +# define COMxx0 COM3B0 +# define COMxx1 COM3B1 +# define OCRxx OCR3B # endif -# elif defined(__AVR_ATmega32A__) && (BACKLIGHT_PIN == D4 || BACKLIGHT_PIN == D5) -# define HARDWARE_PWM -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_OVF_vect TIMER1_OVF_vect +# elif BACKLIGHT_PIN == C6 +# define COMxx0 COM3A0 +# define COMxx1 COM3A1 +# define OCRxx OCR3A +# endif +#elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) +# define HARDWARE_PWM +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TIMSKx TIMSK1 +# define TOIEx TOIE1 + +# if BACKLIGHT_PIN == B7 +# define COMxx0 COM1C0 +# define COMxx1 COM1C1 +# define OCRxx OCR1C +# elif BACKLIGHT_PIN == C5 +# define COMxx0 COM1B0 +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# elif BACKLIGHT_PIN == C6 +# define COMxx0 COM1A0 +# define COMxx1 COM1A1 +# define OCRxx OCR1A +# endif +#elif defined(__AVR_ATmega32A__) && (BACKLIGHT_PIN == D4 || BACKLIGHT_PIN == D5) +# define HARDWARE_PWM +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TIMSKx TIMSK +# define TOIEx TOIE1 + +# if BACKLIGHT_PIN == D4 +# define COMxx0 COM1B0 +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# elif BACKLIGHT_PIN == D5 +# define COMxx0 COM1A0 +# define COMxx1 COM1A1 +# define OCRxx OCR1A +# endif +#elif defined(__AVR_ATmega328P__) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2) +# define HARDWARE_PWM +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TIMSKx TIMSK1 +# define TOIEx TOIE1 + +# if BACKLIGHT_PIN == B1 +# define COMxx0 COM1A0 +# define COMxx1 COM1A1 +# define OCRxx OCR1A +# elif BACKLIGHT_PIN == B2 +# define COMxx0 COM1B0 +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# endif +#elif !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO) +// Timer 1 is not in use by Audio feature, Backlight can use it +# pragma message "Using hardware timer 1 with software PWM" +# define HARDWARE_PWM +# define BACKLIGHT_PWM_TIMER +# define ICRx ICR1 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define TIMERx_COMPA_vect TIMER1_COMPA_vect +# define TIMERx_OVF_vect TIMER1_OVF_vect +# if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register # define TIMSKx TIMSK -# define TOIEx TOIE1 - -# if BACKLIGHT_PIN == D4 -# define COMxx0 COM1B0 -# define COMxx1 COM1B1 -# define OCRxx OCR1B -# elif BACKLIGHT_PIN == D5 -# define COMxx0 COM1A0 -# define COMxx1 COM1A1 -# define OCRxx OCR1A -# endif -# elif defined(__AVR_ATmega328P__) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2) -# define HARDWARE_PWM -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_OVF_vect TIMER1_OVF_vect -# define TIMSKx TIMSK1 -# define TOIEx TOIE1 - -# if BACKLIGHT_PIN == B1 -# define COMxx0 COM1A0 -# define COMxx1 COM1A1 -# define OCRxx OCR1A -# elif BACKLIGHT_PIN == B2 -# define COMxx0 COM1B0 -# define COMxx1 COM1B1 -# define OCRxx OCR1B -# endif # else -# if !defined(BACKLIGHT_CUSTOM_DRIVER) -# if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO) -// Timer 1 is not in use by Audio feature, Backlight can use it -# pragma message "Using hardware timer 1 with software PWM" -# define HARDWARE_PWM -# define BACKLIGHT_PWM_TIMER -# define ICRx ICR1 -# define TCCRxA TCCR1A -# define TCCRxB TCCR1B -# define TIMERx_COMPA_vect TIMER1_COMPA_vect -# define TIMERx_OVF_vect TIMER1_OVF_vect -# if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register -# define TIMSKx TIMSK -# else -# define TIMSKx TIMSK1 -# endif -# define TOIEx TOIE1 - -# define OCIExA OCIE1A -# define OCRxx OCR1A -# elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO) -# pragma message "Using hardware timer 3 with software PWM" -// Timer 3 is not in use by Audio feature, Backlight can use it -# define HARDWARE_PWM -# define BACKLIGHT_PWM_TIMER -# define ICRx ICR1 -# define TCCRxA TCCR3A -# define TCCRxB TCCR3B -# define TIMERx_COMPA_vect TIMER3_COMPA_vect -# define TIMERx_OVF_vect TIMER3_OVF_vect -# define TIMSKx TIMSK3 -# define TOIEx TOIE3 - -# define OCIExA OCIE3A -# define OCRxx OCR3A -# else -# pragma message "Audio in use - using pure software PWM" -# define NO_HARDWARE_PWM -# endif -# else -# pragma message "Custom driver defined - using pure software PWM" -# define NO_HARDWARE_PWM -# endif +# define TIMSKx TIMSK1 # endif +# define TOIEx TOIE1 -# ifndef BACKLIGHT_ON_STATE -# define BACKLIGHT_ON_STATE 1 -# endif +# define OCIExA OCIE1A +# define OCRxx OCR1A +#elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO) +# pragma message "Using hardware timer 3 with software PWM" +// Timer 3 is not in use by Audio feature, Backlight can use it +# define HARDWARE_PWM +# define BACKLIGHT_PWM_TIMER +# define ICRx ICR1 +# define TCCRxA TCCR3A +# define TCCRxB TCCR3B +# define TIMERx_COMPA_vect TIMER3_COMPA_vect +# define TIMERx_OVF_vect TIMER3_OVF_vect +# define TIMSKx TIMSK3 +# define TOIEx TOIE3 + +# define OCIExA OCIE3A +# define OCRxx OCR3A +#elif defined(BACKLIGHT_CUSTOM_DRIVER) +error("Please set 'BACKLIGHT_DRIVER = custom' within rules.mk") +#else +error("Please set 'BACKLIGHT_DRIVER = software' within rules.mk") +#endif + +#ifndef BACKLIGHT_ON_STATE +# define BACKLIGHT_ON_STATE 1 +#endif void backlight_on(pin_t backlight_pin) { -# if BACKLIGHT_ON_STATE == 1 +#if BACKLIGHT_ON_STATE == 1 writePinHigh(backlight_pin); -# else +#else writePinLow(backlight_pin); -# endif +#endif } void backlight_off(pin_t backlight_pin) { -# if BACKLIGHT_ON_STATE == 1 +#if BACKLIGHT_ON_STATE == 1 writePinLow(backlight_pin); -# else +#else writePinHigh(backlight_pin); -# endif +#endif } -# if defined(NO_HARDWARE_PWM) || defined(BACKLIGHT_PWM_TIMER) // pwm through software +#ifdef BACKLIGHT_PWM_TIMER // pwm through software // we support multiple backlight pins -# ifndef BACKLIGHT_LED_COUNT -# define BACKLIGHT_LED_COUNT 1 -# endif +# ifndef BACKLIGHT_LED_COUNT +# define BACKLIGHT_LED_COUNT 1 +# endif -# if BACKLIGHT_LED_COUNT == 1 -# define BACKLIGHT_PIN_INIT \ - { BACKLIGHT_PIN } -# else -# define BACKLIGHT_PIN_INIT BACKLIGHT_PINS -# endif +# if BACKLIGHT_LED_COUNT == 1 +# define BACKLIGHT_PIN_INIT \ + { BACKLIGHT_PIN } +# else +# define BACKLIGHT_PIN_INIT BACKLIGHT_PINS +# endif -# define FOR_EACH_LED(x) \ - for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ - pin_t backlight_pin = backlight_pins[i]; \ - { x } \ - } +# define FOR_EACH_LED(x) \ + for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ + pin_t backlight_pin = backlight_pins[i]; \ + { x } \ + } static const pin_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT; -# else // full hardware PWM +#else // full hardware PWM static inline void enable_pwm(void) { -# if BACKLIGHT_ON_STATE == 1 +# if BACKLIGHT_ON_STATE == 1 TCCRxA |= _BV(COMxx1); -# else +# else TCCRxA |= _BV(COMxx1) | _BV(COMxx0); -# endif +# endif } static inline void disable_pwm(void) { -# if BACKLIGHT_ON_STATE == 1 +# if BACKLIGHT_ON_STATE == 1 TCCRxA &= ~(_BV(COMxx1)); -# else +# else TCCRxA &= ~(_BV(COMxx1) | _BV(COMxx0)); -# endif +# endif } // we support only one backlight pin static const pin_t backlight_pin = BACKLIGHT_PIN; -# define FOR_EACH_LED(x) x - -# endif - -# ifdef NO_HARDWARE_PWM -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);) - -# ifdef BACKLIGHT_BREATHING - if (is_backlight_breathing()) { - breathing_enable(); - } -# endif -} - -uint8_t backlight_tick = 0; - -# ifndef BACKLIGHT_CUSTOM_DRIVER -void backlight_task(void) { - if ((0xFFFF >> ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { - FOR_EACH_LED(backlight_on(backlight_pin);) - } else { - FOR_EACH_LED(backlight_off(backlight_pin);) - } - backlight_tick = (backlight_tick + 1) % 16; -} -# endif - -# ifdef BACKLIGHT_BREATHING -# ifndef BACKLIGHT_CUSTOM_DRIVER -# error "Backlight breathing only available with hardware PWM. Please disable." -# endif -# endif +# define FOR_EACH_LED(x) x -# else // hardware pwm through timer +#endif -# ifdef BACKLIGHT_PWM_TIMER +#ifdef BACKLIGHT_PWM_TIMER // The idea of software PWM assisted by hardware timers is the following // we use the hardware timer in fast PWM mode like for hardware PWM, but @@ -288,11 +251,11 @@ ISR(TIMERx_COMPA_vect) { FOR_EACH_LED(backlight_off(backlight_pin);) } // Triggered when the counter reaches the TOP value // this one triggers at F_CPU/65536 =~ 244 Hz ISR(TIMERx_OVF_vect) { -# ifdef BACKLIGHT_BREATHING +# ifdef BACKLIGHT_BREATHING if (is_breathing()) { breathing_task(); } -# endif +# endif // for very small values of OCRxx (or backlight level) // we can't guarantee this whole code won't execute // at the same time as the compare match interrupt @@ -306,9 +269,9 @@ ISR(TIMERx_OVF_vect) { } } -# endif +#endif -# define TIMER_TOP 0xFFFFU +#define TIMER_TOP 0xFFFFU // See http://jared.geek.nz/2013/feb/linear-led-pwm static uint16_t cie_lightness(uint16_t v) { @@ -329,88 +292,86 @@ static uint16_t cie_lightness(uint16_t v) { // range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val. static inline void set_pwm(uint16_t val) { OCRxx = val; } -# ifndef BACKLIGHT_CUSTOM_DRIVER void backlight_set(uint8_t level) { if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; if (level == 0) { -# ifdef BACKLIGHT_PWM_TIMER +#ifdef BACKLIGHT_PWM_TIMER if (OCRxx) { TIMSKx &= ~(_BV(OCIExA)); TIMSKx &= ~(_BV(TOIEx)); } -# else +#else // Turn off PWM control on backlight pin disable_pwm(); -# endif +#endif FOR_EACH_LED(backlight_off(backlight_pin);) } else { -# ifdef BACKLIGHT_PWM_TIMER +#ifdef BACKLIGHT_PWM_TIMER if (!OCRxx) { TIMSKx |= _BV(OCIExA); TIMSKx |= _BV(TOIEx); } -# else +#else // Turn on PWM control of backlight pin enable_pwm(); -# endif +#endif } // Set the brightness set_pwm(cie_lightness(TIMER_TOP * (uint32_t)level / BACKLIGHT_LEVELS)); } void backlight_task(void) {} -# endif // BACKLIGHT_CUSTOM_DRIVER -# ifdef BACKLIGHT_BREATHING +#ifdef BACKLIGHT_BREATHING -# define BREATHING_NO_HALT 0 -# define BREATHING_HALT_OFF 1 -# define BREATHING_HALT_ON 2 -# define BREATHING_STEPS 128 +# define BREATHING_NO_HALT 0 +# define BREATHING_HALT_OFF 1 +# define BREATHING_HALT_ON 2 +# define BREATHING_STEPS 128 -static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint8_t breathing_halt = BREATHING_NO_HALT; static uint16_t breathing_counter = 0; -# ifdef BACKLIGHT_PWM_TIMER +# ifdef BACKLIGHT_PWM_TIMER static bool breathing = false; bool is_breathing(void) { return breathing; } -# define breathing_interrupt_enable() \ - do { \ - breathing = true; \ - } while (0) -# define breathing_interrupt_disable() \ - do { \ - breathing = false; \ - } while (0) -# else +# define breathing_interrupt_enable() \ + do { \ + breathing = true; \ + } while (0) +# define breathing_interrupt_disable() \ + do { \ + breathing = false; \ + } while (0) +# else bool is_breathing(void) { return !!(TIMSKx & _BV(TOIEx)); } -# define breathing_interrupt_enable() \ - do { \ - TIMSKx |= _BV(TOIEx); \ - } while (0) -# define breathing_interrupt_disable() \ - do { \ - TIMSKx &= ~_BV(TOIEx); \ - } while (0) -# endif - -# define breathing_min() \ - do { \ - breathing_counter = 0; \ - } while (0) -# define breathing_max() \ - do { \ - breathing_counter = get_breathing_period() * 244 / 2; \ - } while (0) +# define breathing_interrupt_enable() \ + do { \ + TIMSKx |= _BV(TOIEx); \ + } while (0) +# define breathing_interrupt_disable() \ + do { \ + TIMSKx &= ~_BV(TOIEx); \ + } while (0) +# endif + +# define breathing_min() \ + do { \ + breathing_counter = 0; \ + } while (0) +# define breathing_max() \ + do { \ + breathing_counter = get_breathing_period() * 244 / 2; \ + } while (0) void breathing_enable(void) { breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; + breathing_halt = BREATHING_NO_HALT; breathing_interrupt_enable(); } @@ -451,20 +412,20 @@ static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {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(); } -# ifdef BACKLIGHT_PWM_TIMER +# ifdef BACKLIGHT_PWM_TIMER void breathing_task(void) -# else +# else /* Assuming a 16MHz CPU clock and a timer that resets at 64k (ICR1), the following interrupt handler will run * about 244 times per second. */ ISR(TIMERx_OVF_vect) -# endif +# endif { - uint8_t breathing_period = get_breathing_period(); - uint16_t interval = (uint16_t)breathing_period * 244 / BREATHING_STEPS; + 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); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; + 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(); @@ -473,7 +434,7 @@ ISR(TIMERx_OVF_vect) set_pwm(cie_lightness(scale_backlight((uint16_t)pgm_read_byte(&breathing_table[index]) * 0x0101U))); } -# endif // BACKLIGHT_BREATHING +#endif // BACKLIGHT_BREATHING void backlight_init_ports(void) { // Setup backlight pin as output and output to on state. @@ -483,12 +444,12 @@ void backlight_init_ports(void) { // Go read the ATmega32u4 datasheet. // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on -# ifdef BACKLIGHT_PWM_TIMER +#ifdef BACKLIGHT_PWM_TIMER // TimerX setup, Fast PWM mode count to TOP set in ICRx TCCRxA = _BV(WGM11); // = 0b00000010; // clock select clk/1 TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; -# else // hardware PWM +#else // hardware PWM // Pin PB7 = OCR1C (Timer 1, Channel C) // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 // (i.e. start high, go low when counter matches.) @@ -500,25 +461,21 @@ void backlight_init_ports(void) { "In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]." "In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)." */ -# if BACKLIGHT_ON_STATE == 1 +# if BACKLIGHT_ON_STATE == 1 TCCRxA = _BV(COMxx1) | _BV(WGM11); -# else +# else TCCRxA = _BV(COMxx1) | _BV(COMxx0) | _BV(WGM11); -# endif +# endif TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); -# endif +#endif // Use full 16-bit resolution. Counter counts to ICR1 before reset to 0. ICRx = TIMER_TOP; backlight_init(); -# ifdef BACKLIGHT_BREATHING +#ifdef BACKLIGHT_BREATHING if (is_backlight_breathing()) { breathing_enable(); } -# endif +#endif } - -# endif // hardware backlight - -#endif // backlight From c543ccf07c9b3fa7ce64d19e7d54dc9404591c44 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Sun, 1 Mar 2020 16:30:01 -0500 Subject: [PATCH 559/973] Get the direction right on the S75 encoder (#8287) --- keyboards/cannonkeys/satisfaction75/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 49ed407b3ba0..3639a3eaa2fe 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -35,8 +35,8 @@ 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 { B8 } -#define ENCODERS_PAD_B { B9 } +#define ENCODERS_PAD_A { B9 } +#define ENCODERS_PAD_B { B8 } #define ENCODER_RESOLUTION 2 From 78069d482634b3b727e5d09b526fa24c227cc4e2 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 2 Mar 2020 09:36:17 +1100 Subject: [PATCH 560/973] Add onekey keymap for testing reset to bootloader. (#8288) --- keyboards/handwired/onekey/keymaps/reset/keymap.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 keyboards/handwired/onekey/keymaps/reset/keymap.c diff --git a/keyboards/handwired/onekey/keymaps/reset/keymap.c b/keyboards/handwired/onekey/keymaps/reset/keymap.c new file mode 100644 index 000000000000..6a68fda81888 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/reset/keymap.c @@ -0,0 +1,5 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( RESET ) +}; From b72a1aa3fec986bfa7e439b68d6b7546ab1e280b Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Sun, 1 Mar 2020 21:17:09 -0800 Subject: [PATCH 561/973] Rewrite the Bathroom Epiphanies Frosty Flake matrix and LED handling (#8243) * Keyboard: revamp frosty-flake leds This commit transitions bpiphany/frosty_flake to led_update_{kb,user} and rewrites the AVR bit twiddling logic to use the standard QMK GPIO API. * Keyboard: rewrite frosty_flake's matrix reader to be a lite custom matrix This commit replaces frosty_flake's custom matrix and debounce logic with a "lite" custom matrix. In addition to being somewhat clearer, this allows a consumer of the flake board to choose their own debouncing algorithm. The one closest to the implementation originally in use is sym_g, but this opens us up to supporting eager_pk and eager_pr. The original matrix code was 18 columns for 8 rows, but using a single row read and unpacking the bits into individual columns. To simplify, I've changed the key layout to be 8C 18R instead of 18C 8R: this lets us use a single read directly into the matrix _and_ drop down to a uint8_t instead of a uint32_t for matrix_row_t. Since we're no longer implementing our own debouncing and row unpacking, we save ~400 bytes on the final firmware image. Fully tested against a CM Storm QFR hosting the flake -- this commit message was written using the new matrix code. Firmware Sizes (assuming stock configuration as of 42d6270f2) Matrix+Debounce Size (bytes) --------------- ------------ original 17740 new + sym_g 17284 new + eager_pr 18106 new + eager_pk 18204 I expect that there are some scanning speed benefits as well. * Keyboard: update frosty_flake's UNUSED_PINS * Keyboard: Remove meaningless weak redefinitions from frosty These are not necessary (and all of them already live somewhere in Quantum). --- keyboards/bpiphany/frosty_flake/config.h | 6 +- .../bpiphany/frosty_flake/frosty_flake.c | 73 +++--------- .../bpiphany/frosty_flake/frosty_flake.h | 58 ++++++---- keyboards/bpiphany/frosty_flake/matrix.c | 106 +++--------------- keyboards/bpiphany/frosty_flake/rules.mk | 2 +- 5 files changed, 77 insertions(+), 168 deletions(-) diff --git a/keyboards/bpiphany/frosty_flake/config.h b/keyboards/bpiphany/frosty_flake/config.h index 250a1b775b28..79bc31aec696 100644 --- a/keyboards/bpiphany/frosty_flake/config.h +++ b/keyboards/bpiphany/frosty_flake/config.h @@ -36,13 +36,13 @@ along with this program. If not, see . */ /* key matrix size */ -#define MATRIX_ROWS 8 // Row0 - Row7 in the schematic -#define MATRIX_COLS 18 // ColA - ColR in the schematic +#define MATRIX_ROWS 18 // ColA - ColR in the schematic +#define MATRIX_COLS 8 // Row0 - Row7 in the schematic /* * Keyboard Matrix Assignments */ -#define UNUSED_PINS { B0, C4, D3 } +#define UNUSED_PINS { C0, C1, C2, C3, C4, D2, D7 } /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/bpiphany/frosty_flake/frosty_flake.c b/keyboards/bpiphany/frosty_flake/frosty_flake.c index 1cd47603893b..be4e1a312486 100644 --- a/keyboards/bpiphany/frosty_flake/frosty_flake.c +++ b/keyboards/bpiphany/frosty_flake/frosty_flake.c @@ -1,63 +1,24 @@ #include "frosty_flake.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); +void keyboard_pre_init_kb() { + setPinOutput(B7); // num lock + writePinHigh(B7); + setPinOutput(C5); // caps lock + writePinHigh(C7); + setPinOutput(C6); // scroll lock + writePinHigh(C6); + + keyboard_pre_init_user(); } -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} +bool led_update_kb(led_t usb_led) { + // user requests no further processing + if (!led_update_user(usb_led)) + return true; -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 + writePin(C5, !usb_led.caps_lock); + writePin(B7, !usb_led.num_lock); + writePin(C6, !usb_led.scroll_lock); - return process_record_user(keycode, record); + return true; } - -void led_set_kb(uint8_t usb_led) { - DDRB |= (1<<7); - DDRC |= (1<<5) | (1<<6); - - print_dec(usb_led); - - if (usb_led & (1<. */ -#include -#include -#include #include -#include "print.h" -#include "debug.h" -#include "util.h" #include "matrix.h" -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[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) { -} - static matrix_row_t scan_col(void) { + // Each of the 8 columns is read off pins as below + // 7 6 5 4 3 2 1 0 + // ,--,--,--,--,--,--,--,--, + // |B0|B3|B2|B1|B6|B4|B5|C7| + // `--`--`--`--`--`--`--`--` return ( (PINC&(1<<7) ? 0 : ((matrix_row_t)1<<0)) | (PINB&(1<<5) ? 0 : ((matrix_row_t)1<<1)) | @@ -63,8 +36,8 @@ static matrix_row_t scan_col(void) { ); } -static void select_col(uint8_t col) { - switch (col) { +static void select_row(uint8_t row) { + switch (row) { case 0: PORTD = (PORTD & ~0b01111011) | 0b00011011; break; case 1: PORTD = (PORTD & ~0b01111011) | 0b01000011; break; case 2: PORTD = (PORTD & ~0b01111011) | 0b01101010; break; @@ -86,7 +59,7 @@ static void select_col(uint8_t col) { } } -void matrix_init(void) { +void matrix_init_custom(void) { /* Row output pins */ DDRD |= 0b01111011; /* Column input pins */ @@ -94,62 +67,19 @@ void matrix_init(void) { DDRB &= ~0b01111111; PORTC |= 0b10000000; PORTB |= 0b01111111; - - for (uint8_t i=0; i < MATRIX_ROWS; i++) - matrix[i] = matrix_debouncing[i] = 0; - - matrix_init_quantum(); } -uint8_t matrix_scan(void) { - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - select_col(col); - _delay_us(3); - matrix_row_t col_scan = scan_col(); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< Date: Sun, 1 Mar 2020 22:29:26 -0800 Subject: [PATCH 562/973] [Docs] Update ISP Flashing guide (#8149) * [Docs] Update ISP Flashing guide * Apply suggestions from code review AKA why you shouldn't write docs at 2am Co-Authored-By: fauxpark Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update workding for planck-qmk-dfu Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- docs/isp_flashing_guide.md | 153 ++++++++++++++++++++++++++++++++----- 1 file changed, 133 insertions(+), 20 deletions(-) diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md index 0f786c5141bf..944dd3462229 100644 --- a/docs/isp_flashing_guide.md +++ b/docs/isp_flashing_guide.md @@ -1,6 +1,14 @@ # ISP Flashing Guide -If you're having trouble flashing/erasing your board, and running into cryptic error messages like any of the following: +ISP flashing (also known as ICSP flashing) is the process of programming a microcontroller directly. This allows you to replace the bootloader, or change the "fuses" on the controller, which control a number of hardware- and software-related functions, such as the speed of the controller, how it boots, and other options. + +The main use of ISP flashing for QMK is flashing or replacing the bootloader on your AVR-based controller (Pro Micros, or V-USB chips). + +?> This is only for programming AVR based boards, such as the Pro Micro or other ATmega controllers. It is not for Arm controllers, such as the Proton C. + +## Dealing with Corrupted Bootloaders + +If you're having trouble flashing/erasing your board, and running into cryptic error messages like any of the following for a DFU based controller: libusb: warning [darwin_transfer_status] transfer error: timed out dfu.c:844: -ETIMEDOUT: Transfer timed out, NAK 0xffffffc4 (-60) @@ -19,16 +27,60 @@ If you're having trouble flashing/erasing your board, and running into cryptic e Memory write error, use debug for more info. commands.c:360: Error writing memory data. (err -4) -You're likely going to need to ISP flash your board/device to get it working again. Luckily, this process is pretty straight-forward, provided you have any extra programmable keyboard, Pro Micro, or Teensy 2.0/Teensy 2.0++. There are also dedicated ISP flashers available for this, but most cost >$15, and it's assumed that if you are googling this error, this is the first you've heard about ISP flashing, and don't have one readily available (whereas you might have some other AVR board). __We'll be using a Teensy 2.0 or Pro Micro with Windows 10 in this guide__ - if you are comfortable doing this on another system, please consider editing this guide and contributing those instructions! +Or, if you see this sort of message for a Pro Micro based controller: + + avrdude: butterfly_recv(): programmer is not responding + avrdude: butterfly_recv(): programmer is not responding + avrdude: verification error, first mismatch at byte 0x002a + 0x2b != 0x75 + avrdude: verification error; content mismatch + avrdude: verification error; content mismatch + + +You're likely going to need to ISP flash your board/device to get it working again. + +## Hardware Needed + +You'll need one of the following to actually perform the ISP flashing (followed by the protocol they use): + +* [SparkFun PocketAVR](https://www.sparkfun.com/products/9825) - (USB Tiny) +* [USBtinyISP AVR Programmer Kit](https://www.adafruit.com/product/46) - (USB Tiny) +* [Teensy 2.0](https://www.pjrc.com/store/teensy.html) - (avrisp) +* [Pro Micro](https://www.sparkfun.com/products/12640) - (avrisp) +* [Bus Pirate](https://www.adafruit.com/product/237) - (buspirate) + +There are other devices that can be used to ISP flash, but these are the main ones. Also, all product links are to the official versions. You can source them elsewhere. + +You'll also need something to wire your "ISP Programmer" to the device that you're programming. Some PCBs may have ISP headers that you can use directly, but this often isn't the case, so you'll likely need to solder to the controller itself or to different switches or other components. + +### The ISP Firmware + +The Teensy and Pro Micro controllers will need you to flash the ISP firmware to the controllers before you can use them as an ISP programmer. The rest of the hardware should come preprogrammed. So, for these controllers, download the correct hex file, and flash it first. + +* Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`) +* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`10/B6`) + +Once you've flashed your controller, you won't need this hex file anymore. ## Software Needed -* [Teensy Loader](https://www.pjrc.com/teensy/loader.html) (if using a Teensy) -* QMK Toolbox (flash as usual - be sure to select the correct MCU) or `avrdude` via [WinAVR](http://www.ladyada.net/learn/avr/setup-win.html) (for Teensy & Pro Micro) +The QMK Toolbox can be used for most (all) of this. + +However, you can grab the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to flash your Teensy 2.0 board, if you are using that. Or you can use `avrdude` (installed as part of `qmk_install.sh`), or [AVRDUDESS](https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/) (for Windows) to flash the Pro Micro, and the ISP flashing. + ## Wiring -This is pretty straight-forward - we'll be connecting like-things to like-things in the following manner: +This is pretty straight-forward - we'll be connecting like-things to like-things in the following manner. + +### SparkFun Pocket AVR + + PocketAVR RST <-> Keyboard RESET + PocketAVR SCLK <-> Keyboard B1 (SCLK) + PocketAVR MOSI <-> Keyboard B2 (MOSI) + PocketAVR MISO <-> Keyboard B3 (MISO) + PocketAVR VCC <-> Keyboard VCC + PocketAVR GND <-> Keyboard GND ### Teensy 2.0 @@ -39,6 +91,8 @@ This is pretty straight-forward - we'll be connecting like-things to like-things Teensy VCC <-> Keyboard VCC Teensy GND <-> Keyboard GND +!> Note that the B0 pin on the Teensy is wired to the RESET/RST pin on the keyboard's controller. ***DO NOT*** wire the RESET pin on the Teensy to the RESET on the keyboard. + ### Pro Micro Pro Micro 10 (B6) <-> Keyboard RESET @@ -48,45 +102,61 @@ This is pretty straight-forward - we'll be connecting like-things to like-things Pro Micro VCC <-> Keyboard VCC Pro Micro GND <-> Keyboard GND -## The ISP Firmware (now pre-compiled) +!> Note that the 10/B6 pin on the Pro Micro is wired to the RESET/RST pin on the keyboard's controller. ***DO NOT*** wire the RESET pin on the Pro Micro to the RESET on the keyboard. -The only difference between the .hex files below is which pin is connected to RESET. You can use them on other boards as well, as long as you're aware of the pins being used. If for some reason neither of these pins are available, [create an issue](https://github.com/qmk/qmk_firmware/issues/new), and we can generate one for you! -* Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`) -* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`B6/10`) +## Flashing Your Keyboard + +After you have your ISP programmer set up, and wired to your keyboard, it's time to flash your keyboard. -**Flash your Teenys/Pro Micro with one of these and continue - you won't need the file after flashing your ISP device.** +### The Bootloader File -## Just the Bootloader File +The simplest and quickest way to get things back to normal is to flash only a bootloader to the keyboard. Once this is done, you can connect the keyboard normally and flash the keyboard like you normally would. -If you just want to get things back to normal, you can flash only a bootloader from [`util/` folder](https://github.com/qmk/qmk_firmware/tree/master/util), and use your normal process to flash the firmware afterwards. Be sure to flash the correct bootloader for your chip: +You can find the stock bootloaders in the [`util/` folder](https://github.com/qmk/qmk_firmware/tree/master/util). Be sure to flash the correct bootloader for your chip: * [`atmega32u4`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) - Most keyboards, Planck Rev 1-5, Preonic Rev 1-2 +* [`Pro Micro`](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro16.hex) - The default bootloader for Pro Micro controllers * [`at90usb1286`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128x_1_0_1.hex) - Planck Light Rev 1 -* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40 +* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40, and other V-USB/ps2avrGB keyboards If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU =` line will have the value you need. It may differ between different versions of the board. -### Advanced/Production Techniques +### Production Techniques -If you'd like to flash both the bootloader **and** the regular firmware at the same time, you need to combine the files. +If you'd like to flash both the bootloader **and** the regular firmware at the same time, there are two options to do so. Manually, or with the `:production` target when compiling. + +To do this manually: 1. Open the original firmware .hex file in a text editor 2. Remove the last line (which should be `:00000001FF` - this is an EOF message) 3. Copy the entire bootloader's contents onto a new line (with no empty lines between) and paste it at the end of the original file 4. Save it as a new file by naming it `__production.hex` -It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to use ISP again to write new firmware to your keyboard. +?> It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to use ISP again to write new firmware to your keyboard. + +To do this the easy way, you can flash the board using the `:production` target when compiling. This compiles the firmware, then compiles the QMK DFU bootloader, and then creates a combined image. Once this is done, you'll see three files: +* `_.hex` +* `__bootloader.hex` +* `__production.hex` + +The QMK DFU bootloader has only really been tested on `atmega32u4` controllers (such as the AVR based Planck boards, and the Pro Micro), and hasn't been tested on other controllers. However, it will definitely not work on V-USB controllers, such as the `atmega32a` or `atmega328p`. + +You can flash either the bootloader or the production firmware file. The production firmware file will take a lot longer to flash, since it's flashing a lot more data. + +?> Note: You should stay with the same bootloader. If you're using DFU already, switching to QMK DFU is fine. But flashing QMK DFU onto a Pro Micro, for instance, has additional steps needed. ## Flashing Your Bootloader/Production File -Make sure your keyboard is unplugged from any device, and plug in your Teensy. +Make sure your keyboard is unplugged from any device, and plug in your ISP Programmer. + +If you want to change bootloader types, You'll need to use the command line. ### QMK Toolbox -1. `AVRISP device connected` will show up in yellow +1. `AVRISP device connected` or `USB Tiny device connected` will show up in yellow 2. Select the correct bootloader/production .hex file with the `Open` dialog (spaces can't be in the path) -3. Be sure the correct `Microcontroller` option is selected +3. Be sure the correct `Microcontroller` option for the keyboard you're flashing (not the ISP programmer) is selected 4. Hit `Flash` 5. Wait, as nothing will output for a while, especially with production files @@ -94,7 +164,7 @@ If the verification and fuse checks are ok, you're done! Your board may restart ### Command Line -Open `cmd` and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with: +Open a terminal (`cmd` on Windows, for instance) and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with: avrdude -c avrisp -P COM3 -p atmega32u4 @@ -129,4 +199,47 @@ You should see a couple of progress bars, then you should see: Which means everything should be ok! Your board may restart automatically, otherwise, unplug your Teensy and plug in your keyboard - you can leave your Teensy wired to your keyboard while testing things, but it's recommended that you desolder it/remove the wiring once you're sure everything works. +If you're using a SparkFun PocketAVR Programmer, or another USB Tiny based ISP programmer, you will want to use something like this: + + avrdude -c usbtiny -P usb -p atmega32u4 + +#### Advanced: Changing Fuses + +If you're switching bootloaders, such as flashing QMK DFU on a Pro Micro, you will need to change the fuses, in additional to flashing the bootloader hex file. This is because `caterina` (the Pro Micro bootloader) and `dfu` handle the startup routines differently, and that behavior is controlled by the fuses. + +!> This is one area that it is very important to be careful, as changing fuses is one of the ways that you can permanently brick your controller. + +For this, we are assuming the 5V 16MHz versions of the `atmega32u4` (such as the 5V Pro Micro). + +For DFU on the `atmega32u4`, these are the fuse settings that you want: + +| Fuse | Setting | +|----------|------------------| +| Low | `0x5E` | +| High | `0xD9` or `0x99` | +| Extended | `0xC3` | + +The High fuse can be 0xD9 or 0x99. The difference is that 0xD9 disables JTAG, which QMK Firmware disables via software as well, while 0x99 doesn't disable JTAG. + +To set this add `-U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m` to your command. So the final command should look something like: + + avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m + +For Caterina on the `atmega32u4`, these are the fuse settings that you want: + +| Fuse | Setting| +|----------|--------| +| Low | `0xFF` | +| High | `0xD9` | +| Extended | `0xC3` | + +To set this add `-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xC3:m` to your command. So the final command should look something like: + + avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xC3:m + + +If you are using a different controller or want different configuration, you can use [this AVR Fuse Calculator](http://www.engbedded.com/fusecalc/) to find a better value for you. + +## Help + If you have any questions/problems, feel free to [open an issue](https://github.com/qmk/qmk_firmware/issues/new)! From 552f8d81b9bff8010b328ee944d50830cfcaea5c Mon Sep 17 00:00:00 2001 From: Ted M Lin Date: Mon, 2 Mar 2020 18:43:18 -0500 Subject: [PATCH 563/973] Reduce PROGMEM usage for sendstring LUT (#8109) * Reduce PROGMEM usage for keycode map Bit-pack the keycode bool array to gain back a small amount of flash space. The trade-off is an increase in runtime instructions when running macros. It does make the code a bit harder to read, as well as maintain. For configs that use send_string() et al, it saves ~100 bytes. * Switch to macro and common definition Rewrite the array declarations so both the unpacked (original) and packed LUT arrays can use the same value definitions. This is done by defining a macro that "knows what to do". This makes the code much easier to read and maintain. * Fix macro typos and improve perf Pack the bits in a more efficient order for extraction. And also fix the copy/paste error in the macro... * Switch fully to packed LUT Some minor reformatting. Compile tested all sendstring_xyz.h to make sure they were converted properly. Also checked that an unconverted version would generate a compile error. * Apply whitespace suggestions from code review Co-Authored-By: Ryan Co-authored-by: Ryan --- quantum/keymap_extras/sendstring_belgian.h | 69 +++++----- quantum/keymap_extras/sendstring_bepo.h | 69 +++++----- quantum/keymap_extras/sendstring_danish.h | 69 +++++----- quantum/keymap_extras/sendstring_french.h | 69 +++++----- quantum/keymap_extras/sendstring_german.h | 69 +++++----- quantum/keymap_extras/sendstring_jis.h | 35 ++--- quantum/keymap_extras/sendstring_spanish.h | 69 +++++----- quantum/keymap_extras/sendstring_turkish_f.h | 69 +++++----- quantum/keymap_extras/sendstring_turkish_q.h | 69 +++++----- quantum/keymap_extras/sendstring_uk.h | 35 ++--- quantum/quantum.c | 131 +++++++++++++------ quantum/quantum.h | 16 ++- 12 files changed, 419 insertions(+), 350 deletions(-) diff --git a/quantum/keymap_extras/sendstring_belgian.h b/quantum/keymap_extras/sendstring_belgian.h index ca0edfb683cc..ef5a2f049d9d 100644 --- a/quantum/keymap_extras/sendstring_belgian.h +++ b/quantum/keymap_extras/sendstring_belgian.h @@ -19,47 +19,48 @@ #pragma once #include "keymap_belgian.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), - 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 1, 1, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 0, 0, 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, 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, 0, 0, 0, 0 + KCLUT_ENTRY(0, 0, 0, 0, 0, 1, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 0, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 0, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, 1, 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 + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_bepo.h b/quantum/keymap_extras/sendstring_bepo.h index ca5f73d7ec31..f0cc88bd223a 100644 --- a/quantum/keymap_extras/sendstring_bepo.h +++ b/quantum/keymap_extras/sendstring_bepo.h @@ -19,47 +19,48 @@ #pragma once #include "keymap_bepo.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), - 0, 1, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 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, 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, 0, 0, 0 + KCLUT_ENTRY(0, 1, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, 1, 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, 1, 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, 1, 1, 1, 1, 0 + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 1, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 1, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_danish.h b/quantum/keymap_extras/sendstring_danish.h index 3505a076bd30..43b6a56cf850 100644 --- a/quantum/keymap_extras/sendstring_danish.h +++ b/quantum/keymap_extras/sendstring_danish.h @@ -19,47 +19,48 @@ #pragma once #include "keymap_danish.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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 + KCLUT_ENTRY(0, 1, 1, 1, 0, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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 + KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_french.h b/quantum/keymap_extras/sendstring_french.h index 966685ccca50..04b65ee919d2 100644 --- a/quantum/keymap_extras/sendstring_french.h +++ b/quantum/keymap_extras/sendstring_french.h @@ -19,47 +19,48 @@ #pragma once #include "keymap_french.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), - 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 1, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 0, 0, 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, 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 + KCLUT_ENTRY(0, 0, 0, 0, 0, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 0, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, 1, 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 + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_german.h b/quantum/keymap_extras/sendstring_german.h index 3f27a9b2cabe..1bbdcce2ca8d 100644 --- a/quantum/keymap_extras/sendstring_german.h +++ b/quantum/keymap_extras/sendstring_german.h @@ -19,47 +19,48 @@ #pragma once #include "keymap_german.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), - 0, 1, 1, 0, 1, 1, 1, 1, - 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, 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 + KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, - 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 + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_jis.h b/quantum/keymap_extras/sendstring_jis.h index 421ceb0438ed..8b0dc99561c4 100644 --- a/quantum/keymap_extras/sendstring_jis.h +++ b/quantum/keymap_extras/sendstring_jis.h @@ -19,27 +19,28 @@ #pragma once #include "keymap_jp.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 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, 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, 1, 1, 1, 1, 0 + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 1, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_spanish.h b/quantum/keymap_extras/sendstring_spanish.h index 92bada269a04..70e67165396d 100644 --- a/quantum/keymap_extras/sendstring_spanish.h +++ b/quantum/keymap_extras/sendstring_spanish.h @@ -19,47 +19,48 @@ #pragma once #include "keymap_spanish.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), - 0, 1, 1, 0, 1, 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, - 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 + KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, - 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 + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_turkish_f.h b/quantum/keymap_extras/sendstring_turkish_f.h index 82dbbdbcb447..5eec73bdedb8 100644 --- a/quantum/keymap_extras/sendstring_turkish_f.h +++ b/quantum/keymap_extras/sendstring_turkish_f.h @@ -19,47 +19,48 @@ #pragma once #include "keymap_turkish_f.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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 + KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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 + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_turkish_q.h b/quantum/keymap_extras/sendstring_turkish_q.h index 58505b84966d..97c990c12aa7 100644 --- a/quantum/keymap_extras/sendstring_turkish_q.h +++ b/quantum/keymap_extras/sendstring_turkish_q.h @@ -19,47 +19,48 @@ #pragma once #include "keymap_turkish_q.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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 + KCLUT_ENTRY(0, 1, 0, 0, 0, 1, 1, 1), + KCLUT_ENTRY(1, 1, 0, 1, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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 + KCLUT_ENTRY(0, 0, 0, 1, 1, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/keymap_extras/sendstring_uk.h b/quantum/keymap_extras/sendstring_uk.h index 982456e40ae7..733c5f8600e3 100644 --- a/quantum/keymap_extras/sendstring_uk.h +++ b/quantum/keymap_extras/sendstring_uk.h @@ -19,27 +19,28 @@ #pragma once #include "keymap_uk.h" +#include "quantum.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, +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), - 0, 1, 1, 0, 1, 1, 1, 0, - 1, 1, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 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, - 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, 1, 1, 1, 1, 0 + KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 0, 1, 0, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), }; const uint8_t ascii_to_keycode_lut[128] PROGMEM = { diff --git a/quantum/quantum.c b/quantum/quantum.c index 37c374ece98a..e06448d9e4a7 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -321,50 +321,97 @@ bool process_record_quantum(keyrecord_t *record) { return process_action_kb(record); } -__attribute__((weak)) 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, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 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, 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, 1, 1, 1, 1, 0}; - -__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, +// clang-format off - 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}; +/* Bit-Packed look-up table to convert an ASCII character to whether + * [Shift] needs to be sent with the keycode. + */ +__attribute__((weak)) const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 0, 1, 0, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), +}; + +/* Bit-Packed look-up table to convert an ASCII character to whether + * [AltGr] needs to be sent with the keycode. + */ +__attribute__((weak)) const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), +}; + +/* Look-up table to convert an ASCII character to a keycode. + */ +__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 + 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, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, + // ( ) * + , - . / + KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, + // 0 1 2 3 4 5 6 7 + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + // 8 9 : ; < = > ? + KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, + // @ A B C D E F G + KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + // H I J K L M N O + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + // P Q R S T U V W + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + // X Y Z [ \ ] ^ _ + KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, + // ` a b c d e f g + KC_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + // h i j k l m n o + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + // p q r s t u v w + 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 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 - 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, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, - // ( ) * + , - . / - KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, - // 0 1 2 3 4 5 6 7 - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, - // 8 9 : ; < = > ? - KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, - // @ A B C D E F G - KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, - // H I J K L M N O - KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, - // P Q R S T U V W - KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, - // X Y Z [ \ ] ^ _ - KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, - // ` a b c d e f g - KC_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, - // h i j k l m n o - KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, - // p q r s t u v w - 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 +// Note: we bit-pack in "reverse" order to optimize loading +#define PGM_LOADBIT(mem, pos) ((pgm_read_byte(&((mem)[(pos) / 8])) >> ((pos) % 8)) & 0x01) + void send_string(const char *str) { send_string_with_delay(str, 0); } void send_string_P(const char *str) { send_string_with_delay_P(str, 0); } @@ -462,8 +509,8 @@ void send_char(char ascii_code) { #endif uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]); - bool is_shifted = pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code]); - bool is_altgred = pgm_read_byte(&ascii_to_altgr_lut[(uint8_t)ascii_code]); + bool is_shifted = PGM_LOADBIT(ascii_to_shift_lut, (uint8_t)ascii_code); + bool is_altgred = PGM_LOADBIT(ascii_to_altgr_lut, (uint8_t)ascii_code); if (is_shifted) { register_code(KC_LSFT); diff --git a/quantum/quantum.h b/quantum/quantum.h index 7dc14e62807f..d03ba5942a04 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -211,9 +211,21 @@ typedef ioline_t pin_t; #define SEND_STRING(string) send_string_P(PSTR(string)) #define SEND_STRING_DELAY(string, interval) send_string_with_delay_P(PSTR(string), interval) -extern const bool ascii_to_shift_lut[128]; -extern const bool ascii_to_altgr_lut[128]; +// Look-Up Tables (LUTs) to convert ASCII character to keycode sequence. extern const uint8_t ascii_to_keycode_lut[128]; +extern const uint8_t ascii_to_shift_lut[16]; +extern const uint8_t ascii_to_altgr_lut[16]; +// clang-format off +#define KCLUT_ENTRY(a, b, c, d, e, f, g, h) \ + ( ((a) ? 1 : 0) << 0 \ + | ((b) ? 1 : 0) << 1 \ + | ((c) ? 1 : 0) << 2 \ + | ((d) ? 1 : 0) << 3 \ + | ((e) ? 1 : 0) << 4 \ + | ((f) ? 1 : 0) << 5 \ + | ((g) ? 1 : 0) << 6 \ + | ((h) ? 1 : 0) << 7 ) +// clang-format on void send_string(const char *str); void send_string_with_delay(const char *str, uint8_t interval); From ce30cd2a010b7cad383b34432cc28d808a45266d Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 2 Mar 2020 18:55:57 -0500 Subject: [PATCH 564/973] Update encoder functions for Iris VIA keymap (#8295) --- keyboards/keebio/iris/keymaps/via/keymap.c | 7 +++++++ keyboards/keebio/iris/rev4/rev4.h | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/keyboards/keebio/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c index c861ae845feb..05eb42ae0bf0 100644 --- a/keyboards/keebio/iris/keymaps/via/keymap.c +++ b/keyboards/keebio/iris/keymaps/via/keymap.c @@ -68,6 +68,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { if (clockwise) { tap_code(KC_PGDN); } else { diff --git a/keyboards/keebio/iris/rev4/rev4.h b/keyboards/keebio/iris/rev4/rev4.h index d8623348e4e9..06e515ebc696 100644 --- a/keyboards/keebio/iris/rev4/rev4.h +++ b/keyboards/keebio/iris/rev4/rev4.h @@ -3,7 +3,6 @@ #include "iris.h" #include "quantum.h" - #ifdef USE_I2C #include #ifdef __AVR__ From bff56aa46c7c89d0e5363e3bbcae78341c069c14 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 3 Mar 2020 10:56:46 +1100 Subject: [PATCH 565/973] Remove "ugly hack in usb_main.c" comments (#8296) --- keyboards/at_at/660m/config.h | 2 -- keyboards/cannonkeys/an_c/config.h | 2 -- keyboards/cannonkeys/chimera65/config.h | 2 -- keyboards/cannonkeys/instant60/config.h | 2 -- keyboards/cannonkeys/iron165/config.h | 2 -- keyboards/cannonkeys/ortho48/config.h | 2 -- keyboards/cannonkeys/ortho60/config.h | 2 -- keyboards/cannonkeys/ortho75/config.h | 2 -- keyboards/cannonkeys/practice60/config.h | 2 -- keyboards/cannonkeys/practice65/config.h | 2 -- keyboards/cannonkeys/satisfaction75/config.h | 2 -- keyboards/cannonkeys/savage65/config.h | 2 -- keyboards/cannonkeys/tmov2/config.h | 2 -- keyboards/handwired/bluepill/bluepill70/config.h | 6 +----- keyboards/handwired/ck4x4/config.h | 2 -- keyboards/hid_liber/config.h | 2 -- keyboards/jm60/config.h | 2 -- keyboards/k_type/config.h | 2 -- keyboards/projectkb/alice/config.h | 2 -- keyboards/wete/config.h | 2 -- keyboards/xiaomi/mk02/config.h | 2 -- 21 files changed, 1 insertion(+), 45 deletions(-) diff --git a/keyboards/at_at/660m/config.h b/keyboards/at_at/660m/config.h index f9b19c018177..93b58b30afb3 100644 --- a/keyboards/at_at/660m/config.h +++ b/keyboards/at_at/660m/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xA22A #define PRODUCT_ID 0x6600 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER AT-AT #define PRODUCT 660M #define DESCRIPTION 660M Keyboard diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h index 6390e078971c..7f8d7e8ff6d5 100644 --- a/keyboards/cannonkeys/an_c/config.h +++ b/keyboards/cannonkeys/an_c/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0xA00C #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER CannonKeys #define PRODUCT AN-C #define DESCRIPTION AN-C Keyboard diff --git a/keyboards/cannonkeys/chimera65/config.h b/keyboards/cannonkeys/chimera65/config.h index c76fd6c1c5b5..663d9cca9a52 100644 --- a/keyboards/cannonkeys/chimera65/config.h +++ b/keyboards/cannonkeys/chimera65/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0xC024 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER CannonKeys #define PRODUCT Chimera65 #define DESCRIPTION Chimera65 Keyboard diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h index 4fa76cb88370..6f8f6bd011d2 100644 --- a/keyboards/cannonkeys/instant60/config.h +++ b/keyboards/cannonkeys/instant60/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0x1600 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER CannonKeys #define PRODUCT Instant60 #define DESCRIPTION Instant 60 Keyboard diff --git a/keyboards/cannonkeys/iron165/config.h b/keyboards/cannonkeys/iron165/config.h index 6350514d75cd..c8be89da9507 100644 --- a/keyboards/cannonkeys/iron165/config.h +++ b/keyboards/cannonkeys/iron165/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0x5A12 #define PRODUCT_ID 0x5165 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER SmithAndRune #define PRODUCT Iron165 #define DESCRIPTION Iron165 Keyboard diff --git a/keyboards/cannonkeys/ortho48/config.h b/keyboards/cannonkeys/ortho48/config.h index 497e08bcf5e5..094be01388fc 100644 --- a/keyboards/cannonkeys/ortho48/config.h +++ b/keyboards/cannonkeys/ortho48/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0x0248 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER QMK #define PRODUCT Ortho48 #define DESCRIPTION Ortho48 diff --git a/keyboards/cannonkeys/ortho60/config.h b/keyboards/cannonkeys/ortho60/config.h index 9b85952d789b..412f0df49310 100644 --- a/keyboards/cannonkeys/ortho60/config.h +++ b/keyboards/cannonkeys/ortho60/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6464 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER QMK #define PRODUCT Ortho60 #define DESCRIPTION Ortho60 diff --git a/keyboards/cannonkeys/ortho75/config.h b/keyboards/cannonkeys/ortho75/config.h index 588e2b9215f7..95bb0145204a 100644 --- a/keyboards/cannonkeys/ortho75/config.h +++ b/keyboards/cannonkeys/ortho75/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6464 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER CannonKeys #define PRODUCT Ortho75 #define DESCRIPTION Ortho75 diff --git a/keyboards/cannonkeys/practice60/config.h b/keyboards/cannonkeys/practice60/config.h index c015bb74652e..af23eff322b3 100644 --- a/keyboards/cannonkeys/practice60/config.h +++ b/keyboards/cannonkeys/practice60/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6464 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER QMK #define PRODUCT Practice 60 #define DESCRIPTION Practice 60 diff --git a/keyboards/cannonkeys/practice65/config.h b/keyboards/cannonkeys/practice65/config.h index d09b521bfabf..7ebac8d8e1cf 100644 --- a/keyboards/cannonkeys/practice65/config.h +++ b/keyboards/cannonkeys/practice65/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0x6565 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER CannonKeys #define PRODUCT Practice 65 #define DESCRIPTION Practice 65 diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 3639a3eaa2fe..ff31e37c4b05 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0x57F5 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER CannonKeys #define PRODUCT Satisfaction75 #define DESCRIPTION Satisfaction 75 Keyboard diff --git a/keyboards/cannonkeys/savage65/config.h b/keyboards/cannonkeys/savage65/config.h index 98ec1067a8d1..0839c0111ee2 100644 --- a/keyboards/cannonkeys/savage65/config.h +++ b/keyboards/cannonkeys/savage65/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0x5A65 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER CannonKeys #define PRODUCT Savage65 #define DESCRIPTION Savage65 Keyboard diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h index e6d2afbbf534..d8d95ae55243 100644 --- a/keyboards/cannonkeys/tmov2/config.h +++ b/keyboards/cannonkeys/tmov2/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0x70F2 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER CannonKeys #define PRODUCT TMOv2 #define DESCRIPTION TMOv2 Keyboard diff --git a/keyboards/handwired/bluepill/bluepill70/config.h b/keyboards/handwired/bluepill/bluepill70/config.h index 87fd74633f81..ae00a470aa23 100644 --- a/keyboards/handwired/bluepill/bluepill70/config.h +++ b/keyboards/handwired/bluepill/bluepill70/config.h @@ -4,14 +4,10 @@ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6464 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c works */ // Modified by Xydane #define MANUFACTURER "QMK" -#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00' #define PRODUCT "BluePill70" -#define USBSTR_PRODUCT 'C', '\x00', 'h', '\x00', 'i', '\x00', 'b', '\x00', 'i', '\x00', 'O', '\x00', 'S', '\x00', ' ', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00' #define DESCRIPTION "QMK keyboard firmware with ChibiOS" /* key matrix size */ @@ -22,4 +18,4 @@ // Iso fix for Space Cadet, comment for ANSI layouts #define LSPO_KEY KC_8 -#define RSPC_KEY KC_9 \ No newline at end of file +#define RSPC_KEY KC_9 diff --git a/keyboards/handwired/ck4x4/config.h b/keyboards/handwired/ck4x4/config.h index 4ee5e8f4a83f..3f353affb883 100644 --- a/keyboards/handwired/ck4x4/config.h +++ b/keyboards/handwired/ck4x4/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6464 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER QMK #define PRODUCT CK4x4 #define DESCRIPTION Cannon Keys 4x4 MacroPad diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index c21307e1a2c0..a94daff2944b 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -25,9 +25,7 @@ #define PRODUCT_ID 0xB919 #define DEVICE_VER 0x0001 #define MANUFACTURER "bpiphany" -#define USBSTR_MANUFACTURER 'b', '\x00', 'p', '\x00', 'i', '\x00', 'p', '\x00', 'h', '\x00', 'a', '\x00', 'n', '\x00', 'y', '\x00' #define PRODUCT "HIDLiberation" -#define USBSTR_PRODUCT 'H', '\x00', 'I', '\x00', 'D', '\x00', ' ', '\x00', 'L', '\x00', 'i', '\x00', 'b', '\x00', 'e', '\x00', 'r', '\x00', 'a', '\x00', 't', '\x00', 'i', '\x00', 'o', '\x00', 'n', '\x00' #define DESCRIPTION "HID Liberation powered by QMK" /* key matrix size */ diff --git a/keyboards/jm60/config.h b/keyboards/jm60/config.h index 0d2d0730e79f..f490037f6ed1 100644 --- a/keyboards/jm60/config.h +++ b/keyboards/jm60/config.h @@ -22,8 +22,6 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6464 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER JMWS #define PRODUCT JM60 RGB Keyboard(QMK) #define DESCRIPTION QMK keyboard firmware for JM60 RGB Keyboard diff --git a/keyboards/k_type/config.h b/keyboards/k_type/config.h index a841a5710736..86b08769d1d2 100644 --- a/keyboards/k_type/config.h +++ b/keyboards/k_type/config.h @@ -22,8 +22,6 @@ along with this program. If not, see . #define VENDOR_ID 0x1c11 #define PRODUCT_ID 0xb04d #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER Input Club #define PRODUCT K-Type/QMK /* key matrix size */ diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h index 94c1fd16d6a7..ed54af239453 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0x0159 #define PRODUCT_ID 0xA71C #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER ProjectKB #define PRODUCT Alice #define DESCRIPTION ProjectKB Alice diff --git a/keyboards/wete/config.h b/keyboards/wete/config.h index c8d66b7a6ee5..2440d147f5e1 100644 --- a/keyboards/wete/config.h +++ b/keyboards/wete/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xB16B #define PRODUCT_ID 0x00B5 #define DEVICE_VER 0x0012 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER Ramon Imbao #define PRODUCT Wete #define DESCRIPTION Southpaw Full-sized Keyboard diff --git a/keyboards/xiaomi/mk02/config.h b/keyboards/xiaomi/mk02/config.h index 14ce3875b14c..785f44097fa3 100644 --- a/keyboards/xiaomi/mk02/config.h +++ b/keyboards/xiaomi/mk02/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0B91 #define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ #define MANUFACTURER Xiaomi #define PRODUCT MK02 #define DESCRIPTION Yuemi Pro MK02 From 53ac4d214f2c153e745cfe3d64f3e8d2ff1422e9 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 3 Mar 2020 11:55:42 +1100 Subject: [PATCH 566/973] Update Hungarian keymap and add sendstring LUT (#8220) --- quantum/keymap_extras/keymap_hungarian.h | 288 +++++++++++-------- quantum/keymap_extras/sendstring_hungarian.h | 100 +++++++ 2 files changed, 271 insertions(+), 117 deletions(-) create mode 100644 quantum/keymap_extras/sendstring_hungarian.h diff --git a/quantum/keymap_extras/keymap_hungarian.h b/quantum/keymap_extras/keymap_hungarian.h index e92d1a3b181c..d5c915d1583c 100644 --- a/quantum/keymap_extras/keymap_hungarian.h +++ b/quantum/keymap_extras/keymap_hungarian.h @@ -14,123 +14,177 @@ * along with this program. If not, see . */ -#ifndef KEYMAP_HUNGARIAN -#define KEYMAP_HUNGARIAN +#pragma once #include "keymap.h" -// basic letters -#define HU_Z KC_Y -#define HU_Y KC_Z - -#define HU_A KC_A -#define HU_B KC_B -#define HU_C KC_C -#define HU_D KC_D -#define HU_E KC_E -#define HU_F KC_F -#define HU_G KC_G -#define HU_H KC_H -#define HU_I KC_I -#define HU_J KC_J -#define HU_K KC_K -#define HU_L KC_L -#define HU_M KC_M -#define HU_N KC_N -#define HU_O KC_O -#define HU_P KC_P -#define HU_Q KC_Q -#define HU_R KC_R -#define HU_S KC_S -#define HU_T KC_T -#define HU_U KC_U -#define HU_V KC_V -#define HU_W KC_W -#define HU_X KC_X - -// num row -#define HU_0 KC_GRV -#define HU_1 KC_1 -#define HU_2 KC_2 -#define HU_3 KC_3 -#define HU_4 KC_4 -#define HU_5 KC_5 -#define HU_6 KC_6 -#define HU_7 KC_7 -#define HU_8 KC_8 -#define HU_9 KC_9 -#define HU_OE KC_0 - -#define HU_UE KC_MINS -#define HU_OO KC_EQL - -// q row -#define HU_OEE KC_LBRC -#define HU_UU KC_RBRC - -// a row -#define HU_EE KC_SCLN -#define HU_AA KC_QUOT -#define HU_UEE KC_NUHS - -#define HU_MINS KC_SLSH // - - -#define HU_DOT KC_DOT -#define HU_COMM KC_COMM - -// shifted characters -// num row -#define HU_PARA LSFT(HU_0) // § -#define HU_QUOT LSFT(HU_1) // ' -#define HU_DQOT LSFT(HU_2) // " -#define HU_PLUS LSFT(HU_3) // + -#define HU_EXLM LSFT(HU_4) // ! -#define HU_PERC LSFT(HU_5) // % -#define HU_SLSH LSFT(HU_6) // / -#define HU_EQL LSFT(HU_7) // = -#define HU_LPRN LSFT(HU_8) // ( -#define HU_RPRN LSFT(HU_9) // ) - -// í,y row -#define HU_II KC_NUBS -#define HU_QST LSFT(HU_COMM) // ? -#define HU_COLN LSFT(HU_DOT) // : -#define HU_UNDS LSFT(HU_MINS) // _ - -// Alt Gr'd characters -// num row -#define HU_TILD ALGR(HU_1) // ~ -//#define HU_?? ALGR(HU_2) // ˇ (proper name?) -#define HU_CIRC ALGR(HU_3) // ^ -#define HU_BRV ALGR(HU_4) // ˘ -#define HU_RING ALGR(HU_5) // ° -//#define HU_?? ALGR(HU_6) // ˛ (proper name?) -#define HU_GRV ALGR(HU_7) // ` -//#define HU_?? ALGR(HU_8) // ˙ (proper name?) -#define HU_ACUT ALGR(HU_9) // ´ - -// q row -#define HU_BSLS ALGR(HU_Q) // \ backslash -#define HU_PIPE ALGR(HU_W) // | -#define HU_DIV ALGR(HU_OEE) // ÷ -#define HU_CRSS ALGR(HU_UU) // × -#define HU_EURO ALGR(HU_U) // € - -// a row -#define HU_LBRC ALGR(HU_F) // [ -#define HU_RBRC ALGR(HU_G) // ] -#define HU_DLR ALGR(HU_EE) // $ -#define HU_SS ALGR(HU_AA) // ß - -// í,y row -#define HU_LESS ALGR(KC_NUBS) // < -#define HU_MORE ALGR(HU_Y) // > -#define HU_HASH ALGR(HU_X) // # -#define HU_AMPR ALGR(HU_C) // & -#define HU_AT ALGR(HU_V) // @ -#define HU_LCBR ALGR(HU_B) // { -#define HU_RCBR ALGR(HU_N) // } -#define HU_SCLN ALGR(HU_COMM) // ; -#define HU_ASTR ALGR(HU_MINS) // * - -#endif +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ Ö │ Ü │ Ó │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Ő │ Ú │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ É │ Á │ Ű │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ Í │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define HU_0 KC_GRV // 0 +#define HU_1 KC_1 // 1 +#define HU_2 KC_2 // 2 +#define HU_3 KC_3 // 3 +#define HU_4 KC_4 // 4 +#define HU_5 KC_5 // 5 +#define HU_6 KC_6 // 6 +#define HU_7 KC_7 // 7 +#define HU_8 KC_8 // 8 +#define HU_9 KC_9 // 9 +#define HU_ODIA KC_0 // Ö +#define HU_UDIA KC_MINS // Ü +#define HU_OACU KC_EQL // Ó +// Row 2 +#define HU_Q KC_Q // Q +#define HU_W KC_W // W +#define HU_E KC_E // E +#define HU_R KC_R // R +#define HU_T KC_T // T +#define HU_Z KC_Y // Z +#define HU_U KC_U // U +#define HU_I KC_I // I +#define HU_O KC_O // O +#define HU_P KC_P // P +#define HU_ODAC KC_LBRC // Ő +#define HU_UACU KC_RBRC // Ú +// Row 3 +#define HU_A KC_A // A +#define HU_S KC_S // S +#define HU_D KC_D // D +#define HU_F KC_F // F +#define HU_G KC_G // G +#define HU_H KC_H // H +#define HU_J KC_J // J +#define HU_K KC_K // K +#define HU_L KC_L // L +#define HU_EACU KC_SCLN // É +#define HU_AACU KC_QUOT // Á +#define HU_UDAC KC_NUHS // Ű +// Row 4 +#define HU_IACU KC_NUBS // Í +#define HU_Y KC_Z // Y +#define HU_X KC_X // X +#define HU_C KC_C // C +#define HU_V KC_V // V +#define HU_B KC_B // B +#define HU_N KC_N // N +#define HU_M KC_M // M +#define HU_COMM KC_COMM // , +#define HU_DOT KC_DOT // . +#define HU_MINS KC_SLSH // - + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ § │ ' │ " │ + │ ! │ % │ / │ = │ ( │ ) │   │   │   │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │   │   │   │   │   │   │   │ ? │ : │ _ │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define HU_SECT S(HU_0) // § +#define HU_QUOT S(HU_1) // ' +#define HU_DQUO S(HU_2) // " +#define HU_PLUS S(HU_3) // + +#define HU_EXLM S(HU_4) // ! +#define HU_PERC S(HU_5) // % +#define HU_SLSH S(HU_6) // / +#define HU_EQL S(HU_7) // = +#define HU_LPRN S(HU_8) // ( +#define HU_RPRN S(HU_9) // ) +// Row 4 +#define HU_QUES S(HU_COMM) // ? +#define HU_COLN S(HU_DOT) // : +#define HU_UNDS S(HU_MINS) // _ + +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │   │ ~ │ ˇ │ ^ │ ˘ │ ° │ ˛ │ ` │ ˙ │ ´ │ ˝ │ ¨ │ ¸ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ \ │ | │ Ä │   │   │   │ € │   │   │   │ ÷ │ × │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ ä │ đ │ Đ │ [ │ ] │   │   │ ł │ Ł │ $ │ ß │ ¤ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ < │ > │ # │ & │ @ │ { │ } │   │ ; │   │ * │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define HU_TILD ALGR(HU_1) // ~ +#define HU_CARN ALGR(HU_2) // ˇ (dead) +#define HU_CIRC ALGR(HU_3) // ^ (dead) +#define HU_BREV ALGR(HU_4) // ˘ (dead) +#define HU_RNGA ALGR(HU_5) // ° (dead) +#define HU_OGON ALGR(HU_6) // ˛ (dead) +#define HU_GRV ALGR(HU_7) // ` +#define HU_DOTA ALGR(HU_8) // ˙ (dead) +#define HU_ACUT ALGR(HU_9) // ´ (dead) +#define HU_DACU ALGR(HU_ODIA) // ˝ (dead) +#define HU_DIAE ALGR(HU_UDIA) // ¨ (dead) +#define HU_CEDL ALGR(HU_OACU) // ¸ (dead) +// Row 2 +#define HU_BSLS ALGR(HU_Q) // (backslash) +#define HU_PIPE ALGR(HU_W) // | +#define HU_CADI ALGR(HU_E) // Ä +#define HU_EURO ALGR(HU_U) // € +#define HU_DIV ALGR(HU_ODAC) // ÷ +#define HU_MUL ALGR(HU_UACU) // × +// Row 3 +#define HU_LADI ALGR(HU_A) // ä +#define HU_LDST ALGR(HU_S) // đ +#define HU_CDST ALGR(HU_D) // Đ +#define HU_LBRC ALGR(HU_F) // [ +#define HU_RBRC ALGR(HU_G) // ] +#define HU_LLST ALGR(HU_K) // ł +#define HU_CLST ALGR(HU_L) // Ł +#define HU_DLR ALGR(HU_EACU) // $ +#define HU_SS ALGR(HU_AACU) // ß +#define HU_CURR ALGR(HU_UDAC) // ¤ +// Row 4 +#define HU_LABK ALGR(HU_IACU) // < +#define HU_RABK ALGR(HU_Y) // > +#define HU_HASH ALGR(HU_X) // # +#define HU_AMPR ALGR(HU_C) // & +#define HU_AT ALGR(HU_V) // @ +#define HU_LCBR ALGR(HU_B) // { +#define HU_RCBR ALGR(HU_N) // } +#define HU_SCLN ALGR(HU_COMM) // ; +#define HU_ASTR ALGR(HU_MINS) // * + +// DEPRECATED +#define HU_OE HU_ODIA +#define HU_UE HU_UDIA +#define HU_OO HU_OACU +#define HU_OEE HU_ODAC +#define HU_UU HU_UACU +#define HU_EE HU_EACU +#define HU_AA HU_AACU +#define HU_UEE HU_UDAC +#define HU_II HU_IACU +#define HU_PARA HU_SECT +#define HU_DQOT HU_DQUO +#define HU_QST HU_QUES +#define HU_BRV HU_BREV +#define HU_RING HU_RNGA +#define HU_CRSS HU_MUL +#define HU_LESS HU_LABK +#define HU_MORE HU_RABK diff --git a/quantum/keymap_extras/sendstring_hungarian.h b/quantum/keymap_extras/sendstring_hungarian.h new file mode 100644 index 000000000000..29dc3ccb8c08 --- /dev/null +++ b/quantum/keymap_extras/sendstring_hungarian.h @@ -0,0 +1,100 @@ +/* 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 Hungarian layouts + +#pragma once + +#include "keymap_hungarian.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 1, 1, 0, 0, 1, 0, 1), + KCLUT_ENTRY(1, 1, 0, 1, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 0, 0, 1, 0, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0) +}; + +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 1, 1, 0, 1, 0), + KCLUT_ENTRY(0, 0, 1, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 0, 1, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(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, HU_4, HU_2, HU_X, HU_EACU, HU_5, HU_C, HU_1, + // ( ) * + , - . / + HU_8, HU_9, HU_MINS, HU_3, HU_COMM, HU_MINS, HU_DOT, HU_6, + // 0 1 2 3 4 5 6 7 + HU_0, HU_1, HU_2, HU_3, HU_4, HU_5, HU_6, HU_7, + // 8 9 : ; < = > ? + HU_8, HU_9, HU_DOT, HU_COMM, HU_M, HU_7, HU_DOT, HU_COMM, + // @ A B C D E F G + HU_V, HU_A, HU_B, HU_C, HU_D, HU_E, HU_F, HU_G, + // H I J K L M N O + HU_H, HU_I, HU_J, HU_K, HU_L, HU_M, HU_N, HU_O, + // P Q R S T U V W + HU_P, HU_Q, HU_R, HU_S, HU_T, HU_U, HU_V, HU_W, + // X Y Z [ \ ] ^ _ + HU_X, HU_Y, HU_Z, HU_F, HU_Q, HU_G, HU_3, HU_MINS, + // ` a b c d e f g + HU_7, HU_A, HU_B, HU_C, HU_D, HU_E, HU_F, HU_G, + // h i j k l m n o + HU_H, HU_I, HU_J, HU_K, HU_L, HU_M, HU_N, HU_O, + // p q r s t u v w + HU_P, HU_Q, HU_R, HU_S, HU_T, HU_U, HU_V, HU_W, + // x y z { | } ~ DEL + HU_X, HU_Y, HU_Z, HU_B, HU_W, HU_N, HU_1, KC_DEL +}; From acaecb4f94e3f1dc45cce53b10d1b89052b25ca7 Mon Sep 17 00:00:00 2001 From: shela Date: Wed, 4 Mar 2020 00:00:34 +0900 Subject: [PATCH 567/973] Fix bootloader definition for namecard2x4 (#8301) BOOTLOADER needs to be defined as caterina because namecard2x4 uses avrdude for flasher. --- keyboards/namecard2x4/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rules.mk index 1b9e03d9712b..8912698e5843 100644 --- a/keyboards/namecard2x4/rules.mk +++ b/keyboards/namecard2x4/rules.mk @@ -9,7 +9,7 @@ MCU = atmega32u4 # QMK DFU qmk-dfu # ATmega32A bootloadHID # ATmega328P USBasp -BOOTLOADER = atmel-dfu +BOOTLOADER = caterina # Build Options # change yes to no to disable From ed6586e25bd854f445193566150439b25853f831 Mon Sep 17 00:00:00 2001 From: Alfred Maler Date: Tue, 3 Mar 2020 13:13:42 -0500 Subject: [PATCH 568/973] [Keymap] Feature/alfrdmalr/keymap update (#8174) * 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 * add ortho 4x12 support * add 'trilayer' settings and update keymap * update SYMBOLS layer to SYMBOL * remove minimize sequence * clean up user config * add brightness controls * update settings ascii * moved some symbols around to make vim/linux smoother --- .../community/ortho_4x12/alfrdmalr/config.h | 5 + .../community/ortho_4x12/alfrdmalr/keymap.c | 44 +++++++++ .../community/ortho_4x12/alfrdmalr/rules.mk | 0 .../community/ortho_5x12/alfrdmalr/keymap.c | 4 +- users/alfrdmalr/alfrdmalr.c | 59 ++++++++++- users/alfrdmalr/alfrdmalr.h | 98 ++++++++++--------- users/alfrdmalr/readme.md | 23 +++-- 7 files changed, 171 insertions(+), 62 deletions(-) create mode 100644 layouts/community/ortho_4x12/alfrdmalr/config.h create mode 100644 layouts/community/ortho_4x12/alfrdmalr/keymap.c create mode 100644 layouts/community/ortho_4x12/alfrdmalr/rules.mk diff --git a/layouts/community/ortho_4x12/alfrdmalr/config.h b/layouts/community/ortho_4x12/alfrdmalr/config.h new file mode 100644 index 000000000000..58c9d57abc68 --- /dev/null +++ b/layouts/community/ortho_4x12/alfrdmalr/config.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NO_SOUND) +#endif \ No newline at end of file diff --git a/layouts/community/ortho_4x12/alfrdmalr/keymap.c b/layouts/community/ortho_4x12/alfrdmalr/keymap.c new file mode 100644 index 000000000000..14b76339654d --- /dev/null +++ b/layouts/community/ortho_4x12/alfrdmalr/keymap.c @@ -0,0 +1,44 @@ +#include "alfrdmalr.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// QWERTY +[_QWERTY] = LAYOUT_ortho_4x12_wrapper( + K10, ____QWERTY_L1____, ____QWERTY_R1____, K1B, + K20, ____QWERTY_L2____, ____QWERTY_R2____, K2B, + K30, ____QWERTY_L3____, ____QWERTY_R3____, K3B, + K40, _____BASE_L4_____, _____BASE_R4_____, K4B +), + +// SYMBOL +[_SYMBOL] = LAYOUT_ortho_4x12_wrapper( + 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_4x12_wrapper( + 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_4x12_wrapper( + 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_4x12_wrapper( + 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_4x12/alfrdmalr/rules.mk b/layouts/community/ortho_4x12/alfrdmalr/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/layouts/community/ortho_5x12/alfrdmalr/keymap.c b/layouts/community/ortho_5x12/alfrdmalr/keymap.c index c140128d80dd..2cd5105b217d 100644 --- a/layouts/community/ortho_5x12/alfrdmalr/keymap.c +++ b/layouts/community/ortho_5x12/alfrdmalr/keymap.c @@ -11,8 +11,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { K40, _____BASE_L4_____, _____BASE_R4_____, K4B ), -// SYMBOLS -[_SYMBOLS] = LAYOUT_ortho_5x12_wrapper( +// SYMBOL +[_SYMBOL] = 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, diff --git a/users/alfrdmalr/alfrdmalr.c b/users/alfrdmalr/alfrdmalr.c index 39d2b62e0035..18ce8bad7cb9 100644 --- a/users/alfrdmalr/alfrdmalr.c +++ b/users/alfrdmalr/alfrdmalr.c @@ -35,10 +35,61 @@ void matrix_scan_user(void) { 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(); } +} + +bool syml_pressed = false; +bool symr_pressed = false; +bool settings_active = false; +bool symbols_active = false; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case SYML: + if (record->event.pressed) { + syml_pressed = true; + } else { + syml_pressed = false; + } + break; + case SYMR: + if (record->event.pressed) { + symr_pressed = true; + } else { + symr_pressed = false; + } + break; + } + + // trilayer-esque behavior. If both SYMBOL layer keys are held, then the + // settings layer is open. If only one is held, SYMBOL is active. + if (syml_pressed && symr_pressed) { + layer_on(_SETTINGS); + settings_active = true; + } else if (syml_pressed || symr_pressed) { + if (settings_active) { + layer_off(_SETTINGS); + settings_active = false; + } + layer_on(_SYMBOL); + symbols_active = true; + } else { + if (symbols_active) { + layer_off(_SYMBOL); + symbols_active = false; + } + } + + return true; +} + +// allow access to the settings layer to turn music mode back off +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case SYML: + case SYMR: + return false; + default: + return true; + } } \ No newline at end of file diff --git a/users/alfrdmalr/alfrdmalr.h b/users/alfrdmalr/alfrdmalr.h index 922b7ca40674..1989fb11a021 100644 --- a/users/alfrdmalr/alfrdmalr.h +++ b/users/alfrdmalr/alfrdmalr.h @@ -20,16 +20,24 @@ along with this program. If not, see . enum shared_layers { _QWERTY, - _SETTINGS, - _SYMBOLS, + _SYMBOL, _NAVIGATION, - _NUMPAD + _NUMPAD, + _SETTINGS }; // KEYCODES ============================================================================ + +// the SYML and SYMR keycodes are just used to activate the symbols layer. +// they're distinct so that I can hit both of them to activate a trilayer +enum alfrdmalr_keycodes { + SYML = SAFE_RANGE, + SYMR +}; + #define NUMSPACE LT(_NUMPAD, KC_SPC) #define NAVLAYER MO(_NAVIGATION) -#define SYMLAYER MO(_SYMBOLS) +#define SYMLAYER MO(_SYMBOL) #define SETLAYER MO(_SETTINGS) #define CTRLSHFT C(KC_LSFT) #define WINUNDO C(KC_Z) @@ -42,10 +50,12 @@ enum shared_layers { #define K41 CTRLSHFT #define K42 KC_LGUI #define K43 KC_LALT -#define K44 SYMLAYER +// #define K44 SYMLAYER +#define K44 SYML #define K45 NUMSPACE #define K46 NUMSPACE -#define K47 SYMLAYER +// #define K47 SYMLAYER +#define K47 SYMR #define K48 KC_RALT #define K49 SETLAYER #define K4A MU_TOG @@ -86,7 +96,7 @@ enum shared_layers { * ,-----------------------------------------------------------------------------------. * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | DEL | + * | TAB | Q | W | E | R | T | Y | U | I | O | P | BKSP | * |------+------+------+------+------+------+------+------+------+------+------+------| * | NAV | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -110,13 +120,13 @@ enum shared_layers { /* NUMPAD ============================================================================== * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | F9 | F10 | F11 | F12 | | NLCK | 7 | 8 | 9 | - | DEL | + * | TRNS | F9 | F10 | F11 | F12 | | NLCK | 7 | 8 | 9 | - | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| * | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS | + * | TRNS | F1 | F2 | F3 | F4 | ALT | | 1 | 2 | 3 | / | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS | * `-----------------------------------------------------------------------------------' @@ -140,7 +150,7 @@ enum shared_layers { // - 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 +#define ____NUMPAD_R3____ KC_NO, KC_1, KC_2, KC_3, KC_SLSH // - MODS #define ____NUMPAD_R4____ KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_ASTR @@ -150,15 +160,15 @@ enum shared_layers { #define K3B_NUM KC_TRNS #define K4B_NUM KC_TRNS -/* SYMBOLS ============================================================================= +/* SYMBOL ============================================================================== * ,-----------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | + * | TRNS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | # | $ | { | } | | | ^ | * | | | ~ | TRNS | + * | TRNS | ! | @ | { | } | | | ^ | $ | & | | | DEL | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | < | > | ( | ) | | | - | + | & | \ | ` | + * | TRNS | < | > | ( | ) | | | - | + | = | \ | ` | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | TRNS | ! | @ | [ | ] | | | _ | = | % | / | SHFT | + * | TRNS | ~ | # | [ | ] | | | _ | * | % | / | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| * | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | * `-----------------------------------------------------------------------------------' @@ -166,9 +176,9 @@ enum shared_layers { // 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 +#define ____SYMBOL_L1____ KC_EXCLAIM, KC_AT, KC_LCBR, KC_RCBR, KC_NO +#define ____SYMBOL_L2____ KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO +#define ____SYMBOL_L3____ KC_TILD, KC_HASH, KC_LBRC, KC_RBRC, KC_NO // - MODS #define ____SYMBOL_L4____ ______TRANS______ @@ -180,27 +190,27 @@ enum shared_layers { // 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 +#define ____SYMBOL_R1____ KC_NO, KC_CIRC, KC_DOLLAR, KC_AMPR, KC_PIPE +#define ____SYMBOL_R2____ KC_NO, KC_MINS, KC_PLUS, KC_EQL, KC_BSLS +#define ____SYMBOL_R3____ KC_NO, KC_UNDS, KC_ASTR, KC_PERC, KC_SLSH // - MODS #define ____SYMBOL_R4____ ______TRANS______ #define K0B_SYM KC_TRNS -#define K1B_SYM KC_TRNS +#define K1B_SYM KC_DEL #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 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| * | 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 | UNDO | CUT | COPY | PSTE | | | PGDO | PGUP | CAPS | | TRNS | * |------+------+------+------+------+------+------+------+------+------+------+------| * | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS | * `-----------------------------------------------------------------------------------' @@ -213,7 +223,7 @@ enum shared_layers { #define __NAVIGATION_L3__ WINUNDO, WINCUT, WINCOPY, WINPASTE, KC_NO // - MODS -#define __NAVIGATION_L4__ _______, _______, _______, _______, KC_ESC +#define __NAVIGATION_L4__ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ESC #define K00_NAV KC_TRNS #define K10_NAV KC_TRNS #define K20_NAV KC_TRNS @@ -224,10 +234,10 @@ enum shared_layers { // - 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 +#define __NAVIGATION_R3__ KC_NO, KC_PGDN, KC_PGUP, KC_CAPS, KC_NO // - MODS -#define __NAVIGATION_R4__ KC_ESC, _______, _______, _______, _______ +#define __NAVIGATION_R4__ KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS #define K0B_NAV KC_TRNS #define K1B_NAV KC_TRNS #define K2B_NAV KC_ENT @@ -236,41 +246,41 @@ enum shared_layers { /* SETTINGS ============================================================================ * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | | | | | | | | | | BRID | BRIU | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | DBUG | | | | | | | | | | + * | | | | | | | | | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap| | | | | | + * | | | | | | | MPRV | MPLY | MUTE | MNXT | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * | ASTG | MUTO | AUOF | AUON | | | | VOLD | VOLU | | | ASTG | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | TRNS | | TRNS | | | | | * `-----------------------------------------------------------------------------------' */ // 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 +#define ___SETTINGS_L1___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___SETTINGS_L2___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___SETTINGS_L3___ MU_TOG, AU_OFF, AU_ON, KC_NO, KC_NO // - MODS -#define ___SETTINGS_L4___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO +#define ___SETTINGS_L4___ KC_NO, KC_NO, KC_NO, KC_TRNS, 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 +// RIGHT // - CORE -#define ___SETTINGS_R1___ TERM_ON, TERM_OFF, _______, _______, _______ -#define ___SETTINGS_R2___ _______, _______, _______, _______, _______ -#define ___SETTINGS_R3___ _______, _______, _______, _______, _______ +#define ___SETTINGS_R1___ KC_NO, KC_NO, KC_NO, KC_BRID, KC_BRIU +#define ___SETTINGS_R2___ KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_NO +#define ___SETTINGS_R3___ KC_NO, KC_VOLD, KC_VOLU, KC_NO, KC_NO // - MODS -#define ___SETTINGS_R4___ KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO +#define ___SETTINGS_R4___ KC_NO, KC_TRNS, KC_NO, KC_NO, 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 +#define K3B_SET KC_ASTG +#define K4B_SET KC_NO diff --git a/users/alfrdmalr/readme.md b/users/alfrdmalr/readme.md index d462a5baf17b..9e5f962bbb62 100644 --- a/users/alfrdmalr/readme.md +++ b/users/alfrdmalr/readme.md @@ -1,6 +1,6 @@ # alfrdmalr's userspace ## Overview -The alphanumeric characters and symbols are spread between three main 'typing' layers: REGULAR, NUMPAD, and SYMBOLS. +The alphanumeric characters and symbols are spread between three main 'typing' layers: REGULAR, NUMPAD, and SYMBOL. 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. @@ -22,26 +22,25 @@ The NUMPAD layer puts a numpad under the right hand, surrounding the home row po 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. +#### SYMBOL +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 SYMBOL 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. +Over time, this layer has become a general utility layer, though its primary function of is still 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). +`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). Again, this is for convenience when formatting text. #### SETTINGS -Right now, this is pretty similar to the default settings layer (the planck's ADJUST layer). +The SETTINGS layer can be accessed by pressing both SYMBOL layer keys at once. This is functionally the same as a trilayer, though because both keys are activating the same layer it doesn't actually use the trilayer feature. -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. +This layer contains things like feature toggles, media controls, and other infrequently-used options. ### Leader Key Sequences -A complete list of leader sequences can be found below: +A complete list of leader sequences can be found below. The LEAD key that begins each sequence has been omitted. -#### Reset -LEAD - R - E - S - E - T -#### Minimize (Windows) -LEAD - M - I - N +| Sequence | Function | +| :------: | -------------------------------- | +| R-E-S-E-T | Reset the keyboard into DFU mode | From ad96e995afc6a8132a054ccab2b08e3501719159 Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Tue, 3 Mar 2020 12:45:19 -0800 Subject: [PATCH 569/973] [Keymap] Add crd's equinox keymap (#8251) --- keyboards/ai03/equinox/keymaps/crd/keymap.c | 47 ++++++++++++++++++++ keyboards/ai03/equinox/keymaps/crd/readme.md | 3 ++ 2 files changed, 50 insertions(+) create mode 100644 keyboards/ai03/equinox/keymaps/crd/keymap.c create mode 100644 keyboards/ai03/equinox/keymaps/crd/readme.md diff --git a/keyboards/ai03/equinox/keymaps/crd/keymap.c b/keyboards/ai03/equinox/keymaps/crd/keymap.c new file mode 100644 index 000000000000..108a00d9d457 --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/crd/keymap.c @@ -0,0 +1,47 @@ +/* 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 +/* + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K304, K306, K308, K309, K310, K311 \ +*/ + +#define KC_CTES RCTL_T(KC_ESC) +#define KC_BSM1 LT(1, KC_BSPC) +#define KC_SPM1 LT(1, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_GRV, + KC_CTES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_ENT, + KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, XXXXXXX, KC_RGUI, KC_BSM1, MO(2), KC_SPM1, KC_RALT, XXXXXXX, KC_RCTL + ), + [1] = LAYOUT_all( /* Extra Keys */ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, + _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( /* Num and FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, KC_SCLN, KC_QUOT, XXXXXXX, _______, + _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, + _______, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, _______ + ) +}; diff --git a/keyboards/ai03/equinox/keymaps/crd/readme.md b/keyboards/ai03/equinox/keymaps/crd/readme.md new file mode 100644 index 000000000000..c1f50e5ebfbb --- /dev/null +++ b/keyboards/ai03/equinox/keymaps/crd/readme.md @@ -0,0 +1,3 @@ +# crd's keymap for equinox + +[KLE](http://www.keyboard-layout-editor.com/#/gists/0be9c4a916dba80ebb5533cd00c5304c) From 910d603c657e4ad81a4e7a4c86a74e2e79aa1eaa Mon Sep 17 00:00:00 2001 From: Ibnu Daru Aji Date: Wed, 4 Mar 2020 04:46:11 +0700 Subject: [PATCH 570/973] [Keymap] new userspace for ibnuda (#8221) * to ease the maintenance for some boards ibnuda has. * followed ridingqwerty's suggestion on 8821. * folloing drashna's suggestion on qmk's 8221. * following drashn's suggestion on qmk's 8211 --- keyboards/atreus/keymaps/ibnuda/keymap.c | 285 +++--------------- keyboards/atreus/keymaps/ibnuda/rules.mk | 7 - .../4x5/keymaps/ibnuda/config.h | 32 ++ .../4x5/keymaps/ibnuda/keymap.c | 61 ++++ users/ibnuda/combo.c | 1 + users/ibnuda/combo.h | 61 ++++ .../atreus/keymaps => users}/ibnuda/config.h | 8 +- users/ibnuda/ibnuda.c | 1 + users/ibnuda/ibnuda.h | 55 ++++ users/ibnuda/readme.md | 14 + users/ibnuda/rules.mk | 14 + users/ibnuda/tapdance.c | 83 +++++ users/ibnuda/tapdance.h | 23 ++ users/ibnuda/wrapper.h | 46 +++ 14 files changed, 434 insertions(+), 257 deletions(-) delete mode 100644 keyboards/atreus/keymaps/ibnuda/rules.mk create mode 100644 keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/config.h create mode 100644 keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c create mode 100644 users/ibnuda/combo.c create mode 100644 users/ibnuda/combo.h rename {keyboards/atreus/keymaps => users}/ibnuda/config.h (50%) create mode 100644 users/ibnuda/ibnuda.c create mode 100644 users/ibnuda/ibnuda.h create mode 100644 users/ibnuda/readme.md create mode 100644 users/ibnuda/rules.mk create mode 100644 users/ibnuda/tapdance.c create mode 100644 users/ibnuda/tapdance.h create mode 100644 users/ibnuda/wrapper.h diff --git a/keyboards/atreus/keymaps/ibnuda/keymap.c b/keyboards/atreus/keymaps/ibnuda/keymap.c index 3c1c0f45034f..3bdfccad980b 100644 --- a/keyboards/atreus/keymaps/ibnuda/keymap.c +++ b/keyboards/atreus/keymaps/ibnuda/keymap.c @@ -1,258 +1,47 @@ #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), -}; +#include "ibnuda.h" + +// clang-format off +#define LAYOUT_atreus_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, \ + KTA, KTB, KTC, KTD \ + ) \ + LAYOUT_wrapper( \ + 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, \ + ___, ___, ___, ___, KTA, KTB, KTC, KTD, ___, ___, ___, ___ \ + ) +#define LAYOUT_atreus_base_wrapper(...) LAYOUT_atreus_base(__VA_ARGS__) 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, _______,_______,_______,_______ +[_BASE] = LAYOUT_atreus_base_wrapper( + ________________DVORAK_L1_______________, ________________DVORAK_R1_______________, + ________________DVORAK_L2_______________, ________________DVORAK_R2_______________, + ________________DVORAK_L3_______________, ________________DVORAK_R3_______________, + 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, _______,_______,_______,_______ +[_RAISE] = LAYOUT_atreus_base_wrapper( + ________________RAISE_L1________________, ________________RAISE_R1________________, + ________________RAISE_L2________________, ________________RAISE_R2________________, + ________________RAISE_L3________________, ________________RAISE_R3________________, + 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, _______,_______,_______,_______,_______, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ +[_LOWER] = LAYOUT_atreus_base_wrapper( + ________________LOWER_L1________________, ________________LOWER_R1________________, + ________________LOWER_L2________________, ________________LOWER_R2________________, + ________________LOWER_L3________________, ________________LOWER_R3________________, + _______,_______, _______,ADDDD ), -[_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,_______,_______, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ +[_ADJUST] = LAYOUT_atreus_base_wrapper( + ________________ADJUST_L1_______________, ________________ADJUST_R1_______________, + ________________ADJUST_L2_______________, ________________ADJUST_R2_______________, + ________________ADJUST_L3_______________, ________________ADJUST_R3_______________, + _______,_______, _______,_______ ), }; +// clang-format on diff --git a/keyboards/atreus/keymaps/ibnuda/rules.mk b/keyboards/atreus/keymaps/ibnuda/rules.mk deleted file mode 100644 index ce80219d1a56..000000000000 --- a/keyboards/atreus/keymaps/ibnuda/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -# Build Options -# change yes to no to disable -# - -MOUSEKEY_ENABLE = yes -COMBO_ENABLE = yes -TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/config.h new file mode 100644 index 000000000000..07a1323db266 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/config.h @@ -0,0 +1,32 @@ +/* +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 diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c new file mode 100644 index 000000000000..58a8c63aaf26 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +#include "ibnuda.h" + +#define TAB KC_TAB +#define GUI KC_LGUI +#define MIN KC_MINS +#define SLS KC_SLSH +#define CTL KC_LCTL +#define DEL KC_DELT +#define QUE KC_QUES +#define ___ KC_NO + +// clang-format off +#define LAYOUT_dm_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, \ + KTA, KTB, KTC, KTD \ + ) \ + LAYOUT_wrapper( \ + 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, \ + TAB, GUI, MIN, SLS, \ + KTA, KTB, KTC, KTD, \ + CTL, DEL, QUE, CTL, \ + ___, ___, ___, ___ \ + ) + +#define LAYOUT_dm_base_wrapper(...) LAYOUT_dm_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT_dm_base_wrapper( + ________________DVORAK_L1_______________, ________________DVORAK_R1_______________, + ________________DVORAK_L2_______________, ________________DVORAK_R2_______________, + ________________DVORAK_L3_______________, ________________DVORAK_R3_______________, + LW_BSPC,SFT_ESC, ALT_ENT,RS_SPC +), + +[_RAISE] = LAYOUT_dm_base_wrapper( + ________________RAISE_L1________________, ________________RAISE_R1________________, + ________________RAISE_L2________________, ________________RAISE_R2________________, + ________________RAISE_L3________________, ________________RAISE_R3________________, + ADDDD, _______, _______,_______ +), +[_LOWER] = LAYOUT_dm_base_wrapper( + ________________LOWER_L1________________, ________________LOWER_R1________________, + ________________LOWER_L2________________, ________________LOWER_R2________________, + ________________LOWER_L3________________, ________________LOWER_R3________________, + _______,_______, _______,ADDDD +), +[_ADJUST] = LAYOUT_dm_base_wrapper( + ________________ADJUST_L1_______________, ________________ADJUST_R1_______________, + ________________ADJUST_L2_______________, ________________ADJUST_R2_______________, + ________________ADJUST_L3_______________, ________________ADJUST_R3_______________, + _______,_______, _______,_______ +), +}; +// clang-format on + diff --git a/users/ibnuda/combo.c b/users/ibnuda/combo.c new file mode 100644 index 000000000000..a48b0aae3721 --- /dev/null +++ b/users/ibnuda/combo.c @@ -0,0 +1 @@ +#include "combo.h" diff --git a/users/ibnuda/combo.h b/users/ibnuda/combo.h new file mode 100644 index 000000000000..a9fa69d222c1 --- /dev/null +++ b/users/ibnuda/combo.h @@ -0,0 +1,61 @@ +#pragma once +#include "quantum.h" + +// enum for combos. +enum combos { + // left hand combinations. + COLON_COMMA, + COMMA_DOT, + DOT_P, + QUOT_Q, + Q_J, + J_K, + + // right hand combinations. + L_R, + R_C, + C_G, + V_W, + W_M, + + // both hands combinations. + J_W, +}; + +// 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 quot_q_combo[] = {KC_QUOT, KC_Q, 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 j_w_combo[] = {KC_J, KC_W, 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), + [QUOT_Q] = COMBO(quot_q_combo, KC_ENT), + [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. + [J_W] = COMBO(j_w_combo, KC_ENT), +}; diff --git a/keyboards/atreus/keymaps/ibnuda/config.h b/users/ibnuda/config.h similarity index 50% rename from keyboards/atreus/keymaps/ibnuda/config.h rename to users/ibnuda/config.h index 625abe488fcc..b43679a66ea0 100644 --- a/keyboards/atreus/keymaps/ibnuda/config.h +++ b/users/ibnuda/config.h @@ -1,5 +1,9 @@ #pragma once -#define TAPPING_TERM 200 +#define COMBO_COUNT 18 +#define COMBO_TERM 100 + #define IGNORE_MOD_TAP_INTERRUPT -#define COMBO_COUNT 15 +#define PERMISSIVE_HOLD + +#define TAPPING_TERM 200 diff --git a/users/ibnuda/ibnuda.c b/users/ibnuda/ibnuda.c new file mode 100644 index 000000000000..8d5bd04ba038 --- /dev/null +++ b/users/ibnuda/ibnuda.c @@ -0,0 +1 @@ +#include "ibnuda.h" diff --git a/users/ibnuda/ibnuda.h b/users/ibnuda/ibnuda.h new file mode 100644 index 000000000000..f50949df5649 --- /dev/null +++ b/users/ibnuda/ibnuda.h @@ -0,0 +1,55 @@ +#pragma once +#include "quantum.h" + +#include "tapdance.h" +#include "wrapper.h" +//#include "combo.h" + +enum { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +// thumb keys. +#define ALT_ENT ALT_T(KC_ENT) +#define SFT_ESC SFT_T(KC_ESC) + +// home row mods. +#define CT_O LCTL_T(KC_O) +#define CT_N RCTL_T(KC_N) +#define SH_A LSFT_T(KC_A) +#define SH_S RSFT_T(KC_S) +#define AL_E LALT_T(KC_E) +#define AL_T RALT_T(KC_T) +#define GU_I LGUI_T(KC_I) +#define GU_D RGUI_T(KC_D) + +// layer toggle. +#define LW_I LT(_LOWER, KC_I) +#define LW_BSPC LT(_LOWER, KC_BSPC) +#define RS_SPC LT(_RAISE, KC_SPC) +#define RS_D LT(_RAISE, KC_D) + +// idk, man. not used, i guess. +#define ADDDD MO(_ADJUST) + +// 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) diff --git a/users/ibnuda/readme.md b/users/ibnuda/readme.md new file mode 100644 index 000000000000..24b8d6ba347d --- /dev/null +++ b/users/ibnuda/readme.md @@ -0,0 +1,14 @@ +Copyright 2020 Ibnu D. Aji @ibnuda + +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/ibnuda/rules.mk b/users/ibnuda/rules.mk new file mode 100644 index 000000000000..1cf315ebe9bb --- /dev/null +++ b/users/ibnuda/rules.mk @@ -0,0 +1,14 @@ +COMBO_ENABLE = yes +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +TAP_DANCE_ENABLE = yes + +SRC += ibnuda.c + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tapdance.c +endif + +ifeq ($(strip $(COMBO_ENABLE)), yes) + SRC += combo.c +endif diff --git a/users/ibnuda/tapdance.c b/users/ibnuda/tapdance.c new file mode 100644 index 000000000000..c0d2192587ad --- /dev/null +++ b/users/ibnuda/tapdance.c @@ -0,0 +1,83 @@ +#include "tapdance.h" + +static td_state_t td_state; + +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), +}; diff --git a/users/ibnuda/tapdance.h b/users/ibnuda/tapdance.h new file mode 100644 index 000000000000..258321d4ca53 --- /dev/null +++ b/users/ibnuda/tapdance.h @@ -0,0 +1,23 @@ +#pragma once +#include "ibnuda.h" + +#ifdef TAP_DANCE_ENABLE +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_TAP, +} td_state_t; + +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, +}; + +#endif // TAP_DANCE_ENABLE diff --git a/users/ibnuda/wrapper.h b/users/ibnuda/wrapper.h new file mode 100644 index 000000000000..34350cf36914 --- /dev/null +++ b/users/ibnuda/wrapper.h @@ -0,0 +1,46 @@ +#pragma once +#include "ibnuda.h" + +/* +Since our quirky block definitions are basically a list of comma separated +arguments, we need a wrapper in order for these definitions to be +expanded before being used as arguments to the LAYOUT_xxx macro. +*/ +#if (!defined(LAYOUT) && defined(KEYMAP)) +# define LAYOUT KEYMAP +#endif + +#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + +#define ________________DVORAK_L1_______________ KC_SCLN,KC_COMM,KC_DOT, KC_P, KC_Y +#define ________________DVORAK_L2_______________ SH_A, CT_O, AL_E, KC_U, GU_I +#define ________________DVORAK_L3_______________ KC_QUOT,KC_Q, KC_J, KC_K, KC_X + +#define ________________DVORAK_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L +#define ________________DVORAK_R2_______________ GU_D, KC_H, AL_T, CT_N, SH_S +#define ________________DVORAK_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z + +#define ________________RAISE_L1________________ KC_EXLM,KC_AT, KC_UP, KC_LCBR,KC_RCBR +#define ________________RAISE_L2________________ KC_HASH,KC_LEFT,KC_DOWN,KC_RGHT,KC_DLR +#define ________________RAISE_L3________________ KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR + +#define ________________RAISE_R1________________ KC_BSLS,KC_7, KC_8, KC_9, KC_ASTR +#define ________________RAISE_R2________________ KC_EQL, KC_4, KC_5, KC_6, KC_0 +#define ________________RAISE_R3________________ KC_GRV, KC_1, KC_2, KC_3, KC_PLUS + +#define ________________LOWER_L1________________ KC_ESC, KC_QUES,KC_UNDS,KC_F1, KC_F2 +#define ________________LOWER_L2________________ KC_LSFT,KC_TAB, KC_PGUP,KC_F5, KC_F6 +#define ________________LOWER_L3________________ KC_CLCK,KC_SLCK,KC_PGDN,KC_F9, KC_F10 + +#define ________________LOWER_R1________________ KC_F3, KC_F4, KC_MINS,KC_SLSH,KC_BSPC +#define ________________LOWER_R2________________ KC_F7, KC_F8, KC_HOME,KC_LALT,KC_ENT +#define ________________LOWER_R3________________ KC_F11, KC_F12, KC_END, KC_INS, KC_SLSH + +#define ________________ADJUST_L1_______________ _______,EXPLR, KC_UP, PRVTAB, PRVWIN +#define ________________ADJUST_L2_______________ TSKMGR, KC_LEFT,KC_DOWN,KC_RGHT,UPTAB +#define ________________ADJUST_L3_______________ _______,CLSGUI, _______,CONPST, RESET + +#define ________________ADJUST_R1_______________ NXTWIN, NXTTAB, _______,_______,LCKGUI +#define ________________ADJUST_R2_______________ DNTAB, KC_ENT, KC_LGUI,_______,CALDL +#define ________________ADJUST_R3_______________ _______,_______,_______,_______,_______ From 8c3ff3f32c49c649ef6632d10f8fb15ef60d990d Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 4 Mar 2020 09:10:39 +1100 Subject: [PATCH 571/973] [Keyboard] LFK78 refactor (#7835) * Change include guards to pragma once * Clean up default keymaps * Remove some magic numbers and use GPIO macros * Clean up keyboard.[ch] * Tidy up info.json and readme * Align config.h with template * Split up revision code into subfolders * rev C-H has no audio, apparently * Change revc_h to revc and document differences * Turn off Audio on revb for now, for Travis' sake * Split info.json into revision folders * Clean up default keymaps some more --- keyboards/lfkeyboards/lfk78/config.h | 139 +++++-- keyboards/lfkeyboards/lfk78/info.json | 21 - .../lfk78/keymaps/default/keymap.c | 164 ++++---- .../lfk78/keymaps/default/rules.mk | 32 -- .../lfkeyboards/lfk78/keymaps/iso/keymap.c | 164 ++++---- .../lfkeyboards/lfk78/keymaps/iso/readme.md | 2 +- .../lfkeyboards/lfk78/keymaps/iso/rules.mk | 41 -- .../lfk78/keymaps/split_bs_osx/keymap.c | 162 ++++---- .../lfk78/keymaps/split_bs_osx/rules.mk | 31 -- keyboards/lfkeyboards/lfk78/lfk78.c | 140 ++++--- keyboards/lfkeyboards/lfk78/lfk78.h | 140 +------ keyboards/lfkeyboards/lfk78/readme.md | 17 +- keyboards/lfkeyboards/lfk78/revb/config.h | 21 + keyboards/lfkeyboards/lfk78/revb/info.json | 104 +++++ keyboards/lfkeyboards/lfk78/revb/revb.h | 39 ++ keyboards/lfkeyboards/lfk78/revb/rules.mk | 2 + keyboards/lfkeyboards/lfk78/revc/config.h | 21 + keyboards/lfkeyboards/lfk78/revc/info.json | 392 ++++++++++++++++++ keyboards/lfkeyboards/lfk78/revc/revc.h | 76 ++++ keyboards/lfkeyboards/lfk78/revc/rules.mk | 2 + keyboards/lfkeyboards/lfk78/revj/config.h | 21 + keyboards/lfkeyboards/lfk78/revj/info.json | 392 ++++++++++++++++++ keyboards/lfkeyboards/lfk78/revj/revj.h | 76 ++++ keyboards/lfkeyboards/lfk78/revj/rules.mk | 4 + keyboards/lfkeyboards/lfk78/rules.mk | 52 +-- 25 files changed, 1582 insertions(+), 673 deletions(-) delete mode 100644 keyboards/lfkeyboards/lfk78/info.json delete mode 100644 keyboards/lfkeyboards/lfk78/keymaps/default/rules.mk delete mode 100644 keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk delete mode 100644 keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/rules.mk create mode 100644 keyboards/lfkeyboards/lfk78/revb/config.h create mode 100644 keyboards/lfkeyboards/lfk78/revb/info.json create mode 100644 keyboards/lfkeyboards/lfk78/revb/revb.h create mode 100644 keyboards/lfkeyboards/lfk78/revb/rules.mk create mode 100644 keyboards/lfkeyboards/lfk78/revc/config.h create mode 100644 keyboards/lfkeyboards/lfk78/revc/info.json create mode 100644 keyboards/lfkeyboards/lfk78/revc/revc.h create mode 100644 keyboards/lfkeyboards/lfk78/revc/rules.mk create mode 100644 keyboards/lfkeyboards/lfk78/revj/config.h create mode 100644 keyboards/lfkeyboards/lfk78/revj/info.json create mode 100644 keyboards/lfkeyboards/lfk78/revj/revj.h create mode 100644 keyboards/lfkeyboards/lfk78/revj/rules.mk diff --git a/keyboards/lfkeyboards/lfk78/config.h b/keyboards/lfkeyboards/lfk78/config.h index 44b55b50e0ce..3478c9629f90 100644 --- a/keyboards/lfkeyboards/lfk78/config.h +++ b/keyboards/lfkeyboards/lfk78/config.h @@ -15,68 +15,58 @@ 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 LFK78 -#define DESCRIPTION QMK keyboard firmware for LFK78 LFK_REV_STRING - -#ifdef LFK_REV_B -/* RevB Matrix config */ - #define DIODE_DIRECTION COL2ROW - #define MATRIX_ROWS 10 - #define MATRIX_COLS 8 - #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, F0, F1, F4, F5, F6} - #define MATRIX_COL_PINS { E6, F7, D2, D3, D4, D5, D6, D7 } - #define UNUSED_PINS { C7 } - #define RGBLED_NUM 31 // Number of LEDs -#else -/* RevC/D Matrix config */ - #define DIODE_DIRECTION COL2ROW - #define MATRIX_ROWS 5 - #define MATRIX_COLS 18 - #define MATRIX_ROW_PINS {D2, D3, D4, D5, D6 } - #define MATRIX_COL_PINS {A0, A1, A2, A3, A4, A5, A6, A7, E6, E7,\ - F0, F1, F2, F3, C0, C1, C2, C3 } - #define UNUSED_PINS {B0, B1, B2, B3, B4, B4, B5, B6, B7, C4, C5, C6, C7,\ - D0, D1, D7, E0, E1, E2, E3, E4, D5, F4, F5, F6, F7,\ - E6, E7, F0, F1, F2, F3, C0, C1, C2, C3} - #define RGBLED_NUM 27 // Number of LEDs -#endif +#define DESCRIPTION QMK keyboard firmware for LFK78 -#define AUDIO_VOICES -#define C6_AUDIO +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_LEVELS 8 -#define BACKLIGHT_PWM_MAP {8, 16, 40, 55, 70, 128, 200, 255} +/* + * 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 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 +#define BACKLIGHT_LEVELS 8 +#define BACKLIGHT_PWM_MAP { 8, 16, 40, 55, 70, 128, 200, 255 } #define TAPPING_TERM 200 +#define C6_AUDIO +#define AUDIO_VOICES + +#define RGB_DI_PIN C7 // Have to set it to something to get the ws2812 code to compile +#ifdef RGB_DI_PIN +# define RGBLIGHT_HUE_STEP 10 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 +# define RGBLIGHT_ANIMATIONS +#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 * @@ -110,6 +100,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 @@ -119,8 +113,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 @@ -128,9 +122,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 @@ -140,9 +133,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 @@ -161,7 +156,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/lfk78/info.json b/keyboards/lfkeyboards/lfk78/info.json deleted file mode 100644 index 4af5a37ba1e2..000000000000 --- a/keyboards/lfkeyboards/lfk78/info.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "keyboard_name": "LFK78/68", - "url": "", - "maintainer": "qmk", - "width": 19.5, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.25, "y":0}, {"label":"!", "x":3.25, "y":0}, {"label":"@", "x":4.25, "y":0}, {"label":"#", "x":5.25, "y":0}, {"label":"$", "x":6.25, "y":0}, {"label":"%", "x":7.25, "y":0}, {"label":"^", "x":8.25, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Back Space", "x":15.25, "y":0, "w":2}, {"label":"Insert", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"|", "x":15.75, "y":1, "w":1.5}, {"label":"Delete", "x":17.5, "y":1}, {"label":"PgDn", "x":18.5, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":2.25}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":2.75}, {"label":"\u2191", "x":17.5, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2.25, "y":4, "w":1.25}, {"label":"GUI", "x":3.5, "y":4, "w":1.25}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":6.25}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.25}, {"label":"Fn", "x":14.75, "y":4, "w":1.25}, {"label":"\u2190", "x":16.5, "y":4}, {"label":"\u2193", "x":17.5, "y":4}, {"label":"\u2192", "x":18.5, "y":4}] - }, - "LAYOUT_split_bs": { - "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.25, "y":0}, {"label":"!", "x":3.25, "y":0}, {"label":"@", "x":4.25, "y":0}, {"label":"#", "x":5.25, "y":0}, {"label":"$", "x":6.25, "y":0}, {"label":"%", "x":7.25, "y":0}, {"label":"^", "x":8.25, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Back Space", "x":15.25, "y":0}, {"label":"Back Space", "x":16.25, "y":0}, {"label":"Insert", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"|", "x":15.75, "y":1, "w":1.5}, {"label":"Delete", "x":17.5, "y":1}, {"label":"PgDn", "x":18.5, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":2.25}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":2.75}, {"label":"\u2191", "x":17.5, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2.25, "y":4, "w":1.25}, {"label":"GUI", "x":3.5, "y":4, "w":1.25}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":6.25}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.25}, {"label":"Fn", "x":14.75, "y":4, "w":1.25}, {"label":"\u2190", "x":16.5, "y":4}, {"label":"\u2193", "x":17.5, "y":4}, {"label":"\u2192", "x":18.5, "y":4}] - }, - "LAYOUT_split_rshift": { - "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.25, "y":0}, {"label":"!", "x":3.25, "y":0}, {"label":"@", "x":4.25, "y":0}, {"label":"#", "x":5.25, "y":0}, {"label":"$", "x":6.25, "y":0}, {"label":"%", "x":7.25, "y":0}, {"label":"^", "x":8.25, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"Insert", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"|", "x":15.75, "y":1, "w":1.5}, {"label":"Delete", "x":17.5, "y":1}, {"label":"PgDn", "x":18.5, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":2.25}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3}, {"label":"\u2191", "x":17.5, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2.25, "y":4, "w":1.25}, {"label":"GUI", "x":3.5, "y":4, "w":1.25}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":6.25}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.25}, {"label":"Fn", "x":14.75, "y":4, "w":1.25}, {"label":"\u2190", "x":16.5, "y":4}, {"label":"\u2193", "x":17.5, "y":4}, {"label":"\u2192", "x":18.5, "y":4}] - }, - "LAYOUT_iso": { - "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.25, "y":0}, {"label":"!", "x":3.25, "y":0}, {"label":"@", "x":4.25, "y":0}, {"label":"#", "x":5.25, "y":0}, {"label":"$", "x":6.25, "y":0}, {"label":"%", "x":7.25, "y":0}, {"label":"^", "x":8.25, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"Insert", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"Enter", "x":16, "y":1, "w":1.25, "h":2}, {"label":"Delete", "x":17.5, "y":1}, {"label":"PgDn", "x":18.5, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"@", "x":14, "y":2}, {"label":"~", "x":15, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":1.25}, {"label":"|", "x":3.5, "y":3}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":2.75}, {"label":"\u2191", "x":17.5, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2.25, "y":4, "w":1.25}, {"label":"GUI", "x":3.5, "y":4, "w":1.25}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":6.25}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.25}, {"label":"Fn", "x":14.75, "y":4, "w":1.25}, {"label":"\u2190", "x":16.5, "y":4}, {"label":"\u2193", "x":17.5, "y":4}, {"label":"\u2192", "x":18.5, "y":4}] - } - } -} diff --git a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c index 81ab4338d1c3..a92a506c1243 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c @@ -1,111 +1,99 @@ #include QMK_KEYBOARD_H enum keymap_layout { - VANILLA = 0, // matches MF68 layout - FUNC, // 0x02 - SETTINGS, // 0x04 + VANILLA = 0, // matches MF68 layout + FUNC, + SETTINGS }; // Colors of the layer indicator LED // This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer const Layer_Info layer_info[] = { - // Layer Mask Red Green Blue - {0x00000000, 0xFFFFFFFF, {0x0000, 0x0FFF, 0x0000}}, // base layer - green - {0x00000002, 0xFFFFFFFE, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue - {0x00000004, 0xFFFFFFFC, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta - {0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white + // Layer Mask Red Green Blue + { 0x00000000, 0xFFFFFFFF, { 0x0000, 0x0FFF, 0x0000 } }, // base layer - green + { 0x00000002, 0xFFFFFFFE, { 0x0000, 0x0000, 0x0FFF } }, // function layer - blue + { 0x00000004, 0xFFFFFFFC, { 0x0FFF, 0x0000, 0x0FFF } }, // settings layer - magenta + { 0xFFFFFFFF, 0xFFFFFFFF, { 0x0FFF, 0x0FFF, 0x0FFF } } // unknown layer - REQUIRED - white }; - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap VANILLA: (Base Layer) Default Layer - * ,---------. ,------------------------------------------------------------. ,---------. - * | F1 | F2 | |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| | Ins|PgUp| - * |---------| |------------------------------------------------------------| |---------| - * | F3 | F4 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | Del|PgDn| - * |---------| |------------------------------------------------------------| `---------' - * | F5 | F6 | |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |---------| |------------------------------------------------------------| ,----. - * | F7 | F8 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | - * |---------| |-------------------------------------------------------------------------. - * | F9 | F10| |Ctrl|Win |Alt | Space |Alt |Ctrl|Func | |Lft| Dn |Rig | - * `---------' `------------------------------------------------------' `-------------' - */ - [VANILLA] = LAYOUT( - KC_F1, KC_F2, 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_PGUP, \ - 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_DEL, KC_PGDN, \ - 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_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_UP, \ - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \ - ), + /* Keymap VANILLA: (Base Layer) Default Layer + * ,---------. ,------------------------------------------------------------. ,---------. + * | F1 | F2 | |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| | Ins|PgUp| + * |---------| |------------------------------------------------------------| |---------| + * | F3 | F4 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | Del|PgDn| + * |---------| |------------------------------------------------------------| `---------' + * | F5 | F6 | |CAPS | A| S| D| F| G| H| J| K| L| ;| '| Return | + * |---------| |------------------------------------------------------------| ,----. + * | F7 | F8 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | + * |---------| |-------------------------------------------------------------------------. + * | F9 | F10| |Ctrl|Win |Alt | Space |Alt |Ctrl|Func | |Lft| Dn |Rig | + * `---------' `------------------------------------------------------' `-------------' + */ + [VANILLA] = LAYOUT( + KC_F1, KC_F2, 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_PGUP, + 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_DEL, KC_PGDN, + 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_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_UP, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT + ), - /* Keymap FUNCTION: Function Layer - * ,---------. ,-------------------------------------------------------------. ,---------. - * | | | | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Delete | | Ins|Home| - * |---------| |-------------------------------------------------------------| |---------| - * | | | |Tab |Hom| Up|End|PgU| | | | | | | | | | | Del|End | - * |---------| |-------------------------------------------------------------| `---------' - * | | | |MO(FUNC)|Lft|Dn |Rig|PgD| |Lft|Dwn| Up|Rgt| | | | - * |---------| |-------------------------------------------------------------| ,----. - * | | | |Shift | | | | | | |Mute|V- |V+ | |TG(SETTINGS)| | Up | - * |---------| |--------------------------------------------------------------------------. - * | | | |Ctrl|Win |Alt | Enter |Alt |Func |CTRL | |Lft| Dn |Rig | - * `---------' `------------------------------------------------------' `-------------' - */ - [FUNC] = 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, _______, KC_HOME, \ - _______, _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_END, \ - _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, \ - _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______, \ - _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______, _______ \ - ), + /* Keymap FUNCTION: Function Layer + * ,---------. ,-------------------------------------------------------------. ,---------. + * | | | | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Delete | | Ins|Home| + * |---------| |-------------------------------------------------------------| |---------| + * | | | |Tab |Hom| Up|End|PgU| | | | | | | | | | | Del|End | + * |---------| |-------------------------------------------------------------| `---------' + * | | | |MO(FUNC)|Lft|Dn |Rig|PgD| |Lft|Dwn| Up|Rgt| | | | + * |---------| |-------------------------------------------------------------| ,----. + * | | | |Shift | | | | | | |Mute|V- |V+ | |TG(SETTINGS)| | Up | + * |---------| |--------------------------------------------------------------------------. + * | | | |Ctrl|Win |Alt | Enter |Alt |Func |CTRL | |Lft| Dn |Rig | + * `---------' `------------------------------------------------------' `-------------' + */ + [FUNC] = 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, _______, KC_HOME, + _______, _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_END, + _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______, + _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______, _______ + ), - /* Keymap SETTINGS: Settings Layer - * ,---------. ,-------------------------------------------------------------. ,-------------. - * | | | |LayClr| | | | | | | | | | |BL-|BL+|BL Togl| |RGB Tog |Val+| - * |---------| |-------------------------------------------------------------| |-------------| - * | | | |MuMode | | | | | | | | | | | | |LEDTst| |RGB Mode|Val-| - * |---------| |-------------------------------------------------------------| `-------------' - * | | | |AudTgl |Hz+|MS+| | | | | | | | | | RST | - * |---------| |-------------------------------------------------------------| ,----. - * | | | |ClickTgl |Hz-|MS-| | | | |MuTgl| | | |Layer Clr | |Hue+| - * |---------| |-------------------------------------------------------------------------. - * | | | | | | | | | | | |Sat-|Hue-|Sat+| - * `---------' `--------------------------------------------------------' `--------------' - */ - [SETTINGS] = LAYOUT( - XXXXXXX, XXXXXXX, KC_FN0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, \ - XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, \ - XXXXXXX, XXXXXXX, AU_TOG, KC_FN1, KC_FN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, \ - XXXXXXX, XXXXXXX, KC_FN5, KC_FN2, KC_FN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI \ - ), + /* Keymap SETTINGS: Settings Layer + * ,---------. ,-------------------------------------------------------------. ,-------------. + * | | | |LayClr| | | | | | | | | | |BL-|BL+|BL Togl| |RGB Tog |Val+| + * |---------| |-------------------------------------------------------------| |-------------| + * | | | |MuMode | | | | | | | | | | | | |LEDTst| |RGB Mode|Val-| + * |---------| |-------------------------------------------------------------| `-------------' + * | | | |AudTgl |Hz+|MS+| | | | | | | | | | RST | + * |---------| |-------------------------------------------------------------| ,----. + * | | | |ClickTgl |Hz-|MS-| | | | |MuTgl| | | |Layer Clr | |Hue+| + * |---------| |-------------------------------------------------------------------------. + * | | | | | | | | | | | |Sat-|Hue-|Sat+| + * `---------' `--------------------------------------------------------' `--------------' + */ + [SETTINGS] = LAYOUT( + XXXXXXX, XXXXXXX, F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, + XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, + XXXXXXX, XXXXXXX, AU_TOG, F(1), F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, XXXXXXX, F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI + ) }; const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers - ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click - ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click - ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click - }; + ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers + ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click + ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click + ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click + ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click + ACTION_FUNCTION(LFK_CLICK_TOGGLE) // FN5 - Toggle audio click +}; 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/lfk78/keymaps/default/rules.mk b/keyboards/lfkeyboards/lfk78/keymaps/default/rules.mk deleted file mode 100644 index 9b8038dd36f9..000000000000 --- a/keyboards/lfkeyboards/lfk78/keymaps/default/rules.mk +++ /dev/null @@ -1,32 +0,0 @@ -# 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 -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 -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # 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 - -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 -CAPSLOCK_LED = no # Toggle back light LED of Caps Lock - - -# Override the LFK78 hardware version: -# -# B - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight -# C-H - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB -# J - at90usb646, C6 audio, ISSI device 0 is backlight, 4 is RGB -# LFK_REV = J diff --git a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c index 806f402e83a5..3dbc77557993 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c @@ -2,112 +2,98 @@ enum keymap_layout { VANILLA = 0, // matches MF68 layout - FUNC, // 0x02 - SETTINGS, // 0x04 + FUNC, + SETTINGS }; // Colors of the layer indicator LED // This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer const Layer_Info layer_info[] = { - // Layer Mask Red Green Blue - {0x00000000, 0xFFFFFFFF, {0x0000, 0x0FFF, 0x0000}}, // base layer - green - {0x00000002, 0xFFFFFFFE, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue - {0x00000004, 0xFFFFFFFC, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta - {0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white + // Layer Mask Red Green Blue + { 0x00000000, 0xFFFFFFFF, { 0x0000, 0x0FFF, 0x0000 } }, // base layer - green + { 0x00000002, 0xFFFFFFFE, { 0x0000, 0x0000, 0x0FFF } }, // function layer - blue + { 0x00000004, 0xFFFFFFFC, { 0x0FFF, 0x0000, 0x0FFF } }, // settings layer - magenta + { 0xFFFFFFFF, 0xFFFFFFFF, { 0x0FFF, 0x0FFF, 0x0FFF } } // unknown layer - REQUIRED - white }; - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap VANILLA: (Base Layer) Default Layer - * ,---------. ,------------------------------------------------------------. ,---------. - * | F1 | F2 | |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| | Ins|PgUp| - * |---------| |------------------------------------------------------------| |---------| - * | F3 | F4 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Ret| | Del|PgDn| - * |---------| |--------------------------------------------------------. | `---------' - * | F5 | F6 | |CAPS | A| S| D| F| G| H| J| K| L| ;| '| # | | - * |---------| |-----------------------------------------------------------| ,----. - * | F7 | F8 | |Shft| \ | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | - * |---------| |-------------------------------------------------------------------------. - * | F9 | F10| |Ctrl|Win |Alt | Space |Alt |Ctrl|Func | |Lft| Dn |Rig | - * `---------' `------------------------------------------------------' `-------------' - */ - [VANILLA] = LAYOUT_iso( - KC_F1, KC_F2, 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_PGUP, \ - 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_ENT, KC_DEL, KC_PGDN, \ - 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_NUHS, \ - KC_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \ - ), + /* Keymap VANILLA: (Base Layer) Default Layer + * ,---------. ,------------------------------------------------------------. ,---------. + * | F1 | F2 | |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| | Ins|PgUp| + * |---------| |------------------------------------------------------------| |---------| + * | F3 | F4 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Ret| | Del|PgDn| + * |---------| |--------------------------------------------------------. | `---------' + * | F5 | F6 | |CAPS | A| S| D| F| G| H| J| K| L| ;| '| # | | + * |---------| |-----------------------------------------------------------| ,----. + * | F7 | F8 | |Shft| \ | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | + * |---------| |-------------------------------------------------------------------------. + * | F9 | F10| |Ctrl|Win |Alt | Space |Alt |Ctrl|Func | |Lft| Dn |Rig | + * `---------' `------------------------------------------------------' `-------------' + */ + [VANILLA] = LAYOUT_iso( + KC_F1, KC_F2, 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_PGUP, + 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_ENT, KC_DEL, KC_PGDN, + 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_NUHS, + KC_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT + ), - /* Keymap FUNCTION: Function Layer - * ,---------. ,-------------------------------------------------------------. ,---------. - * | | | | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Delete | | Ins|Home| - * |---------| |-------------------------------------------------------------| |---------| - * | | | |Tab |Hom| Up|End|PgU| | | | | | | | | | | Del|End | - * |---------| |-------------------------------------------------------------| `---------' - * | | | |MO(FUNC)|Lft|Dn |Rig|PgD| |Lft|Dwn| Up|Rgt| | | | - * |---------| |-------------------------------------------------------------| ,----. - * | | | |Shift | | | | | | |Mute|V- |V+ | |TG(SETTINGS)| | Up | - * |---------| |--------------------------------------------------------------------------. - * | | | |Ctrl|Win |Alt | PgD |Alt |Func |CTRL | |Lft| Dn |Rig | - * `---------' `------------------------------------------------------' `-------------' - */ - [FUNC] = 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, _______, KC_HOME, \ - _______, _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_END, \ - _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, \ - _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______, \ - _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \ - ), + /* Keymap FUNCTION: Function Layer + * ,---------. ,-------------------------------------------------------------. ,---------. + * | | | | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Delete | | Ins|Home| + * |---------| |-------------------------------------------------------------| |---------| + * | | | |Tab |Hom| Up|End|PgU| | | | | | | | | | | Del|End | + * |---------| |-------------------------------------------------------------| `---------' + * | | | |MO(FUNC)|Lft|Dn |Rig|PgD| |Lft|Dwn| Up|Rgt| | | | + * |---------| |-------------------------------------------------------------| ,----. + * | | | |Shift | | | | | | |Mute|V- |V+ | |TG(SETTINGS)| | Up | + * |---------| |--------------------------------------------------------------------------. + * | | | |Ctrl|Win |Alt | PgD |Alt |Func |CTRL | |Lft| Dn |Rig | + * `---------' `------------------------------------------------------' `-------------' + */ + [FUNC] = LAYOUT_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_HOME, + _______, _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_END, + _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, TG(SETTINGS), _______, + _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ + ), - /* Keymap SETTINGS: Settings Layer - * ,---------. ,-------------------------------------------------------------. ,-------------. - * | | | |LayClr| | | | | | | | | | |BL-|BL+|BL Togl| |RGB Tog |Val+| - * |---------| |-------------------------------------------------------------| |-------------| - * | | | |MuMode | | | | | | | | | | | | |LEDTst| |RGB Mode|Val-| - * |---------| |-------------------------------------------------------------| `-------------' - * | | | |AudTgl |Hz+|MS+| | | | | | | | | | RST | - * |---------| |-------------------------------------------------------------| ,----. - * | | | |ClickTgl |Hz-|MS-| | | | |MuTgl| | | |Layer Clr | |Hue+| - * |---------| |-------------------------------------------------------------------------. - * | | | | | | | | | | | |Sat-|Hue-|Sat+| - * `---------' `--------------------------------------------------------' `--------------' - */ - [SETTINGS] = LAYOUT( - XXXXXXX, XXXXXXX, KC_FN0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, \ - XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, \ - XXXXXXX, XXXXXXX, AU_TOG, KC_FN1, KC_FN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, \ - XXXXXXX, XXXXXXX, KC_FN5, KC_FN2, KC_FN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI \ - ), + /* Keymap SETTINGS: Settings Layer + * ,---------. ,-------------------------------------------------------------. ,-------------. + * | | | |LayClr| | | | | | | | | | |BL-|BL+|BL Togl| |RGB Tog |Val+| + * |---------| |-------------------------------------------------------------| |-------------| + * | | | |MuMode | | | | | | | | | | | | |LEDTst| |RGB Mode|Val-| + * |---------| |-------------------------------------------------------------| `-------------' + * | | | |AudTgl |Hz+|MS+| | | | | | | | | | RST | + * |---------| |-------------------------------------------------------------| ,----. + * | | | |ClickTgl |Hz-|MS-| | | | |MuTgl| | | |Layer Clr | |Hue+| + * |---------| |-------------------------------------------------------------------------. + * | | | | | | | | | | | |Sat-|Hue-|Sat+| + * `---------' `--------------------------------------------------------' `--------------' + */ + [SETTINGS] = LAYOUT_iso( + XXXXXXX, XXXXXXX, F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, + XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, + XXXXXXX, XXXXXXX, AU_TOG, F(1), F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, XXXXXXX, F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI + ) }; const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers - ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click - ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click - ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click - }; + ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers + ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click + ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click + ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click + ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click + ACTION_FUNCTION(LFK_CLICK_TOGGLE) // FN5 - Toggle audio click +}; 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/lfk78/keymaps/iso/readme.md b/keyboards/lfkeyboards/lfk78/keymaps/iso/readme.md index 85b7b1a8d281..3b9acefbfd42 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/iso/readme.md +++ b/keyboards/lfkeyboards/lfk78/keymaps/iso/readme.md @@ -1 +1 @@ -# The default keymap for bluepad +# The default ISO keymap for LFK78 diff --git a/keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk b/keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk deleted file mode 100644 index 04fa7d81b031..000000000000 --- a/keyboards/lfkeyboards/lfk78/keymaps/iso/rules.mk +++ /dev/null @@ -1,41 +0,0 @@ -# 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 -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 -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # 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 - -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 - - - -# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired -# # -# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight -# # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB -# # -# # Set to B, C or D -# LFK_REV = D - -# ifeq ($(LFK_REV), B) -# MCU = atmega32u4 -# else -# MCU = at90usb1286 -# endif -# OPT_DEFS += -DLFK_REV_$(LFK_REV) -# OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\" diff --git a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c index 35d17805c33c..da7593d39c2c 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c @@ -2,110 +2,98 @@ enum keymap_layout { VANILLA = 0, // matches MF68 layout - FUNC, // 0x02 - SETTINGS, // 0x04 + FUNC, + SETTINGS }; // Colors of the layer indicator LED // This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer const Layer_Info layer_info[] = { - // Layer Mask Red Green Blue - {0x00000000, 0xFFFFFFFF, {0x0000, 0x0FFF, 0x0000}}, // base layer - green - {0x00000002, 0xFFFFFFFE, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue - {0x00000004, 0xFFFFFFFC, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta - {0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white + // Layer Mask Red Green Blue + { 0x00000000, 0xFFFFFFFF, { 0x0000, 0x0FFF, 0x0000 } }, // base layer - green + { 0x00000002, 0xFFFFFFFE, { 0x0000, 0x0000, 0x0FFF } }, // function layer - blue + { 0x00000004, 0xFFFFFFFC, { 0x0FFF, 0x0000, 0x0FFF } }, // settings layer - magenta + { 0xFFFFFFFF, 0xFFFFFFFF, { 0x0FFF, 0x0FFF, 0x0FFF } } // unknown layer - REQUIRED - white }; - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap VANILLA: (Base Layer) Default Layer - * ,---------. ,------------------------------------------------------------. ,---------. - * | F1 | F2 | |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = | / | ` | | Ins|PgUp| - * |---------| |------------------------------------------------------------| |---------| - * | F3 | F4 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backsp| | Del|PgDn| - * |---------| |------------------------------------------------------------| `---------' - * | F5 | F6 | |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |---------| |------------------------------------------------------------| ,----. - * | F7 | F8 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | - * |---------| |-------------------------------------------------------------------------. - * | F9 | F10| |Ctrl|Alt |Cmd | Space |Cmd |Ctrl|Func | |Lft| Dn |Rig | - * `---------' `------------------------------------------------------' `-------------' - */ - [VANILLA] = LAYOUT_split_bs( - KC_F1, KC_F2, 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_GRV, KC_INS, KC_PGUP, \ - 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_BSPC, KC_DEL, KC_PGDN, \ - 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_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_UP, \ - KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \ - ), + /* Keymap VANILLA: (Base Layer) Default Layer + * ,---------. ,------------------------------------------------------------. ,---------. + * | F1 | F2 | |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = | / | ` | | Ins|PgUp| + * |---------| |------------------------------------------------------------| |---------| + * | F3 | F4 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backsp| | Del|PgDn| + * |---------| |------------------------------------------------------------| `---------' + * | F5 | F6 | |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |---------| |------------------------------------------------------------| ,----. + * | F7 | F8 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | + * |---------| |-------------------------------------------------------------------------. + * | F9 | F10| |Ctrl|Alt |Cmd | Space |Cmd |Ctrl|Func | |Lft| Dn |Rig | + * `---------' `------------------------------------------------------' `-------------' + */ + [VANILLA] = LAYOUT_split_bs( + KC_F1, KC_F2, 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_GRV, KC_INS, KC_PGUP, + 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_BSPC, KC_DEL, KC_PGDN, + 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_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_UP, + KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT + ), - /* Keymap FUNCTION: Function Layer - * ,---------. ,-------------------------------------------------------------. ,---------. - * | | | | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Ins |Del | | Ins|Home| - * |---------| |-------------------------------------------------------------| |---------| - * | | | |Tab |Hom| Up|End|PgU| | | | | | | | | | | Del|End | - * |---------| |-------------------------------------------------------------| `---------' - * | | | |MO(FUNC)|Lft|Dn |Rig|PgD| |Lft|Dwn| Up|Rgt| | | | - * |---------| |-------------------------------------------------------------| ,----. - * | | | |Shift | | | | | | |Mute|V- |V+ | |TG(SETTINGS)| | Up | - * |---------| |--------------------------------------------------------------------------. - * | | | |Ctrl|Alt |Cmd | Enter |Alt |Func |CTRL | |Lft| Dn |Rig | - * `---------' `------------------------------------------------------' `-------------' - */ - [FUNC] = LAYOUT_split_bs( - _______, _______, 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_HOME, \ - _______, _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_END, \ - _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, \ - _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______, \ - _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______, _______ \ - ), + /* Keymap FUNCTION: Function Layer + * ,---------. ,-------------------------------------------------------------. ,---------. + * | | | | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Ins |Del | | Ins|Home| + * |---------| |-------------------------------------------------------------| |---------| + * | | | |Tab |Hom| Up|End|PgU| | | | | | | | | | | Del|End | + * |---------| |-------------------------------------------------------------| `---------' + * | | | |MO(FUNC)|Lft|Dn |Rig|PgD| |Lft|Dwn| Up|Rgt| | | | + * |---------| |-------------------------------------------------------------| ,----. + * | | | |Shift | | | | | | |Mute|V- |V+ | |TG(SETTINGS)| | Up | + * |---------| |--------------------------------------------------------------------------. + * | | | |Ctrl|Alt |Cmd | Enter |Alt |Func |CTRL | |Lft| Dn |Rig | + * `---------' `------------------------------------------------------' `-------------' + */ + [FUNC] = LAYOUT_split_bs( + _______, _______, 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_HOME, + _______, _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_END, + _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______, + _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______, _______ + ), - /* Keymap SETTINGS: Settings Layer - * ,---------. ,-------------------------------------------------------------. ,-------------. - * | | | |LayClr| | | | | | | | | | |BL-|BL+| | | |RGB Tog |Val+| - * |---------| |-------------------------------------------------------------| |-------------| - * | | | |MuMode | | | | | | | | | | | | |BLTogl| |RGB Mode|Val-| - * |---------| |-------------------------------------------------------------| `-------------' - * | | | |AudTgl |Hz+|MS+| | | | | | | | | | RST | - * |---------| |-------------------------------------------------------------| ,----. - * | | | |ClickTgl |Hz-|MS-| | | | |MuTgl| | | |Layer Clr | |Hue+| - * |---------| |-------------------------------------------------------------------------. - * | | | | | | | | | | | |Sat-|Hue-|Sat+| - * `---------' `--------------------------------------------------------' `--------------' - */ - [SETTINGS] = LAYOUT_split_bs( - XXXXXXX, XXXXXXX, KC_FN0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, RGB_TOG, RGB_VAI, \ - XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, RGB_MOD, RGB_VAD, \ - XXXXXXX, XXXXXXX, AU_TOG, KC_FN1, KC_FN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, \ - XXXXXXX, XXXXXXX, KC_FN5, KC_FN2, KC_FN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI \ - ), + /* Keymap SETTINGS: Settings Layer + * ,---------. ,-------------------------------------------------------------. ,-------------. + * | | | |LayClr| | | | | | | | | | |BL-|BL+| | | |RGB Tog |Val+| + * |---------| |-------------------------------------------------------------| |-------------| + * | | | |MuMode | | | | | | | | | | | | |BLTogl| |RGB Mode|Val-| + * |---------| |-------------------------------------------------------------| `-------------' + * | | | |AudTgl |Hz+|MS+| | | | | | | | | | RST | + * |---------| |-------------------------------------------------------------| ,----. + * | | | |ClickTgl |Hz-|MS-| | | | |MuTgl| | | |Layer Clr | |Hue+| + * |---------| |-------------------------------------------------------------------------. + * | | | | | | | | | | | |Sat-|Hue-|Sat+| + * `---------' `--------------------------------------------------------' `--------------' + */ + [SETTINGS] = LAYOUT_split_bs( + XXXXXXX, XXXXXXX, F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, RGB_TOG, RGB_VAI, + XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, RGB_MOD, RGB_VAD, + XXXXXXX, XXXXXXX, AU_TOG, F(1), F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, XXXXXXX, F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI + ) }; const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers - ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click - ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click - ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click - }; + ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers + ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click + ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click + ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click + ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click + ACTION_FUNCTION(LFK_CLICK_TOGGLE) // FN5 - Toggle audio click +}; 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/lfk78/keymaps/split_bs_osx/rules.mk b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/rules.mk deleted file mode 100644 index e7f035b753fc..000000000000 --- a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/rules.mk +++ /dev/null @@ -1,31 +0,0 @@ -# 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 -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 -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # 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 - -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 -CAPSLOCK_LED = no # Toggle back light LED of Caps Lock - -# Override the LFK78 hardware version: -# -# B - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight -# C-H - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB -# J - at90usb646, C6 audio, ISSI device 0 is backlight, 4 is RGB -# LFK_REV = J diff --git a/keyboards/lfkeyboards/lfk78/lfk78.c b/keyboards/lfkeyboards/lfk78/lfk78.c index 60b7ab4ce091..cf49a5cfd099 100644 --- a/keyboards/lfkeyboards/lfk78/lfk78.c +++ b/keyboards/lfkeyboards/lfk78/lfk78.c @@ -1,13 +1,11 @@ -#include +#include "lfk78.h" + #include #include -#include "lfk78.h" -#include "keymap.h" +#include